daemora 1.0.10 → 1.0.11
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/README.md +37 -15
- package/SOUL.md +23 -4
- package/daemora-ui/dist/assets/index-BkPHvKYt.css +1 -0
- package/daemora-ui/dist/assets/index-ZiuOJUu0.js +92 -0
- package/daemora-ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/skills/planning.md +168 -0
- package/src/agents/systemPrompt.js +2 -1
- package/src/cli.js +124 -4
- package/src/index.js +6 -2
- package/src/safety/CommandGuard.js +22 -1
- package/src/setup/theme.js +1 -0
- package/src/setup/wizard.js +220 -26
- package/src/tenants/TenantManager.js +37 -0
- package/src/tools/_paths.js +39 -0
- package/src/tools/applyPatch.js +6 -0
- package/src/tools/browserAutomation.js +18 -6
- package/src/tools/createDocument.js +4 -0
- package/src/tools/executeCommand.js +4 -2
- package/src/tools/generateImage.js +7 -3
- package/src/tools/replyWithFile.js +4 -0
- package/src/tools/screenCapture.js +6 -1
- package/src/tools/sendFile.js +4 -0
- package/src/tools/sshTool.js +2 -2
- package/src/tools/textToSpeech.js +21 -12
- package/src/tools/transcribeAudio.js +15 -4
- package/daemora-ui/dist/assets/index-D7W1-PNQ.js +0 -92
- package/daemora-ui/dist/assets/index-DzMLJeoL.css +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
function eS(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 Tc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pd={exports:{}},Ya={},Ad={exports:{}},Je={};var Mg;function tS(){if(Mg)return Je;Mg=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 T=j.prototype=new C;T.constructor=j,S(T,N.prototype),T.isPureReactComponent=!0;var $=Array.isArray,V=Object.prototype.hasOwnProperty,L={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function U(M,X,P){var se,ve={},de=null,q=null;if(X!=null)for(se in X.ref!==void 0&&(q=X.ref),X.key!==void 0&&(de=""+X.key),X)V.call(X,se)&&!A.hasOwnProperty(se)&&(ve[se]=X[se]);var pe=arguments.length-2;if(pe===1)ve.children=P;else if(1<pe){for(var we=Array(pe),be=0;be<pe;be++)we[be]=arguments[be+2];ve.children=we}if(M&&M.defaultProps)for(se in pe=M.defaultProps,pe)ve[se]===void 0&&(ve[se]=pe[se]);return{$$typeof:e,type:M,key:de,ref:q,props:ve,_owner:L.current}}function re(M,X){return{$$typeof:e,type:M.type,key:X,ref:M.ref,props:M.props,_owner:M._owner}}function O(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function J(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?J(""+M.key):X.toString(36)}function G(M,X,P,se,ve){var de=typeof M;(de==="undefined"||de==="boolean")&&(M=null);var q=!1;if(M===null)q=!0;else switch(de){case"string":case"number":q=!0;break;case"object":switch(M.$$typeof){case e:case t:q=!0}}if(q)return q=M,ve=ve(q),M=se===""?"."+oe(q,0):se,$(ve)?(P="",M!=null&&(P=M.replace(_,"$&/")+"/"),G(ve,X,P,"",function(be){return be})):ve!=null&&(O(ve)&&(ve=re(ve,P+(!ve.key||q&&q.key===ve.key?"":(""+ve.key).replace(_,"$&/")+"/")+M)),X.push(ve)),1;if(q=0,se=se===""?".":se+":",$(M))for(var pe=0;pe<M.length;pe++){de=M[pe];var we=se+oe(de,pe);q+=G(de,X,P,we,ve)}else if(we=v(M),typeof we=="function")for(M=we.call(M),pe=0;!(de=M.next()).done;)de=de.value,we=se+oe(de,pe++),q+=G(de,X,P,we,ve);else if(de==="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 q}function F(M,X,P){if(M==null)return M;var se=[],ve=0;return G(M,se,"","",function(de){return X.call(P,de,ve++)}),se}function W(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 ne={current:null},I={transition:null},ee={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:I,ReactCurrentOwner:L};function R(){throw Error("act(...) is not supported in production builds of React.")}return Je.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(!O(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Je.Component=N,Je.Fragment=n,Je.Profiler=a,Je.PureComponent=j,Je.StrictMode=i,Je.Suspense=f,Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,Je.act=R,Je.cloneElement=function(M,X,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var se=S({},M.props),ve=M.key,de=M.ref,q=M._owner;if(X!=null){if(X.ref!==void 0&&(de=X.ref,q=L.current),X.key!==void 0&&(ve=""+X.key),M.type&&M.type.defaultProps)var pe=M.type.defaultProps;for(we in X)V.call(X,we)&&!A.hasOwnProperty(we)&&(se[we]=X[we]===void 0&&pe!==void 0?pe[we]:X[we])}var we=arguments.length-2;if(we===1)se.children=P;else if(1<we){pe=Array(we);for(var be=0;be<we;be++)pe[be]=arguments[be+2];se.children=pe}return{$$typeof:e,type:M.type,key:ve,ref:de,props:se,_owner:q}},Je.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},Je.createElement=U,Je.createFactory=function(M){var X=U.bind(null,M);return X.type=M,X},Je.createRef=function(){return{current:null}},Je.forwardRef=function(M){return{$$typeof:d,render:M}},Je.isValidElement=O,Je.lazy=function(M){return{$$typeof:g,_payload:{_status:-1,_result:M},_init:W}},Je.memo=function(M,X){return{$$typeof:p,type:M,compare:X===void 0?null:X}},Je.startTransition=function(M){var X=I.transition;I.transition={};try{M()}finally{I.transition=X}},Je.unstable_act=R,Je.useCallback=function(M,X){return ne.current.useCallback(M,X)},Je.useContext=function(M){return ne.current.useContext(M)},Je.useDebugValue=function(){},Je.useDeferredValue=function(M){return ne.current.useDeferredValue(M)},Je.useEffect=function(M,X){return ne.current.useEffect(M,X)},Je.useId=function(){return ne.current.useId()},Je.useImperativeHandle=function(M,X,P){return ne.current.useImperativeHandle(M,X,P)},Je.useInsertionEffect=function(M,X){return ne.current.useInsertionEffect(M,X)},Je.useLayoutEffect=function(M,X){return ne.current.useLayoutEffect(M,X)},Je.useMemo=function(M,X){return ne.current.useMemo(M,X)},Je.useReducer=function(M,X,P){return ne.current.useReducer(M,X,P)},Je.useRef=function(M){return ne.current.useRef(M)},Je.useState=function(M){return ne.current.useState(M)},Je.useSyncExternalStore=function(M,X,P){return ne.current.useSyncExternalStore(M,X,P)},Je.useTransition=function(){return ne.current.useTransition()},Je.version="18.3.1",Je}var Og;function op(){return Og||(Og=1,Ad.exports=tS()),Ad.exports}var zg;function nS(){if(zg)return Ya;zg=1;var e=op(),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 Ya.Fragment=n,Ya.jsx=l,Ya.jsxs=l,Ya}var Fg;function rS(){return Fg||(Fg=1,Pd.exports=nS()),Pd.exports}var u=rS(),Ol={},_d={exports:{}},zn={},Id={exports:{}},Ld={};var $g;function oS(){return $g||($g=1,(function(e){function t(I,ee){var R=I.length;I.push(ee);e:for(;0<R;){var M=R-1>>>1,X=I[M];if(0<a(X,ee))I[M]=ee,I[R]=X,R=M;else break e}}function n(I){return I.length===0?null:I[0]}function i(I){if(I.length===0)return null;var ee=I[0],R=I.pop();if(R!==ee){I[0]=R;e:for(var M=0,X=I.length,P=X>>>1;M<P;){var se=2*(M+1)-1,ve=I[se],de=se+1,q=I[de];if(0>a(ve,R))de<X&&0>a(q,ve)?(I[M]=q,I[de]=R,M=de):(I[M]=ve,I[se]=R,M=se);else if(de<X&&0>a(q,R))I[M]=q,I[de]=R,M=de;else break e}}return ee}function a(I,ee){var R=I.sortIndex-ee.sortIndex;return R!==0?R:I.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 T(I){for(var ee=n(p);ee!==null;){if(ee.callback===null)i(p);else if(ee.startTime<=I)i(p),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(p)}}function $(I){if(w=!1,T(I),!S)if(n(f)!==null)S=!0,W(V);else{var ee=n(p);ee!==null&&ne($,ee.startTime-I)}}function V(I,ee){S=!1,w&&(w=!1,C(U),U=-1),y=!0;var R=v;try{for(T(ee),m=n(f);m!==null&&(!(m.expirationTime>ee)||I&&!J());){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),T(ee)}else i(f);m=n(f)}if(m!==null)var P=!0;else{var se=n(p);se!==null&&ne($,se.startTime-ee),P=!1}return P}finally{m=null,v=R,y=!1}}var L=!1,A=null,U=-1,re=5,O=-1;function J(){return!(e.unstable_now()-O<re)}function _(){if(A!==null){var I=e.unstable_now();O=I;var ee=!0;try{ee=A(!0,I)}finally{ee?oe():(L=!1,A=null)}}else L=!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 W(I){A=I,L||(L=!0,oe())}function ne(I,ee){U=N(function(){I(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(I){I.callback=null},e.unstable_continueExecution=function(){S||y||(S=!0,W(V))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(I){switch(v){case 1:case 2:case 3:var ee=3;break;default:ee=v}var R=v;v=ee;try{return I()}finally{v=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,ee){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var R=v;v=I;try{return ee()}finally{v=R}},e.unstable_scheduleCallback=function(I,ee,R){var M=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?M+R:M):R=M,I){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=R+X,I={id:g++,callback:ee,priorityLevel:I,startTime:R,expirationTime:X,sortIndex:-1},R>M?(I.sortIndex=R,t(p,I),n(f)===null&&I===n(p)&&(w?(C(U),U=-1):w=!0,ne($,R-M))):(I.sortIndex=X,t(f,I),S||y||(S=!0,W(V))),I},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(I){var ee=v;return function(){var R=v;v=ee;try{return I.apply(this,arguments)}finally{v=R}}}})(Ld)),Ld}var Bg;function iS(){return Bg||(Bg=1,Id.exports=oS()),Id.exports}var Ug;function aS(){if(Ug)return zn;Ug=1;var e=op(),t=iS();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 T(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 $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),L=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),J=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"),W=Symbol.for("react.lazy"),ne=Symbol.for("react.offscreen"),I=Symbol.iterator;function ee(r){return r===null||typeof r!="object"?null:(r=I&&r[I]||r["@@iterator"],typeof r=="function"?r:null)}var R=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 se(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(ie){var h=ie}Reflect.construct(r,[],o)}else{try{o.call()}catch(ie){h=ie}r.call(o.prototype)}else{try{throw Error()}catch(ie){h=ie}r()}}catch(ie){if(ie&&h&&typeof ie.stack=="string"){for(var x=ie.stack.split(`
|
|
3
|
+
`),b=h.stack.split(`
|
|
4
|
+
`),E=x.length-1,D=b.length-1;1<=E&&0<=D&&x[E]!==b[D];)D--;for(;1<=E&&0<=D;E--,D--)if(x[E]!==b[D]){if(E!==1||D!==1)do if(E--,D--,0>D||x[E]!==b[D]){var H=`
|
|
5
|
+
`+x[E].replace(" at new "," at ");return r.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",r.displayName)),H}while(1<=E&&0<=D);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=se(r.type,!1),r;case 11:return r=se(r.type.render,!1),r;case 1:return r=se(r.type,!0),r;default:return""}}function de(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case A:return"Fragment";case L:return"Portal";case re:return"Profiler";case U:return"StrictMode";case oe:return"Suspense";case G:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case J:return(r.displayName||"Context")+".Consumer";case O: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:de(r.type)||"Memo";case W:o=r._payload,r=r._init;try{return de(r(o))}catch{}}return null}function q(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(o);case 8:return o===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function pe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function we(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function be(r){var o=we(r)?"checked":"value",c=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),h=""+r[o];if(!r.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var x=c.get,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 Me(r){r._valueTracker||(r._valueTracker=be(r))}function Fe(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return r&&(h=we(r)?r.checked?"true":"false":r.value),r=h,r!==c?(o.setValue(r),!0):!1}function st(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Ot(r,o){var c=o.checked;return R({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??r._wrapperState.initialChecked})}function kn(r,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=pe(o.value!=null?o.value:c),r._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function zt(r,o){o=o.checked,o!=null&&T(r,"checked",o,!1)}function Et(r,o){zt(r,o);var c=pe(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&r.value===""||r.value!=c)&&(r.value=""+c):r.value!==""+c&&(r.value=""+c);else if(h==="submit"||h==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?Ut(r,o.type,c):o.hasOwnProperty("defaultValue")&&Ut(r,o.type,pe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function pr(r,o,c){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,c||o===r.value||(r.value=o),r.defaultValue=o}c=r.name,c!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,c!==""&&(r.name=c)}function Ut(r,o,c){(o!=="number"||st(r.ownerDocument)!==r)&&(c==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+c&&(r.defaultValue=""+c))}var Pn=Array.isArray;function An(r,o,c,h){if(r=r.options,o){o={};for(var x=0;x<c.length;x++)o["$"+c[x]]=!0;for(c=0;c<r.length;c++)x=o.hasOwnProperty("$"+r[c].value),r[c].selected!==x&&(r[c].selected=x),x&&h&&(r[c].defaultSelected=!0)}else{for(c=""+pe(c),o=null,x=0;x<r.length;x++){if(r[x].value===c){r[x].selected=!0,h&&(r[x].defaultSelected=!0);return}o!==null||r[x].disabled||(o=r[x])}o!==null&&(o.selected=!0)}}function Pt(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return R({},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:pe(c)}}function Zt(r,o){var c=pe(o.value),h=pe(o.defaultValue);c!=null&&(c=""+c,c!==r.value&&(r.value=c),o.defaultValue==null&&r.defaultValue!==c&&(r.defaultValue=c)),h!=null&&(r.defaultValue=""+h)}function jt(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function B(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?B(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var fe,Re=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,c,h,x){MSApp.execUnsafeLocalFunction(function(){return r(o,c,h,x)})}:r})(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(fe=fe||document.createElement("div"),fe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=fe.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function We(r,o){if(o){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=o;return}}r.textContent=o}var mt={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(mt).forEach(function(r){At.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),mt[o]=mt[r]})});function Kt(r,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||mt.hasOwnProperty(r)&&mt[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=R({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 jr=null,hr=null,Un=null;function Go(r){if(r=_a(r)){if(typeof jr!="function")throw Error(n(280));var o=r.stateNode;o&&(o=Js(o),jr(r.stateNode,r.type,o))}}function Ye(r){hr?Un?Un.push(r):Un=[r]:hr=r}function It(){if(hr){var r=hr,o=Un;if(Un=hr=null,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,(hr!==null||Un!==null)&&(Ht(),It())}}function Yt(r,o){var c=r.stateNode;if(c===null)return null;var h=Js(c);if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var Tr=!1;if(d)try{var z={};Object.defineProperty(z,"passive",{get:function(){Tr=!0}}),window.addEventListener("test",z,z),window.removeEventListener("test",z,z)}catch{Tr=!1}function Y(r,o,c,h,x,b,E,D,H){var ie=Array.prototype.slice.call(arguments,3);try{o.apply(c,ie)}catch(ue){this.onError(ue)}}var te=!1,le=null,xe=!1,_e=null,Se={onError:function(r){te=!0,le=r}};function Pe(r,o,c,h,x,b,E,D,H){te=!1,le=null,Y.apply(Se,arguments)}function Le(r,o,c,h,x,b,E,D,H){if(Pe.apply(this,arguments),te){if(te){var ie=le;te=!1,le=null}else throw Error(n(198));xe||(xe=!0,_e=ie)}}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 Ve(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function 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,D=x.child;D;){if(D===c){E=!0,c=x,h=b;break}if(D===h){E=!0,h=x,c=b;break}D=D.sibling}if(!E){for(D=b.child;D;){if(D===c){E=!0,c=b,h=x;break}if(D===h){E=!0,h=b,c=x;break}D=D.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,fo=t.unstable_NormalPriority,Xo=t.unstable_LowPriority,Rr=t.unstable_IdlePriority,Wr=null,En=null;function nt(r){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(Wr,r,void 0,(r.current.flags&128)===128)}catch{}}var gt=Math.clz32?Math.clz32:Tt,po=Math.log,Kr=Math.LN2;function Tt(r){return r>>>=0,r===0?32:31-(po(r)/Kr|0)|0}var Yr=64,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 D=E&~x;D!==0?h=Jo(D):(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-gt(o),x=1<<c,h|=r[c],o&=~x;return h}function vb(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 wb(r,o){for(var c=r.suspendedLanes,h=r.pingedLanes,x=r.expirationTimes,b=r.pendingLanes;0<b;){var E=31-gt(b),D=1<<E,H=x[E];H===-1?((D&c)===0||(D&h)!==0)&&(x[E]=vb(D,o)):H<=o&&(r.expiredLanes|=D),b&=~D}}function Qc(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function ph(){var r=Yr;return Yr<<=1,(Yr&4194240)===0&&(Yr=64),r}function Jc(r){for(var o=[],c=0;31>c;c++)o.push(r);return o}function ma(r,o,c){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-gt(o),r[o]=c}function bb(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-gt(c),b=1<<x;o[x]=0,h[x]=-1,r[x]=-1,c&=~b}}function Zc(r,o){var c=r.entangledLanes|=o;for(r=r.entanglements;c;){var h=31-gt(c),x=1<<h;x&o|r[h]&o&&(r[h]|=o),c&=~x}}var ut=0;function hh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var mh,eu,gh,xh,yh,tu=!1,Os=[],ho=null,mo=null,go=null,ga=new Map,xa=new Map,xo=[],kb="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 vh(r,o){switch(r){case"focusin":case"focusout":ho=null;break;case"dragenter":case"dragleave":mo=null;break;case"mouseover":case"mouseout":go=null;break;case"pointerover":case"pointerout":ga.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":xa.delete(o.pointerId)}}function ya(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=_a(o),o!==null&&eu(o)),r):(r.eventSystemFlags|=h,o=r.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),r)}function Sb(r,o,c,h,x){switch(o){case"focusin":return ho=ya(ho,r,o,c,h,x),!0;case"dragenter":return mo=ya(mo,r,o,c,h,x),!0;case"mouseover":return go=ya(go,r,o,c,h,x),!0;case"pointerover":var b=x.pointerId;return ga.set(b,ya(ga.get(b)||null,r,o,c,h,x)),!0;case"gotpointercapture":return b=x.pointerId,xa.set(b,ya(xa.get(b)||null,r,o,c,h,x)),!0}return!1}function wh(r){var o=Zo(r.target);if(o!==null){var c=Ae(o);if(c!==null){if(o=c.tag,o===13){if(o=Ve(c),o!==null){r.blockedOn=o,yh(r.priority,function(){gh(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=ru(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=_a(c),o!==null&&eu(o),r.blockedOn=c,!1;o.shift()}return!0}function bh(r,o,c){zs(r)&&c.delete(o)}function Nb(){tu=!1,ho!==null&&zs(ho)&&(ho=null),mo!==null&&zs(mo)&&(mo=null),go!==null&&zs(go)&&(go=null),ga.forEach(bh),xa.forEach(bh)}function va(r,o){r.blockedOn===o&&(r.blockedOn=null,tu||(tu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Nb)))}function wa(r){function o(x){return va(x,r)}if(0<Os.length){va(Os[0],r);for(var c=1;c<Os.length;c++){var h=Os[c];h.blockedOn===r&&(h.blockedOn=null)}}for(ho!==null&&va(ho,r),mo!==null&&va(mo,r),go!==null&&va(go,r),ga.forEach(o),xa.forEach(o),c=0;c<xo.length;c++)h=xo[c],h.blockedOn===r&&(h.blockedOn=null);for(;0<xo.length&&(c=xo[0],c.blockedOn===null);)wh(c),c.blockedOn===null&&xo.shift()}var ki=$.ReactCurrentBatchConfig,Fs=!0;function Cb(r,o,c,h){var x=ut,b=ki.transition;ki.transition=null;try{ut=1,nu(r,o,c,h)}finally{ut=x,ki.transition=b}}function Eb(r,o,c,h){var x=ut,b=ki.transition;ki.transition=null;try{ut=4,nu(r,o,c,h)}finally{ut=x,ki.transition=b}}function nu(r,o,c,h){if(Fs){var x=ru(r,o,c,h);if(x===null)wu(r,o,h,$s,c),vh(r,h);else if(Sb(x,r,o,c,h))h.stopPropagation();else if(vh(r,h),o&4&&-1<kb.indexOf(r)){for(;x!==null;){var b=_a(x);if(b!==null&&mh(b),b=ru(r,o,c,h),b===null&&wu(r,o,h,$s,c),b===x)break;x=b}x!==null&&h.stopPropagation()}else wu(r,o,h,null,c)}}var $s=null;function ru(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=Ve(o),r!==null)return r;r=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return $s=r,null}function kh(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 fo:case Xo:return 16;case Rr:return 536870912;default:return 16}default:return 16}}var yo=null,ou=null,Bs=null;function Sh(){if(Bs)return Bs;var r,o=ou,c=o.length,h,x="value"in yo?yo.value:yo.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 Nh(){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 D in r)r.hasOwnProperty(D)&&(c=r[D],this[D]=c?c(b):b[D]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Hs:Nh,this.isPropagationStopped=Nh,this}return R(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 Si={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iu=Wn(Si),ba=R({},Si,{view:0,detail:0}),jb=Wn(ba),au,su,ka,Vs=R({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cu,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!==ka&&(ka&&r.type==="mousemove"?(au=r.screenX-ka.screenX,su=r.screenY-ka.screenY):su=au=0,ka=r),au)},movementY:function(r){return"movementY"in r?r.movementY:su}}),Ch=Wn(Vs),Tb=R({},Vs,{dataTransfer:0}),Rb=Wn(Tb),Pb=R({},ba,{relatedTarget:0}),lu=Wn(Pb),Ab=R({},Si,{animationName:0,elapsedTime:0,pseudoElement:0}),_b=Wn(Ab),Ib=R({},Si,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Lb=Wn(Ib),Db=R({},Si,{data:0}),Eh=Wn(Db),Mb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ob={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"},zb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fb(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=zb[r])?!!o[r]:!1}function cu(){return Fb}var $b=R({},ba,{key:function(r){if(r.key){var o=Mb[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"?Ob[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cu,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}}),Bb=Wn($b),Ub=R({},Vs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jh=Wn(Ub),Hb=R({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cu}),Vb=Wn(Hb),Wb=R({},Si,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kb=Wn(Wb),Yb=R({},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}),Gb=Wn(Yb),qb=[9,13,27,32],uu=d&&"CompositionEvent"in window,Sa=null;d&&"documentMode"in document&&(Sa=document.documentMode);var Xb=d&&"TextEvent"in window&&!Sa,Th=d&&(!uu||Sa&&8<Sa&&11>=Sa),Rh=" ",Ph=!1;function Ah(r,o){switch(r){case"keyup":return qb.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _h(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ni=!1;function Qb(r,o){switch(r){case"compositionend":return _h(o);case"keypress":return o.which!==32?null:(Ph=!0,Rh);case"textInput":return r=o.data,r===Rh&&Ph?null:r;default:return null}}function Jb(r,o){if(Ni)return r==="compositionend"||!uu&&Ah(r,o)?(r=Sh(),Bs=ou=yo=null,Ni=!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 Th&&o.locale!=="ko"?null:o.data;default:return null}}var Zb={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 Ih(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!Zb[r.type]:o==="textarea"}function Lh(r,o,c,h){Ye(h),o=qs(o,"onChange"),0<o.length&&(c=new iu("onChange","change",null,c,h),r.push({event:c,listeners:o}))}var Na=null,Ca=null;function ek(r){Jh(r,0)}function Ws(r){var o=Ri(r);if(Fe(o))return r}function tk(r,o){if(r==="change")return o}var Dh=!1;if(d){var du;if(d){var fu="oninput"in document;if(!fu){var Mh=document.createElement("div");Mh.setAttribute("oninput","return;"),fu=typeof Mh.oninput=="function"}du=fu}else du=!1;Dh=du&&(!document.documentMode||9<document.documentMode)}function Oh(){Na&&(Na.detachEvent("onpropertychange",zh),Ca=Na=null)}function zh(r){if(r.propertyName==="value"&&Ws(Ca)){var o=[];Lh(o,Ca,r,Cn(r)),Lt(ek,o)}}function nk(r,o,c){r==="focusin"?(Oh(),Na=o,Ca=c,Na.attachEvent("onpropertychange",zh)):r==="focusout"&&Oh()}function rk(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ws(Ca)}function ok(r,o){if(r==="click")return Ws(o)}function ik(r,o){if(r==="input"||r==="change")return Ws(o)}function ak(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var mr=typeof Object.is=="function"?Object.is:ak;function Ea(r,o){if(mr(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var c=Object.keys(r),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var x=c[h];if(!f.call(o,x)||!mr(r[x],o[x]))return!1}return!0}function Fh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function $h(r,o){var c=Fh(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=Fh(c)}}function Bh(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Bh(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Uh(){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 pu(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 sk(r){var o=Uh(),c=r.focusedElem,h=r.selectionRange;if(o!==c&&c&&c.ownerDocument&&Bh(c.ownerDocument.documentElement,c)){if(h!==null&&pu(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=$h(c,b);var E=$h(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 lk=d&&"documentMode"in document&&11>=document.documentMode,Ci=null,hu=null,ja=null,mu=!1;function Hh(r,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;mu||Ci==null||Ci!==st(h)||(h=Ci,"selectionStart"in h&&pu(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}),ja&&Ea(ja,h)||(ja=h,h=qs(hu,"onSelect"),0<h.length&&(o=new iu("onSelect","select",null,o,c),r.push({event:o,listeners:h}),o.target=Ci)))}function Ks(r,o){var c={};return c[r.toLowerCase()]=o.toLowerCase(),c["Webkit"+r]="webkit"+o,c["Moz"+r]="moz"+o,c}var Ei={animationend:Ks("Animation","AnimationEnd"),animationiteration:Ks("Animation","AnimationIteration"),animationstart:Ks("Animation","AnimationStart"),transitionend:Ks("Transition","TransitionEnd")},gu={},Vh={};d&&(Vh=document.createElement("div").style,"AnimationEvent"in window||(delete Ei.animationend.animation,delete Ei.animationiteration.animation,delete Ei.animationstart.animation),"TransitionEvent"in window||delete Ei.transitionend.transition);function Ys(r){if(gu[r])return gu[r];if(!Ei[r])return r;var o=Ei[r],c;for(c in o)if(o.hasOwnProperty(c)&&c in Vh)return gu[r]=o[c];return r}var Wh=Ys("animationend"),Kh=Ys("animationiteration"),Yh=Ys("animationstart"),Gh=Ys("transitionend"),qh=new Map,Xh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function vo(r,o){qh.set(r,o),s(o,[r])}for(var xu=0;xu<Xh.length;xu++){var yu=Xh[xu],ck=yu.toLowerCase(),uk=yu[0].toUpperCase()+yu.slice(1);vo(ck,"on"+uk)}vo(Wh,"onAnimationEnd"),vo(Kh,"onAnimationIteration"),vo(Yh,"onAnimationStart"),vo("dblclick","onDoubleClick"),vo("focusin","onFocus"),vo("focusout","onBlur"),vo(Gh,"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 Ta="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(" "),dk=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ta));function Qh(r,o,c){var h=r.type||"unknown-event";r.currentTarget=c,Le(h,o,void 0,r),r.currentTarget=null}function Jh(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 D=h[E],H=D.instance,ie=D.currentTarget;if(D=D.listener,H!==b&&x.isPropagationStopped())break e;Qh(x,D,ie),b=H}else for(E=0;E<h.length;E++){if(D=h[E],H=D.instance,ie=D.currentTarget,D=D.listener,H!==b&&x.isPropagationStopped())break e;Qh(x,D,ie),b=H}}}if(xe)throw r=_e,xe=!1,_e=null,r}function Nt(r,o){var c=o[Eu];c===void 0&&(c=o[Eu]=new Set);var h=r+"__bubble";c.has(h)||(Zh(o,r,2,!1),c.add(h))}function vu(r,o,c){var h=0;o&&(h|=4),Zh(c,r,h,o)}var Gs="_reactListening"+Math.random().toString(36).slice(2);function Ra(r){if(!r[Gs]){r[Gs]=!0,i.forEach(function(c){c!=="selectionchange"&&(dk.has(c)||vu(c,!1,r),vu(c,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Gs]||(o[Gs]=!0,vu("selectionchange",!1,o))}}function Zh(r,o,c,h){switch(kh(o)){case 1:var x=Cb;break;case 4:x=Eb;break;default:x=nu}c=x.bind(null,o,c,r),x=void 0,!Tr||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 wu(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 D=h.stateNode.containerInfo;if(D===x||D.nodeType===8&&D.parentNode===x)break;if(E===4)for(E=h.return;E!==null;){var H=E.tag;if((H===3||H===4)&&(H=E.stateNode.containerInfo,H===x||H.nodeType===8&&H.parentNode===x))return;E=E.return}for(;D!==null;){if(E=Zo(D),E===null)return;if(H=E.tag,H===5||H===6){h=b=E;continue e}D=D.parentNode}}h=h.return}Lt(function(){var ie=b,ue=Cn(c),he=[];e:{var ce=qh.get(r);if(ce!==void 0){var ke=iu,Ce=r;switch(r){case"keypress":if(Us(c)===0)break e;case"keydown":case"keyup":ke=Bb;break;case"focusin":Ce="focus",ke=lu;break;case"focusout":Ce="blur",ke=lu;break;case"beforeblur":case"afterblur":ke=lu;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=Ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=Rb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=Vb;break;case Wh:case Kh:case Yh:ke=_b;break;case Gh:ke=Kb;break;case"scroll":ke=jb;break;case"wheel":ke=Gb;break;case"copy":case"cut":case"paste":ke=Lb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=jh}var Te=(o&4)!==0,Wt=!Te&&r==="scroll",Q=Te?ce!==null?ce+"Capture":null:ce;Te=[];for(var K=ie,Z;K!==null;){Z=K;var ge=Z.stateNode;if(Z.tag===5&&ge!==null&&(Z=ge,Q!==null&&(ge=Yt(K,Q),ge!=null&&Te.push(Pa(K,ge,Z)))),Wt)break;K=K.return}0<Te.length&&(ce=new ke(ce,Ce,null,c,ue),he.push({event:ce,listeners:Te}))}}if((o&7)===0){e:{if(ce=r==="mouseover"||r==="pointerover",ke=r==="mouseout"||r==="pointerout",ce&&c!==en&&(Ce=c.relatedTarget||c.fromElement)&&(Zo(Ce)||Ce[Gr]))break e;if((ke||ce)&&(ce=ue.window===ue?ue:(ce=ue.ownerDocument)?ce.defaultView||ce.parentWindow:window,ke?(Ce=c.relatedTarget||c.toElement,ke=ie,Ce=Ce?Zo(Ce):null,Ce!==null&&(Wt=Ae(Ce),Ce!==Wt||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(ke=null,Ce=ie),ke!==Ce)){if(Te=Ch,ge="onMouseLeave",Q="onMouseEnter",K="mouse",(r==="pointerout"||r==="pointerover")&&(Te=jh,ge="onPointerLeave",Q="onPointerEnter",K="pointer"),Wt=ke==null?ce:Ri(ke),Z=Ce==null?ce:Ri(Ce),ce=new Te(ge,K+"leave",ke,c,ue),ce.target=Wt,ce.relatedTarget=Z,ge=null,Zo(ue)===ie&&(Te=new Te(Q,K+"enter",Ce,c,ue),Te.target=Z,Te.relatedTarget=Wt,ge=Te),Wt=ge,ke&&Ce)t:{for(Te=ke,Q=Ce,K=0,Z=Te;Z;Z=ji(Z))K++;for(Z=0,ge=Q;ge;ge=ji(ge))Z++;for(;0<K-Z;)Te=ji(Te),K--;for(;0<Z-K;)Q=ji(Q),Z--;for(;K--;){if(Te===Q||Q!==null&&Te===Q.alternate)break t;Te=ji(Te),Q=ji(Q)}Te=null}else Te=null;ke!==null&&em(he,ce,ke,Te,!1),Ce!==null&&Wt!==null&&em(he,Wt,Ce,Te,!0)}}e:{if(ce=ie?Ri(ie):window,ke=ce.nodeName&&ce.nodeName.toLowerCase(),ke==="select"||ke==="input"&&ce.type==="file")var Ie=tk;else if(Ih(ce))if(Dh)Ie=ik;else{Ie=rk;var Be=nk}else(ke=ce.nodeName)&&ke.toLowerCase()==="input"&&(ce.type==="checkbox"||ce.type==="radio")&&(Ie=ok);if(Ie&&(Ie=Ie(r,ie))){Lh(he,Ie,c,ue);break e}Be&&Be(r,ce,ie),r==="focusout"&&(Be=ce._wrapperState)&&Be.controlled&&ce.type==="number"&&Ut(ce,"number",ce.value)}switch(Be=ie?Ri(ie):window,r){case"focusin":(Ih(Be)||Be.contentEditable==="true")&&(Ci=Be,hu=ie,ja=null);break;case"focusout":ja=hu=Ci=null;break;case"mousedown":mu=!0;break;case"contextmenu":case"mouseup":case"dragend":mu=!1,Hh(he,c,ue);break;case"selectionchange":if(lk)break;case"keydown":case"keyup":Hh(he,c,ue)}var Ue;if(uu)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 Ni?Ah(r,c)&&(Ke="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Ke="onCompositionStart");Ke&&(Th&&c.locale!=="ko"&&(Ni||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ni&&(Ue=Sh()):(yo=ue,ou="value"in yo?yo.value:yo.textContent,Ni=!0)),Be=qs(ie,Ke),0<Be.length&&(Ke=new Eh(Ke,r,null,c,ue),he.push({event:Ke,listeners:Be}),Ue?Ke.data=Ue:(Ue=_h(c),Ue!==null&&(Ke.data=Ue)))),(Ue=Xb?Qb(r,c):Jb(r,c))&&(ie=qs(ie,"onBeforeInput"),0<ie.length&&(ue=new Eh("onBeforeInput","beforeinput",null,c,ue),he.push({event:ue,listeners:ie}),ue.data=Ue))}Jh(he,o)})}function Pa(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(Pa(r,b,x)),b=Yt(r,o),b!=null&&h.push(Pa(r,b,x))),r=r.return}return h}function ji(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function em(r,o,c,h,x){for(var b=o._reactName,E=[];c!==null&&c!==h;){var D=c,H=D.alternate,ie=D.stateNode;if(H!==null&&H===h)break;D.tag===5&&ie!==null&&(D=ie,x?(H=Yt(c,b),H!=null&&E.unshift(Pa(c,H,D))):x||(H=Yt(c,b),H!=null&&E.push(Pa(c,H,D)))),c=c.return}E.length!==0&&r.push({event:o,listeners:E})}var fk=/\r\n?/g,pk=/\u0000|\uFFFD/g;function tm(r){return(typeof r=="string"?r:""+r).replace(fk,`
|
|
6
|
+
`).replace(pk,"")}function Xs(r,o,c){if(o=tm(o),tm(r)!==o&&c)throw Error(n(425))}function Qs(){}var bu=null,ku=null;function Su(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 Nu=typeof setTimeout=="function"?setTimeout:void 0,hk=typeof clearTimeout=="function"?clearTimeout:void 0,nm=typeof Promise=="function"?Promise:void 0,mk=typeof queueMicrotask=="function"?queueMicrotask:typeof nm<"u"?function(r){return nm.resolve(null).then(r).catch(gk)}:Nu;function gk(r){setTimeout(function(){throw r})}function Cu(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),wa(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=x}while(c);wa(o)}function wo(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function rm(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 Ti=Math.random().toString(36).slice(2),Pr="__reactFiber$"+Ti,Aa="__reactProps$"+Ti,Gr="__reactContainer$"+Ti,Eu="__reactEvents$"+Ti,xk="__reactListeners$"+Ti,yk="__reactHandles$"+Ti;function Zo(r){var o=r[Pr];if(o)return o;for(var c=r.parentNode;c;){if(o=c[Gr]||c[Pr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(r=rm(r);r!==null;){if(c=r[Pr])return c;r=rm(r)}return o}r=c,c=r.parentNode}return null}function _a(r){return r=r[Pr]||r[Gr],!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[Aa]||null}var ju=[],Pi=-1;function bo(r){return{current:r}}function Ct(r){0>Pi||(r.current=ju[Pi],ju[Pi]=null,Pi--)}function bt(r,o){Pi++,ju[Pi]=r.current,r.current=o}var ko={},hn=bo(ko),In=bo(!1),ei=ko;function Ai(r,o){var c=r.type.contextTypes;if(!c)return ko;var h=r.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var x={},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(){Ct(In),Ct(hn)}function om(r,o,c){if(hn.current!==ko)throw Error(n(168));bt(hn,o),bt(In,c)}function im(r,o,c){var h=r.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var x in h)if(!(x in o))throw Error(n(108,q(r)||"Unknown",x));return R({},c,h)}function el(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ko,ei=hn.current,bt(hn,r),bt(In,In.current),!0}function am(r,o,c){var h=r.stateNode;if(!h)throw Error(n(169));c?(r=im(r,o,ei),h.__reactInternalMemoizedMergedChildContext=r,Ct(In),Ct(hn),bt(hn,r)):Ct(In),bt(In,c)}var qr=null,tl=!1,Tu=!1;function sm(r){qr===null?qr=[r]:qr.push(r)}function vk(r){tl=!0,sm(r)}function So(){if(!Tu&&qr!==null){Tu=!0;var r=0,o=ut;try{var c=qr;for(ut=1;r<c.length;r++){var h=c[r];do h=h(!0);while(h!==null)}qr=null,tl=!1}catch(x){throw qr!==null&&(qr=qr.slice(r+1)),Vt(er,So),x}finally{ut=o,Tu=!1}}return null}var _i=[],Ii=0,nl=null,rl=0,tr=[],nr=0,ti=null,Xr=1,Qr="";function ni(r,o){_i[Ii++]=rl,_i[Ii++]=nl,nl=r,rl=o}function lm(r,o,c){tr[nr++]=Xr,tr[nr++]=Qr,tr[nr++]=ti,ti=r;var h=Xr;r=Qr;var x=32-gt(h)-1;h&=~(1<<x),c+=1;var b=32-gt(o)+x;if(30<b){var E=x-x%5;b=(h&(1<<E)-1).toString(32),h>>=E,x-=E,Xr=1<<32-gt(o)+x|c<<x|h,Qr=b+r}else Xr=1<<b|c<<x|h,Qr=r}function Ru(r){r.return!==null&&(ni(r,1),lm(r,1,0))}function Pu(r){for(;r===nl;)nl=_i[--Ii],_i[Ii]=null,rl=_i[--Ii],_i[Ii]=null;for(;r===ti;)ti=tr[--nr],tr[nr]=null,Qr=tr[--nr],tr[nr]=null,Xr=tr[--nr],tr[nr]=null}var Kn=null,Yn=null,Rt=!1,gr=null;function cm(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 um(r,o){switch(r.tag){case 5:var c=r.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,Kn=r,Yn=wo(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,Kn=r,Yn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=ti!==null?{id:Xr,overflow:Qr}:null,r.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=o,c.return=r,r.child=c,Kn=r,Yn=null,!0):!1;default:return!1}}function Au(r){return(r.mode&1)!==0&&(r.flags&128)===0}function _u(r){if(Rt){var o=Yn;if(o){var c=o;if(!um(r,o)){if(Au(r))throw Error(n(418));o=wo(c.nextSibling);var h=Kn;o&&um(r,o)?cm(h,c):(r.flags=r.flags&-4097|2,Rt=!1,Kn=r)}}else{if(Au(r))throw Error(n(418));r.flags=r.flags&-4097|2,Rt=!1,Kn=r}}}function dm(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 dm(r),Rt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!Su(r.type,r.memoizedProps)),o&&(o=Yn)){if(Au(r))throw fm(),Error(n(418));for(;o;)cm(r,o),o=wo(o.nextSibling)}if(dm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"){if(o===0){Yn=wo(r.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}r=r.nextSibling}Yn=null}}else Yn=Kn?wo(r.stateNode.nextSibling):null;return!0}function fm(){for(var r=Yn;r;)r=wo(r.nextSibling)}function Li(){Yn=Kn=null,Rt=!1}function Iu(r){gr===null?gr=[r]:gr.push(r)}var wk=$.ReactCurrentBatchConfig;function Ia(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 D=x.refs;E===null?delete D[b]:D[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 pm(r){var o=r._init;return o(r._payload)}function hm(r){function o(Q,K){if(r){var Z=Q.deletions;Z===null?(Q.deletions=[K],Q.flags|=16):Z.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=Ao(Q,K),Q.index=0,Q.sibling=null,Q}function b(Q,K,Z){return Q.index=Z,r?(Z=Q.alternate,Z!==null?(Z=Z.index,Z<K?(Q.flags|=2,K):Z):(Q.flags|=2,K)):(Q.flags|=1048576,K)}function E(Q){return r&&Q.alternate===null&&(Q.flags|=2),Q}function D(Q,K,Z,ge){return K===null||K.tag!==6?(K=Nd(Z,Q.mode,ge),K.return=Q,K):(K=x(K,Z),K.return=Q,K)}function H(Q,K,Z,ge){var Ie=Z.type;return Ie===A?ue(Q,K,Z.props.children,ge,Z.key):K!==null&&(K.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===W&&pm(Ie)===K.type)?(ge=x(K,Z.props),ge.ref=Ia(Q,K,Z),ge.return=Q,ge):(ge=Rl(Z.type,Z.key,Z.props,null,Q.mode,ge),ge.ref=Ia(Q,K,Z),ge.return=Q,ge)}function ie(Q,K,Z,ge){return K===null||K.tag!==4||K.stateNode.containerInfo!==Z.containerInfo||K.stateNode.implementation!==Z.implementation?(K=Cd(Z,Q.mode,ge),K.return=Q,K):(K=x(K,Z.children||[]),K.return=Q,K)}function ue(Q,K,Z,ge,Ie){return K===null||K.tag!==7?(K=ui(Z,Q.mode,ge,Ie),K.return=Q,K):(K=x(K,Z),K.return=Q,K)}function he(Q,K,Z){if(typeof K=="string"&&K!==""||typeof K=="number")return K=Nd(""+K,Q.mode,Z),K.return=Q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case V:return Z=Rl(K.type,K.key,K.props,null,Q.mode,Z),Z.ref=Ia(Q,null,K),Z.return=Q,Z;case L:return K=Cd(K,Q.mode,Z),K.return=Q,K;case W:var ge=K._init;return he(Q,ge(K._payload),Z)}if(Pn(K)||ee(K))return K=ui(K,Q.mode,Z,null),K.return=Q,K;il(Q,K)}return null}function ce(Q,K,Z,ge){var Ie=K!==null?K.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number")return Ie!==null?null:D(Q,K,""+Z,ge);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case V:return Z.key===Ie?H(Q,K,Z,ge):null;case L:return Z.key===Ie?ie(Q,K,Z,ge):null;case W:return Ie=Z._init,ce(Q,K,Ie(Z._payload),ge)}if(Pn(Z)||ee(Z))return Ie!==null?null:ue(Q,K,Z,ge,null);il(Q,Z)}return null}function ke(Q,K,Z,ge,Ie){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return Q=Q.get(Z)||null,D(K,Q,""+ge,Ie);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case V:return Q=Q.get(ge.key===null?Z:ge.key)||null,H(K,Q,ge,Ie);case L:return Q=Q.get(ge.key===null?Z:ge.key)||null,ie(K,Q,ge,Ie);case W:var Be=ge._init;return ke(Q,K,Z,Be(ge._payload),Ie)}if(Pn(ge)||ee(ge))return Q=Q.get(Z)||null,ue(K,Q,ge,Ie,null);il(K,ge)}return null}function Ce(Q,K,Z,ge){for(var Ie=null,Be=null,Ue=K,Ke=K=0,cn=null;Ue!==null&&Ke<Z.length;Ke++){Ue.index>Ke?(cn=Ue,Ue=null):cn=Ue.sibling;var at=ce(Q,Ue,Z[Ke],ge);if(at===null){Ue===null&&(Ue=cn);break}r&&Ue&&at.alternate===null&&o(Q,Ue),K=b(at,K,Ke),Be===null?Ie=at:Be.sibling=at,Be=at,Ue=cn}if(Ke===Z.length)return c(Q,Ue),Rt&&ni(Q,Ke),Ie;if(Ue===null){for(;Ke<Z.length;Ke++)Ue=he(Q,Z[Ke],ge),Ue!==null&&(K=b(Ue,K,Ke),Be===null?Ie=Ue:Be.sibling=Ue,Be=Ue);return Rt&&ni(Q,Ke),Ie}for(Ue=h(Q,Ue);Ke<Z.length;Ke++)cn=ke(Ue,Q,Ke,Z[Ke],ge),cn!==null&&(r&&cn.alternate!==null&&Ue.delete(cn.key===null?Ke:cn.key),K=b(cn,K,Ke),Be===null?Ie=cn:Be.sibling=cn,Be=cn);return r&&Ue.forEach(function(_o){return o(Q,_o)}),Rt&&ni(Q,Ke),Ie}function Te(Q,K,Z,ge){var Ie=ee(Z);if(typeof Ie!="function")throw Error(n(150));if(Z=Ie.call(Z),Z==null)throw Error(n(151));for(var Be=Ie=null,Ue=K,Ke=K=0,cn=null,at=Z.next();Ue!==null&&!at.done;Ke++,at=Z.next()){Ue.index>Ke?(cn=Ue,Ue=null):cn=Ue.sibling;var _o=ce(Q,Ue,at.value,ge);if(_o===null){Ue===null&&(Ue=cn);break}r&&Ue&&_o.alternate===null&&o(Q,Ue),K=b(_o,K,Ke),Be===null?Ie=_o:Be.sibling=_o,Be=_o,Ue=cn}if(at.done)return c(Q,Ue),Rt&&ni(Q,Ke),Ie;if(Ue===null){for(;!at.done;Ke++,at=Z.next())at=he(Q,at.value,ge),at!==null&&(K=b(at,K,Ke),Be===null?Ie=at:Be.sibling=at,Be=at);return Rt&&ni(Q,Ke),Ie}for(Ue=h(Q,Ue);!at.done;Ke++,at=Z.next())at=ke(Ue,Q,Ke,at.value,ge),at!==null&&(r&&at.alternate!==null&&Ue.delete(at.key===null?Ke:at.key),K=b(at,K,Ke),Be===null?Ie=at:Be.sibling=at,Be=at);return r&&Ue.forEach(function(Zk){return o(Q,Zk)}),Rt&&ni(Q,Ke),Ie}function Wt(Q,K,Z,ge){if(typeof Z=="object"&&Z!==null&&Z.type===A&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case V:e:{for(var Ie=Z.key,Be=K;Be!==null;){if(Be.key===Ie){if(Ie=Z.type,Ie===A){if(Be.tag===7){c(Q,Be.sibling),K=x(Be,Z.props.children),K.return=Q,Q=K;break e}}else if(Be.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===W&&pm(Ie)===Be.type){c(Q,Be.sibling),K=x(Be,Z.props),K.ref=Ia(Q,Be,Z),K.return=Q,Q=K;break e}c(Q,Be);break}else o(Q,Be);Be=Be.sibling}Z.type===A?(K=ui(Z.props.children,Q.mode,ge,Z.key),K.return=Q,Q=K):(ge=Rl(Z.type,Z.key,Z.props,null,Q.mode,ge),ge.ref=Ia(Q,K,Z),ge.return=Q,Q=ge)}return E(Q);case L:e:{for(Be=Z.key;K!==null;){if(K.key===Be)if(K.tag===4&&K.stateNode.containerInfo===Z.containerInfo&&K.stateNode.implementation===Z.implementation){c(Q,K.sibling),K=x(K,Z.children||[]),K.return=Q,Q=K;break e}else{c(Q,K);break}else o(Q,K);K=K.sibling}K=Cd(Z,Q.mode,ge),K.return=Q,Q=K}return E(Q);case W:return Be=Z._init,Wt(Q,K,Be(Z._payload),ge)}if(Pn(Z))return Ce(Q,K,Z,ge);if(ee(Z))return Te(Q,K,Z,ge);il(Q,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"?(Z=""+Z,K!==null&&K.tag===6?(c(Q,K.sibling),K=x(K,Z),K.return=Q,Q=K):(c(Q,K),K=Nd(Z,Q.mode,ge),K.return=Q,Q=K),E(Q)):c(Q,K)}return Wt}var Di=hm(!0),mm=hm(!1),al=bo(null),sl=null,Mi=null,Lu=null;function Du(){Lu=Mi=sl=null}function Mu(r){var o=al.current;Ct(al),r._currentValue=o}function Ou(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 Oi(r,o){sl=r,Lu=Mi=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(Lu!==r)if(r={context:r,memoizedValue:o,next:null},Mi===null){if(sl===null)throw Error(n(308));Mi=r,sl.dependencies={lanes:0,firstContext:r}}else Mi=Mi.next=r;return o}var ri=null;function zu(r){ri===null?ri=[r]:ri.push(r)}function gm(r,o,c,h){var x=o.interleaved;return x===null?(c.next=c,zu(o)):(c.next=x.next,x.next=c),o.interleaved=c,Jr(r,h)}function Jr(r,o){r.lanes|=o;var c=r.alternate;for(c!==null&&(c.lanes|=o),c=r,r=r.return;r!==null;)r.childLanes|=o,c=r.alternate,c!==null&&(c.childLanes|=o),c=r,r=r.return;return c.tag===3?c.stateNode:null}var No=!1;function Fu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xm(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Zr(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function Co(r,o,c){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var x=h.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),h.pending=o,Jr(r,c)}return x=h.interleaved,x===null?(o.next=o,zu(h)):(o.next=x.next,x.next=o),h.interleaved=o,Jr(r,c)}function ll(r,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=r.pendingLanes,c|=h,o.lanes=c,Zc(r,c)}}function ym(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;No=!1;var b=x.firstBaseUpdate,E=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var H=D,ie=H.next;H.next=null,E===null?b=ie:E.next=ie,E=H;var ue=r.alternate;ue!==null&&(ue=ue.updateQueue,D=ue.lastBaseUpdate,D!==E&&(D===null?ue.firstBaseUpdate=ie:D.next=ie,ue.lastBaseUpdate=H))}if(b!==null){var he=x.baseState;E=0,ue=ie=H=null,D=b;do{var ce=D.lane,ke=D.eventTime;if((h&ce)===ce){ue!==null&&(ue=ue.next={eventTime:ke,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ce=r,Te=D;switch(ce=o,ke=c,Te.tag){case 1:if(Ce=Te.payload,typeof Ce=="function"){he=Ce.call(ke,he,ce);break e}he=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Te.payload,ce=typeof Ce=="function"?Ce.call(ke,he,ce):Ce,ce==null)break e;he=R({},he,ce);break e;case 2:No=!0}}D.callback!==null&&D.lane!==0&&(r.flags|=64,ce=x.effects,ce===null?x.effects=[D]:ce.push(D))}else ke={eventTime:ke,lane:ce,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ue===null?(ie=ue=ke,H=he):ue=ue.next=ke,E|=ce;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;ce=D,D=ce.next,ce.next=null,x.lastBaseUpdate=ce,x.shared.pending=null}}while(!0);if(ue===null&&(H=he),x.baseState=H,x.firstBaseUpdate=ie,x.lastBaseUpdate=ue,o=x.shared.interleaved,o!==null){x=o;do E|=x.lane,x=x.next;while(x!==o)}else b===null&&(x.shared.lanes=0);ai|=E,r.lanes=E,r.memoizedState=he}}function vm(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 La={},Ar=bo(La),Da=bo(La),Ma=bo(La);function oi(r){if(r===La)throw Error(n(174));return r}function $u(r,o){switch(bt(Ma,o),bt(Da,r),bt(Ar,La),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ae(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=ae(o,r)}Ct(Ar),bt(Ar,o)}function zi(){Ct(Ar),Ct(Da),Ct(Ma)}function wm(r){oi(Ma.current);var o=oi(Ar.current),c=ae(o,r.type);o!==c&&(bt(Da,r),bt(Ar,c))}function Bu(r){Da.current===r&&(Ct(Ar),Ct(Da))}var Dt=bo(0);function ul(r){for(var o=r;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Uu=[];function Hu(){for(var r=0;r<Uu.length;r++)Uu[r]._workInProgressVersionPrimary=null;Uu.length=0}var dl=$.ReactCurrentDispatcher,Vu=$.ReactCurrentBatchConfig,ii=0,Mt=null,tn=null,sn=null,fl=!1,Oa=!1,za=0,bk=0;function mn(){throw Error(n(321))}function Wu(r,o){if(o===null)return!1;for(var c=0;c<o.length&&c<r.length;c++)if(!mr(r[c],o[c]))return!1;return!0}function Ku(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?Ck:Ek,r=c(h,x),Oa){b=0;do{if(Oa=!1,za=0,25<=b)throw Error(n(301));b+=1,sn=tn=null,o.updateQueue=null,dl.current=jk,r=c(h,x)}while(Oa)}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 Yu(){var r=za!==0;return za=0,r}function _r(){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 Fa(r,o){return typeof o=="function"?o(r):o}function Gu(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 D=E=null,H=null,ie=b;do{var ue=ie.lane;if((ii&ue)===ue)H!==null&&(H=H.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),h=ie.hasEagerState?ie.eagerState:r(h,ie.action);else{var he={lane:ue,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};H===null?(D=H=he,E=h):H=H.next=he,Mt.lanes|=ue,ai|=ue}ie=ie.next}while(ie!==null&&ie!==b);H===null?E=h:H.next=D,mr(h,o.memoizedState)||(Dn=!0),o.memoizedState=h,o.baseState=E,o.baseQueue=H,c.lastRenderedState=h}if(r=c.interleaved,r!==null){x=r;do 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 qu(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);mr(b,o.memoizedState)||(Dn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function bm(){}function km(r,o){var c=Mt,h=or(),x=o(),b=!mr(h.memoizedState,x);if(b&&(h.memoizedState=x,Dn=!0),h=h.queue,Xu(Cm.bind(null,c,h,r),[r]),h.getSnapshot!==o||b||sn!==null&&sn.memoizedState.tag&1){if(c.flags|=2048,$a(9,Nm.bind(null,c,h,x,o),void 0,null),ln===null)throw Error(n(349));(ii&30)!==0||Sm(c,o,x)}return x}function Sm(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 Nm(r,o,c,h){o.value=c,o.getSnapshot=h,Em(o)&&jm(r)}function Cm(r,o,c){return c(function(){Em(o)&&jm(r)})}function Em(r){var o=r.getSnapshot;r=r.value;try{var c=o();return!mr(r,c)}catch{return!0}}function jm(r){var o=Jr(r,1);o!==null&&wr(o,r,1,-1)}function Tm(r){var o=_r();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fa,lastRenderedState:r},o.queue=r,r=r.dispatch=Nk.bind(null,Mt,r),[o.memoizedState,r]}function $a(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 Rm(){return or().memoizedState}function pl(r,o,c,h){var x=_r();Mt.flags|=r,x.memoizedState=$a(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&&Wu(h,E.deps)){x.memoizedState=$a(o,c,b,h);return}}Mt.flags|=r,x.memoizedState=$a(1|o,c,b,h)}function Pm(r,o){return pl(8390656,8,r,o)}function Xu(r,o){return hl(2048,8,r,o)}function Am(r,o){return hl(4,2,r,o)}function _m(r,o){return hl(4,4,r,o)}function Im(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 Lm(r,o,c){return c=c!=null?c.concat([r]):null,hl(4,4,Im.bind(null,o,r),c)}function Qu(){}function Dm(r,o){var c=or();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Wu(o,h[1])?h[0]:(c.memoizedState=[r,o],r)}function Mm(r,o){var c=or();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Wu(o,h[1])?h[0]:(r=r(),c.memoizedState=[r,o],r)}function Om(r,o,c){return(ii&21)===0?(r.baseState&&(r.baseState=!1,Dn=!0),r.memoizedState=c):(mr(c,o)||(c=ph(),Mt.lanes|=c,ai|=c,r.baseState=!0),o)}function kk(r,o){var c=ut;ut=c!==0&&4>c?c:4,r(!0);var h=Vu.transition;Vu.transition={};try{r(!1),o()}finally{ut=c,Vu.transition=h}}function zm(){return or().memoizedState}function Sk(r,o,c){var h=Ro(r);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},Fm(r))$m(o,c);else if(c=gm(r,o,c,h),c!==null){var x=Tn();wr(c,r,h,x),Bm(c,o,h)}}function Nk(r,o,c){var h=Ro(r),x={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(Fm(r))$m(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,D=b(E,c);if(x.hasEagerState=!0,x.eagerState=D,mr(D,E)){var H=o.interleaved;H===null?(x.next=x,zu(o)):(x.next=H.next,H.next=x),o.interleaved=x;return}}catch{}c=gm(r,o,x,h),c!==null&&(x=Tn(),wr(c,r,h,x),Bm(c,o,h))}}function Fm(r){var o=r.alternate;return r===Mt||o!==null&&o===Mt}function $m(r,o){Oa=fl=!0;var c=r.pending;c===null?o.next=o:(o.next=c.next,c.next=o),r.pending=o}function Bm(r,o,c){if((c&4194240)!==0){var h=o.lanes;h&=r.pendingLanes,c|=h,o.lanes=c,Zc(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},Ck={readContext:rr,useCallback:function(r,o){return _r().memoizedState=[r,o===void 0?null:o],r},useContext:rr,useEffect:Pm,useImperativeHandle:function(r,o,c){return c=c!=null?c.concat([r]):null,pl(4194308,4,Im.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=_r();return o=o===void 0?null:o,r=r(),c.memoizedState=[r,o],r},useReducer:function(r,o,c){var h=_r();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=Sk.bind(null,Mt,r),[h.memoizedState,r]},useRef:function(r){var o=_r();return r={current:r},o.memoizedState=r},useState:Tm,useDebugValue:Qu,useDeferredValue:function(r){return _r().memoizedState=r},useTransition:function(){var r=Tm(!1),o=r[0];return r=kk.bind(null,r[1]),_r().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,c){var h=Mt,x=_r();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||Sm(h,o,c)}x.memoizedState=c;var b={value:c,getSnapshot:o};return x.queue=b,Pm(Cm.bind(null,h,b,r),[r]),h.flags|=2048,$a(9,Nm.bind(null,h,b,c,o),void 0,null),c},useId:function(){var r=_r(),o=ln.identifierPrefix;if(Rt){var c=Qr,h=Xr;c=(h&~(1<<32-gt(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=za++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=bk++,o=":"+o+"r"+c.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},Ek={readContext:rr,useCallback:Dm,useContext:rr,useEffect:Xu,useImperativeHandle:Lm,useInsertionEffect:Am,useLayoutEffect:_m,useMemo:Mm,useReducer:Gu,useRef:Rm,useState:function(){return Gu(Fa)},useDebugValue:Qu,useDeferredValue:function(r){var o=or();return Om(o,tn.memoizedState,r)},useTransition:function(){var r=Gu(Fa)[0],o=or().memoizedState;return[r,o]},useMutableSource:bm,useSyncExternalStore:km,useId:zm,unstable_isNewReconciler:!1},jk={readContext:rr,useCallback:Dm,useContext:rr,useEffect:Xu,useImperativeHandle:Lm,useInsertionEffect:Am,useLayoutEffect:_m,useMemo:Mm,useReducer:qu,useRef:Rm,useState:function(){return qu(Fa)},useDebugValue:Qu,useDeferredValue:function(r){var o=or();return tn===null?o.memoizedState=r:Om(o,tn.memoizedState,r)},useTransition:function(){var r=qu(Fa)[0],o=or().memoizedState;return[r,o]},useMutableSource:bm,useSyncExternalStore:km,useId:zm,unstable_isNewReconciler:!1};function xr(r,o){if(r&&r.defaultProps){o=R({},o),r=r.defaultProps;for(var c in r)o[c]===void 0&&(o[c]=r[c]);return o}return o}function Ju(r,o,c,h){o=r.memoizedState,c=c(h,o),c=c==null?o:R({},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=Tn(),x=Ro(r),b=Zr(h,x);b.payload=o,c!=null&&(b.callback=c),o=Co(r,b,x),o!==null&&(wr(o,r,x,h),ll(o,r,x))},enqueueReplaceState:function(r,o,c){r=r._reactInternals;var h=Tn(),x=Ro(r),b=Zr(h,x);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Co(r,b,x),o!==null&&(wr(o,r,x,h),ll(o,r,x))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var c=Tn(),h=Ro(r),x=Zr(c,h);x.tag=2,o!=null&&(x.callback=o),o=Co(r,x,h),o!==null&&(wr(o,r,h,c),ll(o,r,h))}};function Um(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?!Ea(c,h)||!Ea(x,b):!0}function Hm(r,o,c){var h=!1,x=ko,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)?Ai(r,x):ko),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 Vm(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 Zu(r,o,c,h){var x=r.stateNode;x.props=c,x.state=r.memoizedState,x.refs={},Fu(r);var b=o.contextType;typeof b=="object"&&b!==null?x.context=rr(b):(b=Ln(o)?ei:hn.current,x.context=Ai(r,b)),x.state=r.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Ju(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 Fi(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 ed(r,o,c){return{value:r,source:null,stack:c??null,digest:o??null}}function td(r,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var Tk=typeof WeakMap=="function"?WeakMap:Map;function Wm(r,o,c){c=Zr(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Sl||(Sl=!0,gd=h),td(r,o)},c}function Km(r,o,c){c=Zr(-1,c),c.tag=3;var h=r.type.getDerivedStateFromError;if(typeof h=="function"){var x=o.value;c.payload=function(){return h(x)},c.callback=function(){td(r,o)}}var b=r.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){td(r,o),typeof h!="function"&&(jo===null?jo=new Set([this]):jo.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})}),c}function Ym(r,o,c){var h=r.pingCache;if(h===null){h=r.pingCache=new Tk;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=Uk.bind(null,r,o,c),o.then(r,r))}function Gm(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 qm(r,o,c,h,x){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=Zr(-1,1),o.tag=2,Co(c,o,1))),c.lanes|=1),r):(r.flags|=65536,r.lanes=x,r)}var Rk=$.ReactCurrentOwner,Dn=!1;function jn(r,o,c,h){o.child=r===null?mm(o,null,c,h):Di(o,r.child,c,h)}function Xm(r,o,c,h,x){c=c.render;var b=o.ref;return Oi(o,x),h=Ku(r,o,c,h,b,x),c=Yu(),r!==null&&!Dn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~x,eo(r,o,x)):(Rt&&c&&Ru(o),o.flags|=1,jn(r,o,h,x),o.child)}function Qm(r,o,c,h,x){if(r===null){var b=c.type;return typeof b=="function"&&!Sd(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,Jm(r,o,b,h,x)):(r=Rl(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:Ea,c(E,h)&&r.ref===o.ref)return eo(r,o,x)}return o.flags|=1,r=Ao(b,h),r.ref=o.ref,r.return=o,o.child=r}function Jm(r,o,c,h,x){if(r!==null){var b=r.memoizedProps;if(Ea(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,eo(r,o,x)}return nd(r,o,c,h,x)}function Zm(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},bt(Bi,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,bt(Bi,Gn),Gn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,bt(Bi,Gn),Gn|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,bt(Bi,Gn),Gn|=h;return jn(r,o,x,c),o.child}function eg(r,o){var c=o.ref;(r===null&&c!==null||r!==null&&r.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function nd(r,o,c,h,x){var b=Ln(c)?ei:hn.current;return b=Ai(o,b),Oi(o,x),c=Ku(r,o,c,h,b,x),h=Yu(),r!==null&&!Dn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~x,eo(r,o,x)):(Rt&&h&&Ru(o),o.flags|=1,jn(r,o,c,x),o.child)}function tg(r,o,c,h,x){if(Ln(c)){var b=!0;el(o)}else b=!1;if(Oi(o,x),o.stateNode===null)yl(r,o),Hm(o,c,h),Zu(o,c,h,x),h=!0;else if(r===null){var E=o.stateNode,D=o.memoizedProps;E.props=D;var H=E.context,ie=c.contextType;typeof ie=="object"&&ie!==null?ie=rr(ie):(ie=Ln(c)?ei:hn.current,ie=Ai(o,ie));var ue=c.getDerivedStateFromProps,he=typeof ue=="function"||typeof E.getSnapshotBeforeUpdate=="function";he||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==h||H!==ie)&&Vm(o,E,h,ie),No=!1;var ce=o.memoizedState;E.state=ce,cl(o,h,E,x),H=o.memoizedState,D!==h||ce!==H||In.current||No?(typeof ue=="function"&&(Ju(o,c,ue,h),H=o.memoizedState),(D=No||Um(o,c,D,h,ce,H,ie))?(he||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(o.flags|=4194308)):(typeof E.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=H),E.props=h,E.state=H,E.context=ie,h=D):(typeof E.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{E=o.stateNode,xm(r,o),D=o.memoizedProps,ie=o.type===o.elementType?D:xr(o.type,D),E.props=ie,he=o.pendingProps,ce=E.context,H=c.contextType,typeof H=="object"&&H!==null?H=rr(H):(H=Ln(c)?ei:hn.current,H=Ai(o,H));var ke=c.getDerivedStateFromProps;(ue=typeof ke=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==he||ce!==H)&&Vm(o,E,h,H),No=!1,ce=o.memoizedState,E.state=ce,cl(o,h,E,x);var Ce=o.memoizedState;D!==he||ce!==Ce||In.current||No?(typeof ke=="function"&&(Ju(o,c,ke,h),Ce=o.memoizedState),(ie=No||Um(o,c,ie,h,ce,Ce,H)||!1)?(ue||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(h,Ce,H),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(h,Ce,H)),typeof E.componentDidUpdate=="function"&&(o.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof E.componentDidUpdate!="function"||D===r.memoizedProps&&ce===r.memoizedState||(o.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===r.memoizedProps&&ce===r.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ce),E.props=h,E.state=Ce,E.context=H,h=ie):(typeof E.componentDidUpdate!="function"||D===r.memoizedProps&&ce===r.memoizedState||(o.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===r.memoizedProps&&ce===r.memoizedState||(o.flags|=1024),h=!1)}return rd(r,o,c,h,b,x)}function rd(r,o,c,h,x,b){eg(r,o);var E=(o.flags&128)!==0;if(!h&&!E)return x&&am(o,c,!1),eo(r,o,b);h=o.stateNode,Rk.current=o;var D=E&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,r!==null&&E?(o.child=Di(o,r.child,null,b),o.child=Di(o,null,D,b)):jn(r,o,D,b),o.memoizedState=h.state,x&&am(o,c,!0),o.child}function ng(r){var o=r.stateNode;o.pendingContext?om(r,o.pendingContext,o.pendingContext!==o.context):o.context&&om(r,o.context,!1),$u(r,o.containerInfo)}function rg(r,o,c,h,x){return Li(),Iu(x),o.flags|=256,jn(r,o,c,h),o.child}var od={dehydrated:null,treeContext:null,retryLane:0};function id(r){return{baseLanes:r,cachePool:null,transitions:null}}function og(r,o,c){var h=o.pendingProps,x=Dt.current,b=!1,E=(o.flags&128)!==0,D;if((D=E)||(D=r!==null&&r.memoizedState===null?!1:(x&2)!==0),D?(b=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(x|=1),bt(Dt,x&1),r===null)return _u(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=id(c),o.memoizedState=od,r):ad(o,E));if(x=r.memoizedState,x!==null&&(D=x.dehydrated,D!==null))return Pk(r,o,E,h,D,x,c);if(b){b=h.fallback,E=o.mode,x=r.child,D=x.sibling;var H={mode:"hidden",children:h.children};return(E&1)===0&&o.child!==x?(h=o.child,h.childLanes=0,h.pendingProps=H,o.deletions=null):(h=Ao(x,H),h.subtreeFlags=x.subtreeFlags&14680064),D!==null?b=Ao(D,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?id(c):{baseLanes:E.baseLanes|c,cachePool:null,transitions:E.transitions},b.memoizedState=E,b.childLanes=r.childLanes&~c,o.memoizedState=od,h}return b=r.child,r=b.sibling,h=Ao(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 ad(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&&Iu(h),Di(o,r.child,null,c),r=ad(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function Pk(r,o,c,h,x,b,E){if(c)return o.flags&256?(o.flags&=-257,h=ed(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&&Di(o,r.child,null,E),o.child.memoizedState=id(E),o.memoizedState=od,b);if((o.mode&1)===0)return xl(r,o,E,null);if(x.data==="$!"){if(h=x.nextSibling&&x.nextSibling.dataset,h)var D=h.dgst;return h=D,b=Error(n(419)),h=ed(b,h,void 0),xl(r,o,E,h)}if(D=(E&r.childLanes)!==0,Dn||D){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,Jr(r,x),wr(h,r,x,-1))}return kd(),h=ed(Error(n(421))),xl(r,o,E,h)}return x.data==="$?"?(o.flags|=128,o.child=r.child,o=Hk.bind(null,r),x._reactRetry=o,null):(r=b.treeContext,Yn=wo(x.nextSibling),Kn=o,Rt=!0,gr=null,r!==null&&(tr[nr++]=Xr,tr[nr++]=Qr,tr[nr++]=ti,Xr=r.id,Qr=r.overflow,ti=o),o=ad(o,h.children),o.flags|=4096,o)}function ig(r,o,c){r.lanes|=o;var h=r.alternate;h!==null&&(h.lanes|=o),Ou(r.return,o,c)}function sd(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 ag(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&&ig(r,c,o);else if(r.tag===19)ig(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(bt(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),sd(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}sd(o,!0,c,null,b);break;case"together":sd(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function yl(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function eo(r,o,c){if(r!==null&&(o.dependencies=r.dependencies),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=Ao(r,r.pendingProps),o.child=c,c.return=o;r.sibling!==null;)r=r.sibling,c=c.sibling=Ao(r,r.pendingProps),c.return=o;c.sibling=null}return o.child}function Ak(r,o,c){switch(o.tag){case 3:ng(o),Li();break;case 5:wm(o);break;case 1:Ln(o.type)&&el(o);break;case 4:$u(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,x=o.memoizedProps.value;bt(al,h._currentValue),h._currentValue=x;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(Dt,Dt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?og(r,o,c):(bt(Dt,Dt.current&1),r=eo(r,o,c),r!==null?r.sibling:null);bt(Dt,Dt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(r.flags&128)!==0){if(h)return ag(r,o,c);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),bt(Dt,Dt.current),h)break;return null;case 22:case 23:return o.lanes=0,Zm(r,o,c)}return eo(r,o,c)}var sg,ld,lg,cg;sg=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}},ld=function(){},lg=function(r,o,c,h){var x=r.memoizedProps;if(x!==h){r=o.stateNode,oi(Ar.current);var b=null;switch(c){case"input":x=Ot(r,x),h=Ot(r,h),b=[];break;case"select":x=R({},x,{value:void 0}),h=R({},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(ie in x)if(!h.hasOwnProperty(ie)&&x.hasOwnProperty(ie)&&x[ie]!=null)if(ie==="style"){var D=x[ie];for(E in D)D.hasOwnProperty(E)&&(c||(c={}),c[E]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(a.hasOwnProperty(ie)?b||(b=[]):(b=b||[]).push(ie,null));for(ie in h){var H=h[ie];if(D=x?.[ie],h.hasOwnProperty(ie)&&H!==D&&(H!=null||D!=null))if(ie==="style")if(D){for(E in D)!D.hasOwnProperty(E)||H&&H.hasOwnProperty(E)||(c||(c={}),c[E]="");for(E in H)H.hasOwnProperty(E)&&D[E]!==H[E]&&(c||(c={}),c[E]=H[E])}else c||(b||(b=[]),b.push(ie,c)),c=H;else ie==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,D=D?D.__html:void 0,H!=null&&D!==H&&(b=b||[]).push(ie,H)):ie==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(ie,""+H):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(a.hasOwnProperty(ie)?(H!=null&&ie==="onScroll"&&Nt("scroll",r),b||D===H||(b=[])):(b=b||[]).push(ie,H))}c&&(b=b||[]).push("style",c);var ie=b;(o.updateQueue=ie)&&(o.flags|=4)}},cg=function(r,o,c,h){c!==h&&(o.flags|=4)};function Ba(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 _k(r,o,c){var h=o.pendingProps;switch(Pu(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,zi(),Ct(In),Ct(hn),Hu(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(r===null||r.child===null)&&(ol(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,gr!==null&&(vd(gr),gr=null))),ld(r,o),gn(o),null;case 5:Bu(o);var x=oi(Ma.current);if(c=o.type,r!==null&&o.stateNode!=null)lg(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(Ar.current),ol(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Pr]=o,h[Aa]=b,r=(o.mode&1)!==0,c){case"dialog":Nt("cancel",h),Nt("close",h);break;case"iframe":case"object":case"embed":Nt("load",h);break;case"video":case"audio":for(x=0;x<Ta.length;x++)Nt(Ta[x],h);break;case"source":Nt("error",h);break;case"img":case"image":case"link":Nt("error",h),Nt("load",h);break;case"details":Nt("toggle",h);break;case"input":kn(h,b),Nt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},Nt("invalid",h);break;case"textarea":on(h,b),Nt("invalid",h)}_t(c,b),x=null;for(var E in b)if(b.hasOwnProperty(E)){var D=b[E];E==="children"?typeof D=="string"?h.textContent!==D&&(b.suppressHydrationWarning!==!0&&Xs(h.textContent,D,r),x=["children",D]):typeof D=="number"&&h.textContent!==""+D&&(b.suppressHydrationWarning!==!0&&Xs(h.textContent,D,r),x=["children",""+D]):a.hasOwnProperty(E)&&D!=null&&E==="onScroll"&&Nt("scroll",h)}switch(c){case"input":Me(h),pr(h,b,!0);break;case"textarea":Me(h),jt(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=B(c)),r==="http://www.w3.org/1999/xhtml"?c==="script"?(r=E.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof h.is=="string"?r=E.createElement(c,{is:h.is}):(r=E.createElement(c),c==="select"&&(E=r,h.multiple?E.multiple=!0:h.size&&(E.size=h.size))):r=E.createElementNS(r,c),r[Pr]=o,r[Aa]=h,sg(r,o,!1,!1),o.stateNode=r;e:{switch(E=Nn(c,h),c){case"dialog":Nt("cancel",r),Nt("close",r),x=h;break;case"iframe":case"object":case"embed":Nt("load",r),x=h;break;case"video":case"audio":for(x=0;x<Ta.length;x++)Nt(Ta[x],r);x=h;break;case"source":Nt("error",r),x=h;break;case"img":case"image":case"link":Nt("error",r),Nt("load",r),x=h;break;case"details":Nt("toggle",r),x=h;break;case"input":kn(r,h),x=Ot(r,h),Nt("invalid",r);break;case"option":x=h;break;case"select":r._wrapperState={wasMultiple:!!h.multiple},x=R({},h,{value:void 0}),Nt("invalid",r);break;case"textarea":on(r,h),x=Pt(r,h),Nt("invalid",r);break;default:x=h}_t(c,x),D=x;for(b in D)if(D.hasOwnProperty(b)){var H=D[b];b==="style"?Ft(r,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Re(r,H)):b==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&We(r,H):typeof H=="number"&&We(r,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(a.hasOwnProperty(b)?H!=null&&b==="onScroll"&&Nt("scroll",r):H!=null&&T(r,b,H,E))}switch(c){case"input":Me(r),pr(r,h,!1);break;case"textarea":Me(r),jt(r);break;case"option":h.value!=null&&r.setAttribute("value",""+pe(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)cg(r,o,r.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=oi(Ma.current),oi(Ar.current),ol(o)){if(h=o.stateNode,c=o.memoizedProps,h[Pr]=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[Pr]=o,o.stateNode=h}return gn(o),null;case 13:if(Ct(Dt),h=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Rt&&Yn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)fm(),Li(),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[Pr]=o}else Li(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;gn(o),b=!1}else gr!==null&&(vd(gr),gr=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):kd())),o.updateQueue!==null&&(o.flags|=4),gn(o),null);case 4:return zi(),ld(r,o),r===null&&Ra(o.stateNode.containerInfo),gn(o),null;case 10:return Mu(o.type._context),gn(o),null;case 17:return Ln(o.type)&&Zs(),gn(o),null;case 19:if(Ct(Dt),b=o.memoizedState,b===null)return gn(o),null;if(h=(o.flags&128)!==0,E=b.rendering,E===null)if(h)Ba(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,Ba(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 bt(Dt,Dt.current&1|2),o.child}r=r.sibling}b.tail!==null&&ct()>Ui&&(o.flags|=128,h=!0,Ba(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),Ba(b,!0),b.tail===null&&b.tailMode==="hidden"&&!E.alternate&&!Rt)return gn(o),null}else 2*ct()-b.renderingStartTime>Ui&&c!==1073741824&&(o.flags|=128,h=!0,Ba(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,bt(Dt,h?c&1|2:c&1),o):(gn(o),null);case 22:case 23:return bd(),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 Ik(r,o){switch(Pu(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 zi(),Ct(In),Ct(hn),Hu(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Bu(o),null;case 13:if(Ct(Dt),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Li()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Ct(Dt),null;case 4:return zi(),null;case 10:return Mu(o.type._context),null;case 22:case 23:return bd(),null;case 24:return null;default:return null}}var vl=!1,xn=!1,Lk=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function $i(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 cd(r,o,c){try{c()}catch(h){Bt(r,o,h)}}var ug=!1;function Dk(r,o){if(bu=Fs,r=Uh(),pu(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,D=-1,H=-1,ie=0,ue=0,he=r,ce=null;t:for(;;){for(var ke;he!==c||x!==0&&he.nodeType!==3||(D=E+x),he!==b||h!==0&&he.nodeType!==3||(H=E+h),he.nodeType===3&&(E+=he.nodeValue.length),(ke=he.firstChild)!==null;)ce=he,he=ke;for(;;){if(he===r)break t;if(ce===c&&++ie===x&&(D=E),ce===b&&++ue===h&&(H=E),(ke=he.nextSibling)!==null)break;he=ce,ce=he.parentNode}he=ke}c=D===-1||H===-1?null:{start:D,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(ku={focusedElem:r,selectionRange:c},Fs=!1,Ne=o;Ne!==null;)if(o=Ne,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,Ne=r;else for(;Ne!==null;){o=Ne;try{var Ce=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var Te=Ce.memoizedProps,Wt=Ce.memoizedState,Q=o.stateNode,K=Q.getSnapshotBeforeUpdate(o.elementType===o.type?Te:xr(o.type,Te),Wt);Q.__reactInternalSnapshotBeforeUpdate=K}break;case 3:var Z=o.stateNode.containerInfo;Z.nodeType===1?Z.textContent="":Z.nodeType===9&&Z.documentElement&&Z.removeChild(Z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){Bt(o,o.return,ge)}if(r=o.sibling,r!==null){r.return=o.return,Ne=r;break}Ne=o.return}return Ce=ug,ug=!1,Ce}function Ua(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&&cd(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 ud(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 dg(r){var o=r.alternate;o!==null&&(r.alternate=null,dg(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Pr],delete o[Aa],delete o[Eu],delete o[xk],delete o[yk])),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 fg(r){return r.tag===5||r.tag===3||r.tag===4}function pg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||fg(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 dd(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(dd(r,o,c),r=r.sibling;r!==null;)dd(r,o,c),r=r.sibling}function fd(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(fd(r,o,c),r=r.sibling;r!==null;)fd(r,o,c),r=r.sibling}var dn=null,yr=!1;function Eo(r,o,c){for(c=c.child;c!==null;)hg(r,o,c),c=c.sibling}function hg(r,o,c){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(Wr,c)}catch{}switch(c.tag){case 5:xn||$i(c,o);case 6:var h=dn,x=yr;dn=null,Eo(r,o,c),dn=h,yr=x,dn!==null&&(yr?(r=dn,c=c.stateNode,r.nodeType===8?r.parentNode.removeChild(c):r.removeChild(c)):dn.removeChild(c.stateNode));break;case 18:dn!==null&&(yr?(r=dn,c=c.stateNode,r.nodeType===8?Cu(r.parentNode,c):r.nodeType===1&&Cu(r,c),wa(r)):Cu(dn,c.stateNode));break;case 4:h=dn,x=yr,dn=c.stateNode.containerInfo,yr=!0,Eo(r,o,c),dn=h,yr=x;break;case 0:case 11:case 14:case 15:if(!xn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){x=h=h.next;do{var b=x,E=b.destroy;b=b.tag,E!==void 0&&((b&2)!==0||(b&4)!==0)&&cd(c,o,E),x=x.next}while(x!==h)}Eo(r,o,c);break;case 1:if(!xn&&($i(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(D){Bt(c,o,D)}Eo(r,o,c);break;case 21:Eo(r,o,c);break;case 22:c.mode&1?(xn=(h=xn)||c.memoizedState!==null,Eo(r,o,c),xn=h):Eo(r,o,c);break;default:Eo(r,o,c)}}function mg(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var c=r.stateNode;c===null&&(c=r.stateNode=new Lk),o.forEach(function(h){var x=Vk.bind(null,r,h);c.has(h)||(c.add(h),h.then(x,x))})}}function vr(r,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var x=c[h];try{var b=r,E=o,D=E;e:for(;D!==null;){switch(D.tag){case 5:dn=D.stateNode,yr=!1;break e;case 3:dn=D.stateNode.containerInfo,yr=!0;break e;case 4:dn=D.stateNode.containerInfo,yr=!0;break e}D=D.return}if(dn===null)throw Error(n(160));hg(b,E,x),dn=null,yr=!1;var H=x.alternate;H!==null&&(H.return=null),x.return=null}catch(ie){Bt(x,o,ie)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)gg(o,r),o=o.sibling}function gg(r,o){var c=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(vr(o,r),Ir(r),h&4){try{Ua(3,r,r.return),wl(3,r)}catch(Te){Bt(r,r.return,Te)}try{Ua(5,r,r.return)}catch(Te){Bt(r,r.return,Te)}}break;case 1:vr(o,r),Ir(r),h&512&&c!==null&&$i(c,c.return);break;case 5:if(vr(o,r),Ir(r),h&512&&c!==null&&$i(c,c.return),r.flags&32){var x=r.stateNode;try{We(x,"")}catch(Te){Bt(r,r.return,Te)}}if(h&4&&(x=r.stateNode,x!=null)){var b=r.memoizedProps,E=c!==null?c.memoizedProps:b,D=r.type,H=r.updateQueue;if(r.updateQueue=null,H!==null)try{D==="input"&&b.type==="radio"&&b.name!=null&&zt(x,b),Nn(D,E);var ie=Nn(D,b);for(E=0;E<H.length;E+=2){var ue=H[E],he=H[E+1];ue==="style"?Ft(x,he):ue==="dangerouslySetInnerHTML"?Re(x,he):ue==="children"?We(x,he):T(x,ue,he,ie)}switch(D){case"input":Et(x,b);break;case"textarea":Zt(x,b);break;case"select":var ce=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!b.multiple;var ke=b.value;ke!=null?An(x,!!b.multiple,ke,!1):ce!==!!b.multiple&&(b.defaultValue!=null?An(x,!!b.multiple,b.defaultValue,!0):An(x,!!b.multiple,b.multiple?[]:"",!1))}x[Aa]=b}catch(Te){Bt(r,r.return,Te)}}break;case 6:if(vr(o,r),Ir(r),h&4){if(r.stateNode===null)throw Error(n(162));x=r.stateNode,b=r.memoizedProps;try{x.nodeValue=b}catch(Te){Bt(r,r.return,Te)}}break;case 3:if(vr(o,r),Ir(r),h&4&&c!==null&&c.memoizedState.isDehydrated)try{wa(o.containerInfo)}catch(Te){Bt(r,r.return,Te)}break;case 4:vr(o,r),Ir(r);break;case 13:vr(o,r),Ir(r),x=r.child,x.flags&8192&&(b=x.memoizedState!==null,x.stateNode.isHidden=b,!b||x.alternate!==null&&x.alternate.memoizedState!==null||(md=ct())),h&4&&mg(r);break;case 22:if(ue=c!==null&&c.memoizedState!==null,r.mode&1?(xn=(ie=xn)||ue,vr(o,r),xn=ie):vr(o,r),Ir(r),h&8192){if(ie=r.memoizedState!==null,(r.stateNode.isHidden=ie)&&!ue&&(r.mode&1)!==0)for(Ne=r,ue=r.child;ue!==null;){for(he=Ne=ue;Ne!==null;){switch(ce=Ne,ke=ce.child,ce.tag){case 0:case 11:case 14:case 15:Ua(4,ce,ce.return);break;case 1:$i(ce,ce.return);var Ce=ce.stateNode;if(typeof Ce.componentWillUnmount=="function"){h=ce,c=ce.return;try{o=h,Ce.props=o.memoizedProps,Ce.state=o.memoizedState,Ce.componentWillUnmount()}catch(Te){Bt(h,c,Te)}}break;case 5:$i(ce,ce.return);break;case 22:if(ce.memoizedState!==null){vg(he);continue}}ke!==null?(ke.return=ce,Ne=ke):vg(he)}ue=ue.sibling}e:for(ue=null,he=r;;){if(he.tag===5){if(ue===null){ue=he;try{x=he.stateNode,ie?(b=x.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(D=he.stateNode,H=he.memoizedProps.style,E=H!=null&&H.hasOwnProperty("display")?H.display:null,D.style.display=Kt("display",E))}catch(Te){Bt(r,r.return,Te)}}}else if(he.tag===6){if(ue===null)try{he.stateNode.nodeValue=ie?"":he.memoizedProps}catch(Te){Bt(r,r.return,Te)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===r)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===r)break e;for(;he.sibling===null;){if(he.return===null||he.return===r)break e;ue===he&&(ue=null),he=he.return}ue===he&&(ue=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:vr(o,r),Ir(r),h&4&&mg(r);break;case 21:break;default:vr(o,r),Ir(r)}}function Ir(r){var o=r.flags;if(o&2){try{e:{for(var c=r.return;c!==null;){if(fg(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var x=h.stateNode;h.flags&32&&(We(x,""),h.flags&=-33);var b=pg(r);fd(r,b,x);break;case 3:case 4:var E=h.stateNode.containerInfo,D=pg(r);dd(r,D,E);break;default:throw Error(n(161))}}catch(H){Bt(r,r.return,H)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function Mk(r,o,c){Ne=r,xg(r)}function xg(r,o,c){for(var h=(r.mode&1)!==0;Ne!==null;){var x=Ne,b=x.child;if(x.tag===22&&h){var E=x.memoizedState!==null||vl;if(!E){var D=x.alternate,H=D!==null&&D.memoizedState!==null||xn;D=vl;var ie=xn;if(vl=E,(xn=H)&&!ie)for(Ne=x;Ne!==null;)E=Ne,H=E.child,E.tag===22&&E.memoizedState!==null?wg(x):H!==null?(H.return=E,Ne=H):wg(x);for(;b!==null;)Ne=b,xg(b),b=b.sibling;Ne=x,vl=D,xn=ie}yg(r)}else(x.subtreeFlags&8772)!==0&&b!==null?(b.return=x,Ne=b):yg(r)}}function yg(r){for(;Ne!==null;){var o=Ne;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:xn||wl(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!xn)if(c===null)h.componentDidMount();else{var x=o.elementType===o.type?c.memoizedProps:xr(o.type,c.memoizedProps);h.componentDidUpdate(x,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&vm(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}vm(o,E,c)}break;case 5:var D=o.stateNode;if(c===null&&o.flags&4){c=D;var H=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ie=o.alternate;if(ie!==null){var ue=ie.memoizedState;if(ue!==null){var he=ue.dehydrated;he!==null&&wa(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||o.flags&512&&ud(o)}catch(ce){Bt(o,o.return,ce)}}if(o===r){Ne=null;break}if(c=o.sibling,c!==null){c.return=o.return,Ne=c;break}Ne=o.return}}function vg(r){for(;Ne!==null;){var o=Ne;if(o===r){Ne=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Ne=c;break}Ne=o.return}}function wg(r){for(;Ne!==null;){var o=Ne;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{wl(4,o)}catch(H){Bt(o,c,H)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var x=o.return;try{h.componentDidMount()}catch(H){Bt(o,x,H)}}var b=o.return;try{ud(o)}catch(H){Bt(o,b,H)}break;case 5:var E=o.return;try{ud(o)}catch(H){Bt(o,E,H)}}}catch(H){Bt(o,o.return,H)}if(o===r){Ne=null;break}var D=o.sibling;if(D!==null){D.return=o.return,Ne=D;break}Ne=o.return}}var Ok=Math.ceil,bl=$.ReactCurrentDispatcher,pd=$.ReactCurrentOwner,ir=$.ReactCurrentBatchConfig,it=0,ln=null,qt=null,fn=0,Gn=0,Bi=bo(0),nn=0,Ha=null,ai=0,kl=0,hd=0,Va=null,Mn=null,md=0,Ui=1/0,to=null,Sl=!1,gd=null,jo=null,Nl=!1,To=null,Cl=0,Wa=0,xd=null,El=-1,jl=0;function Tn(){return(it&6)!==0?ct():El!==-1?El:El=ct()}function Ro(r){return(r.mode&1)===0?1:(it&2)!==0&&fn!==0?fn&-fn:wk.transition!==null?(jl===0&&(jl=ph()),jl):(r=ut,r!==0||(r=window.event,r=r===void 0?16:kh(r.type)),r)}function wr(r,o,c,h){if(50<Wa)throw Wa=0,xd=null,Error(n(185));ma(r,c,h),((it&2)===0||r!==ln)&&(r===ln&&((it&2)===0&&(kl|=c),nn===4&&Po(r,fn)),On(r,h),c===1&&it===0&&(o.mode&1)===0&&(Ui=ct()+500,tl&&So()))}function On(r,o){var c=r.callbackNode;wb(r,o);var h=Ms(r,r===ln?fn: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?vk(kg.bind(null,r)):sm(kg.bind(null,r)),mk(function(){(it&6)===0&&So()}),c=null;else{switch(hh(h)){case 1:c=er;break;case 4:c=Vn;break;case 16:c=fo;break;case 536870912:c=Rr;break;default:c=fo}c=Pg(c,bg.bind(null,r))}r.callbackPriority=o,r.callbackNode=c}}function bg(r,o){if(El=-1,jl=0,(it&6)!==0)throw Error(n(327));var c=r.callbackNode;if(Hi()&&r.callbackNode!==c)return null;var h=Ms(r,r===ln?fn:0);if(h===0)return null;if((h&30)!==0||(h&r.expiredLanes)!==0||o)o=Tl(r,h);else{o=h;var x=it;it|=2;var b=Ng();(ln!==r||fn!==o)&&(to=null,Ui=ct()+500,li(r,o));do try{$k();break}catch(D){Sg(r,D)}while(!0);Du(),bl.current=b,it=x,qt!==null?o=0:(ln=null,fn=0,o=nn)}if(o!==0){if(o===2&&(x=Qc(r),x!==0&&(h=x,o=yd(r,x))),o===1)throw c=Ha,li(r,0),Po(r,h),On(r,ct()),c;if(o===6)Po(r,h);else{if(x=r.current.alternate,(h&30)===0&&!zk(x)&&(o=Tl(r,h),o===2&&(b=Qc(r),b!==0&&(h=b,o=yd(r,b))),o===1))throw c=Ha,li(r,0),Po(r,h),On(r,ct()),c;switch(r.finishedWork=x,r.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:ci(r,Mn,to);break;case 3:if(Po(r,h),(h&130023424)===h&&(o=md+500-ct(),10<o)){if(Ms(r,0)!==0)break;if(x=r.suspendedLanes,(x&h)!==h){Tn(),r.pingedLanes|=r.suspendedLanes&x;break}r.timeoutHandle=Nu(ci.bind(null,r,Mn,to),o);break}ci(r,Mn,to);break;case 4:if(Po(r,h),(h&4194240)===h)break;for(o=r.eventTimes,x=-1;0<h;){var E=31-gt(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*Ok(h/1960))-h,10<h){r.timeoutHandle=Nu(ci.bind(null,r,Mn,to),h);break}ci(r,Mn,to);break;case 5:ci(r,Mn,to);break;default:throw Error(n(329))}}}return On(r,ct()),r.callbackNode===c?bg.bind(null,r):null}function yd(r,o){var c=Va;return r.current.memoizedState.isDehydrated&&(li(r,o).flags|=256),r=Tl(r,o),r!==2&&(o=Mn,Mn=c,o!==null&&vd(o)),r}function vd(r){Mn===null?Mn=r:Mn.push.apply(Mn,r)}function zk(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(!mr(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 Po(r,o){for(o&=~hd,o&=~kl,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var c=31-gt(o),h=1<<c;r[c]=-1,o&=~h}}function kg(r){if((it&6)!==0)throw Error(n(327));Hi();var o=Ms(r,0);if((o&1)===0)return On(r,ct()),null;var c=Tl(r,o);if(r.tag!==0&&c===2){var h=Qc(r);h!==0&&(o=h,c=yd(r,h))}if(c===1)throw c=Ha,li(r,0),Po(r,o),On(r,ct()),c;if(c===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,ci(r,Mn,to),On(r,ct()),null}function wd(r,o){var c=it;it|=1;try{return r(o)}finally{it=c,it===0&&(Ui=ct()+500,tl&&So())}}function si(r){To!==null&&To.tag===0&&(it&6)===0&&Hi();var o=it;it|=1;var c=ir.transition,h=ut;try{if(ir.transition=null,ut=1,r)return r()}finally{ut=h,ir.transition=c,it=o,(it&6)===0&&So()}}function bd(){Gn=Bi.current,Ct(Bi)}function li(r,o){r.finishedWork=null,r.finishedLanes=0;var c=r.timeoutHandle;if(c!==-1&&(r.timeoutHandle=-1,hk(c)),qt!==null)for(c=qt.return;c!==null;){var h=c;switch(Pu(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Zs();break;case 3:zi(),Ct(In),Ct(hn),Hu();break;case 5:Bu(h);break;case 4:zi();break;case 13:Ct(Dt);break;case 19:Ct(Dt);break;case 10:Mu(h.type._context);break;case 22:case 23:bd()}c=c.return}if(ln=r,qt=r=Ao(r.current,null),fn=Gn=o,nn=0,Ha=null,hd=kl=ai=0,Mn=Va=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 Sg(r,o){do{var c=qt;try{if(Du(),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,Oa=!1,za=0,pd.current=null,c===null||c.return===null){nn=1,Ha=o,qt=null;break}e:{var b=r,E=c.return,D=c,H=o;if(o=fn,D.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var ie=H,ue=D,he=ue.tag;if((ue.mode&1)===0&&(he===0||he===11||he===15)){var ce=ue.alternate;ce?(ue.updateQueue=ce.updateQueue,ue.memoizedState=ce.memoizedState,ue.lanes=ce.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var ke=Gm(E);if(ke!==null){ke.flags&=-257,qm(ke,E,D,b,o),ke.mode&1&&Ym(b,ie,o),o=ke,H=ie;var Ce=o.updateQueue;if(Ce===null){var Te=new Set;Te.add(H),o.updateQueue=Te}else Ce.add(H);break e}else{if((o&1)===0){Ym(b,ie,o),kd();break e}H=Error(n(426))}}else if(Rt&&D.mode&1){var Wt=Gm(E);if(Wt!==null){(Wt.flags&65536)===0&&(Wt.flags|=256),qm(Wt,E,D,b,o),Iu(Fi(H,D));break e}}b=H=Fi(H,D),nn!==4&&(nn=2),Va===null?Va=[b]:Va.push(b),b=E;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var Q=Wm(b,H,o);ym(b,Q);break e;case 1:D=H;var K=b.type,Z=b.stateNode;if((b.flags&128)===0&&(typeof K.getDerivedStateFromError=="function"||Z!==null&&typeof Z.componentDidCatch=="function"&&(jo===null||!jo.has(Z)))){b.flags|=65536,o&=-o,b.lanes|=o;var ge=Km(b,D,o);ym(b,ge);break e}}b=b.return}while(b!==null)}Eg(c)}catch(Ie){o=Ie,qt===c&&c!==null&&(qt=c=c.return);continue}break}while(!0)}function Ng(){var r=bl.current;return bl.current=ml,r===null?ml:r}function kd(){(nn===0||nn===3||nn===2)&&(nn=4),ln===null||(ai&268435455)===0&&(kl&268435455)===0||Po(ln,fn)}function Tl(r,o){var c=it;it|=2;var h=Ng();(ln!==r||fn!==o)&&(to=null,li(r,o));do try{Fk();break}catch(x){Sg(r,x)}while(!0);if(Du(),it=c,bl.current=h,qt!==null)throw Error(n(261));return ln=null,fn=0,nn}function Fk(){for(;qt!==null;)Cg(qt)}function $k(){for(;qt!==null&&!lt();)Cg(qt)}function Cg(r){var o=Rg(r.alternate,r,Gn);r.memoizedProps=r.pendingProps,o===null?Eg(r):qt=o,pd.current=null}function Eg(r){var o=r;do{var c=o.alternate;if(r=o.return,(o.flags&32768)===0){if(c=_k(c,o,Gn),c!==null){qt=c;return}}else{if(c=Ik(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,Bk(r,o,c,h)}finally{ir.transition=x,ut=h}return null}function Bk(r,o,c,h){do Hi();while(To!==null);if((it&6)!==0)throw Error(n(327));c=r.finishedWork;var x=r.finishedLanes;if(c===null)return null;if(r.finishedWork=null,r.finishedLanes=0,c===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var b=c.lanes|c.childLanes;if(bb(r,b),r===ln&&(qt=ln=null,fn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Nl||(Nl=!0,Pg(fo,function(){return Hi(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=ir.transition,ir.transition=null;var E=ut;ut=1;var D=it;it|=4,pd.current=null,Dk(r,c),gg(c,r),sk(ku),Fs=!!bu,ku=bu=null,r.current=c,Mk(c),_n(),it=D,ut=E,ir.transition=b}else r.current=c;if(Nl&&(Nl=!1,To=r,Cl=x),b=r.pendingLanes,b===0&&(jo=null),nt(c.stateNode),On(r,ct()),o!==null)for(h=r.onRecoverableError,c=0;c<o.length;c++)x=o[c],h(x.value,{componentStack:x.stack,digest:x.digest});if(Sl)throw Sl=!1,r=gd,gd=null,r;return(Cl&1)!==0&&r.tag!==0&&Hi(),b=r.pendingLanes,(b&1)!==0?r===xd?Wa++:(Wa=0,xd=r):Wa=0,So(),null}function Hi(){if(To!==null){var r=hh(Cl),o=ir.transition,c=ut;try{if(ir.transition=null,ut=16>r?16:r,To===null)var h=!1;else{if(r=To,To=null,Cl=0,(it&6)!==0)throw Error(n(331));var x=it;for(it|=4,Ne=r.current;Ne!==null;){var b=Ne,E=b.child;if((Ne.flags&16)!==0){var D=b.deletions;if(D!==null){for(var H=0;H<D.length;H++){var ie=D[H];for(Ne=ie;Ne!==null;){var ue=Ne;switch(ue.tag){case 0:case 11:case 15:Ua(8,ue,b)}var he=ue.child;if(he!==null)he.return=ue,Ne=he;else for(;Ne!==null;){ue=Ne;var ce=ue.sibling,ke=ue.return;if(dg(ue),ue===ie){Ne=null;break}if(ce!==null){ce.return=ke,Ne=ce;break}Ne=ke}}}var Ce=b.alternate;if(Ce!==null){var Te=Ce.child;if(Te!==null){Ce.child=null;do{var Wt=Te.sibling;Te.sibling=null,Te=Wt}while(Te!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&E!==null)E.return=b,Ne=E;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Ua(9,b,b.return)}var Q=b.sibling;if(Q!==null){Q.return=b.return,Ne=Q;break e}Ne=b.return}}var K=r.current;for(Ne=K;Ne!==null;){E=Ne;var Z=E.child;if((E.subtreeFlags&2064)!==0&&Z!==null)Z.return=E,Ne=Z;else e:for(E=K;Ne!==null;){if(D=Ne,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:wl(9,D)}}catch(Ie){Bt(D,D.return,Ie)}if(D===E){Ne=null;break e}var ge=D.sibling;if(ge!==null){ge.return=D.return,Ne=ge;break e}Ne=D.return}}if(it=x,So(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(Wr,r)}catch{}h=!0}return h}finally{ut=c,ir.transition=o}}return!1}function jg(r,o,c){o=Fi(c,o),o=Wm(r,o,1),r=Co(r,o,1),o=Tn(),r!==null&&(ma(r,1,o),On(r,o))}function Bt(r,o,c){if(r.tag===3)jg(r,r,c);else for(;o!==null;){if(o.tag===3){jg(o,r,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(jo===null||!jo.has(h))){r=Fi(c,r),r=Km(o,r,1),o=Co(o,r,1),r=Tn(),o!==null&&(ma(o,1,r),On(o,r));break}}o=o.return}}function Uk(r,o,c){var h=r.pingCache;h!==null&&h.delete(o),o=Tn(),r.pingedLanes|=r.suspendedLanes&c,ln===r&&(fn&c)===c&&(nn===4||nn===3&&(fn&130023424)===fn&&500>ct()-md?li(r,0):hd|=c),On(r,o)}function Tg(r,o){o===0&&((r.mode&1)===0?o=1:(o=Qo,Qo<<=1,(Qo&130023424)===0&&(Qo=4194304)));var c=Tn();r=Jr(r,o),r!==null&&(ma(r,o,c),On(r,c))}function Hk(r){var o=r.memoizedState,c=0;o!==null&&(c=o.retryLane),Tg(r,c)}function Vk(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),Tg(r,c)}var Rg;Rg=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,Ak(r,o,c);Dn=(r.flags&131072)!==0}else Dn=!1,Rt&&(o.flags&1048576)!==0&&lm(o,rl,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;yl(r,o),r=o.pendingProps;var x=Ai(o,hn.current);Oi(o,c),x=Ku(null,o,h,r,x,c);var b=Yu();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,Fu(o),x.updater=gl,o.stateNode=x,x._reactInternals=o,Zu(o,h,r,c),o=rd(null,o,h,!0,b,c)):(o.tag=0,Rt&&b&&Ru(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=Kk(h),r=xr(h,r),x){case 0:o=nd(null,o,h,r,c);break e;case 1:o=tg(null,o,h,r,c);break e;case 11:o=Xm(null,o,h,r,c);break e;case 14:o=Qm(null,o,h,xr(h.type,r),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),nd(r,o,h,x,c);case 1:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),tg(r,o,h,x,c);case 3:e:{if(ng(o),r===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,x=b.element,xm(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=Fi(Error(n(423)),o),o=rg(r,o,h,c,x);break e}else if(h!==x){x=Fi(Error(n(424)),o),o=rg(r,o,h,c,x);break e}else for(Yn=wo(o.stateNode.containerInfo.firstChild),Kn=o,Rt=!0,gr=null,c=mm(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Li(),h===x){o=eo(r,o,c);break e}jn(r,o,h,c)}o=o.child}return o;case 5:return wm(o),r===null&&_u(o),h=o.type,x=o.pendingProps,b=r!==null?r.memoizedProps:null,E=x.children,Su(h,x)?E=null:b!==null&&Su(h,b)&&(o.flags|=32),eg(r,o),jn(r,o,E,c),o.child;case 6:return r===null&&_u(o),null;case 13:return og(r,o,c);case 4:return $u(o,o.stateNode.containerInfo),h=o.pendingProps,r===null?o.child=Di(o,null,h,c):jn(r,o,h,c),o.child;case 11:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),Xm(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,bt(al,h._currentValue),h._currentValue=E,b!==null)if(mr(b.value,E)){if(b.children===x.children&&!In.current){o=eo(r,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var D=b.dependencies;if(D!==null){E=b.child;for(var H=D.firstContext;H!==null;){if(H.context===h){if(b.tag===1){H=Zr(-1,c&-c),H.tag=2;var ie=b.updateQueue;if(ie!==null){ie=ie.shared;var ue=ie.pending;ue===null?H.next=H:(H.next=ue.next,ue.next=H),ie.pending=H}}b.lanes|=c,H=b.alternate,H!==null&&(H.lanes|=c),Ou(b.return,c,o),D.lanes|=c;break}H=H.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,D=E.alternate,D!==null&&(D.lanes|=c),Ou(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,Oi(o,c),x=rr(x),h=h(x),o.flags|=1,jn(r,o,h,c),o.child;case 14:return h=o.type,x=xr(h,o.pendingProps),x=xr(h.type,x),Qm(r,o,h,x,c);case 15:return Jm(r,o,o.type,o.pendingProps,c);case 17:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),yl(r,o),o.tag=1,Ln(h)?(r=!0,el(o)):r=!1,Oi(o,c),Hm(o,h,x),Zu(o,h,x,c),rd(null,o,h,!0,r,c);case 19:return ag(r,o,c);case 22:return Zm(r,o,c)}throw Error(n(156,o.tag))};function Pg(r,o){return Vt(r,o)}function Wk(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 Wk(r,o,c,h)}function Sd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Kk(r){if(typeof r=="function")return Sd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===_)return 11;if(r===F)return 14}return 2}function Ao(r,o){var c=r.alternate;return c===null?(c=ar(r.tag,o,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=o,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&14680064,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,o=r.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c}function Rl(r,o,c,h,x,b){var E=2;if(h=r,typeof r=="function")Sd(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 re:return r=ar(12,c,o,x|2),r.elementType=re,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 ne:return Pl(c,x,b,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case O:E=10;break e;case J:E=9;break e;case _:E=11;break e;case F:E=14;break e;case W: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=ne,r.lanes=c,r.stateNode={isHidden:!1},r}function Nd(r,o,c){return r=ar(6,r,null,o),r.lanes=c,r}function Cd(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 Yk(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=Jc(0),this.expirationTimes=Jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jc(0),this.identifierPrefix=h,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Ed(r,o,c,h,x,b,E,D,H){return r=new Yk(r,o,c,D,H),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},Fu(b),r}function Gk(r,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:r,containerInfo:o,implementation:c}}function Ag(r){if(!r)return ko;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 im(r,c,o)}return o}function _g(r,o,c,h,x,b,E,D,H){return r=Ed(c,h,!0,r,x,b,E,D,H),r.context=Ag(null),c=r.current,h=Tn(),x=Ro(c),b=Zr(h,x),b.callback=o??null,Co(c,b,x),r.current.lanes=x,ma(r,x,h),On(r,h),r}function Al(r,o,c,h){var x=o.current,b=Tn(),E=Ro(x);return c=Ag(c),o.context===null?o.context=c:o.pendingContext=c,o=Zr(b,E),o.payload={element:r},h=h===void 0?null:h,h!==null&&(o.callback=h),r=Co(x,o,E),r!==null&&(wr(r,x,E,b),ll(r,x,E)),E}function _l(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function Ig(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<o?c:o}}function jd(r,o){Ig(r,o),(r=r.alternate)&&Ig(r,o)}function qk(){return null}var Lg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Td(r){this._internalRoot=r}Il.prototype.render=Td.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));Al(r,o,null,null)},Il.prototype.unmount=Td.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[Gr]=null}};function Il(r){this._internalRoot=r}Il.prototype.unstable_scheduleHydration=function(r){if(r){var o=xh();r={blockedOn:null,target:r,priority:o};for(var c=0;c<xo.length&&o!==0&&o<xo[c].priority;c++);xo.splice(c,0,r),c===0&&wh(r)}};function Rd(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 Dg(){}function Xk(r,o,c,h,x){if(x){if(typeof h=="function"){var b=h;h=function(){var ie=_l(E);b.call(ie)}}var E=_g(o,h,r,0,null,!1,!1,"",Dg);return r._reactRootContainer=E,r[Gr]=E.current,Ra(r.nodeType===8?r.parentNode:r),si(),E}for(;x=r.lastChild;)r.removeChild(x);if(typeof h=="function"){var D=h;h=function(){var ie=_l(H);D.call(ie)}}var H=Ed(r,0,!1,null,null,!1,!1,"",Dg);return r._reactRootContainer=H,r[Gr]=H.current,Ra(r.nodeType===8?r.parentNode:r),si(function(){Al(o,H,c,h)}),H}function Dl(r,o,c,h,x){var b=c._reactRootContainer;if(b){var E=b;if(typeof x=="function"){var D=x;x=function(){var H=_l(E);D.call(H)}}Al(o,E,r,x)}else E=Xk(c,o,r,x,h);return _l(E)}mh=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var c=Jo(o.pendingLanes);c!==0&&(Zc(o,c|1),On(o,ct()),(it&6)===0&&(Ui=ct()+500,So()))}break;case 13:si(function(){var h=Jr(r,1);if(h!==null){var x=Tn();wr(h,r,1,x)}}),jd(r,1)}},eu=function(r){if(r.tag===13){var o=Jr(r,134217728);if(o!==null){var c=Tn();wr(o,r,134217728,c)}jd(r,134217728)}},gh=function(r){if(r.tag===13){var o=Ro(r),c=Jr(r,o);if(c!==null){var h=Tn();wr(c,r,o,h)}jd(r,o)}},xh=function(){return ut},yh=function(r,o){var c=ut;try{return ut=r,o()}finally{ut=c}},jr=function(r,o,c){switch(o){case"input":if(Et(r,c),o=c.name,c.type==="radio"&&o!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==r&&h.form===r.form){var x=Js(h);if(!x)throw Error(n(90));Fe(h),Et(h,x)}}}break;case"textarea":Zt(r,c);break;case"select":o=c.value,o!=null&&An(r,!!c.multiple,o,!1)}},$t=wd,Ht=si;var Qk={usingClientEntryPoint:!1,Events:[_a,Ri,Js,Ye,It,wd]},Ka={findFiberByHostInstance:Zo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Jk={bundleType:Ka.bundleType,version:Ka.version,rendererPackageName:Ka.rendererPackageName,rendererConfig:Ka.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=tt(r),r===null?null:r.stateNode},findFiberByHostInstance:Ka.findFiberByHostInstance||qk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ml.isDisabled&&Ml.supportsFiber)try{Wr=Ml.inject(Jk),En=Ml}catch{}}return zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qk,zn.createPortal=function(r,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rd(o))throw Error(n(200));return Gk(r,o,null,c)},zn.createRoot=function(r,o){if(!Rd(r))throw Error(n(299));var c=!1,h="",x=Lg;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=Ed(r,1,!1,null,null,c,!1,h,x),r[Gr]=o.current,Ra(r.nodeType===8?r.parentNode:r),new Td(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(!Rd(r))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,x=!1,b="",E=Lg;if(c!=null&&(c.unstable_strictMode===!0&&(x=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(E=c.onRecoverableError)),o=_g(o,null,r,1,c??null,x,!1,b,E),r[Gr]=o.current,Ra(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[Gr]=null})}),!0):!1},zn.unstable_batchedUpdates=wd,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 Hg;function Xx(){if(Hg)return _d.exports;Hg=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(),_d.exports=aS(),_d.exports}var Vg;function sS(){if(Vg)return Ol;Vg=1;var e=Xx();return Ol.createRoot=e.createRoot,Ol.hydrateRoot=e.hydrateRoot,Ol}var lS=sS(),k=op();const ye=Tc(k),Qx=eS({__proto__:null,default:ye},[k]);var Jx=e=>{throw TypeError(e)},cS=(e,t,n)=>t.has(e)||Jx("Cannot "+n),Dd=(e,t,n)=>(cS(e,t,"read from private field"),n?n.call(e):t.get(e)),uS=(e,t,n)=>t.has(e)?Jx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Wg="popstate";function dS(e={}){function t(i,a){let{pathname:s,search:l,hash:d}=i.location;return fs("",{pathname:s,search:l,hash:d},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(i,a){return typeof a=="string"?a:Br(a)}return pS(t,n,null,e)}function Ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Jt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fS(){return Math.random().toString(36).substring(2,10)}function Kg(e,t){return{usr:e.state,key:e.key,idx:t}}function fs(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ho(t):t,state:n,key:t&&t.key||i||fS()}}function Br({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ho(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 pS(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=fs(w.location,N,C);p=g()+1;let T=Kg(j,p),$=w.createHref(j);try{l.pushState(T,"",$)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign($)}s&&f&&f({action:d,location:w.location,delta:1})}function y(N,C){d="REPLACE";let j=fs(w.location,N,C);p=g();let T=Kg(j,p),$=w.createHref(j);l.replaceState(T,"",$),s&&f&&f({action:d,location:w.location,delta:0})}function S(N){return Zx(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(Wg,m),f=N,()=>{a.removeEventListener(Wg,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 Zx(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ze(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Br(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}var os,Yg=class{constructor(e){if(uS(this,os,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Dd(this,os).has(e))return Dd(this,os).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Dd(this,os).set(e,t)}};os=new WeakMap;var hS=new Set(["lazy","caseSensitive","path","id","index","children"]);function mS(e){return hS.has(e)}var gS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function xS(e){return gS.has(e)}function yS(e){return e.index===!0}function ps(e,t,n=[],i={},a=!1){return e.map((s,l)=>{let d=[...n,String(l)],f=typeof s.id=="string"?s.id:d.join("-");if(Ze(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ze(a||!i[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),yS(s)){let p={...s,id:f};return i[f]=Gg(p,t(p)),p}else{let p={...s,id:f,children:void 0};return i[f]=Gg(p,t(p)),s.children&&(p.children=ps(s.children,t,d,i,a)),p}})}function Gg(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Mo(e,t,n="/"){return is(e,t,n,!1)}function is(e,t,n,i){let a=typeof t=="string"?Ho(t):t,s=ur(a.pathname||"/",n);if(s==null)return null;let l=ey(e);wS(l);let d=null;for(let f=0;d==null&&f<l.length;++f){let p=AS(s);d=RS(l[f],p,i)}return d}function vS(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 ey(e,t=[],n=[],i="",a=!1){let s=(l,d,f=a,p)=>{let g={relativePath:p===void 0?l.path||"":p,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&f)return;Ze(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let m=zr([i,g.relativePath]),v=n.concat(g);l.children&&l.children.length>0&&(Ze(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),ey(l.children,t,v,m,f)),!(l.path==null&&!l.index)&&t.push({path:m,score:jS(m,l.index),routesMeta:v})};return e.forEach((l,d)=>{if(l.path===""||!l.path?.includes("?"))s(l,d);else for(let f of ty(l.path))s(l,d,!0,f)}),t}function ty(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=ty(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 wS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:TS(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var bS=/^:[\w-]+$/,kS=3,SS=2,NS=1,CS=10,ES=-2,qg=e=>e==="*";function jS(e,t){let n=e.split("/"),i=n.length;return n.some(qg)&&(i+=ES),t&&(i+=SS),n.filter(a=>!qg(a)).reduce((a,s)=>a+(bS.test(s)?kS:s===""?NS:CS),i)}function TS(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 RS(e,t,n=!1){let{routesMeta:i}=e,a={},s="/",l=[];for(let d=0;d<i.length;++d){let f=i[d],p=d===i.length-1,g=s==="/"?t:t.slice(s.length)||"/",m=dc({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},g),v=f.route;if(!m&&p&&n&&!i[i.length-1].route.index&&(m=dc({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!m)return null;Object.assign(a,m.params),l.push({params:a,pathname:zr([s,m.pathname]),pathnameBase:LS(zr([s,m.pathnameBase])),route:v}),m.pathnameBase!=="/"&&(s=zr([s,m.pathnameBase]))}return l}function dc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=PS(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 PS(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 AS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Jt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ur(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}function _S({basename:e,pathname:t}){return t==="/"?e:zr([e,t])}var ny=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ip=e=>ny.test(e);function IS(e,t="/"){let{pathname:n,search:i="",hash:a=""}=typeof e=="string"?Ho(e):e,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=Xg(n.substring(1),"/"):s=Xg(n,t)):s=t,{pathname:s,search:DS(i),hash:MS(a)}}function Xg(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 Md(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 ry(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ap(e){let t=ry(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function sp(e,t,n,i=!1){let a;typeof e=="string"?a=Ho(e):(a={...e},Ze(!a.pathname||!a.pathname.includes("?"),Md("?","pathname","search",a)),Ze(!a.pathname||!a.pathname.includes("#"),Md("#","pathname","hash",a)),Ze(!a.search||!a.search.includes("#"),Md("#","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=IS(a,d),p=l&&l!=="/"&&l.endsWith("/"),g=(s||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||g)&&(f.pathname+="/"),f}var zr=e=>e.join("/").replace(/\/\/+/g,"/"),LS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),DS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Ss=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function hs(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ns(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var oy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iy(e,t){let n=e;if(typeof n!="string"||!ny.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,a=!1;if(oy)try{let s=new URL(window.location.href),l=n.startsWith("//")?new URL(s.protocol+n):new URL(n),d=ur(l.pathname,t);l.origin===s.origin&&d!=null?n=d+l.search+l.hash:a=!0}catch{Jt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:a,to:n}}var zo=Symbol("Uninstrumented");function OS(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=Ji(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=Ji(d,l,()=>{});f&&(i.lazy=Object.assign(i.lazy||{},{[s]:f}))}})}return["loader","action"].forEach(a=>{let s=t[a];if(typeof s=="function"&&n[a].length>0){let l=s[zo]??s,d=Ji(n[a],l,(...f)=>Qg(f[0]));d&&(a==="loader"&&l.hydrate===!0&&(d.hydrate=!0),d[zo]=l,i[a]=d)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(i.middleware=t.middleware.map(a=>{let s=a[zo]??a,l=Ji(n.middleware,s,(...d)=>Qg(d[0]));return l?(l[zo]=s,l):a})),i}function zS(e,t){let n={navigate:[],fetch:[]};if(t.forEach(i=>i({instrument(a){let s=Object.keys(a);for(let l of s)a[l]&&n[l].push(a[l])}})),n.navigate.length>0){let i=e.navigate[zo]??e.navigate,a=Ji(n.navigate,i,(...s)=>{let[l,d]=s;return{to:typeof l=="number"||typeof l=="string"?l:l?Br(l):".",...Jg(e,d??{})}});a&&(a[zo]=i,e.navigate=a)}if(n.fetch.length>0){let i=e.fetch[zo]??e.fetch,a=Ji(n.fetch,i,(...s)=>{let[l,,d,f]=s;return{href:d??".",fetcherKey:l,...Jg(e,f??{})}});a&&(a[zo]=i,e.fetch=a)}return e}function Ji(e,t,n){return e.length===0?null:async(...i)=>{let a=await ay(e,n(...i),()=>t(...i),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function ay(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=ay(e,t,n,i-1),s=await l,Ze(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await a(d,t)}catch(f){console.error("An instrumentation function threw an error:",f)}l||await d(),await l}else try{s={type:"success",value:await n()}}catch(l){s={type:"error",value:l}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Qg(e){let{request:t,context:n,params:i,unstable_pattern:a}=e;return{request:FS(t),params:{...i},unstable_pattern:a,context:$S(n)}}function Jg(e,t){return{currentUrl:Br(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function FS(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function $S(e){if(US(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var BS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function US(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")===BS}var sy=["POST","PUT","PATCH","DELETE"],HS=new Set(sy),VS=["GET",...sy],WS=new Set(VS),ly=new Set([301,302,303,307,308]),KS=new Set([307,308]),Od={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},YS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ga={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},GS=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),cy="remix-router-transitions",uy=Symbol("ResetLoaderData");function qS(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Ze(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=e.hydrationRouteProperties||[],a=e.mapRouteProperties||GS,s=a;if(e.unstable_instrumentations){let z=e.unstable_instrumentations;s=Y=>({...a(Y),...OS(z.map(te=>te.route).filter(Boolean),Y)})}let l={},d=ps(e.routes,s,void 0,l),f,p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let g=e.dataStrategy||eN,m={...e.future},v=null,y=new Set,S=null,w=null,N=null,C=e.hydrationData!=null,j=Mo(d,e.history.location,p),T=!1,$=null,V;if(j==null&&!e.patchRoutesOnNavigation){let z=sr(404,{pathname:e.history.location.pathname}),{matches:Y,route:te}=zl(d);V=!0,j=Y,$={[te.id]:z}}else if(j&&!e.hydrationData&&Ht(j,d,e.history.location.pathname).active&&(j=null),j)if(j.some(z=>z.route.lazy))V=!1;else if(!j.some(z=>lp(z.route)))V=!0;else{let z=e.hydrationData?e.hydrationData.loaderData:null,Y=e.hydrationData?e.hydrationData.errors:null;if(Y){let te=j.findIndex(le=>Y[le.route.id]!==void 0);V=j.slice(0,te+1).every(le=>!wf(le.route,z,Y))}else V=j.every(te=>!wf(te.route,z,Y))}else{V=!1,j=[];let z=Ht(null,d,e.history.location.pathname);z.active&&z.matches&&(T=!0,j=z.matches)}let L,A={historyAction:e.history.action,location:e.history.location,matches:j,initialized:V,navigation:Od,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||$,fetchers:new Map,blockers:new Map},U="POP",re=null,O=!1,J,_=!1,oe=new Map,G=null,F=!1,W=!1,ne=new Set,I=new Map,ee=0,R=-1,M=new Map,X=new Set,P=new Map,se=new Map,ve=new Set,de=new Map,q,pe=null;function we(){if(v=e.history.listen(({action:z,location:Y,delta:te})=>{if(q){q(),q=void 0;return}Jt(de.size===0||te!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let le=hr({currentLocation:A.location,nextLocation:Y,historyAction:z});if(le&&te!=null){let xe=new Promise(_e=>{q=_e});e.history.go(te*-1),jr(le,{state:"blocked",location:Y,proceed(){jr(le,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),xe.then(()=>e.history.go(te))},reset(){let _e=new Map(A.blockers);_e.set(le,Ga),Fe({blockers:_e})}}),re?.resolve(),re=null;return}return zt(z,Y)}),n){yN(t,oe);let z=()=>vN(t,oe);t.addEventListener("pagehide",z),G=()=>t.removeEventListener("pagehide",z)}return A.initialized||zt("POP",A.location,{initialHydration:!0}),L}function be(){v&&v(),G&&G(),y.clear(),J&&J.abort(),A.fetchers.forEach((z,Y)=>At(Y)),A.blockers.forEach((z,Y)=>Cn(Y))}function Me(z){return y.add(z),()=>y.delete(z)}function Fe(z,Y={}){z.matches&&(z.matches=z.matches.map(xe=>{let _e=l[xe.route.id],Se=xe.route;return Se.element!==_e.element||Se.errorElement!==_e.errorElement||Se.hydrateFallbackElement!==_e.hydrateFallbackElement?{...xe,route:_e}:xe})),A={...A,...z};let te=[],le=[];A.fetchers.forEach((xe,_e)=>{xe.state==="idle"&&(ve.has(_e)?te.push(_e):le.push(_e))}),ve.forEach(xe=>{!A.fetchers.has(xe)&&!I.has(xe)&&te.push(xe)}),[...y].forEach(xe=>xe(A,{deletedFetchers:te,newErrors:z.errors??null,viewTransitionOpts:Y.viewTransitionOpts,flushSync:Y.flushSync===!0})),te.forEach(xe=>At(xe)),le.forEach(xe=>A.fetchers.delete(xe))}function st(z,Y,{flushSync:te}={}){let le=A.actionData!=null&&A.navigation.formMethod!=null&&yn(A.navigation.formMethod)&&A.navigation.state==="loading"&&z.state?._isRedirect!==!0,xe;Y.actionData?Object.keys(Y.actionData).length>0?xe=Y.actionData:xe=null:le?xe=A.actionData:xe=null;let _e=Y.loaderData?l0(A.loaderData,Y.loaderData,Y.matches||[],Y.errors):A.loaderData,Se=A.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((Ve,De)=>Se.set(De,Ga)));let Pe=F?!1:$t(z,Y.matches||A.matches),Le=O===!0||A.navigation.formMethod!=null&&yn(A.navigation.formMethod)&&z.state?._isRedirect!==!0;f&&(d=f,f=void 0),F||U==="POP"||(U==="PUSH"?e.history.push(z,z.state):U==="REPLACE"&&e.history.replace(z,z.state));let Ae;if(U==="POP"){let Ve=oe.get(A.location.pathname);Ve&&Ve.has(z.pathname)?Ae={currentLocation:A.location,nextLocation:z}:oe.has(z.pathname)&&(Ae={currentLocation:z,nextLocation:A.location})}else if(_){let Ve=oe.get(A.location.pathname);Ve?Ve.add(z.pathname):(Ve=new Set([z.pathname]),oe.set(A.location.pathname,Ve)),Ae={currentLocation:A.location,nextLocation:z}}Fe({...Y,actionData:xe,loaderData:_e,historyAction:U,location:z,initialized:!0,navigation:Od,revalidation:"idle",restoreScrollPosition:Pe,preventScrollReset:Le,blockers:Se},{viewTransitionOpts:Ae,flushSync:te===!0}),U="POP",O=!1,_=!1,F=!1,W=!1,re?.resolve(),re=null,pe?.resolve(),pe=null}async function Ot(z,Y){if(re?.resolve(),re=null,typeof z=="number"){re||(re=f0());let tt=re.promise;return e.history.go(z),tt}let te=vf(A.location,A.matches,p,z,Y?.fromRouteId,Y?.relative),{path:le,submission:xe,error:_e}=Zg(!1,te,Y),Se=A.location,Pe=fs(A.location,le,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||xe!=null&&yn(xe.formMethod)&&xe.formAction===A.location.pathname+A.location.search&&(Ae="REPLACE");let Ve=Y&&"preventScrollReset"in Y?Y.preventScrollReset===!0:void 0,De=(Y&&Y.flushSync)===!0,rt=hr({currentLocation:Se,nextLocation:Pe,historyAction:Ae});if(rt){jr(rt,{state:"blocked",location:Pe,proceed(){jr(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:Pe}),Ot(z,Y)},reset(){let tt=new Map(A.blockers);tt.set(rt,Ga),Fe({blockers:tt})}});return}await zt(Ae,Pe,{submission:xe,pendingError:_e,preventScrollReset:Ve,replace:Y&&Y.replace,enableViewTransition:Y&&Y.viewTransition,flushSync:De,callSiteDefaultShouldRevalidate:Y&&Y.unstable_defaultShouldRevalidate})}function kn(){pe||(pe=f0()),ae(),Fe({revalidation:"loading"});let z=pe.promise;return A.navigation.state==="submitting"?z:A.navigation.state==="idle"?(zt(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),z):(zt(U||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:_===!0}),z)}async function zt(z,Y,te){J&&J.abort(),J=null,U=z,F=(te&&te.startUninterruptedRevalidation)===!0,It(A.location,A.matches),O=(te&&te.preventScrollReset)===!0,_=(te&&te.enableViewTransition)===!0;let le=f||d,xe=te&&te.overrideNavigation,_e=te?.initialHydration&&A.matches&&A.matches.length>0&&!T?A.matches:Mo(le,Y,p),Se=(te&&te.flushSync)===!0;if(_e&&A.initialized&&!W&&lN(A.location,Y)&&!(te&&te.submission&&yn(te.submission.formMethod))){st(Y,{matches:_e},{flushSync:Se});return}let Pe=Ht(_e,le,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:Se});return}J=new AbortController;let Le=Xi(e.history,Y,J.signal,te&&te.submission),Ae=e.getContext?await e.getContext():new Yg,Ve;if(te&&te.pendingError)Ve=[Oo(_e).route.id,{type:"error",error:te.pendingError}];else if(te&&te.submission&&yn(te.submission.formMethod)){let Vt=await Et(Le,Y,te.submission,_e,Ae,Pe.active,te&&te.initialHydration===!0,{replace:te.replace,flushSync:Se});if(Vt.shortCircuited)return;if(Vt.pendingActionResult){let[an,lt]=Vt.pendingActionResult;if(Xn(lt)&&hs(lt.error)&<.error.status===404){J=null,st(Y,{matches:Vt.matches,loaderData:{},errors:{[an]:lt.error}});return}}_e=Vt.matches||_e,Ve=Vt.pendingActionResult,xe=zd(Y,te.submission),Se=!1,Pe.active=!1,Le=Xi(e.history,Le.url,Le.signal)}let{shortCircuited:De,matches:rt,loaderData:tt,errors:Gt}=await pr(Le,Y,_e,Ae,Pe.active,xe,te&&te.submission,te&&te.fetcherSubmission,te&&te.replace,te&&te.initialHydration===!0,Se,Ve,te&&te.callSiteDefaultShouldRevalidate);De||(J=null,st(Y,{matches:rt||_e,...c0(Ve),loaderData:tt,errors:Gt}))}async function Et(z,Y,te,le,xe,_e,Se,Pe={}){ae();let Le=gN(Y,te);if(Fe({navigation:Le},{flushSync:Pe.flushSync===!0}),_e){let De=await Hn(le,Y.pathname,z.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=Oo(De.partialMatches).route.id;return{matches:De.partialMatches,pendingActionResult:[rt,{type:"error",error:De.error}]}}else if(De.matches)le=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,Ve=rc(le,Y);if(!Ve.route.action&&!Ve.route.lazy)Ae={type:"error",error:sr(405,{method:z.method,pathname:Y.pathname,routeId:Ve.route.id})};else{let De=Zi(s,l,z,le,Ve,Se?[]:i,xe),rt=await jt(z,De,xe,null);if(Ae=rt[Ve.route.id],!Ae){for(let tt of le)if(rt[tt.route.id]){Ae=rt[tt.route.id];break}}if(z.signal.aborted)return{shortCircuited:!0}}if(hi(Ae)){let De;return Pe&&Pe.replace!=null?De=Pe.replace:De=i0(Ae.response.headers.get("Location"),new URL(z.url),p,e.history)===A.location.pathname+A.location.search,await Zt(z,Ae,!0,{submission:te,replace:De}),{shortCircuited:!0}}if(Xn(Ae)){let De=Oo(le,Ve.route.id);return(Pe&&Pe.replace)!==!0&&(U="PUSH"),{matches:le,pendingActionResult:[De.route.id,Ae,Ve.route.id]}}return{matches:le,pendingActionResult:[Ve.route.id,Ae]}}async function pr(z,Y,te,le,xe,_e,Se,Pe,Le,Ae,Ve,De,rt){let tt=_e||zd(Y,Se),Gt=Se||Pe||d0(tt),Vt=!F&&!Ae;if(xe){if(Vt){let gt=Ut(De);Fe({navigation:tt,...gt!==void 0?{actionData:gt}:{}},{flushSync:Ve})}let nt=await Hn(te,Y.pathname,z.signal);if(nt.type==="aborted")return{shortCircuited:!0};if(nt.type==="error"){if(nt.partialMatches.length===0){let{matches:po,route:Kr}=zl(d);return{matches:po,loaderData:{},errors:{[Kr.id]:nt.error}}}let gt=Oo(nt.partialMatches).route.id;return{matches:nt.partialMatches,loaderData:{},errors:{[gt]:nt.error}}}else if(nt.matches)te=nt.matches;else{let{error:gt,notFoundMatches:po,route:Kr}=Un(Y.pathname);return{matches:po,loaderData:{},errors:{[Kr.id]:gt}}}}let an=f||d,{dsMatches:lt,revalidatingFetchers:_n}=e0(z,le,s,l,e.history,A,te,Gt,Y,Ae?[]:i,Ae===!0,W,ne,ve,P,X,an,p,e.patchRoutesOnNavigation!=null,De,rt);if(R=++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:te,loaderData:{},errors:De&&Xn(De[1])?{[De[0]]:De[1].error}:null,...c0(De),...nt?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Ve}),{shortCircuited:!0}}if(Vt){let nt={};if(!xe){nt.navigation=tt;let gt=Ut(De);gt!==void 0&&(nt.actionData=gt)}_n.length>0&&(nt.fetchers=Pn(_n)),Fe(nt,{flushSync:Ve})}_n.forEach(nt=>{Ft(nt.key),nt.controller&&I.set(nt.key,nt.controller)});let ct=()=>_n.forEach(nt=>Ft(nt.key));J&&J.signal.addEventListener("abort",ct);let{loaderResults:qo,fetcherResults:er}=await B(lt,_n,z,le);if(z.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",ct),_n.forEach(nt=>I.delete(nt.key));let Vn=Fl(qo);if(Vn)return await Zt(z,Vn.result,!0,{replace:Le}),{shortCircuited:!0};if(Vn=Fl(er),Vn)return X.add(Vn.key),await Zt(z,Vn.result,!0,{replace:Le}),{shortCircuited:!0};let{loaderData:fo,errors:Xo}=s0(A,te,qo,De,_n,er);Ae&&A.errors&&(Xo={...A.errors,...Xo});let Rr=_t(),Wr=Nn(R),En=Rr||Wr||_n.length>0;return{matches:te,loaderData:fo,errors:Xo,...En?{fetchers:new Map(A.fetchers)}:{}}}function Ut(z){if(z&&!Xn(z[1]))return{[z[0]]:z[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Pn(z){return z.forEach(Y=>{let te=A.fetchers.get(Y.key),le=qa(void 0,te?te.data:void 0);A.fetchers.set(Y.key,le)}),new Map(A.fetchers)}async function An(z,Y,te,le){Ft(z);let xe=(le&&le.flushSync)===!0,_e=f||d,Se=vf(A.location,A.matches,p,te,Y,le?.relative),Pe=Mo(_e,Se,p),Le=Ht(Pe,_e,Se);if(Le.active&&Le.matches&&(Pe=Le.matches),!Pe){Re(z,Y,sr(404,{pathname:Se}),{flushSync:xe});return}let{path:Ae,submission:Ve,error:De}=Zg(!0,Se,le);if(De){Re(z,Y,De,{flushSync:xe});return}let rt=e.getContext?await e.getContext():new Yg,tt=(le&&le.preventScrollReset)===!0;if(Ve&&yn(Ve.formMethod)){await Pt(z,Y,Ae,Pe,rt,Le.active,xe,tt,Ve,le&&le.unstable_defaultShouldRevalidate);return}P.set(z,{routeId:Y,path:Ae}),await on(z,Y,Ae,Pe,rt,Le.active,xe,tt,Ve)}async function Pt(z,Y,te,le,xe,_e,Se,Pe,Le,Ae){ae(),P.delete(z);let Ve=A.fetchers.get(z);fe(z,xN(Le,Ve),{flushSync:Se});let De=new AbortController,rt=Xi(e.history,te,De.signal,Le);if(_e){let Tt=await Hn(le,new URL(rt.url).pathname,rt.signal,z);if(Tt.type==="aborted")return;if(Tt.type==="error"){Re(z,Y,Tt.error,{flushSync:Se});return}else if(Tt.matches)le=Tt.matches;else{Re(z,Y,sr(404,{pathname:te}),{flushSync:Se});return}}let tt=rc(le,te);if(!tt.route.action&&!tt.route.lazy){let Tt=sr(405,{method:Le.formMethod,pathname:te,routeId:Y});Re(z,Y,Tt,{flushSync:Se});return}I.set(z,De);let Gt=ee,Vt=Zi(s,l,rt,le,tt,i,xe),an=await jt(rt,Vt,xe,z),lt=an[tt.route.id];if(!lt){for(let Tt of Vt)if(an[Tt.route.id]){lt=an[Tt.route.id];break}}if(rt.signal.aborted){I.get(z)===De&&I.delete(z);return}if(ve.has(z)){if(hi(lt)||Xn(lt)){fe(z,ro(void 0));return}}else{if(hi(lt))if(I.delete(z),R>Gt){fe(z,ro(void 0));return}else return X.add(z),fe(z,qa(Le)),Zt(rt,lt,!1,{fetcherSubmission:Le,preventScrollReset:Pe});if(Xn(lt)){Re(z,Y,lt.error);return}}let _n=A.navigation.location||A.location,ct=Xi(e.history,_n,De.signal),qo=f||d,er=A.navigation.state!=="idle"?Mo(qo,A.navigation.location,p):A.matches;Ze(er,"Didn't find any matches after fetcher action");let Vn=++ee;M.set(z,Vn);let fo=qa(Le,lt.data);A.fetchers.set(z,fo);let{dsMatches:Xo,revalidatingFetchers:Rr}=e0(ct,xe,s,l,e.history,A,er,Le,_n,i,!1,W,ne,ve,P,X,qo,p,e.patchRoutesOnNavigation!=null,[tt.route.id,lt],Ae);Rr.filter(Tt=>Tt.key!==z).forEach(Tt=>{let Yr=Tt.key,Qo=A.fetchers.get(Yr),Jo=qa(void 0,Qo?Qo.data:void 0);A.fetchers.set(Yr,Jo),Ft(Yr),Tt.controller&&I.set(Yr,Tt.controller)}),Fe({fetchers:new Map(A.fetchers)});let Wr=()=>Rr.forEach(Tt=>Ft(Tt.key));De.signal.addEventListener("abort",Wr);let{loaderResults:En,fetcherResults:nt}=await B(Xo,Rr,ct,xe);if(De.signal.aborted)return;if(De.signal.removeEventListener("abort",Wr),M.delete(z),I.delete(z),Rr.forEach(Tt=>I.delete(Tt.key)),A.fetchers.has(z)){let Tt=ro(lt.data);A.fetchers.set(z,Tt)}let gt=Fl(En);if(gt)return Zt(ct,gt.result,!1,{preventScrollReset:Pe});if(gt=Fl(nt),gt)return X.add(gt.key),Zt(ct,gt.result,!1,{preventScrollReset:Pe});let{loaderData:po,errors:Kr}=s0(A,er,En,void 0,Rr,nt);Nn(Vn),A.navigation.state==="loading"&&Vn>R?(Ze(U,"Expected pending action"),J&&J.abort(),st(A.navigation.location,{matches:er,loaderData:po,errors:Kr,fetchers:new Map(A.fetchers)})):(Fe({errors:Kr,loaderData:l0(A.loaderData,po,er,Kr),fetchers:new Map(A.fetchers)}),W=!1)}async function on(z,Y,te,le,xe,_e,Se,Pe,Le){let Ae=A.fetchers.get(z);fe(z,qa(Le,Ae?Ae.data:void 0),{flushSync:Se});let Ve=new AbortController,De=Xi(e.history,te,Ve.signal);if(_e){let lt=await Hn(le,new URL(De.url).pathname,De.signal,z);if(lt.type==="aborted")return;if(lt.type==="error"){Re(z,Y,lt.error,{flushSync:Se});return}else if(lt.matches)le=lt.matches;else{Re(z,Y,sr(404,{pathname:te}),{flushSync:Se});return}}let rt=rc(le,te);I.set(z,Ve);let tt=ee,Gt=Zi(s,l,De,le,rt,i,xe),an=(await jt(De,Gt,xe,z))[rt.route.id];if(I.get(z)===Ve&&I.delete(z),!De.signal.aborted){if(ve.has(z)){fe(z,ro(void 0));return}if(hi(an))if(R>tt){fe(z,ro(void 0));return}else{X.add(z),await Zt(De,an,!1,{preventScrollReset:Pe});return}if(Xn(an)){Re(z,Y,an.error);return}fe(z,ro(an.data))}}async function Zt(z,Y,te,{submission:le,fetcherSubmission:xe,preventScrollReset:_e,replace:Se}={}){te||(re?.resolve(),re=null),Y.response.headers.has("X-Remix-Revalidate")&&(W=!0);let Pe=Y.response.headers.get("Location");Ze(Pe,"Expected a Location header on the redirect Response"),Pe=i0(Pe,new URL(z.url),p,e.history);let Le=fs(A.location,Pe,{_isRedirect:!0});if(n){let Gt=!1;if(Y.response.headers.has("X-Remix-Reload-Document"))Gt=!0;else if(ip(Pe)){const Vt=Zx(Pe,!0);Gt=Vt.origin!==t.location.origin||ur(Vt.pathname,p)==null}if(Gt){Se?t.location.replace(Pe):t.location.assign(Pe);return}}J=null;let Ae=Se===!0||Y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ve,formAction:De,formEncType:rt}=A.navigation;!le&&!xe&&Ve&&De&&rt&&(le=d0(A.navigation));let tt=le||xe;if(KS.has(Y.response.status)&&tt&&yn(tt.formMethod))await zt(Ae,Le,{submission:{...tt,formAction:Pe},preventScrollReset:_e||O,enableViewTransition:te?_:void 0});else{let Gt=zd(Le,le);await zt(Ae,Le,{overrideNavigation:Gt,fetcherSubmission:xe,preventScrollReset:_e||O,enableViewTransition:te?_:void 0})}}async function jt(z,Y,te,le){let xe,_e={};try{xe=await nN(g,z,Y,le,te,!1)}catch(Se){return Y.filter(Pe=>Pe.shouldLoad).forEach(Pe=>{_e[Pe.route.id]={type:"error",error:Se}}),_e}if(z.signal.aborted)return _e;if(!yn(z.method))for(let Se of Y){if(xe[Se.route.id]?.type==="error")break;!xe.hasOwnProperty(Se.route.id)&&!A.loaderData.hasOwnProperty(Se.route.id)&&(!A.errors||!A.errors.hasOwnProperty(Se.route.id))&&Se.shouldCallHandler()&&(xe[Se.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Se.route.id}`)})}for(let[Se,Pe]of Object.entries(xe))if(fN(Pe)){let Le=Pe.result;_e[Se]={type:"redirect",response:aN(Le,z,Se,Y,p)}}else _e[Se]=await iN(Pe);return _e}async function B(z,Y,te,le){let xe=jt(te,z,le,null),_e=Promise.all(Y.map(async Le=>{if(Le.matches&&Le.match&&Le.request&&Le.controller){let Ve=(await jt(Le.request,Le.matches,le,Le.key))[Le.match.route.id];return{[Le.key]:Ve}}else return Promise.resolve({[Le.key]:{type:"error",error:sr(404,{pathname:Le.path})}})})),Se=await xe,Pe=(await _e).reduce((Le,Ae)=>Object.assign(Le,Ae),{});return{loaderResults:Se,fetcherResults:Pe}}function ae(){W=!0,P.forEach((z,Y)=>{I.has(Y)&&ne.add(Y),Ft(Y)})}function fe(z,Y,te={}){A.fetchers.set(z,Y),Fe({fetchers:new Map(A.fetchers)},{flushSync:(te&&te.flushSync)===!0})}function Re(z,Y,te,le={}){let xe=Oo(A.matches,Y);At(z),Fe({errors:{[xe.route.id]:te},fetchers:new Map(A.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function We(z){return se.set(z,(se.get(z)||0)+1),ve.has(z)&&ve.delete(z),A.fetchers.get(z)||YS}function mt(z,Y){Ft(z,Y?.reason),fe(z,ro(null))}function At(z){let Y=A.fetchers.get(z);I.has(z)&&!(Y&&Y.state==="loading"&&M.has(z))&&Ft(z),P.delete(z),M.delete(z),X.delete(z),ve.delete(z),ne.delete(z),A.fetchers.delete(z)}function Kt(z){let Y=(se.get(z)||0)-1;Y<=0?(se.delete(z),ve.add(z)):se.set(z,Y),Fe({fetchers:new Map(A.fetchers)})}function Ft(z,Y){let te=I.get(z);te&&(te.abort(Y),I.delete(z))}function Sn(z){for(let Y of z){let te=We(Y),le=ro(te.data);A.fetchers.set(Y,le)}}function _t(){let z=[],Y=!1;for(let te of X){let le=A.fetchers.get(te);Ze(le,`Expected fetcher: ${te}`),le.state==="loading"&&(X.delete(te),z.push(te),Y=!0)}return Sn(z),Y}function Nn(z){let Y=[];for(let[te,le]of M)if(le<z){let xe=A.fetchers.get(te);Ze(xe,`Expected fetcher: ${te}`),xe.state==="loading"&&(Ft(te),M.delete(te),Y.push(te))}return Sn(Y),Y.length>0}function en(z,Y){let te=A.blockers.get(z)||Ga;return de.get(z)!==Y&&de.set(z,Y),te}function Cn(z){A.blockers.delete(z),de.delete(z)}function jr(z,Y){let te=A.blockers.get(z)||Ga;Ze(te.state==="unblocked"&&Y.state==="blocked"||te.state==="blocked"&&Y.state==="blocked"||te.state==="blocked"&&Y.state==="proceeding"||te.state==="blocked"&&Y.state==="unblocked"||te.state==="proceeding"&&Y.state==="unblocked",`Invalid blocker state transition: ${te.state} -> ${Y.state}`);let le=new Map(A.blockers);le.set(z,Y),Fe({blockers:le})}function hr({currentLocation:z,nextLocation:Y,historyAction:te}){if(de.size===0)return;de.size>1&&Jt(!1,"A router only supports one blocker at a time");let le=Array.from(de.entries()),[xe,_e]=le[le.length-1],Se=A.blockers.get(xe);if(!(Se&&Se.state==="proceeding")&&_e({currentLocation:z,nextLocation:Y,historyAction:te}))return xe}function Un(z){let Y=sr(404,{pathname:z}),te=f||d,{matches:le,route:xe}=zl(te);return{notFoundMatches:le,route:xe,error:Y}}function Go(z,Y,te){if(S=z,N=Y,w=te||null,!C&&A.navigation===Od){C=!0;let le=$t(A.location,A.matches);le!=null&&Fe({restoreScrollPosition:le})}return()=>{S=null,N=null,w=null}}function Ye(z,Y){return w&&w(z,Y.map(le=>vS(le,A.loaderData)))||z.key}function It(z,Y){if(S&&N){let te=Ye(z,Y);S[te]=N()}}function $t(z,Y){if(S){let te=Ye(z,Y),le=S[te];if(typeof le=="number")return le}return null}function Ht(z,Y,te){if(e.patchRoutesOnNavigation)if(z){if(Object.keys(z[0].params).length>0)return{active:!0,matches:is(Y,te,p,!0)}}else return{active:!0,matches:is(Y,te,p,!0)||[]};return{active:!1,matches:null}}async function Hn(z,Y,te,le){if(!e.patchRoutesOnNavigation)return{type:"success",matches:z};let xe=z;for(;;){let _e=f==null,Se=f||d,Pe=l;try{await e.patchRoutesOnNavigation({signal:te,path:Y,matches:xe,fetcherKey:le,patch:(Ve,De)=>{te.aborted||t0(Ve,De,Se,Pe,s,!1)}})}catch(Ve){return{type:"error",error:Ve,partialMatches:xe}}finally{_e&&!te.aborted&&(d=[...d])}if(te.aborted)return{type:"aborted"};let Le=Mo(Se,Y,p),Ae=null;if(Le){if(Object.keys(Le[0].params).length===0)return{type:"success",matches:Le};if(Ae=is(Se,Y,p,!0),!(Ae&&xe.length<Ae.length&&Lt(xe,Ae.slice(0,xe.length))))return{type:"success",matches:Le}}if(Ae||(Ae=is(Se,Y,p,!0)),!Ae||Lt(xe,Ae))return{type:"success",matches:null};xe=Ae}}function Lt(z,Y){return z.length===Y.length&&z.every((te,le)=>te.route.id===Y[le].route.id)}function Yt(z){l={},f=ps(z,s,void 0,l)}function Tr(z,Y,te=!1){let le=f==null;t0(z,Y,f||d,l,s,te),le&&(d=[...d],Fe({}))}return L={get basename(){return p},get future(){return m},get state(){return A},get routes(){return d},get window(){return t},initialize:we,subscribe:Me,enableScrollRestoration:Go,navigate:Ot,fetch:An,revalidate:kn,createHref:z=>e.history.createHref(z),encodeLocation:z=>e.history.encodeLocation(z),getFetcher:We,resetFetcher:mt,deleteFetcher:Kt,dispose:be,getBlocker:en,deleteBlocker:Cn,patchRoutes:Tr,_internalFetchControllers:I,_internalSetRoutes:Yt,_internalSetStateDoNotUseOrYouWillBreakYourApp(z){Fe(z)}},e.unstable_instrumentations&&(L=zS(L,e.unstable_instrumentations.map(z=>z.router).filter(Boolean))),L}function XS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function vf(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=sp(i||".",ap(l),ur(e.pathname,n)||e.pathname,s==="path");if(i==null&&(f.search=e.search,f.hash=e.hash),(i==null||i===""||i===".")&&d){let p=up(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=_S({basename:n,pathname:f.pathname})),Br(f)}function Zg(e,t,n){if(!n||!XS(n))return{path:t};if(n.formMethod&&!mN(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=gy(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!yn(s))return i();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,[y,S])=>`${v}${y}=${S}
|
|
9
|
+
`,""):String(n.body);return{path:t,submission:{formMethod:s,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!yn(s))return i();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:s,formAction:l,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}Ze(typeof FormData=="function","FormData is not available in this environment");let d,f;if(n.formData)d=kf(n.formData),f=n.formData;else if(n.body instanceof FormData)d=kf(n.body),f=n.body;else if(n.body instanceof URLSearchParams)d=n.body,f=a0(d);else if(n.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(n.body),f=a0(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=Ho(t);return e&&g.search&&up(g.search)&&d.append("index",""),g.search=`?${d}`,{path:Br(g),submission:p}}function e0(e,t,n,i,a,s,l,d,f,p,g,m,v,y,S,w,N,C,j,T,$){let V=T?Xn(T[1])?T[1].error:T[1].data:void 0,L=a.createURL(s.location),A=a.createURL(f),U;if(g&&s.errors){let F=Object.keys(s.errors)[0];U=l.findIndex(W=>W.route.id===F)}else if(T&&Xn(T[1])){let F=T[0];U=l.findIndex(W=>W.route.id===F)-1}let re=T?T[1].statusCode:void 0,O=re&&re>=400,J={currentUrl:L,currentParams:s.matches[0]?.params||{},nextUrl:A,nextParams:l[0].params,...d,actionResult:V,actionStatus:re},_=Ns(l),oe=l.map((F,W)=>{let{route:ne}=F,I=null;if(U!=null&&W>U?I=!1:ne.lazy?I=!0:lp(ne)?g?I=wf(ne,s.loaderData,s.errors):QS(s.loaderData,s.matches[W],F)&&(I=!0):I=!1,I!==null)return bf(n,i,e,_,F,p,t,I);let ee=!1;typeof $=="boolean"?ee=$:O?ee=!1:(m||L.pathname+L.search===A.pathname+A.search||L.search!==A.search||JS(s.matches[W],F))&&(ee=!0);let R={...J,defaultShouldRevalidate:ee},M=ls(F,R);return bf(n,i,e,_,F,p,t,M,R,$)}),G=[];return S.forEach((F,W)=>{if(g||!l.some(se=>se.route.id===F.routeId)||y.has(W))return;let ne=s.fetchers.get(W),I=ne&&ne.state!=="idle"&&ne.data===void 0,ee=Mo(N,F.path,C);if(!ee){if(j&&I)return;G.push({key:W,routeId:F.routeId,path:F.path,matches:null,match:null,request:null,controller:null});return}if(w.has(W))return;let R=rc(ee,F.path),M=new AbortController,X=Xi(a,F.path,M.signal),P=null;if(v.has(W))v.delete(W),P=Zi(n,i,X,ee,R,p,t);else if(I)m&&(P=Zi(n,i,X,ee,R,p,t));else{let se;typeof $=="boolean"?se=$:O?se=!1:se=m;let ve={...J,defaultShouldRevalidate:se};ls(R,ve)&&(P=Zi(n,i,X,ee,R,p,t,ve))}P&&G.push({key:W,routeId:F.routeId,path:F.path,matches:P,match:R,request:X,controller:M})}),{dsMatches:oe,revalidatingFetchers:G}}function lp(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function wf(e,t,n){if(e.lazy)return!0;if(!lp(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 QS(e,t,n){let i=!t||n.route.id!==t.route.id,a=!e.hasOwnProperty(n.route.id);return i||a}function JS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ls(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function t0(e,t,n,i,a,s){let l;if(e){let p=i[e];Ze(p,`No route found to patch children into: routeId = ${e}`),p.children||(p.children=[]),l=p.children}else l=n;let d=[],f=[];if(t.forEach(p=>{let g=l.find(m=>dy(p,m));g?f.push({existingRoute:g,newRoute:p}):d.push(p)}),d.length>0){let p=ps(d,a,[e||"_","patch",String(l?.length||"0")],i);l.push(...p)}if(s&&f.length>0)for(let p=0;p<f.length;p++){let{existingRoute:g,newRoute:m}=f[p],v=g,[y]=ps([m],a,[],{},!0);Object.assign(v,{element:y.element?y.element:v.element,errorElement:y.errorElement?y.errorElement:v.errorElement,hydrateFallbackElement:y.hydrateFallbackElement?y.hydrateFallbackElement:v.hydrateFallbackElement})}}function dy(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=>dy(n,a))):!1}var n0=new WeakMap,fy=({key:e,route:t,manifest:n,mapRouteProperties:i})=>{let a=n[t.id];if(Ze(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let s=a.lazy[e];if(!s)return;let l=n0.get(a);l||(l={},n0.set(a,l));let d=l[e];if(d)return d;let f=(async()=>{let p=mS(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},r0=new WeakMap;function ZS(e,t,n,i,a){let s=n[e.id];if(Ze(s,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=r0.get(s);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let m=(async()=>{Ze(typeof e.lazy=="function","No lazy route function found");let v=await e.lazy(),y={};for(let S in v){let w=v[S];if(w===void 0)continue;let N=xS(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 r0.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=fy({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 o0(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 eN(e){return e.matches.some(t=>t.route.middleware)?py(e,()=>o0(e)):o0(e)}function py(e,t){return tN(e,t,i=>{if(hN(i))throw i;return i},uN,n);function n(i,a,s){if(s)return Promise.resolve(Object.assign(s.value,{[a]:{type:"error",result:i}}));{let{matches:l}=e,d=Math.min(Math.max(l.findIndex(p=>p.route.id===a),0),Math.max(l.findIndex(p=>p.shouldCallHandler()),0)),f=Oo(l,l[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:i}})}}}async function tN(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 hy({request:l,params:d,context:f,unstable_pattern:p},g,t,n,i,a)}async function hy(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 hy(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 my(e,t,n,i,a){let s=fy({key:"middleware",route:i.route,manifest:t,mapRouteProperties:e}),l=ZS(i.route,yn(n.method)?"action":"loader",t,e,a);return{middleware:s,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function bf(e,t,n,i,a,s,l,d,f=null,p){let g=!1,m=my(e,t,n,a,s);return{...a,_lazyPromises:m,shouldLoad:d,shouldRevalidateArgs:f,shouldCallHandler(v){return g=!0,f?typeof p=="boolean"?ls(a,{...f,defaultShouldRevalidate:p}):typeof v=="boolean"?ls(a,{...f,defaultShouldRevalidate:v}):ls(a,f):d},resolve(v){let{lazy:y,loader:S,middleware: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)?rN({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 Zi(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:my(e,t,n,f,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:bf(e,t,n,Ns(i),f,s,l,!0,d))}async function nN(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 py(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 rN({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 oN(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 iN(e){let{result:t,type:n}=e;if(cp(t)){let i;try{i=await oN(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"?u0(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:cN(t),statusCode:hs(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:hs(t)?t.status:void 0}:u0(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 aN(e,t,n,i,a){let s=e.headers.get("Location");if(Ze(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!ip(s)){let l=i.slice(0,i.findIndex(d=>d.route.id===n)+1);s=vf(new URL(t.url),l,a,s),e.headers.set("Location",s)}return e}function i0(e,t,n,i){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ip(e)){let s=e,l=s.startsWith("//")?new URL(t.protocol+s):new URL(s);if(a.includes(l.protocol))throw new Error("Invalid redirect location");let d=ur(l.pathname,n)!=null;if(l.origin===t.origin&&d)return l.pathname+l.search+l.hash}try{let s=i.createURL(e);if(a.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Xi(e,t,n,i){let a=e.createURL(gy(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=kf(i.formData):s.body=i.formData}return new Request(a,s)}function kf(e){let t=new URLSearchParams;for(let[n,i]of e.entries())t.append(n,typeof i=="string"?i:i.name);return t}function a0(e){let t=new FormData;for(let[n,i]of e.entries())t.append(n,i);return t}function sN(e,t,n,i=!1,a=!1){let s={},l=null,d,f=!1,p={},g=n&&Xn(n[1])?n[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let v=m.route.id,y=t[v];if(Ze(!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=Oo(e,v);l[w.route.id]==null&&(l[w.route.id]=S)}i||(s[v]=uy),f||(f=!0,d=hs(y.error)?y.error.status:500),y.headers&&(p[v]=y.headers)}else s[v]=y.data,y.statusCode&&y.statusCode!==200&&!f&&(d=y.statusCode),y.headers&&(p[v]=y.headers)}),g!==void 0&&n&&(l={[n[0]]:g},n[2]&&(s[n[2]]=void 0)),{loaderData:s,errors:l,statusCode:d||200,loaderHeaders:p}}function s0(e,t,n,i,a,s){let{loaderData:l,errors:d}=sN(t,n,i);return a.filter(f=>!f.matches||f.matches.some(p=>p.shouldLoad)).forEach(f=>{let{key:p,match:g,controller:m}=f;if(m&&m.signal.aborted)return;let v=s[p];if(Ze(v,"Did not find corresponding fetcher result"),Xn(v)){let y=Oo(e.matches,g?.route.id);d&&d[y.route.id]||(d={...d,[y.route.id]:v.error}),e.fetchers.delete(p)}else if(hi(v))Ze(!1,"Unhandled fetcher revalidation redirect");else{let y=ro(v.data);e.fetchers.set(p,y)}}),{loaderData:l,errors:d}}function l0(e,t,n,i){let a=Object.entries(t).filter(([,s])=>s!==uy).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 c0(e){return e?Xn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Oo(e,t){return(t?e.slice(0,e.findIndex(i=>i.route.id===t)+1):[...e]).reverse().find(i=>i.route.hasErrorBoundary===!0)||e[0]}function zl(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function sr(e,{pathname:t,routeId:n,method:i,type:a,message:s}={}){let l="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(l="Bad Request",i&&t&&n?d=`You made a ${i} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:a==="invalid-body"&&(d="Unable to encode submission body")):e===403?(l="Forbidden",d=`Route "${n}" does not match URL "${t}"`):e===404?(l="Not Found",d=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",i&&t&&n?d=`You made a ${i.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:i&&(d=`Invalid request method "${i.toUpperCase()}"`)),new Ss(e||500,l,new Error(d),!0)}function Fl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[i,a]=t[n];if(hi(a))return{key:i,result:a}}}function gy(e){let t=typeof e=="string"?Ho(e):e;return Br({...t,hash:""})}function lN(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function cN(e){return new Ss(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function uN(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&dN(n))}function dN(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function fN(e){return cp(e.result)&&ly.has(e.result.status)}function Xn(e){return e.type==="error"}function hi(e){return(e&&e.type)==="redirect"}function u0(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function cp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function pN(e){return ly.has(e)}function hN(e){return cp(e)&&pN(e.status)&&e.headers.has("Location")}function mN(e){return WS.has(e.toUpperCase())}function yn(e){return HS.has(e.toUpperCase())}function up(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function rc(e,t){let n=typeof t=="string"?Ho(t).search:t.search;if(e[e.length-1].route.index&&up(n||""))return e[e.length-1];let i=ry(e);return i[i.length-1]}function d0(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 zd(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 gN(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 qa(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 xN(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ro(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function yN(e,t){try{let n=e.sessionStorage.getItem(cy);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 vN(e,t){if(t.size>0){let n={};for(let[i,a]of t)n[i]=[...a];try{e.sessionStorage.setItem(cy,JSON.stringify(n))}catch(i){Jt(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function f0(){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 wi=k.createContext(null);wi.displayName="DataRouter";var Cs=k.createContext(null);Cs.displayName="DataRouterState";var xy=k.createContext(!1);function wN(){return k.useContext(xy)}var dp=k.createContext({isTransitioning:!1});dp.displayName="ViewTransition";var yy=k.createContext(new Map);yy.displayName="Fetchers";var bN=k.createContext(null);bN.displayName="Await";var dr=k.createContext(null);dr.displayName="Navigation";var Rc=k.createContext(null);Rc.displayName="Location";var Cr=k.createContext({outlet:null,matches:[],isDataRoute:!1});Cr.displayName="Route";var fp=k.createContext(null);fp.displayName="RouteError";var vy="REACT_ROUTER_ERROR",kN="REDIRECT",SN="ROUTE_ERROR_RESPONSE";function NN(e){if(e.startsWith(`${vy}:${kN}:{`))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 CN(e){if(e.startsWith(`${vy}:${SN}:{`))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 EN(e,{relative:t}={}){Ze(Es(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=k.useContext(dr),{hash:a,pathname:s,search:l}=js(e,{relative:t}),d=s;return n!=="/"&&(d=s==="/"?n:zr([n,s])),i.createHref({pathname:d,search:l,hash:a})}function Es(){return k.useContext(Rc)!=null}function Vo(){return Ze(Es(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Rc).location}var wy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function by(e){k.useContext(dr).static||k.useLayoutEffect(e)}function jN(){let{isDataRoute:e}=k.useContext(Cr);return e?HN():TN()}function TN(){Ze(Es(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(wi),{basename:t,navigator:n}=k.useContext(dr),{matches:i}=k.useContext(Cr),{pathname:a}=Vo(),s=JSON.stringify(ap(i)),l=k.useRef(!1);return by(()=>{l.current=!0}),k.useCallback((f,p={})=>{if(Jt(l.current,wy),!l.current)return;if(typeof f=="number"){n.go(f);return}let g=sp(f,JSON.parse(s),a,p.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:zr([t,g.pathname])),(p.replace?n.replace:n.push)(g,p.state,p)},[t,n,s,a,e])}var RN=k.createContext(null);function PN(e){let t=k.useContext(Cr).outlet;return k.useMemo(()=>t&&k.createElement(RN.Provider,{value:e},t),[t,e])}function AN(){let{matches:e}=k.useContext(Cr),t=e[e.length-1];return t?t.params:{}}function js(e,{relative:t}={}){let{matches:n}=k.useContext(Cr),{pathname:i}=Vo(),a=JSON.stringify(ap(n));return k.useMemo(()=>sp(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function _N(e,t,n,i,a){Ze(Es(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=k.useContext(dr),{matches:l}=k.useContext(Cr),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||"";Sy(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=Vo(),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=Mo(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.`),ON(N&&N.map(j=>Object.assign({},j,{params:Object.assign({},f,j.params),pathname:zr([g,s.encodeLocation?s.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?g:zr([g,s.encodeLocation?s.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),l,n,i,a)}function IN(){let e=UN(),t=hs(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=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 LN=k.createElement(IN,null),ky=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=CN(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(Cr.Provider,{value:this.props.routeContext},k.createElement(fp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(DN,{error:e},t):t}};ky.contextType=xy;var Fd=new WeakMap;function DN({children:e,error:t}){let{basename:n}=k.useContext(dr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=NN(t.digest);if(i){let a=Fd.get(t);if(a)throw a;let s=iy(i.location,n);if(oy&&!Fd.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 Fd.set(t,l),l}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function MN({routeContext:e,match:t,children:n}){let i=k.useContext(wi);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(Cr.Provider,{value:e},n)}function ON(e,t=[],n=null,i=null,a=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=n?.errors;if(l!=null){let g=s.findIndex(m=>m.route.id&&l?.[m.route.id]!==void 0);Ze(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let d=!1,f=-1;if(n)for(let g=0;g<s.length;g++){let m=s[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=g),m.route.id){let{loaderData:v,errors:y}=n,S=m.route.loader&&!v.hasOwnProperty(m.route.id)&&(!y||y[m.route.id]===void 0);if(m.route.lazy||S){d=!0,f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}let p=n&&i?(g,m)=>{i(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ns(n.matches),errorInfo:m})}:void 0;return s.reduceRight((g,m,v)=>{let y,S=!1,w=null,N=null;n&&(y=l&&m.route.id?l[m.route.id]:void 0,w=m.route.errorElement||LN,d&&(f<0&&v===0?(Sy("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 T;return y?T=w:S?T=N:m.route.Component?T=k.createElement(m.route.Component,null):m.route.element?T=m.route.element:T=g,k.createElement(MN,{match:m,routeContext:{outlet:g,matches:C,isDataRoute:n!=null},children:T})};return n&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?k.createElement(ky,{location:n.location,revalidation:n.revalidation,component:w,error:y,children:j(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:p}):j()},null)}function pp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zN(e){let t=k.useContext(wi);return Ze(t,pp(e)),t}function FN(e){let t=k.useContext(Cs);return Ze(t,pp(e)),t}function $N(e){let t=k.useContext(Cr);return Ze(t,pp(e)),t}function hp(e){let t=$N(e),n=t.matches[t.matches.length-1];return Ze(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function BN(){return hp("useRouteId")}function UN(){let e=k.useContext(fp),t=FN("useRouteError"),n=hp("useRouteError");return e!==void 0?e:t.errors?.[n]}function HN(){let{router:e}=zN("useNavigate"),t=hp("useNavigate"),n=k.useRef(!1);return by(()=>{n.current=!0}),k.useCallback(async(a,s={})=>{Jt(n.current,wy),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var p0={};function Sy(e,t,n){!t&&!p0[e]&&(p0[e]=!0,Jt(!1,n))}var h0={};function m0(e,t){!e&&!h0[t]&&(h0[t]=!0,console.warn(t))}var VN="useOptimistic",g0=Qx[VN],WN=()=>{};function KN(e){return g0?g0(e):[e,WN]}function YN(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 GN=["HydrateFallback","hydrateFallbackElement"],qN=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 XN({router:e,flushSync:t,onError:n,unstable_useTransitions:i}){i=wN()||i;let[s,l]=k.useState(e.state),[d,f]=KN(s),[p,g]=k.useState(),[m,v]=k.useState({isTransitioning:!1}),[y,S]=k.useState(),[w,N]=k.useState(),[C,j]=k.useState(),T=k.useRef(new Map),$=k.useCallback((U,{deletedFetchers:re,newErrors:O,flushSync:J,viewTransitionOpts:_})=>{O&&n&&Object.values(O).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&&T.current.set(F,G.data)}),re.forEach(G=>T.current.delete(G)),m0(J===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let oe=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(m0(_==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&&J?t(()=>l(U)):i===!1?l(U):k.startTransition(()=>{i===!0&&f(G=>x0(G,U)),l(U)});return}if(t&&J){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($),[e,$]),k.useEffect(()=>{m.isTransitioning&&!m.flushSync&&S(new qN)},[m]),k.useEffect(()=>{if(y&&p&&e.window){let U=p,re=y.promise,O=e.window.document.startViewTransition(async()=>{i===!1?l(U):k.startTransition(()=>{i===!0&&f(J=>x0(J,U)),l(U)}),await re});O.finished.finally(()=>{S(void 0),N(void 0),g(void 0),v({isTransitioning:!1})}),N(O)}},[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,re,O)=>e.navigate(U,{state:re,preventScrollReset:O?.preventScrollReset}),replace:(U,re,O)=>e.navigate(U,{replace:!0,state:re,preventScrollReset:O?.preventScrollReset})}),[e]),L=e.basename||"/",A=k.useMemo(()=>({router:e,navigator:V,static:!1,basename:L,onError:n}),[e,V,L,n]);return k.createElement(k.Fragment,null,k.createElement(wi.Provider,{value:A},k.createElement(Cs.Provider,{value:d},k.createElement(yy.Provider,{value:T.current},k.createElement(dp.Provider,{value:m},k.createElement(eC,{basename:L,location:d.location,navigationType:d.historyAction,navigator:V,unstable_useTransitions:i},k.createElement(QN,{routes:e.routes,future:e.future,state:d,onError:n})))))),null)}function x0(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 QN=k.memo(JN);function JN({routes:e,future:t,state:n,onError:i}){return _N(e,void 0,n,i,t)}function ZN(e){return PN(e.context)}function eC({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:a,static:s=!1,unstable_useTransitions:l}){Ze(!Es(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=k.useMemo(()=>({basename:d,navigator:a,static:s,unstable_useTransitions:l,future:{}}),[d,a,s,l]);typeof n=="string"&&(n=Ho(n));let{pathname:p="/",search:g="",hash:m="",state:v=null,key:y="default"}=n,S=k.useMemo(()=>{let w=ur(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(dr.Provider,{value:f},k.createElement(Rc.Provider,{children:t,value:S}))}var oc="get",ic="application/x-www-form-urlencoded";function Pc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tC(e){return Pc(e)&&e.tagName.toLowerCase()==="button"}function nC(e){return Pc(e)&&e.tagName.toLowerCase()==="form"}function rC(e){return Pc(e)&&e.tagName.toLowerCase()==="input"}function oC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iC(e,t){return e.button===0&&(!t||t==="_self")&&!oC(e)}var $l=null;function aC(){if($l===null)try{new FormData(document.createElement("form"),0),$l=!1}catch{$l=!0}return $l}var sC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $d(e){return e!=null&&!sC.has(e)?(Jt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ic}"`),null):e}function lC(e,t){let n,i,a,s,l;if(nC(e)){let d=e.getAttribute("action");i=d?ur(d,t):null,n=e.getAttribute("method")||oc,a=$d(e.getAttribute("enctype"))||ic,s=new FormData(e)}else if(tC(e)||rC(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(i=f?ur(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||oc,a=$d(e.getAttribute("formenctype"))||$d(d.getAttribute("enctype"))||ic,s=new FormData(d,e),!aC()){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(Pc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=oc,i=null,a=ic,l=e}return s&&a==="text/plain"&&(l=s,s=void 0),{action:i,method:n.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function mp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cC(e,t,n,i){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${i}`:a.pathname=`${a.pathname}.${i}`:a.pathname==="/"?a.pathname=`_root.${i}`:t&&ur(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${i}`,a}async function uC(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 dC(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 fC(e,t,n){let i=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let l=await uC(s,n);return l.links?l.links():[]}return[]}));return gC(i.flat(1).filter(dC).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function y0(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 pC(e,t,{includeHydrateFallback:n}={}){return hC(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 hC(e){return[...new Set(e)]}function mC(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function gC(e,t){let n=new Set;return new Set(t),e.reduce((i,a)=>{let s=JSON.stringify(mC(a));return n.has(s)||(n.add(s),i.push({key:s,link:a})),i},[])}function Ny(){let e=k.useContext(wi);return mp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function xC(){let e=k.useContext(Cs);return mp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var gp=k.createContext(void 0);gp.displayName="FrameworkContext";function Cy(){let e=k.useContext(gp);return mp(e,"You must render this element inside a <HydratedRouter> element"),e}function yC(e,t){let n=k.useContext(gp),[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:Xa(d,y),onBlur:Xa(f,S),onMouseEnter:Xa(p,y),onMouseLeave:Xa(g,S),onTouchStart:Xa(m,y)}]:[!1,v,{}]}function Xa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function vC({page:e,...t}){let{router:n}=Ny(),i=k.useMemo(()=>Mo(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?k.createElement(bC,{page:e,matches:i,...t}):null}function wC(e){let{manifest:t,routeModules:n}=Cy(),[i,a]=k.useState([]);return k.useEffect(()=>{let s=!1;return fC(e,t,n).then(l=>{s||a(l)}),()=>{s=!0}},[e,t,n]),i}function bC({page:e,matches:t,...n}){let i=Vo(),{future:a,manifest:s,routeModules:l}=Cy(),{basename:d}=Ny(),{loaderData:f,matches:p}=xC(),g=k.useMemo(()=>y0(e,t,p,s,i,"data"),[e,t,p,s,i]),m=k.useMemo(()=>y0(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 T=s.routes[j.route.id];!T||!T.hasLoader||(!g.some($=>$.route.id===j.route.id)&&j.route.id in f&&l[j.route.id]?.shouldRevalidate||T.hasClientLoader?N=!0:w.add(j.route.id))}),w.size===0)return[];let C=cC(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(()=>pC(m,s),[m,s]),S=wC(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 kC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var SC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{SC&&(window.__reactRouterVersion="7.13.0")}catch{}function NC(e,t){return qS({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:dS({window:t?.window}),hydrationData:CC(),routes:e,mapRouteProperties:YN,hydrationRouteProperties:GN,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function CC(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:EC(e.errors)}),e}function EC(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 Ey=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oo=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(dr),C=typeof p=="string"&&Ey.test(p),j=iy(p,w);p=j.to;let T=EN(p,{relative:a}),[$,V,L]=yC(i,y),A=PC(p,{replace:l,state:d,target:f,preventScrollReset:g,relative:a,viewTransition:m,unstable_defaultShouldRevalidate:v,unstable_useTransitions:N});function U(O){t&&t(O),O.defaultPrevented||A(O)}let re=k.createElement("a",{...y,...L,href:j.absoluteURL||T,onClick:j.isExternal||s?t:U,ref:kC(S,V),target:f,"data-discover":!C&&n==="render"?"true":void 0});return $&&!C?k.createElement(k.Fragment,null,re,k.createElement(vC,{page:T})):re});oo.displayName="Link";var jC=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=Vo(),y=k.useContext(Cs),{navigator:S,basename:w}=k.useContext(dr),N=y!=null&&DC(m)&&d===!0,C=S.encodeLocation?S.encodeLocation(m).pathname:m.pathname,j=v.pathname,T=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(j=j.toLowerCase(),T=T?T.toLowerCase():null,C=C.toLowerCase()),T&&w&&(T=ur(T,w)||T);const $=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let V=j===C||!a&&j.startsWith(C)&&j.charAt($)==="/",L=T!=null&&(T===C||!a&&T.startsWith(C)&&T.charAt(C.length)==="/"),A={isActive:V,isPending:L,isTransitioning:N},U=V?t:void 0,re;typeof i=="function"?re=i(A):re=[i,V?"active":null,L?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let O=typeof s=="function"?s(A):s;return k.createElement(oo,{...p,"aria-current":U,className:re,ref:g,style:O,to:l,viewTransition:d},typeof f=="function"?f(A):f)});jC.displayName="NavLink";var TC=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:s,method:l=oc,action:d,onSubmit:f,relative:p,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:v,...y},S)=>{let{unstable_useTransitions:w}=k.useContext(dr),N=IC(),C=LC(d,{relative:p}),j=l.toLowerCase()==="get"?"get":"post",T=typeof d=="string"&&Ey.test(d),$=V=>{if(f&&f(V),V.defaultPrevented)return;V.preventDefault();let L=V.nativeEvent.submitter,A=L?.getAttribute("formmethod")||l,U=()=>N(L||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:$,...y,"data-discover":!T&&e==="render"?"true":void 0})});TC.displayName="Form";function RC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jy(e){let t=k.useContext(wi);return Ze(t,RC(e)),t}function PC(e,{target:t,replace:n,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let p=jN(),g=Vo(),m=js(e,{relative:s});return k.useCallback(v=>{if(iC(v,t)){v.preventDefault();let y=n!==void 0?n:Br(g)===Br(m),S=()=>p(e,{replace:y,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:d});f?k.startTransition(()=>S()):S()}},[g,p,m,n,i,t,e,a,s,l,d,f])}var AC=0,_C=()=>`__${String(++AC)}__`;function IC(){let{router:e}=jy("useSubmit"),{basename:t}=k.useContext(dr),n=BN(),i=e.fetch,a=e.navigate;return k.useCallback(async(s,l={})=>{let{action:d,method:f,encType:p,formData:g,body:m}=lC(s,t);if(l.navigate===!1){let v=l.fetcherKey||_C();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 LC(e,{relative:t}={}){let{basename:n}=k.useContext(dr),i=k.useContext(Cr);Ze(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...js(e||".",{relative:t})},l=Vo();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:zr([n,s.pathname])),Br(s)}function DC(e,{relative:t}={}){let n=k.useContext(dp);Ze(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=jy("useViewTransitionState"),a=js(e,{relative:t});if(!n.isTransitioning)return!1;let s=ur(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=ur(n.nextLocation.pathname,i)||n.nextLocation.pathname;return dc(a.pathname,l)!=null||dc(a.pathname,s)!=null}function MC(){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 as({className:e="",size:t=40}){return u.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[u.jsxs("defs",{children:[u.jsxs("radialGradient",{id:"d-eye",cx:"50%",cy:"50%",r:"50%",children:[u.jsx("stop",{offset:"0%",stopColor:"#ff6a00"}),u.jsx("stop",{offset:"40%",stopColor:"#ff4458"}),u.jsx("stop",{offset:"100%",stopColor:"#aa1122",stopOpacity:"0.6"})]}),u.jsxs("radialGradient",{id:"d-eyeglow",cx:"50%",cy:"50%",r:"50%",children:[u.jsx("stop",{offset:"0%",stopColor:"#ff4458",stopOpacity:"0.6"}),u.jsx("stop",{offset:"100%",stopColor:"#ff4458",stopOpacity:"0"})]}),u.jsxs("linearGradient",{id:"d-body",x1:"50",y1:"2",x2:"50",y2:"98",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:"0%",stopColor:"#1a0812"}),u.jsx("stop",{offset:"100%",stopColor:"#060308"})]}),u.jsxs("linearGradient",{id:"d-stroke",x1:"0",y1:"0",x2:"100",y2:"100",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:"0%",stopColor:"#ff4458"}),u.jsx("stop",{offset:"55%",stopColor:"#00d9ff"}),u.jsx("stop",{offset:"100%",stopColor:"#ff4458"})]}),u.jsxs("filter",{id:"d-bloom",x:"-60%",y:"-60%",width:"220%",height:"220%",children:[u.jsx("feGaussianBlur",{stdDeviation:"4",result:"blur"}),u.jsxs("feMerge",{children:[u.jsx("feMergeNode",{in:"blur"}),u.jsx("feMergeNode",{in:"SourceGraphic"})]})]}),u.jsxs("filter",{id:"d-edge",x:"-20%",y:"-20%",width:"140%",height:"140%",children:[u.jsx("feGaussianBlur",{stdDeviation:"1.5",result:"blur"}),u.jsxs("feMerge",{children:[u.jsx("feMergeNode",{in:"blur"}),u.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),u.jsx("polygon",{points:"30,28 22,6 38,22",fill:"#ff4458",opacity:"0.85",filter:"url(#d-edge)"}),u.jsx("polygon",{points:"30,28 22,6 38,22",fill:"none",stroke:"#ff4458",strokeWidth:"0.5",strokeOpacity:"0.5"}),u.jsx("polygon",{points:"70,28 78,6 62,22",fill:"#ff4458",opacity:"0.85",filter:"url(#d-edge)"}),u.jsx("polygon",{points:"70,28 78,6 62,22",fill:"none",stroke:"#ff4458",strokeWidth:"0.5",strokeOpacity:"0.5"}),u.jsx("polygon",{points:"30,28 70,28 84,40 88,60 76,80 62,92 50,96 38,92 24,80 12,60 16,40",fill:"url(#d-body)",stroke:"url(#d-stroke)",strokeWidth:"1.8",filter:"url(#d-edge)"}),u.jsx("polygon",{points:"33,33 67,33 79,43 82,61 72,78 61,88 50,91 39,88 28,78 18,61 21,43",fill:"none",stroke:"#ff4458",strokeWidth:"0.5",strokeOpacity:"0.18"}),u.jsx("line",{x1:"22",y1:"46",x2:"44",y2:"53",stroke:"#ff4458",strokeWidth:"2.5",strokeLinecap:"round"}),u.jsx("line",{x1:"78",y1:"46",x2:"56",y2:"53",stroke:"#ff4458",strokeWidth:"2.5",strokeLinecap:"round"}),u.jsx("line",{x1:"36",y1:"50",x2:"44",y2:"53",stroke:"#ff4458",strokeWidth:"1",strokeLinecap:"round",strokeOpacity:"0.5"}),u.jsx("line",{x1:"64",y1:"50",x2:"56",y2:"53",stroke:"#ff4458",strokeWidth:"1",strokeLinecap:"round",strokeOpacity:"0.5"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"26",ry:"12",fill:"url(#d-eyeglow)"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"22",ry:"11",fill:"#050208"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"22",ry:"11",fill:"none",stroke:"#ff4458",strokeWidth:"0.8",strokeOpacity:"0.4"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"14",ry:"8",fill:"url(#d-eye)",filter:"url(#d-bloom)"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"3.5",ry:"7.5",fill:"#000"}),u.jsx("ellipse",{cx:"46",cy:"58",rx:"2",ry:"1.2",fill:"white",fillOpacity:"0.35"}),u.jsxs("line",{x1:"28",y1:"62",x2:"72",y2:"62",stroke:"#ff6a00",strokeWidth:"0.7",strokeOpacity:"0.5",children:[u.jsx("animate",{attributeName:"y1",values:"54;70;54",dur:"2.2s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"y2",values:"54;70;54",dur:"2.2s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"stroke-opacity",values:"0.5;0;0.5",dur:"2.2s",repeatCount:"indefinite"})]}),u.jsx("line",{x1:"44",y1:"81",x2:"50",y2:"86",stroke:"#ff4458",strokeWidth:"1.2",strokeLinecap:"round",strokeOpacity:"0.55"}),u.jsx("line",{x1:"56",y1:"81",x2:"50",y2:"86",stroke:"#ff4458",strokeWidth:"1.2",strokeLinecap:"round",strokeOpacity:"0.55"}),u.jsx("circle",{cx:"20",cy:"60",r:"1.5",fill:"#00d9ff",opacity:"0.6"}),u.jsx("circle",{cx:"80",cy:"60",r:"1.5",fill:"#00d9ff",opacity:"0.6"}),u.jsx("line",{x1:"22",y1:"60",x2:"28",y2:"62",stroke:"#00d9ff",strokeWidth:"0.6",strokeOpacity:"0.35"}),u.jsx("line",{x1:"78",y1:"60",x2:"72",y2:"62",stroke:"#00d9ff",strokeWidth:"0.6",strokeOpacity:"0.35"}),u.jsx("circle",{cx:"22",cy:"6",r:"2",fill:"#ff4458",children:u.jsx("animate",{attributeName:"opacity",values:"0.5;1;0.5",dur:"1.8s",repeatCount:"indefinite"})}),u.jsx("circle",{cx:"78",cy:"6",r:"2",fill:"#ff4458",children:u.jsx("animate",{attributeName:"opacity",values:"0.5;1;0.5",dur:"1.8s",begin:"0.9s",repeatCount:"indefinite"})}),u.jsxs("ellipse",{cx:"50",cy:"62",rx:"14",ry:"8",fill:"none",stroke:"#ff4458",strokeWidth:"1.2",strokeOpacity:"0",children:[u.jsx("animate",{attributeName:"rx",values:"14;24;14",dur:"2.8s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"ry",values:"8;14;8",dur:"2.8s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"stroke-opacity",values:"0.5;0;0.5",dur:"2.8s",repeatCount:"indefinite"})]})]})}const OC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),v0=e=>{const t=zC(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ty=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();var FC={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 $C=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,...FC,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:Ty("lucide",a),...d},[...l.map(([p,g])=>k.createElement(p,g)),...Array.isArray(s)?s:[s]]));const ze=(e,t)=>{const n=k.forwardRef(({className:i,...a},s)=>k.createElement($C,{ref:s,iconNode:t,className:Ty(`lucide-${OC(v0(e))}`,`lucide-${e}`,i),...a}));return n.displayName=v0(e),n};const BC=[["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"}]],UC=ze("activity",BC);const HC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],VC=ze("arrow-left",HC);const WC=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],KC=ze("arrow-up",WC);const YC=[["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"}]],Ac=ze("bot",YC);const GC=[["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"}]],Sf=ze("brain",GC);const qC=[["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"}]],XC=ze("calendar",qC);const QC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Nf=ze("check",QC);const JC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ts=ze("chevron-down",JC);const ZC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],eE=ze("chevron-right",ZC);const tE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],nE=ze("chevron-up",tE);const rE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fc=ze("circle-alert",rE);const oE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ry=ze("circle-check-big",oE);const iE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ac=ze("circle-check",iE);const aE=[["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"}]],sE=ze("circuit-board",aE);const lE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],ms=ze("clock",lE);const cE=[["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"}]],Py=ze("cpu",cE);const uE=[["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"}]],Ay=ze("dollar-sign",uE);const dE=[["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"}]],fE=ze("eye-off",dE);const pE=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_y=ze("eye",pE);const hE=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],w0=ze("file-code-2",hE);const mE=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],gE=ze("fingerprint",mE);const xE=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],yE=ze("flame",xE);const vE=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],wE=ze("folder-open",vE);const bE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Iy=ze("globe",bE);const kE=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],SE=ze("key-round",kE);const NE=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Qa=ze("key",NE);const CE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],un=ze("loader-circle",CE);const EE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],Cf=ze("lock-open",EE);const jE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],pc=ze("lock",jE);const TE=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],RE=ze("message-square-text",TE);const PE=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],AE=ze("network",PE);const _E=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],IE=ze("panel-left-close",_E);const LE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],b0=ze("panel-left-open",LE);const DE=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],Ly=ze("pause",DE);const ME=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],OE=ze("pencil",ME);const zE=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Dy=ze("play",zE);const FE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fr=ze("plus",FE);const $E=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],My=ze("refresh-cw",$E);const BE=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Oy=ze("save",BE);const UE=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],zy=ze("search",UE);const HE=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_c=ze("settings",HE);const VE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],WE=ze("shield-alert",VE);const KE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],k0=ze("shield-check",KE);const YE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],hc=ze("shield",YE);const GE=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],qE=ze("skull",GE);const XE=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],QE=ze("sliders-horizontal",XE);const JE=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Ef=ze("sparkles",JE);const ZE=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],Fy=ze("terminal",ZE);const e2=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Rs=ze("trash-2",e2);const t2=[["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"}]],xp=ze("triangle-alert",t2);const n2=[["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"}]],jf=ze("user",n2);const r2=[["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"}]],Ic=ze("users",r2);const o2=[["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"}]],i2=ze("wrench",o2);const a2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ra=ze("x",a2);const s2=[["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"}]],Tf=ze("zap",s2),l2=[{path:"/",label:"Dashboard",icon:sE},{path:"/chat",label:"Chat",icon:Fy},{path:"/tasks",label:"Tasks",icon:qE},{path:"/mcp",label:"MCP",icon:AE},{path:"/skills",label:"Skills",icon:yE},{path:"/config",label:"Config",icon:QE},{path:"/security",label:"Security",icon:WE},{path:"/costs",label:"Costs",icon:gE},{path:"/tenants",label:"Tenants",icon:Ic},{path:"/settings",label:"Settings",icon:_c}];function c2(){const e=Vo();return u.jsxs("div",{className:"min-h-screen bg-[#030213] text-[#f0f0f3] relative overflow-hidden flex",children:[u.jsx(MC,{}),u.jsx("div",{className:"fixed top-0 left-1/4 w-96 h-96 bg-[#00d9ff] opacity-10 blur-[128px] rounded-full pointer-events-none"}),u.jsx("div",{className:"fixed bottom-0 right-1/4 w-96 h-96 bg-[#4ECDC4] opacity-10 blur-[128px] rounded-full pointer-events-none"}),u.jsxs("aside",{className:"w-64 border-r border-slate-800/50 bg-slate-900/20 backdrop-blur-xl z-20 flex flex-col h-screen sticky top-0",children:[u.jsx("div",{className:"p-6 border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(as,{size:40}),u.jsx("h1",{className:"text-xl font-bold bg-gradient-to-r from-white via-[#00d9ff] to-[#4ECDC4] bg-clip-text text-transparent tracking-tight",children:"Daemora"})]})}),u.jsx("nav",{className:"p-4 space-y-1 flex-1 overflow-y-auto",children:l2.map(t=>{const n=t.icon,i=e.pathname===t.path||t.path!=="/"&&e.pathname.startsWith(t.path);return u.jsxs(oo,{to:t.path,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-all ${i?"bg-[#00d9ff]/10 text-[#00d9ff] border border-[#00d9ff]/30 shadow-[0_0_15px_rgba(0,217,255,0.2)]":"text-gray-400 hover:bg-slate-800/50 hover:text-[#00d9ff]"}`,children:[u.jsx(n,{className:"w-5 h-5"}),u.jsx("span",{className:"font-medium text-sm",children:t.label})]},t.path)})}),u.jsx("div",{className:"p-4 border-t border-slate-800/50",children:u.jsxs("div",{className:"flex items-center gap-2 px-4 py-2",children:[u.jsx("div",{className:"w-2 h-2 bg-[#00ff88] rounded-full animate-pulse"}),u.jsx("span",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-widest",children:"System Active"})]})})]}),u.jsxs("div",{className:"flex-1 flex flex-col relative z-10 h-screen overflow-hidden",children:[u.jsxs("header",{className:"h-16 border-b border-slate-800/50 bg-slate-900/10 backdrop-blur-md flex items-center justify-between px-8 shrink-0",children:[u.jsx("div",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-[0.3em]",children:"Authorized Access Only // Layer 7 Encryption"}),u.jsx("div",{className:"flex items-center gap-4",children:u.jsx(u2,{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(ZN,{})})})]})]})}function u2({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 $y(){return document.querySelector('meta[name="api-token"]')?.getAttribute("content")||""}async function $e(e,t){const n=$y(),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 By(e){const t=$y(),n=e.includes("?")?"&":"?";return t?`${e}${n}token=${t}`:e}function Uy(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=Uy(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Hy(){for(var e,t,n=0,i="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Uy(e))&&(i&&(i+=" "),i+=t);return i}const yp="-",d2=e=>{const t=p2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const d=l.split(yp);return d[0]===""&&d.length!==1&&d.shift(),Vy(d,t)||f2(l)},getConflictingClassGroupIds:(l,d)=>{const f=n[l]||[];return d&&i[l]?[...f,...i[l]]:f}}},Vy=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),a=i?Vy(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(yp);return t.validators.find(({validator:l})=>l(s))?.classGroupId},S0=/^\[(.+)\]$/,f2=e=>{if(S0.test(e)){const t=S0.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},p2=e=>{const{theme:t,classGroups:n}=e,i={nextPart:new Map,validators:[]};for(const a in n)Rf(n[a],i,a,t);return i},Rf=(e,t,n,i)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:N0(t,a);s.classGroupId=n;return}if(typeof a=="function"){if(h2(a)){Rf(a(i),t,n,i);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([s,l])=>{Rf(l,N0(t,s),n,i)})})},N0=(e,t)=>{let n=e;return t.split(yp).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},h2=e=>e.isThemeGetter,m2=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)}}},Pf="!",Af=":",g2=Af.length,x2=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===Af){s.push(a.slice(f,S)),f=S+g2;continue}if(w==="/"){p=S;continue}}w==="["?l++:w==="]"?l--:w==="("?d++:w===")"&&d--}const g=s.length===0?a:a.substring(f),m=y2(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+Af,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},y2=e=>e.endsWith(Pf)?e.substring(0,e.length-1):e.startsWith(Pf)?e.substring(1):e,v2=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}},w2=e=>({cache:m2(e.cacheSize),parseClassName:x2(e),sortModifiers:v2(e),...d2(e)}),b2=/\s+/,k2=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:s}=t,l=[],d=e.trim().split(b2);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(":"),T=y?j+Pf:j,$=T+C;if(l.includes($))continue;l.push($);const V=a(C,N);for(let L=0;L<V.length;++L){const A=V[L];l.push(T+A)}f=g+(f.length>0?" "+f:f)}return f};function S2(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wy(t))&&(i&&(i+=" "),i+=n);return i}const Wy=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Wy(e[i]))&&(n&&(n+=" "),n+=t);return n};function N2(e,...t){let n,i,a,s=l;function l(f){const p=t.reduce((g,m)=>m(g),e());return n=w2(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=k2(f,n);return a(f,g),g}return function(){return s(S2.apply(null,arguments))}}const rn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ky=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C2=/^\d+\/\d+$/,E2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j2=/\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$/,T2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,R2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vi=e=>C2.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Io=e=>!!e&&Number.isInteger(Number(e)),Bd=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),no=e=>E2.test(e),A2=()=>!0,_2=e=>j2.test(e)&&!T2.test(e),Gy=()=>!1,I2=e=>R2.test(e),L2=e=>P2.test(e),D2=e=>!Ee(e)&&!je(e),M2=e=>la(e,Qy,Gy),Ee=e=>Ky.test(e),di=e=>la(e,Jy,_2),Ud=e=>la(e,B2,Qe),C0=e=>la(e,qy,Gy),O2=e=>la(e,Xy,L2),Bl=e=>la(e,Zy,I2),je=e=>Yy.test(e),Ja=e=>ca(e,Jy),z2=e=>ca(e,U2),E0=e=>ca(e,qy),F2=e=>ca(e,Qy),$2=e=>ca(e,Xy),Ul=e=>ca(e,Zy,!0),la=(e,t,n)=>{const i=Ky.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},ca=(e,t,n=!1)=>{const i=Yy.exec(e);return i?i[1]?t(i[1]):n:!1},qy=e=>e==="position"||e==="percentage",Xy=e=>e==="image"||e==="url",Qy=e=>e==="length"||e==="size"||e==="bg-size",Jy=e=>e==="length",B2=e=>e==="number",U2=e=>e==="family-name",Zy=e=>e==="shadow",H2=()=>{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"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...$(),je,Ee],L=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],U=()=>[je,Ee,f],re=()=>[Vi,"full","auto",...U()],O=()=>[Io,"none","subgrid",je,Ee],J=()=>["auto",{span:["full",Io,je,Ee]},Io,je,Ee],_=()=>[Io,"auto",je,Ee],oe=()=>["auto","min","max","fr",je,Ee],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...U()],ne=()=>[Vi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],I=()=>[e,je,Ee],ee=()=>[...$(),E0,C0,{position:[je,Ee]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",F2,M2,{size:[je,Ee]}],X=()=>[Bd,Ja,di],P=()=>["","none","full",p,je,Ee],se=()=>["",Qe,Ja,di],ve=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Qe,Bd,E0,C0],pe=()=>["","none",S,je,Ee],we=()=>["none",Qe,je,Ee],be=()=>["none",Qe,je,Ee],Me=()=>[Qe,je,Ee],Fe=()=>[Vi,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[no],breakpoint:[no],color:[A2],container:[no],"drop-shadow":[no],ease:["in","out","in-out"],font:[D2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[no],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[no],shadow:[no],spacing:["px",Qe],text:[no],"text-shadow":[no],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vi,Ee,je,N]}],container:["container"],columns:[{columns:[Qe,Ee,je,d]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Io,"auto",je,Ee]}],basis:[{basis:[Vi,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,Vi,"auto","initial","none",Ee]}],grow:[{grow:["",Qe,je,Ee]}],shrink:[{shrink:["",Qe,je,Ee]}],order:[{order:[Io,"first","last","none",je,Ee]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:J()}],"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:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[d,"screen",...ne()]}],"min-w":[{"min-w":[d,"screen","none",...ne()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[l]},...ne()]}],h:[{h:["screen",...ne()]}],"min-h":[{"min-h":["screen","none",...ne()]}],"max-h":[{"max-h":["screen",...ne()]}],"font-size":[{text:["base",n,Ja,di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,je,Ud]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bd,Ee]}],"font-family":[{font:[z2,Ee,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,je,Ee]}],"line-clamp":[{"line-clamp":[Qe,"none",je,Ud]}],leading:[{leading:[s,...U()]}],"list-image":[{"list-image":["none",je,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",je,di]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Qe,"auto",je,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Io,je,Ee],radial:["",je,Ee],conic:[Io,je,Ee]},$2,O2]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],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:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,je,Ee]}],"outline-w":[{outline:["",Qe,Ja,di]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",g,Ul,Bl]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",m,Ul,Bl]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Qe,di]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",v,Ul,Bl]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Qe,je,Ee]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[je,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Ee]}],filter:[{filter:["","none",je,Ee]}],blur:[{blur:pe()}],brightness:[{brightness:[Qe,je,Ee]}],contrast:[{contrast:[Qe,je,Ee]}],"drop-shadow":[{"drop-shadow":["","none",y,Ul,Bl]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Qe,je,Ee]}],"hue-rotate":[{"hue-rotate":[Qe,je,Ee]}],invert:[{invert:["",Qe,je,Ee]}],saturate:[{saturate:[Qe,je,Ee]}],sepia:[{sepia:["",Qe,je,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Ee]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,je,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,je,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,je,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,je,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Qe,je,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,je,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,je,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,je,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",je,Ee]}],ease:[{ease:["linear","initial",C,je,Ee]}],delay:[{delay:[Qe,je,Ee]}],animate:[{animate:["none",j,je,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,je,Ee]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[je,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,Ee]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Qe,Ja,di,Ud]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},V2=N2(H2);function pt(...e){return V2(Hy(e))}function dt({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:pt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...t})}function yt({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:pt("@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 vt({className:e,...t}){return u.jsx("h4",{"data-slot":"card-title",className:pt("leading-none",e),...t})}function cr({className:e,...t}){return u.jsx("p",{"data-slot":"card-description",className:pt("text-muted-foreground",e),...t})}function ft({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:pt("px-6 [&:last-child]:pb-6",e),...t})}function j0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ev(...e){return t=>{let n=!1;const i=e.map(a=>{const s=j0(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():j0(e[a],null)}}}}function ht(...e){return k.useCallback(ev(...e),e)}var $o=k.forwardRef((e,t)=>{const{children:n,...i}=e,a=k.Children.toArray(n),s=a.find(K2);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(_f,{...i,ref:t,children:k.isValidElement(l)?k.cloneElement(l,void 0,d):null})}return u.jsx(_f,{...i,ref:t,children:n})});$o.displayName="Slot";var _f=k.forwardRef((e,t)=>{const{children:n,...i}=e;if(k.isValidElement(n)){const a=G2(n),s=Y2(i,n.props);return n.type!==k.Fragment&&(s.ref=t?ev(t,a):a),k.cloneElement(n,s)}return k.Children.count(n)>1?k.Children.only(null):null});_f.displayName="SlotClone";var W2=({children:e})=>u.jsx(u.Fragment,{children:e});function K2(e){return k.isValidElement(e)&&e.type===W2}function Y2(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 G2(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 T0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,R0=Hy,tv=(e,t)=>n=>{var i;if(t?.variants==null)return R0(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=T0(g)||T0(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 R0(e,l,f,n?.class,n?.className)},q2=tv("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?$o:"span";return u.jsx(a,{"data-slot":"badge",className:pt(q2({variant:t}),e),...i})}function X2(){const[e,t]=k.useState(null),[n,i]=k.useState([]),[a,s]=k.useState(!0),l=async()=>{try{const[f,p]=await Promise.all([$e("/api/health"),$e("/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(un,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-8",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Dashboard"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"SYSTEM OVERVIEW"})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(vt,{className:"text-sm font-medium text-gray-400 uppercase",children:"System Status"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[e?.status==="ok"?u.jsx(ac,{className:"w-8 h-8 text-[#00ff88]"}):u.jsx(fc,{className:"w-8 h-8 text-[#ff4458]"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold text-white uppercase tracking-tight",children:e?.status==="ok"?"Healthy":"Offline"}),u.jsxs("div",{className:"text-xs text-gray-400 font-mono uppercase",children:["UPTIME: ",e?d(e.uptime):"0h 0m"]})]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(vt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Active Tasks"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(UC,{className:"w-8 h-8 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold text-white",children:e?.queue?.running||0}),u.jsxs("div",{className:"text-xs text-gray-400 font-mono uppercase",children:["OF ",e?.queue?.total||0," TOTAL"]})]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(vt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Tools Loaded"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Tf,{className:"w-8 h-8 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold text-white",children:e?.tools||0}),u.jsx("div",{className:"text-xs text-gray-400 font-mono uppercase",children:"AVAILABLE"})]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(vt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Daily Spend"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ac,{className:"w-8 h-8 text-[#4ECDC4]"}),u.jsxs("div",{children:[u.jsxs("div",{className:"text-2xl font-bold text-white",children:["$",e?.todayCost?.toFixed(2)||"0.00"]}),u.jsx("div",{className:"text-xs text-gray-400 font-mono uppercase",children:"USD TODAY"})]})]})})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tighter",children:"Recent Activity"}),u.jsx(cr,{className:"text-gray-400 font-mono text-xs",children:"LATEST TASKS"})]}),u.jsx(oo,{to:"/tasks",className:"text-sm text-[#00d9ff] hover:text-[#4ECDC4] transition-colors font-medium font-mono",children:"VIEW ALL →"})]})}),u.jsx(ft,{children:u.jsx("div",{className:"space-y-4",children:n.length===0?u.jsx("div",{className:"text-center py-12 border-2 border-dashed border-slate-800 rounded-xl",children:u.jsx("p",{className:"text-gray-500 font-mono uppercase tracking-widest text-xs",children:"NO TASKS YET"})}):n.map(f=>u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 rounded-lg border border-slate-800 hover:border-[#00d9ff]/30 transition-all group",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[f.status==="running"?u.jsx(ms,{className:"w-5 h-5 text-[#ffaa00] animate-pulse"}):f.status==="completed"?u.jsx(ac,{className:"w-5 h-5 text-[#00ff88]"}):u.jsx(fc,{className:"w-5 h-5 text-[#ff4458]"}),u.jsxs("div",{children:[u.jsx("div",{className:"font-medium text-white truncate max-w-[300px] group-hover:text-[#00d9ff] transition-colors font-mono",children:f.title||f.input}),u.jsxs("div",{className:"text-xs text-gray-500 font-mono uppercase tracking-tighter",children:[f.agentCreated?"agent":f.channel," // ",new Date(f.createdAt).toLocaleString()]})]})]}),u.jsx(Qt,{className:f.status==="running"?"bg-[#ffaa00]/10 text-[#ffaa00] border-[#ffaa00]/30 font-mono text-[10px]":f.status==="completed"?"bg-[#00ff88]/10 text-[#00ff88] border-[#00ff88]/30 font-mono text-[10px]":"bg-[#ff4458]/10 text-[#ff4458] border-[#ff4458]/30 font-mono text-[10px]",children:f.status.toUpperCase()})]},f.id))})})]})]})}function nv({className:e,...t}){return u.jsx("textarea",{"data-slot":"textarea",className:pt("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 Q2=tv("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 xt({className:e,variant:t,size:n,asChild:i=!1,...a}){const s=i?$o:"button";return u.jsx(s,{"data-slot":"button",className:pt(Q2({variant:t,size:n,className:e})),...a})}var Ps=Xx();const rv=Tc(Ps);var J2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Xe=J2.reduce((e,t)=>{const n=k.forwardRef((i,a)=>{const{asChild:s,...l}=i,d=s?$o: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 Z2(e,t){e&&Ps.flushSync(()=>e.dispatchEvent(t))}var wn=globalThis?.document?k.useLayoutEffect:()=>{};function ej(e,t){return k.useReducer((n,i)=>t[n][i]??n,e)}var so=e=>{const{present:t,children:n}=e,i=tj(t),a=typeof n=="function"?n({present:i.isPresent}):k.Children.only(n),s=ht(i.ref,nj(a));return typeof n=="function"||i.isPresent?k.cloneElement(a,{ref:s}):null};so.displayName="Presence";function tj(e){const[t,n]=k.useState(),i=k.useRef({}),a=k.useRef(e),s=k.useRef("none"),l=e?"mounted":"unmounted",[d,f]=ej(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 nj(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 rj(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 lo(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,oj(a,...t)]}function oj(...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 pn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}var ij=k.createContext(void 0);function Lc(e){const t=k.useContext(ij);return e||t||"ltr"}function If(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function aj(e,t){return k.useReducer((n,i)=>t[n][i]??n,e)}var vp="ScrollArea",[ov]=lo(vp),[sj,fr]=ov(vp),iv=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),[T,$]=k.useState(0),[V,L]=k.useState(!1),[A,U]=k.useState(!1),re=ht(t,J=>f(J)),O=Lc(a);return u.jsx(sj,{scope:n,type:i,dir:O,scrollHideDelay:s,scrollArea:d,viewport:p,onViewportChange:g,content:m,onContentChange:v,scrollbarX:y,onScrollbarXChange:S,scrollbarXEnabled:V,onScrollbarXEnabledChange:L,scrollbarY:w,onScrollbarYChange:N,scrollbarYEnabled:A,onScrollbarYEnabledChange:U,onCornerWidthChange:j,onCornerHeightChange:$,children:u.jsx(Xe.div,{dir:O,...l,ref:re,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});iv.displayName=vp;var av="ScrollAreaViewport",sv=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:a,...s}=e,l=fr(av,n),d=k.useRef(null),f=ht(t,d,l.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),u.jsx(Xe.div,{"data-radix-scroll-area-viewport":"",...s,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});sv.displayName=av;var Ur="ScrollAreaScrollbar",lv=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=fr(Ur,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(lj,{...i,ref:t,forceMount:n}):a.type==="scroll"?u.jsx(cj,{...i,ref:t,forceMount:n}):a.type==="auto"?u.jsx(cv,{...i,ref:t,forceMount:n}):a.type==="always"?u.jsx(wp,{...i,ref:t}):null});lv.displayName=Ur;var lj=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=fr(Ur,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(so,{present:n||s,children:u.jsx(cv,{"data-state":s?"visible":"hidden",...i,ref:t})})}),cj=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=fr(Ur,e.__scopeScrollArea),s=e.orientation==="horizontal",l=Mc(()=>f("SCROLL_END"),100),[d,f]=aj("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(so,{present:n||d!=="hidden",children:u.jsx(wp,{"data-state":d==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:Ge(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Ge(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),cv=k.forwardRef((e,t)=>{const n=fr(Ur,e.__scopeScrollArea),{forceMount:i,...a}=e,[s,l]=k.useState(!1),d=e.orientation==="horizontal",f=Mc(()=>{if(n.viewport){const p=n.viewport.offsetWidth<n.viewport.scrollWidth,g=n.viewport.offsetHeight<n.viewport.scrollHeight;l(d?p:g)}},10);return oa(n.viewport,f),oa(n.content,f),u.jsx(so,{present:i||s,children:u.jsx(wp,{"data-state":s?"visible":"hidden",...a,ref:t})})}),wp=k.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,a=fr(Ur,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=hv(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 mj(v,l.current,d,y)}return n==="horizontal"?u.jsx(uj,{...g,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const v=a.viewport.scrollLeft,y=P0(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(dj,{...g,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const v=a.viewport.scrollTop,y=P0(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}),uj=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...a}=e,s=fr(Ur,e.__scopeScrollArea),[l,d]=k.useState(),f=k.useRef(null),p=ht(t,f,s.onScrollbarXChange);return k.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),u.jsx(dv,{"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":Dc(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),gv(v,m)&&g.preventDefault()}},onResize:()=>{f.current&&s.viewport&&l&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:gc(l.paddingLeft),paddingEnd:gc(l.paddingRight)}})}})}),dj=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...a}=e,s=fr(Ur,e.__scopeScrollArea),[l,d]=k.useState(),f=k.useRef(null),p=ht(t,f,s.onScrollbarYChange);return k.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),u.jsx(dv,{"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":Dc(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),gv(v,m)&&g.preventDefault()}},onResize:()=>{f.current&&s.viewport&&l&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:gc(l.paddingTop),paddingEnd:gc(l.paddingBottom)}})}})}),[fj,uv]=ov(Ur),dv=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=fr(Ur,n),[S,w]=k.useState(null),N=ht(t,re=>w(re)),C=k.useRef(null),j=k.useRef(""),T=y.viewport,$=i.content-i.viewport,V=pn(g),L=pn(f),A=Mc(m,10);function U(re){if(C.current){const O=re.clientX-C.current.left,J=re.clientY-C.current.top;p({x:O,y:J})}}return k.useEffect(()=>{const re=O=>{const J=O.target;S?.contains(J)&&V(O,$)};return document.addEventListener("wheel",re,{passive:!1}),()=>document.removeEventListener("wheel",re,{passive:!1})},[T,S,$,V]),k.useEffect(L,[i,L]),oa(S,A),oa(y.content,A),u.jsx(fj,{scope:n,scrollbar:S,hasThumb:a,onThumbChange:pn(s),onThumbPointerUp:pn(l),onThumbPositionChange:L,onThumbPointerDown:pn(d),children:u.jsx(Xe.div,{...v,ref:N,style:{position:"absolute",...v.style},onPointerDown:Ge(e.onPointerDown,re=>{re.button===0&&(re.target.setPointerCapture(re.pointerId),C.current=S.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),U(re))}),onPointerMove:Ge(e.onPointerMove,U),onPointerUp:Ge(e.onPointerUp,re=>{const O=re.target;O.hasPointerCapture(re.pointerId)&&O.releasePointerCapture(re.pointerId),document.body.style.webkitUserSelect=j.current,y.viewport&&(y.viewport.style.scrollBehavior=""),C.current=null})})})}),mc="ScrollAreaThumb",fv=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=uv(mc,e.__scopeScrollArea);return u.jsx(so,{present:n||a.hasThumb,children:u.jsx(pj,{ref:t,...i})})}),pj=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...a}=e,s=fr(mc,n),l=uv(mc,n),{onThumbPositionChange:d}=l,f=ht(t,m=>l.onThumbChange(m)),p=k.useRef(void 0),g=Mc(()=>{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=gj(m,d);p.current=y,d()}};return d(),m.addEventListener("scroll",v),()=>m.removeEventListener("scroll",v)}},[s.viewport,g,d]),u.jsx(Xe.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Ge(e.onPointerDownCapture,m=>{const y=m.target.getBoundingClientRect(),S=m.clientX-y.left,w=m.clientY-y.top;l.onThumbPointerDown({x:S,y:w})}),onPointerUp:Ge(e.onPointerUp,l.onThumbPointerUp)})});fv.displayName=mc;var bp="ScrollAreaCorner",pv=k.forwardRef((e,t)=>{const n=fr(bp,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?u.jsx(hj,{...e,ref:t}):null});pv.displayName=bp;var hj=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,a=fr(bp,n),[s,l]=k.useState(0),[d,f]=k.useState(0),p=!!(s&&d);return oa(a.scrollbarX,()=>{const g=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(g),f(g)}),oa(a.scrollbarY,()=>{const g=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(g),l(g)}),p?u.jsx(Xe.div,{...i,ref:t,style:{width:s,height:d,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function gc(e){return e?parseInt(e,10):0}function hv(e,t){const n=e/t;return isNaN(n)?0:n}function Dc(e){const t=hv(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function mj(e,t,n,i="ltr"){const a=Dc(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 mv([f,p],m)(e)}function P0(e,t,n="ltr"){const i=Dc(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=If(e,f);return mv([0,l],[0,d])(p)}function mv(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 gv(e,t){return e>0&&e<t}var gj=(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 Mc(e,t){const n=pn(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 oa(e,t){const n=pn(t);wn(()=>{let i=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(i),a.unobserve(e)}}},[e,n])}var xj=iv,yj=sv,vj=pv;function Lf({className:e,children:t,...n}){return u.jsxs(xj,{"data-slot":"scroll-area",className:pt("relative overflow-hidden",e),...n,children:[u.jsx(yj,{"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(wj,{}),u.jsx(vj,{})]})}function wj({className:e,orientation:t="vertical",...n}){return u.jsx(lv,{"data-slot":"scroll-area-scrollbar",orientation:t,className:pt("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(fv,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function bj(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kj=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sj=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nj={};function A0(e,t){return(Nj.jsx?Sj:kj).test(e)}const Cj=/[ \t\n\f\r]/g;function Ej(e){return typeof e=="object"?e.type==="text"?_0(e.value):!1:_0(e)}function _0(e){return e.replace(Cj,"")===""}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 xv(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 Df(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 jj=0;const qe=bi(),Xt=bi(),Mf=bi(),me=bi(),kt=bi(),ea=bi(),qn=bi();function bi(){return 2**++jj}const Of=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Xt,commaOrSpaceSeparated:qn,commaSeparated:ea,number:me,overloadedBoolean:Mf,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),Hd=Object.keys(Of);class kp extends Bn{constructor(t,n,i,a){let s=-1;if(super(t,n),I0(this,"space",a),typeof i=="number")for(;++s<Hd.length;){const l=Hd[s];I0(this,Hd[s],(i&Of[l])===Of[l])}}}kp.prototype.defined=!0;function I0(e,t,n){n&&(e[t]=n)}function ua(e){const t={},n={};for(const[i,a]of Object.entries(e.properties)){const s=new kp(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,n[Df(i)]=i,n[Df(s.attribute)]=i}return new As(t,n,e.space)}const yv=ua({properties:{ariaActiveDescendant:null,ariaAtomic:Xt,ariaAutoComplete:null,ariaBusy:Xt,ariaChecked:Xt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:Xt,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:Xt,ariaFlowTo:kt,ariaGrabbed:Xt,ariaHasPopup:null,ariaHidden:Xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:me,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:kt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Xt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function vv(e,t){return t in e?e[t]:t}function wv(e,t){return vv(e,t.toLowerCase())}const Tj=ua({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ea,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:kt,autoFocus:qe,autoPlay:qe,blocking:kt,capture:null,charSet:null,checked:qe,cite:null,className:kt,cols:me,colSpan:null,content:null,contentEditable:Xt,controls:qe,controlsList:kt,coords:me|ea,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:Mf,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:kt,height:me,hidden:Mf,high:me,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:kt,itemRef:kt,itemScope:qe,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qe,optimum:me,pattern:null,ping:kt,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:kt,required:qe,reversed:qe,rows:me,rowSpan:me,sandbox:kt,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Xt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:wv}),Rj=ua({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qn,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:kt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ea,g2:ea,glyphName:ea,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vv}),bv=ua({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()}}),kv=ua({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wv}),Sv=ua({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Pj={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"},Aj=/[A-Z]/g,L0=/-[a-z]/g,_j=/^data[-\w.:]+$/i;function Ij(e,t){const n=Df(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"&&_j.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(L0,Dj);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!L0.test(s)){let l=s.replace(Aj,Lj);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=kp}return new a(i,t)}function Lj(e){return"-"+e.toLowerCase()}function Dj(e){return e.charAt(1).toUpperCase()}const Mj=xv([yv,Tj,bv,kv,Sv],"html"),Sp=xv([yv,Rj,bv,kv,Sv],"svg");function Oj(e){return e.join(" ").trim()}var Wi={},Vd,D0;function zj(){if(D0)return Vd;D0=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,T=1;function $(G){var F=G.match(t);F&&(j+=F.length);var W=G.lastIndexOf(f);T=~W?G.length-W:T+G.length}function V(){var G={line:j,column:T};return function(F){return F.position=new L(G),re(),F}}function L(G){this.start=G,this.end={line:j,column:T},this.source=C.source}L.prototype.content=N;function A(G){var F=new Error(C.source+":"+j+":"+T+": "+G);if(F.reason=G,F.filename=C.source,F.line=j,F.column=T,F.source=N,!C.silent)throw F}function U(G){var F=G.exec(N);if(F){var W=F[0];return $(W),N=N.slice(W.length),F}}function re(){U(n)}function O(G){var F;for(G=G||[];F=J();)F!==!1&&G.push(F);return G}function J(){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 W=N.slice(2,F-2);return T+=2,$(W),N=N.slice(F),T+=2,G({type:v,comment:W})}}function _(){var G=V(),F=U(i);if(F){if(J(),!U(a))return A("property missing ':'");var W=U(s),ne=G({type:y,property:w(F[0].replace(e,m)),value:W?w(W[0].replace(e,m)):m});return U(l),ne}}function oe(){var G=[];O(G);for(var F;F=_();)F!==!1&&(G.push(F),O(G));return G}return re(),oe()}function w(N){return N?N.replace(d,m):m}return Vd=S,Vd}var M0;function Fj(){if(M0)return Wi;M0=1;var e=Wi&&Wi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.default=n;const t=e(zj());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 Wi}var Za={},O0;function $j(){if(O0)return Za;O0=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(p){return!p||n.test(p)||e.test(p)},l=function(p,g){return g.toUpperCase()},d=function(p,g){return"".concat(g,"-")},f=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(a,d):p=p.replace(i,d),p.replace(t,l))};return Za.camelCase=f,Za}var es,z0;function Bj(){if(z0)return es;z0=1;var e=es&&es.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Fj()),n=$j();function i(a,s){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(d,f){d&&f&&(l[(0,n.camelCase)(d,s)]=f)}),l}return i.default=i,es=i,es}var Uj=Bj();const Hj=Tc(Uj),Nv=Cv("end"),Np=Cv("start");function Cv(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 Vj(e){const t=Np(e),n=Nv(e);if(t&&n)return{start:t,end:n}}function cs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?F0(e.position):"start"in e||"end"in e?F0(e):"line"in e||"column"in e?zf(e):""}function zf(e){return $0(e&&e.line)+":"+$0(e&&e.column)}function F0(e){return zf(e&&e.start)+"-"+zf(e&&e.end)}function $0(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let a="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(l=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?s.ruleId=i:(s.source=i.slice(0,f),s.ruleId=i.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){const f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=d?d.line:void 0,this.name=cs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="";bn.prototype.name="";bn.prototype.reason="";bn.prototype.message="";bn.prototype.stack="";bn.prototype.column=void 0;bn.prototype.line=void 0;bn.prototype.ancestors=void 0;bn.prototype.cause=void 0;bn.prototype.fatal=void 0;bn.prototype.place=void 0;bn.prototype.ruleId=void 0;bn.prototype.source=void 0;const Cp={}.hasOwnProperty,Wj=new Map,Kj=/[A-Z]/g,Yj=new Set(["table","tbody","thead","tfoot","tr"]),Gj=new Set(["td","th"]),Ev="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qj(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=rT(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=nT(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Sp:Mj,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=jv(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function jv(e,t,n){if(t.type==="element")return Xj(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Qj(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Zj(e,t,n);if(t.type==="mdxjsEsm")return Jj(e,t);if(t.type==="root")return eT(e,t,n);if(t.type==="text")return tT(e,t)}function Xj(e,t,n){const i=e.schema;let a=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=Sp,e.schema=a),e.ancestors.push(t);const s=Rv(e,t.tagName,!1),l=oT(e,t);let d=jp(e,t);return Yj.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!Ej(f):!0})),Tv(e,l,s,t),Ep(l,d),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function Qj(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}gs(e,t.position)}function Jj(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gs(e,t.position)}function Zj(e,t,n){const i=e.schema;let a=i;t.name==="svg"&&i.space==="html"&&(a=Sp,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:Rv(e,t.name,!0),l=iT(e,t),d=jp(e,t);return Tv(e,l,s,t),Ep(l,d),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function eT(e,t,n){const i={};return Ep(i,jp(e,t)),e.create(t,e.Fragment,i,n)}function tT(e,t){return t.value}function Tv(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Ep(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nT(e,t,n){return i;function i(a,s,l,d){const p=Array.isArray(l.children)?n:t;return d?p(s,l,d):p(s,l)}}function rT(e,t){return n;function n(i,a,s,l){const d=Array.isArray(s.children),f=Np(i);return t(a,s,l,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function oT(e,t){const n={};let i,a;for(a in t.properties)if(a!=="children"&&Cp.call(t.properties,a)){const s=aT(e,a,t.properties[a]);if(s){const[l,d]=s;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&Gj.has(t.tagName)?i=d:n[l]=d}}if(i){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function iT(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const l=s.expression;l.type;const d=l.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else gs(e,t.position);else{const a=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,s=e.evaluater.evaluateExpression(d.expression)}else gs(e,t.position);else s=i.value===null?!0:i.value;n[a]=s}return n}function jp(e,t){const n=[];let i=-1;const a=e.passKeys?new Map:Wj;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=jv(e,s,l);d!==void 0&&n.push(d)}return n}function aT(e,t,n){const i=Ij(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?bj(n):Oj(n)),i.property==="style"){let a=typeof n=="object"?n:sT(e,String(n));return e.stylePropertyNameCase==="css"&&(a=lT(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?Pj[i.property]||i.property:i.attribute,n]}}function sT(e,t){try{return Hj(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=Ev+"#cannot-parse-style-attribute",a}}function Rv(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=A0(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=A0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const a=i.value;return Cp.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);gs(e)}function gs(e,t){const n=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ev+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lT(e){const t={};let n;for(n in e)Cp.call(e,n)&&(t[cT(n)]=e[n]);return t}function cT(e){let t=e.replace(Kj,uT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uT(e){return"-"+e.toLowerCase()}const Wd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},dT={};function Tp(e,t){const n=dT,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pv(e,i,a)}function Pv(e,t,n){if(fT(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return B0(e.children,t,n)}return Array.isArray(e)?B0(e,t,n):""}function B0(e,t,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=Pv(e[a],t,n);return i.join("")}function fT(e){return!!(e&&typeof e=="object")}const U0=document.createElement("i");function Rp(e){const t="&"+e+";";U0.innerHTML=t;const n=U0.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 H0={}.hasOwnProperty;function Av(e){const t={};let n=-1;for(;++n<e.length;)pT(t,e[n]);return t}function pT(e,t){let n;for(n in t){const a=(H0.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){H0.call(a,l)||(a[l]=[]);const d=s[l];hT(a[l],Array.isArray(d)?d:d?[d]:[])}}}function hT(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Jn(e,0,0,i)}function _v(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 kr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rn=Wo(/[A-Za-z]/),vn=Wo(/[\dA-Za-z]/),mT=Wo(/[#-'*+\--9=?A-Z^-~]/);function xc(e){return e!==null&&(e<32||e===127)}const Ff=Wo(/\d/),gT=Wo(/[\dA-Fa-f]/),xT=Wo(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function wt(e){return e!==null&&(e<0||e===32)}function et(e){return e===-2||e===-1||e===32}const Oc=Wo(new RegExp("\\p{P}|\\p{S}","u")),gi=Wo(/\s/);function Wo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function da(e){const t=[];let n=-1,i=0,a=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&vn(e.charCodeAt(n+1))&&vn(e.charCodeAt(n+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const d=e.charCodeAt(n+1);s<56320&&d>56319&&d<57344?(l=String.fromCharCode(s,d),a=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(i)}function ot(e,t,n,i){const a=i?i-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(f){return et(f)?(e.enter(n),d(f)):t(f)}function d(f){return et(f)&&s++<a?(e.consume(f),d):(e.exit(n),t(f))}}const yT={tokenize:vT};function vT(e){const t=e.attempt(this.parser.constructs.contentInitial,i,a);let n;return t;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ot(e,t,"linePrefix")}function a(d){return e.enter("paragraph"),s(d)}function s(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(d)}function l(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return He(d)?(e.consume(d),e.exit("chunkText"),s):(e.consume(d),l)}}const wT={tokenize:bT},V0={tokenize:kT};function bT(e){const t=this,n=[];let i=0,a,s,l;return d;function d(T){if(i<n.length){const $=n[i];return t.containerState=$[1],e.attempt($[0].continuation,f,p)(T)}return p(T)}function f(T){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&j();const $=t.events.length;let V=$,L;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){L=t.events[V][1].end;break}C(i);let A=$;for(;A<t.events.length;)t.events[A][1].end={...L},A++;return Jn(t.events,V+1,0,t.events.slice($)),t.events.length=A,p(T)}return d(T)}function p(T){if(i===n.length){if(!a)return v(T);if(a.currentConstruct&&a.currentConstruct.concrete)return S(T);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(V0,g,m)(T)}function g(T){return a&&j(),C(i),v(T)}function m(T){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,S(T)}function v(T){return t.containerState={},e.attempt(V0,y,S)(T)}function y(T){return i++,n.push([t.currentConstruct,t.containerState]),v(T)}function S(T){if(T===null){a&&j(),C(0),e.consume(T);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),w(T)}function w(T){if(T===null){N(e.exit("chunkFlow"),!0),C(0),e.consume(T);return}return He(T)?(e.consume(T),N(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(T),w)}function N(T,$){const V=t.sliceStream(T);if($&&V.push(null),T.previous=s,s&&(s.next=T),s=T,a.defineSkip(T.start),a.write(V),t.parser.lazy[T.start.line]){let L=a.events.length;for(;L--;)if(a.events[L][1].start.offset<l&&(!a.events[L][1].end||a.events[L][1].end.offset>l))return;const A=t.events.length;let U=A,re,O;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(re){O=t.events[U][1].end;break}re=!0}for(C(i),L=A;L<t.events.length;)t.events[L][1].end={...O},L++;Jn(t.events,U+1,0,t.events.slice(A)),t.events.length=L}}function C(T){let $=n.length;for(;$-- >T;){const V=n[$];t.containerState=V[1],V[0].exit.call(t,e)}n.length=T}function j(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function kT(e,t,n){return ot(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ia(e){if(e===null||wt(e)||gi(e))return 1;if(Oc(e))return 2}function zc(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 $f={name:"attention",resolveAll:ST,tokenize:NT};function ST(e,t){let n=-1,i,a,s,l,d,f,p,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},v={...e[n][1].start};W0(m,-f),W0(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,zc(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),p=lr(p,[["exit",s,t],["enter",d,t],["exit",d,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,p=lr(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Jn(e,i-1,n-i+3,p),n=i+p.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function NT(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=ia(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=ia(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 W0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const CT={name:"autolink",tokenize:ET};function ET(e,t,n){let i=0;return a;function a(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(y){return Rn(y)?(e.consume(y),l):y===64?n(y):p(y)}function l(y){return y===43||y===45||y===46||vn(y)?(i=1,d(y)):p(y)}function d(y){return y===58?(e.consume(y),i=0,f):(y===43||y===45||y===46||vn(y))&&i++<32?(e.consume(y),d):(i=0,p(y))}function f(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||xc(y)?n(y):(e.consume(y),f)}function p(y){return y===64?(e.consume(y),g):mT(y)?(e.consume(y),p):n(y)}function g(y){return vn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),i=0,g):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):v(y)}function v(y){if((y===45||vn(y))&&i++<63){const S=y===45?v:m;return e.consume(y),S}return n(y)}}const _s={partial:!0,tokenize:jT};function jT(e,t,n){return i;function i(s){return et(s)?ot(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||He(s)?t(s):n(s)}}const Iv={continuation:{tokenize:RT},exit:PT,name:"blockQuote",tokenize:TT};function TT(e,t,n){const i=this;return a;function a(l){if(l===62){const d=i.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return et(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function RT(e,t,n){const i=this;return a;function a(l){return et(l)?ot(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(Iv,t,n)(l)}}function PT(e){e.exit("blockQuote")}const Lv={name:"characterEscape",tokenize:AT};function AT(e,t,n){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),a}function a(s){return xT(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Dv={name:"characterReference",tokenize:_T};function _T(e,t,n){const i=this;let a=0,s,l;return d;function d(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),s=31,l=vn,g(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=gT,g):(e.enter("characterReferenceValue"),s=7,l=Ff,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 K0={partial:!0,tokenize:LT},Y0={concrete:!0,name:"codeFenced",tokenize:IT};function IT(e,t,n){const i=this,a={partial:!0,tokenize:V};let s=0,l=0,d;return f;function f(L){return p(L)}function p(L){const A=i.events[i.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,d=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(L)}function g(L){return L===d?(l++,e.consume(L),g):l<3?n(L):(e.exit("codeFencedFenceSequence"),et(L)?ot(e,m,"whitespace")(L):m(L))}function m(L){return L===null||He(L)?(e.exit("codeFencedFence"),i.interrupt?t(L):e.check(K0,w,$)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(L))}function v(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):et(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ot(e,y,"whitespace")(L)):L===96&&L===d?n(L):(e.consume(L),v)}function y(L){return L===null||He(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(L))}function S(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===d?n(L):(e.consume(L),S)}function w(L){return e.attempt(a,$,N)(L)}function N(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),C}function C(L){return s>0&&et(L)?ot(e,j,"linePrefix",s+1)(L):j(L)}function j(L){return L===null||He(L)?e.check(K0,w,$)(L):(e.enter("codeFlowValue"),T(L))}function T(L){return L===null||He(L)?(e.exit("codeFlowValue"),j(L)):(e.consume(L),T)}function $(L){return e.exit("codeFenced"),t(L)}function V(L,A,U){let re=0;return O;function O(F){return L.enter("lineEnding"),L.consume(F),L.exit("lineEnding"),J}function J(F){return L.enter("codeFencedFence"),et(F)?ot(L,_,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):_(F)}function _(F){return F===d?(L.enter("codeFencedFenceSequence"),oe(F)):U(F)}function oe(F){return F===d?(re++,L.consume(F),oe):re>=l?(L.exit("codeFencedFenceSequence"),et(F)?ot(L,G,"whitespace")(F):G(F)):U(F)}function G(F){return F===null||He(F)?(L.exit("codeFencedFence"),A(F)):U(F)}}}function LT(e,t,n){const i=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const Kd={name:"codeIndented",tokenize:MT},DT={partial:!0,tokenize:OT};function MT(e,t,n){const i=this;return a;function a(p){return e.enter("codeIndented"),ot(e,s,"linePrefix",5)(p)}function s(p){const g=i.events[i.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?f(p):He(p)?e.attempt(DT,l,f)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||He(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),d)}function f(p){return e.exit("codeIndented"),t(p)}}function OT(e,t,n){const i=this;return a;function a(l){return i.parser.lazy[i.now().line]?n(l):He(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):ot(e,s,"linePrefix",5)(l)}function s(l){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):He(l)?a(l):n(l)}}const zT={name:"codeText",previous:$T,resolve:FT,tokenize:BT};function FT(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="codeTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function $T(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BT(e,t,n){let i=0,a,s;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),d(m)}function d(m){return m===96?(e.consume(m),i++,d):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(s=e.enter("codeTextSequence"),a=0,g(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),p)}function g(m){return m===96?(e.consume(m),a++,g):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(s.type="codeTextData",p(m))}}class UT{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return i&&ts(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ts(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ts(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ts(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ts(this.left,n.reverse())}}}function ts(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Mv(e){const t={};let n=-1,i,a,s,l,d,f,p;const g=new UT(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(i=g.get(n),n&&i[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,HT(g,n)),n=t[n],p=!0);else if(i[1]._container){for(s=n,a=void 0;s--;)if(l=g.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(i[1].end={...g.get(a)[1].start},d=g.slice(a,n),d.unshift(i),g.splice(a,n-a+1,d))}}return Jn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function HT(e,t){const n=e.get(t)[1],i=e.get(t)[2];let a=t-1;const s=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const d=l.events,f=[],p={};let g,m,v=-1,y=n,S=0,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 VT={resolve:KT,tokenize:YT},WT={partial:!0,tokenize:GT};function KT(e){return Mv(e),e}function YT(e,t){let n;return i;function i(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(d)}function a(d){return d===null?s(d):He(d)?e.check(WT,l,s)(d):(e.consume(d),a)}function s(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function l(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function GT(e,t,n){const i=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ot(e,s,"linePrefix")}function s(l){if(l===null||He(l))return n(l);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function Ov(e,t,n,i,a,s,l,d,f){const p=f||Number.POSITIVE_INFINITY;let g=0;return m;function m(C){return C===60?(e.enter(i),e.enter(a),e.enter(s),e.consume(C),e.exit(s),v):C===null||C===32||C===41||xc(C)?n(C):(e.enter(i),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),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||He(C)?n(C):(e.consume(C),C===92?S:y)}function S(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function w(C){return!g&&(C===null||C===41||wt(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||xc(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 zv(e,t,n,i,a,s){const l=this;let d=0,f;return p;function p(y){return e.enter(i),e.enter(a),e.consume(y),e.exit(a),e.enter(s),g}function g(y){return d>999||y===null||y===91||y===93&&!f||y===94&&!d&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(s),e.enter(a),e.consume(y),e.exit(a),e.exit(i),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||d++>999?(e.exit("chunkString"),g(y)):(e.consume(y),f||(f=!et(y)),y===92?v:m)}function v(y){return y===91||y===92||y===93?(e.consume(y),d++,m):m(y)}}function Fv(e,t,n,i,a,s){let l;return d;function d(v){return v===34||v===39||v===40?(e.enter(i),e.enter(a),e.consume(v),e.exit(a),l=v===40?41:v,f):n(v)}function f(v){return v===l?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),t):(e.enter(s),p(v))}function p(v){return v===l?(e.exit(s),f(l)):v===null?n(v):He(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),ot(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===l||v===null||He(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?m:g)}function m(v){return v===l||v===92?(e.consume(v),g):g(v)}}function us(e,t){let n;return i;function i(a){return He(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,i):et(a)?ot(e,i,n?"linePrefix":"lineSuffix")(a):t(a)}}const qT={name:"definition",tokenize:QT},XT={partial:!0,tokenize:JT};function QT(e,t,n){const i=this;let a;return s;function s(y){return e.enter("definition"),l(y)}function l(y){return zv.call(i,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function d(y){return a=kr(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 wt(y)?us(e,p)(y):p(y)}function p(y){return Ov(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function g(y){return e.attempt(XT,m,m)(y)}function m(y){return et(y)?ot(e,v,"whitespace")(y):v(y)}function v(y){return y===null||He(y)?(e.exit("definition"),i.parser.defined.push(a),t(y)):n(y)}}function JT(e,t,n){return i;function i(d){return wt(d)?us(e,a)(d):n(d)}function a(d){return Fv(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return et(d)?ot(e,l,"whitespace")(d):l(d)}function l(d){return d===null||He(d)?t(d):n(d)}}const ZT={name:"hardBreakEscape",tokenize:eR};function eR(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return He(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const tR={name:"headingAtx",resolve:nR,tokenize:rR};function nR(e,t){let n=e.length-2,i=3,a,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(a={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Jn(e,i,n-i+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function rR(e,t,n){let i=0;return a;function a(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&i++<6?(e.consume(g),l):g===null||wt(g)?(e.exit("atxHeadingSequence"),d(g)):n(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||He(g)?(e.exit("atxHeading"),t(g)):et(g)?ot(e,d,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),d(g))}function p(g){return g===null||g===35||wt(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),p)}}const oR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],G0=["pre","script","style","textarea"],iR={concrete:!0,name:"htmlFlow",resolveTo:lR,tokenize:cR},aR={partial:!0,tokenize:dR},sR={partial:!0,tokenize:uR};function lR(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function cR(e,t,n){const i=this;let a,s,l,d,f;return p;function p(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:R):Rn(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):Rn(P)?(e.consume(P),a=4,i.interrupt?t:R):n(P)}function y(P){return P===45?(e.consume(P),i.interrupt?t:R):n(P)}function S(P){const se="CDATA[";return P===se.charCodeAt(d++)?(e.consume(P),d===se.length?i.interrupt?t:_:S):n(P)}function w(P){return Rn(P)?(e.consume(P),l=String.fromCharCode(P),N):n(P)}function N(P){if(P===null||P===47||P===62||wt(P)){const se=P===47,ve=l.toLowerCase();return!se&&!s&&G0.includes(ve)?(a=1,i.interrupt?t(P):_(P)):oR.includes(l.toLowerCase())?(a=6,se?(e.consume(P),C):i.interrupt?t(P):_(P)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(P):s?j(P):T(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):O(P)}function T(P){return P===47?(e.consume(P),O):P===58||P===95||Rn(P)?(e.consume(P),$):et(P)?(e.consume(P),T):O(P)}function $(P){return P===45||P===46||P===58||P===95||vn(P)?(e.consume(P),$):V(P)}function V(P){return P===61?(e.consume(P),L):et(P)?(e.consume(P),V):T(P)}function L(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),L):U(P)}function A(P){return P===f?(e.consume(P),f=null,re):P===null||He(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||wt(P)?V(P):(e.consume(P),U)}function re(P){return P===47||P===62||et(P)?T(P):n(P)}function O(P){return P===62?(e.consume(P),J):n(P)}function J(P){return P===null||He(P)?_(P):et(P)?(e.consume(P),J):n(P)}function _(P){return P===45&&a===2?(e.consume(P),W):P===60&&a===1?(e.consume(P),ne):P===62&&a===4?(e.consume(P),M):P===63&&a===3?(e.consume(P),R):P===93&&a===5?(e.consume(P),ee):He(P)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(aR,X,oe)(P)):P===null||He(P)?(e.exit("htmlFlowData"),oe(P)):(e.consume(P),_)}function oe(P){return e.check(sR,G,X)(P)}function G(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),F}function F(P){return P===null||He(P)?oe(P):(e.enter("htmlFlowData"),_(P))}function W(P){return P===45?(e.consume(P),R):_(P)}function ne(P){return P===47?(e.consume(P),l="",I):_(P)}function I(P){if(P===62){const se=l.toLowerCase();return G0.includes(se)?(e.consume(P),M):_(P)}return Rn(P)&&l.length<8?(e.consume(P),l+=String.fromCharCode(P),I):_(P)}function ee(P){return P===93?(e.consume(P),R):_(P)}function R(P){return P===62?(e.consume(P),M):P===45&&a===2?(e.consume(P),R):_(P)}function M(P){return P===null||He(P)?(e.exit("htmlFlowData"),X(P)):(e.consume(P),M)}function X(P){return e.exit("htmlFlow"),t(P)}}function uR(e,t,n){const i=this;return a;function a(l){return He(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function dR(e,t,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(_s,t,n)}}const fR={name:"htmlText",tokenize:pR};function pR(e,t,n){const i=this;let a,s,l;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),V):R===63?(e.consume(R),T):Rn(R)?(e.consume(R),U):n(R)}function p(R){return R===45?(e.consume(R),g):R===91?(e.consume(R),s=0,S):Rn(R)?(e.consume(R),j):n(R)}function g(R){return R===45?(e.consume(R),y):n(R)}function m(R){return R===null?n(R):R===45?(e.consume(R),v):He(R)?(l=m,ne(R)):(e.consume(R),m)}function v(R){return R===45?(e.consume(R),y):m(R)}function y(R){return R===62?W(R):R===45?v(R):m(R)}function S(R){const M="CDATA[";return R===M.charCodeAt(s++)?(e.consume(R),s===M.length?w:S):n(R)}function w(R){return R===null?n(R):R===93?(e.consume(R),N):He(R)?(l=w,ne(R)):(e.consume(R),w)}function N(R){return R===93?(e.consume(R),C):w(R)}function C(R){return R===62?W(R):R===93?(e.consume(R),C):w(R)}function j(R){return R===null||R===62?W(R):He(R)?(l=j,ne(R)):(e.consume(R),j)}function T(R){return R===null?n(R):R===63?(e.consume(R),$):He(R)?(l=T,ne(R)):(e.consume(R),T)}function $(R){return R===62?W(R):T(R)}function V(R){return Rn(R)?(e.consume(R),L):n(R)}function L(R){return R===45||vn(R)?(e.consume(R),L):A(R)}function A(R){return He(R)?(l=A,ne(R)):et(R)?(e.consume(R),A):W(R)}function U(R){return R===45||vn(R)?(e.consume(R),U):R===47||R===62||wt(R)?re(R):n(R)}function re(R){return R===47?(e.consume(R),W):R===58||R===95||Rn(R)?(e.consume(R),O):He(R)?(l=re,ne(R)):et(R)?(e.consume(R),re):W(R)}function O(R){return R===45||R===46||R===58||R===95||vn(R)?(e.consume(R),O):J(R)}function J(R){return R===61?(e.consume(R),_):He(R)?(l=J,ne(R)):et(R)?(e.consume(R),J):re(R)}function _(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),a=R,oe):He(R)?(l=_,ne(R)):et(R)?(e.consume(R),_):(e.consume(R),G)}function oe(R){return R===a?(e.consume(R),a=void 0,F):R===null?n(R):He(R)?(l=oe,ne(R)):(e.consume(R),oe)}function G(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||wt(R)?re(R):(e.consume(R),G)}function F(R){return R===47||R===62||wt(R)?re(R):n(R)}function W(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ne(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),I}function I(R){return et(R)?ot(e,ee,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ee(R)}function ee(R){return e.enter("htmlTextData"),l(R)}}const Pp={name:"labelEnd",resolveAll:xR,resolveTo:yR,tokenize:vR},hR={tokenize:wR},mR={tokenize:bR},gR={tokenize:kR};function xR(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const a=i.type==="labelImage"?4:2;i.type="data",t+=a}}return e.length!==n.length&&Jn(e,0,e.length,n),e}function yR(e,t){let n=e.length,i=0,a,s,l,d;for(;n--;)if(a=e[n][1],s){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(s=n,a.type!=="labelLink")){i=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",f,t],["enter",p,t]],d=lr(d,e.slice(s+1,s+i+3)),d=lr(d,[["enter",g,t]]),d=lr(d,zc(t.parser.constructs.insideSpan.null,e.slice(s+i+4,l-3),t)),d=lr(d,[["exit",g,t],e[l-2],e[l-1],["exit",p,t]]),d=lr(d,e.slice(l+1)),d=lr(d,[["exit",f,t]]),Jn(e,s,e.length,d),e}function vR(e,t,n){const i=this;let a=i.events.length,s,l;for(;a--;)if((i.events[a][1].type==="labelImage"||i.events[a][1].type==="labelLink")&&!i.events[a][1]._balanced){s=i.events[a][1];break}return d;function d(v){return s?s._inactive?m(v):(l=i.parser.defined.includes(kr(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):n(v)}function f(v){return v===40?e.attempt(hR,g,l?g:m)(v):v===91?e.attempt(mR,g,l?p:m)(v):l?g(v):m(v)}function p(v){return e.attempt(gR,g,m)(v)}function g(v){return t(v)}function m(v){return s._balanced=!0,n(v)}}function wR(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return wt(m)?us(e,s)(m):s(m)}function s(m){return m===41?g(m):Ov(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return wt(m)?us(e,f)(m):g(m)}function d(m){return n(m)}function f(m){return m===34||m===39||m===40?Fv(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function p(m){return wt(m)?us(e,g)(m):g(m)}function g(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function bR(e,t,n){const i=this;return a;function a(d){return zv.call(i,e,s,l,"reference","referenceMarker","referenceString")(d)}function s(d){return i.parser.defined.includes(kr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function kR(e,t,n){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),a}function a(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const SR={name:"labelStartImage",resolveAll:Pp.resolveAll,tokenize:NR};function NR(e,t,n){const i=this;return a;function a(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),s}function s(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),l):n(d)}function l(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):t(d)}}const CR={name:"labelStartLink",resolveAll:Pp.resolveAll,tokenize:ER};function ER(e,t,n){const i=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const Yd={name:"lineEnding",tokenize:jR};function jR(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ot(e,t,"linePrefix")}}const sc={name:"thematicBreak",tokenize:TR};function TR(e,t,n){let i=0,a;return s;function s(p){return e.enter("thematicBreak"),l(p)}function l(p){return a=p,d(p)}function d(p){return p===a?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||He(p))?(e.exit("thematicBreak"),t(p)):n(p)}function f(p){return p===a?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),et(p)?ot(e,d,"whitespace")(p):d(p))}}const Fn={continuation:{tokenize:_R},exit:LR,name:"list",tokenize:AR},RR={partial:!0,tokenize:DR},PR={partial:!0,tokenize:IR};function AR(e,t,n){const i=this,a=i.events[i.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return d;function d(y){const S=i.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||y===i.containerState.marker:Ff(y)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(sc,n,p)(y):p(y);if(!i.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(y)}return n(y)}function f(y){return Ff(y)&&++l<10?(e.consume(y),f):(!i.interrupt||l<2)&&(i.containerState.marker?y===i.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),p(y)):n(y)}function p(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||y,e.check(_s,i.interrupt?n:g,e.attempt(RR,v,m))}function g(y){return i.containerState.initialBlankLine=!0,s++,v(y)}function m(y){return et(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),v):n(y)}function v(y){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function _R(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(_s,a,s);function a(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ot(e,t,"listItemIndent",i.containerState.size+1)(d)}function s(d){return i.containerState.furtherBlankLines||!et(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(PR,t,l)(d))}function l(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,ot(e,e.attempt(Fn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function IR(e,t,n){const i=this;return ot(e,a,"listItemIndent",i.containerState.size+1);function a(s){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(s):n(s)}}function LR(e){e.exit(this.containerState.type)}function DR(e,t,n){const i=this;return ot(e,a,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const l=i.events[i.events.length-1];return!et(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const q0={name:"setextUnderline",resolveTo:MR,tokenize:OR};function MR(e,t){let n=e.length,i,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",l,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function OR(e,t,n){const i=this;let a;return s;function s(p){let g=i.events.length,m;for(;g--;)if(i.events[g][1].type!=="lineEnding"&&i.events[g][1].type!=="linePrefix"&&i.events[g][1].type!=="content"){m=i.events[g][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),a=p,l(p)):n(p)}function l(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===a?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),et(p)?ot(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||He(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const zR={tokenize:FR};function FR(e){const t=this,n=e.attempt(_s,i,e.attempt(this.parser.constructs.flowInitial,a,ot(e,e.attempt(this.parser.constructs.flow,a,e.attempt(VT,a)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $R={resolveAll:Bv()},BR=$v("string"),UR=$v("text");function $v(e){return{resolveAll:Bv(e==="text"?HR:void 0),tokenize:t};function t(n){const i=this,a=this.parser.constructs[e],s=n.attempt(a,l,d);return l;function l(g){return p(g)?s(g):d(g)}function d(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),f}function f(g){return p(g)?(n.exit("data"),s(g)):(n.consume(g),f)}function p(g){if(g===null)return!0;const m=a[g];let v=-1;if(m)for(;++v<m.length;){const y=m[v];if(!y.previous||y.previous.call(i,i.previous))return!0}return!1}}}function Bv(e){return t;function t(n,i){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,i):n}}function HR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],a=t.sliceStream(i);let s=a.length,l=-1,d=0,f;for(;s--;){const p=a[s];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)d++,l--;if(l)break;l=-1}else if(p===-2)f=!0,d++;else if(p!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const p={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const VR={42:Fn,43:Fn,45:Fn,48:Fn,49:Fn,50:Fn,51:Fn,52:Fn,53:Fn,54:Fn,55:Fn,56:Fn,57:Fn,62:Iv},WR={91:qT},KR={[-2]:Kd,[-1]:Kd,32:Kd},YR={35:tR,42:sc,45:[q0,sc],60:iR,61:q0,95:sc,96:Y0,126:Y0},GR={38:Dv,92:Lv},qR={[-5]:Yd,[-4]:Yd,[-3]:Yd,33:SR,38:Dv,42:$f,60:[CT,fR],91:CR,92:[ZT,Lv],93:Pp,95:$f,96:zT},XR={null:[$f,$R]},QR={null:[42,95]},JR={null:[]},ZR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:QR,contentInitial:WR,disable:JR,document:VR,flow:YR,flowInitial:KR,insideSpan:XR,string:GR,text:qR},Symbol.toStringTag,{value:"Module"}));function eP(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},s=[];let l=[],d=[];const f={attempt:A(V),check:A(L),consume:j,enter:T,exit:$,interrupt:A(L,{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(J){return l=lr(l,J),N(),l[l.length-1]!==null?[]:(U(t,0),p.events=zc(s,p.events,p),p.events)}function v(J,_){return nP(y(J),_)}function y(J){return tP(l,J)}function S(){const{_bufferIndex:J,_index:_,line:oe,column:G,offset:F}=i;return{_bufferIndex:J,_index:_,line:oe,column:G,offset:F}}function w(J){a[J.line]=J.column,O()}function N(){let J;for(;i._index<l.length;){const _=l[i._index];if(typeof _=="string")for(J=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===J&&i._bufferIndex<_.length;)C(_.charCodeAt(i._bufferIndex));else C(_)}}function C(J){g=g(J)}function j(J){He(J)?(i.line++,i.column=1,i.offset+=J===-3?2:1,O()):J!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=J}function T(J,_){const oe=_||{};return oe.type=J,oe.start=S(),p.events.push(["enter",oe,p]),d.push(oe),oe}function $(J){const _=d.pop();return _.end=S(),p.events.push(["exit",_,p]),_}function V(J,_){U(J,_.from)}function L(J,_){_.restore()}function A(J,_){return oe;function oe(G,F,W){let ne,I,ee,R;return Array.isArray(G)?X(G):"tokenize"in G?X([G]):M(G);function M(de){return q;function q(pe){const we=pe!==null&&de[pe],be=pe!==null&&de.null,Me=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(be)?be:be?[be]:[]];return X(Me)(pe)}}function X(de){return ne=de,I=0,de.length===0?W:P(de[I])}function P(de){return q;function q(pe){return R=re(),ee=de,de.partial||(p.currentConstruct=de),de.name&&p.parser.constructs.disable.null.includes(de.name)?ve():de.tokenize.call(_?Object.assign(Object.create(p),_):p,f,se,ve)(pe)}}function se(de){return J(ee,R),F}function ve(de){return R.restore(),++I<ne.length?P(ne[I]):W}}}function U(J,_){J.resolveAll&&!s.includes(J)&&s.push(J),J.resolve&&Jn(p.events,_,p.events.length-_,J.resolve(p.events.slice(_),p)),J.resolveTo&&(p.events=J.resolveTo(p.events,p))}function re(){const J=S(),_=p.previous,oe=p.currentConstruct,G=p.events.length,F=Array.from(d);return{from:G,restore:W};function W(){i=J,p.previous=_,p.currentConstruct=oe,p.events.length=G,d=F,O()}}function O(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function tP(e,t){const n=t.start._index,i=t.start._bufferIndex,a=t.end._index,s=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(i,s)];else{if(l=e.slice(n,a),i>-1){const d=l[0];typeof d=="string"?l[0]=d.slice(i):l.shift()}s>0&&l.push(e[a].slice(0,s))}return l}function nP(e,t){let n=-1;const i=[];let a;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
|
|
13
|
+
`;break}case-3:{l=`\r
|
|
14
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(s)}a=s===-2,i.push(l)}return i.join("")}function rP(e){const i={constructs:Av([ZR,...(e||{}).extensions||[]]),content:a(yT),defined:[],document:a(wT),flow:a(zR),lazy:{},string:a(BR),text:a(UR)};return i;function a(s){return l;function l(d){return eP(i,s,d)}}}function oP(e){for(;!Mv(e););return e}const X0=/[\0\t\n\r]/g;function iP(){let e=1,t="",n=!0,i;return a;function a(s,l,d){const f=[];let p,g,m,v,y;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),m=0,t="",n&&(s.charCodeAt(0)===65279&&m++,n=void 0);m<s.length;){if(X0.lastIndex=m,p=X0.exec(s),v=p&&p.index!==void 0?p.index:s.length,y=s.charCodeAt(v),!p){t=s.slice(m);break}if(y===10&&m===v&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<v&&(f.push(s.slice(m,v)),e+=v-m),y){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=v+1}return d&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const aP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sP(e){return e.replace(aP,lP)}function lP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return _v(n.slice(s?2:1),s?16:10)}return Rp(n)||e}const Uv={}.hasOwnProperty;function cP(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),uP(n)(oP(rP(n).document().write(iP()(e,t,!0))))}function uP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ut),autolinkProtocol:re,autolinkEmail:re,atxHeading:s(kn),blockQuote:s(be),characterEscape:re,characterReference:re,codeFenced:s(Me),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(Me,l),codeText:s(Fe,l),codeTextData:re,data:re,codeFlowValue:re,definition:s(st),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Ot),hardBreakEscape:s(zt),hardBreakTrailing:s(zt),htmlFlow:s(Et,l),htmlFlowData:re,htmlText:s(Et,l),htmlTextData:re,image:s(pr),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(jt)},exit:{atxHeading:f(),atxHeadingSequence:V,autolink:f(),autolinkEmail:we,autolinkProtocol:pe,blockQuote:f(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:de,characterReference:q,codeFenced:f(N),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:S,codeFlowValue:O,codeIndented:f(C),codeText:f(F),codeTextData:O,data:O,definition:f(),definitionDestinationString:$,definitionLabelString:j,definitionTitleString:T,emphasis:f(),hardBreakEscape:f(_),hardBreakTrailing:f(_),htmlFlow:f(oe),htmlFlowData:O,htmlText:f(G),htmlTextData:O,image:f(ne),label:ee,labelText:I,lineEnding:J,link:f(W),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:se,resourceDestinationString:R,resourceTitleString:M,resource:X,setextHeading:f(U),setextHeadingLineSequence:A,setextHeadingText:L,strong:f(),thematicBreak:f()}};Hv(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(B){let ae={type:"root",children:[]};const fe={stack:[ae],tokenStack:[],config:t,enter:d,exit:p,buffer:l,resume:g,data:n},Re=[];let We=-1;for(;++We<B.length;)if(B[We][1].type==="listOrdered"||B[We][1].type==="listUnordered")if(B[We][0]==="enter")Re.push(We);else{const mt=Re.pop();We=a(B,mt,We)}for(We=-1;++We<B.length;){const mt=t[B[We][0]];Uv.call(mt,B[We][1].type)&&mt[B[We][1].type].call(Object.assign({sliceSerialize:B[We][2].sliceSerialize},fe),B[We][1])}if(fe.tokenStack.length>0){const mt=fe.tokenStack[fe.tokenStack.length-1];(mt[1]||Q0).call(fe,void 0,mt[0])}for(ae.position={start:Lo(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Lo(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)ae=t.transforms[We](ae)||ae;return ae}function a(B,ae,fe){let Re=ae-1,We=-1,mt=!1,At,Kt,Ft,Sn;for(;++Re<=fe;){const _t=B[Re];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?We++:We--,Sn=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&(At&&!Sn&&!We&&!Ft&&(Ft=Re),Sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Sn=void 0}if(!We&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||We===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if(At){let Nn=Re;for(Kt=void 0;Nn--;){const en=B[Nn];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;Kt&&(B[Kt][1].type="lineEndingBlank",mt=!0),en[1].type="lineEnding",Kt=Nn}else if(!(en[1].type==="linePrefix"||en[1].type==="blockQuotePrefix"||en[1].type==="blockQuotePrefixWhitespace"||en[1].type==="blockQuoteMarker"||en[1].type==="listItemIndent"))break}Ft&&(!Kt||Ft<Kt)&&(At._spread=!0),At.end=Object.assign({},Kt?B[Kt][1].start:_t[1].end),B.splice(Kt||Re,0,["exit",At,_t[2]]),Re++,fe++}if(_t[1].type==="listItemPrefix"){const Nn={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};At=Nn,B.splice(Re,0,["enter",Nn,_t[2]]),Re++,fe++,Ft=void 0,Sn=!0}}}return B[ae][1]._spread=mt,fe}function s(B,ae){return fe;function fe(Re){d.call(this,B(Re),Re),ae&&ae.call(this,Re)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(B,ae,fe){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([ae,fe||void 0]),B.position={start:Lo(ae.start),end:void 0}}function f(B){return ae;function ae(fe){B&&B.call(this,fe),p.call(this,fe)}}function p(B,ae){const fe=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==B.type&&(ae?ae.call(this,B,Re[0]):(Re[1]||Q0).call(this,B,Re[0]));else throw new Error("Cannot close `"+B.type+"` ("+cs({start:B.start,end:B.end})+"): it’s not open");fe.position.end=Lo(B.end)}function g(){return Tp(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(B){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function y(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=B}function S(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=B}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B.replace(/(\r?\n|\r)$/g,"")}function j(B){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ae,fe.identifier=kr(this.sliceSerialize(B)).toLowerCase()}function T(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.title=B}function $(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.url=B}function V(B){const ae=this.stack[this.stack.length-1];if(!ae.depth){const fe=this.sliceSerialize(B).length;ae.depth=fe}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function A(B){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function re(B){const fe=this.stack[this.stack.length-1].children;let Re=fe[fe.length-1];(!Re||Re.type!=="text")&&(Re=Zt(),Re.position={start:Lo(B.start),end:void 0},fe.push(Re)),this.stack.push(Re)}function O(B){const ae=this.stack.pop();ae.value+=this.sliceSerialize(B),ae.position.end=Lo(B.end)}function J(B){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const fe=ae.children[ae.children.length-1];fe.position.end=Lo(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(re.call(this,B),O.call(this,B))}function _(){this.data.atHardBreak=!0}function oe(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B}function G(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B}function F(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B}function W(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=ae,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function ne(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=ae,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function I(B){const ae=this.sliceSerialize(B),fe=this.stack[this.stack.length-2];fe.label=sP(ae),fe.identifier=kr(ae).toLowerCase()}function ee(){const B=this.stack[this.stack.length-1],ae=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){const Re=B.children;fe.children=Re}else fe.alt=ae}function R(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.url=B}function M(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.title=B}function X(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function se(B){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ae,fe.identifier=kr(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ve(B){this.data.characterReferenceType=B.type}function de(B){const ae=this.sliceSerialize(B),fe=this.data.characterReferenceType;let Re;fe?(Re=_v(ae,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Rp(ae);const We=this.stack[this.stack.length-1];We.value+=Re}function q(B){const ae=this.stack.pop();ae.position.end=Lo(B.end)}function pe(B){O.call(this,B);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(B)}function we(B){O.call(this,B);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(B)}function be(){return{type:"blockquote",children:[]}}function Me(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function st(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ot(){return{type:"emphasis",children:[]}}function kn(){return{type:"heading",depth:0,children:[]}}function zt(){return{type:"break"}}function Et(){return{type:"html",value:""}}function pr(){return{type:"image",title:null,url:"",alt:null}}function Ut(){return{type:"link",title:null,url:"",children:[]}}function Pn(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function An(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function Pt(){return{type:"paragraph",children:[]}}function on(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function jt(){return{type:"thematicBreak"}}}function Lo(e){return{line:e.line,column:e.column,offset:e.offset}}function Hv(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Hv(e,i):dP(e,i)}}function dP(e,t){let n;for(n in t)if(Uv.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 Q0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cs({start:t.start,end:t.end})+") is still open")}function fP(e){const t=this;t.parser=n;function n(i){return cP(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
15
|
+
`}]}function mP(e,t){const n=t.value?t.value+`
|
|
16
|
+
`:"",i={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(i.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function gP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=da(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let l,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=s+1,d+=1,e.footnoteCounts.set(i,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function vP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vv(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=i:a.push({type:"text",value:i}),a}function bP(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Vv(e,t);const a={src:da(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(a.title=i.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function kP(e,t){const n={src:da(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function SP(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function NP(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Vv(e,t);const a={href:da(i.url||"")};i.title!==null&&i.title!==void 0&&(a.title=i.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function CP(e,t){const n={href:da(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function EP(e,t,n){const i=e.all(t),a=n?jP(n):Wv(t),s={},l=[];if(typeof t.checked=="boolean"){const g=i[0];let m;g&&g.type==="element"&&g.tagName==="p"?m=g:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const g=i[d];(a||d!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
|
|
17
|
+
`}),g.type==="element"&&g.tagName==="p"&&!a?l.push(...g.children):l.push(g)}const f=i[i.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
18
|
+
`});const p={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,p),e.applyData(t,p)}function jP(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Wv(n[i])}return t}function Wv(e){const t=e.spread;return t??e.children.length>1}function TP(e,t){const n={},i=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<i.length;){const l=i[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function RP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _P(e,t){const n=e.all(t),i=n.shift(),a=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Np(t.children[1]),f=Nv(t.children[t.children.length-1]);d&&f&&(l.position={start:d,end:f}),a.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function IP(e,t,n){const i=n?n.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,d=l?l.length:t.children.length;let f=-1;const p=[];for(;++f<d;){const m=t.children[f],v={},y=l?l[f]:void 0;y&&(v.align=y);let S={type:"element",tagName:s,properties:v,children:[]};m&&(S.children=e.all(m),e.patch(m,S),S=e.applyData(m,S)),p.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function LP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const J0=9,Z0=32;function DP(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),a=0;const s=[];for(;i;)s.push(ex(t.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(t);return s.push(ex(t.slice(a),a>0,!1)),s.join("")}function ex(e,t,n){let i=0,a=e.length;if(t){let s=e.codePointAt(i);for(;s===J0||s===Z0;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(a-1);for(;s===J0||s===Z0;)a--,s=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function MP(e,t){const n={type:"text",value:DP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function OP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const zP={blockquote:pP,break:hP,code:mP,delete:gP,emphasis:xP,footnoteReference:yP,heading:vP,html:wP,imageReference:bP,image:kP,inlineCode:SP,linkReference:NP,link:CP,listItem:EP,list:TP,paragraph:RP,root:PP,strong:AP,table:_P,tableCell:LP,tableRow:IP,text:MP,thematicBreak:OP,toml:Vl,yaml:Vl,definition:Vl,footnoteDefinition:Vl};function Vl(){}const Kv=-1,Fc=0,ds=1,yc=2,Ap=3,_p=4,Ip=5,Lp=6,Yv=7,Gv=8,tx=typeof self=="object"?self:globalThis,FP=(e,t)=>{const n=(a,s)=>(e.set(s,a),a),i=a=>{if(e.has(a))return e.get(a);const[s,l]=t[a];switch(s){case Fc:case Kv:return n(l,a);case ds:{const d=n([],a);for(const f of l)d.push(i(f));return d}case yc:{const d=n({},a);for(const[f,p]of l)d[i(f)]=i(p);return d}case Ap:return n(new Date(l),a);case _p:{const{source:d,flags:f}=l;return n(new RegExp(d,f),a)}case Ip:{const d=n(new Map,a);for(const[f,p]of l)d.set(i(f),i(p));return d}case Lp:{const d=n(new Set,a);for(const f of l)d.add(i(f));return d}case Yv:{const{name:d,message:f}=l;return n(new tx[d](f),a)}case Gv: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 tx[s](l),a)};return i},nx=e=>FP(new Map,e)(0),Ki="",{toString:$P}={},{keys:BP}=Object,ns=e=>{const t=typeof e;if(t!=="object"||!e)return[Fc,t];const n=$P.call(e).slice(8,-1);switch(n){case"Array":return[ds,Ki];case"Object":return[yc,Ki];case"Date":return[Ap,Ki];case"RegExp":return[_p,Ki];case"Map":return[Ip,Ki];case"Set":return[Lp,Ki];case"DataView":return[ds,n]}return n.includes("Array")?[ds,n]:n.includes("Error")?[Yv,n]:[yc,n]},Wl=([e,t])=>e===Fc&&(t==="function"||t==="symbol"),UP=(e,t,n,i)=>{const a=(l,d)=>{const f=i.push(l)-1;return n.set(d,f),f},s=l=>{if(n.has(l))return n.get(l);let[d,f]=ns(l);switch(d){case Fc:{let g=l;switch(f){case"bigint":d=Gv,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return a([Kv],l)}return a([d,g],l)}case ds:{if(f){let v=l;return f==="DataView"?v=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(v=new Uint8Array(l)),a([f,[...v]],l)}const g=[],m=a([d,g],l);for(const v of l)g.push(s(v));return m}case yc:{if(f)switch(f){case"BigInt":return a([f,l.toString()],l);case"Boolean":case"Number":case"String":return a([f,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const g=[],m=a([d,g],l);for(const v of BP(l))(e||!Wl(ns(l[v])))&&g.push([s(v),s(l[v])]);return m}case Ap:return a([d,l.toISOString()],l);case _p:{const{source:g,flags:m}=l;return a([d,{source:g,flags:m}],l)}case Ip:{const g=[],m=a([d,g],l);for(const[v,y]of l)(e||!(Wl(ns(v))||Wl(ns(y))))&&g.push([s(v),s(y)]);return m}case Lp:{const g=[],m=a([d,g],l);for(const v of l)(e||!Wl(ns(v)))&&g.push(s(v));return m}}const{message:p}=l;return a([d,{name:f,message:p}],l)};return s},rx=(e,{json:t,lossy:n}={})=>{const i=[];return UP(!(t||n),!!t,new Map,i)(e),i},vc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?nx(rx(e,t)):structuredClone(e):(e,t)=>nx(rx(e,t));function HP(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function VP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function WP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||HP,i=e.options.footnoteBackLabel||VP,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const g=e.all(p),m=String(p.identifier).toUpperCase(),v=da(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:{...vc(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
19
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
20
|
+
`}]}}const $c=(function(e){if(e==null)return qP;if(typeof e=="function")return Bc(e);if(typeof e=="object")return Array.isArray(e)?KP(e):YP(e);if(typeof e=="string")return GP(e);throw new Error("Expected function, string, or object as test")});function KP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=$c(e[n]);return Bc(i);function i(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function YP(e){const t=e;return Bc(n);function n(i){const a=i;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function GP(e){return Bc(t);function t(n){return n&&n.type===e}}function Bc(e){return t;function t(n,i,a){return!!(XP(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function qP(){return!0}function XP(e){return e!==null&&typeof e=="object"&&"type"in e}const qv=[],QP=!0,Bf=!1,JP="skip";function Xv(e,t,n,i){let a;typeof t=="function"&&typeof n!="function"?(i=n,n=t):a=t;const s=$c(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=qv,S,w,N;if((!t||s(f,p,g[g.length-1]||void 0))&&(y=ZP(n(f,g)),y[0]===Bf))return y;if("children"in f&&f.children){const C=f;if(C.children&&y[0]!==JP)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]===Bf)return S;w=typeof S[1]=="number"?S[1]:w+l}}return y}}}function ZP(e){return Array.isArray(e)?e:typeof e=="number"?[QP,e]:e==null?qv:[e]}function Dp(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),Xv(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 Uf={}.hasOwnProperty,e4={};function t4(e,t){const n=t||e4,i=new Map,a=new Map,s=new Map,l={...zP,...n.handlers},d={all:p,applyData:r4,definitionById:i,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:l,one:f,options:n,patch:n4,wrap:i4};return Dp(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(Uf.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=vc(N);return C.children=d.all(g),C}return vc(g)}return(d.options.unknownHandler||o4)(d,g,m)}function p(g){const m=[];if("children"in g){const v=g.children;let y=-1;for(;++y<v.length;){const S=d.one(v[y],g);if(S){if(y&&v[y-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=ox(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=ox(w.value))}Array.isArray(S)?m.push(...S):m.push(S)}}}return m}}function n4(e,t){e.position&&(t.position=Vj(e))}function r4(e,t){let n=t;if(e&&e.data){const i=e.data.hName,a=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,vc(s)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function o4(e,t){const n=t.data||{},i="value"in t&&!(Uf.call(n,"hProperties")||Uf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function i4(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
21
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
22
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
23
|
+
`}),n}function ox(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ix(e,t){const n=t4(e,t),i=n.one(e,void 0),a=WP(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return a&&s.children.push({type:"text",value:`
|
|
24
|
+
`},a),s}function a4(e,t){return e&&"run"in e?async function(n,i){const a=ix(n,{file:i,...t});await e.run(a,i)}:function(n,i){return ix(n,{file:i,...e||t})}}function ax(e){if(e)throw e}var Gd,sx;function s4(){if(sx)return Gd;sx=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 Gd=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},Gd}var l4=s4();const qd=Tc(l4);function Hf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function c4(){const e=[],t={run:n,use:i};return t;function n(...a){let s=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);d(null,...a);function d(f,...p){const g=e[++s];let m=-1;if(f){l(f);return}for(;++m<a.length;)(p[m]===null||p[m]===void 0)&&(p[m]=a[m]);a=p,g?u4(g,d)(...p):l(null,...p)}}function i(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function u4(e,t){let n;return i;function i(...l){const d=e.length>l.length;let f;d&&l.push(a);try{f=e.apply(this,l)}catch(p){const g=p;if(d&&n)throw g;return a(g)}d||(f&&f.then&&typeof f.then=="function"?f.then(s,a):f instanceof Error?a(f):s(f))}function a(l,...d){n||(n=!0,t(l,...d))}function s(l){a(null,l)}}const Dr={basename:d4,dirname:f4,extname:p4,join:h4,sep:"/"};function d4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Is(e);let n=0,i=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else i<0&&(s=!0,i=a+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,d=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else l<0&&(s=!0,l=a+1),d>-1&&(e.codePointAt(a)===t.codePointAt(d--)?d<0&&(i=a):(d=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function f4(e){if(Is(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function p4(e){Is(e);let t=e.length,n=-1,i=0,a=-1,s=0,l;for(;t--;){const d=e.codePointAt(t);if(d===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),d===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||n<0||s===0||s===1&&a===n-1&&a===i+1?"":e.slice(a,n)}function h4(...e){let t=-1,n;for(;++t<e.length;)Is(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":m4(n)}function m4(e){Is(e);const t=e.codePointAt(0)===47;let n=g4(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function g4(e,t){let n="",i=0,a=-1,s=0,l=-1,d,f;for(;++l<=e.length;){if(l<e.length)d=e.codePointAt(l);else{if(d===47)break;d=47}if(d===47){if(!(a===l-1||s===1))if(a!==l-1&&s===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),a=l,s=0;continue}}else if(n.length>0){n="",i=0,a=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),i=l-a-1;a=l,s=0}else d===46&&s>-1?s++:s=-1}return n}function Is(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const x4={cwd:y4};function y4(){return"/"}function Vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function v4(e){if(typeof e=="string")e=new URL(e);else if(!Vf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return w4(e)}function w4(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Xd=["history","path","basename","stem","extname","dirname"];class Qv{constructor(t){let n;t?Vf(t)?n={path:t}:typeof t=="string"||b4(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":x4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Xd.length;){const s=Xd[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)Xd.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Dr.basename(this.path):void 0}set basename(t){Jd(t,"basename"),Qd(t,"basename"),this.path=Dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dr.dirname(this.path):void 0}set dirname(t){lx(this.basename,"dirname"),this.path=Dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dr.extname(this.path):void 0}set extname(t){if(Qd(t,"extname"),lx(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=Dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vf(t)&&(t=v4(t)),Jd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dr.basename(this.path,this.extname):void 0}set stem(t){Jd(t,"stem"),Qd(t,"stem"),this.path=Dr.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(Dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dr.sep+"`")}function Jd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function b4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const k4=(function(e){const i=this.constructor.prototype,a=i[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),S4={}.hasOwnProperty;class Mp extends k4{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=c4()}copy(){const t=new Mp;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(qd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(tf("data",this.frozen),this.namespace[t]=n,this):S4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(tf("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 Zd("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Zd("process",this.parser||this.Parser),ef("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(s,l){const d=Kl(t),f=i.parse(d);i.run(f,d,function(g,m,v){if(g||!m||!v)return p(g);const y=m,S=i.stringify(y,v);E4(S)?v.value=S:v.result=S,p(g,v)});function p(g,m){g||!m?l(g):s?s(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),Zd("processSync",this.parser||this.Parser),ef("processSync",this.compiler||this.Compiler),this.process(t,a),ux("processSync","process",n),i;function a(s,l){n=!0,ax(s),i=l}}run(t,n,i){cx(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),ux("runSync","run",i),a;function s(l,d){ax(l),a=d,i=!0}}stringify(t,n){this.freeze();const i=Kl(n),a=this.compiler||this.Compiler;return ef("stringify",a),cx(t),a(t,i)}use(t,...n){const i=this.attachers,a=this.namespace;if(tf("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=qd(!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];Hf(w)&&Hf(y)&&(y=qd(!0,w,y)),i[v]=[p,y,...S]}}}}const N4=new Mp().freeze();function Zd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tf(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 cx(e){if(!Hf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ux(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Kl(e){return C4(e)?e:new Qv(e)}function C4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function E4(e){return typeof e=="string"||j4(e)}function j4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const T4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dx=[],fx={allowDangerousHtml:!0},R4=/^(https?|ircs?|mailto|xmpp)$/i,P4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Jv(e){const t=e.allowedElements,n=e.allowElement,i=e.children||"",a=e.className,s=e.components,l=e.disallowedElements,d=e.rehypePlugins||dx,f=e.remarkPlugins||dx,p=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fx}:fx,g=e.skipHtml,m=e.unwrapDisallowed,v=e.urlTransform||A4,y=N4().use(fP).use(f).use(a4,p).use(d),S=new Qv;typeof i=="string"&&(S.value=i);for(const j of P4)Object.hasOwn(e,j.from)&&(""+j.from+(j.to?"use `"+j.to+"` instead":"remove it")+T4+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]}),Dp(N,C),qj(N,{Fragment:u.Fragment,components:s,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function C(j,T,$){if(j.type==="raw"&&$&&typeof T=="number")return g?$.children.splice(T,1):$.children[T]={type:"text",value:j.value},T;if(j.type==="element"){let V;for(V in Wd)if(Object.hasOwn(Wd,V)&&Object.hasOwn(j.properties,V)){const L=j.properties[V],A=Wd[V];(A===null||A.includes(j.tagName))&&(j.properties[V]=v(String(L||""),V,j))}}if(j.type==="element"){let V=t?!t.includes(j.tagName):l?l.includes(j.tagName):!1;if(!V&&n&&typeof T=="number"&&(V=!n(j,T,$)),V&&$&&typeof T=="number")return m&&j.children?$.children.splice(T,1,...j.children):$.children.splice(T,1),T}}}function A4(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("/");return t<0||a>-1&&t>a||n>-1&&t>n||i>-1&&t>i||R4.test(e.slice(0,t))?e:""}function px(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,a=n.indexOf(t);for(;a!==-1;)i++,a=n.indexOf(t,a+t.length);return i}function _4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function I4(e,t,n){const a=$c((n||{}).ignore||[]),s=L4(t);let l=-1;for(;++l<s.length;)Xv(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 T=v.exec(p.value);for(;T;){const $=T.index,V={index:T.index,input:T.input,stack:[...g,p]};let L=y(...T,V);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?v.lastIndex=$+1:(S!==$&&j.push({type:"text",value:p.value.slice(S,$)}),Array.isArray(L)?j.push(...L):L&&j.push(L),S=$+T[0].length,C=!0),!v.global)break;T=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 L4(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const a=n[i];t.push([D4(a[0]),M4(a[1])])}return t}function D4(e){return typeof e=="string"?new RegExp(_4(e),"g"):e}function M4(e){return typeof e=="function"?e:function(){return e}}const nf="phrasing",rf=["autolink","link","image","label"];function O4(){return{transforms:[V4],enter:{literalAutolink:F4,literalAutolinkEmail:of,literalAutolinkHttp:of,literalAutolinkWww:of},exit:{literalAutolink:H4,literalAutolinkEmail:U4,literalAutolinkHttp:$4,literalAutolinkWww:B4}}}function z4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nf,notInConstruct:rf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nf,notInConstruct:rf},{character:":",before:"[ps]",after:"\\/",inConstruct:nf,notInConstruct:rf}]}}function F4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function of(e){this.config.enter.autolinkProtocol.call(this,e)}function $4(e){this.config.exit.autolinkProtocol.call(this,e)}function B4(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function U4(e){this.config.exit.autolinkEmail.call(this,e)}function H4(e){this.exit(e)}function V4(e){I4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,W4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),K4]],{ignore:["link","linkReference"]})}function W4(e,t,n,i,a){let s="";if(!Zv(a)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Y4(n)))return!1;const l=G4(n+i);if(!l[0])return!1;const d={type:"link",title:null,url:s+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[d,{type:"text",value:l[1]}]:d}function K4(e,t,n,i){return!Zv(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Y4(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function G4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const a=px(e,"(");let s=px(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 Zv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||gi(n)||Oc(n))&&(!t||n!==47)}ew.peek=r5;function q4(){this.buffer()}function X4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Q4(){this.buffer()}function J4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Z4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=kr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function e5(e){this.exit(e)}function t5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=kr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n5(e){this.exit(e)}function r5(){return"["}function ew(e,t,n,i){const a=n.createTracker(i);let s=a.move("[^");const l=n.enter("footnoteReference"),d=n.enter("reference");return s+=a.move(n.safe(n.associationId(e),{after:"]",before:s})),d(),l(),s+=a.move("]"),s}function o5(){return{enter:{gfmFootnoteCallString:q4,gfmFootnoteCall:X4,gfmFootnoteDefinitionLabelString:Q4,gfmFootnoteDefinition:J4},exit:{gfmFootnoteCallString:Z4,gfmFootnoteCall:e5,gfmFootnoteDefinitionLabelString:t5,gfmFootnoteDefinition:n5}}}function i5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ew},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?tw:a5))),p(),f}}function a5(e,t,n){return t===0?e:tw(e,t,n)}function tw(e,t,n){return(n?"":" ")+e}const s5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nw.peek=f5;function l5(){return{canContainEols:["delete"],enter:{strikethrough:u5},exit:{strikethrough:d5}}}function c5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:s5}],handlers:{delete:nw}}}function u5(e){this.enter({type:"delete",children:[]},e)}function d5(e){this.exit(e)}function nw(e,t,n,i){const a=n.createTracker(i),s=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),s(),l}function f5(){return"~"}function p5(e){return e.length}function h5(e,t){const n=t||{},i=(n.align||[]).concat(),a=n.stringLength||p5,s=[],l=[],d=[],f=[];let p=0,g=-1;for(;++g<e.length;){const w=[],N=[];let C=-1;for(e[g].length>p&&(p=e[g].length);++C<e[g].length;){const j=m5(e[g][C]);if(n.alignDelimiters!==!1){const T=a(j);N[C]=T,(f[C]===void 0||T>f[C])&&(f[C]=T)}w.push(j)}l[g]=w,d[g]=N}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<p;)s[m]=hx(i[m]);else{const w=hx(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 T=N+"-".repeat(j)+C;n.alignDelimiters!==!1&&(j=N.length+j+C.length,j>f[m]&&(f[m]=j),y[m]=j),v[m]=T}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 T="",$="";if(n.alignDelimiters!==!1){const V=f[m]-(N[m]||0),L=s[m];L===114?T=" ".repeat(V):L===99?V%2?(T=" ".repeat(V/2+.5),$=" ".repeat(V/2-.5)):(T=" ".repeat(V/2),$=T):$=" ".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(T),C.push(j),n.alignDelimiters!==!1&&C.push($),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||m!==p-1)&&C.push("|")}S.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return S.join(`
|
|
26
|
+
`)}function m5(e){return e==null?"":String(e)}function hx(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function g5(e,t,n,i){const a=n.enter("blockquote"),s=n.createTracker(i);s.move("> "),s.shift(2);const l=n.indentLines(n.containerFlow(e,s.current()),x5);return a(),l}function x5(e,t,n){return">"+(n?"":" ")+e}function y5(e,t){return mx(e,t.inConstruct,!0)&&!mx(e,t.notInConstruct,!1)}function mx(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 gx(e,t,n,i){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
27
|
+
`&&y5(n.stack,n.unsafe[a]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
28
|
+
`}function v5(e,t){const n=String(e);let i=n.indexOf(t),a=i,s=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===a?++s>l&&(l=s):s=1,a=i+t.length,i=n.indexOf(t,a);return l}function w5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function b5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function k5(e,t,n,i){const a=b5(n),s=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(w5(e,n)){const m=n.enter("codeIndented"),v=n.indentLines(s,S5);return m(),v}const d=n.createTracker(i),f=a.repeat(Math.max(v5(s,a)+1,3)),p=n.enter("codeFenced");let g=d.move(f);if(e.lang){const m=n.enter(`codeFencedLang${l}`);g+=d.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...d.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);g+=d.move(" "),g+=d.move(n.safe(e.meta,{before:g,after:`
|
|
29
|
+
`,encode:["`"],...d.current()})),m()}return g+=d.move(`
|
|
30
|
+
`),s&&(g+=d.move(s+`
|
|
31
|
+
`)),g+=d.move(f),p(),g}function S5(e,t,n){return(n?"":" ")+e}function Op(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function N5(e,t,n,i){const a=Op(n),s=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let d=n.enter("label");const f=n.createTracker(i);let p=f.move("[");return p+=f.move(n.safe(n.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":`
|
|
32
|
+
`,...f.current()}))),d(),e.title&&(d=n.enter(`title${s}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),d()),l(),p}function C5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wc(e,t,n){const i=ia(e),a=ia(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}}rw.peek=E5;function rw(e,t,n,i){const a=C5(n),s=n.enter("emphasis"),l=n.createTracker(i),d=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const p=f.charCodeAt(0),g=wc(i.before.charCodeAt(i.before.length-1),p,a);g.inside&&(f=xs(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=wc(i.after.charCodeAt(0),m,a);v.inside&&(f=f.slice(0,-1)+xs(m));const y=l.move(a);return s(),n.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+y}function E5(e,t,n){return n.options.emphasis||"*"}function j5(e,t){let n=!1;return Dp(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Bf}),!!((!e.depth||e.depth<3)&&Tp(e)&&(t.options.setext||n))}function T5(e,t,n,i){const a=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(i);if(j5(e,n)){const g=n.enter("headingSetext"),m=n.enter("phrasing"),v=n.containerPhrasing(e,{...s.current(),before:`
|
|
33
|
+
`,after:`
|
|
34
|
+
`});return m(),g(),v+`
|
|
35
|
+
`+(a===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
36
|
+
`))+1))}const l="#".repeat(a),d=n.enter("headingAtx"),f=n.enter("phrasing");s.move(l+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
|
|
37
|
+
`,...s.current()});return/^[\t ]/.test(p)&&(p=xs(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),f(),d(),p}ow.peek=R5;function ow(e){return e.value||""}function R5(){return"<"}iw.peek=P5;function iw(e,t,n,i){const a=Op(n),s=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let d=n.enter("label");const f=n.createTracker(i);let p=f.move("![");return p+=f.move(n.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${s}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),d()),p+=f.move(")"),l(),p}function P5(){return"!"}aw.peek=A5;function aw(e,t,n,i){const a=e.referenceType,s=n.enter("imageReference");let l=n.enter("label");const d=n.createTracker(i);let f=d.move("![");const p=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=g,s(),a==="full"||!p||p!==m?f+=d.move(m+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function A5(){return"!"}sw.peek=_5;function sw(e,t,n){let i=e.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(i);)a+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<n.unsafe.length;){const l=n.unsafe[s],d=n.compilePattern(l);let f;if(l.atBreak)for(;f=d.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return a+i+a}function _5(){return"`"}function lw(e,t){const n=Tp(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))}cw.peek=I5;function cw(e,t,n,i){const a=Op(n),s=a==='"'?"Quote":"Apostrophe",l=n.createTracker(i);let d,f;if(lw(e,n)){const g=n.stack;n.stack=[],d=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),d(),n.stack=g,m}d=n.enter("link"),f=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(e,{before:p,after:"](",...l.current()})),p+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(e.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(f=n.enter("destinationRaw"),p+=l.move(n.safe(e.url,{before:p,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${s}`),p+=l.move(" "+a),p+=l.move(n.safe(e.title,{before:p,after:a,...l.current()})),p+=l.move(a),f()),p+=l.move(")"),d(),p}function I5(e,t,n){return lw(e,n)?"<":"["}uw.peek=L5;function uw(e,t,n,i){const a=e.referenceType,s=n.enter("linkReference");let l=n.enter("label");const d=n.createTracker(i);let f=d.move("[");const p=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=g,s(),a==="full"||!p||p!==m?f+=d.move(m+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function L5(){return"["}function zp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function D5(e){const t=zp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function M5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function dw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function O5(e,t,n,i){const a=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?M5(n):zp(n);const d=e.ordered?l==="."?")":".":D5(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),dw(n)===l&&g){let m=-1;for(;++m<e.children.length;){const v=e.children[m];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=d),n.bulletCurrent=l;const p=n.containerFlow(e,i);return n.bulletLastUsed=l,n.bulletCurrent=s,a(),p}function z5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function F5(e,t,n,i){const a=z5(n);let s=n.bulletCurrent||zp(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const d=n.createTracker(i);d.move(s+" ".repeat(l-s.length)),d.shift(l);const f=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,d.current()),g);return f(),p;function g(m,v,y){return v?(y?"":" ".repeat(l))+m:(y?s:s+" ".repeat(l-s.length))+m}}function $5(e,t,n,i){const a=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,i);return s(),a(),l}const B5=$c(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function U5(e,t,n,i){return(e.children.some(function(l){return B5(l)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function H5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}fw.peek=V5;function fw(e,t,n,i){const a=H5(n),s=n.enter("strong"),l=n.createTracker(i),d=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const p=f.charCodeAt(0),g=wc(i.before.charCodeAt(i.before.length-1),p,a);g.inside&&(f=xs(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=wc(i.after.charCodeAt(0),m,a);v.inside&&(f=f.slice(0,-1)+xs(m));const y=l.move(a+a);return s(),n.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+y}function V5(e,t,n){return n.options.strong||"*"}function W5(e,t,n,i){return n.safe(e.value,i)}function K5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Y5(e,t,n){const i=(dw(n)+(n.options.ruleSpaces?" ":"")).repeat(K5(n));return n.options.ruleSpaces?i.slice(0,-1):i}const pw={blockquote:g5,break:gx,code:k5,definition:N5,emphasis:rw,hardBreak:gx,heading:T5,html:ow,image:iw,imageReference:aw,inlineCode:sw,link:cw,linkReference:uw,list:O5,listItem:F5,paragraph:$5,root:U5,strong:fw,text:W5,thematicBreak:Y5};function G5(){return{enter:{table:q5,tableData:xx,tableHeader:xx,tableRow:Q5},exit:{codeText:J5,table:X5,tableData:af,tableHeader:af,tableRow:af}}}function q5(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function X5(e){this.exit(e),this.data.inTable=void 0}function Q5(e){this.enter({type:"tableRow",children:[]},e)}function af(e){this.exit(e)}function xx(e){this.enter({type:"tableCell",children:[]},e)}function J5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Z5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Z5(e,t){return t==="|"?t:e}function eA(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,a=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
38
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:l,tableCell:f,tableRow:d}};function l(y,S,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"),T=w.containerPhrasing(y,{...N,before:s,after:s});return j(),C(),T}function p(y,S){return h5(y,{align:S,alignDelimiters:i,padding:n,stringLength:a})}function g(y,S,w){const N=y.children;let C=-1;const j=[],T=S.enter("table");for(;++C<N.length;)j[C]=m(N[C],S,w);return T(),j}function m(y,S,w){const N=y.children;let C=-1;const j=[],T=S.enter("tableRow");for(;++C<N.length;)j[C]=f(N[C],y,S,w);return T(),j}function v(y,S,w){let N=pw.inlineCode(y,S,w);return w.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function tA(){return{exit:{taskListCheckValueChecked:yx,taskListCheckValueUnchecked:yx,paragraph:rA}}}function nA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oA}}}function yx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function rA(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const a=t.children;let s=-1,l;for(;++s<a.length;){const d=a[s];if(d.type==="paragraph"){l=d;break}}l===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function oA(e,t,n,i){const a=e.children[0],s=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",d=n.createTracker(i);s&&d.move(l);let f=pw.listItem(e,t,n,{...i,...d.current()});return s&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(g){return g+l}}function iA(){return[O4(),o5(),l5(),G5(),tA()]}function aA(e){return{extensions:[z4(),i5(e),c5(),eA(e),nA()]}}const sA={tokenize:pA,partial:!0},hw={tokenize:hA,partial:!0},mw={tokenize:mA,partial:!0},gw={tokenize:gA,partial:!0},lA={tokenize:xA,partial:!0},xw={name:"wwwAutolink",tokenize:dA,previous:vw},yw={name:"protocolAutolink",tokenize:fA,previous:ww},co={name:"emailAutolink",tokenize:uA,previous:bw},Hr={};function cA(){return{text:Hr}}let fi=48;for(;fi<123;)Hr[fi]=co,fi++,fi===58?fi=65:fi===91&&(fi=97);Hr[43]=co;Hr[45]=co;Hr[46]=co;Hr[95]=co;Hr[72]=[co,yw];Hr[104]=[co,yw];Hr[87]=[co,xw];Hr[119]=[co,xw];function uA(e,t,n){const i=this;let a,s;return l;function l(m){return!Wf(m)||!bw.call(i,i.previous)||Fp(i.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(m))}function d(m){return Wf(m)?(e.consume(m),d):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(lA,g,p)(m):m===45||m===95||vn(m)?(s=!0,e.consume(m),f):g(m)}function p(m){return e.consume(m),a=!0,f}function g(m){return s&&a&&Rn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function dA(e,t,n){const i=this;return a;function a(l){return l!==87&&l!==119||!vw.call(i,i.previous)||Fp(i.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sA,e.attempt(hw,e.attempt(mw,s),n),n)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function fA(e,t,n){const i=this;let a="",s=!1;return l;function l(m){return(m===72||m===104)&&ww.call(i,i.previous)&&!Fp(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),d):n(m)}function d(m){if(Rn(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),d;if(m===58){const v=a.toLowerCase();if(v==="http"||v==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),s?p:(s=!0,f)):n(m)}function p(m){return m===null||xc(m)||wt(m)||gi(m)||Oc(m)?n(m):e.attempt(hw,e.attempt(mw,g),n)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function pA(e,t,n){let i=0;return a;function a(l){return(l===87||l===119)&&i<3?(i++,e.consume(l),a):l===46&&i===3?(e.consume(l),s):n(l)}function s(l){return l===null?n(l):t(l)}}function hA(e,t,n){let i,a,s;return l;function l(p){return p===46||p===95?e.check(gw,f,d)(p):p===null||wt(p)||gi(p)||p!==45&&Oc(p)?f(p):(s=!0,e.consume(p),l)}function d(p){return p===95?i=!0:(a=i,i=void 0),e.consume(p),l}function f(p){return a||i||!s?n(p):t(p)}}function mA(e,t){let n=0,i=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&i<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(gw,t,s)(l):l===null||wt(l)||gi(l)?t(l):(e.consume(l),a)}function s(l){return l===41&&i++,e.consume(l),a}}function gA(e,t,n){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),s):d===93?(e.consume(d),a):d===60||d===null||wt(d)||gi(d)?t(d):n(d)}function a(d){return d===null||d===40||d===91||wt(d)||gi(d)?t(d):i(d)}function s(d){return Rn(d)?l(d):n(d)}function l(d){return d===59?(e.consume(d),i):Rn(d)?(e.consume(d),l):n(d)}}function xA(e,t,n){return i;function i(s){return e.consume(s),a}function a(s){return vn(s)?n(s):t(s)}}function vw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||wt(e)}function ww(e){return!Rn(e)}function bw(e){return!(e===47||Wf(e))}function Wf(e){return e===43||e===45||e===46||e===95||vn(e)}function Fp(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const yA={tokenize:EA,partial:!0};function vA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SA,continuation:{tokenize:NA},exit:CA}},text:{91:{name:"gfmFootnoteCall",tokenize:kA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wA,resolveTo:bA}}}}function wA(e,t,n){const i=this;let a=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l;for(;a--;){const f=i.events[a][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!l||!l._balanced)return n(f);const p=kr(i.sliceSerialize({start:l.end,end:i.now()}));return p.codePointAt(0)!==94||!s.includes(p.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function bA(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...d),e}function kA(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,l;return d;function d(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(m){if(s>999||m===93&&!l||m===null||m===91||wt(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return a.includes(kr(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return wt(m)||(l=!0),s++,e.consume(m),m===92?g:p}function g(m){return m===91||m===92||m===93?(e.consume(m),s++,p):p(m)}}function SA(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,l=0,d;return f;function f(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(l>999||S===93&&!d||S===null||S===91||wt(S))return n(S);if(S===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return s=kr(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return wt(S)||(d=!0),l++,e.consume(S),S===92?m:g}function m(S){return S===91||S===92||S===93?(e.consume(S),l++,g):g(S)}function v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),a.includes(s)||a.push(s),ot(e,y,"gfmFootnoteDefinitionWhitespace")):n(S)}function y(S){return t(S)}}function NA(e,t,n){return e.check(_s,t,e.attempt(yA,t,n))}function CA(e){e.exit("gfmFootnoteDefinition")}function EA(e,t,n){const i=this;return ot(e,a,"gfmFootnoteDefinitionIndent",5);function a(s){const l=i.events[i.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function jA(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:a};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function a(l,d){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let p=f;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[f][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[f][1].start)},v=[["enter",g,d],["enter",l[p][1],d],["exit",l[p][1],d],["enter",m,d]],y=d.parser.constructs.insideSpan.null;y&&Jn(v,v.length,0,zc(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=ia(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=ia(S);return N._open=!C||C===2&&!!w,N._close=!w||w===2&&!!C,d(S)}}}class TA{constructor(){this.map=[]}add(t,n,i){RA(this,t,n,i)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let a=i.pop();for(;a;){for(const s of a)t.push(s);a=i.pop()}this.map.length=0}}function RA(e,t,n,i){let a=0;if(!(n===0&&i.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...i);return}a+=1}e.map.push([t,n,i])}}function PA(e,t){let n=!1;const i=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function AA(){return{flow:{null:{name:"table",tokenize:_A,resolveAll:IA}}}}function _A(e,t,n){const i=this;let a=0,s=0,l;return d;function d(O){let J=i.events.length-1;for(;J>-1;){const G=i.events[J][1].type;if(G==="lineEnding"||G==="linePrefix")J--;else break}const _=J>-1?i.events[J][1].type:null,oe=_==="tableHead"||_==="tableRow"?L:f;return oe===L&&i.parser.lazy[i.now().line]?n(O):oe(O)}function f(O){return e.enter("tableHead"),e.enter("tableRow"),p(O)}function p(O){return O===124||(l=!0,s+=1),g(O)}function g(O){return O===null?n(O):He(O)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),y):n(O):et(O)?ot(e,g,"whitespace")(O):(s+=1,l&&(l=!1,a+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),m(O)))}function m(O){return O===null||O===124||wt(O)?(e.exit("data"),g(O)):(e.consume(O),O===92?v:m)}function v(O){return O===92||O===124?(e.consume(O),m):m(O)}function y(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(O):(e.enter("tableDelimiterRow"),l=!1,et(O)?ot(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):S(O))}function S(O){return O===45||O===58?N(O):O===124?(l=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),w):V(O)}function w(O){return et(O)?ot(e,N,"whitespace")(O):N(O)}function N(O){return O===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),C):O===45?(s+=1,C(O)):O===null||He(O)?$(O):V(O)}function C(O){return O===45?(e.enter("tableDelimiterFiller"),j(O)):V(O)}function j(O){return O===45?(e.consume(O),j):O===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(O))}function T(O){return et(O)?ot(e,$,"whitespace")(O):$(O)}function $(O){return O===124?S(O):O===null||He(O)?!l||a!==s?V(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):V(O)}function V(O){return n(O)}function L(O){return e.enter("tableRow"),A(O)}function A(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),A):O===null||He(O)?(e.exit("tableRow"),t(O)):et(O)?ot(e,A,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||wt(O)?(e.exit("data"),A(O)):(e.consume(O),O===92?re:U)}function re(O){return O===92||O===124?(e.consume(O),U):U(O)}}function IA(e,t){let n=-1,i=!0,a=0,s=[0,0,0,0],l=[0,0,0,0],d=!1,f=0,p,g,m;const v=new TA;for(;++n<e.length;){const y=e[n],S=y[1];y[0]==="enter"?S.type==="tableHead"?(d=!1,f!==0&&(vx(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&&vx(v,t,f,p,g),v.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=PA(t.events,n))}return e}function Yl(e,t,n,i,a,s){const l=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(s.end=Object.assign({},Qi(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const f=Qi(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=Qi(t.events,n[2]),g=Qi(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({},Qi(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function vx(e,t,n,i,a){const s=[],l=Qi(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 Qi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const LA={name:"tasklistCheck",tokenize:MA};function DA(){return{text:{91:LA}}}function MA(e,t,n){const i=this;return a;function a(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),s)}function s(f){return wt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(f)}function d(f){return He(f)?t(f):et(f)?e.check({tokenize:OA},t,n)(f):n(f)}}function OA(e,t,n){return ot(e,i,"whitespace");function i(a){return a===null?n(a):t(a)}}function zA(e){return Av([cA(),vA(),jA(e),AA(),DA()])}const FA={};function kw(e){const t=this,n=e||FA,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(zA(n)),s.push(iA()),l.push(aA(n))}function $A(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const BA=e=>{switch(e){case"success":return VA;case"info":return KA;case"warning":return WA;case"error":return YA;default:return null}},UA=Array(12).fill(0),HA=({visible:e,className:t})=>ye.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ye.createElement("div",{className:"sonner-spinner"},UA.map((n,i)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),VA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),WA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),KA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),YA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),qA=()=>{const[e,t]=ye.useState(document.hidden);return ye.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Kf=1;class XA{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:i,...a}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Kf++,l=this.toasts.find(f=>f.id===s),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(f=>f.id===s?(this.publish({...f,...t,id:s,title:i}),{...f,...t,id:s,dismissible:d,title:i}):f):this.addToast({title:i,...a,dismissible:d,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(i=>i({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let s=i!==void 0,l;const d=a.then(async p=>{if(l=["resolve",p],ye.isValidElement(p))s=!1,this.create({id:i,type:"default",message:p});else if(JA(p)&&!p.ok){s=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${p.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${p.status}`):n.description,S=typeof m=="object"&&!ye.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:v,...S})}else if(p instanceof Error){s=!1;const m=typeof n.error=="function"?await n.error(p):n.error,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof m=="object"&&!ye.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:v,...S})}else if(n.success!==void 0){s=!1;const m=typeof n.success=="function"?await n.success(p):n.success,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof m=="object"&&!ye.isValidElement(m)?m:{message:m};this.create({id:i,type:"success",description:v,...S})}}).catch(async p=>{if(l=["reject",p],n.error!==void 0){s=!1;const g=typeof n.error=="function"?await n.error(p):n.error,m=typeof n.description=="function"?await n.description(p):n.description,y=typeof g=="object"&&!ye.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:m,...y})}}).finally(()=>{s&&(this.dismiss(i),i=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((p,g)=>d.then(()=>l[0]==="reject"?g(l[1]):p(l[1])).catch(g));return typeof i!="string"&&typeof i!="number"?{unwrap:f}:Object.assign(i,{unwrap:f})},this.custom=(t,n)=>{const i=n?.id||Kf++;return this.create({jsx:t(i),id:i,...n}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const $n=new XA,QA=(e,t)=>{const n=t?.id||Kf++;return $n.addToast({title:e,...t,id:n}),n},JA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ZA=QA,e_=()=>$n.toasts,t_=()=>$n.getActiveToasts(),Oe=Object.assign(ZA,{success:$n.success,info:$n.info,warning:$n.warning,error:$n.error,custom:$n.custom,message:$n.message,promise:$n.promise,dismiss:$n.dismiss,loading:$n.loading},{getHistory:e_,getToasts:t_});$A("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gl(e){return e.label!==void 0}const n_=3,r_="24px",o_="16px",wx=4e3,i_=356,a_=14,s_=45,l_=200;function Lr(...e){return e.filter(Boolean).join(" ")}function c_(e){const[t,n]=e.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}const u_=e=>{var t,n,i,a,s,l,d,f,p;const{invert:g,toast:m,unstyled:v,interacting:y,setHeights:S,visibleToasts:w,heights:N,index:C,toasts:j,expanded:T,removeToast:$,defaultRichColors:V,closeButton:L,style:A,cancelButtonStyle:U,actionButtonStyle:re,className:O="",descriptionClassName:J="",duration:_,position:oe,gap:G,expandByDefault:F,classNames:W,icons:ne,closeButtonAriaLabel:I="Close toast"}=e,[ee,R]=ye.useState(null),[M,X]=ye.useState(null),[P,se]=ye.useState(!1),[ve,de]=ye.useState(!1),[q,pe]=ye.useState(!1),[we,be]=ye.useState(!1),[Me,Fe]=ye.useState(!1),[st,Ot]=ye.useState(0),[kn,zt]=ye.useState(0),Et=ye.useRef(m.duration||_||wx),pr=ye.useRef(null),Ut=ye.useRef(null),Pn=C===0,An=C+1<=w,Pt=m.type,on=m.dismissible!==!1,Zt=m.className||"",jt=m.descriptionClassName||"",B=ye.useMemo(()=>N.findIndex(Ye=>Ye.toastId===m.id)||0,[N,m.id]),ae=ye.useMemo(()=>{var Ye;return(Ye=m.closeButton)!=null?Ye:L},[m.closeButton,L]),fe=ye.useMemo(()=>m.duration||_||wx,[m.duration,_]),Re=ye.useRef(0),We=ye.useRef(0),mt=ye.useRef(0),At=ye.useRef(null),[Kt,Ft]=oe.split("-"),Sn=ye.useMemo(()=>N.reduce((Ye,It,$t)=>$t>=B?Ye:Ye+It.height,0),[N,B]),_t=qA(),Nn=m.invert||g,en=Pt==="loading";We.current=ye.useMemo(()=>B*G+Sn,[B,Sn]),ye.useEffect(()=>{Et.current=fe},[fe]),ye.useEffect(()=>{se(!0)},[]),ye.useEffect(()=>{const Ye=Ut.current;if(Ye){const It=Ye.getBoundingClientRect().height;return zt(It),S($t=>[{toastId:m.id,height:It,position:m.position},...$t]),()=>S($t=>$t.filter(Ht=>Ht.toastId!==m.id))}},[S,m.id]),ye.useLayoutEffect(()=>{if(!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=ye.useCallback(()=>{de(!0),Ot(We.current),S(Ye=>Ye.filter(It=>It.toastId!==m.id)),setTimeout(()=>{$(m)},l_)},[m,$,S,We]);ye.useEffect(()=>{if(m.promise&&Pt==="loading"||m.duration===1/0||m.type==="loading")return;let Ye;return T||y||_t?(()=>{if(mt.current<Re.current){const Ht=new Date().getTime()-Re.current;Et.current=Et.current-Ht}mt.current=new Date().getTime()})():Et.current!==1/0&&(Re.current=new Date().getTime(),Ye=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Cn()},Et.current)),()=>clearTimeout(Ye)},[T,y,m,Pt,_t,Cn]),ye.useEffect(()=>{m.delete&&Cn()},[Cn,m.delete]);function jr(){var Ye;if(ne?.loading){var It;return ye.createElement("div",{className:Lr(W?.loader,m==null||(It=m.classNames)==null?void 0:It.loader,"sonner-loader"),"data-visible":Pt==="loading"},ne.loading)}return ye.createElement(HA,{className:Lr(W?.loader,m==null||(Ye=m.classNames)==null?void 0:Ye.loader),visible:Pt==="loading"})}const hr=m.icon||ne?.[Pt]||BA(Pt);var Un,Go;return ye.createElement("li",{tabIndex:0,ref:Ut,className:Lr(O,Zt,W?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,W?.default,W?.[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":Me,"data-removed":ve,"data-visible":An,"data-y-position":Kt,"data-x-position":Ft,"data-index":C,"data-front":Pn,"data-swiping":q,"data-dismissible":on,"data-type":Pt,"data-invert":Nn,"data-swipe-out":we,"data-swipe-direction":M,"data-expanded":!!(T||F&&P),style:{"--index":C,"--toasts-before":C,"--z-index":j.length-C,"--offset":`${ve?st:We.current}px`,"--initial-height":F?"auto":`${kn}px`,...A,...m.style},onDragEnd:()=>{pe(!1),R(null),At.current=null},onPointerDown:Ye=>{en||!on||(pr.current=new Date,Ot(We.current),Ye.target.setPointerCapture(Ye.pointerId),Ye.target.tagName!=="BUTTON"&&(pe(!0),At.current={x:Ye.clientX,y:Ye.clientY}))},onPointerUp:()=>{var Ye,It,$t;if(we||!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=pr.current)==null?void 0:$t.getTime()),Yt=ee==="x"?Ht:Hn,Tr=Math.abs(Yt)/Lt;if(Math.abs(Yt)>=s_||Tr>.11){Ot(We.current),m.onDismiss==null||m.onDismiss.call(m,m),X(ee==="x"?Ht>0?"right":"left":Hn>0?"down":"up"),Cn(),be(!0);return}else{var z,Y;(z=Ut.current)==null||z.style.setProperty("--swipe-amount-x","0px"),(Y=Ut.current)==null||Y.style.setProperty("--swipe-amount-y","0px")}Fe(!1),pe(!1),R(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 Tr;const z=(Tr=e.swipeDirections)!=null?Tr:c_(oe);!ee&&(Math.abs(Yt)>1||Math.abs(Lt)>1)&&R(Math.abs(Yt)>Math.abs(Lt)?"x":"y");let Y={x:0,y:0};const te=le=>1/(1.5+Math.abs(le)/20);if(ee==="y"){if(z.includes("top")||z.includes("bottom"))if(z.includes("top")&&Lt<0||z.includes("bottom")&&Lt>0)Y.y=Lt;else{const le=Lt*te(Lt);Y.y=Math.abs(le)<Math.abs(Lt)?le:Lt}}else if(ee==="x"&&(z.includes("left")||z.includes("right")))if(z.includes("left")&&Yt<0||z.includes("right")&&Yt>0)Y.x=Yt;else{const le=Yt*te(Yt);Y.x=Math.abs(le)<Math.abs(Yt)?le:Yt}(Math.abs(Y.x)>0||Math.abs(Y.y)>0)&&Fe(!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`)}},ae&&!m.jsx&&Pt!=="loading"?ye.createElement("button",{"aria-label":I,"data-disabled":en,"data-close-button":!0,onClick:en||!on?()=>{}:()=>{Cn(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Lr(W?.closeButton,m==null||(i=m.classNames)==null?void 0:i.closeButton)},(Go=ne?.close)!=null?Go:GA):null,(Pt||m.icon||m.promise)&&m.icon!==null&&(ne?.[Pt]!==null||m.icon)?ye.createElement("div",{"data-icon":"",className:Lr(W?.icon,m==null||(a=m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||jr():null,m.type!=="loading"?hr:null):null,ye.createElement("div",{"data-content":"",className:Lr(W?.content,m==null||(s=m.classNames)==null?void 0:s.content)},ye.createElement("div",{"data-title":"",className:Lr(W?.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?ye.createElement("div",{"data-description":"",className:Lr(J,jt,W?.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),ye.isValidElement(m.cancel)?m.cancel:m.cancel&&Gl(m.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||U,onClick:Ye=>{Gl(m.cancel)&&on&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ye),Cn())},className:Lr(W?.cancelButton,m==null||(f=m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,ye.isValidElement(m.action)?m.action:m.action&&Gl(m.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||re,onClick:Ye=>{Gl(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ye),!Ye.defaultPrevented&&Cn())},className:Lr(W?.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function bx(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function d_(e,t){const n={};return[e,t].forEach((i,a)=>{const s=a===1,l=s?"--mobile-offset":"--offset",d=s?o_:r_;function f(p){["top","right","bottom","left"].forEach(g=>{n[`${l}-${g}`]=typeof p=="number"?`${p}px`:p})}typeof i=="number"||typeof i=="string"?f(i):typeof i=="object"?["top","right","bottom","left"].forEach(p=>{i[p]===void 0?n[`${l}-${p}`]=d:n[`${l}-${p}`]=typeof i[p]=="number"?`${i[p]}px`:i[p]}):f(d)}),n}const f_=ye.forwardRef(function(t,n){const{invert:i,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:l,closeButton:d,className:f,offset:p,mobileOffset:g,theme:m="light",richColors:v,duration:y,style:S,visibleToasts:w=n_,toastOptions:N,dir:C=bx(),gap:j=a_,icons:T,containerAriaLabel:$="Notifications"}=t,[V,L]=ye.useState([]),A=ye.useMemo(()=>Array.from(new Set([a].concat(V.filter(M=>M.position).map(M=>M.position)))),[V,a]),[U,re]=ye.useState([]),[O,J]=ye.useState(!1),[_,oe]=ye.useState(!1),[G,F]=ye.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=ye.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=ye.useRef(null),ee=ye.useRef(!1),R=ye.useCallback(M=>{L(X=>{var P;return(P=X.find(se=>se.id===M.id))!=null&&P.delete||$n.dismiss(M.id),X.filter(({id:se})=>se!==M.id)})},[]);return ye.useEffect(()=>$n.subscribe(M=>{if(M.dismiss){requestAnimationFrame(()=>{L(X=>X.map(P=>P.id===M.id?{...P,delete:!0}:P))});return}setTimeout(()=>{rv.flushSync(()=>{L(X=>{const P=X.findIndex(se=>se.id===M.id);return P!==-1?[...X.slice(0,P),{...X[P],...M},...X.slice(P+1)]:[M,...X]})})})}),[V]),ye.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(se){console.error(se)}})}},[m]),ye.useEffect(()=>{V.length<=1&&J(!1)},[V]),ye.useEffect(()=>{const M=X=>{var P;if(s.every(de=>X[de]||X.code===de)){var ve;J(!0),(ve=W.current)==null||ve.focus()}X.code==="Escape"&&(document.activeElement===W.current||(P=W.current)!=null&&P.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[s]),ye.useEffect(()=>{if(W.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,ee.current=!1)}},[W.current]),ye.createElement("section",{ref:n,"aria-label":`${$} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((M,X)=>{var P;const[se,ve]=M.split("-");return V.length?ye.createElement("ol",{key:M,dir:C==="auto"?bx():C,tabIndex:-1,ref:W,className:f,"data-sonner-toaster":!0,"data-sonner-theme":G,"data-y-position":se,"data-lifted":O&&V.length>1&&!l,"data-x-position":ve,style:{"--front-toast-height":`${((P=U[0])==null?void 0:P.height)||0}px`,"--width":`${i_}px`,"--gap":`${j}px`,...S,...d_(p,g)},onBlur:de=>{ee.current&&!de.currentTarget.contains(de.relatedTarget)&&(ee.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||ee.current||(ee.current=!0,I.current=de.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{_||J(!1)},onDragEnd:()=>J(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},V.filter(de=>!de.position&&X===0||de.position===M).map((de,q)=>{var pe,we;return ye.createElement(u_,{key:de.id,icons:T,index:q,toast:de,defaultRichColors:v,duration:(pe=N?.duration)!=null?pe:y,className:N?.className,descriptionClassName:N?.descriptionClassName,invert:i,visibleToasts:w,closeButton:(we=N?.closeButton)!=null?we:d,interacting:_,position:M,style:N?.style,unstyled:N?.unstyled,classNames:N?.classNames,cancelButtonStyle:N?.cancelButtonStyle,actionButtonStyle:N?.actionButtonStyle,closeButtonAriaLabel:N?.closeButtonAriaLabel,removeToast:R,toasts:V.filter(be=>be.position==de.position),heights:U.filter(be=>be.position==de.position),setHeights:re,expandByDefault:l,gap:j,expanded:O,swipeDirections:t.swipeDirections})})):null}))});function p_(){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),T=k.useRef(null),$=k.useRef(sessionStorage.getItem("daemora_active_task")),V=k.useRef(n);k.useEffect(()=>{V.current=n},[n]);const L=async()=>{try{const F=await $e("/api/sessions");if(F.ok){const W=await F.json();t(W.sessions||[]),!n&&W.sessions.length>0&&A(W.sessions[0].sessionId)}}catch(F){console.error("Failed to fetch sessions",F)}finally{m(!1)}},A=async F=>{i(F);try{const W=await $e(`/api/sessions/${F}`);if(W.ok){const ne=await W.json();s(ne.messages||[])}}catch{Oe.error("FAILED TO RESTORE SESSION HISTORY")}},U=async()=>{try{const F=await $e("/api/sessions",{method:"POST"});if(F.ok){const W=await F.json();i(W.sessionId),s([]),L()}}catch{Oe.error("COULD NOT INITIALIZE NEW SESSION")}},re=async(F,W)=>{F.stopPropagation();try{(await $e(`/api/sessions/${W}`,{method:"DELETE"})).ok?(t(I=>I.filter(ee=>ee.sessionId!==W)),n===W&&(i(null),s([])),Oe.success("Session deleted")):Oe.error("Failed to delete session")}catch{Oe.error("Failed to delete session")}};k.useEffect(()=>{L();const F=sessionStorage.getItem("daemora_active_task");F&&(p(!0),w("Reconnecting..."),J(F))},[]),k.useEffect(()=>()=>{T.current&&(T.current.close(),T.current=null)},[]);const O=async()=>{if(!l.trim()||f)return;let F=n;F||(F=(await(await $e("/api/sessions",{method:"POST"})).json()).sessionId,i(F));const W={role:"user",content:l,timestamp:new Date().toISOString()};s(I=>[...I,W]);const ne=l;d(""),p(!0),w("Queuing...");try{const I=await $e("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:ne,sessionId:F})});if(!I.ok)throw new Error(`Error: ${I.statusText}`);const ee=await I.json();if(ee.taskId)J(ee.taskId);else if(ee.result){const R={role:"assistant",content:ee.result||"(No response from system)",timestamp:new Date().toISOString()};s(M=>[...M,R]),p(!1),w(null),L()}}catch(I){const ee={role:"assistant",content:`**SYSTEM ERROR:** ${I.message}. KERNEL PANIC.`,timestamp:new Date().toISOString()};s(R=>[...R,ee]),p(!1),w(null)}},J=F=>{T.current&&T.current.close(),$.current=F,sessionStorage.setItem("daemora_active_task",F);const W=()=>{$.current=null,sessionStorage.removeItem("daemora_active_task")},ne=new EventSource(By(`/api/tasks/${F}/stream`));T.current=ne,ne.addEventListener("task:state",I=>{const ee=JSON.parse(I.data);if(ee.status==="completed"&&ee.result)W(),p(!1),w(null),V.current?A(V.current):L(),ne.close(),T.current=null;else if(ee.status==="failed"){W();const R={role:"assistant",content:`**SYSTEM ERROR:** ${ee.error||"Task failed"}`,timestamp:new Date().toISOString()};s(M=>[...M,R]),p(!1),w(null),ne.close(),T.current=null}else ee.status==="running"&&w("Processing...")}),ne.addEventListener("model:called",I=>{try{const ee=JSON.parse(I.data),R=ee.iteration||ee.loop||"";w(`Thinking${R?` (step ${R})`:""}...`)}catch{w("Thinking...")}}),ne.addEventListener("tool:after",I=>{try{const ee=JSON.parse(I.data),R=ee.tool_name||ee.tool||"tool";w(`Using ${R}...`)}catch{w("Using tool...")}}),ne.addEventListener("agent:spawned",I=>{try{const ee=JSON.parse(I.data);w(`Sub-agent spawned${ee.role?`: ${ee.role}`:""}...`)}catch{w("Sub-agent working...")}}),ne.addEventListener("agent:finished",I=>{try{JSON.parse(I.data),w("Sub-agent completed, continuing...")}catch{}}),ne.addEventListener("task:completed",I=>{W();const ee=JSON.parse(I.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),L(),ne.close(),T.current=null}),ne.addEventListener("task:failed",I=>{W();const R={role:"assistant",content:`**SYSTEM ERROR:** ${JSON.parse(I.data).error||"Task failed"}. KERNEL PANIC.`,timestamp:new Date().toISOString()};s(M=>[...M,R]),p(!1),w(null),ne.close(),T.current=null}),ne.onerror=()=>{ne.readyState===EventSource.CLOSED&&(p(!1),w(null),T.current=null)}},_=()=>{C.current?.scrollIntoView({behavior:"smooth"})};k.useEffect(()=>{requestAnimationFrame(()=>_())},[a,f]);const oe=F=>{const W=new Date(F);return isNaN(W.getTime())?new Date().toLocaleTimeString():W.toLocaleTimeString()},G=()=>S?S.startsWith("Using ")?u.jsx(i2,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):S.startsWith("Thinking")?u.jsx(Sf,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):S.startsWith("Sub-agent")?u.jsx(Ac,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):u.jsx(un,{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(xt,{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(Fr,{className:"w-3 h-3 mr-1.5 group-hover:rotate-90 transition-transform duration-300"}),"New Chat"]}),u.jsx(xt,{variant:"ghost",size:"sm",onClick:()=>y(!1),className:"text-[#00d9ff] hover:text-white hover:bg-[#00d9ff]/10 h-9 w-9 p-0 flex-shrink-0",children:u.jsx(IE,{className:"w-4 h-4"})})]}),u.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[u.jsx("div",{className:"py-2 px-3 flex items-center gap-2 text-gray-500 border-b border-slate-800/20",children:u.jsx("span",{className:"text-[9px] font-mono uppercase tracking-widest font-bold",children:"Sessions"})}),u.jsx(Lf,{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(un,{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:W=>re(W,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(Rs,{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(xt,{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(b0,{className:"w-4 h-4"})}),u.jsxs("div",{className:"flex items-center gap-2.5 flex-1 justify-center",children:[u.jsx("div",{className:"animate-[bounce-slow_2s_ease-in-out_infinite]",children:u.jsx(as,{size:28})}),u.jsx("h2",{className:"text-base font-bold bg-gradient-to-r from-white via-[#00d9ff] to-[#4ECDC4] bg-clip-text text-transparent tracking-tight",children:"Daemora"})]}),!v&&u.jsx("div",{className:"w-8"})]}),u.jsxs("div",{className:"flex-1 min-h-0 relative z-10 flex flex-col",children:[u.jsx(Lf,{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,W)=>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(as,{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(Jv,{remarkPlugins:[kw],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(jf,{className:"w-3 h-3"}):u.jsx(Fy,{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(jf,{className:"w-full h-full text-white"})})]},W)),f&&u.jsxs("div",{className:"flex gap-3 animate-pulse",children:[u.jsx("div",{className:"w-7 h-7 rounded-lg bg-slate-950 border border-slate-800/80 p-1 flex-shrink-0 flex items-center justify-center",children:u.jsx(as,{size:18})}),u.jsx("div",{className:"max-w-[88%]",children:u.jsxs("div",{className:"rounded-lg p-4 bg-slate-800/30 border border-slate-800 flex items-center gap-3",children:[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(Fr,{className:"w-5 h-5"})}),u.jsx(nv,{ref:j,value:l,onChange:F=>d(F.target.value),onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),O())},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:O,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(un,{className:"w-4 h-4 animate-spin"}):u.jsx(KC,{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(xt,{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(b0,{className:"w-4 h-4"})}),u.jsx("div",{className:"animate-[bounce-slow_2s_ease-in-out_infinite]",children:u.jsx(as,{size:80})}),u.jsx("h2",{className:"text-2xl font-bold bg-gradient-to-r from-white via-[#00d9ff] to-[#4ECDC4] bg-clip-text text-transparent tracking-tight",children:"Daemora"}),u.jsx("p",{className:"text-gray-600 font-mono text-xs uppercase tracking-widest",children:"Select or Initialize Session"})]})]})]})}function St({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:pt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function h_(){const[e,t]=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 $e("/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 $e(`/api/tasks/${w}/children`);if(C.ok){const j=await C.json();p(T=>({...T,[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(ms,{className:"w-4 h-4 text-[#ffaa00] animate-pulse"}):w==="completed"?u.jsx(ac,{className:"w-4 h-4 text-[#00ff88]"}):w==="failed"?u.jsx(fc,{className:"w-4 h-4 text-[#ff4458]"}):u.jsx(ms,{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(un,{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(zy,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),u.jsx(St,{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(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl overflow-hidden",children:[u.jsx(yt,{className:"border-b border-slate-800/50 bg-slate-800/20 py-4",children:u.jsxs("div",{className:"grid grid-cols-12 gap-4 text-[10px] font-mono text-gray-500 uppercase tracking-widest px-6",children:[u.jsx("div",{className:"col-span-1",children:"Status"}),u.jsx("div",{className:"col-span-2",children:"ID"}),u.jsx("div",{className:"col-span-4",children:"Input"}),u.jsx("div",{className:"col-span-1",children:"Channel"}),u.jsx("div",{className:"col-span-2 text-right",children:"Cost"}),u.jsx("div",{className:"col-span-2 text-right",children:"Created"})]})}),u.jsx(ft,{className:"p-0",children:u.jsx("div",{className:"divide-y divide-slate-800/50",children:v.length===0?u.jsx("div",{className:"text-center py-20",children:u.jsx("p",{className:"text-gray-600 font-mono uppercase tracking-widest text-xs",children:"NO TASKS YET"})}):v.map(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(Ts,{className:"w-3 h-3"}):u.jsx(eE,{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(oo,{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(oo,{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(T=>u.jsxs(oo,{to:`/tasks/${T.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:T.status})}),u.jsxs("div",{className:"col-span-2 font-mono text-[10px] text-gray-500 truncate uppercase",children:[T.id.split("-")[0],"..."]}),u.jsx("div",{className:"col-span-4 text-gray-300 truncate font-mono text-xs",children:T.title||T.input}),u.jsx("div",{className:"col-span-1",children:T.agentId&&u.jsxs(Qt,{variant:"outline",className:"bg-[#7C6AFF]/10 border-[#7C6AFF]/30 text-[8px] font-mono text-[#7C6AFF]",children:[u.jsx(Ac,{className:"w-2 h-2 mr-1"}),T.agentId.slice(0,6)]})}),u.jsx("div",{className:"col-span-2 text-right font-mono text-[10px] text-[#00ff88]",children:u.jsx(S,{cost:T.cost})}),u.jsx("div",{className:"col-span-2 text-right font-mono text-[10px] text-gray-600",children:new Date(T.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]},T.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(T=>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:T.status}),u.jsx("span",{className:"text-gray-300",children:T.role||"agent"}),u.jsxs("span",{className:"text-gray-600",children:["(",T.agentId.slice(0,8),")"]}),T.model&&u.jsx("span",{className:"text-gray-600 text-[9px]",children:T.model})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[T.toolCalls?.length?u.jsxs("span",{className:"text-gray-500 text-[9px]",children:[T.toolCalls.length," tools"]}):null,T.resultPreview&&u.jsx("span",{className:"text-gray-500 text-[9px] max-w-[200px] truncate",children:T.resultPreview})]})]},T.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 Sw(e){const t=e+"CollectionProvider",[n,i]=lo(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=y=>{const{scope:S,children:w}=y,N=ye.useRef(null),C=ye.useRef(new Map).current;return u.jsx(a,{scope:S,itemMap:C,collectionRef:N,children:w})};l.displayName=t;const d=e+"CollectionSlot",f=ye.forwardRef((y,S)=>{const{scope:w,children:N}=y,C=s(d,w),j=ht(S,C.collectionRef);return u.jsx($o,{ref:j,children:N})});f.displayName=d;const p=e+"CollectionItemSlot",g="data-radix-collection-item",m=ye.forwardRef((y,S)=>{const{scope:w,children:N,...C}=y,j=ye.useRef(null),T=ht(S,j),$=s(p,w);return ye.useEffect(()=>($.itemMap.set(j,{ref:j,...C}),()=>{$.itemMap.delete(j)})),u.jsx($o,{[g]:"",ref:T,children:N})});m.displayName=p;function v(y){const S=s(e+"CollectionConsumer",y);return ye.useCallback(()=>{const N=S.collectionRef.current;if(!N)return[];const C=Array.from(N.querySelectorAll(`[${g}]`));return Array.from(S.itemMap.values()).sort(($,V)=>C.indexOf($.ref.current)-C.indexOf(V.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:f,ItemSlot:m},v,i]}var m_=Qx.useId||(()=>{}),g_=0;function Fo(e){const[t,n]=k.useState(m_());return wn(()=>{n(i=>i??String(g_++))},[e]),e||(t?`radix-${t}`:"")}function aa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[i,a]=x_({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i,d=pn(n),f=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 x_({defaultProp:e,onChange:t}){const n=k.useState(e),[i]=n,a=k.useRef(i),s=pn(t);return k.useEffect(()=>{a.current!==i&&(s(i),a.current=i)},[i,a,s]),n}var sf="rovingFocusGroup.onEntryFocus",y_={bubbles:!1,cancelable:!0},Uc="RovingFocusGroup",[Yf,Nw,v_]=Sw(Uc),[w_,Cw]=lo(Uc,[v_]),[b_,k_]=w_(Uc),Ew=k.forwardRef((e,t)=>u.jsx(Yf.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Yf.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(S_,{...e,ref:t})})}));Ew.displayName=Uc;var S_=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=ht(t,v),S=Lc(s),[w=null,N]=aa({prop:l,defaultProp:d,onChange:f}),[C,j]=k.useState(!1),T=pn(p),$=Nw(n),V=k.useRef(!1),[L,A]=k.useState(0);return k.useEffect(()=>{const U=v.current;if(U)return U.addEventListener(sf,T),()=>U.removeEventListener(sf,T)},[T]),u.jsx(b_,{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(Xe.div,{tabIndex:C||L===0?-1:0,"data-orientation":i,...m,ref:y,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{V.current=!0}),onFocus:Ge(e.onFocus,U=>{const re=!V.current;if(U.target===U.currentTarget&&re&&!C){const O=new CustomEvent(sf,y_);if(U.currentTarget.dispatchEvent(O),!O.defaultPrevented){const J=$().filter(W=>W.focusable),_=J.find(W=>W.active),oe=J.find(W=>W.id===w),F=[_,oe,...J].filter(Boolean).map(W=>W.ref.current);Rw(F,g)}}V.current=!1}),onBlur:Ge(e.onBlur,()=>j(!1))})})}),jw="RovingFocusGroupItem",Tw=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:s,...l}=e,d=Fo(),f=s||d,p=k_(jw,n),g=p.currentTabStopId===f,m=Nw(n),{onFocusableItemAdd:v,onFocusableItemRemove:y}=p;return k.useEffect(()=>{if(i)return v(),()=>y()},[i,v,y]),u.jsx(Yf.ItemSlot,{scope:n,id:f,focusable:i,active:a,children:u.jsx(Xe.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:Ge(e.onMouseDown,S=>{i?p.onItemFocus(f):S.preventDefault()}),onFocus:Ge(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:Ge(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){p.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const w=E_(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?j_(C,j+1):C.slice(j+1)}setTimeout(()=>Rw(C))}})})})});Tw.displayName=jw;var N_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function C_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function E_(e,t,n){const i=C_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return N_[i]}function Rw(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function j_(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var T_=Ew,R_=Tw,$p="Tabs",[P_]=lo($p,[Cw]),Pw=Cw(),[A_,Bp]=P_($p),Aw=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,onValueChange:a,defaultValue:s,orientation:l="horizontal",dir:d,activationMode:f="automatic",...p}=e,g=Lc(d),[m,v]=aa({prop:i,onChange:a,defaultProp:s});return u.jsx(A_,{scope:n,baseId:Fo(),value:m,onValueChange:v,orientation:l,dir:g,activationMode:f,children:u.jsx(Xe.div,{dir:g,"data-orientation":l,...p,ref:t})})});Aw.displayName=$p;var _w="TabsList",Iw=k.forwardRef((e,t)=>{const{__scopeTabs:n,loop:i=!0,...a}=e,s=Bp(_w,n),l=Pw(n);return u.jsx(T_,{asChild:!0,...l,orientation:s.orientation,dir:s.dir,loop:i,children:u.jsx(Xe.div,{role:"tablist","aria-orientation":s.orientation,...a,ref:t})})});Iw.displayName=_w;var Lw="TabsTrigger",Dw=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,disabled:a=!1,...s}=e,l=Bp(Lw,n),d=Pw(n),f=zw(l.baseId,i),p=Fw(l.baseId,i),g=i===l.value;return u.jsx(R_,{asChild:!0,...d,focusable:!a,active:g,children:u.jsx(Xe.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":p,"data-state":g?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:f,...s,ref:t,onMouseDown:Ge(e.onMouseDown,m=>{!a&&m.button===0&&m.ctrlKey===!1?l.onValueChange(i):m.preventDefault()}),onKeyDown:Ge(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(i)}),onFocus:Ge(e.onFocus,()=>{const m=l.activationMode!=="manual";!g&&!a&&m&&l.onValueChange(i)})})})});Dw.displayName=Lw;var Mw="TabsContent",Ow=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,forceMount:a,children:s,...l}=e,d=Bp(Mw,n),f=zw(d.baseId,i),p=Fw(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(so,{present:a||g,children:({present:v})=>u.jsx(Xe.div,{"data-state":g?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!v,id:p,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:v&&s})})});Ow.displayName=Mw;function zw(e,t){return`${e}-trigger-${t}`}function Fw(e,t){return`${e}-content-${t}`}var __=Aw,I_=Iw,L_=Dw,D_=Ow;function M_({className:e,...t}){return u.jsx(__,{"data-slot":"tabs",className:pt("flex flex-col gap-2",e),...t})}function O_({className:e,...t}){return u.jsx(I_,{"data-slot":"tabs-list",className:pt("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",e),...t})}function ql({className:e,...t}){return u.jsx(L_,{"data-slot":"tabs-trigger",className:pt("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Xl({className:e,...t}){return u.jsx(D_,{"data-slot":"tabs-content",className:pt("flex-1 outline-none",e),...t})}function z_(){const{id:e}=AN(),[t,n]=k.useState(null),[i,a]=k.useState(!0);k.useEffect(()=>{if(!e)return;const d=async()=>{try{const p=await $e(`/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(By(`/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(un,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})});if(!t)return u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-red-400 font-mono uppercase",children:"TASK NOT FOUND"})});const l=t.status==="completed"?"bg-[#00ff88]/20 text-[#00ff88] border-[#00ff88]/30":t.status==="failed"?"bg-red-500/20 text-red-400 border-red-500/30":t.status==="running"?"bg-amber-500/20 text-amber-400 border-amber-500/30":"bg-slate-700/20 text-gray-400 border-slate-700/30";return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(oo,{to:"/tasks",children:u.jsx(xt,{variant:"outline",size:"icon",className:"bg-slate-900 border-slate-800 text-white hover:bg-slate-800",children:u.jsx(VC,{className:"w-5 h-5"})})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("h2",{className:"text-xl font-bold text-white font-mono uppercase tracking-tight truncate",children:t.input.slice(0,80)}),u.jsxs("p",{className:"text-gray-500 font-mono text-[10px] uppercase tracking-wider mt-1",children:[t.id," // ",t.channel," ",t.cost?.model&&`// ${t.cost.model}`]})]}),u.jsx(Qt,{className:l,children:t.status})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Priority"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"text-xl font-bold text-white font-mono",children:[t.priority,"/10"]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Duration"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ms,{className:"w-4 h-4 text-[#00d9ff]"}),u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:s(t.startedAt,t.completedAt)})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Cost"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ay,{className:"w-4 h-4 text-[#00ff88]"}),u.jsxs("div",{className:"text-xl font-bold text-white font-mono",children:["$",(t.cost?.estimatedCost||0).toFixed(4)]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Tool Calls"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Tf,{className:"w-4 h-4 text-[#7C6AFF]"}),u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:t.toolCalls?.length||0})]})})]})]}),u.jsx(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:u.jsx(ft,{className:"p-0",children:u.jsxs(M_,{defaultValue:"io",className:"w-full",children:[u.jsxs(O_,{className:`w-full grid bg-slate-800/50 border-b border-slate-700 rounded-none ${t.subAgents?.length?"grid-cols-4":"grid-cols-3"}`,children:[u.jsx(ql,{value:"io",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:"I/O"}),u.jsxs(ql,{value:"tools",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:["Tool Calls (",t.toolCalls?.length||0,")"]}),t.subAgents&&t.subAgents.length>0&&u.jsxs(ql,{value:"agents",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:["Sub-Agents (",t.subAgents.length,")"]}),u.jsx(ql,{value:"costs",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:"Cost"})]}),u.jsxs(Xl,{value:"io",className:"p-6 space-y-6",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-xs font-mono text-gray-500 uppercase tracking-widest mb-3",children:"Input"}),u.jsx("div",{className:"bg-slate-800/50 border border-slate-700 rounded-lg p-4",children:u.jsx("pre",{className:"text-gray-300 text-sm font-mono whitespace-pre-wrap",children:t.input})})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-xs font-mono text-gray-500 uppercase tracking-widest mb-3",children:t.error?"Error":"Output"}),u.jsx("div",{className:`bg-slate-800/50 border rounded-lg p-4 ${t.error?"border-red-500/30":"border-slate-700"}`,children:t.error?u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(xp,{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(Jv,{remarkPlugins:[kw],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(Tf,{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(Ac,{className:"w-4 h-4 text-[#7C6AFF]"}),u.jsx("span",{className:"font-mono text-sm text-white",children:d.agentId}),u.jsx(Qt,{variant:"outline",className:`text-[9px] font-mono ${d.status==="completed"?"text-[#00ff88] border-[#00ff88]/30":d.status==="failed"?"text-red-400 border-red-500/30":d.status==="killed"?"text-amber-400 border-amber-500/30":"text-[#00d9ff] border-[#00d9ff]/30"}`,children:d.status}),d.depth>0&&u.jsxs("span",{className:"text-[9px] font-mono text-gray-600",children:["depth: ",d.depth]})]}),d.cost?.estimatedCost!=null&&u.jsxs("span",{className:"text-[10px] font-mono text-gray-500",children:["$",d.cost.estimatedCost.toFixed(4)]})]}),u.jsx("p",{className:"text-gray-400 font-mono text-xs",children:d.description}),d.error&&u.jsx("p",{className:"text-red-400 font-mono text-xs mt-2",children:d.error})]},f))})}),u.jsx(Xl,{value:"costs",className:"p-6",children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Input Tokens"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:(t.cost?.inputTokens||0).toLocaleString()})})]}),u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Output Tokens"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:(t.cost?.outputTokens||0).toLocaleString()})})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Model Calls"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:t.cost?.modelCalls||0})})]}),u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(vt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Total Cost"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"text-xl font-bold text-[#00ff88] font-mono",children:["$",(t.cost?.estimatedCost||0).toFixed(4)]})})]})]}),t.cost?.model&&u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[10px] text-gray-500 font-mono uppercase mb-1",children:"Model"}),u.jsx("div",{className:"text-white font-mono text-sm",children:t.cost.model})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mb-1",children:"Created"}),u.jsx("div",{className:"text-gray-300 font-mono text-[11px]",children:new Date(t.createdAt).toLocaleString()})]}),u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mb-1",children:"Started"}),u.jsx("div",{className:"text-gray-300 font-mono text-[11px]",children:t.startedAt?new Date(t.startedAt).toLocaleString():"-"})]}),u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mb-1",children:"Completed"}),u.jsx("div",{className:"text-gray-300 font-mono text-[11px]",children:t.completedAt?new Date(t.completedAt).toLocaleString():"-"})]})]})]})})]})})})]})}function F_(){const[e,t]=k.useState(null),[n,i]=k.useState(!0);return k.useEffect(()=>{$e("/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(un,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):e?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Configuration"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"ENVIRONMENT SETTINGS"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(_c,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight text-lg",children:"General Settings"}),u.jsx(cr,{className:"text-gray-500 font-mono text-xs uppercase",children:"CURRENT .ENV VALUES"})]})]})}),u.jsx(ft,{className:"space-y-6",children:u.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[u.jsxs("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Default Model"}),u.jsx("div",{className:"text-white font-bold font-mono text-lg",children:e.defaultModel})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Max Cost / Task"}),u.jsxs("div",{className:"text-white font-bold font-mono text-lg",children:["$",e.maxCostPerTask?.toFixed(2)]})]}),u.jsxs("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Max Daily Limit"}),u.jsxs("div",{className:"text-white font-bold font-mono text-lg",children:["$",e.maxDailyCost?.toFixed(2)]})]})]}),u.jsx("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Permission Tier"}),u.jsx("div",{className:"text-white font-bold font-mono uppercase",children:e.permissionTier})]}),u.jsx(hc,{className:`w-6 h-6 ${e.permissionTier==="admin"?"text-red-500":"text-[#00ff88]"}`})]})}),u.jsx("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Daemon Service"}),u.jsx("div",{className:"text-white font-bold font-mono uppercase",children:e.daemonMode?"ENABLED":"DISABLED"})]}),u.jsx(Py,{className:`w-6 h-6 ${e.daemonMode?"text-[#00d9ff]":"text-gray-600"}`})]})})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Iy,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight text-lg",children:"Channels"}),u.jsx(cr,{className:"text-gray-500 font-mono text-xs uppercase",children:"INTEGRATION STATUS"})]})]})}),u.jsxs(ft,{children:[u.jsx("div",{className:"space-y-2",children:e.channels&&Object.entries(e.channels).map(([a,s])=>u.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-800/20 border border-slate-800/50 rounded-md",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:`w-2 h-2 rounded-full ${s.enabled?"bg-[#00ff88] shadow-[0_0_8px_rgba(0,255,136,0.5)]":"bg-slate-700"}`}),u.jsx("div",{className:"font-mono text-sm text-gray-200 uppercase tracking-tighter",children:a})]}),u.jsx(Qt,{variant:"outline",className:`font-mono text-[10px] ${s.enabled?"text-[#00ff88] border-[#00ff88]/30":"text-gray-600 border-slate-800"}`,children:s.enabled?"ACTIVE":"OFFLINE"})]},a))}),u.jsx("div",{className:"mt-6 p-4 bg-slate-950/50 border border-amber-500/20 rounded-lg",children:u.jsxs("p",{className:"text-[10px] text-amber-500/70 font-mono leading-relaxed uppercase",children:["NOTICE: GLOBAL CONFIGURATION IS MANAGED VIA CLI OR .ENV. FOR PER-TENANT OVERRIDES (MODELS, COSTS, TOOLS, PATHS), USE THE"," ",u.jsx(oo,{to:"/tenants",className:"text-[#00d9ff] underline hover:text-[#4ECDC4] transition-colors",children:"TENANTS"})," ","PAGE."]})})]})]})]})]}):u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-red-400 font-mono",children:"ERROR: COULD NOT RETRIEVE SYSTEM CONFIGURATION"})})}function $_(e,t=globalThis?.document){const n=pn(e);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 B_="DismissableLayer",Gf="dismissableLayer.update",U_="dismissableLayer.pointerDownOutside",H_="dismissableLayer.focusOutside",kx,$w=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Up=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:d,...f}=e,p=k.useContext($w),[g,m]=k.useState(null),v=g?.ownerDocument??globalThis?.document,[,y]=k.useState({}),S=ht(t,A=>m(A)),w=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=w.indexOf(N),j=g?w.indexOf(g):-1,T=p.layersWithOutsidePointerEventsDisabled.size>0,$=j>=C,V=K_(A=>{const U=A.target,re=[...p.branches].some(O=>O.contains(U));!$||re||(a?.(A),l?.(A),A.defaultPrevented||d?.())},v),L=Y_(A=>{const U=A.target;[...p.branches].some(O=>O.contains(U))||(s?.(A),l?.(A),A.defaultPrevented||d?.())},v);return $_(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&&(kx=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),Sx(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=kx)}},[g,v,n,p]),k.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),Sx())},[g,p]),k.useEffect(()=>{const A=()=>y({});return document.addEventListener(Gf,A),()=>document.removeEventListener(Gf,A)},[]),u.jsx(Xe.div,{...f,ref:S,style:{pointerEvents:T?$?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,V.onPointerDownCapture)})});Up.displayName=B_;var V_="DismissableLayerBranch",W_=k.forwardRef((e,t)=>{const n=k.useContext($w),i=k.useRef(null),a=ht(t,i);return k.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),u.jsx(Xe.div,{...e,ref:a})});W_.displayName=V_;function K_(e,t=globalThis?.document){const n=pn(e),i=k.useRef(!1),a=k.useRef(()=>{});return k.useEffect(()=>{const s=d=>{if(d.target&&!i.current){let f=function(){Bw(U_,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);i.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function Y_(e,t=globalThis?.document){const n=pn(e),i=k.useRef(!1);return k.useEffect(()=>{const a=s=>{s.target&&!i.current&&Bw(H_,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Sx(){const e=new CustomEvent(Gf);document.dispatchEvent(e)}function Bw(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?Z2(a,s):a.dispatchEvent(s)}var lf="focusScope.autoFocusOnMount",cf="focusScope.autoFocusOnUnmount",Nx={bubbles:!1,cancelable:!0},G_="FocusScope",Hp=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[d,f]=k.useState(null),p=pn(a),g=pn(s),m=k.useRef(null),v=ht(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(T){if(y.paused||!d)return;const $=T.target;d.contains($)?m.current=$:Do(m.current,{select:!0})},N=function(T){if(y.paused||!d)return;const $=T.relatedTarget;$!==null&&(d.contains($)||Do(m.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const V of T)V.removedNodes.length>0&&Do(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){Ex.add(y);const w=document.activeElement;if(!d.contains(w)){const C=new CustomEvent(lf,Nx);d.addEventListener(lf,p),d.dispatchEvent(C),C.defaultPrevented||(q_(eI(Uw(d)),{select:!0}),document.activeElement===w&&Do(d))}return()=>{d.removeEventListener(lf,p),setTimeout(()=>{const C=new CustomEvent(cf,Nx);d.addEventListener(cf,g),d.dispatchEvent(C),C.defaultPrevented||Do(w??document.body,{select:!0}),d.removeEventListener(cf,g),Ex.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,[T,$]=X_(j);T&&$?!w.shiftKey&&C===$?(w.preventDefault(),n&&Do(T,{select:!0})):w.shiftKey&&C===T&&(w.preventDefault(),n&&Do($,{select:!0})):C===j&&w.preventDefault()}},[n,i,y.paused]);return u.jsx(Xe.div,{tabIndex:-1,...l,ref:v,onKeyDown:S})});Hp.displayName=G_;function q_(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Do(i,{select:t}),document.activeElement!==n)return}function X_(e){const t=Uw(e),n=Cx(t,e),i=Cx(t.reverse(),e);return[n,i]}function Uw(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 Cx(e,t){for(const n of e)if(!Q_(n,{upTo:t}))return n}function Q_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function J_(e){return e instanceof HTMLInputElement&&"select"in e}function Do(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&J_(e)&&t&&e.select()}}var Ex=Z_();function Z_(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=jx(e,t),e.unshift(t)},remove(t){e=jx(e,t),e[0]?.resume()}}}function jx(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function eI(e){return e.filter(t=>t.tagName!=="A")}var tI="Portal",Vp=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?rv.createPortal(u.jsx(Xe.div,{...i,ref:t}),l):null});Vp.displayName=tI;var uf=0;function Hw(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tx()),document.body.insertAdjacentElement("beforeend",e[1]??Tx()),uf++,()=>{uf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),uf--}},[])}function Tx(){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 Mr=function(){return Mr=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},Mr.apply(this,arguments)};function Vw(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n}function nI(e,t,n){if(n||arguments.length===2)for(var i=0,a=t.length,s;i<a;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var lc="right-scroll-bar-position",cc="width-before-scroll-bar",rI="with-scroll-bars-hidden",oI="--removed-body-scroll-bar-size";function df(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function iI(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 aI=typeof window<"u"?k.useLayoutEffect:k.useEffect,Rx=new WeakMap;function sI(e,t){var n=iI(null,function(i){return e.forEach(function(a){return df(a,i)})});return aI(function(){var i=Rx.get(n);if(i){var a=new Set(i),s=new Set(e),l=n.current;a.forEach(function(d){s.has(d)||df(d,null)}),s.forEach(function(d){a.has(d)||df(d,l)})}Rx.set(n,e)},[e]),n}function lI(e){return e}function cI(e,t){t===void 0&&(t=lI);var n=[],i=!1,a={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,i);return n.push(l),function(){n=n.filter(function(d){return d!==l})}},assignSyncMedium:function(s){for(i=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(d){return s(d)},filter:function(){return n}}},assignMedium:function(s){i=!0;var l=[];if(n.length){var d=n;n=[],d.forEach(s),l=n}var f=function(){var g=l;l=[],g.forEach(s)},p=function(){return Promise.resolve().then(f)};p(),n={push:function(g){l.push(g),p()},filter:function(g){return l=l.filter(g),n}}}};return a}function uI(e){e===void 0&&(e={});var t=cI(null);return t.options=Mr({async:!0,ssr:!1},e),t}var Ww=function(e){var t=e.sideCar,n=Vw(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,Mr({},n))};Ww.isSideCarExport=!0;function dI(e,t){return e.useMedium(t),Ww}var Kw=uI(),ff=function(){},Hc=k.forwardRef(function(e,t){var n=k.useRef(null),i=k.useState({onScrollCapture:ff,onWheelCapture:ff,onTouchMoveCapture:ff}),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,T=e.gapMode,$=Vw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),V=v,L=sI([n,t]),A=Mr(Mr({},$),a);return k.createElement(k.Fragment,null,g&&k.createElement(V,{sideCar:Kw,removeScrollBar:p,shards:m,noRelative:y,noIsolation:S,inert:w,setCallbacks:s,allowPinchZoom:!!N,lockRef:n,gapMode:T}),l?k.cloneElement(k.Children.only(d),Mr(Mr({},A),{ref:L})):k.createElement(j,Mr({},A,{className:f,ref:L}),d))});Hc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hc.classNames={fullWidth:cc,zeroRight:lc};var fI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fI();return t&&e.setAttribute("nonce",t),e}function hI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pI())&&(hI(t,n),mI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xI=function(){var e=gI();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Yw=function(){var e=xI(),t=function(n){var i=n.styles,a=n.dynamic;return e(i,a),null};return t},yI={left:0,top:0,right:0,gap:0},pf=function(e){return parseInt(e||"",10)||0},vI=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[pf(n),pf(i),pf(a)]},wI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yI;var t=vI(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},bI=Yw(),ta="data-scroll-locked",kI=function(e,t,n,i){var a=e.left,s=e.top,l=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
40
|
+
.`.concat(rI,` {
|
|
41
|
+
overflow: hidden `).concat(i,`;
|
|
42
|
+
padding-right: `).concat(d,"px ").concat(i,`;
|
|
43
|
+
}
|
|
44
|
+
body[`).concat(ta,`] {
|
|
45
|
+
overflow: hidden `).concat(i,`;
|
|
46
|
+
overscroll-behavior: contain;
|
|
47
|
+
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
48
|
+
padding-left: `.concat(a,`px;
|
|
49
|
+
padding-top: `).concat(s,`px;
|
|
50
|
+
padding-right: `).concat(l,`px;
|
|
51
|
+
margin-left:0;
|
|
52
|
+
margin-top:0;
|
|
53
|
+
margin-right: `).concat(d,"px ").concat(i,`;
|
|
54
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.`).concat(lc,` {
|
|
58
|
+
right: `).concat(d,"px ").concat(i,`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.`).concat(cc,` {
|
|
62
|
+
margin-right: `).concat(d,"px ").concat(i,`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.`).concat(lc," .").concat(lc,` {
|
|
66
|
+
right: 0 `).concat(i,`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.`).concat(cc," .").concat(cc,` {
|
|
70
|
+
margin-right: 0 `).concat(i,`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
body[`).concat(ta,`] {
|
|
74
|
+
`).concat(oI,": ").concat(d,`px;
|
|
75
|
+
}
|
|
76
|
+
`)},Px=function(){var e=parseInt(document.body.getAttribute(ta)||"0",10);return isFinite(e)?e:0},SI=function(){k.useEffect(function(){return document.body.setAttribute(ta,(Px()+1).toString()),function(){var e=Px()-1;e<=0?document.body.removeAttribute(ta):document.body.setAttribute(ta,e.toString())}},[])},NI=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,a=i===void 0?"margin":i;SI();var s=k.useMemo(function(){return wI(a)},[a]);return k.createElement(bI,{styles:kI(s,!t,a,n?"":"!important")})},qf=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return qf=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{qf=!1}var Yi=qf?{passive:!1}:!1,CI=function(e){return e.tagName==="TEXTAREA"},Gw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CI(e)&&n[t]==="visible")},EI=function(e){return Gw(e,"overflowY")},jI=function(e){return Gw(e,"overflowX")},Ax=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var a=qw(e,i);if(a){var s=Xw(e,i),l=s[1],d=s[2];if(l>d)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},TI=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},RI=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},qw=function(e,t){return e==="v"?EI(t):jI(t)},Xw=function(e,t){return e==="v"?TI(t):RI(t)},PI=function(e,t){return e==="h"&&t==="rtl"?-1:1},AI=function(e,t,n,i,a){var s=PI(e,window.getComputedStyle(t).direction),l=s*i,d=n.target,f=t.contains(d),p=!1,g=l>0,m=0,v=0;do{if(!d)break;var y=Xw(e,d),S=y[0],w=y[1],N=y[2],C=w-N-s*S;(S||C)&&qw(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]},_x=function(e){return[e.deltaX,e.deltaY]},Ix=function(e){return e&&"current"in e?e.current:e},_I=function(e,t){return e[0]===t[0]&&e[1]===t[1]},II=function(e){return`
|
|
77
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
78
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
79
|
+
`)},LI=0,Gi=[];function DI(e){var t=k.useRef([]),n=k.useRef([0,0]),i=k.useRef(),a=k.useState(LI++)[0],s=k.useState(Yw)[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=nI([e.lockRef.current],(e.shards||[]).map(Ix),!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,T="deltaX"in w?w.deltaX:j[0]-C[0],$="deltaY"in w?w.deltaY:j[1]-C[1],V,L=w.target,A=Math.abs(T)>Math.abs($)?"h":"v";if("touches"in w&&A==="h"&&L.type==="range")return!1;var U=window.getSelection(),re=U&&U.anchorNode,O=re?re===L||re.contains(L):!1;if(O)return!1;var J=Ax(A,L);if(!J)return!0;if(J?V=A:(V=A==="v"?"h":"v",J=Ax(A,L)),!J)return!1;if(!i.current&&"changedTouches"in w&&(T||$)&&(i.current=V),!V)return!0;var _=i.current||V;return AI(_,N,w,_==="h"?T:$)},[]),f=k.useCallback(function(w){var N=w;if(!(!Gi.length||Gi[Gi.length-1]!==s)){var C="deltaY"in N?_x(N):Jl(N),j=t.current.filter(function(V){return V.name===N.type&&(V.target===N.target||N.target===V.shadowParent)&&_I(V.delta,C)})[0];if(j&&j.should){N.cancelable&&N.preventDefault();return}if(!j){var T=(l.current.shards||[]).map(Ix).filter(Boolean).filter(function(V){return V.contains(N.target)}),$=T.length>0?d(N,T[0]):!l.current.noIsolation;$&&N.cancelable&&N.preventDefault()}}},[]),p=k.useCallback(function(w,N,C,j){var T={name:w,delta:N,target:C,should:j,shadowParent:MI(C)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function($){return $!==T})},1)},[]),g=k.useCallback(function(w){n.current=Jl(w),i.current=void 0},[]),m=k.useCallback(function(w){p(w.type,_x(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 Gi.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Yi),document.addEventListener("touchmove",f,Yi),document.addEventListener("touchstart",g,Yi),function(){Gi=Gi.filter(function(w){return w!==s}),document.removeEventListener("wheel",f,Yi),document.removeEventListener("touchmove",f,Yi),document.removeEventListener("touchstart",g,Yi)}},[]);var y=e.removeScrollBar,S=e.inert;return k.createElement(k.Fragment,null,S?k.createElement(s,{styles:II(a)}):null,y?k.createElement(NI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function MI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const OI=dI(Kw,DI);var Wp=k.forwardRef(function(e,t){return k.createElement(Hc,Mr({},e,{ref:t,sideCar:OI}))});Wp.classNames=Hc.classNames;var zI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qi=new WeakMap,Zl=new WeakMap,ec={},hf=0,Qw=function(e){return e&&(e.host||Qw(e.parentNode))},FI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=Qw(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},$I=function(e,t,n,i){var a=FI(t,Array.isArray(e)?e:[e]);ec[n]||(ec[n]=new WeakMap);var s=ec[n],l=[],d=new Set,f=new Set(a),p=function(m){!m||d.has(m)||(d.add(m),p(m.parentNode))};a.forEach(p);var g=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(v){if(d.has(v))g(v);else try{var y=v.getAttribute(i),S=y!==null&&y!=="false",w=(qi.get(v)||0)+1,N=(s.get(v)||0)+1;qi.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(),hf++,function(){l.forEach(function(m){var v=qi.get(m)-1,y=s.get(m)-1;qi.set(m,v),s.set(m,y),v||(Zl.has(m)||m.removeAttribute(i),Zl.delete(m)),y||m.removeAttribute(n)}),hf--,hf||(qi=new WeakMap,qi=new WeakMap,Zl=new WeakMap,ec={})}},Jw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),a=zI(e);return a?(i.push.apply(i,Array.from(a.querySelectorAll("[aria-live], script"))),$I(i,a,n,"aria-hidden")):function(){return null}},Kp="Dialog",[Zw]=lo(Kp),[BI,Er]=Zw(Kp),e1=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]=aa({prop:i,defaultProp:a,onChange:s});return u.jsx(BI,{scope:t,triggerRef:d,contentRef:f,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),open:p,onOpenChange:g,onOpenToggle:k.useCallback(()=>g(m=>!m),[g]),modal:l,children:n})};e1.displayName=Kp;var t1="DialogTrigger",n1=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Er(t1,n),s=ht(t,a.triggerRef);return u.jsx(Xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":qp(a.open),...i,ref:s,onClick:Ge(e.onClick,a.onOpenToggle)})});n1.displayName=t1;var Yp="DialogPortal",[UI,r1]=Zw(Yp,{forceMount:void 0}),o1=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:a}=e,s=Er(Yp,t);return u.jsx(UI,{scope:t,forceMount:n,children:k.Children.map(i,l=>u.jsx(so,{present:n||s.open,children:u.jsx(Vp,{asChild:!0,container:a,children:l})}))})};o1.displayName=Yp;var bc="DialogOverlay",i1=k.forwardRef((e,t)=>{const n=r1(bc,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,s=Er(bc,e.__scopeDialog);return s.modal?u.jsx(so,{present:i||s.open,children:u.jsx(HI,{...a,ref:t})}):null});i1.displayName=bc;var HI=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Er(bc,n);return u.jsx(Wp,{as:$o,allowPinchZoom:!0,shards:[a.contentRef],children:u.jsx(Xe.div,{"data-state":qp(a.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),xi="DialogContent",a1=k.forwardRef((e,t)=>{const n=r1(xi,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,s=Er(xi,e.__scopeDialog);return u.jsx(so,{present:i||s.open,children:s.modal?u.jsx(VI,{...a,ref:t}):u.jsx(WI,{...a,ref:t})})});a1.displayName=xi;var VI=k.forwardRef((e,t)=>{const n=Er(xi,e.__scopeDialog),i=k.useRef(null),a=ht(t,n.contentRef,i);return k.useEffect(()=>{const s=i.current;if(s)return Jw(s)},[]),u.jsx(s1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0;(l.button===2||d)&&s.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,s=>s.preventDefault())})}),WI=k.forwardRef((e,t)=>{const n=Er(xi,e.__scopeDialog),i=k.useRef(!1),a=k.useRef(!1);return u.jsx(s1,{...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()}})}),s1=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,d=Er(xi,n),f=k.useRef(null),p=ht(t,f);return Hw(),u.jsxs(u.Fragment,{children:[u.jsx(Hp,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:s,children:u.jsx(Up,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":qp(d.open),...l,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(YI,{titleId:d.titleId}),u.jsx(qI,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Gp="DialogTitle",l1=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Er(Gp,n);return u.jsx(Xe.h2,{id:a.titleId,...i,ref:t})});l1.displayName=Gp;var c1="DialogDescription",KI=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Er(c1,n);return u.jsx(Xe.p,{id:a.descriptionId,...i,ref:t})});KI.displayName=c1;var u1="DialogClose",d1=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Er(u1,n);return u.jsx(Xe.button,{type:"button",...i,ref:t,onClick:Ge(e.onClick,()=>a.onOpenChange(!1))})});d1.displayName=u1;function qp(e){return e?"open":"closed"}var f1="DialogTitleWarning",[RM,p1]=rj(f1,{contentName:xi,titleName:Gp,docsSlug:"dialog"}),YI=({titleId:e})=>{const t=p1(f1),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},GI="DialogDescriptionWarning",qI=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${p1(GI).contentName}}.`;return k.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},XI=e1,QI=n1,JI=o1,ZI=i1,eL=a1,tL=l1,nL=d1;function ys({...e}){return u.jsx(XI,{"data-slot":"dialog",...e})}function Xp({...e}){return u.jsx(QI,{"data-slot":"dialog-trigger",...e})}function rL({...e}){return u.jsx(JI,{"data-slot":"dialog-portal",...e})}function oL({className:e,...t}){return u.jsx(ZI,{"data-slot":"dialog-overlay",className:pt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function vs({className:e,children:t,...n}){return u.jsxs(rL,{"data-slot":"dialog-portal",children:[u.jsx(oL,{}),u.jsxs(eL,{"data-slot":"dialog-content",className:pt("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,u.jsxs(nL,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[u.jsx(ra,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ws({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-header",className:pt("flex flex-col gap-2 text-center sm:text-left",e),...t})}function bs({className:e,...t}){return u.jsx(tL,{"data-slot":"dialog-title",className:pt("text-lg leading-none font-semibold",e),...t})}const iL=["top","right","bottom","left"],Bo=Math.min,Qn=Math.max,kc=Math.round,tc=Math.floor,$r=e=>({x:e,y:e}),aL={left:"right",right:"left",bottom:"top",top:"bottom"};function Xf(e,t,n){return Qn(e,Bo(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function ao(e){return e.split("-")[0]}function fa(e){return e.split("-")[1]}function Qp(e){return e==="x"?"y":"x"}function Jp(e){return e==="y"?"height":"width"}function Or(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zp(e){return Qp(Or(e))}function sL(e,t,n){n===void 0&&(n=!1);const i=fa(e),a=Zp(e),s=Jp(a);let l=a==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Sc(l)),[l,Sc(l)]}function lL(e){const t=Sc(e);return[Qf(e),t,Qf(t)]}function Qf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lx=["left","right"],Dx=["right","left"],cL=["top","bottom"],uL=["bottom","top"];function dL(e,t,n){switch(e){case"top":case"bottom":return n?t?Dx:Lx:t?Lx:Dx;case"left":case"right":return t?cL:uL;default:return[]}}function fL(e,t,n,i){const a=fa(e);let s=dL(ao(e),n==="start",i);return a&&(s=s.map(l=>l+"-"+a),t&&(s=s.concat(s.map(Qf)))),s}function Sc(e){const t=ao(e);return aL[t]+e.slice(t.length)}function pL(e){return{top:0,right:0,bottom:0,left:0,...e}}function h1(e){return typeof e!="number"?pL(e):{top:e,right:e,bottom:e,left:e}}function Nc(e){const{x:t,y:n,width:i,height:a}=e;return{width:i,height:a,top:n,left:t,right:t+i,bottom:n+a,x:t,y:n}}function Mx(e,t,n){let{reference:i,floating:a}=e;const s=Or(t),l=Zp(t),d=Jp(l),f=ao(t),p=s==="y",g=i.x+i.width/2-a.width/2,m=i.y+i.height/2-a.height/2,v=i[d]/2-a[d]/2;let y;switch(f){case"top":y={x:g,y:i.y-a.height};break;case"bottom":y={x:g,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:m};break;case"left":y={x:i.x-a.width,y:m};break;default:y={x:i.x,y:i.y}}switch(fa(t)){case"start":y[l]-=v*(n&&p?-1:1);break;case"end":y[l]+=v*(n&&p?-1:1);break}return y}async function hL(e,t){var n;t===void 0&&(t={});const{x:i,y:a,platform:s,rects:l,elements:d,strategy:f}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:v=!1,padding:y=0}=io(t,e),S=h1(y),N=d[v?m==="floating"?"reference":"floating":m],C=Nc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(N)))==null||n?N:N.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:p,rootBoundary:g,strategy:f})),j=m==="floating"?{x:i,y:a,width:l.floating.width,height:l.floating.height}:l.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),$=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},V=Nc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:j,offsetParent:T,strategy:f}):j);return{top:(C.top-V.top+S.top)/$.y,bottom:(V.bottom-C.bottom+S.bottom)/$.y,left:(C.left-V.left+S.left)/$.x,right:(V.right-C.right+S.right)/$.x}}const mL=50,gL=async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:s=[],platform:l}=n,d=l.detectOverflow?l:{...l,detectOverflow:hL},f=await(l.isRTL==null?void 0:l.isRTL(t));let p=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:g,y:m}=Mx(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:T,y:$,data:V,reset:L}=await j({x:g,y:m,initialPlacement:i,placement:v,strategy:a,middlewareData:S,rects:p,platform:d,elements:{reference:e,floating:t}});g=T??g,m=$??m,S[C]={...S[C],...V},L&&y<mL&&(y++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(p=L.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):L.rects),{x:g,y:m}=Mx(p,v,f)),w=-1)}return{x:g,y:m,placement:v,strategy:a,middlewareData:S}},xL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:a,rects:s,platform:l,elements:d,middlewareData:f}=t,{element:p,padding:g=0}=io(e,t)||{};if(p==null)return{};const m=h1(g),v={x:n,y:i},y=Zp(a),S=Jp(y),w=await l.getDimensions(p),N=y==="y",C=N?"top":"left",j=N?"bottom":"right",T=N?"clientHeight":"clientWidth",$=s.reference[S]+s.reference[y]-v[y]-s.floating[S],V=v[y]-s.reference[y],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(p));let A=L?L[T]:0;(!A||!await(l.isElement==null?void 0:l.isElement(L)))&&(A=d.floating[T]||s.floating[S]);const U=$/2-V/2,re=A/2-w[S]/2-1,O=Bo(m[C],re),J=Bo(m[j],re),_=O,oe=A-w[S]-J,G=A/2-w[S]/2+U,F=Xf(_,G,oe),W=!f.arrow&&fa(a)!=null&&G!==F&&s.reference[S]/2-(G<_?O:J)-w[S]/2<0,ne=W?G<_?G-_:G-oe:0;return{[y]:v[y]+ne,data:{[y]:F,centerOffset:G-F-ne,...W&&{alignmentOffset:ne}},reset:W}}}),yL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:a,middlewareData:s,rects:l,initialPlacement:d,platform:f,elements:p}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...N}=io(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=ao(a),j=Or(d),T=ao(d)===d,$=await(f.isRTL==null?void 0:f.isRTL(p.floating)),V=v||(T||!w?[Sc(d)]:lL(d)),L=S!=="none";!v&&L&&V.push(...fL(d,w,S,$));const A=[d,...V],U=await f.detectOverflow(t,N),re=[];let O=((i=s.flip)==null?void 0:i.overflows)||[];if(g&&re.push(U[C]),m){const G=sL(a,l,$);re.push(U[G[0]],U[G[1]])}if(O=[...O,{placement:a,overflows:re}],!re.every(G=>G<=0)){var J,_;const G=(((J=s.flip)==null?void 0:J.index)||0)+1,F=A[G];if(F&&(!(m==="alignment"?j!==Or(F):!1)||O.every(I=>Or(I.placement)===j?I.overflows[0]>0:!0)))return{data:{index:G,overflows:O},reset:{placement:F}};let W=(_=O.filter(ne=>ne.overflows[0]<=0).sort((ne,I)=>ne.overflows[1]-I.overflows[1])[0])==null?void 0:_.placement;if(!W)switch(y){case"bestFit":{var oe;const ne=(oe=O.filter(I=>{if(L){const ee=Or(I.placement);return ee===j||ee==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(ee=>ee>0).reduce((ee,R)=>ee+R,0)]).sort((I,ee)=>I[1]-ee[1])[0])==null?void 0:oe[0];ne&&(W=ne);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}}}};function Ox(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zx(e){return iL.some(t=>e[t]>=0)}const vL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:a="referenceHidden",...s}=io(e,t);switch(a){case"referenceHidden":{const l=await i.detectOverflow(t,{...s,elementContext:"reference"}),d=Ox(l,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:zx(d)}}}case"escaped":{const l=await i.detectOverflow(t,{...s,altBoundary:!0}),d=Ox(l,n.floating);return{data:{escapedOffsets:d,escaped:zx(d)}}}default:return{}}}}},m1=new Set(["left","top"]);async function wL(e,t){const{placement:n,platform:i,elements:a}=e,s=await(i.isRTL==null?void 0:i.isRTL(a.floating)),l=ao(n),d=fa(n),f=Or(n)==="y",p=m1.has(l)?-1:1,g=s&&f?-1:1,m=io(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof S=="number"&&(y=d==="end"?S*-1:S),f?{x:y*g,y:v*p}:{x:v*p,y:y*g}}const bL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:a,y:s,placement:l,middlewareData:d}=t,f=await wL(t,e);return l===((n=d.offset)==null?void 0:n.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:a+f.x,y:s+f.y,data:{...f,placement:l}}}}},kL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:a,platform:s}=t,{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:C=>{let{x:j,y:T}=C;return{x:j,y:T}}},...p}=io(e,t),g={x:n,y:i},m=await s.detectOverflow(t,p),v=Or(ao(a)),y=Qp(v);let S=g[y],w=g[v];if(l){const C=y==="y"?"top":"left",j=y==="y"?"bottom":"right",T=S+m[C],$=S-m[j];S=Xf(T,S,$)}if(d){const C=v==="y"?"top":"left",j=v==="y"?"bottom":"right",T=w+m[C],$=w-m[j];w=Xf(T,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}}}}}},SL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:a,rects:s,middlewareData:l}=t,{offset:d=0,mainAxis:f=!0,crossAxis:p=!0}=io(e,t),g={x:n,y:i},m=Or(a),v=Qp(m);let y=g[v],S=g[m];const w=io(d,t),N=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const T=v==="y"?"height":"width",$=s.reference[v]-s.floating[T]+N.mainAxis,V=s.reference[v]+s.reference[T]-N.mainAxis;y<$?y=$:y>V&&(y=V)}if(p){var C,j;const T=v==="y"?"width":"height",$=m1.has(ao(a)),V=s.reference[m]-s.floating[T]+($&&((C=l.offset)==null?void 0:C[m])||0)+($?0:N.crossAxis),L=s.reference[m]+s.reference[T]+($?0:((j=l.offset)==null?void 0:j[m])||0)-($?N.crossAxis:0);S<V?S=V:S>L&&(S=L)}return{[v]:y,[m]:S}}}},NL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:a,rects:s,platform:l,elements:d}=t,{apply:f=()=>{},...p}=io(e,t),g=await l.detectOverflow(t,p),m=ao(a),v=fa(a),y=Or(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,T=S-g.left-g.right,$=Bo(w-g[N],j),V=Bo(S-g[C],T),L=!t.middlewareData.shift;let A=$,U=V;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=T),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(A=j),L&&!v){const O=Qn(g.left,0),J=Qn(g.right,0),_=Qn(g.top,0),oe=Qn(g.bottom,0);y?U=S-2*(O!==0||J!==0?O+J: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 re=await l.getDimensions(d.floating);return S!==re.width||w!==re.height?{reset:{rects:!0}}:{}}}};function Vc(){return typeof window<"u"}function pa(e){return g1(e)?(e.nodeName||"").toLowerCase():"#document"}function Zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vr(e){var t;return(t=(g1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function g1(e){return Vc()?e instanceof Node||e instanceof Zn(e).Node:!1}function Sr(e){return Vc()?e instanceof Element||e instanceof Zn(e).Element:!1}function uo(e){return Vc()?e instanceof HTMLElement||e instanceof Zn(e).HTMLElement:!1}function Fx(e){return!Vc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zn(e).ShadowRoot}function Ls(e){const{overflow:t,overflowX:n,overflowY:i,display:a}=Nr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&a!=="inline"&&a!=="contents"}function CL(e){return/^(table|td|th)$/.test(pa(e))}function Wc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const EL=/transform|translate|scale|rotate|perspective|filter/,jL=/paint|layout|strict|content/,pi=e=>!!e&&e!=="none";let mf;function eh(e){const t=Sr(e)?Nr(e):e;return pi(t.transform)||pi(t.translate)||pi(t.scale)||pi(t.rotate)||pi(t.perspective)||!th()&&(pi(t.backdropFilter)||pi(t.filter))||EL.test(t.willChange||"")||jL.test(t.contain||"")}function TL(e){let t=Uo(e);for(;uo(t)&&!sa(t);){if(eh(t))return t;if(Wc(t))return null;t=Uo(t)}return null}function th(){return mf==null&&(mf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mf}function sa(e){return/^(html|body|#document)$/.test(pa(e))}function Nr(e){return Zn(e).getComputedStyle(e)}function Kc(e){return Sr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Uo(e){if(pa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fx(e)&&e.host||Vr(e);return Fx(t)?t.host:t}function x1(e){const t=Uo(e);return sa(t)?e.ownerDocument?e.ownerDocument.body:e.body:uo(t)&&Ls(t)?t:x1(t)}function ks(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=x1(e),s=a===((i=e.ownerDocument)==null?void 0:i.body),l=Zn(a);if(s){const d=Jf(l);return t.concat(l,l.visualViewport||[],Ls(a)?a:[],d&&n?ks(d):[])}else return t.concat(a,ks(a,[],n))}function Jf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y1(e){const t=Nr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=uo(e),s=a?e.offsetWidth:n,l=a?e.offsetHeight:i,d=kc(n)!==s||kc(i)!==l;return d&&(n=s,i=l),{width:n,height:i,$:d}}function nh(e){return Sr(e)?e:e.contextElement}function na(e){const t=nh(e);if(!uo(t))return $r(1);const n=t.getBoundingClientRect(),{width:i,height:a,$:s}=y1(t);let l=(s?kc(n.width):n.width)/i,d=(s?kc(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}const RL=$r(0);function v1(e){const t=Zn(e);return!th()||!t.visualViewport?RL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zn(e)?!1:t}function yi(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=nh(e);let l=$r(1);t&&(i?Sr(i)&&(l=na(i)):l=na(e));const d=PL(s,n,i)?v1(s):$r(0);let f=(a.left+d.x)/l.x,p=(a.top+d.y)/l.y,g=a.width/l.x,m=a.height/l.y;if(s){const v=Zn(s),y=i&&Sr(i)?Zn(i):i;let S=v,w=Jf(S);for(;w&&i&&y!==S;){const N=na(w),C=w.getBoundingClientRect(),j=Nr(w),T=C.left+(w.clientLeft+parseFloat(j.paddingLeft))*N.x,$=C.top+(w.clientTop+parseFloat(j.paddingTop))*N.y;f*=N.x,p*=N.y,g*=N.x,m*=N.y,f+=T,p+=$,S=Zn(w),w=Jf(S)}}return Nc({width:g,height:m,x:f,y:p})}function Yc(e,t){const n=Kc(e).scrollLeft;return t?t.left+n:yi(Vr(e)).left+n}function w1(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Yc(e,n),a=n.top+t.scrollTop;return{x:i,y:a}}function AL(e){let{elements:t,rect:n,offsetParent:i,strategy:a}=e;const s=a==="fixed",l=Vr(i),d=t?Wc(t.floating):!1;if(i===l||d&&s)return n;let f={scrollLeft:0,scrollTop:0},p=$r(1);const g=$r(0),m=uo(i);if((m||!m&&!s)&&((pa(i)!=="body"||Ls(l))&&(f=Kc(i)),m)){const y=yi(i);p=na(i),g.x=y.x+i.clientLeft,g.y=y.y+i.clientTop}const v=l&&!m&&!s?w1(l,f):$r(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-f.scrollLeft*p.x+g.x+v.x,y:n.y*p.y-f.scrollTop*p.y+g.y+v.y}}function _L(e){return Array.from(e.getClientRects())}function IL(e){const t=Vr(e),n=Kc(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+Yc(e);const d=-n.scrollTop;return Nr(i).direction==="rtl"&&(l+=Qn(t.clientWidth,i.clientWidth)-a),{width:a,height:s,x:l,y:d}}const $x=25;function LL(e,t){const n=Zn(e),i=Vr(e),a=n.visualViewport;let s=i.clientWidth,l=i.clientHeight,d=0,f=0;if(a){s=a.width,l=a.height;const g=th();(!g||g&&t==="fixed")&&(d=a.offsetLeft,f=a.offsetTop)}const p=Yc(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<=$x&&(s-=S)}else p<=$x&&(s+=p);return{width:s,height:l,x:d,y:f}}function DL(e,t){const n=yi(e,!0,t==="fixed"),i=n.top+e.clientTop,a=n.left+e.clientLeft,s=uo(e)?na(e):$r(1),l=e.clientWidth*s.x,d=e.clientHeight*s.y,f=a*s.x,p=i*s.y;return{width:l,height:d,x:f,y:p}}function Bx(e,t,n){let i;if(t==="viewport")i=LL(e,n);else if(t==="document")i=IL(Vr(e));else if(Sr(t))i=DL(t,n);else{const a=v1(e);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Nc(i)}function b1(e,t){const n=Uo(e);return n===t||!Sr(n)||sa(n)?!1:Nr(n).position==="fixed"||b1(n,t)}function ML(e,t){const n=t.get(e);if(n)return n;let i=ks(e,[],!1).filter(d=>Sr(d)&&pa(d)!=="body"),a=null;const s=Nr(e).position==="fixed";let l=s?Uo(e):e;for(;Sr(l)&&!sa(l);){const d=Nr(l),f=eh(l);!f&&d.position==="fixed"&&(a=null),(s?!f&&!a:!f&&d.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Ls(l)&&!f&&b1(e,l))?i=i.filter(g=>g!==l):a=d,l=Uo(l)}return t.set(e,i),i}function OL(e){let{element:t,boundary:n,rootBoundary:i,strategy:a}=e;const l=[...n==="clippingAncestors"?Wc(t)?[]:ML(t,this._c):[].concat(n),i],d=Bx(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=Bx(t,l[v],a);f=Qn(y.top,f),p=Bo(y.right,p),g=Bo(y.bottom,g),m=Qn(y.left,m)}return{width:p-m,height:g-f,x:m,y:f}}function zL(e){const{width:t,height:n}=y1(e);return{width:t,height:n}}function FL(e,t,n){const i=uo(t),a=Vr(t),s=n==="fixed",l=yi(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const f=$r(0);function p(){f.x=Yc(a)}if(i||!i&&!s)if((pa(t)!=="body"||Ls(a))&&(d=Kc(t)),i){const y=yi(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?w1(a,d):$r(0),m=l.left+d.scrollLeft-f.x-g.x,v=l.top+d.scrollTop-f.y-g.y;return{x:m,y:v,width:l.width,height:l.height}}function gf(e){return Nr(e).position==="static"}function Ux(e,t){if(!uo(e)||Nr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vr(e)===n&&(n=n.ownerDocument.body),n}function k1(e,t){const n=Zn(e);if(Wc(e))return n;if(!uo(e)){let a=Uo(e);for(;a&&!sa(a);){if(Sr(a)&&!gf(a))return a;a=Uo(a)}return n}let i=Ux(e,t);for(;i&&CL(i)&&gf(i);)i=Ux(i,t);return i&&sa(i)&&gf(i)&&!eh(i)?n:i||TL(e)||n}const $L=async function(e){const t=this.getOffsetParent||k1,n=this.getDimensions,i=await n(e.floating);return{reference:FL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function BL(e){return Nr(e).direction==="rtl"}const UL={convertOffsetParentRelativeRectToViewportRelativeRect:AL,getDocumentElement:Vr,getClippingRect:OL,getOffsetParent:k1,getElementRects:$L,getClientRects:_L,getDimensions:zL,getScale:na,isElement:Sr,isRTL:BL};function S1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HL(e,t){let n=null,i;const a=Vr(e);function s(){var d;clearTimeout(i),(d=n)==null||d.disconnect(),n=null}function l(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),s();const p=e.getBoundingClientRect(),{left:g,top:m,width:v,height:y}=p;if(d||t(),!v||!y)return;const S=tc(m),w=tc(a.clientWidth-(g+v)),N=tc(a.clientHeight-(m+y)),C=tc(g),T={rootMargin:-S+"px "+-w+"px "+-N+"px "+-C+"px",threshold:Qn(0,Bo(1,f))||1};let $=!0;function V(L){const A=L[0].intersectionRatio;if(A!==f){if(!$)return l();A?l(!1,A):i=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!S1(p,e.getBoundingClientRect())&&l(),$=!1}try{n=new IntersectionObserver(V,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(V,T)}n.observe(e)}return l(!0),s}function VL(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,p=nh(e),g=a||s?[...p?ks(p):[],...t?ks(t):[]]:[];g.forEach(C=>{a&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const m=p&&d?HL(p,n):null;let v=-1,y=null;l&&(y=new ResizeObserver(C=>{let[j]=C;j&&j.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(t)})),n()}),p&&!f&&y.observe(p),t&&y.observe(t));let S,w=f?yi(e):null;f&&N();function N(){const C=yi(e);w&&!S1(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 WL=bL,KL=kL,YL=yL,GL=NL,qL=vL,Hx=xL,XL=SL,QL=(e,t,n)=>{const i=new Map,a={platform:UL,...n},s={...a.platform,_c:i};return gL(e,t,{...a,platform:s})};var JL=typeof document<"u",ZL=function(){},uc=JL?k.useLayoutEffect:ZL;function Cc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Cc(e[i],t[i]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,a[i]))return!1;for(i=n;i--!==0;){const s=a[i];if(!(s==="_owner"&&e.$$typeof)&&!Cc(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function N1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vx(e,t){const n=N1(e);return Math.round(t*n)/n}function xf(e){const t=k.useRef(e);return uc(()=>{t.current=e}),t}function eD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:d=!0,whileElementsMounted:f,open:p}=e,[g,m]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=k.useState(i);Cc(v,i)||y(i);const[S,w]=k.useState(null),[N,C]=k.useState(null),j=k.useCallback(I=>{I!==L.current&&(L.current=I,w(I))},[]),T=k.useCallback(I=>{I!==A.current&&(A.current=I,C(I))},[]),$=s||S,V=l||N,L=k.useRef(null),A=k.useRef(null),U=k.useRef(g),re=f!=null,O=xf(f),J=xf(a),_=xf(p),oe=k.useCallback(()=>{if(!L.current||!A.current)return;const I={placement:t,strategy:n,middleware:v};J.current&&(I.platform=J.current),QL(L.current,A.current,I).then(ee=>{const R={...ee,isPositioned:_.current!==!1};G.current&&!Cc(U.current,R)&&(U.current=R,Ps.flushSync(()=>{m(R)}))})},[v,t,n,J,_]);uc(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,m(I=>({...I,isPositioned:!1})))},[p]);const G=k.useRef(!1);uc(()=>(G.current=!0,()=>{G.current=!1}),[]),uc(()=>{if($&&(L.current=$),V&&(A.current=V),$&&V){if(O.current)return O.current($,V,oe);oe()}},[$,V,oe,O,re]);const F=k.useMemo(()=>({reference:L,floating:A,setReference:j,setFloating:T}),[j,T]),W=k.useMemo(()=>({reference:$,floating:V}),[$,V]),ne=k.useMemo(()=>{const I={position:n,left:0,top:0};if(!W.floating)return I;const ee=Vx(W.floating,g.x),R=Vx(W.floating,g.y);return d?{...I,transform:"translate("+ee+"px, "+R+"px)",...N1(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:R}},[n,d,W.floating,g.x,g.y]);return k.useMemo(()=>({...g,update:oe,refs:F,elements:W,floatingStyles:ne}),[g,oe,F,W,ne])}const tD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:a}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?Hx({element:i.current,padding:a}).fn(n):{}:i?Hx({element:i,padding:a}).fn(n):{}}}},nD=(e,t)=>{const n=WL(e);return{name:n.name,fn:n.fn,options:[e,t]}},rD=(e,t)=>{const n=KL(e);return{name:n.name,fn:n.fn,options:[e,t]}},oD=(e,t)=>({fn:XL(e).fn,options:[e,t]}),iD=(e,t)=>{const n=YL(e);return{name:n.name,fn:n.fn,options:[e,t]}},aD=(e,t)=>{const n=GL(e);return{name:n.name,fn:n.fn,options:[e,t]}},sD=(e,t)=>{const n=qL(e);return{name:n.name,fn:n.fn,options:[e,t]}},lD=(e,t)=>{const n=tD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var cD="Arrow",C1=k.forwardRef((e,t)=>{const{children:n,width:i=10,height:a=5,...s}=e;return u.jsx(Xe.svg,{...s,ref:t,width:i,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});C1.displayName=cD;var uD=C1;function E1(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 rh="Popper",[j1,T1]=lo(rh),[dD,R1]=j1(rh),P1=e=>{const{__scopePopper:t,children:n}=e,[i,a]=k.useState(null);return u.jsx(dD,{scope:t,anchor:i,onAnchorChange:a,children:n})};P1.displayName=rh;var A1="PopperAnchor",_1=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...a}=e,s=R1(A1,n),l=k.useRef(null),d=ht(t,l);return k.useEffect(()=>{s.onAnchorChange(i?.current||l.current)}),i?null:u.jsx(Xe.div,{...a,ref:d})});_1.displayName=A1;var oh="PopperContent",[fD,pD]=j1(oh),I1=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=R1(oh,n),[C,j]=k.useState(null),T=ht(t,q=>j(q)),[$,V]=k.useState(null),L=E1($),A=L?.width??0,U=L?.height??0,re=i+(s!=="center"?"-"+s:""),O=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},J=Array.isArray(p)?p:[p],_=J.length>0,oe={padding:O,boundary:J.filter(mD),altBoundary:_},{refs:G,floatingStyles:F,placement:W,isPositioned:ne,middlewareData:I}=eD({strategy:"fixed",placement:re,whileElementsMounted:(...q)=>VL(...q,{animationFrame:y==="always"}),elements:{reference:N.anchor},middleware:[nD({mainAxis:a+U,alignmentAxis:l}),f&&rD({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?oD():void 0,...oe}),f&&iD({...oe}),aD({...oe,apply:({elements:q,rects:pe,availableWidth:we,availableHeight:be})=>{const{width:Me,height:Fe}=pe.reference,st=q.floating.style;st.setProperty("--radix-popper-available-width",`${we}px`),st.setProperty("--radix-popper-available-height",`${be}px`),st.setProperty("--radix-popper-anchor-width",`${Me}px`),st.setProperty("--radix-popper-anchor-height",`${Fe}px`)}}),$&&lD({element:$,padding:d}),gD({arrowWidth:A,arrowHeight:U}),v&&sD({strategy:"referenceHidden",...oe})]}),[ee,R]=M1(W),M=pn(S);wn(()=>{ne&&M?.()},[ne,M]);const X=I.arrow?.x,P=I.arrow?.y,se=I.arrow?.centerOffset!==0,[ve,de]=k.useState();return wn(()=>{C&&de(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:ne?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(fD,{scope:n,placedSide:ee,onArrowChange:V,arrowX:X,arrowY:P,shouldHideArrow:se,children:u.jsx(Xe.div,{"data-side":ee,"data-align":R,...w,ref:T,style:{...w.style,animation:ne?void 0:"none"}})})})});I1.displayName=oh;var L1="PopperArrow",hD={top:"bottom",right:"left",bottom:"top",left:"right"},D1=k.forwardRef(function(t,n){const{__scopePopper:i,...a}=t,s=pD(L1,i),l=hD[s.placedSide];return u.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:u.jsx(uD,{...a,ref:n,style:{...a.style,display:"block"}})})});D1.displayName=L1;function mD(e){return e!==null}var gD=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,d=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[p,g]=M1(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 M1(e){const[t,n="center"]=e.split("-");return[t,n]}var xD=P1,yD=_1,vD=I1,wD=D1;function O1(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 bD="VisuallyHidden",z1=k.forwardRef((e,t)=>u.jsx(Xe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));z1.displayName=bD;var kD=[" ","Enter","ArrowUp","ArrowDown"],SD=[" ","Enter"],Ds="Select",[Gc,qc,ND]=Sw(Ds),[ha]=lo(Ds,[ND,T1]),Xc=T1(),[CD,Ko]=ha(Ds),[ED,jD]=ha(Ds),F1=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=Xc(t),[N,C]=k.useState(null),[j,T]=k.useState(null),[$,V]=k.useState(!1),L=Lc(p),[A=!1,U]=aa({prop:i,defaultProp:a,onChange:s}),[re,O]=aa({prop:l,defaultProp:d,onChange:f}),J=k.useRef(null),_=N?S||!!N.closest("form"):!0,[oe,G]=k.useState(new Set),F=Array.from(oe).map(W=>W.props.value).join(";");return u.jsx(xD,{...w,children:u.jsxs(CD,{required:y,scope:t,trigger:N,onTriggerChange:C,valueNode:j,onValueNodeChange:T,valueNodeHasChildren:$,onValueNodeHasChildrenChange:V,contentId:Fo(),value:re,onValueChange:O,open:A,onOpenChange:U,dir:L,triggerPointerDownPosRef:J,disabled:v,children:[u.jsx(Gc.Provider,{scope:t,children:u.jsx(ED,{scope:e.__scopeSelect,onNativeOptionAdd:k.useCallback(W=>{G(ne=>new Set(ne).add(W))},[]),onNativeOptionRemove:k.useCallback(W=>{G(ne=>{const I=new Set(ne);return I.delete(W),I})},[]),children:n})}),_?u.jsxs(lb,{"aria-hidden":!0,required:y,tabIndex:-1,name:g,autoComplete:m,value:re,onChange:W=>O(W.target.value),disabled:v,form:S,children:[re===void 0?u.jsx("option",{value:""}):null,Array.from(oe)]},F):null]})})};F1.displayName=Ds;var $1="SelectTrigger",B1=k.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...a}=e,s=Xc(n),l=Ko($1,n),d=l.disabled||i,f=ht(t,l.onTriggerChange),p=qc(n),g=k.useRef("touch"),[m,v,y]=cb(w=>{const N=p().filter(T=>!T.disabled),C=N.find(T=>T.value===l.value),j=ub(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(yD,{asChild:!0,...s,children:u.jsx(Xe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":sb(l.value)?"":void 0,...a,ref:f,onClick:Ge(a.onClick,w=>{w.currentTarget.focus(),g.current!=="mouse"&&S(w)}),onPointerDown:Ge(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:Ge(a.onKeyDown,w=>{const N=m.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&v(w.key),!(N&&w.key===" ")&&kD.includes(w.key)&&(S(),w.preventDefault())})})})});B1.displayName=$1;var U1="SelectValue",H1=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:a,children:s,placeholder:l="",...d}=e,f=Ko(U1,n),{onValueNodeHasChildrenChange:p}=f,g=s!==void 0,m=ht(t,f.onValueNodeChange);return wn(()=>{p(g)},[p,g]),u.jsx(Xe.span,{...d,ref:m,style:{pointerEvents:"none"},children:sb(f.value)?u.jsx(u.Fragment,{children:l}):s})});H1.displayName=U1;var TD="SelectIcon",V1=k.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...a}=e;return u.jsx(Xe.span,{"aria-hidden":!0,...a,ref:t,children:i||"▼"})});V1.displayName=TD;var RD="SelectPortal",W1=e=>u.jsx(Vp,{asChild:!0,...e});W1.displayName=RD;var vi="SelectContent",K1=k.forwardRef((e,t)=>{const n=Ko(vi,e.__scopeSelect),[i,a]=k.useState();if(wn(()=>{a(new DocumentFragment)},[]),!n.open){const s=i;return s?Ps.createPortal(u.jsx(Y1,{scope:e.__scopeSelect,children:u.jsx(Gc.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),s):null}return u.jsx(G1,{...e,ref:t})});K1.displayName=vi;var br=10,[Y1,Yo]=ha(vi),PD="SelectContentImpl",G1=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(vi,n),[T,$]=k.useState(null),[V,L]=k.useState(null),A=ht(t,q=>$(q)),[U,re]=k.useState(null),[O,J]=k.useState(null),_=qc(n),[oe,G]=k.useState(!1),F=k.useRef(!1);k.useEffect(()=>{if(T)return Jw(T)},[T]),Hw();const W=k.useCallback(q=>{const[pe,...we]=_().map(Fe=>Fe.ref.current),[be]=we.slice(-1),Me=document.activeElement;for(const Fe of q)if(Fe===Me||(Fe?.scrollIntoView({block:"nearest"}),Fe===pe&&V&&(V.scrollTop=0),Fe===be&&V&&(V.scrollTop=V.scrollHeight),Fe?.focus(),document.activeElement!==Me))return},[_,V]),ne=k.useCallback(()=>W([U,T]),[W,U,T]);k.useEffect(()=>{oe&&ne()},[oe,ne]);const{onOpenChange:I,triggerPointerDownPosRef:ee}=j;k.useEffect(()=>{if(T){let q={x:0,y:0};const pe=be=>{q={x:Math.abs(Math.round(be.pageX)-(ee.current?.x??0)),y:Math.abs(Math.round(be.pageY)-(ee.current?.y??0))}},we=be=>{q.x<=10&&q.y<=10?be.preventDefault():T.contains(be.target)||I(!1),document.removeEventListener("pointermove",pe),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",we,{capture:!0})}}},[T,I,ee]),k.useEffect(()=>{const q=()=>I(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[I]);const[R,M]=cb(q=>{const pe=_().filter(Me=>!Me.disabled),we=pe.find(Me=>Me.ref.current===document.activeElement),be=ub(pe,q,we);be&&setTimeout(()=>be.ref.current.focus())}),X=k.useCallback((q,pe,we)=>{const be=!F.current&&!we;(j.value!==void 0&&j.value===pe||be)&&(re(q),be&&(F.current=!0))},[j.value]),P=k.useCallback(()=>T?.focus(),[T]),se=k.useCallback((q,pe,we)=>{const be=!F.current&&!we;(j.value!==void 0&&j.value===pe||be)&&J(q)},[j.value]),ve=i==="popper"?Zf:q1,de=ve===Zf?{side:d,sideOffset:f,align:p,alignOffset:g,arrowPadding:m,collisionBoundary:v,collisionPadding:y,sticky:S,hideWhenDetached:w,avoidCollisions:N}:{};return u.jsx(Y1,{scope:n,content:T,viewport:V,onViewportChange:L,itemRefCallback:X,selectedItem:U,onItemLeave:P,itemTextRefCallback:se,focusSelectedItem:ne,selectedItemText:O,position:i,isPositioned:oe,searchRef:R,children:u.jsx(Wp,{as:$o,allowPinchZoom:!0,children:u.jsx(Hp,{asChild:!0,trapped:j.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:Ge(a,q=>{j.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:u.jsx(Up,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:u.jsx(ve,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:q=>q.preventDefault(),...C,...de,onPlaced:()=>G(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:Ge(C.onKeyDown,q=>{const pe=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!pe&&q.key.length===1&&M(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let be=_().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(q.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const Me=q.target,Fe=be.indexOf(Me);be=be.slice(Fe+1)}setTimeout(()=>W(be)),q.preventDefault()}})})})})})})});G1.displayName=PD;var AD="SelectItemAlignedPosition",q1=k.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...a}=e,s=Ko(vi,n),l=Yo(vi,n),[d,f]=k.useState(null),[p,g]=k.useState(null),m=ht(t,A=>g(A)),v=qc(n),y=k.useRef(!1),S=k.useRef(!0),{viewport:w,selectedItem:N,selectedItemText:C,focusSelectedItem:j}=l,T=k.useCallback(()=>{if(s.trigger&&s.valueNode&&d&&p&&w&&N&&C){const A=s.trigger.getBoundingClientRect(),U=p.getBoundingClientRect(),re=s.valueNode.getBoundingClientRect(),O=C.getBoundingClientRect();if(s.dir!=="rtl"){const Me=O.left-U.left,Fe=re.left-Me,st=A.left-Fe,Ot=A.width+st,kn=Math.max(Ot,U.width),zt=window.innerWidth-br,Et=If(Fe,[br,Math.max(br,zt-kn)]);d.style.minWidth=Ot+"px",d.style.left=Et+"px"}else{const Me=U.right-O.right,Fe=window.innerWidth-re.right-Me,st=window.innerWidth-A.right-Fe,Ot=A.width+st,kn=Math.max(Ot,U.width),zt=window.innerWidth-br,Et=If(Fe,[br,Math.max(br,zt-kn)]);d.style.minWidth=Ot+"px",d.style.right=Et+"px"}const J=v(),_=window.innerHeight-br*2,oe=w.scrollHeight,G=window.getComputedStyle(p),F=parseInt(G.borderTopWidth,10),W=parseInt(G.paddingTop,10),ne=parseInt(G.borderBottomWidth,10),I=parseInt(G.paddingBottom,10),ee=F+W+oe+I+ne,R=Math.min(N.offsetHeight*5,ee),M=window.getComputedStyle(w),X=parseInt(M.paddingTop,10),P=parseInt(M.paddingBottom,10),se=A.top+A.height/2-br,ve=_-se,de=N.offsetHeight/2,q=N.offsetTop+de,pe=F+W+q,we=ee-pe;if(pe<=se){const Me=J.length>0&&N===J[J.length-1].ref.current;d.style.bottom="0px";const Fe=p.clientHeight-w.offsetTop-w.offsetHeight,st=Math.max(ve,de+(Me?P:0)+Fe+ne),Ot=pe+st;d.style.height=Ot+"px"}else{const Me=J.length>0&&N===J[0].ref.current;d.style.top="0px";const st=Math.max(se,F+w.offsetTop+(Me?X:0)+de)+we;d.style.height=st+"px",w.scrollTop=pe-se+w.offsetTop}d.style.margin=`${br}px 0`,d.style.minHeight=R+"px",d.style.maxHeight=_+"px",i?.(),requestAnimationFrame(()=>y.current=!0)}},[v,s.trigger,s.valueNode,d,p,w,N,C,s.dir,i]);wn(()=>T(),[T]);const[$,V]=k.useState();wn(()=>{p&&V(window.getComputedStyle(p).zIndex)},[p]);const L=k.useCallback(A=>{A&&S.current===!0&&(T(),j?.(),S.current=!1)},[T,j]);return u.jsx(ID,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:y,onScrollButtonChange:L,children:u.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:$},children:u.jsx(Xe.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});q1.displayName=AD;var _D="SelectPopperPosition",Zf=k.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:a=br,...s}=e,l=Xc(n);return u.jsx(vD,{...l,...s,ref:t,align:i,collisionPadding:a,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Zf.displayName=_D;var[ID,ih]=ha(vi,{}),ep="SelectViewport",X1=k.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...a}=e,s=Yo(ep,n),l=ih(ep,n),d=ht(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(Gc.Slot,{scope:n,children:u.jsx(Xe.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ge(a.onScroll,p=>{const g=p.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:v}=l;if(v?.current&&m){const y=Math.abs(f.current-g.scrollTop);if(y>0){const S=window.innerHeight-br*2,w=parseFloat(m.style.minHeight),N=parseFloat(m.style.height),C=Math.max(w,N);if(C<S){const j=C+y,T=Math.min(S,j),$=j-T;m.style.height=T+"px",m.style.bottom==="0px"&&(g.scrollTop=$>0?$:0,m.style.justifyContent="flex-end")}}}f.current=g.scrollTop})})})]})});X1.displayName=ep;var Q1="SelectGroup",[LD,DD]=ha(Q1),MD=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=Fo();return u.jsx(LD,{scope:n,id:a,children:u.jsx(Xe.div,{role:"group","aria-labelledby":a,...i,ref:t})})});MD.displayName=Q1;var J1="SelectLabel",OD=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=DD(J1,n);return u.jsx(Xe.div,{id:a.id,...i,ref:t})});OD.displayName=J1;var Ec="SelectItem",[zD,Z1]=ha(Ec),eb=k.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:a=!1,textValue:s,...l}=e,d=Ko(Ec,n),f=Yo(Ec,n),p=d.value===i,[g,m]=k.useState(s??""),[v,y]=k.useState(!1),S=ht(t,j=>f.itemRefCallback?.(j,i,a)),w=Fo(),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(zD,{scope:n,value:i,disabled:a,textId:w,isSelected:p,onItemTextChange:k.useCallback(j=>{m(T=>T||(j?.textContent??"").trim())},[]),children:u.jsx(Gc.ItemSlot,{scope:n,value:i,disabled:a,textValue:g,children:u.jsx(Xe.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:Ge(l.onFocus,()=>y(!0)),onBlur:Ge(l.onBlur,()=>y(!1)),onClick:Ge(l.onClick,()=>{N.current!=="mouse"&&C()}),onPointerUp:Ge(l.onPointerUp,()=>{N.current==="mouse"&&C()}),onPointerDown:Ge(l.onPointerDown,j=>{N.current=j.pointerType}),onPointerMove:Ge(l.onPointerMove,j=>{N.current=j.pointerType,a?f.onItemLeave?.():N.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ge(l.onPointerLeave,j=>{j.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Ge(l.onKeyDown,j=>{f.searchRef?.current!==""&&j.key===" "||(SD.includes(j.key)&&C(),j.key===" "&&j.preventDefault())})})})})});eb.displayName=Ec;var ss="SelectItemText",tb=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:a,...s}=e,l=Ko(ss,n),d=Yo(ss,n),f=Z1(ss,n),p=jD(ss,n),[g,m]=k.useState(null),v=ht(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(Xe.span,{id:f.textId,...s,ref:v}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Ps.createPortal(s.children,l.valueNode):null]})});tb.displayName=ss;var nb="SelectItemIndicator",rb=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return Z1(nb,n).isSelected?u.jsx(Xe.span,{"aria-hidden":!0,...i,ref:t}):null});rb.displayName=nb;var tp="SelectScrollUpButton",ob=k.forwardRef((e,t)=>{const n=Yo(tp,e.__scopeSelect),i=ih(tp,e.__scopeSelect),[a,s]=k.useState(!1),l=ht(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(ab,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop-f.offsetHeight)}}):null});ob.displayName=tp;var np="SelectScrollDownButton",ib=k.forwardRef((e,t)=>{const n=Yo(np,e.__scopeSelect),i=ih(np,e.__scopeSelect),[a,s]=k.useState(!1),l=ht(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(ab,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop+f.offsetHeight)}}):null});ib.displayName=np;var ab=k.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...a}=e,s=Yo("SelectScrollButton",n),l=k.useRef(null),d=qc(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(Xe.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Ge(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(i,50))}),onPointerMove:Ge(a.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(i,50))}),onPointerLeave:Ge(a.onPointerLeave,()=>{f()})})}),FD="SelectSeparator",$D=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return u.jsx(Xe.div,{"aria-hidden":!0,...i,ref:t})});$D.displayName=FD;var rp="SelectArrow",BD=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=Xc(n),s=Ko(rp,n),l=Yo(rp,n);return s.open&&l.position==="popper"?u.jsx(wD,{...a,...i,ref:t}):null});BD.displayName=rp;function sb(e){return e===""||e===void 0}var lb=k.forwardRef((e,t)=>{const{value:n,...i}=e,a=k.useRef(null),s=ht(t,a),l=O1(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(z1,{asChild:!0,children:u.jsx("select",{...i,ref:s,defaultValue:n})})});lb.displayName="BubbleSelect";function cb(e){const t=pn(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 ub(e,t,n){const a=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=UD(e,Math.max(s,0));a.length===1&&(l=l.filter(p=>p!==n));const f=l.find(p=>p.textValue.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function UD(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var HD=F1,VD=B1,WD=H1,KD=V1,YD=W1,GD=K1,qD=X1,XD=eb,QD=tb,JD=rb,ZD=ob,eM=ib;function ah({...e}){return u.jsx(HD,{"data-slot":"select",...e})}function sh({...e}){return u.jsx(WD,{"data-slot":"select-value",...e})}function lh({className:e,size:t="default",children:n,...i}){return u.jsxs(VD,{"data-slot":"select-trigger","data-size":t,className:pt("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[n,u.jsx(KD,{asChild:!0,children:u.jsx(Ts,{className:"size-4 opacity-50"})})]})}function ch({className:e,children:t,position:n="popper",...i}){return u.jsx(YD,{children:u.jsxs(GD,{"data-slot":"select-content",className:pt("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(tM,{}),u.jsx(qD,{className:pt("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(nM,{})]})})}function mi({className:e,children:t,...n}){return u.jsxs(XD,{"data-slot":"select-item",className:pt("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[u.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(JD,{children:u.jsx(Nf,{className:"size-4"})})}),u.jsx(QD,{children:t})]})}function tM({className:e,...t}){return u.jsx(ZD,{"data-slot":"select-scroll-up-button",className:pt("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(nE,{className:"size-4"})})}function nM({className:e,...t}){return u.jsx(eM,{"data-slot":"select-scroll-down-button",className:pt("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Ts,{className:"size-4"})})}function rM(){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 $e("/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 T=async(_,oe)=>{const G=Oe.loading(`${oe==="enable"?"Enabling":oe==="disable"?"Disabling":"Reloading"} ${_}...`);try{const F=await $e(`/api/mcp/${_}/${oe}`,{method:"POST"});if(F.ok)Oe.success(`${_} ${oe}d successfully`,{id:G}),j();else{const W=await F.json();Oe.error(W.error||`Failed to ${oe} server`,{id:G})}}catch(F){Oe.error(F.message,{id:G})}},$=async _=>{if(confirm(`Are you sure you want to remove ${_}?`))try{(await $e(`/api/mcp/${_}`,{method:"DELETE"})).ok&&(Oe.success(`${_} removed`),j())}catch(oe){Oe.error(oe.message)}},V=()=>{d({name:"",type:"stdio",command:"",url:"",description:""}),p([]),m([])},L=async()=>{if(l.name)try{const _={};f.forEach(W=>{W.key.trim()&&(_[W.key.trim()]=W.value)});const oe={};g.forEach(W=>{W.key.trim()&&(oe[W.key.trim()]=W.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 $e("/api/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)});if(F.ok)Oe.success("Server added successfully"),s(!1),V(),j();else{const W=await F.json();Oe.error(W.error||"Failed to add server")}}catch(_){Oe.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 ne of S)if(!(!ne.key.trim()||!ne.value.trim()))if(ne.key.startsWith("__arg_")){const I=ne.key.replace("__arg_","");G[I]=ne.value.trim()}else oe[ne.key.trim()]=ne.value.trim();if(Object.keys(oe).length===0&&Object.keys(G).length===0){Oe.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 W=await $e(`/api/mcp/${v.name}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)});if(W.ok)Oe.success(`Credentials saved for ${v.name}`),y(null),w([]),(await $e(`/api/mcp/${v.name}/enable`,{method:"POST"})).ok&&Oe.success(`${v.name} activated`),j();else{const ne=await W.json();Oe.error(ne.error||"Failed to save credentials")}}catch(_){Oe.error(_.message)}finally{C(!1)}}},re=(_,oe)=>{oe([..._,{key:"",value:""}])},O=(_,oe,G,F,W)=>{const ne=[..._];ne[G][F]=W,oe(ne)},J=(_,oe,G)=>{oe(_.filter((F,W)=>W!==G))};return n?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(un,{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(Xp,{asChild:!0,children:u.jsxs(xt,{className:"bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] hover:opacity-90 text-white font-mono text-xs uppercase tracking-wider",children:[u.jsx(Fr,{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(St,{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(St,{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(ah,{value:l.type,onValueChange:_=>d({...l,type:_}),children:[u.jsx(lh,{className:"bg-slate-900 border-slate-800 text-white text-xs",children:u.jsx(sh,{})}),u.jsxs(ch,{className:"bg-slate-950 border-slate-800 text-white",children:[u.jsx(mi,{value:"stdio",className:"text-xs",children:"STDIO (LOCAL PROCESS)"}),u.jsx(mi,{value:"http",className:"text-xs",children:"HTTP (STREAMABLE)"}),u.jsx(mi,{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(St,{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(St,{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(xt,{type:"button",variant:"ghost",size:"sm",onClick:()=>re(f,p),className:"text-[10px] text-[#00d9ff] hover:bg-[#00d9ff]/10 h-6 px-2",children:[u.jsx(Fr,{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(St,{value:_.key,onChange:G=>O(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(St,{type:"password",value:_.value,onChange:G=>O(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:()=>J(f,p,oe),className:"text-gray-600 hover:text-red-400 shrink-0",children:u.jsx(ra,{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(xt,{type:"button",variant:"ghost",size:"sm",onClick:()=>re(g,m),className:"text-[10px] text-[#00d9ff] hover:bg-[#00d9ff]/10 h-6 px-2",children:[u.jsx(Fr,{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(St,{value:_.key,onChange:G=>O(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(St,{type:"password",value:_.value,onChange:G=>O(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:()=>J(g,m,oe),className:"text-gray-600 hover:text-red-400 shrink-0",children:u.jsx(ra,{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(xt,{onClick:L,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(St,{type:G?"text":"password",value:_.value,onChange:W=>{const ne=[...S];ne[oe].value=W.target.value,w(ne)},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(St,{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(xt,{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(un,{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(dt,{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(yt,{className:"py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:`w-2 h-2 rounded-full ${_.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(vt,{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(xp,{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(cr,{className:"text-gray-500 font-mono text-[10px] mt-0.5 uppercase flex items-center gap-2",children:[_.type==="stdio"?u.jsx(Py,{className:"w-3 h-3"}):u.jsx(Iy,{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(xt,{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(_c,{className:"w-3 h-3 mr-1"}),"Configure"]}),u.jsxs(xt,{variant:"ghost",size:"sm",onClick:()=>T(_.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(Ly,{className:"w-3 h-3 mr-1"}):u.jsx(Dy,{className:"w-3 h-3 mr-1"}),_.enabled?"Suspend":"Activate"]}),u.jsxs(xt,{variant:"ghost",size:"sm",onClick:()=>T(_.name,"reload"),className:"text-gray-400 hover:text-white font-mono text-[10px] uppercase hover:bg-slate-800",children:[u.jsx(My,{className:"w-3 h-3 mr-1"}),"Sync"]}),u.jsxs(xt,{variant:"ghost",size:"sm",onClick:()=>$(_.name),className:"text-red-500/70 hover:text-red-500 font-mono text-[10px] uppercase hover:bg-red-500/10",children:[u.jsx(Rs,{className:"w-3 h-3 mr-1"}),"Remove"]})]})]})}),u.jsx(ft,{className:"pb-4",children:u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-gray-500 uppercase tracking-widest border-b border-slate-800 pb-2",children:[u.jsx("span",{children:"Active Tools"}),u.jsxs("span",{className:"text-[#00d9ff]",children:[_.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 oM(){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([$e("/api/skills"),$e("/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=Oe.loading("Reloading skills...");try{const w=await $e("/api/skills/reload",{method:"POST"});if(w.ok){const N=await w.json();t(N.skills||[]),Oe.success("Skills reloaded",{id:S})}}catch{Oe.error("Failed to reload skills",{id:S})}},v=async S=>{try{(await $e(`/api/schedules/${S}`,{method:"DELETE"})).ok&&(Oe.success("Schedule deleted"),g())}catch{Oe.error("Failed to delete schedule")}},y=async()=>{if(!(!f.name||!f.cronExpression||!f.taskInput))try{const S=await $e("/api/schedules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(S.ok)Oe.success("Schedule created"),d(!1),p({name:"",cronExpression:"",taskInput:""}),g();else{const w=await S.json();Oe.error(w.error||"SCHEDULING ERROR")}}catch{Oe.error("API CONNECTION ERROR")}};return a?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(un,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Skills"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"AGENT SKILLS & SCHEDULES"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[u.jsxs(dt,{className:"lg:col-span-2 bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{className:"border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ef,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Loaded Skills"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"AVAILABLE CAPABILITIES"})]})]}),u.jsxs(xt,{onClick:m,variant:"ghost",size:"sm",className:"text-gray-400 hover:text-[#00d9ff] font-mono text-[10px] uppercase tracking-wider",children:[u.jsx(My,{className:"w-3 h-3 mr-2"}),"Reload"]})]})}),u.jsx(ft,{className:"pt-6",children:u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.length===0?u.jsx("div",{className:"col-span-full text-center py-12 text-gray-600 font-mono uppercase text-xs",children:"No skills detected in /skills directory"}):e.map(S=>u.jsxs("div",{className:"p-4 bg-slate-800/30 border border-slate-800 rounded-lg hover:border-[#00d9ff]/30 transition-colors group",children:[u.jsx("div",{className:"font-mono text-sm text-[#00d9ff] uppercase tracking-tighter mb-1 group-hover:text-white transition-colors",children:S.name}),u.jsx("p",{className:"text-xs text-gray-500 font-mono leading-relaxed lowercase",children:S.description})]},S.name))})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl flex flex-col h-full",children:[u.jsx(yt,{className:"border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(XC,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Schedules"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"CRON-BASED TASKS"})]})]}),u.jsxs(ys,{open:l,onOpenChange:d,children:[u.jsx(Xp,{asChild:!0,children:u.jsx(xt,{size:"icon",variant:"ghost",className:"text-[#00d9ff] hover:bg-[#00d9ff]/10",children:u.jsx(Fr,{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(St,{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(St,{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(St,{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(xt,{onClick:y,className:"w-full bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] text-white uppercase text-xs tracking-tighter",children:"Create Schedule"})]})]})]})]})}),u.jsx(ft,{className:"flex-1 overflow-y-auto pt-6 px-4",children:u.jsx("div",{className:"space-y-3",children:n.length===0?u.jsx("div",{className:"text-center py-12 text-gray-700 font-mono uppercase text-[10px] tracking-widest",children:"No schedules"}):n.map(S=>u.jsx("div",{className:"p-3 bg-slate-800/20 border border-slate-800/50 rounded-lg group relative",children:u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx(ms,{className:"w-3 h-3 text-[#00ff88]"}),u.jsx("div",{className:"font-mono text-xs text-white uppercase truncate",children:S.name})]}),u.jsx(Qt,{variant:"outline",className:"bg-slate-950/50 text-[#00ff88] border-[#00ff88]/20 font-mono text-[9px]",children:S.cronExpression}),u.jsx("div",{className:"text-[10px] text-gray-500 font-mono mt-2 truncate lowercase italic",children:S.taskInput})]}),u.jsx(xt,{variant:"ghost",size:"icon",onClick:()=>v(S.id),className:"text-gray-600 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity",children:u.jsx(Rs,{className:"w-3 h-3"})})]})},S.id))})})]})]})]})}var uh="Switch",[iM]=lo(uh),[aM,sM]=iM(uh),db=k.forwardRef((e,t)=>{const{__scopeSwitch:n,name:i,checked:a,defaultChecked:s,required:l,disabled:d,value:f="on",onCheckedChange:p,form:g,...m}=e,[v,y]=k.useState(null),S=ht(t,T=>y(T)),w=k.useRef(!1),N=v?g||!!v.closest("form"):!0,[C=!1,j]=aa({prop:a,defaultProp:s,onChange:p});return u.jsxs(aM,{scope:n,checked:C,disabled:d,children:[u.jsx(Xe.button,{type:"button",role:"switch","aria-checked":C,"aria-required":l,"data-state":hb(C),"data-disabled":d?"":void 0,disabled:d,value:f,...m,ref:S,onClick:Ge(e.onClick,T=>{j($=>!$),N&&(w.current=T.isPropagationStopped(),w.current||T.stopPropagation())})}),N&&u.jsx(lM,{control:v,bubbles:!w.current,name:i,value:f,checked:C,required:l,disabled:d,form:g,style:{transform:"translateX(-100%)"}})]})});db.displayName=uh;var fb="SwitchThumb",pb=k.forwardRef((e,t)=>{const{__scopeSwitch:n,...i}=e,a=sM(fb,n);return u.jsx(Xe.span,{"data-state":hb(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t})});pb.displayName=fb;var lM=e=>{const{control:t,checked:n,bubbles:i=!0,...a}=e,s=k.useRef(null),l=O1(n),d=E1(t);return k.useEffect(()=>{const f=s.current,p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const v=new Event("click",{bubbles:i});m.call(f,n),f.dispatchEvent(v)}},[l,n,i]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:s,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function hb(e){return e?"checked":"unchecked"}var cM=db,uM=pb;function nc({className:e,...t}){return u.jsx(cM,{"data-slot":"switch",className:pt("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(uM,{"data-slot":"switch-thumb",className:pt("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const Wx={minimal:{label:"MINIMAL",desc:"Read-only tools only",color:"text-[#00ff88]"},standard:{label:"STANDARD",desc:"Read + write + sandboxed commands",color:"text-[#00d9ff]"},full:{label:"FULL",desc:"All tools including dangerous ones",color:"text-[#ff4458]"}};function dM(e){return e.trim()?e.startsWith("/")?e.includes("..")?"Path cannot contain '..'":/[\x00-\x1f]/.test(e)?"Path cannot contain control characters":null:"Path must be absolute (start with /)":"Path cannot be empty"}function fM({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(un,{className:"w-3.5 h-3.5 animate-spin"}):n?u.jsx(Ry,{className:"w-3.5 h-3.5"}):u.jsx(Oy,{className:"w-3.5 h-3.5"}),t?"Saving...":n?"Saved":"Save"]})}function Kx({paths:e,onRemove:t,variant:n="default"}){if(!e.length)return u.jsx("span",{className:"text-[10px] text-gray-600 font-mono italic",children:"None configured"});const i=n==="danger"?"bg-red-500/10 border-red-500/30 text-red-400":"bg-[#00d9ff]/10 border-[#00d9ff]/30 text-[#00d9ff]";return u.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map((a,s)=>u.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-mono border ${i}`,children:[a,u.jsx("button",{onClick:()=>t(s),className:"hover:text-white transition-colors ml-0.5",children:u.jsx(ra,{className:"w-3 h-3"})})]},s))})}function pM(){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,m]=k.useState("standard"),[v,y]=k.useState([]),[S,w]=k.useState([]),[N,C]=k.useState(!1),[j,T]=k.useState(!1),[$,V]=k.useState(!1),[L,A]=k.useState(!1),[U,re]=k.useState(""),[O,J]=k.useState(""),[_,oe]=k.useState(!1),[G,F]=k.useState(!1),[W,ne]=k.useState(!1),I=()=>{oe(!0),ne(!1)},ee=async()=>{try{const q=await $e("/api/settings");if(!q.ok)return;const we=(await q.json()).vars||{};m(we.PERMISSION_TIER||"standard"),y(we.ALLOWED_PATHS?we.ALLOWED_PATHS.split(",").map(be=>be.trim()).filter(Boolean):[]),w(we.BLOCKED_PATHS?we.BLOCKED_PATHS.split(",").map(be=>be.trim()).filter(Boolean):[]),C(we.RESTRICT_COMMANDS==="true"),T(we.MULTI_TENANT_ENABLED==="true"),V(we.AUTO_REGISTER_TENANTS==="true"),A(we.TENANT_ISOLATE_FILESYSTEM==="true")}catch(q){console.error("Failed to load security settings",q)}},R=async()=>{try{const[q,pe]=await Promise.all([$e("/api/vault/status"),$e("/api/audit"),ee()]);q.ok&&t(await q.json()),pe.ok&&i(await pe.json())}catch(q){console.error("Security data fetch failed",q)}finally{d(!1)}};k.useEffect(()=>{R()},[]);const M=async()=>{try{const q=await $e("/api/vault/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({passphrase:a})});if(q.ok)Oe.success("Vault unlocked successfully"),p(!1),s(""),R();else{const pe=await q.json();Oe.error(pe.error||"ACCESS DENIED")}}catch{Oe.error("Failed to unlock vault")}},X=async()=>{try{(await $e("/api/vault/lock",{method:"POST"})).ok&&(Oe.success("Vault locked successfully"),R())}catch{Oe.error("Failed to lock vault")}},P=async()=>{F(!0);try{const q={PERMISSION_TIER:g,ALLOWED_PATHS:v.join(","),BLOCKED_PATHS:S.join(","),RESTRICT_COMMANDS:String(N),MULTI_TENANT_ENABLED:String(j),AUTO_REGISTER_TENANTS:String($),TENANT_ISOLATE_FILESYSTEM:String(L)};(await $e("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:q})})).ok?(ne(!0),oe(!1),Oe.success("Security settings saved"),await ee()):Oe.error("Failed to save settings")}catch{Oe.error("Failed to save settings")}finally{F(!1)}},se=q=>{const pe=q==="allowed"?U:O,we=dM(pe);if(we){Oe.error(we);return}const be=pe.trim();if(q==="allowed"){if(v.includes(be)){Oe.error("Path already added");return}y(Me=>[...Me,be]),re("")}else{if(S.includes(be)){Oe.error("Path already added");return}w(Me=>[...Me,be]),J("")}I()},ve=(q,pe)=>{q==="allowed"?y(we=>we.filter((be,Me)=>Me!==pe)):w(we=>we.filter((be,Me)=>Me!==pe)),I()},de=q=>{switch(q){case"info":return"text-[#00d9ff]";case"warning":return"text-[#ffaa00]";case"critical":return"text-[#ff4458]";default:return"text-gray-500"}};return l?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(un,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Security"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"VAULT · AUDIT · PERMISSIONS · SANDBOX"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(hc,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Secret Vault"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"ENCRYPTED CREDENTIAL STORAGE"})]})]})}),u.jsxs(ft,{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between p-6 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[e.unlocked?u.jsx(Cf,{className:"w-10 h-10 text-[#00ff88]"}):u.jsxs("div",{className:"relative",children:[u.jsx(pc,{className:"w-10 h-10 text-[#ff4458]"}),u.jsx("div",{className:"absolute inset-0 animate-ping bg-[#ff4458]/20 rounded-full scale-150 opacity-20"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-mono font-bold text-xl text-white uppercase tracking-wider",children:e.unlocked?"SYSTEM UNLOCKED":"ENCRYPTED"}),u.jsx("div",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-widest mt-1",children:e.unlocked?"Secrets loaded into memory":"AES-256-GCM Protection Active"})]})]}),e.unlocked?u.jsxs(xt,{onClick:X,variant:"outline",className:"border-slate-700 text-gray-400 hover:text-white font-mono text-xs uppercase",children:[u.jsx(pc,{className:"w-4 h-4 mr-2"}),"Purge Keys"]}):u.jsxs(ys,{open:f,onOpenChange:p,children:[u.jsx(Xp,{asChild:!0,children:u.jsx(xt,{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(xp,{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(St,{type:"password",value:a,onChange:q=>s(q.target.value),onKeyDown:q=>q.key==="Enter"&&M(),placeholder:"PASSPHRASE...",className:"bg-slate-900 border-slate-800 text-[#00ff88] text-center tracking-[0.5em]"}),u.jsx(xt,{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(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full flex flex-col",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(_y,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Audit Log"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"SECURITY EVENTS"})]})]})}),u.jsx(ft,{className:"flex-1 overflow-hidden p-0",children:u.jsx(Lf,{className:"h-[400px] px-6",children:u.jsx("div",{className:"space-y-4 py-6",children:!n||!n.recentEvents||n.recentEvents.length===0?u.jsx("div",{className:"text-center py-20 text-gray-700 font-mono uppercase text-[10px] tracking-widest italic",children:"No security events logged"}):n.recentEvents.map((q,pe)=>u.jsxs("div",{className:"p-3 bg-slate-800/20 border border-slate-800/50 rounded-lg font-mono",children:[u.jsxs("div",{className:"flex items-start justify-between mb-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${q.level==="critical"?"bg-red-500":q.level==="warning"?"bg-amber-500":"bg-[#00d9ff]"}`}),u.jsx("span",{className:"text-[10px] font-bold text-white uppercase tracking-tight",children:q.type})]}),u.jsx(Qt,{variant:"outline",className:`text-[8px] h-4 uppercase ${de(q.level)} border-current opacity-50`,children:q.level})]}),u.jsx("p",{className:"text-[10px] text-gray-400 leading-relaxed lowercase mb-2",children:q.message}),u.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-tighter",children:new Date(q.timestamp).toLocaleString()})]},pe))})})})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(wE,{className:"w-6 h-6 text-[#ffaa00]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Permission & Sandbox"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"GLOBAL DEFAULTS — PER-TENANT OVERRIDES ON TENANTS PAGE"})]})]})}),u.jsxs(ft,{className:"space-y-6",children:[u.jsx("div",{className:"p-4 bg-slate-800/30 border border-slate-800 rounded-xl space-y-3",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Permission Tier"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:Wx[g]?.desc||"Controls which tools the agent can use"})]}),u.jsxs(ah,{value:g,onValueChange:q=>{m(q),I()},children:[u.jsx(lh,{className:"w-[160px] bg-slate-950 border-slate-700 text-white font-mono text-[10px] uppercase h-8",children:u.jsx(sh,{placeholder:"STANDARD"})}),u.jsx(ch,{className:"bg-slate-950 border-slate-700",children:Object.entries(Wx).map(([q,pe])=>u.jsx(mi,{value:q,className:`font-mono text-[10px] uppercase ${pe.color}`,children:pe.label},q))})]})]})}),u.jsxs("div",{className:"p-4 bg-slate-800/30 border border-slate-800 rounded-xl space-y-4",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Filesystem Sandbox"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Global path rules — tenants can override on the Tenants page"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"text-[10px] font-mono text-gray-400 uppercase tracking-wider",children:"Allowed Paths"}),u.jsx(Kx,{paths:v,onRemove:q=>ve("allowed",q)}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(St,{value:U,onChange:q=>re(q.target.value),onKeyDown:q=>q.key==="Enter"&&se("allowed"),placeholder:"/path/to/allow",className:"bg-slate-950 border-slate-700 text-white font-mono text-xs h-8 flex-1"}),u.jsx(xt,{onClick:()=>se("allowed"),size:"sm",className:"bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/30 hover:bg-[#00d9ff]/25 h-8 px-3",children:u.jsx(Fr,{className:"w-3.5 h-3.5"})})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"text-[10px] font-mono text-gray-400 uppercase tracking-wider",children:"Blocked Paths"}),u.jsx(Kx,{paths:S,onRemove:q=>ve("blocked",q),variant:"danger"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(St,{value:O,onChange:q=>J(q.target.value),onKeyDown:q=>q.key==="Enter"&&se("blocked"),placeholder:"/path/to/block",className:"bg-slate-950 border-slate-700 text-white font-mono text-xs h-8 flex-1"}),u.jsx(xt,{onClick:()=>se("blocked"),size:"sm",className:"bg-red-500/15 text-red-400 border border-red-500/30 hover:bg-red-500/25 h-8 px-3",children:u.jsx(Fr,{className:"w-3.5 h-3.5"})})]})]})]}),u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Restrict Commands"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Enforce path rules on shell commands"})]}),u.jsx(nc,{checked:N,onCheckedChange:q=>{C(q),I()},className:"data-[state=checked]:bg-[#00d9ff]"})]})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ic,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Multi-Tenant Mode"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"TENANT ISOLATION & REGISTRATION"})]})]})}),u.jsxs(ft,{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Multi-Tenant Enabled"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Isolate users across channels with separate configs"})]}),u.jsx(nc,{checked:j,onCheckedChange:q=>{T(q),I()},className:"data-[state=checked]:bg-[#7C6AFF]"})]}),j&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Auto-Register Tenants"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Create tenant on first message"})]}),u.jsx(nc,{checked:$,onCheckedChange:q=>{V(q),I()},className:"data-[state=checked]:bg-[#7C6AFF]"})]}),u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Filesystem Isolation"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Each tenant's temp files in their own workspace"})]}),u.jsx(nc,{checked:L,onCheckedChange:q=>{A(q),I()},className:"data-[state=checked]:bg-[#7C6AFF]"})]})]})]})]}),(_||W)&&u.jsx("div",{className:"flex justify-end",children:u.jsx(fM,{dirty:_,saving:G,saved:W,onSave:P})})]})}var dh="Progress",fh=100,[hM]=lo(dh),[mM,gM]=hM(dh),mb=k.forwardRef((e,t)=>{const{__scopeProgress:n,value:i=null,max:a,getValueLabel:s=xM,...l}=e;(a||a===0)&&!Yx(a)&&console.error(yM(`${a}`,"Progress"));const d=Yx(a)?a:fh;i!==null&&!Gx(i,d)&&console.error(vM(`${i}`,"Progress"));const f=Gx(i,d)?i:null,p=jc(f)?s(f,d):void 0;return u.jsx(mM,{scope:n,value:f,max:d,children:u.jsx(Xe.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":jc(f)?f:void 0,"aria-valuetext":p,role:"progressbar","data-state":yb(f,d),"data-value":f??void 0,"data-max":d,...l,ref:t})})});mb.displayName=dh;var gb="ProgressIndicator",xb=k.forwardRef((e,t)=>{const{__scopeProgress:n,...i}=e,a=gM(gb,n);return u.jsx(Xe.div,{"data-state":yb(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...i,ref:t})});xb.displayName=gb;function xM(e,t){return`${Math.round(e/t*100)}%`}function yb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function jc(e){return typeof e=="number"}function Yx(e){return jc(e)&&!isNaN(e)&&e>0}function Gx(e,t){return jc(e)&&!isNaN(e)&&e<=t&&e>=0}function yM(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${fh}\`.`}function vM(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 ${fh} if no \`max\` prop is set)
|
|
86
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
87
|
+
|
|
88
|
+
Defaulting to \`null\`.`}var wM=mb,bM=xb;function qx({className:e,value:t,indicatorClassName:n,...i}){return u.jsx(wM,{"data-slot":"progress",className:pt("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...i,children:u.jsx(bM,{"data-slot":"progress-indicator",className:pt("bg-primary h-full w-full flex-1 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})}function kM(){const[e,t]=k.useState(null),[n,i]=k.useState([]),[a,s]=k.useState(!0),l=async()=>{try{const[p,g]=await Promise.all([$e("/api/costs/today"),$e("/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(un,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})});const d=e.totalCost/(e.dailyLimit||1)*100,f=d>80;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Costs"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"USAGE & SPENDING"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[u.jsxs(dt,{className:"lg:col-span-2 bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ay,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Daily Spend"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"CURRENT USAGE VS. LIMIT"})]})]})}),u.jsxs(ft,{className:"space-y-8 pt-4",children:[u.jsxs("div",{className:"flex items-end justify-between",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"text-5xl font-bold text-white font-mono tracking-tighter",children:["$",e.totalCost.toFixed(3)]}),u.jsxs("div",{className:"text-[10px] text-gray-500 font-mono uppercase mt-2",children:["Of $",e.dailyLimit.toFixed(2)," configured limit"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsxs(Qt,{variant:"outline",className:f?"bg-[#ff4458]/10 text-[#ff4458] border-[#ff4458]/30 font-mono":"bg-[#00ff88]/10 text-[#00ff88] border-[#00ff88]/30 font-mono",children:[d.toFixed(1),"% CONSUMED"]}),u.jsxs("div",{className:"text-[10px] text-gray-600 font-mono uppercase mt-2",children:["Remaining: $",e.remaining.toFixed(3)]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(qx,{value:d,className:"h-2 bg-slate-800"}),u.jsxs("div",{className:"flex justify-between text-[8px] font-mono text-gray-600 uppercase tracking-widest",children:[u.jsx("span",{children:"0.00"}),u.jsx("span",{children:"Threshold"}),u.jsx("span",{children:e.dailyLimit.toFixed(2)})]})]}),f&&u.jsxs("div",{className:"flex items-center gap-3 p-4 bg-red-500/10 border border-red-500/20 rounded-xl",children:[u.jsx(fc,{className:"w-5 h-5 text-red-500 flex-shrink-0"}),u.jsx("p",{className:"text-[10px] text-red-400 font-mono uppercase tracking-tight",children:"WARNING: APPROACHING DAILY COST LIMIT. TASKS MAY BE THROTTLED."})]})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-2",children:u.jsx(vt,{className:"text-xs font-mono text-gray-500 uppercase tracking-widest",children:"Avg Efficiency"})}),u.jsxs(ft,{children:[u.jsxs("div",{className:"text-2xl font-bold text-white font-mono uppercase",children:["$",(e.totalCost/(n.reduce((p,g)=>p+(g?.usage?.taskCount||0),0)||1)).toFixed(4)]}),u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mt-1",children:"Cost Per Task (Global)"})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-2",children:u.jsx(vt,{className:"text-xs font-mono text-gray-500 uppercase tracking-widest",children:"Active Tenants"})}),u.jsxs(ft,{children:[u.jsx("div",{className:"text-2xl font-bold text-[#7C6AFF] font-mono uppercase",children:n.length}),u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mt-1",children:"Registered Tenants"})]})]})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ic,{className:"w-6 h-6 text-[#4ECDC4]"}),u.jsxs("div",{children:[u.jsx(vt,{className:"text-white uppercase tracking-tight",children:"Tenant Usage"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"COST BREAKDOWN PER TENANT"})]})]})}),u.jsx(ft,{className:"pt-6",children:u.jsx("div",{className:"space-y-4",children:n.length===0?u.jsx("div",{className:"text-center py-12 text-gray-700 font-mono uppercase text-[10px] tracking-widest",children:"No multi-tenant data available"}):n.map(p=>u.jsxs("div",{className:"p-4 bg-slate-800/20 border border-slate-800/50 rounded-xl hover:border-[#00d9ff]/20 transition-colors group",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("div",{className:"font-mono text-sm text-white uppercase truncate max-w-[200px]",children:p.name||p.id}),u.jsx(Qt,{variant:"outline",className:"text-[8px] h-4 uppercase border-slate-700 text-gray-500",children:p.planTier})]}),u.jsxs("div",{className:"text-[10px] text-gray-600 font-mono uppercase tracking-tighter",children:[p?.usage?.taskCount||0," TASKS"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsxs("div",{className:"text-xl font-bold text-[#00d9ff] font-mono tracking-tighter",children:["$",(p?.usage?.totalCost||0).toFixed(3)]}),u.jsxs("div",{className:"text-[9px] text-gray-600 font-mono uppercase",children:[((p?.usage?.totalCost||0)/(e.totalCost||1)*100).toFixed(1),"% OF GLOBAL SPEND"]})]})]}),u.jsx(qx,{value:(p?.usage?.totalCost||0)/(e.totalCost||1)*100,className:"h-1 bg-slate-900"})]},p.id))})})]})]})}function SM(){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 $e("/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=Oe.loading("SUSPENDING TENANT...");try{const C=await $e(`/api/tenants/${encodeURIComponent(w)}/suspend`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"Suspended via UI"})});if(C.ok)Oe.success("TENANT SUSPENDED",{id:N}),f();else{const j=await C.json();Oe.error(j.error||"FAILED TO SUSPEND",{id:N})}}catch(C){Oe.error(C.message,{id:N})}},g=async w=>{const N=Oe.loading("UNSUSPENDING TENANT...");try{const C=await $e(`/api/tenants/${encodeURIComponent(w)}/unsuspend`,{method:"POST"});if(C.ok)Oe.success("TENANT UNSUSPENDED",{id:N}),f();else{const j=await C.json();Oe.error(j.error||"FAILED TO UNSUSPEND",{id:N})}}catch(C){Oe.error(C.message,{id:N})}},m=async w=>{if(!confirm(`Delete tenant "${w}"? This cannot be undone.`))return;const N=Oe.loading("DELETING TENANT...");try{const C=await $e(`/api/tenants/${encodeURIComponent(w)}`,{method:"DELETE"});if(C.ok)Oe.success("Tenant deleted",{id:N}),f();else{const j=await C.json();Oe.error(j.error||"FAILED TO DELETE",{id:N})}}catch(C){Oe.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=Oe.loading("UPDATING TENANT..."),N=j=>j?j.split(",").map(T=>T.trim()).filter(Boolean):[],C=(j,T)=>{for(const $ of j){if(!$.startsWith("/")&&!/^[A-Za-z]:[\\\/]/.test($))return`${T}: "${$}" must be an absolute path`;if(/\.\.[\\/]/.test($))return`${T}: "${$}" must not contain ".." traversal`}return null};try{let j={};try{j=JSON.parse(l.modelRoutes||"{}")}catch{}const T=N(l.allowedPaths),$=N(l.blockedPaths),V=C(T,"Allowed Paths")||C($,"Blocked Paths");if(V){Oe.error(V,{id:w});return}const L={defaultModel:l.defaultModel||void 0,plan:l.plan,notes:l.notes||void 0,allowedPaths:T,blockedPaths:$,allowedTools:N(l.allowedTools),blockedTools:N(l.blockedTools),mcpServers:N(l.mcpServers),modelRoutes:j};l.maxCostPerTask!==""&&(L.maxCostPerTask=parseFloat(l.maxCostPerTask)),l.maxDailyCost!==""&&(L.maxDailyCost=parseFloat(l.maxDailyCost));const A=await $e(`/api/tenants/${encodeURIComponent(a.id)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if(A.ok)Oe.success("TENANT UPDATED",{id:w}),s(null),f();else{const U=await A.json();Oe.error(U.error||"FAILED TO UPDATE",{id:w})}}catch(j){Oe.error(j.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(un,{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(Ic,{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(dt,{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(yt,{className:"py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:`w-2 h-2 rounded-full ${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(vt,{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(xt,{variant:"ghost",size:"sm",onClick:()=>v(w),className:"text-[#00d9ff] hover:bg-[#00d9ff]/10 font-mono text-[10px] uppercase",children:[u.jsx(OE,{className:"w-3 h-3 mr-1"}),"Edit"]}),w.status==="suspended"?u.jsxs(xt,{variant:"ghost",size:"sm",onClick:()=>g(w.id),className:"text-[#00ff88] hover:bg-[#00ff88]/10 font-mono text-[10px] uppercase",children:[u.jsx(Dy,{className:"w-3 h-3 mr-1"}),"Unsuspend"]}):u.jsxs(xt,{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(Ly,{className:"w-3 h-3 mr-1"}),"Suspend"]}),u.jsxs(xt,{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(Rs,{className:"w-3 h-3 mr-1"}),"Delete"]})]})]})}),(w.defaultModel||w.notes||w.mcpServers&&w.mcpServers.length>0)&&u.jsx(ft,{className:"pb-4 pt-0",children:u.jsxs("div",{className:"flex flex-wrap gap-3 text-[10px] font-mono text-gray-500",children:[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(St,{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(ah,{value:l.plan||"free",onValueChange:w=>d({...l,plan:w}),children:[u.jsx(lh,{className:"bg-slate-900 border-slate-800 text-white text-xs",children:u.jsx(sh,{})}),u.jsxs(ch,{className:"bg-slate-950 border-slate-800 text-white",children:[u.jsx(mi,{value:"free",className:"text-xs",children:"FREE"}),u.jsx(mi,{value:"pro",className:"text-xs",children:"PRO"}),u.jsx(mi,{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(St,{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(St,{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(St,{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(St,{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(St,{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(St,{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(St,{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(nv,{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(St,{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(xt,{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 rs({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(Ts,{className:`w-5 h-5 text-gray-500 transition-transform duration-300 ${d?"rotate-180":""}`})]})]}),u.jsx("div",{ref:p,style:{height:g!==void 0?`${g}px`:"auto"},className:"transition-[height] duration-350 ease-in-out overflow-hidden",children:u.jsx("div",{className:"px-6 pb-6 pt-1",children:l})})]})}function NM({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(Ts,{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${i?"rotate-180":""}`})]}),i&&u.jsxs("div",{className:"absolute z-50 top-full mt-1.5 w-full bg-slate-950 border border-slate-700/60 rounded-xl shadow-2xl shadow-black/50 overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-slate-800/60",children:[u.jsx(zy,{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(ra,{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(Nf,{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(Nf,{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 yf({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(un,{className:"w-3.5 h-3.5 animate-spin"}):n?u.jsx(Ry,{className:"w-3.5 h-3.5"}):u.jsx(Oy,{className:"w-3.5 h-3.5"}),t?"Saving...":n?"Saved":"Save"]})}function CM(){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,T]=k.useState(!1),[$,V]=k.useState(!1),[L,A]=k.useState([]),[U,re]=k.useState(!1),[O,J]=k.useState({name:"",description:"",triggers:"",content:""}),[_,oe]=k.useState(!1),[G,F]=k.useState(""),[W,ne]=k.useState(!1),[I,ee]=k.useState(!1),[R,M]=k.useState(!1),[X,P]=k.useState([]),[se,ve]=k.useState({exists:!1,unlocked:!1}),[de,q]=k.useState(""),[pe,we]=k.useState(!1),[be,Me]=k.useState("");k.useEffect(()=>{Promise.all([$e("/api/settings").then(B=>B.json()),$e("/api/profile").then(B=>B.json()),$e("/api/skills/custom").then(B=>B.json()),$e("/api/memory").then(B=>B.json()),$e("/api/models").then(B=>B.json()),$e("/api/vault/status").then(B=>B.json())]).then(([B,ae,fe,Re,We,mt])=>{t(B),w({name:ae.name||"",personality:ae.personality||"",tone:ae.tone||"",instructions:ae.instructions||"",subAgentModel:ae.subAgentModel||""}),A(fe.skills||[]),F(Re.content||""),P(We.available||[]),ve(mt),i(!1)}).catch(()=>i(!1))},[]);const Fe=async()=>{if(de){we(!0),Me("");try{const B=await $e("/api/vault/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({passphrase:de})});if(B.ok){ve({exists:!0,unlocked:!0}),q("");const ae=await $e("/api/settings").then(fe=>fe.json());t(ae)}else{const ae=await B.json();Me(ae.error||"Failed to unlock vault")}}catch{Me("Connection error")}finally{we(!1)}}},st=async()=>{await $e("/api/vault/lock",{method:"POST"}),ve({exists:!0,unlocked:!1});const B=await $e("/api/settings").then(ae=>ae.json());t(B)},Ot=B=>{d(ae=>{const fe=new Set(ae);return fe.has(B)?fe.delete(B):fe.add(B),fe})},kn=(B,ae)=>{s(fe=>({...fe,[B]:ae})),y(!0),m(!1)},zt=async()=>{const B={};for(const[ae,fe]of Object.entries(a))fe!==void 0&&fe!==""&&(B[ae]=fe);if(Object.keys(B).length!==0){p(!0);try{if((await $e("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:B})})).ok){m(!0),y(!1);const fe=await $e("/api/settings").then(Re=>Re.json());t(fe),s({})}}catch{}finally{p(!1)}}},Et=(B,ae)=>{w(fe=>({...fe,[B]:ae})),C(!0),V(!1)},pr=async()=>{T(!0);try{(await $e("/api/profile",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)})).ok&&(V(!0),C(!1))}catch{}finally{T(!1)}},Ut=async()=>{if(!(!O.name||!O.content)){oe(!0);try{if((await $e("/api/skills/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok){const ae=await $e("/api/skills/custom").then(fe=>fe.json());A(ae.skills||[]),J({name:"",description:"",triggers:"",content:""}),re(!1)}}catch{}finally{oe(!1)}}},Pn=async B=>{try{(await $e(`/api/skills/custom/${encodeURIComponent(B)}`,{method:"DELETE"})).ok&&A(fe=>fe.filter(Re=>Re.name!==B))}catch{}},An=async()=>{ee(!0);try{(await $e("/api/memory",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:G})})).ok&&(M(!0),ne(!1))}catch{}finally{ee(!1)}};if(n)return u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(un,{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 B of e.available)Pt.has(B.key)||(on[B.section]||(on[B.section]=[]),on[B.section].push(B.key));const Zt={};for(const B of X){const ae=B.provider||"other";Zt[ae]||(Zt[ae]=[]),Zt[ae].push(B)}const jt="w-full bg-slate-950/60 border border-slate-700/50 rounded-xl px-4 py-3 text-sm font-mono text-white placeholder-gray-600 focus:border-[#00d9ff]/50 focus:outline-none focus:ring-1 focus:ring-[#00d9ff]/20 transition-colors";return u.jsxs("div",{className:"space-y-5 pb-10",children:[u.jsxs("div",{className:"mb-8",children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Settings"}),u.jsx("p",{className:"text-gray-500 font-mono text-xs tracking-widest uppercase",children:"Configure your agent's identity, skills, memory & environment"})]}),u.jsx(rs,{icon:se.unlocked?k0:hc,title:"Secret Vault",subtitle:"Encrypted storage for API keys & tokens (AES-256-GCM)",badge:se.unlocked?u.jsxs("span",{className:"text-[9px] font-mono text-[#00ff88] bg-[#00ff88]/10 px-2 py-0.5 rounded-md border border-[#00ff88]/20 flex items-center gap-1",children:[u.jsx(Cf,{className:"w-2.5 h-2.5"})," unlocked"]}):se.exists?u.jsxs("span",{className:"text-[9px] font-mono text-amber-400 bg-amber-400/10 px-2 py-0.5 rounded-md border border-amber-400/20 flex items-center gap-1",children:[u.jsx(pc,{className:"w-2.5 h-2.5"})," locked"]}):null,defaultOpen:!se.unlocked&&se.exists,children:se.unlocked?u.jsxs("div",{className:"flex items-center gap-4 p-4 bg-[#00ff88]/5 rounded-xl border border-[#00ff88]/20",children:[u.jsx(k0,{className:"w-6 h-6 text-[#00ff88] shrink-0"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"text-sm font-mono text-[#00ff88] font-medium",children:"Vault is unlocked"}),u.jsx("p",{className:"text-[11px] font-mono text-gray-500 mt-1",children:"Sensitive keys are encrypted at rest. Non-sensitive config stays in .env."})]}),u.jsxs("button",{onClick:st,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-xs font-mono uppercase tracking-wider bg-slate-800/60 text-gray-400 border border-slate-700/50 hover:text-white hover:border-slate-600 transition-colors",children:[u.jsx(pc,{className:"w-3.5 h-3.5"})," Lock"]})]}):se.exists?u.jsxs("div",{className:"space-y-4",children:[u.jsx("p",{className:"text-sm font-mono text-gray-400",children:"Enter your vault passphrase to unlock encrypted secrets."}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"password",className:jt,placeholder:"Vault passphrase",value:de,onChange:B=>{q(B.target.value),Me("")},onKeyDown:B=>B.key==="Enter"&&Fe()}),u.jsxs("button",{onClick:Fe,disabled:!de||pe,className:"flex items-center gap-2 px-5 py-3 rounded-xl text-sm font-mono uppercase tracking-wider bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/40 hover:bg-[#00d9ff]/25 transition-colors disabled:opacity-40 disabled:cursor-not-allowed whitespace-nowrap",children:[pe?u.jsx(un,{className:"w-4 h-4 animate-spin"}):u.jsx(Cf,{className:"w-4 h-4"}),"Unlock"]})]}),be&&u.jsx("p",{className:"text-sm font-mono text-red-400",children:be})]}):u.jsxs("div",{className:"space-y-3",children:[u.jsx("p",{className:"text-sm font-mono text-gray-400",children:"No vault configured. Set up encrypted storage via CLI:"}),u.jsx("code",{className:"block text-sm font-mono text-[#00d9ff]/80 bg-slate-950/60 rounded-xl px-4 py-3 border border-slate-800/50",children:"daemora vault import <passphrase>"}),u.jsx("p",{className:"text-[11px] font-mono text-gray-600",children:"This imports your .env keys into an encrypted vault and removes them from plaintext."})]})}),u.jsx(rs,{icon:jf,title:"User Profile",subtitle:"How the agent knows you and adapts its behavior",defaultOpen:!0,actions:u.jsx(yf,{dirty:N,saving:j,saved:$,onSave:pr}),children:u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Name"}),u.jsx("input",{className:jt,placeholder:"Your name",value:S.name,onChange:B=>Et("name",B.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Personality"}),u.jsx("input",{className:jt,placeholder:"e.g. friendly, professional",value:S.personality,onChange:B=>Et("personality",B.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Tone"}),u.jsx("input",{className:jt,placeholder:"e.g. casual, formal",value:S.tone,onChange:B=>Et("tone",B.target.value)})]})]}),u.jsxs("div",{children:[u.jsxs("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider flex items-center gap-2",children:[u.jsx(Ac,{className:"w-3.5 h-3.5"})," Sub-Agent Model"]}),u.jsx(NM,{value:S.subAgentModel,onChange:B=>Et("subAgentModel",B),modelsByProvider:Zt}),u.jsx("p",{className:"text-[11px] font-mono text-gray-600 mt-2",children:"Model used when spawning sub-agents for parallel tasks"})]}),u.jsxs("div",{children:[u.jsxs("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider flex items-center gap-2",children:[u.jsx(RE,{className:"w-3.5 h-3.5"})," Custom Instructions"]}),u.jsx("textarea",{className:jt+" min-h-[100px] resize-y",placeholder:"Tell the agent how you want it to behave, what to prioritize, or any rules to follow...",value:S.instructions,onChange:B=>Et("instructions",B.target.value),rows:4})]})]})}),u.jsx(rs,{icon:Ef,title:"Custom Skills",subtitle:"Teach the agent new abilities with markdown instructions",badge:L.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:L.length}):null,actions:u.jsxs("button",{onClick:()=>re(!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(ra,{className:"w-3.5 h-3.5"}):u.jsx(Fr,{className:"w-3.5 h-3.5"}),U?"Cancel":"New Skill"]}),children:u.jsxs("div",{className:"space-y-3",children:[U&&u.jsxs("div",{className:"p-5 bg-slate-800/30 rounded-xl border border-slate-700/40 space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Skill Name *"}),u.jsx("input",{className:jt,placeholder:"my-skill",value:O.name,onChange:B=>J(ae=>({...ae,name:B.target.value}))})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Trigger Keywords"}),u.jsx("input",{className:jt,placeholder:"keyword1, keyword2",value:O.triggers,onChange:B=>J(ae=>({...ae,triggers:B.target.value}))})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Description"}),u.jsx("input",{className:jt,placeholder:"What this skill does...",value:O.description,onChange:B=>J(ae=>({...ae,description:B.target.value}))})]}),u.jsxs("div",{children:[u.jsxs("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider flex items-center gap-2",children:[u.jsx(w0,{className:"w-3.5 h-3.5"})," Instructions (Markdown) *"]}),u.jsx("textarea",{className:jt+" min-h-[140px] resize-y",placeholder:`# My Skill
|
|
89
|
+
|
|
90
|
+
Step-by-step instructions for the agent...`,value:O.content,onChange:B=>J(ae=>({...ae,content:B.target.value})),rows:6})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs("button",{onClick:Ut,disabled:!O.name||!O.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(un,{className:"w-4 h-4 animate-spin"}):u.jsx(Fr,{className:"w-4 h-4"}),"Create Skill"]})})]}),L.length===0&&!U?u.jsxs("div",{className:"text-center py-10 border border-dashed border-slate-800 rounded-xl",children:[u.jsx(Ef,{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"})]}):L.map(B=>u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/20 rounded-xl border border-slate-800/50 hover:border-slate-700/60 transition-colors group",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx(w0,{className:"w-4 h-4 text-[#00d9ff]/60"}),u.jsx("span",{className:"text-sm font-mono text-white font-medium",children:B.name}),u.jsx("span",{className:"text-[9px] font-mono text-[#00d9ff]/70 bg-[#00d9ff]/5 px-2 py-0.5 rounded uppercase border border-[#00d9ff]/10",children:"custom"})]}),B.description&&u.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6.5 truncate",children:B.description})]}),u.jsx("button",{onClick:()=>Pn(B.name),className:"p-2 text-gray-600 hover:text-red-400 transition-colors opacity-0 group-hover:opacity-100",title:"Delete skill",children:u.jsx(Rs,{className:"w-4 h-4"})})]},B.name))]})}),u.jsx(rs,{icon:Sf,title:"Agent Memory",subtitle:"Persistent knowledge the agent reads at the start of every task",actions:u.jsx(yf,{dirty:W,saving:I,saved:R,onSave:An}),children:u.jsxs("div",{children:[u.jsx("textarea",{className:jt+" min-h-[200px] resize-y",placeholder:`Write persistent instructions, preferences, project context...
|
|
91
|
+
|
|
92
|
+
The agent reads this at the start of every conversation.`,value:G,onChange:B=>{F(B.target.value),ne(!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(Sf,{className:"w-3.5 h-3.5"}),"Injected into the system prompt — the agent learns from this across all sessions"]})]})}),Object.entries(on).filter(([,B])=>B.length>0).map(([B,ae])=>u.jsx(rs,{icon:B.toLowerCase().includes("key")||B.toLowerCase().includes("api")?SE:_c,title:B,subtitle:`${ae.length} variable${ae.length!==1?"s":""}${e.vaultActive&&ae.some(fe=>/KEY|TOKEN|SECRET|PASSWORD|PASSPHRASE|CREDENTIAL/i.test(fe))?" — sensitive keys encrypted in vault":""}`,badge:ae.some(fe=>e.vars[fe])?u.jsxs("span",{className:"text-[9px] font-mono text-[#00ff88] bg-[#00ff88]/10 px-2 py-0.5 rounded-md border border-[#00ff88]/20",children:[ae.filter(fe=>e.vars[fe]).length,"/",ae.length," set"]}):null,actions:u.jsx(yf,{dirty:v,saving:f,saved:g,onSave:zt}),children:u.jsx("div",{className:"space-y-2.5",children:ae.map(fe=>{const Re=e.vars[fe]||"",We=!!Re,mt=l.has(fe),At=a[fe],Kt=At!==void 0,Ft=/KEY|TOKEN|SECRET|PASSWORD|PASSPHRASE|CREDENTIAL/i.test(fe);return u.jsxs("div",{className:"p-4 bg-slate-800/20 rounded-xl border border-slate-800/40 hover:border-slate-700/50 transition-colors",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2.5",children:[u.jsx("span",{className:"text-[11px] font-mono text-gray-400 uppercase tracking-wider",children:fe}),We&&!Kt&&u.jsx("span",{className:"text-[8px] font-mono text-[#00ff88] bg-[#00ff88]/8 px-1.5 py-0.5 rounded uppercase border border-[#00ff88]/15",children:"configured"}),e.vaultActive&&Ft&&We&&u.jsxs("span",{className:"text-[8px] font-mono text-[#00d9ff] bg-[#00d9ff]/8 px-1.5 py-0.5 rounded uppercase border border-[#00d9ff]/15 flex items-center gap-0.5",children:[u.jsx(hc,{className:"w-2.5 h-2.5"})," vault"]}),Kt&&u.jsx("span",{className:"text-[8px] font-mono text-amber-400 bg-amber-400/8 px-1.5 py-0.5 rounded uppercase border border-amber-400/15",children:"modified"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:mt?"text":"password",placeholder:We?Re:"Not set",value:Kt?At:"",onChange:Sn=>kn(fe,Sn.target.value),className:jt}),u.jsx("button",{onClick:()=>Ot(fe),className:"p-2.5 text-gray-500 hover:text-[#00d9ff] transition-colors rounded-xl hover:bg-slate-800/50",title:mt?"Hide":"Show",children:mt?u.jsx(fE,{className:"w-4 h-4"}):u.jsx(_y,{className:"w-4 h-4"})})]})]},fe)})})},B))]})}const EM=NC([{path:"/",Component:c2,children:[{index:!0,Component:X2},{path:"chat",Component:p_},{path:"tasks",Component:h_},{path:"tasks/:id",Component:z_},{path:"config",Component:F_},{path:"mcp",Component:rM},{path:"skills",Component:oM},{path:"security",Component:pM},{path:"costs",Component:kM},{path:"tenants",Component:SM},{path:"settings",Component:CM}]}]),jM=e=>u.jsx(f_,{theme:"dark",className:"toaster group",closeButton:!0,style:{"--normal-bg":"#0f172a","--normal-text":"#f0f0f3","--normal-border":"#1e293b"},...e});function TM(){return u.jsxs(u.Fragment,{children:[u.jsx(XN,{router:EM}),u.jsx(jM,{position:"top-right"})]})}lS.createRoot(document.getElementById("root")).render(u.jsx(TM,{}));
|