morpheus-cli 0.4.0 → 0.4.2
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 +88 -0
- package/dist/config/manager.js +32 -0
- package/dist/config/schemas.js +5 -0
- package/dist/devkit/adapters/shell.js +80 -0
- package/dist/devkit/index.js +10 -0
- package/dist/devkit/registry.js +12 -0
- package/dist/devkit/tools/filesystem.js +219 -0
- package/dist/devkit/tools/git.js +210 -0
- package/dist/devkit/tools/network.js +158 -0
- package/dist/devkit/tools/packages.js +73 -0
- package/dist/devkit/tools/processes.js +130 -0
- package/dist/devkit/tools/shell.js +94 -0
- package/dist/devkit/tools/system.js +132 -0
- package/dist/devkit/types.js +1 -0
- package/dist/devkit/utils.js +45 -0
- package/dist/http/api.js +122 -0
- package/dist/runtime/apoc.js +110 -0
- package/dist/runtime/memory/sati/index.js +2 -2
- package/dist/runtime/memory/sati/service.js +3 -2
- package/dist/runtime/memory/sqlite.js +98 -28
- package/dist/runtime/oracle.js +4 -1
- package/dist/runtime/providers/factory.js +85 -80
- package/dist/runtime/telephonist.js +19 -1
- package/dist/runtime/tools/apoc-tool.js +43 -0
- package/dist/runtime/tools/index.js +1 -0
- package/dist/types/config.js +6 -0
- package/dist/ui/assets/index-CjlkpcsE.js +109 -0
- package/dist/ui/assets/index-LrqT6MpO.css +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/ui/sw.js +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/index-CwvCMGLo.css +0 -1
- package/dist/ui/assets/index-D9REy_tK.js +0 -109
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(o){if(o.ep)return;o.ep=!0;const u=n(o);fetch(o.href,u)}})();function Sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bh={exports:{}},Us={};var $b;function F2(){if($b)return Us;$b=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,u){var l=null;if(u!==void 0&&(l=""+u),o.key!==void 0&&(l=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:i,key:l,ref:o!==void 0?o:null,props:u}}return Us.Fragment=t,Us.jsx=n,Us.jsxs=n,Us}var Lb;function q2(){return Lb||(Lb=1,bh.exports=F2()),bh.exports}var v=q2(),Sh={exports:{}},Te={};var Ub;function G2(){if(Ub)return Te;Ub=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(T){return T===null||typeof T!="object"?null:(T=x&&T[x]||T["@@iterator"],typeof T=="function"?T:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,C={};function j(T,q,w){this.props=T,this.context=q,this.refs=C,this.updater=w||_}j.prototype.isReactComponent={},j.prototype.setState=function(T,q){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,q,"setState")},j.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function O(){}O.prototype=j.prototype;function A(T,q,w){this.props=T,this.context=q,this.refs=C,this.updater=w||_}var R=A.prototype=new O;R.constructor=A,z(R,j.prototype),R.isPureReactComponent=!0;var L=Array.isArray;function $(){}var G={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function K(T,q,w){var ie=w.ref;return{$$typeof:e,type:T,key:q,ref:ie!==void 0?ie:null,props:w}}function ue(T,q){return K(T.type,q,T.props)}function re(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function oe(T){var q={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(w){return q[w]})}var ke=/\/+/g;function le(T,q){return typeof T=="object"&&T!==null&&T.key!=null?oe(""+T.key):q.toString(36)}function ne(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then($,$):(T.status="pending",T.then(function(q){T.status==="pending"&&(T.status="fulfilled",T.value=q)},function(q){T.status==="pending"&&(T.status="rejected",T.reason=q)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function P(T,q,w,ie,ve){var pe=typeof T;(pe==="undefined"||pe==="boolean")&&(T=null);var ge=!1;if(T===null)ge=!0;else switch(pe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(T.$$typeof){case e:case t:ge=!0;break;case p:return ge=T._init,P(ge(T._payload),q,w,ie,ve)}}if(ge)return ve=ve(T),ge=ie===""?"."+le(T,0):ie,L(ve)?(w="",ge!=null&&(w=ge.replace(ke,"$&/")+"/"),P(ve,q,w,"",function(Ct){return Ct})):ve!=null&&(re(ve)&&(ve=ue(ve,w+(ve.key==null||T&&T.key===ve.key?"":(""+ve.key).replace(ke,"$&/")+"/")+ge)),q.push(ve)),1;ge=0;var Ge=ie===""?".":ie+":";if(L(T))for(var De=0;De<T.length;De++)ie=T[De],pe=Ge+le(ie,De),ge+=P(ie,q,w,pe,ve);else if(De=b(T),typeof De=="function")for(T=De.call(T),De=0;!(ie=T.next()).done;)ie=ie.value,pe=Ge+le(ie,De++),ge+=P(ie,q,w,pe,ve);else if(pe==="object"){if(typeof T.then=="function")return P(ne(T),q,w,ie,ve);throw q=String(T),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ge}function Y(T,q,w){if(T==null)return T;var ie=[],ve=0;return P(T,ie,"","",function(pe){return q.call(w,pe,ve++)}),ie}function Z(T){if(T._status===-1){var q=T._result;q=q(),q.then(function(w){(T._status===0||T._status===-1)&&(T._status=1,T._result=w)},function(w){(T._status===0||T._status===-1)&&(T._status=2,T._result=w)}),T._status===-1&&(T._status=0,T._result=q)}if(T._status===1)return T._result.default;throw T._result}var ce=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},N={map:Y,forEach:function(T,q,w){Y(T,function(){q.apply(this,arguments)},w)},count:function(T){var q=0;return Y(T,function(){q++}),q},toArray:function(T){return Y(T,function(q){return q})||[]},only:function(T){if(!re(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Te.Activity=y,Te.Children=N,Te.Component=j,Te.Fragment=n,Te.Profiler=o,Te.PureComponent=A,Te.StrictMode=i,Te.Suspense=d,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Te.__COMPILER_RUNTIME={__proto__:null,c:function(T){return G.H.useMemoCache(T)}},Te.cache=function(T){return function(){return T.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(T,q,w){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var ie=z({},T.props),ve=T.key;if(q!=null)for(pe in q.key!==void 0&&(ve=""+q.key),q)!V.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(ie[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)ie.children=w;else if(1<pe){for(var ge=Array(pe),Ge=0;Ge<pe;Ge++)ge[Ge]=arguments[Ge+2];ie.children=ge}return K(T.type,ve,ie)},Te.createContext=function(T){return T={$$typeof:l,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:u,_context:T},T},Te.createElement=function(T,q,w){var ie,ve={},pe=null;if(q!=null)for(ie in q.key!==void 0&&(pe=""+q.key),q)V.call(q,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ve[ie]=q[ie]);var ge=arguments.length-2;if(ge===1)ve.children=w;else if(1<ge){for(var Ge=Array(ge),De=0;De<ge;De++)Ge[De]=arguments[De+2];ve.children=Ge}if(T&&T.defaultProps)for(ie in ge=T.defaultProps,ge)ve[ie]===void 0&&(ve[ie]=ge[ie]);return K(T,pe,ve)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(T){return{$$typeof:f,render:T}},Te.isValidElement=re,Te.lazy=function(T){return{$$typeof:p,_payload:{_status:-1,_result:T},_init:Z}},Te.memo=function(T,q){return{$$typeof:h,type:T,compare:q===void 0?null:q}},Te.startTransition=function(T){var q=G.T,w={};G.T=w;try{var ie=T(),ve=G.S;ve!==null&&ve(w,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then($,ce)}catch(pe){ce(pe)}finally{q!==null&&w.types!==null&&(q.types=w.types),G.T=q}},Te.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Te.use=function(T){return G.H.use(T)},Te.useActionState=function(T,q,w){return G.H.useActionState(T,q,w)},Te.useCallback=function(T,q){return G.H.useCallback(T,q)},Te.useContext=function(T){return G.H.useContext(T)},Te.useDebugValue=function(){},Te.useDeferredValue=function(T,q){return G.H.useDeferredValue(T,q)},Te.useEffect=function(T,q){return G.H.useEffect(T,q)},Te.useEffectEvent=function(T){return G.H.useEffectEvent(T)},Te.useId=function(){return G.H.useId()},Te.useImperativeHandle=function(T,q,w){return G.H.useImperativeHandle(T,q,w)},Te.useInsertionEffect=function(T,q){return G.H.useInsertionEffect(T,q)},Te.useLayoutEffect=function(T,q){return G.H.useLayoutEffect(T,q)},Te.useMemo=function(T,q){return G.H.useMemo(T,q)},Te.useOptimistic=function(T,q){return G.H.useOptimistic(T,q)},Te.useReducer=function(T,q,w){return G.H.useReducer(T,q,w)},Te.useRef=function(T){return G.H.useRef(T)},Te.useState=function(T){return G.H.useState(T)},Te.useSyncExternalStore=function(T,q,w){return G.H.useSyncExternalStore(T,q,w)},Te.useTransition=function(){return G.H.useTransition()},Te.version="19.2.4",Te}var Pb;function Pc(){return Pb||(Pb=1,Sh.exports=G2()),Sh.exports}var E=Pc();const kp=Sp(E);var kh={exports:{}},Ps={},wh={exports:{}},zh={};var Vb;function Y2(){return Vb||(Vb=1,(function(e){function t(P,Y){var Z=P.length;P.push(Y);e:for(;0<Z;){var ce=Z-1>>>1,N=P[ce];if(0<o(N,Y))P[ce]=Y,P[Z]=N,Z=ce;else break e}}function n(P){return P.length===0?null:P[0]}function i(P){if(P.length===0)return null;var Y=P[0],Z=P.pop();if(Z!==Y){P[0]=Z;e:for(var ce=0,N=P.length,T=N>>>1;ce<T;){var q=2*(ce+1)-1,w=P[q],ie=q+1,ve=P[ie];if(0>o(w,Z))ie<N&&0>o(ve,w)?(P[ce]=ve,P[ie]=Z,ce=ie):(P[ce]=w,P[q]=Z,ce=q);else if(ie<N&&0>o(ve,Z))P[ce]=ve,P[ie]=Z,ce=ie;else break e}}return Y}function o(P,Y){var Z=P.sortIndex-Y.sortIndex;return Z!==0?Z:P.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],p=1,y=null,x=3,b=!1,_=!1,z=!1,C=!1,j=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function R(P){for(var Y=n(h);Y!==null;){if(Y.callback===null)i(h);else if(Y.startTime<=P)i(h),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(h)}}function L(P){if(z=!1,R(P),!_)if(n(d)!==null)_=!0,$||($=!0,oe());else{var Y=n(h);Y!==null&&ne(L,Y.startTime-P)}}var $=!1,G=-1,V=5,K=-1;function ue(){return C?!0:!(e.unstable_now()-K<V)}function re(){if(C=!1,$){var P=e.unstable_now();K=P;var Y=!0;try{e:{_=!1,z&&(z=!1,O(G),G=-1),b=!0;var Z=x;try{t:{for(R(P),y=n(d);y!==null&&!(y.expirationTime>P&&ue());){var ce=y.callback;if(typeof ce=="function"){y.callback=null,x=y.priorityLevel;var N=ce(y.expirationTime<=P);if(P=e.unstable_now(),typeof N=="function"){y.callback=N,R(P),Y=!0;break t}y===n(d)&&i(d),R(P)}else i(d);y=n(d)}if(y!==null)Y=!0;else{var T=n(h);T!==null&&ne(L,T.startTime-P),Y=!1}}break e}finally{y=null,x=Z,b=!1}Y=void 0}}finally{Y?oe():$=!1}}}var oe;if(typeof A=="function")oe=function(){A(re)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,le=ke.port2;ke.port1.onmessage=re,oe=function(){le.postMessage(null)}}else oe=function(){j(re,0)};function ne(P,Y){G=j(function(){P(e.unstable_now())},Y)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(P){switch(x){case 1:case 2:case 3:var Y=3;break;default:Y=x}var Z=x;x=Y;try{return P()}finally{x=Z}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(P,Y){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var Z=x;x=P;try{return Y()}finally{x=Z}},e.unstable_scheduleCallback=function(P,Y,Z){var ce=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ce+Z:ce):Z=ce,P){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=Z+N,P={id:p++,callback:Y,priorityLevel:P,startTime:Z,expirationTime:N,sortIndex:-1},Z>ce?(P.sortIndex=Z,t(h,P),n(d)===null&&P===n(h)&&(z?(O(G),G=-1):z=!0,ne(L,Z-ce))):(P.sortIndex=N,t(d,P),_||b||(_=!0,$||($=!0,oe()))),P},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(P){var Y=x;return function(){var Z=x;x=Y;try{return P.apply(this,arguments)}finally{x=Z}}}})(zh)),zh}var Zb;function X2(){return Zb||(Zb=1,wh.exports=Y2()),wh.exports}var _h={exports:{}},en={};var Bb;function K2(){if(Bb)return en;Bb=1;var e=Pc();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(d,h,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:d,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return en.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,en.createPortal=function(d,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return u(d,h,null,p)},en.flushSync=function(d){var h=l.T,p=i.p;try{if(l.T=null,i.p=2,d)return d()}finally{l.T=h,i.p=p,i.d.f()}},en.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},en.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},en.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var p=h.as,y=f(p,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):p==="script"&&i.d.X(d,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},en.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},en.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,y=f(p,h.crossOrigin);i.d.L(d,p,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},en.preloadModule=function(d,h){if(typeof d=="string")if(h){var p=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},en.requestFormReset=function(d){i.d.r(d)},en.unstable_batchedUpdates=function(d,h){return d(h)},en.useFormState=function(d,h,p){return l.H.useFormState(d,h,p)},en.useFormStatus=function(){return l.H.useHostTransitionStatus()},en.version="19.2.4",en}var Ib;function J2(){if(Ib)return _h.exports;Ib=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(),_h.exports=K2(),_h.exports}var Hb;function Q2(){if(Hb)return Ps;Hb=1;var e=X2(),t=Pc(),n=J2();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var a=r,s=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(s=a.return),r=a.return;while(r)}return a.tag===3?s:null}function l(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(u(r)!==r)throw Error(i(188))}function h(r){var a=r.alternate;if(!a){if(a=u(r),a===null)throw Error(i(188));return a!==r?null:r}for(var s=r,c=a;;){var m=s.return;if(m===null)break;var g=m.alternate;if(g===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===g.child){for(g=m.child;g;){if(g===s)return d(m),r;if(g===c)return d(m),a;g=g.sibling}throw Error(i(188))}if(s.return!==c.return)s=m,c=g;else{for(var S=!1,k=m.child;k;){if(k===s){S=!0,s=m,c=g;break}if(k===c){S=!0,c=m,s=g;break}k=k.sibling}if(!S){for(k=g.child;k;){if(k===s){S=!0,s=g,c=m;break}if(k===c){S=!0,c=g,s=m;break}k=k.sibling}if(!S)throw Error(i(189))}}if(s.alternate!==c)throw Error(i(190))}if(s.tag!==3)throw Error(i(188));return s.stateNode.current===s?r:a}function p(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=p(r),a!==null)return a;r=r.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=re&&r[re]||r["@@iterator"],typeof r=="function"?r:null)}var ke=Symbol.for("react.client.reference");function le(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ke?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case z:return"Fragment";case j:return"Profiler";case C:return"StrictMode";case L:return"Suspense";case $:return"SuspenseList";case K:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case _:return"Portal";case A:return r.displayName||"Context";case O:return(r._context.displayName||"Context")+".Consumer";case R:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case G:return a=r.displayName||null,a!==null?a:le(r.type)||"Memo";case V:a=r._payload,r=r._init;try{return le(r(a))}catch{}}return null}var ne=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ce=[],N=-1;function T(r){return{current:r}}function q(r){0>N||(r.current=ce[N],ce[N]=null,N--)}function w(r,a){N++,ce[N]=r.current,r.current=a}var ie=T(null),ve=T(null),pe=T(null),ge=T(null);function Ge(r,a){switch(w(pe,a),w(ve,r),w(ie,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?ab(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=ab(a),r=ob(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}q(ie),w(ie,r)}function De(){q(ie),q(ve),q(pe)}function Ct(r){r.memoizedState!==null&&w(ge,r);var a=ie.current,s=ob(a,r.type);a!==s&&(w(ve,r),w(ie,s))}function an(r){ve.current===r&&(q(ie),q(ve)),ge.current===r&&(q(ge),Ms._currentValue=Z)}var Ln,hr;function Un(r){if(Ln===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Ln=a&&a[1]||"",hr=-1<s.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Ln+r+hr}var Ui=!1;function Ze(r,a){if(!r||Ui)return"";Ui=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(F){var H=F}Reflect.construct(r,[],ee)}else{try{ee.call()}catch(F){H=F}r.call(ee.prototype)}}else{try{throw Error()}catch(F){H=F}(ee=r())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(F){if(F&&H&&typeof F.stack=="string")return[F.stack,H.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),S=g[0],k=g[1];if(S&&k){var M=S.split(`
|
|
4
|
-
`),I=k.split(`
|
|
5
|
-
`);for(m=c=0;c<M.length&&!M[c].includes("DetermineComponentFrameRoot");)c++;for(;m<I.length&&!I[m].includes("DetermineComponentFrameRoot");)m++;if(c===M.length||m===I.length)for(c=M.length-1,m=I.length-1;1<=c&&0<=m&&M[c]!==I[m];)m--;for(;1<=c&&0<=m;c--,m--)if(M[c]!==I[m]){if(c!==1||m!==1)do if(c--,m--,0>m||M[c]!==I[m]){var X=`
|
|
6
|
-
`+M[c].replace(" at new "," at ");return r.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",r.displayName)),X}while(1<=c&&0<=m);break}}}finally{Ui=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?Un(s):""}function tt(r,a){switch(r.tag){case 26:case 27:case 5:return Un(r.type);case 16:return Un("Lazy");case 13:return r.child!==a&&a!==null?Un("Suspense Fallback"):Un("Suspense");case 19:return Un("SuspenseList");case 0:case 15:return Ze(r.type,!1);case 11:return Ze(r.type.render,!1);case 1:return Ze(r.type,!0);case 31:return Un("Activity");default:return""}}function st(r){try{var a="",s=null;do a+=tt(r,s),s=r,r=r.return;while(r);return a}catch(c){return`
|
|
7
|
-
Error generating stack: `+c.message+`
|
|
8
|
-
`+c.stack}}var Je=Object.prototype.hasOwnProperty,Ht=e.unstable_scheduleCallback,Pn=e.unstable_cancelCallback,_t=e.unstable_shouldYield,Pt=e.unstable_requestPaint,lt=e.unstable_now,wa=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,se=e.unstable_UserBlockingPriority,ye=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,on=e.log,En=e.unstable_setDisableYieldValue,sn=null,Vt=null;function hn(r){if(typeof on=="function"&&En(r),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(sn,r)}catch{}}var nt=Math.clz32?Math.clz32:NE,Qr=Math.log,ir=Math.LN2;function NE(r){return r>>>=0,r===0?32:31-(Qr(r)/ir|0)|0}var Al=256,jl=262144,Nl=4194304;function Pi(r){var a=r&42;if(a!==0)return a;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ol(r,a,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,g=r.suspendedLanes,S=r.pingedLanes;r=r.warmLanes;var k=c&134217727;return k!==0?(c=k&~g,c!==0?m=Pi(c):(S&=k,S!==0?m=Pi(S):s||(s=k&~r,s!==0&&(m=Pi(s))))):(k=c&~g,k!==0?m=Pi(k):S!==0?m=Pi(S):s||(s=c&~r,s!==0&&(m=Pi(s)))),m===0?0:a!==0&&a!==m&&(a&g)===0&&(g=m&-m,s=a&-a,g>=s||g===32&&(s&4194048)!==0)?a:m}function Go(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function OE(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32: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 a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vg(){var r=Nl;return Nl<<=1,(Nl&62914560)===0&&(Nl=4194304),r}function lf(r){for(var a=[],s=0;31>s;s++)a.push(r);return a}function Yo(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function RE(r,a,s,c,m,g){var S=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var k=r.entanglements,M=r.expirationTimes,I=r.hiddenUpdates;for(s=S&~s;0<s;){var X=31-nt(s),ee=1<<X;k[X]=0,M[X]=-1;var H=I[X];if(H!==null)for(I[X]=null,X=0;X<H.length;X++){var F=H[X];F!==null&&(F.lane&=-536870913)}s&=~ee}c!==0&&Zg(r,c,0),g!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=g&~(S&~a))}function Zg(r,a,s){r.pendingLanes|=a,r.suspendedLanes&=~a;var c=31-nt(a);r.entangledLanes|=a,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function Bg(r,a){var s=r.entangledLanes|=a;for(r=r.entanglements;s;){var c=31-nt(s),m=1<<c;m&a|r[c]&a&&(r[c]|=a),s&=~m}}function Ig(r,a){var s=a&-a;return s=(s&42)!==0?1:uf(s),(s&(r.suspendedLanes|a))!==0?0:s}function uf(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function cf(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Hg(){var r=Y.p;return r!==0?r:(r=window.event,r===void 0?32:Ab(r.type))}function Fg(r,a){var s=Y.p;try{return Y.p=r,a()}finally{Y.p=s}}var Wr=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Wr,mn="__reactProps$"+Wr,za="__reactContainer$"+Wr,ff="__reactEvents$"+Wr,ME="__reactListeners$"+Wr,DE="__reactHandles$"+Wr,qg="__reactResources$"+Wr,Xo="__reactMarker$"+Wr;function df(r){delete r[Gt],delete r[mn],delete r[ff],delete r[ME],delete r[DE]}function _a(r){var a=r[Gt];if(a)return a;for(var s=r.parentNode;s;){if(a=s[za]||s[Gt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=hb(r);r!==null;){if(s=r[Gt])return s;r=hb(r)}return a}r=s,s=r.parentNode}return null}function Ea(r){if(r=r[Gt]||r[za]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Ko(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Ta(r){var a=r[qg];return a||(a=r[qg]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[Xo]=!0}var Gg=new Set,Yg={};function Vi(r,a){Ca(r,a),Ca(r+"Capture",a)}function Ca(r,a){for(Yg[r]=a,r=0;r<a.length;r++)Gg.add(a[r])}var $E=RegExp("^[: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]*$"),Xg={},Kg={};function LE(r){return Je.call(Kg,r)?!0:Je.call(Xg,r)?!1:$E.test(r)?Kg[r]=!0:(Xg[r]=!0,!1)}function Rl(r,a,s){if(LE(a))if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+s)}}function Ml(r,a,s){if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+s)}}function Tr(r,a,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(a,s,""+c)}}function Vn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Jg(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function UE(r,a,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,g=c.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return m.call(this)},set:function(S){s=""+S,g.call(this,S)}}),Object.defineProperty(r,a,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(S){s=""+S},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function hf(r){if(!r._valueTracker){var a=Jg(r)?"checked":"value";r._valueTracker=UE(r,a,""+r[a])}}function Qg(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),c="";return r&&(c=Jg(r)?r.checked?"true":"false":r.value),r=c,r!==s?(a.setValue(r),!0):!1}function Dl(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}}var PE=/[\n"\\]/g;function Zn(r){return r.replace(PE,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function mf(r,a,s,c,m,g,S,k){r.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?r.type=S:r.removeAttribute("type"),a!=null?S==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Vn(a)):r.value!==""+Vn(a)&&(r.value=""+Vn(a)):S!=="submit"&&S!=="reset"||r.removeAttribute("value"),a!=null?pf(r,S,Vn(a)):s!=null?pf(r,S,Vn(s)):c!=null&&r.removeAttribute("value"),m==null&&g!=null&&(r.defaultChecked=!!g),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?r.name=""+Vn(k):r.removeAttribute("name")}function Wg(r,a,s,c,m,g,S,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){hf(r);return}s=s!=null?""+Vn(s):"",a=a!=null?""+Vn(a):s,k||a===r.value||(r.value=a),r.defaultValue=a}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=k?r.checked:!!c,r.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(r.name=S),hf(r)}function pf(r,a,s){a==="number"&&Dl(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Aa(r,a,s,c){if(r=r.options,a){a={};for(var m=0;m<s.length;m++)a["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=a.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Vn(s),a=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}a!==null||r[m].disabled||(a=r[m])}a!==null&&(a.selected=!0)}}function ey(r,a,s){if(a!=null&&(a=""+Vn(a),a!==r.value&&(r.value=a),s==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=s!=null?""+Vn(s):""}function ty(r,a,s,c){if(a==null){if(c!=null){if(s!=null)throw Error(i(92));if(ne(c)){if(1<c.length)throw Error(i(93));c=c[0]}s=c}s==null&&(s=""),a=s}s=Vn(a),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),hf(r)}function ja(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var VE=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ny(r,a,s){var c=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":c?r.setProperty(a,s):typeof s!="number"||s===0||VE.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function ry(r,a,s){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in a)c=a[m],a.hasOwnProperty(m)&&s[m]!==c&&ny(r,m,c)}else for(var g in a)a.hasOwnProperty(g)&&ny(r,g,a[g])}function gf(r){if(r.indexOf("-")===-1)return!1;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 ZE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),BE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $l(r){return BE.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Cr(){}var yf=null;function xf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Na=null,Oa=null;function iy(r){var a=Ea(r);if(a&&(r=a.stateNode)){var s=r[mn]||null;e:switch(r=a.stateNode,a.type){case"input":if(mf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Zn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var c=s[a];if(c!==r&&c.form===r.form){var m=c[mn]||null;if(!m)throw Error(i(90));mf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<s.length;a++)c=s[a],c.form===r.form&&Qg(c)}break e;case"textarea":ey(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Aa(r,!!s.multiple,a,!1)}}}var vf=!1;function ay(r,a,s){if(vf)return r(a,s);vf=!0;try{var c=r(a);return c}finally{if(vf=!1,(Na!==null||Oa!==null)&&(wu(),Na&&(a=Na,r=Oa,Oa=Na=null,iy(a),r)))for(a=0;a<r.length;a++)iy(r[a])}}function Jo(r,a){var s=r.stateNode;if(s===null)return null;var c=s[mn]||null;if(c===null)return null;s=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(i(231,a,typeof s));return s}var Ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bf=!1;if(Ar)try{var Qo={};Object.defineProperty(Qo,"passive",{get:function(){bf=!0}}),window.addEventListener("test",Qo,Qo),window.removeEventListener("test",Qo,Qo)}catch{bf=!1}var ei=null,Sf=null,Ll=null;function oy(){if(Ll)return Ll;var r,a=Sf,s=a.length,c,m="value"in ei?ei.value:ei.textContent,g=m.length;for(r=0;r<s&&a[r]===m[r];r++);var S=s-r;for(c=1;c<=S&&a[s-c]===m[g-c];c++);return Ll=m.slice(r,1<c?1-c:void 0)}function Ul(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Pl(){return!0}function sy(){return!1}function pn(r){function a(s,c,m,g,S){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var k in r)r.hasOwnProperty(k)&&(s=r[k],this[k]=s?s(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Pl:sy,this.isPropagationStopped=sy,this}return y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Pl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),a}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vl=pn(Zi),Wo=y({},Zi,{view:0,detail:0}),IE=pn(Wo),kf,wf,es,Zl=y({},Wo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_f,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!==es&&(es&&r.type==="mousemove"?(kf=r.screenX-es.screenX,wf=r.screenY-es.screenY):wf=kf=0,es=r),kf)},movementY:function(r){return"movementY"in r?r.movementY:wf}}),ly=pn(Zl),HE=y({},Zl,{dataTransfer:0}),FE=pn(HE),qE=y({},Wo,{relatedTarget:0}),zf=pn(qE),GE=y({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),YE=pn(GE),XE=y({},Zi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),KE=pn(XE),JE=y({},Zi,{data:0}),uy=pn(JE),QE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WE={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"},eT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tT(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=eT[r])?!!a[r]:!1}function _f(){return tT}var nT=y({},Wo,{key:function(r){if(r.key){var a=QE[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Ul(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?WE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_f,charCode:function(r){return r.type==="keypress"?Ul(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ul(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),rT=pn(nT),iT=y({},Zl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cy=pn(iT),aT=y({},Wo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_f}),oT=pn(aT),sT=y({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),lT=pn(sT),uT=y({},Zl,{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}),cT=pn(uT),fT=y({},Zi,{newState:0,oldState:0}),dT=pn(fT),hT=[9,13,27,32],Ef=Ar&&"CompositionEvent"in window,ts=null;Ar&&"documentMode"in document&&(ts=document.documentMode);var mT=Ar&&"TextEvent"in window&&!ts,fy=Ar&&(!Ef||ts&&8<ts&&11>=ts),dy=" ",hy=!1;function my(r,a){switch(r){case"keyup":return hT.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function py(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ra=!1;function pT(r,a){switch(r){case"compositionend":return py(a);case"keypress":return a.which!==32?null:(hy=!0,dy);case"textInput":return r=a.data,r===dy&&hy?null:r;default:return null}}function gT(r,a){if(Ra)return r==="compositionend"||!Ef&&my(r,a)?(r=oy(),Ll=Sf=ei=null,Ra=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return fy&&a.locale!=="ko"?null:a.data;default:return null}}var yT={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 gy(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!yT[r.type]:a==="textarea"}function yy(r,a,s,c){Na?Oa?Oa.push(c):Oa=[c]:Na=c,a=ju(a,"onChange"),0<a.length&&(s=new Vl("onChange","change",null,s,c),r.push({event:s,listeners:a}))}var ns=null,rs=null;function xT(r){Wv(r,0)}function Bl(r){var a=Ko(r);if(Qg(a))return r}function xy(r,a){if(r==="change")return a}var vy=!1;if(Ar){var Tf;if(Ar){var Cf="oninput"in document;if(!Cf){var by=document.createElement("div");by.setAttribute("oninput","return;"),Cf=typeof by.oninput=="function"}Tf=Cf}else Tf=!1;vy=Tf&&(!document.documentMode||9<document.documentMode)}function Sy(){ns&&(ns.detachEvent("onpropertychange",ky),rs=ns=null)}function ky(r){if(r.propertyName==="value"&&Bl(rs)){var a=[];yy(a,rs,r,xf(r)),ay(xT,a)}}function vT(r,a,s){r==="focusin"?(Sy(),ns=a,rs=s,ns.attachEvent("onpropertychange",ky)):r==="focusout"&&Sy()}function bT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Bl(rs)}function ST(r,a){if(r==="click")return Bl(a)}function kT(r,a){if(r==="input"||r==="change")return Bl(a)}function wT(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var Tn=typeof Object.is=="function"?Object.is:wT;function is(r,a){if(Tn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var s=Object.keys(r),c=Object.keys(a);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Je.call(a,m)||!Tn(r[m],a[m]))return!1}return!0}function wy(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function zy(r,a){var s=wy(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=a&&c>=a)return{node:s,offset:a-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=wy(s)}}function _y(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?_y(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Ey(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Dl(r.document);a instanceof r.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)r=a.contentWindow;else break;a=Dl(r.document)}return a}function Af(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var zT=Ar&&"documentMode"in document&&11>=document.documentMode,Ma=null,jf=null,as=null,Nf=!1;function Ty(r,a,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Nf||Ma==null||Ma!==Dl(c)||(c=Ma,"selectionStart"in c&&Af(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),as&&is(as,c)||(as=c,c=ju(jf,"onSelect"),0<c.length&&(a=new Vl("onSelect","select",null,a,s),r.push({event:a,listeners:c}),a.target=Ma)))}function Bi(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var Da={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},Of={},Cy={};Ar&&(Cy=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function Ii(r){if(Of[r])return Of[r];if(!Da[r])return r;var a=Da[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in Cy)return Of[r]=a[s];return r}var Ay=Ii("animationend"),jy=Ii("animationiteration"),Ny=Ii("animationstart"),_T=Ii("transitionrun"),ET=Ii("transitionstart"),TT=Ii("transitioncancel"),Oy=Ii("transitionend"),Ry=new Map,Rf="abort auxClick beforeToggle 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(" ");Rf.push("scrollEnd");function ar(r,a){Ry.set(r,a),Vi(a,[r])}var Il=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Bn=[],$a=0,Mf=0;function Hl(){for(var r=$a,a=Mf=$a=0;a<r;){var s=Bn[a];Bn[a++]=null;var c=Bn[a];Bn[a++]=null;var m=Bn[a];Bn[a++]=null;var g=Bn[a];if(Bn[a++]=null,c!==null&&m!==null){var S=c.pending;S===null?m.next=m:(m.next=S.next,S.next=m),c.pending=m}g!==0&&My(s,m,g)}}function Fl(r,a,s,c){Bn[$a++]=r,Bn[$a++]=a,Bn[$a++]=s,Bn[$a++]=c,Mf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Df(r,a,s,c){return Fl(r,a,s,c),ql(r)}function Hi(r,a){return Fl(r,null,null,a),ql(r)}function My(r,a,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,g=r.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(m=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,m&&a!==null&&(m=31-nt(s),r=g.hiddenUpdates,c=r[m],c===null?r[m]=[a]:c.push(a),a.lane=s|536870912),g):null}function ql(r){if(50<Ts)throw Ts=0,Hd=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var La={};function CT(r,a,s,c){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(r,a,s,c){return new CT(r,a,s,c)}function $f(r){return r=r.prototype,!(!r||!r.isReactComponent)}function jr(r,a){var s=r.alternate;return s===null?(s=Cn(r.tag,a,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=a,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,a=r.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function Dy(r,a){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,a=s.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Gl(r,a,s,c,m,g){var S=0;if(c=r,typeof r=="function")$f(r)&&(S=1);else if(typeof r=="string")S=R2(r,s,ie.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case K:return r=Cn(31,s,a,m),r.elementType=K,r.lanes=g,r;case z:return Fi(s.children,m,g,a);case C:S=8,m|=24;break;case j:return r=Cn(12,s,a,m|2),r.elementType=j,r.lanes=g,r;case L:return r=Cn(13,s,a,m),r.elementType=L,r.lanes=g,r;case $:return r=Cn(19,s,a,m),r.elementType=$,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case A:S=10;break e;case O:S=9;break e;case R:S=11;break e;case G:S=14;break e;case V:S=16,c=null;break e}S=29,s=Error(i(130,r===null?"null":typeof r,"")),c=null}return a=Cn(S,s,a,m),a.elementType=r,a.type=c,a.lanes=g,a}function Fi(r,a,s,c){return r=Cn(7,r,c,a),r.lanes=s,r}function Lf(r,a,s){return r=Cn(6,r,null,a),r.lanes=s,r}function $y(r){var a=Cn(18,null,null,0);return a.stateNode=r,a}function Uf(r,a,s){return a=Cn(4,r.children!==null?r.children:[],r.key,a),a.lanes=s,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Ly=new WeakMap;function In(r,a){if(typeof r=="object"&&r!==null){var s=Ly.get(r);return s!==void 0?s:(a={value:r,source:a,stack:st(a)},Ly.set(r,a),a)}return{value:r,source:a,stack:st(a)}}var Ua=[],Pa=0,Yl=null,os=0,Hn=[],Fn=0,ti=null,mr=1,pr="";function Nr(r,a){Ua[Pa++]=os,Ua[Pa++]=Yl,Yl=r,os=a}function Uy(r,a,s){Hn[Fn++]=mr,Hn[Fn++]=pr,Hn[Fn++]=ti,ti=r;var c=mr;r=pr;var m=32-nt(c)-1;c&=~(1<<m),s+=1;var g=32-nt(a)+m;if(30<g){var S=m-m%5;g=(c&(1<<S)-1).toString(32),c>>=S,m-=S,mr=1<<32-nt(a)+m|s<<m|c,pr=g+r}else mr=1<<g|s<<m|c,pr=r}function Pf(r){r.return!==null&&(Nr(r,1),Uy(r,1,0))}function Vf(r){for(;r===Yl;)Yl=Ua[--Pa],Ua[Pa]=null,os=Ua[--Pa],Ua[Pa]=null;for(;r===ti;)ti=Hn[--Fn],Hn[Fn]=null,pr=Hn[--Fn],Hn[Fn]=null,mr=Hn[--Fn],Hn[Fn]=null}function Py(r,a){Hn[Fn++]=mr,Hn[Fn++]=pr,Hn[Fn++]=ti,mr=a.id,pr=a.overflow,ti=r}var Yt=null,ut=null,Ue=!1,ni=null,qn=!1,Zf=Error(i(519));function ri(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ss(In(a,r)),Zf}function Vy(r){var a=r.stateNode,s=r.type,c=r.memoizedProps;switch(a[Gt]=r,a[mn]=c,s){case"dialog":Re("cancel",a),Re("close",a);break;case"iframe":case"object":case"embed":Re("load",a);break;case"video":case"audio":for(s=0;s<As.length;s++)Re(As[s],a);break;case"source":Re("error",a);break;case"img":case"image":case"link":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"input":Re("invalid",a),Wg(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Re("invalid",a);break;case"textarea":Re("invalid",a),ty(a,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||c.suppressHydrationWarning===!0||rb(a.textContent,s)?(c.popover!=null&&(Re("beforetoggle",a),Re("toggle",a)),c.onScroll!=null&&Re("scroll",a),c.onScrollEnd!=null&&Re("scrollend",a),c.onClick!=null&&(a.onclick=Cr),a=!0):a=!1,a||ri(r,!0)}function Zy(r){for(Yt=r.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:qn=!1;return;case 27:case 3:qn=!0;return;default:Yt=Yt.return}}function Va(r){if(r!==Yt)return!1;if(!Ue)return Zy(r),Ue=!0,!1;var a=r.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||ah(r.type,r.memoizedProps)),s=!s),s&&ut&&ri(r),Zy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=db(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=db(r)}else a===27?(a=ut,yi(r.type)?(r=ch,ch=null,ut=r):ut=a):ut=Yt?Yn(r.stateNode.nextSibling):null;return!0}function qi(){ut=Yt=null,Ue=!1}function Bf(){var r=ni;return r!==null&&(vn===null?vn=r:vn.push.apply(vn,r),ni=null),r}function ss(r){ni===null?ni=[r]:ni.push(r)}var If=T(null),Gi=null,Or=null;function ii(r,a,s){w(If,a._currentValue),a._currentValue=s}function Rr(r){r._currentValue=If.current,q(If)}function Hf(r,a,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),r===s)break;r=r.return}}function Ff(r,a,s,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var g=m.dependencies;if(g!==null){var S=m.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=m;for(var M=0;M<a.length;M++)if(k.context===a[M]){g.lanes|=s,k=g.alternate,k!==null&&(k.lanes|=s),Hf(g.return,s,r),c||(S=null);break e}g=k.next}}else if(m.tag===18){if(S=m.return,S===null)throw Error(i(341));S.lanes|=s,g=S.alternate,g!==null&&(g.lanes|=s),Hf(S,s,r),S=null}else S=m.child;if(S!==null)S.return=m;else for(S=m;S!==null;){if(S===r){S=null;break}if(m=S.sibling,m!==null){m.return=S.return,S=m;break}S=S.return}m=S}}function Za(r,a,s,c){r=null;for(var m=a,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var S=m.alternate;if(S===null)throw Error(i(387));if(S=S.memoizedProps,S!==null){var k=m.type;Tn(m.pendingProps.value,S.value)||(r!==null?r.push(k):r=[k])}}else if(m===ge.current){if(S=m.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Ms):r=[Ms])}m=m.return}r!==null&&Ff(a,r,s,c),a.flags|=262144}function Xl(r){for(r=r.firstContext;r!==null;){if(!Tn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Yi(r){Gi=r,Or=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Xt(r){return By(Gi,r)}function Kl(r,a){return Gi===null&&Yi(r),By(r,a)}function By(r,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Or===null){if(r===null)throw Error(i(308));Or=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Or=Or.next=a;return s}var AT=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){a.aborted=!0,r.forEach(function(s){return s()})}},jT=e.unstable_scheduleCallback,NT=e.unstable_NormalPriority,At={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qf(){return{controller:new AT,data:new Map,refCount:0}}function ls(r){r.refCount--,r.refCount===0&&jT(NT,function(){r.controller.abort()})}var us=null,Gf=0,Ba=0,Ia=null;function OT(r,a){if(us===null){var s=us=[];Gf=0,Ba=Kd(),Ia={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Gf++,a.then(Iy,Iy),a}function Iy(){if(--Gf===0&&us!==null){Ia!==null&&(Ia.status="fulfilled");var r=us;us=null,Ba=0,Ia=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function RT(r,a){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=a;for(var m=0;m<s.length;m++)(0,s[m])(a)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var Hy=P.S;P.S=function(r,a){Tv=lt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&OT(r,a),Hy!==null&&Hy(r,a)};var Xi=T(null);function Yf(){var r=Xi.current;return r!==null?r:rt.pooledCache}function Jl(r,a){a===null?w(Xi,Xi.current):w(Xi,a.pool)}function Fy(){var r=Yf();return r===null?null:{parent:At._currentValue,pool:r}}var Ha=Error(i(460)),Xf=Error(i(474)),Ql=Error(i(542)),Wl={then:function(){}};function qy(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Gy(r,a,s){switch(s=r[s],s===void 0?r.push(a):s!==a&&(a.then(Cr,Cr),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Xy(r),r;default:if(typeof a.status=="string")a.then(Cr,Cr);else{if(r=rt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(c){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=c}},function(c){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Xy(r),r}throw Ji=a,Ha}}function Ki(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ji=s,Ha):s}}var Ji=null;function Yy(){if(Ji===null)throw Error(i(459));var r=Ji;return Ji=null,r}function Xy(r){if(r===Ha||r===Ql)throw Error(i(483))}var Fa=null,cs=0;function eu(r){var a=cs;return cs+=1,Fa===null&&(Fa=[]),Gy(Fa,r,a)}function fs(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function tu(r,a){throw a.$$typeof===x?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Ky(r){function a(U,D){if(r){var B=U.deletions;B===null?(U.deletions=[D],U.flags|=16):B.push(D)}}function s(U,D){if(!r)return null;for(;D!==null;)a(U,D),D=D.sibling;return null}function c(U){for(var D=new Map;U!==null;)U.key!==null?D.set(U.key,U):D.set(U.index,U),U=U.sibling;return D}function m(U,D){return U=jr(U,D),U.index=0,U.sibling=null,U}function g(U,D,B){return U.index=B,r?(B=U.alternate,B!==null?(B=B.index,B<D?(U.flags|=67108866,D):B):(U.flags|=67108866,D)):(U.flags|=1048576,D)}function S(U){return r&&U.alternate===null&&(U.flags|=67108866),U}function k(U,D,B,W){return D===null||D.tag!==6?(D=Lf(B,U.mode,W),D.return=U,D):(D=m(D,B),D.return=U,D)}function M(U,D,B,W){var Se=B.type;return Se===z?X(U,D,B.props.children,W,B.key):D!==null&&(D.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===V&&Ki(Se)===D.type)?(D=m(D,B.props),fs(D,B),D.return=U,D):(D=Gl(B.type,B.key,B.props,null,U.mode,W),fs(D,B),D.return=U,D)}function I(U,D,B,W){return D===null||D.tag!==4||D.stateNode.containerInfo!==B.containerInfo||D.stateNode.implementation!==B.implementation?(D=Uf(B,U.mode,W),D.return=U,D):(D=m(D,B.children||[]),D.return=U,D)}function X(U,D,B,W,Se){return D===null||D.tag!==7?(D=Fi(B,U.mode,W,Se),D.return=U,D):(D=m(D,B),D.return=U,D)}function ee(U,D,B){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Lf(""+D,U.mode,B),D.return=U,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case b:return B=Gl(D.type,D.key,D.props,null,U.mode,B),fs(B,D),B.return=U,B;case _:return D=Uf(D,U.mode,B),D.return=U,D;case V:return D=Ki(D),ee(U,D,B)}if(ne(D)||oe(D))return D=Fi(D,U.mode,B,null),D.return=U,D;if(typeof D.then=="function")return ee(U,eu(D),B);if(D.$$typeof===A)return ee(U,Kl(U,D),B);tu(U,D)}return null}function H(U,D,B,W){var Se=D!==null?D.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return Se!==null?null:k(U,D,""+B,W);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case b:return B.key===Se?M(U,D,B,W):null;case _:return B.key===Se?I(U,D,B,W):null;case V:return B=Ki(B),H(U,D,B,W)}if(ne(B)||oe(B))return Se!==null?null:X(U,D,B,W,null);if(typeof B.then=="function")return H(U,D,eu(B),W);if(B.$$typeof===A)return H(U,D,Kl(U,B),W);tu(U,B)}return null}function F(U,D,B,W,Se){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return U=U.get(B)||null,k(D,U,""+W,Se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return U=U.get(W.key===null?B:W.key)||null,M(D,U,W,Se);case _:return U=U.get(W.key===null?B:W.key)||null,I(D,U,W,Se);case V:return W=Ki(W),F(U,D,B,W,Se)}if(ne(W)||oe(W))return U=U.get(B)||null,X(D,U,W,Se,null);if(typeof W.then=="function")return F(U,D,B,eu(W),Se);if(W.$$typeof===A)return F(U,D,B,Kl(D,W),Se);tu(D,W)}return null}function fe(U,D,B,W){for(var Se=null,Be=null,xe=D,Ae=D=0,Le=null;xe!==null&&Ae<B.length;Ae++){xe.index>Ae?(Le=xe,xe=null):Le=xe.sibling;var Ie=H(U,xe,B[Ae],W);if(Ie===null){xe===null&&(xe=Le);break}r&&xe&&Ie.alternate===null&&a(U,xe),D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie,xe=Le}if(Ae===B.length)return s(U,xe),Ue&&Nr(U,Ae),Se;if(xe===null){for(;Ae<B.length;Ae++)xe=ee(U,B[Ae],W),xe!==null&&(D=g(xe,D,Ae),Be===null?Se=xe:Be.sibling=xe,Be=xe);return Ue&&Nr(U,Ae),Se}for(xe=c(xe);Ae<B.length;Ae++)Le=F(xe,U,Ae,B[Ae],W),Le!==null&&(r&&Le.alternate!==null&&xe.delete(Le.key===null?Ae:Le.key),D=g(Le,D,Ae),Be===null?Se=Le:Be.sibling=Le,Be=Le);return r&&xe.forEach(function(ki){return a(U,ki)}),Ue&&Nr(U,Ae),Se}function we(U,D,B,W){if(B==null)throw Error(i(151));for(var Se=null,Be=null,xe=D,Ae=D=0,Le=null,Ie=B.next();xe!==null&&!Ie.done;Ae++,Ie=B.next()){xe.index>Ae?(Le=xe,xe=null):Le=xe.sibling;var ki=H(U,xe,Ie.value,W);if(ki===null){xe===null&&(xe=Le);break}r&&xe&&ki.alternate===null&&a(U,xe),D=g(ki,D,Ae),Be===null?Se=ki:Be.sibling=ki,Be=ki,xe=Le}if(Ie.done)return s(U,xe),Ue&&Nr(U,Ae),Se;if(xe===null){for(;!Ie.done;Ae++,Ie=B.next())Ie=ee(U,Ie.value,W),Ie!==null&&(D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie);return Ue&&Nr(U,Ae),Se}for(xe=c(xe);!Ie.done;Ae++,Ie=B.next())Ie=F(xe,U,Ae,Ie.value,W),Ie!==null&&(r&&Ie.alternate!==null&&xe.delete(Ie.key===null?Ae:Ie.key),D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie);return r&&xe.forEach(function(H2){return a(U,H2)}),Ue&&Nr(U,Ae),Se}function et(U,D,B,W){if(typeof B=="object"&&B!==null&&B.type===z&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case b:e:{for(var Se=B.key;D!==null;){if(D.key===Se){if(Se=B.type,Se===z){if(D.tag===7){s(U,D.sibling),W=m(D,B.props.children),W.return=U,U=W;break e}}else if(D.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===V&&Ki(Se)===D.type){s(U,D.sibling),W=m(D,B.props),fs(W,B),W.return=U,U=W;break e}s(U,D);break}else a(U,D);D=D.sibling}B.type===z?(W=Fi(B.props.children,U.mode,W,B.key),W.return=U,U=W):(W=Gl(B.type,B.key,B.props,null,U.mode,W),fs(W,B),W.return=U,U=W)}return S(U);case _:e:{for(Se=B.key;D!==null;){if(D.key===Se)if(D.tag===4&&D.stateNode.containerInfo===B.containerInfo&&D.stateNode.implementation===B.implementation){s(U,D.sibling),W=m(D,B.children||[]),W.return=U,U=W;break e}else{s(U,D);break}else a(U,D);D=D.sibling}W=Uf(B,U.mode,W),W.return=U,U=W}return S(U);case V:return B=Ki(B),et(U,D,B,W)}if(ne(B))return fe(U,D,B,W);if(oe(B)){if(Se=oe(B),typeof Se!="function")throw Error(i(150));return B=Se.call(B),we(U,D,B,W)}if(typeof B.then=="function")return et(U,D,eu(B),W);if(B.$$typeof===A)return et(U,D,Kl(U,B),W);tu(U,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,D!==null&&D.tag===6?(s(U,D.sibling),W=m(D,B),W.return=U,U=W):(s(U,D),W=Lf(B,U.mode,W),W.return=U,U=W),S(U)):s(U,D)}return function(U,D,B,W){try{cs=0;var Se=et(U,D,B,W);return Fa=null,Se}catch(xe){if(xe===Ha||xe===Ql)throw xe;var Be=Cn(29,xe,null,U.mode);return Be.lanes=W,Be.return=U,Be}}}var Qi=Ky(!0),Jy=Ky(!1),ai=!1;function Kf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jf(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function oi(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function si(r,a,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(He&2)!==0){var m=c.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),c.pending=a,a=ql(r),My(r,null,s),a}return Fl(r,c,a,s),ql(r)}function ds(r,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var c=a.lanes;c&=r.pendingLanes,s|=c,a.lanes=s,Bg(r,s)}}function Qf(r,a){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var S={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?m=g=S:g=g.next=S,s=s.next}while(s!==null);g===null?m=g=a:g=g.next=a}else m=g=a;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=a:r.next=a,s.lastBaseUpdate=a}var Wf=!1;function hs(){if(Wf){var r=Ia;if(r!==null)throw r}}function ms(r,a,s,c){Wf=!1;var m=r.updateQueue;ai=!1;var g=m.firstBaseUpdate,S=m.lastBaseUpdate,k=m.shared.pending;if(k!==null){m.shared.pending=null;var M=k,I=M.next;M.next=null,S===null?g=I:S.next=I,S=M;var X=r.alternate;X!==null&&(X=X.updateQueue,k=X.lastBaseUpdate,k!==S&&(k===null?X.firstBaseUpdate=I:k.next=I,X.lastBaseUpdate=M))}if(g!==null){var ee=m.baseState;S=0,X=I=M=null,k=g;do{var H=k.lane&-536870913,F=H!==k.lane;if(F?($e&H)===H:(c&H)===H){H!==0&&H===Ba&&(Wf=!0),X!==null&&(X=X.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var fe=r,we=k;H=a;var et=s;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){ee=fe.call(et,ee,H);break e}ee=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,H=typeof fe=="function"?fe.call(et,ee,H):fe,H==null)break e;ee=y({},ee,H);break e;case 2:ai=!0}}H=k.callback,H!==null&&(r.flags|=64,F&&(r.flags|=8192),F=m.callbacks,F===null?m.callbacks=[H]:F.push(H))}else F={lane:H,tag:k.tag,payload:k.payload,callback:k.callback,next:null},X===null?(I=X=F,M=ee):X=X.next=F,S|=H;if(k=k.next,k===null){if(k=m.shared.pending,k===null)break;F=k,k=F.next,F.next=null,m.lastBaseUpdate=F,m.shared.pending=null}}while(!0);X===null&&(M=ee),m.baseState=M,m.firstBaseUpdate=I,m.lastBaseUpdate=X,g===null&&(m.shared.lanes=0),di|=S,r.lanes=S,r.memoizedState=ee}}function Qy(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function Wy(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Qy(s[r],a)}var qa=T(null),nu=T(0);function ex(r,a){r=Br,w(nu,r),w(qa,a),Br=r|a.baseLanes}function ed(){w(nu,Br),w(qa,qa.current)}function td(){Br=nu.current,q(qa),q(nu)}var An=T(null),Gn=null;function li(r){var a=r.alternate;w(Et,Et.current&1),w(An,r),Gn===null&&(a===null||qa.current!==null||a.memoizedState!==null)&&(Gn=r)}function nd(r){w(Et,Et.current),w(An,r),Gn===null&&(Gn=r)}function tx(r){r.tag===22?(w(Et,Et.current),w(An,r),Gn===null&&(Gn=r)):ui()}function ui(){w(Et,Et.current),w(An,An.current)}function jn(r){q(An),Gn===r&&(Gn=null),q(Et)}var Et=T(0);function ru(r){for(var a=r;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||lh(s)||uh(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Mr=0,Ce=null,Qe=null,jt=null,iu=!1,Ga=!1,Wi=!1,au=0,ps=0,Ya=null,MT=0;function kt(){throw Error(i(321))}function rd(r,a){if(a===null)return!1;for(var s=0;s<a.length&&s<r.length;s++)if(!Tn(r[s],a[s]))return!1;return!0}function id(r,a,s,c,m,g){return Mr=g,Ce=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,P.H=r===null||r.memoizedState===null?Ux:vd,Wi=!1,g=s(c,m),Wi=!1,Ga&&(g=rx(a,s,c,m)),nx(r),g}function nx(r){P.H=xs;var a=Qe!==null&&Qe.next!==null;if(Mr=0,jt=Qe=Ce=null,iu=!1,ps=0,Ya=null,a)throw Error(i(300));r===null||Nt||(r=r.dependencies,r!==null&&Xl(r)&&(Nt=!0))}function rx(r,a,s,c){Ce=r;var m=0;do{if(Ga&&(Ya=null),ps=0,Ga=!1,25<=m)throw Error(i(301));if(m+=1,jt=Qe=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}P.H=Px,g=a(s,c)}while(Ga);return g}function DT(){var r=P.H,a=r.useState()[0];return a=typeof a.then=="function"?gs(a):a,r=r.useState()[0],(Qe!==null?Qe.memoizedState:null)!==r&&(Ce.flags|=1024),a}function ad(){var r=au!==0;return au=0,r}function od(r,a,s){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~s}function sd(r){if(iu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}iu=!1}Mr=0,jt=Qe=Ce=null,Ga=!1,ps=au=0,Ya=null}function ln(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ce.memoizedState=jt=r:jt=jt.next=r,jt}function Tt(){if(Qe===null){var r=Ce.alternate;r=r!==null?r.memoizedState:null}else r=Qe.next;var a=jt===null?Ce.memoizedState:jt.next;if(a!==null)jt=a,Qe=r;else{if(r===null)throw Ce.alternate===null?Error(i(467)):Error(i(310));Qe=r,r={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},jt===null?Ce.memoizedState=jt=r:jt=jt.next=r}return jt}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gs(r){var a=ps;return ps+=1,Ya===null&&(Ya=[]),r=Gy(Ya,r,a),a=Ce,(jt===null?a.memoizedState:jt.next)===null&&(a=a.alternate,P.H=a===null||a.memoizedState===null?Ux:vd),r}function su(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return gs(r);if(r.$$typeof===A)return Xt(r)}throw Error(i(438,String(r)))}function ld(r){var a=null,s=Ce.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var c=Ce.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=ou(),Ce.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(r),c=0;c<r;c++)s[c]=ue;return a.index++,s}function Dr(r,a){return typeof a=="function"?a(r):a}function lu(r){var a=Tt();return ud(a,Qe,r)}function ud(r,a,s){var c=r.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=s;var m=r.baseQueue,g=c.pending;if(g!==null){if(m!==null){var S=m.next;m.next=g.next,g.next=S}a.baseQueue=m=g,c.pending=null}if(g=r.baseState,m===null)r.memoizedState=g;else{a=m.next;var k=S=null,M=null,I=a,X=!1;do{var ee=I.lane&-536870913;if(ee!==I.lane?($e&ee)===ee:(Mr&ee)===ee){var H=I.revertLane;if(H===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),ee===Ba&&(X=!0);else if((Mr&H)===H){I=I.next,H===Ba&&(X=!0);continue}else ee={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(k=M=ee,S=g):M=M.next=ee,Ce.lanes|=H,di|=H;ee=I.action,Wi&&s(g,ee),g=I.hasEagerState?I.eagerState:s(g,ee)}else H={lane:ee,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(k=M=H,S=g):M=M.next=H,Ce.lanes|=ee,di|=ee;I=I.next}while(I!==null&&I!==a);if(M===null?S=g:M.next=k,!Tn(g,r.memoizedState)&&(Nt=!0,X&&(s=Ia,s!==null)))throw s;r.memoizedState=g,r.baseState=S,r.baseQueue=M,c.lastRenderedState=g}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function cd(r){var a=Tt(),s=a.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,g=a.memoizedState;if(m!==null){s.pending=null;var S=m=m.next;do g=r(g,S.action),S=S.next;while(S!==m);Tn(g,a.memoizedState)||(Nt=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,c]}function ix(r,a,s){var c=Ce,m=Tt(),g=Ue;if(g){if(s===void 0)throw Error(i(407));s=s()}else s=a();var S=!Tn((Qe||m).memoizedState,s);if(S&&(m.memoizedState=s,Nt=!0),m=m.queue,hd(sx.bind(null,c,m,r),[r]),m.getSnapshot!==a||S||jt!==null&&jt.memoizedState.tag&1){if(c.flags|=2048,Xa(9,{destroy:void 0},ox.bind(null,c,m,s,a),null),rt===null)throw Error(i(349));g||(Mr&127)!==0||ax(c,a,s)}return s}function ax(r,a,s){r.flags|=16384,r={getSnapshot:a,value:s},a=Ce.updateQueue,a===null?(a=ou(),Ce.updateQueue=a,a.stores=[r]):(s=a.stores,s===null?a.stores=[r]:s.push(r))}function ox(r,a,s,c){a.value=s,a.getSnapshot=c,lx(a)&&ux(r)}function sx(r,a,s){return s(function(){lx(a)&&ux(r)})}function lx(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!Tn(r,s)}catch{return!0}}function ux(r){var a=Hi(r,2);a!==null&&bn(a,r,2)}function fd(r){var a=ln();if(typeof r=="function"){var s=r;if(r=s(),Wi){hn(!0);try{s()}finally{hn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:r},a}function cx(r,a,s,c){return r.baseState=s,ud(r,Qe,typeof c=="function"?c:Dr)}function $T(r,a,s,c,m){if(fu(r))throw Error(i(485));if(r=a.action,r!==null){var g={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};P.T!==null?s(!0):g.isTransition=!1,c(g),s=a.pending,s===null?(g.next=a.pending=g,fx(a,g)):(g.next=s.next,a.pending=s.next=g)}}function fx(r,a){var s=a.action,c=a.payload,m=r.state;if(a.isTransition){var g=P.T,S={};P.T=S;try{var k=s(m,c),M=P.S;M!==null&&M(S,k),dx(r,a,k)}catch(I){dd(r,a,I)}finally{g!==null&&S.types!==null&&(g.types=S.types),P.T=g}}else try{g=s(m,c),dx(r,a,g)}catch(I){dd(r,a,I)}}function dx(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){hx(r,a,c)},function(c){return dd(r,a,c)}):hx(r,a,s)}function hx(r,a,s){a.status="fulfilled",a.value=s,mx(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,fx(r,s)))}function dd(r,a,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=s,mx(a),a=a.next;while(a!==c)}r.action=null}function mx(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function px(r,a){return a}function gx(r,a){if(Ue){var s=rt.formState;if(s!==null){e:{var c=Ce;if(Ue){if(ut){t:{for(var m=ut,g=qn;m.nodeType!==8;){if(!g){m=null;break t}if(m=Yn(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){ut=Yn(m.nextSibling),c=m.data==="F!";break e}}ri(c)}c=!1}c&&(a=s[0])}}return s=ln(),s.memoizedState=s.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:px,lastRenderedState:a},s.queue=c,s=Dx.bind(null,Ce,c),c.dispatch=s,c=fd(!1),g=xd.bind(null,Ce,!1,c.queue),c=ln(),m={state:a,dispatch:null,action:r,pending:null},c.queue=m,s=$T.bind(null,Ce,m,g,s),m.dispatch=s,c.memoizedState=r,[a,s,!1]}function yx(r){var a=Tt();return xx(a,Qe,r)}function xx(r,a,s){if(a=ud(r,a,px)[0],r=lu(Dr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=gs(a)}catch(S){throw S===Ha?Ql:S}else c=a;a=Tt();var m=a.queue,g=m.dispatch;return s!==a.memoizedState&&(Ce.flags|=2048,Xa(9,{destroy:void 0},LT.bind(null,m,s),null)),[c,g,r]}function LT(r,a){r.action=a}function vx(r){var a=Tt(),s=Qe;if(s!==null)return xx(a,s,r);Tt(),a=a.memoizedState,s=Tt();var c=s.queue.dispatch;return s.memoizedState=r,[a,c,!1]}function Xa(r,a,s,c){return r={tag:r,create:s,deps:c,inst:a,next:null},a=Ce.updateQueue,a===null&&(a=ou(),Ce.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,a.lastEffect=r),r}function bx(){return Tt().memoizedState}function uu(r,a,s,c){var m=ln();Ce.flags|=r,m.memoizedState=Xa(1|a,{destroy:void 0},s,c===void 0?null:c)}function cu(r,a,s,c){var m=Tt();c=c===void 0?null:c;var g=m.memoizedState.inst;Qe!==null&&c!==null&&rd(c,Qe.memoizedState.deps)?m.memoizedState=Xa(a,g,s,c):(Ce.flags|=r,m.memoizedState=Xa(1|a,g,s,c))}function Sx(r,a){uu(8390656,8,r,a)}function hd(r,a){cu(2048,8,r,a)}function UT(r){Ce.flags|=4;var a=Ce.updateQueue;if(a===null)a=ou(),Ce.updateQueue=a,a.events=[r];else{var s=a.events;s===null?a.events=[r]:s.push(r)}}function kx(r){var a=Tt().memoizedState;return UT({ref:a,nextImpl:r}),function(){if((He&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function wx(r,a){return cu(4,2,r,a)}function zx(r,a){return cu(4,4,r,a)}function _x(r,a){if(typeof a=="function"){r=r();var s=a(r);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function Ex(r,a,s){s=s!=null?s.concat([r]):null,cu(4,4,_x.bind(null,a,r),s)}function md(){}function Tx(r,a){var s=Tt();a=a===void 0?null:a;var c=s.memoizedState;return a!==null&&rd(a,c[1])?c[0]:(s.memoizedState=[r,a],r)}function Cx(r,a){var s=Tt();a=a===void 0?null:a;var c=s.memoizedState;if(a!==null&&rd(a,c[1]))return c[0];if(c=r(),Wi){hn(!0);try{r()}finally{hn(!1)}}return s.memoizedState=[c,a],c}function pd(r,a,s){return s===void 0||(Mr&1073741824)!==0&&($e&261930)===0?r.memoizedState=a:(r.memoizedState=s,r=Av(),Ce.lanes|=r,di|=r,s)}function Ax(r,a,s,c){return Tn(s,a)?s:qa.current!==null?(r=pd(r,s,c),Tn(r,a)||(Nt=!0),r):(Mr&42)===0||(Mr&1073741824)!==0&&($e&261930)===0?(Nt=!0,r.memoizedState=s):(r=Av(),Ce.lanes|=r,di|=r,a)}function jx(r,a,s,c,m){var g=Y.p;Y.p=g!==0&&8>g?g:8;var S=P.T,k={};P.T=k,xd(r,!1,a,s);try{var M=m(),I=P.S;if(I!==null&&I(k,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var X=RT(M,c);ys(r,a,X,Rn(r))}else ys(r,a,c,Rn(r))}catch(ee){ys(r,a,{then:function(){},status:"rejected",reason:ee},Rn())}finally{Y.p=g,S!==null&&k.types!==null&&(S.types=k.types),P.T=S}}function PT(){}function gd(r,a,s,c){if(r.tag!==5)throw Error(i(476));var m=Nx(r).queue;jx(r,m,a,Z,s===null?PT:function(){return Ox(r),s(c)})}function Nx(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:Z},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:s},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function Ox(r){var a=Nx(r);a.next===null&&(a=r.alternate.memoizedState),ys(r,a.next.queue,{},Rn())}function yd(){return Xt(Ms)}function Rx(){return Tt().memoizedState}function Mx(){return Tt().memoizedState}function VT(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var s=Rn();r=oi(s);var c=si(a,r,s);c!==null&&(bn(c,a,s),ds(c,a,s)),a={cache:qf()},r.payload=a;return}a=a.return}}function ZT(r,a,s){var c=Rn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},fu(r)?$x(a,s):(s=Df(r,a,s,c),s!==null&&(bn(s,r,c),Lx(s,a,c)))}function Dx(r,a,s){var c=Rn();ys(r,a,s,c)}function ys(r,a,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(fu(r))$x(a,m);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var S=a.lastRenderedState,k=g(S,s);if(m.hasEagerState=!0,m.eagerState=k,Tn(k,S))return Fl(r,a,m,0),rt===null&&Hl(),!1}catch{}if(s=Df(r,a,m,c),s!==null)return bn(s,r,c),Lx(s,a,c),!0}return!1}function xd(r,a,s,c){if(c={lane:2,revertLane:Kd(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},fu(r)){if(a)throw Error(i(479))}else a=Df(r,s,c,2),a!==null&&bn(a,r,2)}function fu(r){var a=r.alternate;return r===Ce||a!==null&&a===Ce}function $x(r,a){Ga=iu=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function Lx(r,a,s){if((s&4194048)!==0){var c=a.lanes;c&=r.pendingLanes,s|=c,a.lanes=s,Bg(r,s)}}var xs={readContext:Xt,use:su,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt};xs.useEffectEvent=kt;var Ux={readContext:Xt,use:su,useCallback:function(r,a){return ln().memoizedState=[r,a===void 0?null:a],r},useContext:Xt,useEffect:Sx,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,uu(4194308,4,_x.bind(null,a,r),s)},useLayoutEffect:function(r,a){return uu(4194308,4,r,a)},useInsertionEffect:function(r,a){uu(4,2,r,a)},useMemo:function(r,a){var s=ln();a=a===void 0?null:a;var c=r();if(Wi){hn(!0);try{r()}finally{hn(!1)}}return s.memoizedState=[c,a],c},useReducer:function(r,a,s){var c=ln();if(s!==void 0){var m=s(a);if(Wi){hn(!0);try{s(a)}finally{hn(!1)}}}else m=a;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=ZT.bind(null,Ce,r),[c.memoizedState,r]},useRef:function(r){var a=ln();return r={current:r},a.memoizedState=r},useState:function(r){r=fd(r);var a=r.queue,s=Dx.bind(null,Ce,a);return a.dispatch=s,[r.memoizedState,s]},useDebugValue:md,useDeferredValue:function(r,a){var s=ln();return pd(s,r,a)},useTransition:function(){var r=fd(!1);return r=jx.bind(null,Ce,r.queue,!0,!1),ln().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,s){var c=Ce,m=ln();if(Ue){if(s===void 0)throw Error(i(407));s=s()}else{if(s=a(),rt===null)throw Error(i(349));($e&127)!==0||ax(c,a,s)}m.memoizedState=s;var g={value:s,getSnapshot:a};return m.queue=g,Sx(sx.bind(null,c,g,r),[r]),c.flags|=2048,Xa(9,{destroy:void 0},ox.bind(null,c,g,s,a),null),s},useId:function(){var r=ln(),a=rt.identifierPrefix;if(Ue){var s=pr,c=mr;s=(c&~(1<<32-nt(c)-1)).toString(32)+s,a="_"+a+"R_"+s,s=au++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=MT++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:yd,useFormState:gx,useActionState:gx,useOptimistic:function(r){var a=ln();a.memoizedState=a.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=xd.bind(null,Ce,!0,s),s.dispatch=a,[r,a]},useMemoCache:ld,useCacheRefresh:function(){return ln().memoizedState=VT.bind(null,Ce)},useEffectEvent:function(r){var a=ln(),s={impl:r};return a.memoizedState=s,function(){if((He&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}},vd={readContext:Xt,use:su,useCallback:Tx,useContext:Xt,useEffect:hd,useImperativeHandle:Ex,useInsertionEffect:wx,useLayoutEffect:zx,useMemo:Cx,useReducer:lu,useRef:bx,useState:function(){return lu(Dr)},useDebugValue:md,useDeferredValue:function(r,a){var s=Tt();return Ax(s,Qe.memoizedState,r,a)},useTransition:function(){var r=lu(Dr)[0],a=Tt().memoizedState;return[typeof r=="boolean"?r:gs(r),a]},useSyncExternalStore:ix,useId:Rx,useHostTransitionStatus:yd,useFormState:yx,useActionState:yx,useOptimistic:function(r,a){var s=Tt();return cx(s,Qe,r,a)},useMemoCache:ld,useCacheRefresh:Mx};vd.useEffectEvent=kx;var Px={readContext:Xt,use:su,useCallback:Tx,useContext:Xt,useEffect:hd,useImperativeHandle:Ex,useInsertionEffect:wx,useLayoutEffect:zx,useMemo:Cx,useReducer:cd,useRef:bx,useState:function(){return cd(Dr)},useDebugValue:md,useDeferredValue:function(r,a){var s=Tt();return Qe===null?pd(s,r,a):Ax(s,Qe.memoizedState,r,a)},useTransition:function(){var r=cd(Dr)[0],a=Tt().memoizedState;return[typeof r=="boolean"?r:gs(r),a]},useSyncExternalStore:ix,useId:Rx,useHostTransitionStatus:yd,useFormState:vx,useActionState:vx,useOptimistic:function(r,a){var s=Tt();return Qe!==null?cx(s,Qe,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:ld,useCacheRefresh:Mx};Px.useEffectEvent=kx;function bd(r,a,s,c){a=r.memoizedState,s=s(c,a),s=s==null?a:y({},a,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var Sd={enqueueSetState:function(r,a,s){r=r._reactInternals;var c=Rn(),m=oi(c);m.payload=a,s!=null&&(m.callback=s),a=si(r,m,c),a!==null&&(bn(a,r,c),ds(a,r,c))},enqueueReplaceState:function(r,a,s){r=r._reactInternals;var c=Rn(),m=oi(c);m.tag=1,m.payload=a,s!=null&&(m.callback=s),a=si(r,m,c),a!==null&&(bn(a,r,c),ds(a,r,c))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var s=Rn(),c=oi(s);c.tag=2,a!=null&&(c.callback=a),a=si(r,c,s),a!==null&&(bn(a,r,s),ds(a,r,s))}};function Vx(r,a,s,c,m,g,S){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,g,S):a.prototype&&a.prototype.isPureReactComponent?!is(s,c)||!is(m,g):!0}function Zx(r,a,s,c){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,c),a.state!==r&&Sd.enqueueReplaceState(a,a.state,null)}function ea(r,a){var s=a;if("ref"in a){s={};for(var c in a)c!=="ref"&&(s[c]=a[c])}if(r=r.defaultProps){s===a&&(s=y({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function Bx(r){Il(r)}function Ix(r){console.error(r)}function Hx(r){Il(r)}function du(r,a){try{var s=r.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function Fx(r,a,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function kd(r,a,s){return s=oi(s),s.tag=3,s.payload={element:null},s.callback=function(){du(r,a)},s}function qx(r){return r=oi(r),r.tag=3,r}function Gx(r,a,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var g=c.value;r.payload=function(){return m(g)},r.callback=function(){Fx(a,s,c)}}var S=s.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(r.callback=function(){Fx(a,s,c),typeof m!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function BT(r,a,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=s.alternate,a!==null&&Za(a,s,m,!0),s=An.current,s!==null){switch(s.tag){case 31:case 13:return Gn===null?zu():s.alternate===null&&wt===0&&(wt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===Wl?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([c]):a.add(c),Gd(r,c,m)),!1;case 22:return s.flags|=65536,c===Wl?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([c]):s.add(c)),Gd(r,c,m)),!1}throw Error(i(435,s.tag))}return Gd(r,c,m),zu(),!1}if(Ue)return a=An.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,c!==Zf&&(r=Error(i(422),{cause:c}),ss(In(r,s)))):(c!==Zf&&(a=Error(i(423),{cause:c}),ss(In(a,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=In(c,s),m=kd(r.stateNode,c,m),Qf(r,m),wt!==4&&(wt=2)),!1;var g=Error(i(520),{cause:c});if(g=In(g,s),Es===null?Es=[g]:Es.push(g),wt!==4&&(wt=2),a===null)return!0;c=In(c,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=kd(s.stateNode,c,r),Qf(s,r),!1;case 1:if(a=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(hi===null||!hi.has(g))))return s.flags|=65536,m&=-m,s.lanes|=m,m=qx(m),Gx(m,r,s,c),Qf(s,m),!1}s=s.return}while(s!==null);return!1}var wd=Error(i(461)),Nt=!1;function Kt(r,a,s,c){a.child=r===null?Jy(a,null,s,c):Qi(a,r.child,s,c)}function Yx(r,a,s,c,m){s=s.render;var g=a.ref;if("ref"in c){var S={};for(var k in c)k!=="ref"&&(S[k]=c[k])}else S=c;return Yi(a),c=id(r,a,s,S,g,m),k=ad(),r!==null&&!Nt?(od(r,a,m),$r(r,a,m)):(Ue&&k&&Pf(a),a.flags|=1,Kt(r,a,c,m),a.child)}function Xx(r,a,s,c,m){if(r===null){var g=s.type;return typeof g=="function"&&!$f(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,Kx(r,a,g,c,m)):(r=Gl(s.type,null,c,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!Nd(r,m)){var S=g.memoizedProps;if(s=s.compare,s=s!==null?s:is,s(S,c)&&r.ref===a.ref)return $r(r,a,m)}return a.flags|=1,r=jr(g,c),r.ref=a.ref,r.return=a,a.child=r}function Kx(r,a,s,c,m){if(r!==null){var g=r.memoizedProps;if(is(g,c)&&r.ref===a.ref)if(Nt=!1,a.pendingProps=c=g,Nd(r,m))(r.flags&131072)!==0&&(Nt=!0);else return a.lanes=r.lanes,$r(r,a,m)}return zd(r,a,s,c,m)}function Jx(r,a,s,c){var m=c.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,r!==null){for(c=a.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~g}else c=0,a.child=null;return Qx(r,a,g,s,c)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Jl(a,g!==null?g.cachePool:null),g!==null?ex(a,g):ed(),tx(a);else return c=a.lanes=536870912,Qx(r,a,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(Jl(a,g.cachePool),ex(a,g),ui(),a.memoizedState=null):(r!==null&&Jl(a,null),ed(),ui());return Kt(r,a,m,s),a.child}function vs(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Qx(r,a,s,c,m){var g=Yf();return g=g===null?null:{parent:At._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},r!==null&&Jl(a,null),ed(),tx(a),r!==null&&Za(r,a,c,!0),a.childLanes=m,null}function hu(r,a){return a=pu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function Wx(r,a,s){return Qi(a,r.child,null,s),r=hu(a,a.pendingProps),r.flags|=2,jn(a),a.memoizedState=null,r}function IT(r,a,s){var c=a.pendingProps,m=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Ue){if(c.mode==="hidden")return r=hu(a,c),a.lanes=536870912,vs(null,r);if(nd(a),(r=ut)?(r=fb(r,qn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ti!==null?{id:mr,overflow:pr}:null,retryLane:536870912,hydrationErrors:null},s=$y(r),s.return=a,a.child=s,Yt=a,ut=null)):r=null,r===null)throw ri(a);return a.lanes=536870912,null}return hu(a,c)}var g=r.memoizedState;if(g!==null){var S=g.dehydrated;if(nd(a),m)if(a.flags&256)a.flags&=-257,a=Wx(r,a,s);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Nt||Za(r,a,s,!1),m=(s&r.childLanes)!==0,Nt||m){if(c=rt,c!==null&&(S=Ig(c,s),S!==0&&S!==g.retryLane))throw g.retryLane=S,Hi(r,S),bn(c,r,S),wd;zu(),a=Wx(r,a,s)}else r=g.treeContext,ut=Yn(S.nextSibling),Yt=a,Ue=!0,ni=null,qn=!1,r!==null&&Py(a,r),a=hu(a,c),a.flags|=4096;return a}return r=jr(r.child,{mode:c.mode,children:c.children}),r.ref=a.ref,a.child=r,r.return=a,r}function mu(r,a){var s=a.ref;if(s===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(i(284));(r===null||r.ref!==s)&&(a.flags|=4194816)}}function zd(r,a,s,c,m){return Yi(a),s=id(r,a,s,c,void 0,m),c=ad(),r!==null&&!Nt?(od(r,a,m),$r(r,a,m)):(Ue&&c&&Pf(a),a.flags|=1,Kt(r,a,s,m),a.child)}function ev(r,a,s,c,m,g){return Yi(a),a.updateQueue=null,s=rx(a,c,s,m),nx(r),c=ad(),r!==null&&!Nt?(od(r,a,g),$r(r,a,g)):(Ue&&c&&Pf(a),a.flags|=1,Kt(r,a,s,g),a.child)}function tv(r,a,s,c,m){if(Yi(a),a.stateNode===null){var g=La,S=s.contextType;typeof S=="object"&&S!==null&&(g=Xt(S)),g=new s(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Sd,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Kf(a),S=s.contextType,g.context=typeof S=="object"&&S!==null?Xt(S):La,g.state=a.memoizedState,S=s.getDerivedStateFromProps,typeof S=="function"&&(bd(a,s,S,c),g.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&Sd.enqueueReplaceState(g,g.state,null),ms(a,c,g,m),hs(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(r===null){g=a.stateNode;var k=a.memoizedProps,M=ea(s,k);g.props=M;var I=g.context,X=s.contextType;S=La,typeof X=="object"&&X!==null&&(S=Xt(X));var ee=s.getDerivedStateFromProps;X=typeof ee=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=a.pendingProps!==k,X||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||I!==S)&&Zx(a,g,c,S),ai=!1;var H=a.memoizedState;g.state=H,ms(a,c,g,m),hs(),I=a.memoizedState,k||H!==I||ai?(typeof ee=="function"&&(bd(a,s,ee,c),I=a.memoizedState),(M=ai||Vx(a,s,M,c,H,I,S))?(X||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=I),g.props=c,g.state=I,g.context=S,c=M):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,Jf(r,a),S=a.memoizedProps,X=ea(s,S),g.props=X,ee=a.pendingProps,H=g.context,I=s.contextType,M=La,typeof I=="object"&&I!==null&&(M=Xt(I)),k=s.getDerivedStateFromProps,(I=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==ee||H!==M)&&Zx(a,g,c,M),ai=!1,H=a.memoizedState,g.state=H,ms(a,c,g,m),hs();var F=a.memoizedState;S!==ee||H!==F||ai||r!==null&&r.dependencies!==null&&Xl(r.dependencies)?(typeof k=="function"&&(bd(a,s,k,c),F=a.memoizedState),(X=ai||Vx(a,s,X,c,H,F,M)||r!==null&&r.dependencies!==null&&Xl(r.dependencies))?(I||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,F,M),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,F,M)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=F),g.props=c,g.state=F,g.context=M,c=X):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=1024),c=!1)}return g=c,mu(r,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&c?(a.child=Qi(a,r.child,null,m),a.child=Qi(a,null,s,m)):Kt(r,a,s,m),a.memoizedState=g.state,r=a.child):r=$r(r,a,m),r}function nv(r,a,s,c){return qi(),a.flags|=256,Kt(r,a,s,c),a.child}var _d={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ed(r){return{baseLanes:r,cachePool:Fy()}}function Td(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=On),r}function rv(r,a,s){var c=a.pendingProps,m=!1,g=(a.flags&128)!==0,S;if((S=g)||(S=r!==null&&r.memoizedState===null?!1:(Et.current&2)!==0),S&&(m=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,r===null){if(Ue){if(m?li(a):ui(),(r=ut)?(r=fb(r,qn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ti!==null?{id:mr,overflow:pr}:null,retryLane:536870912,hydrationErrors:null},s=$y(r),s.return=a,a.child=s,Yt=a,ut=null)):r=null,r===null)throw ri(a);return uh(r)?a.lanes=32:a.lanes=536870912,null}var k=c.children;return c=c.fallback,m?(ui(),m=a.mode,k=pu({mode:"hidden",children:k},m),c=Fi(c,m,s,null),k.return=a,c.return=a,k.sibling=c,a.child=k,c=a.child,c.memoizedState=Ed(s),c.childLanes=Td(r,S,s),a.memoizedState=_d,vs(null,c)):(li(a),Cd(a,k))}var M=r.memoizedState;if(M!==null&&(k=M.dehydrated,k!==null)){if(g)a.flags&256?(li(a),a.flags&=-257,a=Ad(r,a,s)):a.memoizedState!==null?(ui(),a.child=r.child,a.flags|=128,a=null):(ui(),k=c.fallback,m=a.mode,c=pu({mode:"visible",children:c.children},m),k=Fi(k,m,s,null),k.flags|=2,c.return=a,k.return=a,c.sibling=k,a.child=c,Qi(a,r.child,null,s),c=a.child,c.memoizedState=Ed(s),c.childLanes=Td(r,S,s),a.memoizedState=_d,a=vs(null,c));else if(li(a),uh(k)){if(S=k.nextSibling&&k.nextSibling.dataset,S)var I=S.dgst;S=I,c=Error(i(419)),c.stack="",c.digest=S,ss({value:c,source:null,stack:null}),a=Ad(r,a,s)}else if(Nt||Za(r,a,s,!1),S=(s&r.childLanes)!==0,Nt||S){if(S=rt,S!==null&&(c=Ig(S,s),c!==0&&c!==M.retryLane))throw M.retryLane=c,Hi(r,c),bn(S,r,c),wd;lh(k)||zu(),a=Ad(r,a,s)}else lh(k)?(a.flags|=192,a.child=r.child,a=null):(r=M.treeContext,ut=Yn(k.nextSibling),Yt=a,Ue=!0,ni=null,qn=!1,r!==null&&Py(a,r),a=Cd(a,c.children),a.flags|=4096);return a}return m?(ui(),k=c.fallback,m=a.mode,M=r.child,I=M.sibling,c=jr(M,{mode:"hidden",children:c.children}),c.subtreeFlags=M.subtreeFlags&65011712,I!==null?k=jr(I,k):(k=Fi(k,m,s,null),k.flags|=2),k.return=a,c.return=a,c.sibling=k,a.child=c,vs(null,c),c=a.child,k=r.child.memoizedState,k===null?k=Ed(s):(m=k.cachePool,m!==null?(M=At._currentValue,m=m.parent!==M?{parent:M,pool:M}:m):m=Fy(),k={baseLanes:k.baseLanes|s,cachePool:m}),c.memoizedState=k,c.childLanes=Td(r,S,s),a.memoizedState=_d,vs(r.child,c)):(li(a),s=r.child,r=s.sibling,s=jr(s,{mode:"visible",children:c.children}),s.return=a,s.sibling=null,r!==null&&(S=a.deletions,S===null?(a.deletions=[r],a.flags|=16):S.push(r)),a.child=s,a.memoizedState=null,s)}function Cd(r,a){return a=pu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function pu(r,a){return r=Cn(22,r,null,a),r.lanes=0,r}function Ad(r,a,s){return Qi(a,r.child,null,s),r=Cd(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function iv(r,a,s){r.lanes|=a;var c=r.alternate;c!==null&&(c.lanes|=a),Hf(r.return,a,s)}function jd(r,a,s,c,m,g){var S=r.memoizedState;S===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:g}:(S.isBackwards=a,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=s,S.tailMode=m,S.treeForkCount=g)}function av(r,a,s){var c=a.pendingProps,m=c.revealOrder,g=c.tail;c=c.children;var S=Et.current,k=(S&2)!==0;if(k?(S=S&1|2,a.flags|=128):S&=1,w(Et,S),Kt(r,a,c,s),c=Ue?os:0,!k&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&iv(r,s,a);else if(r.tag===19)iv(r,s,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=a.child,m=null;s!==null;)r=s.alternate,r!==null&&ru(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=a.child,a.child=null):(m=s.sibling,s.sibling=null),jd(a,!1,m,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=a.child,a.child=null;m!==null;){if(r=m.alternate,r!==null&&ru(r)===null){a.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}jd(a,!0,s,null,g,c);break;case"together":jd(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function $r(r,a,s){if(r!==null&&(a.dependencies=r.dependencies),di|=a.lanes,(s&a.childLanes)===0)if(r!==null){if(Za(r,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,s=jr(r,r.pendingProps),a.child=s,s.return=a;r.sibling!==null;)r=r.sibling,s=s.sibling=jr(r,r.pendingProps),s.return=a;s.sibling=null}return a.child}function Nd(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Xl(r)))}function HT(r,a,s){switch(a.tag){case 3:Ge(a,a.stateNode.containerInfo),ii(a,At,r.memoizedState.cache),qi();break;case 27:case 5:Ct(a);break;case 4:Ge(a,a.stateNode.containerInfo);break;case 10:ii(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,nd(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(li(a),a.flags|=128,null):(s&a.child.childLanes)!==0?rv(r,a,s):(li(a),r=$r(r,a,s),r!==null?r.sibling:null);li(a);break;case 19:var m=(r.flags&128)!==0;if(c=(s&a.childLanes)!==0,c||(Za(r,a,s,!1),c=(s&a.childLanes)!==0),m){if(c)return av(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),w(Et,Et.current),c)break;return null;case 22:return a.lanes=0,Jx(r,a,s,a.pendingProps);case 24:ii(a,At,r.memoizedState.cache)}return $r(r,a,s)}function ov(r,a,s){if(r!==null)if(r.memoizedProps!==a.pendingProps)Nt=!0;else{if(!Nd(r,s)&&(a.flags&128)===0)return Nt=!1,HT(r,a,s);Nt=(r.flags&131072)!==0}else Nt=!1,Ue&&(a.flags&1048576)!==0&&Uy(a,os,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(r=Ki(a.elementType),a.type=r,typeof r=="function")$f(r)?(c=ea(r,c),a.tag=1,a=tv(null,a,r,c,s)):(a.tag=0,a=zd(null,a,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===R){a.tag=11,a=Yx(null,a,r,c,s);break e}else if(m===G){a.tag=14,a=Xx(null,a,r,c,s);break e}}throw a=le(r)||r,Error(i(306,a,""))}}return a;case 0:return zd(r,a,a.type,a.pendingProps,s);case 1:return c=a.type,m=ea(c,a.pendingProps),tv(r,a,c,m,s);case 3:e:{if(Ge(a,a.stateNode.containerInfo),r===null)throw Error(i(387));c=a.pendingProps;var g=a.memoizedState;m=g.element,Jf(r,a),ms(a,c,null,s);var S=a.memoizedState;if(c=S.cache,ii(a,At,c),c!==g.cache&&Ff(a,[At],s,!0),hs(),c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=nv(r,a,c,s);break e}else if(c!==m){m=In(Error(i(424)),a),ss(m),a=nv(r,a,c,s);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,ut=Yn(r.firstChild),Yt=a,Ue=!0,ni=null,qn=!0,s=Jy(a,null,c,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(qi(),c===m){a=$r(r,a,s);break e}Kt(r,a,c,s)}a=a.child}return a;case 26:return mu(r,a),r===null?(s=yb(a.type,null,a.pendingProps,null))?a.memoizedState=s:Ue||(s=a.type,r=a.pendingProps,c=Nu(pe.current).createElement(s),c[Gt]=a,c[mn]=r,Jt(c,s,r),Ft(c),a.stateNode=c):a.memoizedState=yb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Ct(a),r===null&&Ue&&(c=a.stateNode=mb(a.type,a.pendingProps,pe.current),Yt=a,qn=!0,m=ut,yi(a.type)?(ch=m,ut=Yn(c.firstChild)):ut=m),Kt(r,a,a.pendingProps.children,s),mu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ue&&((m=c=ut)&&(c=b2(c,a.type,a.pendingProps,qn),c!==null?(a.stateNode=c,Yt=a,ut=Yn(c.firstChild),qn=!1,m=!0):m=!1),m||ri(a)),Ct(a),m=a.type,g=a.pendingProps,S=r!==null?r.memoizedProps:null,c=g.children,ah(m,g)?c=null:S!==null&&ah(m,S)&&(a.flags|=32),a.memoizedState!==null&&(m=id(r,a,DT,null,null,s),Ms._currentValue=m),mu(r,a),Kt(r,a,c,s),a.child;case 6:return r===null&&Ue&&((r=s=ut)&&(s=S2(s,a.pendingProps,qn),s!==null?(a.stateNode=s,Yt=a,ut=null,r=!0):r=!1),r||ri(a)),null;case 13:return rv(r,a,s);case 4:return Ge(a,a.stateNode.containerInfo),c=a.pendingProps,r===null?a.child=Qi(a,null,c,s):Kt(r,a,c,s),a.child;case 11:return Yx(r,a,a.type,a.pendingProps,s);case 7:return Kt(r,a,a.pendingProps,s),a.child;case 8:return Kt(r,a,a.pendingProps.children,s),a.child;case 12:return Kt(r,a,a.pendingProps.children,s),a.child;case 10:return c=a.pendingProps,ii(a,a.type,c.value),Kt(r,a,c.children,s),a.child;case 9:return m=a.type._context,c=a.pendingProps.children,Yi(a),m=Xt(m),c=c(m),a.flags|=1,Kt(r,a,c,s),a.child;case 14:return Xx(r,a,a.type,a.pendingProps,s);case 15:return Kx(r,a,a.type,a.pendingProps,s);case 19:return av(r,a,s);case 31:return IT(r,a,s);case 22:return Jx(r,a,s,a.pendingProps);case 24:return Yi(a),c=Xt(At),r===null?(m=Yf(),m===null&&(m=rt,g=qf(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),a.memoizedState={parent:c,cache:m},Kf(a),ii(a,At,m)):((r.lanes&s)!==0&&(Jf(r,a),ms(a,null,null,s),hs()),m=r.memoizedState,g=a.memoizedState,m.parent!==c?(m={parent:c,cache:c},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),ii(a,At,c)):(c=g.cache,ii(a,At,c),c!==m.cache&&Ff(a,[At],s,!0))),Kt(r,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Lr(r){r.flags|=4}function Od(r,a,s,c,m){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(Rv())r.flags|=8192;else throw Ji=Wl,Xf}else r.flags&=-16777217}function sv(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!kb(a))if(Rv())r.flags|=8192;else throw Ji=Wl,Xf}function gu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Vg():536870912,r.lanes|=a,Wa|=a)}function bs(r,a){if(!Ue)switch(r.tailMode){case"hidden":a=r.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function ct(r){var a=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(a)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=s,a}function FT(r,a,s){var c=a.pendingProps;switch(Vf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(a),null;case 1:return ct(a),null;case 3:return s=a.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Rr(At),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Va(a)?Lr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Bf())),ct(a),null;case 26:var m=a.type,g=a.memoizedState;return r===null?(Lr(a),g!==null?(ct(a),sv(a,g)):(ct(a),Od(a,m,null,c,s))):g?g!==r.memoizedState?(Lr(a),ct(a),sv(a,g)):(ct(a),a.flags&=-16777217):(r=r.memoizedProps,r!==c&&Lr(a),ct(a),Od(a,m,r,c,s)),null;case 27:if(an(a),s=pe.current,m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return ct(a),null}r=ie.current,Va(a)?Vy(a):(r=mb(m,c,s),a.stateNode=r,Lr(a))}return ct(a),null;case 5:if(an(a),m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return ct(a),null}if(g=ie.current,Va(a))Vy(a);else{var S=Nu(pe.current);switch(g){case 1:g=S.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:g=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":g=S.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":g=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":g=S.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?S.createElement(m,{is:c.is}):S.createElement(m)}}g[Gt]=a,g[mn]=c;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)g.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=g;e:switch(Jt(g,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Lr(a)}}return ct(a),Od(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,s),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(r=pe.current,Va(a)){if(r=a.stateNode,s=a.memoizedProps,c=null,m=Yt,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[Gt]=a,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||rb(r.nodeValue,s)),r||ri(a,!0)}else r=Nu(r).createTextNode(c),r[Gt]=a,a.stateNode=r}return ct(a),null;case 31:if(s=a.memoizedState,r===null||r.memoizedState!==null){if(c=Va(a),s!==null){if(r===null){if(!c)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Gt]=a}else qi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),r=!1}else s=Bf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return a.flags&256?(jn(a),a):(jn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return ct(a),null;case 13:if(c=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Va(a),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(i(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(i(317));m[Gt]=a}else qi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),m=!1}else m=Bf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(jn(a),a):(jn(a),null)}return jn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=a.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==m&&(c.flags|=2048)),s!==r&&s&&(a.child.flags|=8192),gu(a,a.updateQueue),ct(a),null);case 4:return De(),r===null&&eh(a.stateNode.containerInfo),ct(a),null;case 10:return Rr(a.type),ct(a),null;case 19:if(q(Et),c=a.memoizedState,c===null)return ct(a),null;if(m=(a.flags&128)!==0,g=c.rendering,g===null)if(m)bs(c,!1);else{if(wt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=ru(r),g!==null){for(a.flags|=128,bs(c,!1),r=g.updateQueue,a.updateQueue=r,gu(a,r),a.subtreeFlags=0,r=s,s=a.child;s!==null;)Dy(s,r),s=s.sibling;return w(Et,Et.current&1|2),Ue&&Nr(a,c.treeForkCount),a.child}r=r.sibling}c.tail!==null&<()>Su&&(a.flags|=128,m=!0,bs(c,!1),a.lanes=4194304)}else{if(!m)if(r=ru(g),r!==null){if(a.flags|=128,m=!0,r=r.updateQueue,a.updateQueue=r,gu(a,r),bs(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Ue)return ct(a),null}else 2*lt()-c.renderingStartTime>Su&&s!==536870912&&(a.flags|=128,m=!0,bs(c,!1),a.lanes=4194304);c.isBackwards?(g.sibling=a.child,a.child=g):(r=c.last,r!==null?r.sibling=g:a.child=g,c.last=g)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=lt(),r.sibling=null,s=Et.current,w(Et,m?s&1|2:s&1),Ue&&Nr(a,c.treeForkCount),r):(ct(a),null);case 22:case 23:return jn(a),td(),c=a.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(s&536870912)!==0&&(a.flags&128)===0&&(ct(a),a.subtreeFlags&6&&(a.flags|=8192)):ct(a),s=a.updateQueue,s!==null&&gu(a,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==s&&(a.flags|=2048),r!==null&&q(Xi),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Rr(At),ct(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function qT(r,a){switch(Vf(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Rr(At),De(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return an(a),null;case 31:if(a.memoizedState!==null){if(jn(a),a.alternate===null)throw Error(i(340));qi()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(jn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));qi()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return q(Et),null;case 4:return De(),null;case 10:return Rr(a.type),null;case 22:case 23:return jn(a),td(),r!==null&&q(Xi),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Rr(At),null;case 25:return null;default:return null}}function lv(r,a){switch(Vf(a),a.tag){case 3:Rr(At),De();break;case 26:case 27:case 5:an(a);break;case 4:De();break;case 31:a.memoizedState!==null&&jn(a);break;case 13:jn(a);break;case 19:q(Et);break;case 10:Rr(a.type);break;case 22:case 23:jn(a),td(),r!==null&&q(Xi);break;case 24:Rr(At)}}function Ss(r,a){try{var s=a.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&r)===r){c=void 0;var g=s.create,S=s.inst;c=g(),S.destroy=c}s=s.next}while(s!==m)}}catch(k){Xe(a,a.return,k)}}function ci(r,a,s){try{var c=a.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var g=m.next;c=g;do{if((c.tag&r)===r){var S=c.inst,k=S.destroy;if(k!==void 0){S.destroy=void 0,m=a;var M=s,I=k;try{I()}catch(X){Xe(m,M,X)}}}c=c.next}while(c!==g)}}catch(X){Xe(a,a.return,X)}}function uv(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{Wy(a,s)}catch(c){Xe(r,r.return,c)}}}function cv(r,a,s){s.props=ea(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){Xe(r,a,c)}}function ks(r,a){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof s=="function"?r.refCleanup=s(c):s.current=c}}catch(m){Xe(r,a,m)}}function gr(r,a){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Xe(r,a,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Xe(r,a,m)}else s.current=null}function fv(r){var a=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){Xe(r,r.return,m)}}function Rd(r,a,s){try{var c=r.stateNode;m2(c,r.type,s,a),c[mn]=a}catch(m){Xe(r,r.return,m)}}function dv(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&yi(r.type)||r.tag===4}function Md(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||dv(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.tag===27&&yi(r.type)||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,a,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(r),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=Cr));else if(c!==4&&(c===27&&yi(r.type)&&(s=r.stateNode,a=null),r=r.child,r!==null))for(Dd(r,a,s),r=r.sibling;r!==null;)Dd(r,a,s),r=r.sibling}function yu(r,a,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?s.insertBefore(r,a):s.appendChild(r);else if(c!==4&&(c===27&&yi(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(yu(r,a,s),r=r.sibling;r!==null;)yu(r,a,s),r=r.sibling}function hv(r){var a=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);Jt(a,c,s),a[Gt]=r,a[mn]=s}catch(g){Xe(r,r.return,g)}}var Ur=!1,Ot=!1,$d=!1,mv=typeof WeakSet=="function"?WeakSet:Set,qt=null;function GT(r,a){if(r=r.containerInfo,rh=Uu,r=Ey(r),Af(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var S=0,k=-1,M=-1,I=0,X=0,ee=r,H=null;t:for(;;){for(var F;ee!==s||m!==0&&ee.nodeType!==3||(k=S+m),ee!==g||c!==0&&ee.nodeType!==3||(M=S+c),ee.nodeType===3&&(S+=ee.nodeValue.length),(F=ee.firstChild)!==null;)H=ee,ee=F;for(;;){if(ee===r)break t;if(H===s&&++I===m&&(k=S),H===g&&++X===c&&(M=S),(F=ee.nextSibling)!==null)break;ee=H,H=ee.parentNode}ee=F}s=k===-1||M===-1?null:{start:k,end:M}}else s=null}s=s||{start:0,end:0}}else s=null;for(ih={focusedElem:r,selectionRange:s},Uu=!1,qt=a;qt!==null;)if(a=qt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,qt=r;else for(;qt!==null;){switch(a=qt,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,s=a,m=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var fe=ea(s.type,m);r=c.getSnapshotBeforeUpdate(fe,g),c.__reactInternalSnapshotBeforeUpdate=r}catch(we){Xe(s,s.return,we)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,s=r.nodeType,s===9)sh(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":sh(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,qt=r;break}qt=a.return}}function pv(r,a,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Vr(r,s),c&4&&Ss(5,s);break;case 1:if(Vr(r,s),c&4)if(r=s.stateNode,a===null)try{r.componentDidMount()}catch(S){Xe(s,s.return,S)}else{var m=ea(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(S){Xe(s,s.return,S)}}c&64&&uv(s),c&512&&ks(s,s.return);break;case 3:if(Vr(r,s),c&64&&(r=s.updateQueue,r!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Wy(r,a)}catch(S){Xe(s,s.return,S)}}break;case 27:a===null&&c&4&&hv(s);case 26:case 5:Vr(r,s),a===null&&c&4&&fv(s),c&512&&ks(s,s.return);break;case 12:Vr(r,s);break;case 31:Vr(r,s),c&4&&xv(r,s);break;case 13:Vr(r,s),c&4&&vv(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=n2.bind(null,s),k2(r,s))));break;case 22:if(c=s.memoizedState!==null||Ur,!c){a=a!==null&&a.memoizedState!==null||Ot,m=Ur;var g=Ot;Ur=c,(Ot=a)&&!g?Zr(r,s,(s.subtreeFlags&8772)!==0):Vr(r,s),Ur=m,Ot=g}break;case 30:break;default:Vr(r,s)}}function gv(r){var a=r.alternate;a!==null&&(r.alternate=null,gv(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&df(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var dt=null,gn=!1;function Pr(r,a,s){for(s=s.child;s!==null;)yv(r,a,s),s=s.sibling}function yv(r,a,s){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(sn,s)}catch{}switch(s.tag){case 26:Ot||gr(s,a),Pr(r,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ot||gr(s,a);var c=dt,m=gn;yi(s.type)&&(dt=s.stateNode,gn=!1),Pr(r,a,s),Ns(s.stateNode),dt=c,gn=m;break;case 5:Ot||gr(s,a);case 6:if(c=dt,m=gn,dt=null,Pr(r,a,s),dt=c,gn=m,dt!==null)if(gn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(s.stateNode)}catch(g){Xe(s,a,g)}else try{dt.removeChild(s.stateNode)}catch(g){Xe(s,a,g)}break;case 18:dt!==null&&(gn?(r=dt,ub(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),so(r)):ub(dt,s.stateNode));break;case 4:c=dt,m=gn,dt=s.stateNode.containerInfo,gn=!0,Pr(r,a,s),dt=c,gn=m;break;case 0:case 11:case 14:case 15:ci(2,s,a),Ot||ci(4,s,a),Pr(r,a,s);break;case 1:Ot||(gr(s,a),c=s.stateNode,typeof c.componentWillUnmount=="function"&&cv(s,a,c)),Pr(r,a,s);break;case 21:Pr(r,a,s);break;case 22:Ot=(c=Ot)||s.memoizedState!==null,Pr(r,a,s),Ot=c;break;default:Pr(r,a,s)}}function xv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{so(r)}catch(s){Xe(a,a.return,s)}}}function vv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{so(r)}catch(s){Xe(a,a.return,s)}}function YT(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new mv),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new mv),a;default:throw Error(i(435,r.tag))}}function xu(r,a){var s=YT(r);a.forEach(function(c){if(!s.has(c)){s.add(c);var m=r2.bind(null,r,c);c.then(m,m)}})}function yn(r,a){var s=a.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],g=r,S=a,k=S;e:for(;k!==null;){switch(k.tag){case 27:if(yi(k.type)){dt=k.stateNode,gn=!1;break e}break;case 5:dt=k.stateNode,gn=!1;break e;case 3:case 4:dt=k.stateNode.containerInfo,gn=!0;break e}k=k.return}if(dt===null)throw Error(i(160));yv(g,S,m),dt=null,gn=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)bv(a,r),a=a.sibling}var or=null;function bv(r,a){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:yn(a,r),xn(r),c&4&&(ci(3,r,r.return),Ss(3,r),ci(5,r,r.return));break;case 1:yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),c&64&&Ur&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=or;if(yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),c&4){var g=s!==null?s.memoizedState:null;if(c=r.memoizedState,s===null)if(c===null)if(r.stateNode===null){e:{c=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":g=m.getElementsByTagName("title")[0],(!g||g[Xo]||g[Gt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(c),m.head.insertBefore(g,m.querySelector("head > title"))),Jt(g,c,s),g[Gt]=r,Ft(g),c=g;break e;case"link":var S=bb("link","href",m).get(c+(s.href||""));if(S){for(var k=0;k<S.length;k++)if(g=S[k],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){S.splice(k,1);break t}}g=m.createElement(c),Jt(g,c,s),m.head.appendChild(g);break;case"meta":if(S=bb("meta","content",m).get(c+(s.content||""))){for(k=0;k<S.length;k++)if(g=S[k],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){S.splice(k,1);break t}}g=m.createElement(c),Jt(g,c,s),m.head.appendChild(g);break;default:throw Error(i(468,c))}g[Gt]=r,Ft(g),c=g}r.stateNode=c}else Sb(m,r.type,r.stateNode);else r.stateNode=vb(m,c,r.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?Sb(m,r.type,r.stateNode):vb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&Rd(r,r.memoizedProps,s.memoizedProps)}break;case 27:yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),s!==null&&c&4&&Rd(r,r.memoizedProps,s.memoizedProps);break;case 5:if(yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),r.flags&32){m=r.stateNode;try{ja(m,"")}catch(fe){Xe(r,r.return,fe)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,Rd(r,m,s!==null?s.memoizedProps:m)),c&1024&&($d=!0);break;case 6:if(yn(a,r),xn(r),c&4){if(r.stateNode===null)throw Error(i(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(fe){Xe(r,r.return,fe)}}break;case 3:if(Mu=null,m=or,or=Ou(a.containerInfo),yn(a,r),or=m,xn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{so(a.containerInfo)}catch(fe){Xe(r,r.return,fe)}$d&&($d=!1,Sv(r));break;case 4:c=or,or=Ou(r.stateNode.containerInfo),yn(a,r),xn(r),or=c;break;case 12:yn(a,r),xn(r);break;case 31:yn(a,r),xn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,xu(r,c)));break;case 13:yn(a,r),xn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(bu=lt()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,xu(r,c)));break;case 22:m=r.memoizedState!==null;var M=s!==null&&s.memoizedState!==null,I=Ur,X=Ot;if(Ur=I||m,Ot=X||M,yn(a,r),Ot=X,Ur=I,xn(r),c&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||M||Ur||Ot||ta(r)),s=null,a=r;;){if(a.tag===5||a.tag===26){if(s===null){M=s=a;try{if(g=M.stateNode,m)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{k=M.stateNode;var ee=M.memoizedProps.style,H=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;k.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(fe){Xe(M,M.return,fe)}}}else if(a.tag===6){if(s===null){M=a;try{M.stateNode.nodeValue=m?"":M.memoizedProps}catch(fe){Xe(M,M.return,fe)}}}else if(a.tag===18){if(s===null){M=a;try{var F=M.stateNode;m?cb(F,!0):cb(M.stateNode,!1)}catch(fe){Xe(M,M.return,fe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,xu(r,s))));break;case 19:yn(a,r),xn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,xu(r,c)));break;case 30:break;case 21:break;default:yn(a,r),xn(r)}}function xn(r){var a=r.flags;if(a&2){try{for(var s,c=r.return;c!==null;){if(dv(c)){s=c;break}c=c.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var m=s.stateNode,g=Md(r);yu(r,g,m);break;case 5:var S=s.stateNode;s.flags&32&&(ja(S,""),s.flags&=-33);var k=Md(r);yu(r,k,S);break;case 3:case 4:var M=s.stateNode.containerInfo,I=Md(r);Dd(r,I,M);break;default:throw Error(i(161))}}catch(X){Xe(r,r.return,X)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Sv(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Sv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Vr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)pv(r,a.alternate,a),a=a.sibling}function ta(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:ci(4,a,a.return),ta(a);break;case 1:gr(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&cv(a,a.return,s),ta(a);break;case 27:Ns(a.stateNode);case 26:case 5:gr(a,a.return),ta(a);break;case 22:a.memoizedState===null&&ta(a);break;case 30:ta(a);break;default:ta(a)}r=r.sibling}}function Zr(r,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,m=r,g=a,S=g.flags;switch(g.tag){case 0:case 11:case 15:Zr(m,g,s),Ss(4,g);break;case 1:if(Zr(m,g,s),c=g,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(I){Xe(c,c.return,I)}if(c=g,m=c.updateQueue,m!==null){var k=c.stateNode;try{var M=m.shared.hiddenCallbacks;if(M!==null)for(m.shared.hiddenCallbacks=null,m=0;m<M.length;m++)Qy(M[m],k)}catch(I){Xe(c,c.return,I)}}s&&S&64&&uv(g),ks(g,g.return);break;case 27:hv(g);case 26:case 5:Zr(m,g,s),s&&c===null&&S&4&&fv(g),ks(g,g.return);break;case 12:Zr(m,g,s);break;case 31:Zr(m,g,s),s&&S&4&&xv(m,g);break;case 13:Zr(m,g,s),s&&S&4&&vv(m,g);break;case 22:g.memoizedState===null&&Zr(m,g,s),ks(g,g.return);break;case 30:break;default:Zr(m,g,s)}a=a.sibling}}function Ld(r,a){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&ls(s))}function Ud(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&ls(r))}function sr(r,a,s,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)kv(r,a,s,c),a=a.sibling}function kv(r,a,s,c){var m=a.flags;switch(a.tag){case 0:case 11:case 15:sr(r,a,s,c),m&2048&&Ss(9,a);break;case 1:sr(r,a,s,c);break;case 3:sr(r,a,s,c),m&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&ls(r)));break;case 12:if(m&2048){sr(r,a,s,c),r=a.stateNode;try{var g=a.memoizedProps,S=g.id,k=g.onPostCommit;typeof k=="function"&&k(S,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(M){Xe(a,a.return,M)}}else sr(r,a,s,c);break;case 31:sr(r,a,s,c);break;case 13:sr(r,a,s,c);break;case 23:break;case 22:g=a.stateNode,S=a.alternate,a.memoizedState!==null?g._visibility&2?sr(r,a,s,c):ws(r,a):g._visibility&2?sr(r,a,s,c):(g._visibility|=2,Ka(r,a,s,c,(a.subtreeFlags&10256)!==0||!1)),m&2048&&Ld(S,a);break;case 24:sr(r,a,s,c),m&2048&&Ud(a.alternate,a);break;default:sr(r,a,s,c)}}function Ka(r,a,s,c,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,S=a,k=s,M=c,I=S.flags;switch(S.tag){case 0:case 11:case 15:Ka(g,S,k,M,m),Ss(8,S);break;case 23:break;case 22:var X=S.stateNode;S.memoizedState!==null?X._visibility&2?Ka(g,S,k,M,m):ws(g,S):(X._visibility|=2,Ka(g,S,k,M,m)),m&&I&2048&&Ld(S.alternate,S);break;case 24:Ka(g,S,k,M,m),m&&I&2048&&Ud(S.alternate,S);break;default:Ka(g,S,k,M,m)}a=a.sibling}}function ws(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=r,c=a,m=c.flags;switch(c.tag){case 22:ws(s,c),m&2048&&Ld(c.alternate,c);break;case 24:ws(s,c),m&2048&&Ud(c.alternate,c);break;default:ws(s,c)}a=a.sibling}}var zs=8192;function Ja(r,a,s){if(r.subtreeFlags&zs)for(r=r.child;r!==null;)wv(r,a,s),r=r.sibling}function wv(r,a,s){switch(r.tag){case 26:Ja(r,a,s),r.flags&zs&&r.memoizedState!==null&&M2(s,or,r.memoizedState,r.memoizedProps);break;case 5:Ja(r,a,s);break;case 3:case 4:var c=or;or=Ou(r.stateNode.containerInfo),Ja(r,a,s),or=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=zs,zs=16777216,Ja(r,a,s),zs=c):Ja(r,a,s));break;default:Ja(r,a,s)}}function zv(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function _s(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];qt=c,Ev(c,r)}zv(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)_v(r),r=r.sibling}function _v(r){switch(r.tag){case 0:case 11:case 15:_s(r),r.flags&2048&&ci(9,r,r.return);break;case 3:_s(r);break;case 12:_s(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,vu(r)):_s(r);break;default:_s(r)}}function vu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];qt=c,Ev(c,r)}zv(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:ci(8,a,a.return),vu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,vu(a));break;default:vu(a)}r=r.sibling}}function Ev(r,a){for(;qt!==null;){var s=qt;switch(s.tag){case 0:case 11:case 15:ci(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:ls(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,qt=c;else e:for(s=r;qt!==null;){c=qt;var m=c.sibling,g=c.return;if(gv(c),c===s){qt=null;break e}if(m!==null){m.return=g,qt=m;break e}qt=g}}}var XT={getCacheForType:function(r){var a=Xt(At),s=a.data.get(r);return s===void 0&&(s=r(),a.data.set(r,s)),s},cacheSignal:function(){return Xt(At).controller.signal}},KT=typeof WeakMap=="function"?WeakMap:Map,He=0,rt=null,Oe=null,$e=0,Ye=0,Nn=null,fi=!1,Qa=!1,Pd=!1,Br=0,wt=0,di=0,na=0,Vd=0,On=0,Wa=0,Es=null,vn=null,Zd=!1,bu=0,Tv=0,Su=1/0,ku=null,hi=null,Zt=0,mi=null,eo=null,Ir=0,Bd=0,Id=null,Cv=null,Ts=0,Hd=null;function Rn(){return(He&2)!==0&&$e!==0?$e&-$e:P.T!==null?Kd():Hg()}function Av(){if(On===0)if(($e&536870912)===0||Ue){var r=jl;jl<<=1,(jl&3932160)===0&&(jl=262144),On=r}else On=536870912;return r=An.current,r!==null&&(r.flags|=32),On}function bn(r,a,s){(r===rt&&(Ye===2||Ye===9)||r.cancelPendingCommit!==null)&&(to(r,0),pi(r,$e,On,!1)),Yo(r,s),((He&2)===0||r!==rt)&&(r===rt&&((He&2)===0&&(na|=s),wt===4&&pi(r,$e,On,!1)),yr(r))}function jv(r,a,s){if((He&6)!==0)throw Error(i(327));var c=!s&&(a&127)===0&&(a&r.expiredLanes)===0||Go(r,a),m=c?WT(r,a):qd(r,a,!0),g=c;do{if(m===0){Qa&&!c&&pi(r,a,0,!1);break}else{if(s=r.current.alternate,g&&!JT(s)){m=qd(r,a,!1),g=!1;continue}if(m===2){if(g=a,r.errorRecoveryDisabledLanes&g)var S=0;else S=r.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var k=r;m=Es;var M=k.current.memoizedState.isDehydrated;if(M&&(to(k,S).flags|=256),S=qd(k,S,!1),S!==2){if(Pd&&!M){k.errorRecoveryDisabledLanes|=g,na|=g,m=4;break e}g=vn,vn=m,g!==null&&(vn===null?vn=g:vn.push.apply(vn,g))}m=S}if(g=!1,m!==2)continue}}if(m===1){to(r,0),pi(r,a,0,!0);break}e:{switch(c=r,g=m,g){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:pi(c,a,On,!fi);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(m=bu+300-lt(),10<m)){if(pi(c,a,On,!fi),Ol(c,0,!0)!==0)break e;Ir=a,c.timeoutHandle=sb(Nv.bind(null,c,s,vn,ku,Zd,a,On,na,Wa,fi,g,"Throttled",-0,0),m);break e}Nv(c,s,vn,ku,Zd,a,On,na,Wa,fi,g,null,-0,0)}}break}while(!0);yr(r)}function Nv(r,a,s,c,m,g,S,k,M,I,X,ee,H,F){if(r.timeoutHandle=-1,ee=a.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cr},wv(a,g,ee);var fe=(g&62914560)===g?bu-lt():(g&4194048)===g?Tv-lt():0;if(fe=D2(ee,fe),fe!==null){Ir=g,r.cancelPendingCommit=fe(Pv.bind(null,r,a,g,s,c,m,S,k,M,X,ee,null,H,F)),pi(r,g,S,!I);return}}Pv(r,a,g,s,c,m,S,k,M)}function JT(r){for(var a=r;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],g=m.getSnapshot;m=m.value;try{if(!Tn(g(),m))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function pi(r,a,s,c){a&=~Vd,a&=~na,r.suspendedLanes|=a,r.pingedLanes&=~a,c&&(r.warmLanes|=a),c=r.expirationTimes;for(var m=a;0<m;){var g=31-nt(m),S=1<<g;c[g]=-1,m&=~S}s!==0&&Zg(r,s,a)}function wu(){return(He&6)===0?(Cs(0),!1):!0}function Fd(){if(Oe!==null){if(Ye===0)var r=Oe.return;else r=Oe,Or=Gi=null,sd(r),Fa=null,cs=0,r=Oe;for(;r!==null;)lv(r.alternate,r),r=r.return;Oe=null}}function to(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,y2(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Ir=0,Fd(),rt=r,Oe=s=jr(r.current,null),$e=a,Ye=0,Nn=null,fi=!1,Qa=Go(r,a),Pd=!1,Wa=On=Vd=na=di=wt=0,vn=Es=null,Zd=!1,(a&8)!==0&&(a|=a&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=a;0<c;){var m=31-nt(c),g=1<<m;a|=r[m],c&=~g}return Br=a,Hl(),s}function Ov(r,a){Ce=null,P.H=xs,a===Ha||a===Ql?(a=Yy(),Ye=3):a===Xf?(a=Yy(),Ye=4):Ye=a===wd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Nn=a,Oe===null&&(wt=1,du(r,In(a,r.current)))}function Rv(){var r=An.current;return r===null?!0:($e&4194048)===$e?Gn===null:($e&62914560)===$e||($e&536870912)!==0?r===Gn:!1}function Mv(){var r=P.H;return P.H=xs,r===null?xs:r}function Dv(){var r=P.A;return P.A=XT,r}function zu(){wt=4,fi||($e&4194048)!==$e&&An.current!==null||(Qa=!0),(di&134217727)===0&&(na&134217727)===0||rt===null||pi(rt,$e,On,!1)}function qd(r,a,s){var c=He;He|=2;var m=Mv(),g=Dv();(rt!==r||$e!==a)&&(ku=null,to(r,a)),a=!1;var S=wt;e:do try{if(Ye!==0&&Oe!==null){var k=Oe,M=Nn;switch(Ye){case 8:Fd(),S=6;break e;case 3:case 2:case 9:case 6:An.current===null&&(a=!0);var I=Ye;if(Ye=0,Nn=null,no(r,k,M,I),s&&Qa){S=0;break e}break;default:I=Ye,Ye=0,Nn=null,no(r,k,M,I)}}QT(),S=wt;break}catch(X){Ov(r,X)}while(!0);return a&&r.shellSuspendCounter++,Or=Gi=null,He=c,P.H=m,P.A=g,Oe===null&&(rt=null,$e=0,Hl()),S}function QT(){for(;Oe!==null;)$v(Oe)}function WT(r,a){var s=He;He|=2;var c=Mv(),m=Dv();rt!==r||$e!==a?(ku=null,Su=lt()+500,to(r,a)):Qa=Go(r,a);e:do try{if(Ye!==0&&Oe!==null){a=Oe;var g=Nn;t:switch(Ye){case 1:Ye=0,Nn=null,no(r,a,g,1);break;case 2:case 9:if(qy(g)){Ye=0,Nn=null,Lv(a);break}a=function(){Ye!==2&&Ye!==9||rt!==r||(Ye=7),yr(r)},g.then(a,a);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:qy(g)?(Ye=0,Nn=null,Lv(a)):(Ye=0,Nn=null,no(r,a,g,7));break;case 5:var S=null;switch(Oe.tag){case 26:S=Oe.memoizedState;case 5:case 27:var k=Oe;if(S?kb(S):k.stateNode.complete){Ye=0,Nn=null;var M=k.sibling;if(M!==null)Oe=M;else{var I=k.return;I!==null?(Oe=I,_u(I)):Oe=null}break t}}Ye=0,Nn=null,no(r,a,g,5);break;case 6:Ye=0,Nn=null,no(r,a,g,6);break;case 8:Fd(),wt=6;break e;default:throw Error(i(462))}}e2();break}catch(X){Ov(r,X)}while(!0);return Or=Gi=null,P.H=c,P.A=m,He=s,Oe!==null?0:(rt=null,$e=0,Hl(),wt)}function e2(){for(;Oe!==null&&!_t();)$v(Oe)}function $v(r){var a=ov(r.alternate,r,Br);r.memoizedProps=r.pendingProps,a===null?_u(r):Oe=a}function Lv(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=ev(s,a,a.pendingProps,a.type,void 0,$e);break;case 11:a=ev(s,a,a.pendingProps,a.type.render,a.ref,$e);break;case 5:sd(a);default:lv(s,a),a=Oe=Dy(a,Br),a=ov(s,a,Br)}r.memoizedProps=r.pendingProps,a===null?_u(r):Oe=a}function no(r,a,s,c){Or=Gi=null,sd(a),Fa=null,cs=0;var m=a.return;try{if(BT(r,m,a,s,$e)){wt=1,du(r,In(s,r.current)),Oe=null;return}}catch(g){if(m!==null)throw Oe=m,g;wt=1,du(r,In(s,r.current)),Oe=null;return}a.flags&32768?(Ue||c===1?r=!0:Qa||($e&536870912)!==0?r=!1:(fi=r=!0,(c===2||c===9||c===3||c===6)&&(c=An.current,c!==null&&c.tag===13&&(c.flags|=16384))),Uv(a,r)):_u(a)}function _u(r){var a=r;do{if((a.flags&32768)!==0){Uv(a,fi);return}r=a.return;var s=FT(a.alternate,a,Br);if(s!==null){Oe=s;return}if(a=a.sibling,a!==null){Oe=a;return}Oe=a=r}while(a!==null);wt===0&&(wt=5)}function Uv(r,a){do{var s=qT(r.alternate,r);if(s!==null){s.flags&=32767,Oe=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(r=r.sibling,r!==null)){Oe=r;return}Oe=r=s}while(r!==null);wt=6,Oe=null}function Pv(r,a,s,c,m,g,S,k,M){r.cancelPendingCommit=null;do Eu();while(Zt!==0);if((He&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(g=a.lanes|a.childLanes,g|=Mf,RE(r,s,g,S,k,M),r===rt&&(Oe=rt=null,$e=0),eo=a,mi=r,Ir=s,Bd=g,Id=m,Cv=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,i2(ye,function(){return Hv(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,m=Y.p,Y.p=2,S=He,He|=4;try{GT(r,a,s)}finally{He=S,Y.p=m,P.T=c}}Zt=1,Vv(),Zv(),Bv()}}function Vv(){if(Zt===1){Zt=0;var r=mi,a=eo,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var c=Y.p;Y.p=2;var m=He;He|=4;try{bv(a,r);var g=ih,S=Ey(r.containerInfo),k=g.focusedElem,M=g.selectionRange;if(S!==k&&k&&k.ownerDocument&&_y(k.ownerDocument.documentElement,k)){if(M!==null&&Af(k)){var I=M.start,X=M.end;if(X===void 0&&(X=I),"selectionStart"in k)k.selectionStart=I,k.selectionEnd=Math.min(X,k.value.length);else{var ee=k.ownerDocument||document,H=ee&&ee.defaultView||window;if(H.getSelection){var F=H.getSelection(),fe=k.textContent.length,we=Math.min(M.start,fe),et=M.end===void 0?we:Math.min(M.end,fe);!F.extend&&we>et&&(S=et,et=we,we=S);var U=zy(k,we),D=zy(k,et);if(U&&D&&(F.rangeCount!==1||F.anchorNode!==U.node||F.anchorOffset!==U.offset||F.focusNode!==D.node||F.focusOffset!==D.offset)){var B=ee.createRange();B.setStart(U.node,U.offset),F.removeAllRanges(),we>et?(F.addRange(B),F.extend(D.node,D.offset)):(B.setEnd(D.node,D.offset),F.addRange(B))}}}}for(ee=[],F=k;F=F.parentNode;)F.nodeType===1&&ee.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ee.length;k++){var W=ee[k];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Uu=!!rh,ih=rh=null}finally{He=m,Y.p=c,P.T=s}}r.current=a,Zt=2}}function Zv(){if(Zt===2){Zt=0;var r=mi,a=eo,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var c=Y.p;Y.p=2;var m=He;He|=4;try{pv(r,a.alternate,a)}finally{He=m,Y.p=c,P.T=s}}Zt=3}}function Bv(){if(Zt===4||Zt===3){Zt=0,Pt();var r=mi,a=eo,s=Ir,c=Cv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Zt=5:(Zt=0,eo=mi=null,Iv(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(hi=null),cf(s),a=a.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(sn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=P.T,m=Y.p,Y.p=2,P.T=null;try{for(var g=r.onRecoverableError,S=0;S<c.length;S++){var k=c[S];g(k.value,{componentStack:k.stack})}}finally{P.T=a,Y.p=m}}(Ir&3)!==0&&Eu(),yr(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Hd?Ts++:(Ts=0,Hd=r):Ts=0,Cs(0)}}function Iv(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,ls(a)))}function Eu(){return Vv(),Zv(),Bv(),Hv()}function Hv(){if(Zt!==5)return!1;var r=mi,a=Bd;Bd=0;var s=cf(Ir),c=P.T,m=Y.p;try{Y.p=32>s?32:s,P.T=null,s=Id,Id=null;var g=mi,S=Ir;if(Zt=0,eo=mi=null,Ir=0,(He&6)!==0)throw Error(i(331));var k=He;if(He|=4,_v(g.current),kv(g,g.current,S,s),He=k,Cs(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(sn,g)}catch{}return!0}finally{Y.p=m,P.T=c,Iv(r,a)}}function Fv(r,a,s){a=In(s,a),a=kd(r.stateNode,a,2),r=si(r,a,2),r!==null&&(Yo(r,2),yr(r))}function Xe(r,a,s){if(r.tag===3)Fv(r,r,s);else for(;a!==null;){if(a.tag===3){Fv(a,r,s);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(hi===null||!hi.has(c))){r=In(s,r),s=qx(2),c=si(a,s,2),c!==null&&(Gx(s,c,a,r),Yo(c,2),yr(c));break}}a=a.return}}function Gd(r,a,s){var c=r.pingCache;if(c===null){c=r.pingCache=new KT;var m=new Set;c.set(a,m)}else m=c.get(a),m===void 0&&(m=new Set,c.set(a,m));m.has(s)||(Pd=!0,m.add(s),r=t2.bind(null,r,a,s),a.then(r,r))}function t2(r,a,s){var c=r.pingCache;c!==null&&c.delete(a),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,rt===r&&($e&s)===s&&(wt===4||wt===3&&($e&62914560)===$e&&300>lt()-bu?(He&2)===0&&to(r,0):Vd|=s,Wa===$e&&(Wa=0)),yr(r)}function qv(r,a){a===0&&(a=Vg()),r=Hi(r,a),r!==null&&(Yo(r,a),yr(r))}function n2(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),qv(r,s)}function r2(r,a){var s=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),qv(r,s)}function i2(r,a){return Ht(r,a)}var Tu=null,ro=null,Yd=!1,Cu=!1,Xd=!1,gi=0;function yr(r){r!==ro&&r.next===null&&(ro===null?Tu=ro=r:ro=ro.next=r),Cu=!0,Yd||(Yd=!0,o2())}function Cs(r,a){if(!Xd&&Cu){Xd=!0;do for(var s=!1,c=Tu;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var g=0;else{var S=c.suspendedLanes,k=c.pingedLanes;g=(1<<31-nt(42|r)+1)-1,g&=m&~(S&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,Kv(c,g))}else g=$e,g=Ol(c,c===rt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Go(c,g)||(s=!0,Kv(c,g));c=c.next}while(s);Xd=!1}}function a2(){Gv()}function Gv(){Cu=Yd=!1;var r=0;gi!==0&&g2()&&(r=gi);for(var a=lt(),s=null,c=Tu;c!==null;){var m=c.next,g=Yv(c,a);g===0?(c.next=null,s===null?Tu=m:s.next=m,m===null&&(ro=s)):(s=c,(r!==0||(g&3)!==0)&&(Cu=!0)),c=m}Zt!==0&&Zt!==5||Cs(r),gi!==0&&(gi=0)}function Yv(r,a){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var S=31-nt(g),k=1<<S,M=m[S];M===-1?((k&s)===0||(k&c)!==0)&&(m[S]=OE(k,a)):M<=a&&(r.expiredLanes|=k),g&=~k}if(a=rt,s=$e,s=Ol(r,r===a?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===a&&(Ye===2||Ye===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&Pn(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Go(r,s)){if(a=s&-s,a===r.callbackPriority)return a;switch(c!==null&&Pn(c),cf(s)){case 2:case 8:s=se;break;case 32:s=ye;break;case 268435456:s=Pe;break;default:s=ye}return c=Xv.bind(null,r),s=Ht(s,c),r.callbackPriority=a,r.callbackNode=s,a}return c!==null&&c!==null&&Pn(c),r.callbackPriority=2,r.callbackNode=null,2}function Xv(r,a){if(Zt!==0&&Zt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Eu()&&r.callbackNode!==s)return null;var c=$e;return c=Ol(r,r===rt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(jv(r,c,a),Yv(r,lt()),r.callbackNode!=null&&r.callbackNode===s?Xv.bind(null,r):null)}function Kv(r,a){if(Eu())return null;jv(r,a,!0)}function o2(){x2(function(){(He&6)!==0?Ht(J,a2):Gv()})}function Kd(){if(gi===0){var r=Ba;r===0&&(r=Al,Al<<=1,(Al&261888)===0&&(Al=256)),gi=r}return gi}function Jv(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:$l(""+r)}function Qv(r,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,r.id&&s.setAttribute("form",r.id),a.parentNode.insertBefore(s,a),r=new FormData(r),s.parentNode.removeChild(s),r}function s2(r,a,s,c,m){if(a==="submit"&&s&&s.stateNode===m){var g=Jv((m[mn]||null).action),S=c.submitter;S&&(a=(a=S[mn]||null)?Jv(a.formAction):S.getAttribute("formAction"),a!==null&&(g=a,S=null));var k=new Vl("action","action",null,c,m);r.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(gi!==0){var M=S?Qv(m,S):new FormData(m);gd(s,{pending:!0,data:M,method:m.method,action:g},null,M)}}else typeof g=="function"&&(k.preventDefault(),M=S?Qv(m,S):new FormData(m),gd(s,{pending:!0,data:M,method:m.method,action:g},g,M))},currentTarget:m}]})}}for(var Jd=0;Jd<Rf.length;Jd++){var Qd=Rf[Jd],l2=Qd.toLowerCase(),u2=Qd[0].toUpperCase()+Qd.slice(1);ar(l2,"on"+u2)}ar(Ay,"onAnimationEnd"),ar(jy,"onAnimationIteration"),ar(Ny,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(_T,"onTransitionRun"),ar(ET,"onTransitionStart"),ar(TT,"onTransitionCancel"),ar(Oy,"onTransitionEnd"),Ca("onMouseEnter",["mouseout","mouseover"]),Ca("onMouseLeave",["mouseout","mouseover"]),Ca("onPointerEnter",["pointerout","pointerover"]),Ca("onPointerLeave",["pointerout","pointerover"]),Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var As="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(" "),c2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(As));function Wv(r,a){a=(a&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var g=void 0;if(a)for(var S=c.length-1;0<=S;S--){var k=c[S],M=k.instance,I=k.currentTarget;if(k=k.listener,M!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=I;try{g(m)}catch(X){Il(X)}m.currentTarget=null,g=M}else for(S=0;S<c.length;S++){if(k=c[S],M=k.instance,I=k.currentTarget,k=k.listener,M!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=I;try{g(m)}catch(X){Il(X)}m.currentTarget=null,g=M}}}}function Re(r,a){var s=a[ff];s===void 0&&(s=a[ff]=new Set);var c=r+"__bubble";s.has(c)||(eb(a,r,2,!1),s.add(c))}function Wd(r,a,s){var c=0;a&&(c|=4),eb(s,r,c,a)}var Au="_reactListening"+Math.random().toString(36).slice(2);function eh(r){if(!r[Au]){r[Au]=!0,Gg.forEach(function(s){s!=="selectionchange"&&(c2.has(s)||Wd(s,!1,r),Wd(s,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Au]||(a[Au]=!0,Wd("selectionchange",!1,a))}}function eb(r,a,s,c){switch(Ab(a)){case 2:var m=U2;break;case 8:m=P2;break;default:m=ph}s=m.bind(null,a,s,r),m=void 0,!bf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(a,s,{capture:!0,passive:m}):r.addEventListener(a,s,!0):m!==void 0?r.addEventListener(a,s,{passive:m}):r.addEventListener(a,s,!1)}function th(r,a,s,c,m){var g=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var k=c.stateNode.containerInfo;if(k===m)break;if(S===4)for(S=c.return;S!==null;){var M=S.tag;if((M===3||M===4)&&S.stateNode.containerInfo===m)return;S=S.return}for(;k!==null;){if(S=_a(k),S===null)return;if(M=S.tag,M===5||M===6||M===26||M===27){c=g=S;continue e}k=k.parentNode}}c=c.return}ay(function(){var I=g,X=xf(s),ee=[];e:{var H=Ry.get(r);if(H!==void 0){var F=Vl,fe=r;switch(r){case"keypress":if(Ul(s)===0)break e;case"keydown":case"keyup":F=rT;break;case"focusin":fe="focus",F=zf;break;case"focusout":fe="blur",F=zf;break;case"beforeblur":case"afterblur":F=zf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=ly;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=FE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=oT;break;case Ay:case jy:case Ny:F=YE;break;case Oy:F=lT;break;case"scroll":case"scrollend":F=IE;break;case"wheel":F=cT;break;case"copy":case"cut":case"paste":F=KE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=cy;break;case"toggle":case"beforetoggle":F=dT}var we=(a&4)!==0,et=!we&&(r==="scroll"||r==="scrollend"),U=we?H!==null?H+"Capture":null:H;we=[];for(var D=I,B;D!==null;){var W=D;if(B=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||B===null||U===null||(W=Jo(D,U),W!=null&&we.push(js(D,W,B))),et)break;D=D.return}0<we.length&&(H=new F(H,fe,null,s,X),ee.push({event:H,listeners:we}))}}if((a&7)===0){e:{if(H=r==="mouseover"||r==="pointerover",F=r==="mouseout"||r==="pointerout",H&&s!==yf&&(fe=s.relatedTarget||s.fromElement)&&(_a(fe)||fe[za]))break e;if((F||H)&&(H=X.window===X?X:(H=X.ownerDocument)?H.defaultView||H.parentWindow:window,F?(fe=s.relatedTarget||s.toElement,F=I,fe=fe?_a(fe):null,fe!==null&&(et=u(fe),we=fe.tag,fe!==et||we!==5&&we!==27&&we!==6)&&(fe=null)):(F=null,fe=I),F!==fe)){if(we=ly,W="onMouseLeave",U="onMouseEnter",D="mouse",(r==="pointerout"||r==="pointerover")&&(we=cy,W="onPointerLeave",U="onPointerEnter",D="pointer"),et=F==null?H:Ko(F),B=fe==null?H:Ko(fe),H=new we(W,D+"leave",F,s,X),H.target=et,H.relatedTarget=B,W=null,_a(X)===I&&(we=new we(U,D+"enter",fe,s,X),we.target=B,we.relatedTarget=et,W=we),et=W,F&&fe)t:{for(we=f2,U=F,D=fe,B=0,W=U;W;W=we(W))B++;W=0;for(var Se=D;Se;Se=we(Se))W++;for(;0<B-W;)U=we(U),B--;for(;0<W-B;)D=we(D),W--;for(;B--;){if(U===D||D!==null&&U===D.alternate){we=U;break t}U=we(U),D=we(D)}we=null}else we=null;F!==null&&tb(ee,H,F,we,!1),fe!==null&&et!==null&&tb(ee,et,fe,we,!0)}}e:{if(H=I?Ko(I):window,F=H.nodeName&&H.nodeName.toLowerCase(),F==="select"||F==="input"&&H.type==="file")var Be=xy;else if(gy(H))if(vy)Be=kT;else{Be=bT;var xe=vT}else F=H.nodeName,!F||F.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?I&&gf(I.elementType)&&(Be=xy):Be=ST;if(Be&&(Be=Be(r,I))){yy(ee,Be,s,X);break e}xe&&xe(r,H,I),r==="focusout"&&I&&H.type==="number"&&I.memoizedProps.value!=null&&pf(H,"number",H.value)}switch(xe=I?Ko(I):window,r){case"focusin":(gy(xe)||xe.contentEditable==="true")&&(Ma=xe,jf=I,as=null);break;case"focusout":as=jf=Ma=null;break;case"mousedown":Nf=!0;break;case"contextmenu":case"mouseup":case"dragend":Nf=!1,Ty(ee,s,X);break;case"selectionchange":if(zT)break;case"keydown":case"keyup":Ty(ee,s,X)}var Ae;if(Ef)e:{switch(r){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Ra?my(r,s)&&(Le="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(fy&&s.locale!=="ko"&&(Ra||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Ra&&(Ae=oy()):(ei=X,Sf="value"in ei?ei.value:ei.textContent,Ra=!0)),xe=ju(I,Le),0<xe.length&&(Le=new uy(Le,r,null,s,X),ee.push({event:Le,listeners:xe}),Ae?Le.data=Ae:(Ae=py(s),Ae!==null&&(Le.data=Ae)))),(Ae=mT?pT(r,s):gT(r,s))&&(Le=ju(I,"onBeforeInput"),0<Le.length&&(xe=new uy("onBeforeInput","beforeinput",null,s,X),ee.push({event:xe,listeners:Le}),xe.data=Ae)),s2(ee,r,I,s,X)}Wv(ee,a)})}function js(r,a,s){return{instance:r,listener:a,currentTarget:s}}function ju(r,a){for(var s=a+"Capture",c=[];r!==null;){var m=r,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=Jo(r,s),m!=null&&c.unshift(js(r,m,g)),m=Jo(r,a),m!=null&&c.push(js(r,m,g))),r.tag===3)return c;r=r.return}return[]}function f2(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function tb(r,a,s,c,m){for(var g=a._reactName,S=[];s!==null&&s!==c;){var k=s,M=k.alternate,I=k.stateNode;if(k=k.tag,M!==null&&M===c)break;k!==5&&k!==26&&k!==27||I===null||(M=I,m?(I=Jo(s,g),I!=null&&S.unshift(js(s,I,M))):m||(I=Jo(s,g),I!=null&&S.push(js(s,I,M)))),s=s.return}S.length!==0&&r.push({event:a,listeners:S})}var d2=/\r\n?/g,h2=/\u0000|\uFFFD/g;function nb(r){return(typeof r=="string"?r:""+r).replace(d2,`
|
|
9
|
-
`).replace(h2,"")}function rb(r,a){return a=nb(a),nb(r)===a}function We(r,a,s,c,m,g){switch(s){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||ja(r,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&ja(r,""+c);break;case"className":Ml(r,"class",c);break;case"tabIndex":Ml(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ml(r,s,c);break;case"style":ry(r,c,g);break;case"data":if(a!=="object"){Ml(r,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=$l(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(a!=="input"&&We(r,a,"name",m.name,m,null),We(r,a,"formEncType",m.formEncType,m,null),We(r,a,"formMethod",m.formMethod,m,null),We(r,a,"formTarget",m.formTarget,m,null)):(We(r,a,"encType",m.encType,m,null),We(r,a,"method",m.method,m,null),We(r,a,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=$l(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Cr);break;case"onScroll":c!=null&&Re("scroll",r);break;case"onScrollEnd":c!=null&&Re("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=$l(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":Re("beforetoggle",r),Re("toggle",r),Rl(r,"popover",c);break;case"xlinkActuate":Tr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Tr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Tr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Tr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Tr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Tr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Rl(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ZE.get(s)||s,Rl(r,s,c))}}function nh(r,a,s,c,m,g){switch(s){case"style":ry(r,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(60));r.innerHTML=s}}break;case"children":typeof c=="string"?ja(r,c):(typeof c=="number"||typeof c=="bigint")&&ja(r,""+c);break;case"onScroll":c!=null&&Re("scroll",r);break;case"onScrollEnd":c!=null&&Re("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Cr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yg.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),a=s.slice(2,m?s.length-7:void 0),g=r[mn]||null,g=g!=null?g[s]:null,typeof g=="function"&&r.removeEventListener(a,g,m),typeof c=="function")){typeof g!="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(a,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):Rl(r,s,c)}}}function Jt(r,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",r),Re("load",r);var c=!1,m=!1,g;for(g in s)if(s.hasOwnProperty(g)){var S=s[g];if(S!=null)switch(g){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:We(r,a,g,S,s,null)}}m&&We(r,a,"srcSet",s.srcSet,s,null),c&&We(r,a,"src",s.src,s,null);return;case"input":Re("invalid",r);var k=g=S=m=null,M=null,I=null;for(c in s)if(s.hasOwnProperty(c)){var X=s[c];if(X!=null)switch(c){case"name":m=X;break;case"type":S=X;break;case"checked":M=X;break;case"defaultChecked":I=X;break;case"value":g=X;break;case"defaultValue":k=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,a));break;default:We(r,a,c,X,s,null)}}Wg(r,g,k,M,I,S,m,!1);return;case"select":Re("invalid",r),c=S=g=null;for(m in s)if(s.hasOwnProperty(m)&&(k=s[m],k!=null))switch(m){case"value":g=k;break;case"defaultValue":S=k;break;case"multiple":c=k;default:We(r,a,m,k,s,null)}a=g,s=S,r.multiple=!!c,a!=null?Aa(r,!!c,a,!1):s!=null&&Aa(r,!!c,s,!0);return;case"textarea":Re("invalid",r),g=m=c=null;for(S in s)if(s.hasOwnProperty(S)&&(k=s[S],k!=null))switch(S){case"value":c=k;break;case"defaultValue":m=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(i(91));break;default:We(r,a,S,k,s,null)}ty(r,c,m,g);return;case"option":for(M in s)s.hasOwnProperty(M)&&(c=s[M],c!=null)&&(M==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":We(r,a,M,c,s,null));return;case"dialog":Re("beforetoggle",r),Re("toggle",r),Re("cancel",r),Re("close",r);break;case"iframe":case"object":Re("load",r);break;case"video":case"audio":for(c=0;c<As.length;c++)Re(As[c],r);break;case"image":Re("error",r),Re("load",r);break;case"details":Re("toggle",r);break;case"embed":case"source":case"link":Re("error",r),Re("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in s)if(s.hasOwnProperty(I)&&(c=s[I],c!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:We(r,a,I,c,s,null)}return;default:if(gf(a)){for(X in s)s.hasOwnProperty(X)&&(c=s[X],c!==void 0&&nh(r,a,X,c,s,void 0));return}}for(k in s)s.hasOwnProperty(k)&&(c=s[k],c!=null&&We(r,a,k,c,s,null))}function m2(r,a,s,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,S=null,k=null,M=null,I=null,X=null;for(F in s){var ee=s[F];if(s.hasOwnProperty(F)&&ee!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":M=ee;default:c.hasOwnProperty(F)||We(r,a,F,null,c,ee)}}for(var H in c){var F=c[H];if(ee=s[H],c.hasOwnProperty(H)&&(F!=null||ee!=null))switch(H){case"type":g=F;break;case"name":m=F;break;case"checked":I=F;break;case"defaultChecked":X=F;break;case"value":S=F;break;case"defaultValue":k=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,a));break;default:F!==ee&&We(r,a,H,F,c,ee)}}mf(r,S,k,M,I,X,g,m);return;case"select":F=S=k=H=null;for(g in s)if(M=s[g],s.hasOwnProperty(g)&&M!=null)switch(g){case"value":break;case"multiple":F=M;default:c.hasOwnProperty(g)||We(r,a,g,null,c,M)}for(m in c)if(g=c[m],M=s[m],c.hasOwnProperty(m)&&(g!=null||M!=null))switch(m){case"value":H=g;break;case"defaultValue":k=g;break;case"multiple":S=g;default:g!==M&&We(r,a,m,g,c,M)}a=k,s=S,c=F,H!=null?Aa(r,!!s,H,!1):!!c!=!!s&&(a!=null?Aa(r,!!s,a,!0):Aa(r,!!s,s?[]:"",!1));return;case"textarea":F=H=null;for(k in s)if(m=s[k],s.hasOwnProperty(k)&&m!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:We(r,a,k,null,c,m)}for(S in c)if(m=c[S],g=s[S],c.hasOwnProperty(S)&&(m!=null||g!=null))switch(S){case"value":H=m;break;case"defaultValue":F=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(i(91));break;default:m!==g&&We(r,a,S,m,c,g)}ey(r,H,F);return;case"option":for(var fe in s)H=s[fe],s.hasOwnProperty(fe)&&H!=null&&!c.hasOwnProperty(fe)&&(fe==="selected"?r.selected=!1:We(r,a,fe,null,c,H));for(M in c)H=c[M],F=s[M],c.hasOwnProperty(M)&&H!==F&&(H!=null||F!=null)&&(M==="selected"?r.selected=H&&typeof H!="function"&&typeof H!="symbol":We(r,a,M,H,c,F));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in s)H=s[we],s.hasOwnProperty(we)&&H!=null&&!c.hasOwnProperty(we)&&We(r,a,we,null,c,H);for(I in c)if(H=c[I],F=s[I],c.hasOwnProperty(I)&&H!==F&&(H!=null||F!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,a));break;default:We(r,a,I,H,c,F)}return;default:if(gf(a)){for(var et in s)H=s[et],s.hasOwnProperty(et)&&H!==void 0&&!c.hasOwnProperty(et)&&nh(r,a,et,void 0,c,H);for(X in c)H=c[X],F=s[X],!c.hasOwnProperty(X)||H===F||H===void 0&&F===void 0||nh(r,a,X,H,c,F);return}}for(var U in s)H=s[U],s.hasOwnProperty(U)&&H!=null&&!c.hasOwnProperty(U)&&We(r,a,U,null,c,H);for(ee in c)H=c[ee],F=s[ee],!c.hasOwnProperty(ee)||H===F||H==null&&F==null||We(r,a,ee,H,c,F)}function ib(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function p2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],g=m.transferSize,S=m.initiatorType,k=m.duration;if(g&&k&&ib(S)){for(S=0,k=m.responseEnd,c+=1;c<s.length;c++){var M=s[c],I=M.startTime;if(I>k)break;var X=M.transferSize,ee=M.initiatorType;X&&ib(ee)&&(M=M.responseEnd,S+=X*(M<k?1:(k-I)/(M-I)))}if(--c,a+=8*(g+S)/(m.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var rh=null,ih=null;function Nu(r){return r.nodeType===9?r:r.ownerDocument}function ab(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ob(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function ah(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var oh=null;function g2(){var r=window.event;return r&&r.type==="popstate"?r===oh?!1:(oh=r,!0):(oh=null,!1)}var sb=typeof setTimeout=="function"?setTimeout:void 0,y2=typeof clearTimeout=="function"?clearTimeout:void 0,lb=typeof Promise=="function"?Promise:void 0,x2=typeof queueMicrotask=="function"?queueMicrotask:typeof lb<"u"?function(r){return lb.resolve(null).then(r).catch(v2)}:sb;function v2(r){setTimeout(function(){throw r})}function yi(r){return r==="head"}function ub(r,a){var s=a,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),so(a);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ns(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ns(s);for(var g=s.firstChild;g;){var S=g.nextSibling,k=g.nodeName;g[Xo]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=S}}else s==="body"&&Ns(r.ownerDocument.body);s=m}while(s);so(a)}function cb(r,a){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function sh(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":sh(s),df(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function b2(r,a,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Xo])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=Yn(r.nextSibling),r===null)break}return null}function S2(r,a,s){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Yn(r.nextSibling),r===null))return null;return r}function fb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Yn(r.nextSibling),r===null))return null;return r}function lh(r){return r.data==="$?"||r.data==="$~"}function uh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function k2(r,a){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||s.readyState!=="loading")a();else{var c=function(){a(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Yn(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var ch=null;function db(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(a===0)return Yn(r.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}r=r.nextSibling}return null}function hb(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return r;a--}else s!=="/$"&&s!=="/&"||a++}r=r.previousSibling}return null}function mb(r,a,s){switch(a=Nu(s),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Ns(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);df(r)}var Xn=new Map,pb=new Set;function Ou(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Hr=Y.d;Y.d={f:w2,r:z2,D:_2,C:E2,L:T2,m:C2,X:j2,S:A2,M:N2};function w2(){var r=Hr.f(),a=wu();return r||a}function z2(r){var a=Ea(r);a!==null&&a.tag===5&&a.type==="form"?Ox(a):Hr.r(r)}var io=typeof document>"u"?null:document;function gb(r,a,s){var c=io;if(c&&typeof a=="string"&&a){var m=Zn(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),pb.has(m)||(pb.add(m),r={rel:r,crossOrigin:s,href:a},c.querySelector(m)===null&&(a=c.createElement("link"),Jt(a,"link",r),Ft(a),c.head.appendChild(a)))}}function _2(r){Hr.D(r),gb("dns-prefetch",r,null)}function E2(r,a){Hr.C(r,a),gb("preconnect",r,a)}function T2(r,a,s){Hr.L(r,a,s);var c=io;if(c&&r&&a){var m='link[rel="preload"][as="'+Zn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Zn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Zn(s.imageSizes)+'"]')):m+='[href="'+Zn(r)+'"]';var g=m;switch(a){case"style":g=ao(r);break;case"script":g=oo(r)}Xn.has(g)||(r=y({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:r,as:a},s),Xn.set(g,r),c.querySelector(m)!==null||a==="style"&&c.querySelector(Os(g))||a==="script"&&c.querySelector(Rs(g))||(a=c.createElement("link"),Jt(a,"link",r),Ft(a),c.head.appendChild(a)))}}function C2(r,a){Hr.m(r,a);var s=io;if(s&&r){var c=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Zn(c)+'"][href="'+Zn(r)+'"]',g=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=oo(r)}if(!Xn.has(g)&&(r=y({rel:"modulepreload",href:r},a),Xn.set(g,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Rs(g)))return}c=s.createElement("link"),Jt(c,"link",r),Ft(c),s.head.appendChild(c)}}}function A2(r,a,s){Hr.S(r,a,s);var c=io;if(c&&r){var m=Ta(c).hoistableStyles,g=ao(r);a=a||"default";var S=m.get(g);if(!S){var k={loading:0,preload:null};if(S=c.querySelector(Os(g)))k.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":a},s),(s=Xn.get(g))&&fh(r,s);var M=S=c.createElement("link");Ft(M),Jt(M,"link",r),M._p=new Promise(function(I,X){M.onload=I,M.onerror=X}),M.addEventListener("load",function(){k.loading|=1}),M.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Ru(S,a,c)}S={type:"stylesheet",instance:S,count:1,state:k},m.set(g,S)}}}function j2(r,a){Hr.X(r,a);var s=io;if(s&&r){var c=Ta(s).hoistableScripts,m=oo(r),g=c.get(m);g||(g=s.querySelector(Rs(m)),g||(r=y({src:r,async:!0},a),(a=Xn.get(m))&&dh(r,a),g=s.createElement("script"),Ft(g),Jt(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function N2(r,a){Hr.M(r,a);var s=io;if(s&&r){var c=Ta(s).hoistableScripts,m=oo(r),g=c.get(m);g||(g=s.querySelector(Rs(m)),g||(r=y({src:r,async:!0,type:"module"},a),(a=Xn.get(m))&&dh(r,a),g=s.createElement("script"),Ft(g),Jt(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function yb(r,a,s,c){var m=(m=pe.current)?Ou(m):null;if(!m)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=ao(s.href),s=Ta(m).hoistableStyles,c=s.get(a),c||(c={type:"style",instance:null,count:0,state:null},s.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ao(s.href);var g=Ta(m).hoistableStyles,S=g.get(r);if(S||(m=m.ownerDocument||m,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,S),(g=m.querySelector(Os(r)))&&!g._p&&(S.instance=g,S.state.loading=5),Xn.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Xn.set(r,s),g||O2(m,r,s,S.state))),a&&c===null)throw Error(i(528,""));return S}if(a&&c!==null)throw Error(i(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=oo(s),s=Ta(m).hoistableScripts,c=s.get(a),c||(c={type:"script",instance:null,count:0,state:null},s.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function ao(r){return'href="'+Zn(r)+'"'}function Os(r){return'link[rel="stylesheet"]['+r+"]"}function xb(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function O2(r,a,s,c){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=r.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Jt(a,"link",s),Ft(a),r.head.appendChild(a))}function oo(r){return'[src="'+Zn(r)+'"]'}function Rs(r){return"script[async]"+r}function vb(r,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var c=r.querySelector('style[data-href~="'+Zn(s.href)+'"]');if(c)return a.instance=c,Ft(c),c;var m=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Ft(c),Jt(c,"style",m),Ru(c,s.precedence,r),a.instance=c;case"stylesheet":m=ao(s.href);var g=r.querySelector(Os(m));if(g)return a.state.loading|=4,a.instance=g,Ft(g),g;c=xb(s),(m=Xn.get(m))&&fh(c,m),g=(r.ownerDocument||r).createElement("link"),Ft(g);var S=g;return S._p=new Promise(function(k,M){S.onload=k,S.onerror=M}),Jt(g,"link",c),a.state.loading|=4,Ru(g,s.precedence,r),a.instance=g;case"script":return g=oo(s.src),(m=r.querySelector(Rs(g)))?(a.instance=m,Ft(m),m):(c=s,(m=Xn.get(g))&&(c=y({},s),dh(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),Ft(m),Jt(m,"link",c),r.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,Ru(c,s.precedence,r));return a.instance}function Ru(r,a,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,g=m,S=0;S<c.length;S++){var k=c[S];if(k.dataset.precedence===a)g=k;else if(g!==m)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(r,a.firstChild))}function fh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function dh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Mu=null;function bb(r,a,s){if(Mu===null){var c=new Map,m=Mu=new Map;m.set(s,c)}else m=Mu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var g=s[m];if(!(g[Xo]||g[Gt]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(a)||"";S=r+S;var k=c.get(S);k?k.push(g):c.set(S,[g])}}return c}function Sb(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function R2(r,a,s){if(s===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function kb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function M2(r,a,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ao(c.href),g=a.querySelector(Os(m));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Du.bind(r),a.then(r,r)),s.state.loading|=4,s.instance=g,Ft(g);return}g=a.ownerDocument||a,c=xb(c),(m=Xn.get(m))&&fh(c,m),g=g.createElement("link"),Ft(g);var S=g;S._p=new Promise(function(k,M){S.onload=k,S.onerror=M}),Jt(g,"link",c),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Du.bind(r),a.addEventListener("load",s),a.addEventListener("error",s))}}var hh=0;function D2(r,a){return r.stylesheets&&r.count===0&&Lu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&Lu(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&hh===0&&(hh=62500*p2());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Lu(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>hh?50:800)+a);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var $u=null;function Lu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,$u=new Map,a.forEach($2,r),$u=null,Du.call(r))}function $2(r,a){if(!(a.state.loading&4)){var s=$u.get(r);if(s)var c=s.get(null);else{s=new Map,$u.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var S=m[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(s.set(S.dataset.precedence,S),c=S)}c&&s.set(null,c)}m=a.instance,S=m.getAttribute("data-precedence"),g=s.get(S)||c,g===c&&s.set(null,m),s.set(S,m),this.count++,c=Du.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),g?g.parentNode.insertBefore(m,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),a.state.loading|=4}}var Ms={$$typeof:A,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function L2(r,a,s,c,m,g,S,k,M){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lf(0),this.hiddenUpdates=lf(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function wb(r,a,s,c,m,g,S,k,M,I,X,ee){return r=new L2(r,a,s,S,M,I,X,ee,k),a=1,g===!0&&(a|=24),g=Cn(3,null,null,a),r.current=g,g.stateNode=r,a=qf(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:a},Kf(g),r}function zb(r){return r?(r=La,r):La}function _b(r,a,s,c,m,g){m=zb(m),c.context===null?c.context=m:c.pendingContext=m,c=oi(a),c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=si(r,c,a),s!==null&&(bn(s,r,a),ds(s,r,a))}function Eb(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<a?s:a}}function mh(r,a){Eb(r,a),(r=r.alternate)&&Eb(r,a)}function Tb(r){if(r.tag===13||r.tag===31){var a=Hi(r,67108864);a!==null&&bn(a,r,67108864),mh(r,67108864)}}function Cb(r){if(r.tag===13||r.tag===31){var a=Rn();a=uf(a);var s=Hi(r,a);s!==null&&bn(s,r,a),mh(r,a)}}var Uu=!0;function U2(r,a,s,c){var m=P.T;P.T=null;var g=Y.p;try{Y.p=2,ph(r,a,s,c)}finally{Y.p=g,P.T=m}}function P2(r,a,s,c){var m=P.T;P.T=null;var g=Y.p;try{Y.p=8,ph(r,a,s,c)}finally{Y.p=g,P.T=m}}function ph(r,a,s,c){if(Uu){var m=gh(c);if(m===null)th(r,a,c,Pu,s),jb(r,c);else if(Z2(m,r,a,s,c))c.stopPropagation();else if(jb(r,c),a&4&&-1<V2.indexOf(r)){for(;m!==null;){var g=Ea(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=Pi(g.pendingLanes);if(S!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;S;){var M=1<<31-nt(S);k.entanglements[1]|=M,S&=~M}yr(g),(He&6)===0&&(Su=lt()+500,Cs(0))}}break;case 31:case 13:k=Hi(g,2),k!==null&&bn(k,g,2),wu(),mh(g,2)}if(g=gh(c),g===null&&th(r,a,c,Pu,s),g===m)break;m=g}m!==null&&c.stopPropagation()}else th(r,a,c,null,s)}}function gh(r){return r=xf(r),yh(r)}var Pu=null;function yh(r){if(Pu=null,r=_a(r),r!==null){var a=u(r);if(a===null)r=null;else{var s=a.tag;if(s===13){if(r=l(a),r!==null)return r;r=null}else if(s===31){if(r=f(a),r!==null)return r;r=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Pu=r,null}function Ab(r){switch(r){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wa()){case J:return 2;case se:return 8;case ye:case ze:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var xh=!1,xi=null,vi=null,bi=null,Ds=new Map,$s=new Map,Si=[],V2="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".split(" ");function jb(r,a){switch(r){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":Ds.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(a.pointerId)}}function Ls(r,a,s,c,m,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[m]},a!==null&&(a=Ea(a),a!==null&&Tb(a)),r):(r.eventSystemFlags|=c,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function Z2(r,a,s,c,m){switch(a){case"focusin":return xi=Ls(xi,r,a,s,c,m),!0;case"dragenter":return vi=Ls(vi,r,a,s,c,m),!0;case"mouseover":return bi=Ls(bi,r,a,s,c,m),!0;case"pointerover":var g=m.pointerId;return Ds.set(g,Ls(Ds.get(g)||null,r,a,s,c,m)),!0;case"gotpointercapture":return g=m.pointerId,$s.set(g,Ls($s.get(g)||null,r,a,s,c,m)),!0}return!1}function Nb(r){var a=_a(r.target);if(a!==null){var s=u(a);if(s!==null){if(a=s.tag,a===13){if(a=l(s),a!==null){r.blockedOn=a,Fg(r.priority,function(){Cb(s)});return}}else if(a===31){if(a=f(s),a!==null){r.blockedOn=a,Fg(r.priority,function(){Cb(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Vu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var s=gh(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);yf=c,s.target.dispatchEvent(c),yf=null}else return a=Ea(s),a!==null&&Tb(a),r.blockedOn=s,!1;a.shift()}return!0}function Ob(r,a,s){Vu(r)&&s.delete(a)}function B2(){xh=!1,xi!==null&&Vu(xi)&&(xi=null),vi!==null&&Vu(vi)&&(vi=null),bi!==null&&Vu(bi)&&(bi=null),Ds.forEach(Ob),$s.forEach(Ob)}function Zu(r,a){r.blockedOn===a&&(r.blockedOn=null,xh||(xh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,B2)))}var Bu=null;function Rb(r){Bu!==r&&(Bu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Bu===r&&(Bu=null);for(var a=0;a<r.length;a+=3){var s=r[a],c=r[a+1],m=r[a+2];if(typeof c!="function"){if(yh(c||s)===null)continue;break}var g=Ea(s);g!==null&&(r.splice(a,3),a-=3,gd(g,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function so(r){function a(M){return Zu(M,r)}xi!==null&&Zu(xi,r),vi!==null&&Zu(vi,r),bi!==null&&Zu(bi,r),Ds.forEach(a),$s.forEach(a);for(var s=0;s<Si.length;s++){var c=Si[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Si.length&&(s=Si[0],s.blockedOn===null);)Nb(s),s.blockedOn===null&&Si.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],g=s[c+1],S=m[mn]||null;if(typeof g=="function")S||Rb(s);else if(S){var k=null;if(g&&g.hasAttribute("formAction")){if(m=g,S=g[mn]||null)k=S.formAction;else if(yh(m)!==null)continue}else k=S.action;typeof k=="function"?s[c+1]=k:(s.splice(c,3),c-=3),Rb(s)}}}function Mb(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(S){return m=S})},focusReset:"manual",scroll:"manual"})}function a(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),m!==null&&(m(),m=null)}}}function vh(r){this._internalRoot=r}Iu.prototype.render=vh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var s=a.current,c=Rn();_b(s,c,r,a,null,null)},Iu.prototype.unmount=vh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;_b(r.current,2,null,r,null,null),wu(),a[za]=null}};function Iu(r){this._internalRoot=r}Iu.prototype.unstable_scheduleHydration=function(r){if(r){var a=Hg();r={blockedOn:null,target:r,priority:a};for(var s=0;s<Si.length&&a!==0&&a<Si[s].priority;s++);Si.splice(s,0,r),s===0&&Nb(r)}};var Db=t.version;if(Db!=="19.2.4")throw Error(i(527,Db,"19.2.4"));Y.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var I2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{sn=Hu.inject(I2),Vt=Hu}catch{}}return Ps.createRoot=function(r,a){if(!o(r))throw Error(i(299));var s=!1,c="",m=Bx,g=Ix,S=Hx;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),a=wb(r,1,!1,null,null,s,c,null,m,g,S,Mb),r[za]=a.current,eh(r),new vh(a)},Ps.hydrateRoot=function(r,a,s){if(!o(r))throw Error(i(299));var c=!1,m="",g=Bx,S=Ix,k=Hx,M=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(S=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError),s.formState!==void 0&&(M=s.formState)),a=wb(r,1,!0,a,s??null,c,m,M,g,S,k,Mb),a.context=zb(null),s=a.current,c=Rn(),c=uf(c),m=oi(c),m.callback=null,si(s,m,c),s=c,a.current.lanes=s,Yo(a,s),yr(a),r[za]=a.current,eh(r),new Iu(a)},Ps.version="19.2.4",Ps}var Fb;function W2(){if(Fb)return kh.exports;Fb=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(),kh.exports=Q2(),kh.exports}var eC=W2();var qb="popstate";function tC(e={}){function t(i,o){let{pathname:u,search:l,hash:f}=i.location;return Sm("",{pathname:u,search:l,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){return typeof o=="string"?o:ol(o)}return rC(t,n,null,e)}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nC(){return Math.random().toString(36).substring(2,10)}function Gb(e,t){return{usr:e.state,key:e.key,idx:t}}function Sm(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Do(t):t,state:n,key:t&&t.key||i||nC()}}function ol({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 Do(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 rC(e,t,n,i={}){let{window:o=document.defaultView,v5Compat:u=!1}=i,l=o.history,f="POP",d=null,h=p();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function p(){return(l.state||{idx:null}).idx}function y(){f="POP";let C=p(),j=C==null?null:C-h;h=C,d&&d({action:f,location:z.location,delta:j})}function x(C,j){f="PUSH";let O=Sm(z.location,C,j);h=p()+1;let A=Gb(O,h),R=z.createHref(O);try{l.pushState(A,"",R)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(R)}u&&d&&d({action:f,location:z.location,delta:1})}function b(C,j){f="REPLACE";let O=Sm(z.location,C,j);h=p();let A=Gb(O,h),R=z.createHref(O);l.replaceState(A,"",R),u&&d&&d({action:f,location:z.location,delta:0})}function _(C){return iC(C)}let z={get action(){return f},get location(){return e(o,l)},listen(C){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(qb,y),d=C,()=>{o.removeEventListener(qb,y),d=null}},createHref(C){return t(o,C)},createURL:_,encodeLocation(C){let j=_(C);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:x,replace:b,go(C){return l.go(C)}};return z}function iC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:ol(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function dk(e,t,n="/"){return aC(e,t,n,!1)}function aC(e,t,n,i){let o=typeof t=="string"?Do(t):t,u=Kr(o.pathname||"/",n);if(u==null)return null;let l=hk(e);oC(l);let f=null;for(let d=0;f==null&&d<l.length;++d){let h=yC(u);f=pC(l[d],h,i)}return f}function hk(e,t=[],n=[],i="",o=!1){let u=(l,f,d=o,h)=>{let p={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:f,route:l};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(i)&&d)return;mt(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length)}let y=Yr([i,p.relativePath]),x=n.concat(p);l.children&&l.children.length>0&&(mt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),hk(l.children,t,x,y,d)),!(l.path==null&&!l.index)&&t.push({path:y,score:hC(y,l.index),routesMeta:x})};return e.forEach((l,f)=>{if(l.path===""||!l.path?.includes("?"))u(l,f);else for(let d of mk(l.path))u(l,f,!0,d)}),t}function mk(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,o=n.endsWith("?"),u=n.replace(/\?$/,"");if(i.length===0)return o?[u,""]:[u];let l=mk(i.join("/")),f=[];return f.push(...l.map(d=>d===""?u:[u,d].join("/"))),o&&f.push(...l),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function oC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mC(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var sC=/^:[\w-]+$/,lC=3,uC=2,cC=1,fC=10,dC=-2,Yb=e=>e==="*";function hC(e,t){let n=e.split("/"),i=n.length;return n.some(Yb)&&(i+=dC),t&&(i+=uC),n.filter(o=>!Yb(o)).reduce((o,u)=>o+(sC.test(u)?lC:u===""?cC:fC),i)}function mC(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function pC(e,t,n=!1){let{routesMeta:i}=e,o={},u="/",l=[];for(let f=0;f<i.length;++f){let d=i[f],h=f===i.length-1,p=u==="/"?t:t.slice(u.length)||"/",y=bc({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},p),x=d.route;if(!y&&h&&n&&!i[i.length-1].route.index&&(y=bc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!y)return null;Object.assign(o,y.params),l.push({params:o,pathname:Yr([u,y.pathname]),pathnameBase:SC(Yr([u,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(u=Yr([u,y.pathnameBase]))}return l}function bc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=gC(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let u=o[0],l=u.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:i.reduce((h,{paramName:p,isOptional:y},x)=>{if(p==="*"){let _=f[x]||"";l=u.slice(0,u.length-_.length).replace(/(.)\/+$/,"$1")}const b=f[x];return y&&!b?h[p]=void 0:h[p]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:l,pattern:e}}function gC(e,t=!1,n=!0){fr(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,f,d)=>(i.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function yC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fr(!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 Kr(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)||"/"}var xC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function vC(e,t="/"){let{pathname:n,search:i="",hash:o=""}=typeof e=="string"?Do(e):e,u;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?u=Xb(n.substring(1),"/"):u=Xb(n,t)):u=t,{pathname:u,search:kC(i),hash:wC(o)}}function Xb(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Eh(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 bC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function wp(e){let t=bC(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function zp(e,t,n,i=!1){let o;typeof e=="string"?o=Do(e):(o={...e},mt(!o.pathname||!o.pathname.includes("?"),Eh("?","pathname","search",o)),mt(!o.pathname||!o.pathname.includes("#"),Eh("#","pathname","hash",o)),mt(!o.search||!o.search.includes("#"),Eh("#","search","hash",o)));let u=e===""||o.pathname==="",l=u?"/":o.pathname,f;if(l==null)f=n;else{let y=t.length-1;if(!i&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),y-=1;o.pathname=x.join("/")}f=y>=0?t[y]:"/"}let d=vC(o,f),h=l&&l!=="/"&&l.endsWith("/"),p=(u||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||p)&&(d.pathname+="/"),d}var Yr=e=>e.join("/").replace(/\/\/+/g,"/"),SC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,zC=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 _C(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function EC(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var pk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function gk(e,t){let n=e;if(typeof n!="string"||!xC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,o=!1;if(pk)try{let u=new URL(window.location.href),l=n.startsWith("//")?new URL(u.protocol+n):new URL(n),f=Kr(l.pathname,t);l.origin===u.origin&&f!=null?n=f+l.search+l.hash:o=!0}catch{fr(!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:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var yk=["POST","PUT","PATCH","DELETE"];new Set(yk);var TC=["GET",...yk];new Set(TC);var $o=E.createContext(null);$o.displayName="DataRouter";var Vc=E.createContext(null);Vc.displayName="DataRouterState";var CC=E.createContext(!1),xk=E.createContext({isTransitioning:!1});xk.displayName="ViewTransition";var AC=E.createContext(new Map);AC.displayName="Fetchers";var jC=E.createContext(null);jC.displayName="Await";var $n=E.createContext(null);$n.displayName="Navigation";var bl=E.createContext(null);bl.displayName="Location";var _r=E.createContext({outlet:null,matches:[],isDataRoute:!1});_r.displayName="Route";var _p=E.createContext(null);_p.displayName="RouteError";var vk="REACT_ROUTER_ERROR",NC="REDIRECT",OC="ROUTE_ERROR_RESPONSE";function RC(e){if(e.startsWith(`${vk}:${NC}:{`))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 MC(e){if(e.startsWith(`${vk}:${OC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new zC(t.status,t.statusText,t.data)}catch{}}function DC(e,{relative:t}={}){mt(Lo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=E.useContext($n),{hash:o,pathname:u,search:l}=Sl(e,{relative:t}),f=u;return n!=="/"&&(f=u==="/"?n:Yr([n,u])),i.createHref({pathname:f,search:l,hash:o})}function Lo(){return E.useContext(bl)!=null}function dr(){return mt(Lo(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(bl).location}var bk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Sk(e){E.useContext($n).static||E.useLayoutEffect(e)}function Ep(){let{isDataRoute:e}=E.useContext(_r);return e?YC():$C()}function $C(){mt(Lo(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext($o),{basename:t,navigator:n}=E.useContext($n),{matches:i}=E.useContext(_r),{pathname:o}=dr(),u=JSON.stringify(wp(i)),l=E.useRef(!1);return Sk(()=>{l.current=!0}),E.useCallback((d,h={})=>{if(fr(l.current,bk),!l.current)return;if(typeof d=="number"){n.go(d);return}let p=zp(d,JSON.parse(u),o,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Yr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,u,o,e])}E.createContext(null);function Sl(e,{relative:t}={}){let{matches:n}=E.useContext(_r),{pathname:i}=dr(),o=JSON.stringify(wp(n));return E.useMemo(()=>zp(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function LC(e,t){return kk(e,t)}function kk(e,t,n,i,o){mt(Lo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=E.useContext($n),{matches:l}=E.useContext(_r),f=l[l.length-1],d=f?f.params:{},h=f?f.pathname:"/",p=f?f.pathnameBase:"/",y=f&&f.route;{let O=y&&y.path||"";zk(h,!y||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${O}">) 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="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let x=dr(),b;if(t){let O=typeof t=="string"?Do(t):t;mt(p==="/"||O.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${O.pathname}" was given in the \`location\` prop.`),b=O}else b=x;let _=b.pathname||"/",z=_;if(p!=="/"){let O=p.replace(/^\//,"").split("/");z="/"+_.replace(/^\//,"").split("/").slice(O.length).join("/")}let C=dk(e,{pathname:z});fr(y||C!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),fr(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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.`);let j=BC(C&&C.map(O=>Object.assign({},O,{params:Object.assign({},d,O.params),pathname:Yr([p,u.encodeLocation?u.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?p:Yr([p,u.encodeLocation?u.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),l,n,i,o);return t&&j?E.createElement(bl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},j):j}function UC(){let e=GC(),t=_C(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)",o={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:u},"ErrorBoundary")," or"," ",E.createElement("code",{style:u},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:o},n):null,l)}var PC=E.createElement(UC,null),wk=class extends E.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=MC(e.digest);n&&(e=n)}let t=e!==void 0?E.createElement(_r.Provider,{value:this.props.routeContext},E.createElement(_p.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(VC,{error:e},t):t}};wk.contextType=CC;var Th=new WeakMap;function VC({children:e,error:t}){let{basename:n}=E.useContext($n);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=RC(t.digest);if(i){let o=Th.get(t);if(o)throw o;let u=gk(i.location,n);if(pk&&!Th.get(t))if(u.isExternal||i.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw Th.set(t,l),l}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function ZC({routeContext:e,match:t,children:n}){let i=E.useContext($o);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(_r.Provider,{value:e},n)}function BC(e,t=[],n=null,i=null,o=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 u=e,l=n?.errors;if(l!=null){let p=u.findIndex(y=>y.route.id&&l?.[y.route.id]!==void 0);mt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),u=u.slice(0,Math.min(u.length,p+1))}let f=!1,d=-1;if(n)for(let p=0;p<u.length;p++){let y=u[p];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(d=p),y.route.id){let{loaderData:x,errors:b}=n,_=y.route.loader&&!x.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||_){f=!0,d>=0?u=u.slice(0,d+1):u=[u[0]];break}}}let h=n&&i?(p,y)=>{i(p,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:EC(n.matches),errorInfo:y})}:void 0;return u.reduceRight((p,y,x)=>{let b,_=!1,z=null,C=null;n&&(b=l&&y.route.id?l[y.route.id]:void 0,z=y.route.errorElement||PC,f&&(d<0&&x===0?(zk("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,C=null):d===x&&(_=!0,C=y.route.hydrateFallbackElement||null)));let j=t.concat(u.slice(0,x+1)),O=()=>{let A;return b?A=z:_?A=C:y.route.Component?A=E.createElement(y.route.Component,null):y.route.element?A=y.route.element:A=p,E.createElement(ZC,{match:y,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:A})};return n&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?E.createElement(wk,{location:n.location,revalidation:n.revalidation,component:z,error:b,children:O(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):O()},null)}function Tp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function IC(e){let t=E.useContext($o);return mt(t,Tp(e)),t}function HC(e){let t=E.useContext(Vc);return mt(t,Tp(e)),t}function FC(e){let t=E.useContext(_r);return mt(t,Tp(e)),t}function Cp(e){let t=FC(e),n=t.matches[t.matches.length-1];return mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function qC(){return Cp("useRouteId")}function GC(){let e=E.useContext(_p),t=HC("useRouteError"),n=Cp("useRouteError");return e!==void 0?e:t.errors?.[n]}function YC(){let{router:e}=IC("useNavigate"),t=Cp("useNavigate"),n=E.useRef(!1);return Sk(()=>{n.current=!0}),E.useCallback(async(o,u={})=>{fr(n.current,bk),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var Kb={};function zk(e,t,n){!t&&!Kb[e]&&(Kb[e]=!0,fr(!1,n))}E.memo(XC);function XC({routes:e,future:t,state:n,onError:i}){return kk(e,void 0,n,i,t)}function _k({to:e,replace:t,state:n,relative:i}){mt(Lo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=E.useContext($n);fr(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=E.useContext(_r),{pathname:l}=dr(),f=Ep(),d=zp(e,wp(u),l,i==="path"),h=JSON.stringify(d);return E.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:i})},[f,h,i,t,n]),null}function ur(e){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function KC({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:o,static:u=!1,unstable_useTransitions:l}){mt(!Lo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=E.useMemo(()=>({basename:f,navigator:o,static:u,unstable_useTransitions:l,future:{}}),[f,o,u,l]);typeof n=="string"&&(n=Do(n));let{pathname:h="/",search:p="",hash:y="",state:x=null,key:b="default"}=n,_=E.useMemo(()=>{let z=Kr(h,f);return z==null?null:{location:{pathname:z,search:p,hash:y,state:x,key:b},navigationType:i}},[f,h,p,y,x,b,i]);return fr(_!=null,`<Router basename="${f}"> is not able to match the URL "${h}${p}${y}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:E.createElement($n.Provider,{value:d},E.createElement(bl.Provider,{children:t,value:_}))}function Jb({children:e,location:t}){return LC(km(e),t)}function km(e,t=[]){let n=[];return E.Children.forEach(e,(i,o)=>{if(!E.isValidElement(i))return;let u=[...t,o];if(i.type===E.Fragment){n.push.apply(n,km(i.props.children,u));return}mt(i.type===ur,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=km(i.props.children,u)),n.push(l)}),n}var dc="get",hc="application/x-www-form-urlencoded";function Zc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function JC(e){return Zc(e)&&e.tagName.toLowerCase()==="button"}function QC(e){return Zc(e)&&e.tagName.toLowerCase()==="form"}function WC(e){return Zc(e)&&e.tagName.toLowerCase()==="input"}function eA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tA(e,t){return e.button===0&&(!t||t==="_self")&&!eA(e)}var Fu=null;function nA(){if(Fu===null)try{new FormData(document.createElement("form"),0),Fu=!1}catch{Fu=!0}return Fu}var rA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ch(e){return e!=null&&!rA.has(e)?(fr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hc}"`),null):e}function iA(e,t){let n,i,o,u,l;if(QC(e)){let f=e.getAttribute("action");i=f?Kr(f,t):null,n=e.getAttribute("method")||dc,o=Ch(e.getAttribute("enctype"))||hc,u=new FormData(e)}else if(JC(e)||WC(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(i=d?Kr(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||dc,o=Ch(e.getAttribute("formenctype"))||Ch(f.getAttribute("enctype"))||hc,u=new FormData(f,e),!nA()){let{name:h,type:p,value:y}=e;if(p==="image"){let x=h?`${h}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else h&&u.append(h,y)}}else{if(Zc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=dc,i=null,o=hc,l=e}return u&&o==="text/plain"&&(l=u,u=void 0),{action:i,method:n.toLowerCase(),encType:o,formData:u,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ap(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function aA(e,t,n,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&Kr(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function oA(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 sA(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 lA(e,t,n){let i=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let l=await oA(u,n);return l.links?l.links():[]}return[]}));return dA(i.flat(1).filter(sA).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Qb(e,t,n,i,o,u){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,f=(d,h)=>n[h].pathname!==d.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==d.params["*"];return u==="assets"?t.filter((d,h)=>l(d,h)||f(d,h)):u==="data"?t.filter((d,h)=>{let p=i.routes[d.route.id];if(!p||!p.hasLoader)return!1;if(l(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function uA(e,t,{includeHydrateFallback:n}={}){return cA(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function cA(e){return[...new Set(e)]}function fA(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function dA(e,t){let n=new Set;return new Set(t),e.reduce((i,o)=>{let u=JSON.stringify(fA(o));return n.has(u)||(n.add(u),i.push({key:u,link:o})),i},[])}function Ek(){let e=E.useContext($o);return Ap(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function hA(){let e=E.useContext(Vc);return Ap(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jp=E.createContext(void 0);jp.displayName="FrameworkContext";function Tk(){let e=E.useContext(jp);return Ap(e,"You must render this element inside a <HydratedRouter> element"),e}function mA(e,t){let n=E.useContext(jp),[i,o]=E.useState(!1),[u,l]=E.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:p,onTouchStart:y}=t,x=E.useRef(null);E.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let z=j=>{j.forEach(O=>{l(O.isIntersecting)})},C=new IntersectionObserver(z,{threshold:.5});return x.current&&C.observe(x.current),()=>{C.disconnect()}}},[e]),E.useEffect(()=>{if(i){let z=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(z)}}},[i]);let b=()=>{o(!0)},_=()=>{o(!1),l(!1)};return n?e!=="intent"?[u,x,{}]:[u,x,{onFocus:Vs(f,b),onBlur:Vs(d,_),onMouseEnter:Vs(h,b),onMouseLeave:Vs(p,_),onTouchStart:Vs(y,b)}]:[!1,x,{}]}function Vs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pA({page:e,...t}){let{router:n}=Ek(),i=E.useMemo(()=>dk(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?E.createElement(yA,{page:e,matches:i,...t}):null}function gA(e){let{manifest:t,routeModules:n}=Tk(),[i,o]=E.useState([]);return E.useEffect(()=>{let u=!1;return lA(e,t,n).then(l=>{u||o(l)}),()=>{u=!0}},[e,t,n]),i}function yA({page:e,matches:t,...n}){let i=dr(),{future:o,manifest:u,routeModules:l}=Tk(),{basename:f}=Ek(),{loaderData:d,matches:h}=hA(),p=E.useMemo(()=>Qb(e,t,h,u,i,"data"),[e,t,h,u,i]),y=E.useMemo(()=>Qb(e,t,h,u,i,"assets"),[e,t,h,u,i]),x=E.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let z=new Set,C=!1;if(t.forEach(O=>{let A=u.routes[O.route.id];!A||!A.hasLoader||(!p.some(R=>R.route.id===O.route.id)&&O.route.id in d&&l[O.route.id]?.shouldRevalidate||A.hasClientLoader?C=!0:z.add(O.route.id))}),z.size===0)return[];let j=aA(e,f,o.unstable_trailingSlashAwareDataRequests,"data");return C&&z.size>0&&j.searchParams.set("_routes",t.filter(O=>z.has(O.route.id)).map(O=>O.route.id).join(",")),[j.pathname+j.search]},[f,o.unstable_trailingSlashAwareDataRequests,d,i,u,p,t,e,l]),b=E.useMemo(()=>uA(y,u),[y,u]),_=gA(y);return E.createElement(E.Fragment,null,x.map(z=>E.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...n})),b.map(z=>E.createElement("link",{key:z,rel:"modulepreload",href:z,...n})),_.map(({key:z,link:C})=>E.createElement("link",{key:z,nonce:n.nonce,...C,crossOrigin:C.crossOrigin??n.crossOrigin})))}function xA(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var vA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vA&&(window.__reactRouterVersion="7.13.0")}catch{}function bA({basename:e,children:t,unstable_useTransitions:n,window:i}){let o=E.useRef();o.current==null&&(o.current=tC({window:i,v5Compat:!0}));let u=o.current,[l,f]=E.useState({action:u.action,location:u.location}),d=E.useCallback(h=>{n===!1?f(h):E.startTransition(()=>f(h))},[n]);return E.useLayoutEffect(()=>u.listen(d),[u,d]),E.createElement(KC,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,unstable_useTransitions:n})}var Ck=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mo=E.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:o,reloadDocument:u,replace:l,state:f,target:d,to:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},_){let{basename:z,unstable_useTransitions:C}=E.useContext($n),j=typeof h=="string"&&Ck.test(h),O=gk(h,z);h=O.to;let A=DC(h,{relative:o}),[R,L,$]=mA(i,b),G=zA(h,{replace:l,state:f,target:d,preventScrollReset:p,relative:o,viewTransition:y,unstable_defaultShouldRevalidate:x,unstable_useTransitions:C});function V(ue){t&&t(ue),ue.defaultPrevented||G(ue)}let K=E.createElement("a",{...b,...$,href:O.absoluteURL||A,onClick:O.isExternal||u?t:V,ref:xA(_,L),target:d,"data-discover":!j&&n==="render"?"true":void 0});return R&&!j?E.createElement(E.Fragment,null,K,E.createElement(pA,{page:A})):K});mo.displayName="Link";var SA=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:o=!1,style:u,to:l,viewTransition:f,children:d,...h},p){let y=Sl(l,{relative:h.relative}),x=dr(),b=E.useContext(Vc),{navigator:_,basename:z}=E.useContext($n),C=b!=null&&AA(y)&&f===!0,j=_.encodeLocation?_.encodeLocation(y).pathname:y.pathname,O=x.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(O=O.toLowerCase(),A=A?A.toLowerCase():null,j=j.toLowerCase()),A&&z&&(A=Kr(A,z)||A);const R=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let L=O===j||!o&&O.startsWith(j)&&O.charAt(R)==="/",$=A!=null&&(A===j||!o&&A.startsWith(j)&&A.charAt(j.length)==="/"),G={isActive:L,isPending:$,isTransitioning:C},V=L?t:void 0,K;typeof i=="function"?K=i(G):K=[i,L?"active":null,$?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let ue=typeof u=="function"?u(G):u;return E.createElement(mo,{...h,"aria-current":V,className:K,ref:p,style:ue,to:l,viewTransition:f},typeof d=="function"?d(G):d)});SA.displayName="NavLink";var kA=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:o,state:u,method:l=dc,action:f,onSubmit:d,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},_)=>{let{unstable_useTransitions:z}=E.useContext($n),C=TA(),j=CA(f,{relative:h}),O=l.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&Ck.test(f),R=L=>{if(d&&d(L),L.defaultPrevented)return;L.preventDefault();let $=L.nativeEvent.submitter,G=$?.getAttribute("formmethod")||l,V=()=>C($||L.currentTarget,{fetcherKey:t,method:G,navigate:n,replace:o,state:u,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:x});z&&n!==!1?E.startTransition(()=>V()):V()};return E.createElement("form",{ref:_,method:O,action:j,onSubmit:i?d:R,...b,"data-discover":!A&&e==="render"?"true":void 0})});kA.displayName="Form";function wA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ak(e){let t=E.useContext($o);return mt(t,wA(e)),t}function zA(e,{target:t,replace:n,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f,unstable_useTransitions:d}={}){let h=Ep(),p=dr(),y=Sl(e,{relative:u});return E.useCallback(x=>{if(tA(x,t)){x.preventDefault();let b=n!==void 0?n:ol(p)===ol(y),_=()=>h(e,{replace:b,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f});d?E.startTransition(()=>_()):_()}},[p,h,y,n,i,t,e,o,u,l,f,d])}var _A=0,EA=()=>`__${String(++_A)}__`;function TA(){let{router:e}=Ak("useSubmit"),{basename:t}=E.useContext($n),n=qC(),i=e.fetch,o=e.navigate;return E.useCallback(async(u,l={})=>{let{action:f,method:d,encType:h,formData:p,body:y}=iA(u,t);if(l.navigate===!1){let x=l.fetcherKey||EA();await i(x,n,l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:y,formMethod:l.method||d,formEncType:l.encType||h,flushSync:l.flushSync})}else await o(l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:y,formMethod:l.method||d,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,o,t,n])}function CA(e,{relative:t}={}){let{basename:n}=E.useContext($n),i=E.useContext(_r);mt(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={...Sl(e||".",{relative:t})},l=dr();if(e==null){u.search=l.search;let f=new URLSearchParams(u.search),d=f.getAll("index");if(d.some(p=>p==="")){f.delete("index"),d.filter(y=>y).forEach(y=>f.append("index",y));let p=f.toString();u.search=p?`?${p}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(u.pathname=u.pathname==="/"?n:Yr([n,u.pathname])),ol(u)}function AA(e,{relative:t}={}){let n=E.useContext(xk);mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Ak("useViewTransitionState"),o=Sl(e,{relative:t});if(!n.isTransitioning)return!1;let u=Kr(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=Kr(n.nextLocation.pathname,i)||n.nextLocation.pathname;return bc(o.pathname,l)!=null||bc(o.pathname,u)!=null}const jk=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const jA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const NA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const Wb=e=>{const t=NA(e);return t.charAt(0).toUpperCase()+t.slice(1)};var OA={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 RA=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const MA=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:u,iconNode:l,...f},d)=>E.createElement("svg",{ref:d,...OA,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:jk("lucide",o),...!u&&!RA(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,p])=>E.createElement(h,p)),...Array.isArray(u)?u:[u]]));const Me=(e,t)=>{const n=E.forwardRef(({className:i,...o},u)=>E.createElement(MA,{ref:u,iconNode:t,className:jk(`lucide-${jA(Wb(e))}`,`lucide-${e}`,i),...o}));return n.displayName=Wb(e),n};const DA=[["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"}]],po=Me("activity",DA);const $A=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],LA=Me("archive",$A);const UA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],PA=Me("arrow-down",UA);const VA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ZA=Me("arrow-up",VA);const BA=[["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"}]],e0=Me("bot",BA);const IA=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],HA=Me("box",IA);const FA=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],qA=Me("brain",FA);const GA=[["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"}]],Nk=Me("calendar",GA);const YA=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],wm=Me("chart-column",YA);const XA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],KA=Me("check",XA);const JA=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ok=Me("clock",JA);const QA=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Rk=Me("cpu",QA);const WA=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],ej=Me("database",WA);const tj=[["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"}]],Mk=Me("eye",tj);const nj=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],rj=Me("file-text",nj);const ij=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],aj=Me("hash",ij);const oj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],sj=Me("info",oj);const lj=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],t0=Me("layout-dashboard",lj);const uj=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],n0=Me("log-out",uj);const cj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],fj=Me("menu",cj);const dj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],r0=Me("message-square-plus",dj);const hj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],sl=Me("message-square",hj);const mj=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Dk=Me("moon",mj);const pj=[["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"}]],gj=Me("pencil",pj);const yj=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],i0=Me("puzzle",yj);const xj=[["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"}]],vj=Me("refresh-cw",xj);const bj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],a0=Me("rotate-ccw",bj);const Sj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kj=Me("search",Sj);const wj=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zj=Me("send",wj);const _j=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o0=Me("settings",_j);const Ej=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],$k=Me("sun",Ej);const Tj=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Cj=Me("tag",Tj);const Aj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],s0=Me("terminal",Aj);const jj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zm=Me("trash-2",jj);const Nj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Oj=Me("trending-up",Nj);const Rj=[["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"}]],Mj=Me("user",Rj);const Dj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$j=Me("x",Dj);var Ah={exports:{}},jh={};var l0;function Lj(){if(l0)return jh;l0=1;var e=Pc();function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue;function f(y,x){var b=x(),_=i({inst:{value:b,getSnapshot:x}}),z=_[0].inst,C=_[1];return u(function(){z.value=b,z.getSnapshot=x,d(z)&&C({inst:z})},[y,b,x]),o(function(){return d(z)&&C({inst:z}),y(function(){d(z)&&C({inst:z})})},[y]),l(b),b}function d(y){var x=y.getSnapshot;y=y.value;try{var b=x();return!n(y,b)}catch{return!0}}function h(y,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return jh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,jh}var u0;function Uj(){return u0||(u0=1,Ah.exports=Lj()),Ah.exports}var c0=Uj();const Lk=0,Uk=1,Pk=2,f0=3;var d0=Object.prototype.hasOwnProperty;function _m(e,t){var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&_m(e[i],t[i]););return i===-1}if(!n||typeof e=="object"){i=0;for(n in e)if(d0.call(e,n)&&++i&&!d0.call(t,n)||!(n in t)||!_m(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const qr=new WeakMap,Gr=()=>{},tn=Gr(),Em=Object,Ve=e=>e===tn,vr=e=>typeof e=="function",Ti=(e,t)=>({...e,...t}),Vk=e=>vr(e.then),Nh={},qu={},Np="undefined",kl=typeof window!=Np,Tm=typeof document!=Np,Pj=kl&&"Deno"in window,Vj=()=>kl&&typeof window.requestAnimationFrame!=Np,Zk=(e,t)=>{const n=qr.get(e);return[()=>!Ve(t)&&e.get(t)||Nh,i=>{if(!Ve(t)){const o=e.get(t);t in qu||(qu[t]=o),n[5](t,Ti(o,i),o||Nh)}},n[6],()=>!Ve(t)&&t in qu?qu[t]:!Ve(t)&&e.get(t)||Nh]};let Cm=!0;const Zj=()=>Cm,[Am,jm]=kl&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gr,Gr],Bj=()=>{const e=Tm&&document.visibilityState;return Ve(e)||e!=="hidden"},Ij=e=>(Tm&&document.addEventListener("visibilitychange",e),Am("focus",e),()=>{Tm&&document.removeEventListener("visibilitychange",e),jm("focus",e)}),Hj=e=>{const t=()=>{Cm=!0,e()},n=()=>{Cm=!1};return Am("online",t),Am("offline",n),()=>{jm("online",t),jm("offline",n)}},Fj={isOnline:Zj,isVisible:Bj},qj={initFocus:Ij,initReconnect:Hj},h0=!kp.useId,zo=!kl||Pj,Gj=e=>Vj()?window.requestAnimationFrame(e):setTimeout(e,1),Oh=zo?E.useEffect:E.useLayoutEffect,Rh=typeof navigator<"u"&&navigator.connection,m0=!zo&&Rh&&(["slow-2g","2g"].includes(Rh.effectiveType)||Rh.saveData),Gu=new WeakMap,Yj=e=>Em.prototype.toString.call(e),Mh=(e,t)=>e===`[object ${t}]`;let Xj=0;const Nm=e=>{const t=typeof e,n=Yj(e),i=Mh(n,"Date"),o=Mh(n,"RegExp"),u=Mh(n,"Object");let l,f;if(Em(e)===e&&!i&&!o){if(l=Gu.get(e),l)return l;if(l=++Xj+"~",Gu.set(e,l),Array.isArray(e)){for(l="@",f=0;f<e.length;f++)l+=Nm(e[f])+",";Gu.set(e,l)}if(u){l="#";const d=Em.keys(e).sort();for(;!Ve(f=d.pop());)Ve(e[f])||(l+=f+":"+Nm(e[f])+",");Gu.set(e,l)}}else l=i?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return l},Op=e=>{if(vr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Nm(e):"",[e,t]};let Kj=0;const Om=()=>++Kj;async function Bk(...e){const[t,n,i,o]=e,u=Ti({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let l=u.populateCache;const f=u.rollbackOnError;let d=u.optimisticData;const h=x=>typeof f=="function"?f(x):f!==!1,p=u.throwOnError;if(vr(n)){const x=n,b=[],_=t.keys();for(const z of _)!/^\$(inf|sub)\$/.test(z)&&x(t.get(z)._k)&&b.push(z);return Promise.all(b.map(y))}return y(n);async function y(x){const[b]=Op(x);if(!b)return;const[_,z]=Zk(t,b),[C,j,O,A]=qr.get(t),R=()=>{const le=C[b];return(vr(u.revalidate)?u.revalidate(_().data,x):u.revalidate!==!1)&&(delete O[b],delete A[b],le&&le[0])?le[0](Pk).then(()=>_().data):_().data};if(e.length<3)return R();let L=i,$,G=!1;const V=Om();j[b]=[V,0];const K=!Ve(d),ue=_(),re=ue.data,oe=ue._c,ke=Ve(oe)?re:oe;if(K&&(d=vr(d)?d(ke,re):d,z({data:d,_c:ke})),vr(L))try{L=L(ke)}catch(le){$=le,G=!0}if(L&&Vk(L))if(L=await L.catch(le=>{$=le,G=!0}),V!==j[b][0]){if(G)throw $;return L}else G&&K&&h($)&&(l=!0,z({data:ke,_c:tn}));if(l&&!G)if(vr(l)){const le=l(L,ke);z({data:le,error:tn,_c:tn})}else z({data:L,error:tn,_c:tn});if(j[b][1]=Om(),Promise.resolve(R()).then(()=>{z({_c:tn})}),G){if(p)throw $;return}return L}}const p0=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Jj=(e,t)=>{if(!qr.has(e)){const n=Ti(qj,t),i=Object.create(null),o=Bk.bind(tn,e);let u=Gr;const l=Object.create(null),f=(p,y)=>{const x=l[p]||[];return l[p]=x,x.push(y),()=>x.splice(x.indexOf(y),1)},d=(p,y,x)=>{e.set(p,y);const b=l[p];if(b)for(const _ of b)_(y,x)},h=()=>{if(!qr.has(e)&&(qr.set(e,[i,Object.create(null),Object.create(null),Object.create(null),o,d,f]),!zo)){const p=n.initFocus(setTimeout.bind(tn,p0.bind(tn,i,Lk))),y=n.initReconnect(setTimeout.bind(tn,p0.bind(tn,i,Uk)));u=()=>{p&&p(),y&&y(),qr.delete(e)}}};return h(),[e,o,h,u]}return[e,qr.get(e)[4]]},Qj=(e,t,n,i,o)=>{const u=n.errorRetryCount,l=o.retryCount,f=~~((Math.random()+.5)*(1<<(l<8?l:8)))*n.errorRetryInterval;!Ve(u)&&l>u||setTimeout(i,f,o)},Wj=_m,[Ik,Rm]=Jj(new Map),eN=Ti({onLoadingSlow:Gr,onSuccess:Gr,onError:Gr,onErrorRetry:Qj,onDiscarded:Gr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:m0?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:m0?5e3:3e3,compare:Wj,isPaused:()=>!1,cache:Ik,mutate:Rm,fallback:{}},Fj),tN=(e,t)=>{const n=Ti(e,t);if(t){const{use:i,fallback:o}=e,{use:u,fallback:l}=t;i&&u&&(n.use=i.concat(u)),o&&l&&(n.fallback=Ti(o,l))}return n},nN=E.createContext({}),rN="$inf$",Hk=kl&&window.__SWR_DEVTOOLS_USE__,iN=Hk?window.__SWR_DEVTOOLS_USE__:[],aN=()=>{Hk&&(window.__SWR_DEVTOOLS_REACT__=kp)},oN=e=>vr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],sN=()=>{const e=E.useContext(nN);return E.useMemo(()=>Ti(eN,e),[e])},lN=e=>(t,n,i)=>e(t,n&&((...u)=>{const[l]=Op(t),[,,,f]=qr.get(Ik);if(l.startsWith(rN))return n(...u);const d=f[l];return Ve(d)?n(...u):(delete f[l],d)}),i),uN=iN.concat(lN),cN=e=>function(...n){const i=sN(),[o,u,l]=oN(n),f=tN(i,l);let d=e;const{use:h}=f,p=(h||[]).concat(uN);for(let y=p.length;y--;)d=p[y](d);return d(o,u||f.fetcher||null,f)},fN=(e,t,n)=>{const i=t[e]||(t[e]=[]);return i.push(n),()=>{const o=i.indexOf(n);o>=0&&(i[o]=i[i.length-1],i.pop())}};aN();const Dh=kp.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),$h={dedupe:!0},g0=Promise.resolve(tn),dN=(e,t,n)=>{const{cache:i,compare:o,suspense:u,fallbackData:l,revalidateOnMount:f,revalidateIfStale:d,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:y,keepPreviousData:x,strictServerPrefetchWarning:b}=n,[_,z,C,j]=qr.get(i),[O,A]=Op(e),R=E.useRef(!1),L=E.useRef(!1),$=E.useRef(O),G=E.useRef(t),V=E.useRef(n),K=()=>V.current,ue=()=>K().isVisible()&&K().isOnline(),[re,oe,ke,le]=Zk(i,O),ne=E.useRef({}).current,P=Ve(l)?Ve(n.fallback)?tn:n.fallback[O]:l,Y=(Ze,tt)=>{for(const st in ne){const Je=st;if(Je==="data"){if(!o(Ze[Je],tt[Je])&&(!Ve(Ze[Je])||!o(pe,tt[Je])))return!1}else if(tt[Je]!==Ze[Je])return!1}return!0},Z=E.useMemo(()=>{const Ze=!O||!t?!1:Ve(f)?K().isPaused()||u?!1:d!==!1:f,tt=Pt=>{const lt=Ti(Pt);return delete lt._k,Ze?{isValidating:!0,isLoading:!0,...lt}:lt},st=re(),Je=le(),Ht=tt(st),Pn=st===Je?Ht:tt(Je);let _t=Ht;return[()=>{const Pt=tt(re());return Y(Pt,_t)?(_t.data=Pt.data,_t.isLoading=Pt.isLoading,_t.isValidating=Pt.isValidating,_t.error=Pt.error,_t):(_t=Pt,Pt)},()=>Pn]},[i,O]),ce=c0.useSyncExternalStore(E.useCallback(Ze=>ke(O,(tt,st)=>{Y(st,tt)||Ze()}),[i,O]),Z[0],Z[1]),N=!R.current,T=_[O]&&_[O].length>0,q=ce.data,w=Ve(q)?P&&Vk(P)?Dh(P):P:q,ie=ce.error,ve=E.useRef(w),pe=x?Ve(q)?Ve(ve.current)?w:ve.current:q:w,ge=O&&Ve(w),Ge=!zo&&c0.useSyncExternalStore(()=>Gr,()=>!1,()=>!0);b&&Ge&&!u&&ge&&console.warn(`Missing pre-initiated data for serialized key "${O}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const De=T&&!Ve(ie)?!1:N&&!Ve(f)?f:K().isPaused()?!1:u?Ve(w)?!1:d:Ve(w)||d,Ct=!!(O&&t&&N&&De),an=Ve(ce.isValidating)?Ct:ce.isValidating,Ln=Ve(ce.isLoading)?Ct:ce.isLoading,hr=E.useCallback(async Ze=>{const tt=G.current;if(!O||!tt||L.current||K().isPaused())return!1;let st,Je,Ht=!0;const Pn=Ze||{},_t=!C[O]||!Pn.dedupe,Pt=()=>h0?!L.current&&O===$.current&&R.current:O===$.current,lt={isValidating:!1,isLoading:!1},wa=()=>{oe(lt)},J=()=>{const ye=C[O];ye&&ye[1]===Je&&delete C[O]},se={isValidating:!0};Ve(re().data)&&(se.isLoading=!0);try{if(_t&&(oe(se),n.loadingTimeout&&Ve(re().data)&&setTimeout(()=>{Ht&&Pt()&&K().onLoadingSlow(O,n)},n.loadingTimeout),C[O]=[tt(A),Om()]),[st,Je]=C[O],st=await st,_t&&setTimeout(J,n.dedupingInterval),!C[O]||C[O][1]!==Je)return _t&&Pt()&&K().onDiscarded(O),!1;lt.error=tn;const ye=z[O];if(!Ve(ye)&&(Je<=ye[0]||Je<=ye[1]||ye[1]===0))return wa(),_t&&Pt()&&K().onDiscarded(O),!1;const ze=re().data;lt.data=o(ze,st)?ze:st,_t&&Pt()&&K().onSuccess(st,O,n)}catch(ye){J();const ze=K(),{shouldRetryOnError:Pe}=ze;ze.isPaused()||(lt.error=ye,_t&&Pt()&&(ze.onError(ye,O,ze),(Pe===!0||vr(Pe)&&Pe(ye))&&(!K().revalidateOnFocus||!K().revalidateOnReconnect||ue())&&ze.onErrorRetry(ye,O,ze,on=>{const En=_[O];En&&En[0]&&En[0](f0,on)},{retryCount:(Pn.retryCount||0)+1,dedupe:!0})))}return Ht=!1,wa(),!0},[O,i]),Un=E.useCallback((...Ze)=>Bk(i,$.current,...Ze),[]);if(Oh(()=>{G.current=t,V.current=n,Ve(q)||(ve.current=q)}),Oh(()=>{if(!O)return;const Ze=hr.bind(tn,$h);let tt=0;K().revalidateOnFocus&&(tt=Date.now()+K().focusThrottleInterval);const Je=fN(O,_,(Ht,Pn={})=>{if(Ht==Lk){const _t=Date.now();K().revalidateOnFocus&&_t>tt&&ue()&&(tt=_t+K().focusThrottleInterval,Ze())}else if(Ht==Uk)K().revalidateOnReconnect&&ue()&&Ze();else{if(Ht==Pk)return hr();if(Ht==f0)return hr(Pn)}});return L.current=!1,$.current=O,R.current=!0,oe({_k:A}),De&&(C[O]||(Ve(w)||zo?Ze():Gj(Ze))),()=>{L.current=!0,Je()}},[O]),Oh(()=>{let Ze;function tt(){const Je=vr(h)?h(re().data):h;Je&&Ze!==-1&&(Ze=setTimeout(st,Je))}function st(){!re().error&&(p||K().isVisible())&&(y||K().isOnline())?hr($h).then(tt):tt()}return tt(),()=>{Ze&&(clearTimeout(Ze),Ze=-1)}},[h,p,y,O]),E.useDebugValue(pe),u){if(!h0&&zo&&ge)throw new Error("Fallback data is required when using Suspense in SSR.");ge&&(G.current=t,V.current=n,L.current=!1);const Ze=j[O],tt=!Ve(Ze)&&ge?Un(Ze):g0;if(Dh(tt),!Ve(ie)&&ge)throw ie;const st=ge?hr($h):g0;!Ve(pe)&&ge&&(st.status="fulfilled",st.value=!0),Dh(st)}return{mutate:Un,get data(){return ne.data=!0,pe},get error(){return ne.error=!0,ie},get isValidating(){return ne.isValidating=!0,an},get isLoading(){return ne.isLoading=!0,Ln}}},ya=cN(dN),hN="x-architect-pass",Zs="/api";class da{static instance;constructor(){}static getInstance(){return da.instance||(da.instance=new da),da.instance}getHeaders(t={}){const n=localStorage.getItem("morpheus.auth.token"),i={...t};return n&&(i[hN]=n),i}async handleResponse(t){if(t.status===401)throw localStorage.removeItem("morpheus.auth.token"),window.location.pathname.endsWith("/login")||(window.location.href="/login"),new Error("Unauthorized");if(!t.ok){const n=await t.json().catch(()=>({error:"Unknown error"})),i=new Error(n.error||`HTTP error! status: ${t.status}`);throw i.details=n.details,i}return t.json()}async get(t){const n=await fetch(`${Zs}${t}`,{headers:this.getHeaders()});return this.handleResponse(n)}async post(t,n){const i=await fetch(`${Zs}${t}`,{method:"POST",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async put(t,n){const i=await fetch(`${Zs}${t}`,{method:"PUT",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async patch(t,n){const i=await fetch(`${Zs}${t}`,{method:"PATCH",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async delete(t){const n=await fetch(`${Zs}${t}`,{method:"DELETE",headers:this.getHeaders()});return this.handleResponse(n)}}const Dt=da.getInstance(),ll="/api",Rp=e=>{const t=e.startsWith(ll)?e.substring(ll.length):e;return Dt.get(t)};function Fk(){return ya(`${ll}/status`,Rp,{refreshInterval:5e3})}function mN(){return ya(`${ll}/logs`,Rp)}function pN(e){return ya(e?`${ll}/logs/${e}?limit=1000`:null,Rp,{refreshInterval:2e3})}function qk(e){const t=Math.floor(e/60);if(t>59){const n=Math.floor(t/60),i=t%60;return`${n}h ${i}m`}return`${t}m`}function gN(){const{data:e}=Fk();return v.jsxs("footer",{className:"h-8 bg-azure-bg dark:bg-zinc-950 border-t border-azure-border dark:border-matrix-primary flex items-center px-4 text-xs justify-between select-none z-10 shrink-0",children:[v.jsxs("div",{className:"flex gap-4",children:[v.jsxs("span",{className:e?"text-azure-primary dark:text-matrix-highlight":"text-red-500",children:["● ",e?.status.toUpperCase()||"OFFLINE"]}),v.jsxs("span",{children:["PID: ",e?.pid||"-"]}),v.jsxs("span",{children:["UPTIME: ",e?qk(e.uptimeSeconds):"-"]})]}),v.jsxs("div",{className:"flex gap-4 opacity-70",children:[v.jsxs("span",{children:["v",e?.projectVersion||"0.0.0"]}),v.jsx("span",{children:e?.agentName||"Morpheus"})]})]})}const Mp=E.createContext({});function Dp(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Gk=typeof window<"u",Yk=Gk?E.useLayoutEffect:E.useEffect,Bc=E.createContext(null);function $p(e,t){e.indexOf(t)===-1&&e.push(t)}function Lp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const wr=(e,t,n)=>n>t?t:n<e?e:n;let Up=()=>{};const Jr={},Xk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Kk(e){return typeof e=="object"&&e!==null}const Jk=e=>/^0[^.\s]+$/u.test(e);function Pp(e){let t;return()=>(t===void 0&&(t=e()),t)}const tr=e=>e,yN=(e,t)=>n=>t(e(n)),wl=(...e)=>e.reduce(yN),ul=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class Vp{constructor(){this.subscriptions=[]}add(t){return $p(this.subscriptions,t),()=>Lp(this.subscriptions,t)}notify(t,n,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,i);else for(let u=0;u<o;u++){const l=this.subscriptions[u];l&&l(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xr=e=>e*1e3,er=e=>e/1e3;function Qk(e,t){return t?e*(1e3/t):0}const Wk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,xN=1e-7,vN=12;function bN(e,t,n,i,o){let u,l,f=0;do l=t+(n-t)/2,u=Wk(l,i,o)-e,u>0?n=l:t=l;while(Math.abs(u)>xN&&++f<vN);return l}function zl(e,t,n,i){if(e===t&&n===i)return tr;const o=u=>bN(u,0,1,e,n);return u=>u===0||u===1?u:Wk(o(u),t,i)}const ew=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tw=e=>t=>1-e(1-t),nw=zl(.33,1.53,.69,.99),Zp=tw(nw),rw=ew(Zp),iw=e=>(e*=2)<1?.5*Zp(e):.5*(2-Math.pow(2,-10*(e-1))),Bp=e=>1-Math.sin(Math.acos(e)),aw=tw(Bp),ow=ew(Bp),SN=zl(.42,0,1,1),kN=zl(0,0,.58,1),sw=zl(.42,0,.58,1),wN=e=>Array.isArray(e)&&typeof e[0]!="number",lw=e=>Array.isArray(e)&&typeof e[0]=="number",zN={linear:tr,easeIn:SN,easeInOut:sw,easeOut:kN,circIn:Bp,circInOut:ow,circOut:aw,backIn:Zp,backInOut:rw,backOut:nw,anticipate:iw},_N=e=>typeof e=="string",y0=e=>{if(lw(e)){Up(e.length===4);const[t,n,i,o]=e;return zl(t,n,i,o)}else if(_N(e))return zN[e];return e},Yu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function EN(e,t){let n=new Set,i=new Set,o=!1,u=!1;const l=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(h.schedule(p),e()),p(f)}const h={schedule:(p,y=!1,x=!1)=>{const _=x&&o?n:i;return y&&l.add(p),_.has(p)||_.add(p),p},cancel:p=>{i.delete(p),l.delete(p)},process:p=>{if(f=p,o){u=!0;return}o=!0,[n,i]=[i,n],n.forEach(d),n.clear(),o=!1,u&&(u=!1,h.process(p))}};return h}const TN=40;function uw(e,t){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=()=>n=!0,l=Yu.reduce((A,R)=>(A[R]=EN(u),A),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:p,update:y,preRender:x,render:b,postRender:_}=l,z=()=>{const A=Jr.useManualTiming?o.timestamp:performance.now();n=!1,Jr.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(A-o.timestamp,TN),1)),o.timestamp=A,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),p.process(o),y.process(o),x.process(o),b.process(o),_.process(o),o.isProcessing=!1,n&&t&&(i=!1,e(z))},C=()=>{n=!0,i=!0,o.isProcessing||e(z)};return{schedule:Yu.reduce((A,R)=>{const L=l[R];return A[R]=($,G=!1,V=!1)=>(n||C(),L.schedule($,G,V)),A},{}),cancel:A=>{for(let R=0;R<Yu.length;R++)l[Yu[R]].cancel(A)},state:o,steps:l}}const{schedule:ft,cancel:Ci,state:Qt,steps:Lh}=uw(typeof requestAnimationFrame<"u"?requestAnimationFrame:tr,!0);let mc;function CN(){mc=void 0}const fn={now:()=>(mc===void 0&&fn.set(Qt.isProcessing||Jr.useManualTiming?Qt.timestamp:performance.now()),mc),set:e=>{mc=e,queueMicrotask(CN)}},cw=e=>t=>typeof t=="string"&&t.startsWith(e),fw=cw("--"),AN=cw("var(--"),Ip=e=>AN(e)?jN.test(e.split("/*")[0].trim()):!1,jN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function x0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Uo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},cl={...Uo,transform:e=>wr(0,1,e)},Xu={...Uo,default:1},Ws=e=>Math.round(e*1e5)/1e5,Hp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function NN(e){return e==null}const ON=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fp=(e,t)=>n=>!!(typeof n=="string"&&ON.test(n)&&n.startsWith(e)||t&&!NN(n)&&Object.prototype.hasOwnProperty.call(n,t)),dw=(e,t,n)=>i=>{if(typeof i!="string")return i;const[o,u,l,f]=i.match(Hp);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(l),alpha:f!==void 0?parseFloat(f):1}},RN=e=>wr(0,255,e),Uh={...Uo,transform:e=>Math.round(RN(e))},ha={test:Fp("rgb","red"),parse:dw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Uh.transform(e)+", "+Uh.transform(t)+", "+Uh.transform(n)+", "+Ws(cl.transform(i))+")"};function MN(e){let t="",n="",i="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const Mm={test:Fp("#"),parse:MN,transform:ha.transform},_l=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_i=_l("deg"),kr=_l("%"),me=_l("px"),DN=_l("vh"),$N=_l("vw"),v0={...kr,parse:e=>kr.parse(e)/100,transform:e=>kr.transform(e*100)},go={test:Fp("hsl","hue"),parse:dw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+kr.transform(Ws(t))+", "+kr.transform(Ws(n))+", "+Ws(cl.transform(i))+")"},Mt={test:e=>ha.test(e)||Mm.test(e)||go.test(e),parse:e=>ha.test(e)?ha.parse(e):go.test(e)?go.parse(e):Mm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ha.transform(e):go.transform(e),getAnimatableNone:e=>{const t=Mt.parse(e);return t.alpha=0,Mt.transform(t)}},LN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function UN(e){return isNaN(e)&&typeof e=="string"&&(e.match(Hp)?.length||0)+(e.match(LN)?.length||0)>0}const hw="number",mw="color",PN="var",VN="var(",b0="${}",ZN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fl(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[];let u=0;const f=t.replace(ZN,d=>(Mt.test(d)?(i.color.push(u),o.push(mw),n.push(Mt.parse(d))):d.startsWith(VN)?(i.var.push(u),o.push(PN),n.push(d)):(i.number.push(u),o.push(hw),n.push(parseFloat(d))),++u,b0)).split(b0);return{values:n,split:f,indexes:i,types:o}}function pw(e){return fl(e).values}function gw(e){const{split:t,types:n}=fl(e),i=t.length;return o=>{let u="";for(let l=0;l<i;l++)if(u+=t[l],o[l]!==void 0){const f=n[l];f===hw?u+=Ws(o[l]):f===mw?u+=Mt.transform(o[l]):u+=o[l]}return u}}const BN=e=>typeof e=="number"?0:Mt.test(e)?Mt.getAnimatableNone(e):e;function IN(e){const t=pw(e);return gw(e)(t.map(BN))}const Ai={test:UN,parse:pw,createTransformer:gw,getAnimatableNone:IN};function Ph(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function HN({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let o=0,u=0,l=0;if(!t)o=u=l=n;else{const f=n<.5?n*(1+t):n+t-n*t,d=2*n-f;o=Ph(d,f,e+1/3),u=Ph(d,f,e),l=Ph(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(l*255),alpha:i}}function Sc(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,Vh=(e,t,n)=>{const i=e*e,o=n*(t*t-i)+i;return o<0?0:Math.sqrt(o)},FN=[Mm,ha,go],qN=e=>FN.find(t=>t.test(e));function S0(e){const t=qN(e);if(!t)return!1;let n=t.parse(e);return t===go&&(n=HN(n)),n}const k0=(e,t)=>{const n=S0(e),i=S0(t);if(!n||!i)return Sc(e,t);const o={...n};return u=>(o.red=Vh(n.red,i.red,u),o.green=Vh(n.green,i.green,u),o.blue=Vh(n.blue,i.blue,u),o.alpha=yt(n.alpha,i.alpha,u),ha.transform(o))},Dm=new Set(["none","hidden"]);function GN(e,t){return Dm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function YN(e,t){return n=>yt(e,t,n)}function qp(e){return typeof e=="number"?YN:typeof e=="string"?Ip(e)?Sc:Mt.test(e)?k0:JN:Array.isArray(e)?yw:typeof e=="object"?Mt.test(e)?k0:XN:Sc}function yw(e,t){const n=[...e],i=n.length,o=e.map((u,l)=>qp(u)(u,t[l]));return u=>{for(let l=0;l<i;l++)n[l]=o[l](u);return n}}function XN(e,t){const n={...e,...t},i={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(i[o]=qp(e[o])(e[o],t[o]));return o=>{for(const u in i)n[u]=i[u](o);return n}}function KN(e,t){const n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const u=t.types[o],l=e.indexes[u][i[u]],f=e.values[l]??0;n[o]=f,i[u]++}return n}const JN=(e,t)=>{const n=Ai.createTransformer(t),i=fl(e),o=fl(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?Dm.has(e)&&!o.values.length||Dm.has(t)&&!i.values.length?GN(e,t):wl(yw(KN(i,o),o.values),n):Sc(e,t)};function xw(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):qp(e)(e,t)}const QN=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ft.update(t,n),stop:()=>Ci(t),now:()=>Qt.isProcessing?Qt.timestamp:fn.now()}},vw=(e,t,n=10)=>{let i="";const o=Math.max(Math.round(t/n),2);for(let u=0;u<o;u++)i+=Math.round(e(u/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},kc=2e4;function Gp(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<kc;)t+=n,i=e.next(t);return t>=kc?1/0:t}function WN(e,t=100,n){const i=n({...e,keyframes:[0,t]}),o=Math.min(Gp(i),kc);return{type:"keyframes",ease:u=>i.next(o*u).value/t,duration:er(o)}}const eO=5;function bw(e,t,n){const i=Math.max(t-eO,0);return Qk(n-e(i),t-i)}const zt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zh=.001;function tO({duration:e=zt.duration,bounce:t=zt.bounce,velocity:n=zt.velocity,mass:i=zt.mass}){let o,u,l=1-t;l=wr(zt.minDamping,zt.maxDamping,l),e=wr(zt.minDuration,zt.maxDuration,er(e)),l<1?(o=h=>{const p=h*l,y=p*e,x=p-n,b=$m(h,l),_=Math.exp(-y);return Zh-x/b*_},u=h=>{const y=h*l*e,x=y*n+n,b=Math.pow(l,2)*Math.pow(h,2)*e,_=Math.exp(-y),z=$m(Math.pow(h,2),l);return(-o(h)+Zh>0?-1:1)*((x-b)*_)/z}):(o=h=>{const p=Math.exp(-h*e),y=(h-n)*e+1;return-Zh+p*y},u=h=>{const p=Math.exp(-h*e),y=(n-h)*(e*e);return p*y});const f=5/e,d=rO(o,u,f);if(e=Xr(e),isNaN(d))return{stiffness:zt.stiffness,damping:zt.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:l*2*Math.sqrt(i*h),duration:e}}}const nO=12;function rO(e,t,n){let i=n;for(let o=1;o<nO;o++)i=i-e(i)/t(i);return i}function $m(e,t){return e*Math.sqrt(1-t*t)}const iO=["duration","bounce"],aO=["stiffness","damping","mass"];function w0(e,t){return t.some(n=>e[n]!==void 0)}function oO(e){let t={velocity:zt.velocity,stiffness:zt.stiffness,damping:zt.damping,mass:zt.mass,isResolvedFromDuration:!1,...e};if(!w0(e,aO)&&w0(e,iO))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),o=i*i,u=2*wr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:zt.mass,stiffness:o,damping:u}}else{const n=tO(e);t={...t,...n,mass:zt.mass},t.isResolvedFromDuration=!0}return t}function wc(e=zt.visualDuration,t=zt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=n;const u=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],f={done:!1,value:u},{stiffness:d,damping:h,mass:p,duration:y,velocity:x,isResolvedFromDuration:b}=oO({...n,velocity:-er(n.velocity||0)}),_=x||0,z=h/(2*Math.sqrt(d*p)),C=l-u,j=er(Math.sqrt(d/p)),O=Math.abs(C)<5;i||(i=O?zt.restSpeed.granular:zt.restSpeed.default),o||(o=O?zt.restDelta.granular:zt.restDelta.default);let A;if(z<1){const L=$m(j,z);A=$=>{const G=Math.exp(-z*j*$);return l-G*((_+z*j*C)/L*Math.sin(L*$)+C*Math.cos(L*$))}}else if(z===1)A=L=>l-Math.exp(-j*L)*(C+(_+j*C)*L);else{const L=j*Math.sqrt(z*z-1);A=$=>{const G=Math.exp(-z*j*$),V=Math.min(L*$,300);return l-G*((_+z*j*C)*Math.sinh(V)+L*C*Math.cosh(V))/L}}const R={calculatedDuration:b&&y||null,next:L=>{const $=A(L);if(b)f.done=L>=y;else{let G=L===0?_:0;z<1&&(G=L===0?Xr(_):bw(A,L,$));const V=Math.abs(G)<=i,K=Math.abs(l-$)<=o;f.done=V&&K}return f.value=f.done?l:$,f},toString:()=>{const L=Math.min(Gp(R),kc),$=vw(G=>R.next(L*G).value,L,30);return L+"ms "+$},toTransition:()=>{}};return R}wc.applyToOptions=e=>{const t=WN(e,100,wc);return e.ease=t.ease,e.duration=Xr(t.duration),e.type="keyframes",e};function Lm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:u=500,modifyTarget:l,min:f,max:d,restDelta:h=.5,restSpeed:p}){const y=e[0],x={done:!1,value:y},b=V=>f!==void 0&&V<f||d!==void 0&&V>d,_=V=>f===void 0?d:d===void 0||Math.abs(f-V)<Math.abs(d-V)?f:d;let z=n*t;const C=y+z,j=l===void 0?C:l(C);j!==C&&(z=j-y);const O=V=>-z*Math.exp(-V/i),A=V=>j+O(V),R=V=>{const K=O(V),ue=A(V);x.done=Math.abs(K)<=h,x.value=x.done?j:ue};let L,$;const G=V=>{b(x.value)&&(L=V,$=wc({keyframes:[x.value,_(x.value)],velocity:bw(A,V,x.value),damping:o,stiffness:u,restDelta:h,restSpeed:p}))};return G(0),{calculatedDuration:null,next:V=>{let K=!1;return!$&&L===void 0&&(K=!0,R(V),G(V)),L!==void 0&&V>=L?$.next(V-L):(!K&&R(V),x)}}}function sO(e,t,n){const i=[],o=n||Jr.mix||xw,u=e.length-1;for(let l=0;l<u;l++){let f=o(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||tr:t;f=wl(d,f)}i.push(f)}return i}function lO(e,t,{clamp:n=!0,ease:i,mixer:o}={}){const u=e.length;if(Up(u===t.length),u===1)return()=>t[0];if(u===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[u-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=sO(t,i,o),d=f.length,h=p=>{if(l&&p<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(p<e[y+1]);y++);const x=ul(e[y],e[y+1],p);return f[y](x)};return n?p=>h(wr(e[0],e[u-1],p)):h}function uO(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const o=ul(0,t,i);e.push(yt(n,1,o))}}function cO(e){const t=[0];return uO(t,e.length-1),t}function fO(e,t){return e.map(n=>n*t)}function dO(e,t){return e.map(()=>t||sw).splice(0,e.length-1)}function el({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const o=wN(i)?i.map(y0):y0(i),u={done:!1,value:t[0]},l=fO(n&&n.length===t.length?n:cO(t),e),f=lO(l,t,{ease:Array.isArray(o)?o:dO(t,o)});return{calculatedDuration:e,next:d=>(u.value=f(d),u.done=d>=e,u)}}const hO=e=>e!==null;function Yp(e,{repeat:t,repeatType:n="loop"},i,o=1){const u=e.filter(hO),f=o<0||t&&n!=="loop"&&t%2===1?0:u.length-1;return!f||i===void 0?u[f]:i}const mO={decay:Lm,inertia:Lm,tween:el,keyframes:el,spring:wc};function Sw(e){typeof e.type=="string"&&(e.type=mO[e.type])}class Xp{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const pO=e=>e/100;class Kp extends Xp{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==fn.now()&&this.tick(fn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Sw(t);const{type:n=el,repeat:i=0,repeatDelay:o=0,repeatType:u,velocity:l=0}=t;let{keyframes:f}=t;const d=n||el;d!==el&&typeof f[0]!="number"&&(this.mixKeyframes=wl(pO,xw(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});u==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=Gp(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:o,mixKeyframes:u,mirroredGenerator:l,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:p,repeat:y,repeatType:x,repeatDelay:b,type:_,onUpdate:z,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const j=this.currentTime-h*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let A=this.currentTime,R=i;if(y){const V=Math.min(this.currentTime,o)/f;let K=Math.floor(V),ue=V%1;!ue&&V>=1&&(ue=1),ue===1&&K--,K=Math.min(K,y+1),K%2&&(x==="reverse"?(ue=1-ue,b&&(ue-=b/f)):x==="mirror"&&(R=l)),A=wr(0,1,ue)*f}const L=O?{done:!1,value:p[0]}:R.next(A);u&&(L.value=u(L.value));let{done:$}=L;!O&&d!==null&&($=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return G&&_!==Lm&&(L.value=Yp(p,this.options,C,this.speed)),z&&z(L.value),G&&this.finish(),L}then(t,n){return this.finished.then(t,n)}get duration(){return er(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+er(t)}get time(){return er(this.currentTime)}set time(t){t=Xr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(fn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=er(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=QN,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(fn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function gO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ma=e=>e*180/Math.PI,Um=e=>{const t=ma(Math.atan2(e[1],e[0]));return Pm(t)},yO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Um,rotateZ:Um,skewX:e=>ma(Math.atan(e[1])),skewY:e=>ma(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Pm=e=>(e=e%360,e<0&&(e+=360),e),z0=Um,_0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),E0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_0,scaleY:E0,scale:e=>(_0(e)+E0(e))/2,rotateX:e=>Pm(ma(Math.atan2(e[6],e[5]))),rotateY:e=>Pm(ma(Math.atan2(-e[2],e[0]))),rotateZ:z0,rotate:z0,skewX:e=>ma(Math.atan(e[4])),skewY:e=>ma(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vm(e){return e.includes("scale")?1:0}function Zm(e,t){if(!e||e==="none")return Vm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=xO,o=n;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=yO,o=f}if(!o)return Vm(t);const u=i[t],l=o[1].split(",").map(bO);return typeof u=="function"?u(l):l[u]}const vO=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zm(n,t)};function bO(e){return parseFloat(e.trim())}const Po=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vo=new Set(Po),T0=e=>e===Uo||e===me,SO=new Set(["x","y","z"]),kO=Po.filter(e=>!SO.has(e));function wO(e){const t=[];return kO.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Ei={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Zm(t,"x"),y:(e,{transform:t})=>Zm(t,"y")};Ei.translateX=Ei.x;Ei.translateY=Ei.y;const pa=new Set;let Bm=!1,Im=!1,Hm=!1;function kw(){if(Im){const e=Array.from(pa).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const o=wO(i);o.length&&(n.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=n.get(i);o&&o.forEach(([u,l])=>{i.getValue(u)?.set(l)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Im=!1,Bm=!1,pa.forEach(e=>e.complete(Hm)),pa.clear()}function ww(){pa.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Im=!0)})}function zO(){Hm=!0,ww(),kw(),Hm=!1}class Jp{constructor(t,n,i,o,u,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=o,this.element=u,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(pa.add(this),Bm||(Bm=!0,ft.read(ww),ft.resolveKeyframes(kw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:o}=this;if(t[0]===null){const u=o?.get(),l=t[t.length-1];if(u!==void 0)t[0]=u;else if(i&&n){const f=i.readValue(n,l);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=l),o&&u===void 0&&o.set(t[0])}gO(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pa.delete(this)}cancel(){this.state==="scheduled"&&(pa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const _O=e=>e.startsWith("--");function EO(e,t,n){_O(t)?e.style.setProperty(t,n):e.style[t]=n}const TO=Pp(()=>window.ScrollTimeline!==void 0),CO={};function AO(e,t){const n=Pp(e);return()=>CO[t]??n()}const zw=AO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Xs=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,C0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xs([0,.65,.55,1]),circOut:Xs([.55,0,1,.45]),backIn:Xs([.31,.01,.66,-.59]),backOut:Xs([.33,1.53,.69,.99])};function _w(e,t){if(e)return typeof e=="function"?zw()?vw(e,t):"ease-out":lw(e)?Xs(e):Array.isArray(e)?e.map(n=>_w(n,t)||C0.easeOut):C0[e]}function jO(e,t,n,{delay:i=0,duration:o=300,repeat:u=0,repeatType:l="loop",ease:f="easeOut",times:d}={},h=void 0){const p={[t]:n};d&&(p.offset=d);const y=_w(f,o);Array.isArray(y)&&(p.easing=y);const x={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:l==="reverse"?"alternate":"normal"};return h&&(x.pseudoElement=h),e.animate(p,x)}function Ew(e){return typeof e=="function"&&"applyToOptions"in e}function NO({type:e,...t}){return Ew(e)&&zw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class OO extends Xp{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:o,pseudoElement:u,allowFlatten:l=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!u,this.allowFlatten=l,this.options=t,Up(typeof t.type!="string");const h=NO(t);this.animation=jO(n,i,o,h,u),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const p=Yp(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(p):EO(n,i,p),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return er(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+er(t)}get time(){return er(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Xr(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&TO()?(this.animation.timeline=t,tr):n(this)}}const Tw={anticipate:iw,backInOut:rw,circInOut:ow};function RO(e){return e in Tw}function MO(e){typeof e.ease=="string"&&RO(e.ease)&&(e.ease=Tw[e.ease])}const Bh=10;class DO extends OO{constructor(t){MO(t),Sw(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:o,element:u,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const f=new Kp({...l,autoplay:!1}),d=Math.max(Bh,fn.now()-this.startTime),h=wr(0,Bh,d-Bh);n.setWithVelocity(f.sample(Math.max(0,d-h)).value,f.sample(d).value,h),f.stop()}}const A0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ai.test(e)||e==="0")&&!e.startsWith("url("));function $O(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function LO(e,t,n,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const u=e[e.length-1],l=A0(o,t),f=A0(u,t);return!l||!f?!1:$O(e)||(n==="spring"||Ew(n))&&i}function Fm(e){e.duration=0,e.type="keyframes"}const UO=new Set(["opacity","clipPath","filter","transform"]),PO=Pp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function VO(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:o,damping:u,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return PO()&&n&&UO.has(n)&&(n!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&u!==0&&l!=="inertia"}const ZO=40;class BO extends Xp{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:l="loop",keyframes:f,name:d,motionValue:h,element:p,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=fn.now();const x={autoplay:t,delay:n,type:i,repeat:o,repeatDelay:u,repeatType:l,name:d,motionValue:h,element:p,...y},b=p?.KeyframeResolver||Jp;this.keyframeResolver=new b(f,(_,z,C)=>this.onKeyframesResolved(_,z,x,!C),d,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,o){this.keyframeResolver=void 0;const{name:u,type:l,velocity:f,delay:d,isHandoff:h,onUpdate:p}=i;this.resolvedAt=fn.now(),LO(t,u,l,f)||((Jr.instantAnimations||!d)&&p?.(Yp(t,i,n)),t[0]=t[t.length-1],Fm(i),i.repeat=0);const x={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>ZO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},b=!h&&VO(x),_=x.motionValue?.owner?.current,z=b?new DO({...x,element:_}):new Kp(x);z.finished.then(()=>{this.notifyFinished()}).catch(tr),this.pendingTimeline&&(this.stopTimeline=z.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=z}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),zO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Cw(e,t,n,i=0,o=1){const u=Array.from(e).sort((h,p)=>h.sortNodePosition(p)).indexOf(t),l=e.size,f=(l-1)*i;return typeof n=="function"?n(u,l):o===1?u*i:f-u*i}const IO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function HO(e){const t=IO.exec(e);if(!t)return[,];const[,n,i,o]=t;return[`--${n??i}`,o]}function Aw(e,t,n=1){const[i,o]=HO(e);if(!i)return;const u=window.getComputedStyle(t).getPropertyValue(i);if(u){const l=u.trim();return Xk(l)?parseFloat(l):l}return Ip(o)?Aw(o,t,n+1):o}const FO={type:"spring",stiffness:500,damping:25,restSpeed:10},qO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),GO={type:"keyframes",duration:.8},YO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},XO=(e,{keyframes:t})=>t.length>2?GO:Vo.has(e)?e.startsWith("scale")?qO(t[1]):FO:YO,KO=e=>e!==null;function JO(e,{repeat:t,repeatType:n="loop"},i){const o=e.filter(KO),u=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[u]}function Qp(e,t){return e?.[t]??e?.default??e}function QO({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:o,repeat:u,repeatType:l,repeatDelay:f,from:d,elapsed:h,...p}){return!!Object.keys(p).length}const Wp=(e,t,n,i={},o,u)=>l=>{const f=Qp(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-Xr(d);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:x=>{t.set(x),f.onUpdate&&f.onUpdate(x)},onComplete:()=>{l(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:u?void 0:o};QO(f)||Object.assign(p,XO(e,p)),p.duration&&(p.duration=Xr(p.duration)),p.repeatDelay&&(p.repeatDelay=Xr(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let y=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(Fm(p),p.delay===0&&(y=!0)),(Jr.instantAnimations||Jr.skipAnimations)&&(y=!0,Fm(p),p.delay=0),p.allowFlatten=!f.type&&!f.ease,y&&!u&&t.get()!==void 0){const x=JO(p.keyframes,f);if(x!==void 0){ft.update(()=>{p.onUpdate(x),p.onComplete()});return}}return f.isSync?new Kp(p):new BO(p)};function j0(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function eg(e,t,n,i){if(typeof t=="function"){const[o,u]=j0(i);t=t(n!==void 0?n:e.custom,o,u)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,u]=j0(i);t=t(n!==void 0?n:e.custom,o,u)}return t}function _o(e,t,n){const i=e.getProps();return eg(i,t,n!==void 0?n:i.custom,e)}const jw=new Set(["width","height","top","left","right","bottom",...Po]),N0=30,WO=e=>!isNaN(parseFloat(e));class e4{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=fn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=fn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=WO(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Vp);const i=this.events[t].add(n);return t==="change"?()=>{i(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>N0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,N0);return Qk(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new e4(e,t)}const qm=e=>Array.isArray(e);function t4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function n4(e){return qm(e)?e[e.length-1]||0:e}function r4(e,t){const n=_o(e,t);let{transitionEnd:i={},transition:o={},...u}=n||{};u={...u,...i};for(const l in u){const f=n4(u[l]);t4(e,l,f)}}const nn=e=>!!(e&&e.getVelocity);function i4(e){return!!(nn(e)&&e.add)}function Gm(e,t){const n=e.getValue("willChange");if(i4(n))return n.add(t);if(!n&&Jr.WillChange){const i=new Jr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function tg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const a4="framerAppearId",Nw="data-"+tg(a4);function Ow(e){return e.props[Nw]}function o4({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Rw(e,t,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:u=e.getDefaultTransition(),transitionEnd:l,...f}=t;const d=u?.reduceMotion;i&&(u=i);const h=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const y in f){const x=e.getValue(y,e.latestValues[y]??null),b=f[y];if(b===void 0||p&&o4(p,y))continue;const _={delay:n,...Qp(u||{},y)},z=x.get();if(z!==void 0&&!x.isAnimating&&!Array.isArray(b)&&b===z&&!_.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const A=Ow(e);if(A){const R=window.MotionHandoffAnimation(A,y,ft);R!==null&&(_.startTime=R,C=!0)}}Gm(e,y);const j=d??e.shouldReduceMotion;x.start(Wp(y,x,b,j&&jw.has(y)?{type:!1}:_,e,C));const O=x.animation;O&&h.push(O)}return l&&Promise.all(h).then(()=>{ft.update(()=>{l&&r4(e,l)})}),h}function Ym(e,t,n={}){const i=_o(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const u=i?()=>Promise.all(Rw(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:y}=o;return s4(e,t,d,h,p,y,n)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,h]=f==="beforeChildren"?[u,l]:[l,u];return d().then(()=>h())}else return Promise.all([u(),l(n.delay)])}function s4(e,t,n=0,i=0,o=0,u=1,l){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(Ym(d,t,{...l,delay:n+(typeof i=="function"?0:i)+Cw(e.variantChildren,d,i,o,u)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function l4(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(u=>Ym(e,u,n));i=Promise.all(o)}else if(typeof t=="string")i=Ym(e,t,n);else{const o=typeof t=="function"?_o(e,t,n.custom):t;i=Promise.all(Rw(e,o,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const u4={test:e=>e==="auto",parse:e=>e},Mw=e=>t=>t.test(e),Dw=[Uo,me,kr,_i,$N,DN,u4],O0=e=>Dw.find(Mw(e));function c4(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jk(e):!0}const f4=new Set(["brightness","contrast","saturate","opacity"]);function d4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Hp)||[];if(!i)return e;const o=n.replace(i,"");let u=f4.has(t)?1:0;return i!==n&&(u*=100),t+"("+u+o+")"}const h4=/\b([a-z-]*)\(.*?\)/gu,Xm={...Ai,getAnimatableNone:e=>{const t=e.match(h4);return t?t.map(d4).join(" "):e}},R0={...Uo,transform:Math.round},m4={rotate:_i,rotateX:_i,rotateY:_i,rotateZ:_i,scale:Xu,scaleX:Xu,scaleY:Xu,scaleZ:Xu,skew:_i,skewX:_i,skewY:_i,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:cl,originX:v0,originY:v0,originZ:me},ng={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,inset:me,insetBlock:me,insetBlockStart:me,insetBlockEnd:me,insetInline:me,insetInlineStart:me,insetInlineEnd:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,paddingBlock:me,paddingBlockStart:me,paddingBlockEnd:me,paddingInline:me,paddingInlineStart:me,paddingInlineEnd:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,marginBlock:me,marginBlockStart:me,marginBlockEnd:me,marginInline:me,marginInlineStart:me,marginInlineEnd:me,fontSize:me,backgroundPositionX:me,backgroundPositionY:me,...m4,zIndex:R0,fillOpacity:cl,strokeOpacity:cl,numOctaves:R0},p4={...ng,color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:Xm,WebkitFilter:Xm},$w=e=>p4[e];function Lw(e,t){let n=$w(e);return n!==Xm&&(n=Ai),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const g4=new Set(["auto","none","0"]);function y4(e,t,n){let i=0,o;for(;i<e.length&&!o;){const u=e[i];typeof u=="string"&&!g4.has(u)&&fl(u).values.length&&(o=e[i]),i++}if(o&&n)for(const u of t)e[u]=Lw(n,o)}class x4 extends Jp{constructor(t,n,i,o,u){super(t,n,i,o,u,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let p=0;p<t.length;p++){let y=t[p];if(typeof y=="string"&&(y=y.trim(),Ip(y))){const x=Aw(y,n.current);x!==void 0&&(t[p]=x),p===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!jw.has(i)||t.length!==2)return;const[o,u]=t,l=O0(o),f=O0(u),d=x0(o),h=x0(u);if(d!==h&&Ei[i]){this.needsMeasurement=!0;return}if(l!==f)if(T0(l)&&T0(f))for(let p=0;p<t.length;p++){const y=t[p];typeof y=="string"&&(t[p]=parseFloat(y))}else Ei[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||c4(t[o]))&&i.push(o);i.length&&y4(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ei[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const u=i.length-1,l=i[u];i[u]=Ei[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function v4(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=n?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(i=>i!=null)}const Uw=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Km(e){return Kk(e)&&"offsetHeight"in e}const{schedule:rg}=uw(queueMicrotask,!1),cr={x:!1,y:!1};function Pw(){return cr.x||cr.y}function b4(e){return e==="x"||e==="y"?cr[e]?null:(cr[e]=!0,()=>{cr[e]=!1}):cr.x||cr.y?null:(cr.x=cr.y=!0,()=>{cr.x=cr.y=!1})}function Vw(e,t){const n=v4(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[n,o,()=>i.abort()]}function M0(e){return!(e.pointerType==="touch"||Pw())}function S4(e,t,n={}){const[i,o,u]=Vw(e,n),l=f=>{if(!M0(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const p=y=>{M0(y)&&(h(y),d.removeEventListener("pointerleave",p))};d.addEventListener("pointerleave",p,o)};return i.forEach(f=>{f.addEventListener("pointerenter",l,o)}),u}const Zw=(e,t)=>t?e===t?!0:Zw(e,t.parentElement):!1,ig=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,k4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bw(e){return k4.has(e.tagName)||e.isContentEditable===!0}const pc=new WeakSet;function D0(e){return t=>{t.key==="Enter"&&e(t)}}function Ih(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const w4=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=D0(()=>{if(pc.has(n))return;Ih(n,"down");const o=D0(()=>{Ih(n,"up")}),u=()=>Ih(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",u,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function $0(e){return ig(e)&&!Pw()}function z4(e,t,n={}){const[i,o,u]=Vw(e,n),l=f=>{const d=f.currentTarget;if(!$0(f))return;pc.add(d);const h=t(d,f),p=(b,_)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",x),pc.has(d)&&pc.delete(d),$0(b)&&typeof h=="function"&&h(b,{success:_})},y=b=>{p(b,d===window||d===document||n.useGlobalTarget||Zw(d,b.target))},x=b=>{p(b,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",x,o)};return i.forEach(f=>{(n.useGlobalTarget?window:f).addEventListener("pointerdown",l,o),Km(f)&&(f.addEventListener("focus",h=>w4(h,o)),!Bw(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),u}function Iw(e){return Kk(e)&&"ownerSVGElement"in e}function _4(e){return Iw(e)&&e.tagName==="svg"}const E4=[...Dw,Mt,Ai],T4=e=>E4.find(Mw(e)),L0=()=>({translate:0,scale:1,origin:0,originPoint:0}),yo=()=>({x:L0(),y:L0()}),U0=()=>({min:0,max:0}),It=()=>({x:U0(),y:U0()}),Jm={current:null},Hw={current:!1},C4=typeof window<"u";function A4(){if(Hw.current=!0,!!C4)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Jm.current=e.matches;e.addEventListener("change",t),t()}else Jm.current=!1}const j4=new WeakMap;function Ic(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dl(e){return typeof e=="string"||Array.isArray(e)}const ag=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],og=["initial",...ag];function Hc(e){return Ic(e.animate)||og.some(t=>dl(e[t]))}function Fw(e){return!!(Hc(e)||e.variants)}function N4(e,t,n){for(const i in t){const o=t[i],u=n[i];if(nn(o))e.addValue(i,o);else if(nn(u))e.addValue(i,No(o,{owner:e}));else if(u!==o)if(e.hasValue(i)){const l=e.getValue(i);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(i);e.addValue(i,No(l!==void 0?l:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const P0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zc={};function qw(e){zc=e}function O4(){return zc}class R4{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:u,visualState:l},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Jp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=fn.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,ft.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=f,this.blockInitialAnimation=!!u,this.isControllingVariants=Hc(n),this.isVariantNode=Fw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in y){const b=y[x];d[x]!==void 0&&nn(b)&&b.set(d[x])}}mount(t){this.current=t,j4.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hw.current||A4(),this.shouldReduceMotion=Jm.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ci(this.notifyUpdate),Ci(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Vo.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ft.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),u&&u(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zc){const n=zc[t];if(!n)continue;const{isEnabled:i,Feature:o}=n;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const u=this.features[t];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):It()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<P0.length;i++){const o=P0[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const u="on"+o,l=t[u];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=N4(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=No(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Xk(i)||Jk(i))?i=parseFloat(i):!T4(i)&&Ai.test(n)&&(i=Lw(t,n)),this.setBaseTarget(t,nn(i)?i.get():i)),nn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const u=eg(this.props,n,this.presenceContext?.custom);u&&(i=u[t])}if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!nn(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){rg.render(this.render)}}class Gw extends R4{constructor(){super(...arguments),this.KeyframeResolver=x4}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Oi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Yw({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function M4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function D4(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Hh(e){return e===void 0||e===1}function Qm({scale:e,scaleX:t,scaleY:n}){return!Hh(e)||!Hh(t)||!Hh(n)}function ca(e){return Qm(e)||Xw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Xw(e){return V0(e.x)||V0(e.y)}function V0(e){return e&&e!=="0%"}function _c(e,t,n){const i=e-n,o=t*i;return n+o}function Z0(e,t,n,i,o){return o!==void 0&&(e=_c(e,o,i)),_c(e,n,i)+t}function Wm(e,t=0,n=1,i,o){e.min=Z0(e.min,t,n,i,o),e.max=Z0(e.max,t,n,i,o)}function Kw(e,{x:t,y:n}){Wm(e.x,t.translate,t.scale,t.originPoint),Wm(e.y,n.translate,n.scale,n.originPoint)}const B0=.999999999999,I0=1.0000000000001;function $4(e,t,n,i=!1){const o=n.length;if(!o)return;t.x=t.y=1;let u,l;for(let f=0;f<o;f++){u=n[f],l=u.projectionDelta;const{visualElement:d}=u.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vo(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Kw(e,l)),i&&ca(u.latestValues)&&vo(e,u.latestValues))}t.x<I0&&t.x>B0&&(t.x=1),t.y<I0&&t.y>B0&&(t.y=1)}function xo(e,t){e.min=e.min+t,e.max=e.max+t}function H0(e,t,n,i,o=.5){const u=yt(e.min,e.max,o);Wm(e,t,n,u,i)}function vo(e,t){H0(e.x,t.x,t.scaleX,t.scale,t.originX),H0(e.y,t.y,t.scaleY,t.scale,t.originY)}function Jw(e,t){return Yw(D4(e.getBoundingClientRect(),t))}function L4(e,t,n){const i=Jw(e,n),{scroll:o}=t;return o&&(xo(i.x,o.offset.x),xo(i.y,o.offset.y)),i}const U4={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},P4=Po.length;function V4(e,t,n){let i="",o=!0;for(let u=0;u<P4;u++){const l=Po[u],f=e[l];if(f===void 0)continue;let d=!0;if(typeof f=="number")d=f===(l.startsWith("scale")?1:0);else{const h=parseFloat(f);d=l.startsWith("scale")?h===1:h===0}if(!d||n){const h=Uw(f,ng[l]);if(!d){o=!1;const p=U4[l]||l;i+=`${p}(${h}) `}n&&(t[l]=h)}}return i=i.trim(),n?i=n(t,o?"":i):o&&(i="none"),i}function sg(e,t,n){const{style:i,vars:o,transformOrigin:u}=e;let l=!1,f=!1;for(const d in t){const h=t[d];if(Vo.has(d)){l=!0;continue}else if(fw(d)){o[d]=h;continue}else{const p=Uw(h,ng[d]);d.startsWith("origin")?(f=!0,u[d]=p):i[d]=p}}if(t.transform||(l||n?i.transform=V4(t,e.transform,n):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:p=0}=u;i.transformOrigin=`${d} ${h} ${p}`}}function Qw(e,{style:t,vars:n},i,o){const u=e.style;let l;for(l in t)u[l]=t[l];o?.applyProjectionStyles(u,i);for(l in n)u.setProperty(l,n[l])}function F0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Bs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=F0(e,t.target.x),i=F0(e,t.target.y);return`${n}% ${i}%`}},Z4={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,o=Ai.parse(e);if(o.length>5)return i;const u=Ai.createTransformer(e),l=typeof o[0]!="number"?1:0,f=n.x.scale*t.x,d=n.y.scale*t.y;o[0+l]/=f,o[1+l]/=d;const h=yt(f,d,.5);return typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h),u(o)}},ep={borderRadius:{...Bs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bs,borderTopRightRadius:Bs,borderBottomLeftRadius:Bs,borderBottomRightRadius:Bs,boxShadow:Z4};function Ww(e,{layout:t,layoutId:n}){return Vo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ep[e]||e==="opacity")}function lg(e,t,n){const i=e.style,o=t?.style,u={};if(!i)return u;for(const l in i)(nn(i[l])||o&&nn(o[l])||Ww(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(u[l]=i[l]);return u}function B4(e){return window.getComputedStyle(e)}class I4 extends Gw{constructor(){super(...arguments),this.type="html",this.renderInstance=Qw}readValueFromInstance(t,n){if(Vo.has(n))return this.projection?.isProjecting?Vm(n):vO(t,n);{const i=B4(t),o=(fw(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Jw(t,n)}build(t,n,i){sg(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return lg(t,n,i)}}const H4={offset:"stroke-dashoffset",array:"stroke-dasharray"},F4={offset:"strokeDashoffset",array:"strokeDasharray"};function q4(e,t,n=1,i=0,o=!0){e.pathLength=1;const u=o?H4:F4;e[u.offset]=`${-i}`,e[u.array]=`${t} ${n}`}const G4=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ez(e,{attrX:t,attrY:n,attrScale:i,pathLength:o,pathSpacing:u=1,pathOffset:l=0,...f},d,h,p){if(sg(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:x}=e;y.transform&&(x.transform=y.transform,delete y.transform),(x.transform||y.transformOrigin)&&(x.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),x.transform&&(x.transformBox=p?.transformBox??"fill-box",delete y.transformBox);for(const b of G4)y[b]!==void 0&&(x[b]=y[b],delete y[b]);t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),i!==void 0&&(y.scale=i),o!==void 0&&q4(y,o,u,l,!1)}const tz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),nz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Y4(e,t,n,i){Qw(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(tz.has(o)?o:tg(o),t.attrs[o])}function rz(e,t,n){const i=lg(e,t,n);for(const o in e)if(nn(e[o])||nn(t[o])){const u=Po.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[u]=e[o]}return i}class X4 extends Gw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Vo.has(n)){const i=$w(n);return i&&i.default||0}return n=tz.has(n)?n:tg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return rz(t,n,i)}build(t,n,i){ez(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,o){Y4(t,n,i,o)}mount(t){this.isSVGTag=nz(t.tagName),super.mount(t)}}const K4=og.length;function iz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?iz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<K4;n++){const i=og[n],o=e.props[i];(dl(o)||o===!1)&&(t[i]=o)}return t}function az(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const J4=[...ag].reverse(),Q4=ag.length;function W4(e){return t=>Promise.all(t.map(({animation:n,options:i})=>l4(e,n,i)))}function eR(e){let t=W4(e),n=q0(),i=!0;const o=d=>(h,p)=>{const y=_o(e,p,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:x,transitionEnd:b,..._}=y;h={...h,..._,...b}}return h};function u(d){t=d(e)}function l(d){const{props:h}=e,p=iz(e.parent)||{},y=[],x=new Set;let b={},_=1/0;for(let C=0;C<Q4;C++){const j=J4[C],O=n[j],A=h[j]!==void 0?h[j]:p[j],R=dl(A),L=j===d?O.isActive:null;L===!1&&(_=C);let $=A===p[j]&&A!==h[j]&&R;if($&&i&&e.manuallyAnimateOnMount&&($=!1),O.protectedKeys={...b},!O.isActive&&L===null||!A&&!O.prevProp||Ic(A)||typeof A=="boolean")continue;const G=tR(O.prevProp,A);let V=G||j===d&&O.isActive&&!$&&R||C>_&&R,K=!1;const ue=Array.isArray(A)?A:[A];let re=ue.reduce(o(j),{});L===!1&&(re={});const{prevResolvedValues:oe={}}=O,ke={...oe,...re},le=Y=>{V=!0,x.has(Y)&&(K=!0,x.delete(Y)),O.needsAnimating[Y]=!0;const Z=e.getValue(Y);Z&&(Z.liveStyle=!1)};for(const Y in ke){const Z=re[Y],ce=oe[Y];if(b.hasOwnProperty(Y))continue;let N=!1;qm(Z)&&qm(ce)?N=!az(Z,ce):N=Z!==ce,N?Z!=null?le(Y):x.add(Y):Z!==void 0&&x.has(Y)?le(Y):O.protectedKeys[Y]=!0}O.prevProp=A,O.prevResolvedValues=re,O.isActive&&(b={...b,...re}),i&&e.blockInitialAnimation&&(V=!1);const ne=$&&G;V&&(!ne||K)&&y.push(...ue.map(Y=>{const Z={type:j};if(typeof Y=="string"&&i&&!ne&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,N=_o(ce,Y);if(ce.enteringChildren&&N){const{delayChildren:T}=N.transition||{};Z.delay=Cw(ce.enteringChildren,e,T)}}return{animation:Y,options:Z}}))}if(x.size){const C={};if(typeof h.initial!="boolean"){const j=_o(e,Array.isArray(h.initial)?h.initial[0]:h.initial);j&&j.transition&&(C.transition=j.transition)}x.forEach(j=>{const O=e.getBaseTarget(j),A=e.getValue(j);A&&(A.liveStyle=!0),C[j]=O??null}),y.push({animation:C})}let z=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(z=!1),i=!1,z?t(y):Promise.resolve()}function f(d,h){if(n[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),n[d].isActive=h;const p=l(d);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:l,setActive:f,setAnimateFunction:u,getState:()=>n,reset:()=>{n=q0()}}}function tR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!az(t,e):!1}function ra(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function q0(){return{animate:ra(!0),whileInView:ra(),whileHover:ra(),whileTap:ra(),whileDrag:ra(),whileFocus:ra(),exit:ra()}}function G0(e,t){e.min=t.min,e.max=t.max}function lr(e,t){G0(e.x,t.x),G0(e.y,t.y)}function Y0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const oz=1e-4,nR=1-oz,rR=1+oz,sz=.01,iR=0-sz,aR=0+sz;function dn(e){return e.max-e.min}function oR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,i=.5){e.origin=i,e.originPoint=yt(t.min,t.max,e.origin),e.scale=dn(n)/dn(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nR&&e.scale<=rR||isNaN(e.scale))&&(e.scale=1),(e.translate>=iR&&e.translate<=aR||isNaN(e.translate))&&(e.translate=0)}function tl(e,t,n,i){X0(e.x,t.x,n.x,i?i.originX:void 0),X0(e.y,t.y,n.y,i?i.originY:void 0)}function K0(e,t,n){e.min=n.min+t.min,e.max=e.min+dn(t)}function sR(e,t,n){K0(e.x,t.x,n.x),K0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+dn(t)}function Ec(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}function Q0(e,t,n,i,o){return e-=t,e=_c(e,1/n,i),o!==void 0&&(e=_c(e,1/o,i)),e}function lR(e,t=0,n=1,i=.5,o,u=e,l=e){if(kr.test(t)&&(t=parseFloat(t),t=yt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let f=yt(u.min,u.max,i);e===u&&(f-=t),e.min=Q0(e.min,t,n,f,o),e.max=Q0(e.max,t,n,f,o)}function W0(e,t,[n,i,o],u,l){lR(e,t[n],t[i],t[o],t.scale,u,l)}const uR=["x","scaleX","originX"],cR=["y","scaleY","originY"];function e1(e,t,n,i){W0(e.x,t,uR,n?n.x:void 0,i?i.x:void 0),W0(e.y,t,cR,n?n.y:void 0,i?i.y:void 0)}function t1(e){return e.translate===0&&e.scale===1}function lz(e){return t1(e.x)&&t1(e.y)}function n1(e,t){return e.min===t.min&&e.max===t.max}function fR(e,t){return n1(e.x,t.x)&&n1(e.y,t.y)}function r1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function uz(e,t){return r1(e.x,t.x)&&r1(e.y,t.y)}function i1(e){return dn(e.x)/dn(e.y)}function a1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Kn(e){return[e("x"),e("y")]}function dR(e,t,n){let i="";const o=e.x.translate/t.x,u=e.y.translate/t.y,l=n?.z||0;if((o||u||l)&&(i=`translate3d(${o}px, ${u}px, ${l}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:p,rotateX:y,rotateY:x,skewX:b,skewY:_}=n;h&&(i=`perspective(${h}px) ${i}`),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),x&&(i+=`rotateY(${x}deg) `),b&&(i+=`skewX(${b}deg) `),_&&(i+=`skewY(${_}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const cz=["TopLeft","TopRight","BottomLeft","BottomRight"],hR=cz.length,o1=e=>typeof e=="string"?parseFloat(e):e,s1=e=>typeof e=="number"||me.test(e);function mR(e,t,n,i,o,u){o?(e.opacity=yt(0,n.opacity??1,pR(i)),e.opacityExit=yt(t.opacity??1,0,gR(i))):u&&(e.opacity=yt(t.opacity??1,n.opacity??1,i));for(let l=0;l<hR;l++){const f=`border${cz[l]}Radius`;let d=l1(t,f),h=l1(n,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||s1(d)===s1(h)?(e[f]=Math.max(yt(o1(d),o1(h),i),0),(kr.test(h)||kr.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,i))}function l1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pR=fz(0,.5,aw),gR=fz(.5,.95,tr);function fz(e,t,n){return i=>i<e?0:i>t?1:n(ul(e,t,i))}function yR(e,t,n){const i=nn(e)?e:No(e);return i.start(Wp("",i,t,n)),i.animation}function hl(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const xR=(e,t)=>e.depth-t.depth;class vR{constructor(){this.children=[],this.isDirty=!1}add(t){$p(this.children,t),this.isDirty=!0}remove(t){Lp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xR),this.isDirty=!1,this.children.forEach(t)}}function bR(e,t){const n=fn.now(),i=({timestamp:o})=>{const u=o-n;u>=t&&(Ci(i),e(u-t))};return ft.setup(i,!0),()=>Ci(i)}function gc(e){return nn(e)?e.get():e}class SR{constructor(){this.members=[]}add(t){$p(this.members,t),t.scheduleRender()}remove(t){if(Lp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let i;for(let o=n;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1){i=u;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const o=i.options.layoutDependency,u=t.options.layoutDependency;o!==void 0&&u!==void 0&&o===u||(t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:f}=t.options;f===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const yc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Fh=["","X","Y","Z"],kR=1e3;let wR=0;function qh(e,t,n,i){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function dz(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ow(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:u}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(o||u))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&dz(i)}function hz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(l={},f=t?.()){this.id=wR++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ER),this.nodes.forEach(jR),this.nodes.forEach(NR),this.nodes.forEach(TR)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new vR)}addEventListener(l,f){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Vp),this.eventHandlers.get(l).add(f)}notifyListeners(l,...f){const d=this.eventHandlers.get(l);d&&d.notify(...f)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=Iw(l)&&!_4(l),this.instance=l;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let p,y=0;const x=()=>this.root.updateBlockedByResize=!1;ft.read(()=>{y=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==y&&(y=b,this.root.updateBlockedByResize=!0,p&&p(),p=bR(x,250),yc.hasAnimatedSinceResize&&(yc.hasAnimatedSinceResize=!1,this.nodes.forEach(f1)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:y,hasRelativeLayoutChanged:x,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||$R,{onLayoutAnimationStart:z,onLayoutAnimationComplete:C}=h.getProps(),j=!this.targetLayout||!uz(this.targetLayout,b),O=!y&&x;if(this.options.layoutRoot||this.resumeFrom||O||y&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...Qp(_,"layout"),onPlay:z,onComplete:C};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(p,O)}else y||f1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ci(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(OR),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dz(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const y=this.path[p];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(u1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(c1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(AR),this.nodes.forEach(zR),this.nodes.forEach(_R)):this.nodes.forEach(c1),this.clearAllSnapshots();const f=fn.now();Qt.delta=wr(0,1e3/60,f-Qt.timestamp),Qt.timestamp=f,Qt.isProcessing=!0,Lh.update.process(Qt),Lh.preRender.process(Qt),Lh.render.process(Qt),Qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CR),this.sharedNodes.forEach(RR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!dn(this.snapshot.measuredBox.x)&&!dn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=It(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!lz(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;l&&this.instance&&(f||ca(this.latestValues)||p)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return l&&(d=this.removeTransform(d)),LR(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return It();const f=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(UR))){const{scroll:h}=this.root;h&&(xo(f.x,h.offset.x),xo(f.y,h.offset.y))}return f}removeElementScroll(l){const f=It();if(lr(f,l),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:p,options:y}=h;h!==this.root&&p&&y.layoutScroll&&(p.wasRoot&&lr(f,l),xo(f.x,p.offset.x),xo(f.y,p.offset.y))}return f}applyTransform(l,f=!1){const d=It();lr(d,l);for(let h=0;h<this.path.length;h++){const p=this.path[h];!f&&p.options.layoutScroll&&p.scroll&&p!==p.root&&vo(d,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),ca(p.latestValues)&&vo(d,p.latestValues)}return ca(this.latestValues)&&vo(d,this.latestValues),d}removeTransform(l){const f=It();lr(f,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!ca(h.latestValues))continue;Qm(h.latestValues)&&h.updateSnapshot();const p=It(),y=h.measurePageBox();lr(p,y),e1(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,p)}return ca(this.latestValues)&&e1(f,this.latestValues),f}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:y}=this.options;if(!this.layout||!(p||y))return;this.resolvedRelativeTargetAt=Qt.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=It(),this.targetWithTransforms=It()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):lr(this.target,this.layout.layoutBox),Kw(this.target,this.targetDelta)):lr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Qm(this.parent.latestValues)||Xw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,f,d){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=It(),this.relativeTargetOrigin=It(),Ec(this.relativeTargetOrigin,f,d),lr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),f=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Qt.timestamp&&(d=!1),d)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;lr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,x=this.treeScale.y;$4(this.layoutCorrected,this.treeScale,this.path,f),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=It());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Y0(this.prevProjectionDelta.x,this.projectionDelta.x),Y0(this.prevProjectionDelta.y,this.projectionDelta.y)),tl(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==x||!a1(this.projectionDelta.x,this.prevProjectionDelta.x)||!a1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yo(),this.projectionDelta=yo(),this.projectionDeltaWithTransform=yo()}setAnimationOrigin(l,f=!1){const d=this.snapshot,h=d?d.latestValues:{},p={...this.latestValues},y=yo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const x=It(),b=d?d.source:void 0,_=this.layout?this.layout.source:void 0,z=b!==_,C=this.getStack(),j=!C||C.members.length<=1,O=!!(z&&!j&&this.options.crossfade===!0&&!this.path.some(DR));this.animationProgress=0;let A;this.mixTargetDelta=R=>{const L=R/1e3;d1(y.x,l.x,L),d1(y.y,l.y,L),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ec(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MR(this.relativeTarget,this.relativeTargetOrigin,x,L),A&&fR(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=It()),lr(A,this.relativeTarget)),z&&(this.animationValues=p,mR(p,h,this.latestValues,L,O,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ci(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{yc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=No(0)),this.currentAnimation=yR(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),l.onUpdate&&l.onUpdate(f)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(kR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:p}=l;if(!(!f||!d||!h)){if(this!==l&&this.layout&&h&&mz(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||It();const y=dn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const x=dn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+x}lr(f,d),vo(f,p),tl(this.projectionDeltaWithTransform,this.layoutCorrected,f,p)}}registerSharedNode(l,f){this.sharedNodes.has(l)||this.sharedNodes.set(l,new SR),this.sharedNodes.get(l).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let f=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&qh("z",l,h,this.animationValues);for(let p=0;p<Fh.length;p++)qh(`rotate${Fh[p]}`,l,h,this.animationValues),qh(`skew${Fh[p]}`,l,h,this.animationValues);l.render();for(const p in h)l.setStaticValue(p,h[p]),this.animationValues&&(this.animationValues[p]=h[p]);l.scheduleRender()}applyProjectionStyles(l,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=gc(f?.pointerEvents)||"",l.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=gc(f?.pointerEvents)||""),this.hasProjected&&!ca(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=dR(this.projectionDeltaWithTransform,this.treeScale,p);d&&(y=d(p,y)),l.transform=y;const{x,y:b}=this.projectionDelta;l.transformOrigin=`${x.origin*100}% ${b.origin*100}% 0`,h.animationValues?l.opacity=h===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:l.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const _ in ep){if(p[_]===void 0)continue;const{correct:z,applyTo:C,isCSSVariable:j}=ep[_],O=y==="none"?p[_]:z(p[_],h);if(C){const A=C.length;for(let R=0;R<A;R++)l[C[R]]=O}else j?this.options.visualElement.renderState.vars[_]=O:l[_]=O}this.options.layoutId&&(l.pointerEvents=h===this?gc(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(u1),this.root.sharedNodes.clear()}}}function zR(e){e.updateLayout()}function _R(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,u=t.source!==e.layout.source;o==="size"?Kn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],x=dn(y);y.min=n[p].min,y.max=y.min+x}):mz(o,t.layoutBox,n)&&Kn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],x=dn(n[p]);y.max=y.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+x)});const l=yo();tl(l,n,t.layoutBox);const f=yo();u?tl(f,e.applyTransform(i,!0),t.measuredBox):tl(f,n,t.layoutBox);const d=!lz(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:y,layout:x}=p;if(y&&x){const b=It();Ec(b,t.layoutBox,y.layoutBox);const _=It();Ec(_,n,x.layoutBox),uz(b,_)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=b,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:f,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ER(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function TR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CR(e){e.clearSnapshot()}function u1(e){e.clearMeasurements()}function c1(e){e.isLayoutDirty=!1}function AR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function f1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function jR(e){e.resolveTargetDelta()}function NR(e){e.calcProjection()}function OR(e){e.resetSkewAndRotation()}function RR(e){e.removeLeadSnapshot()}function d1(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function h1(e,t,n,i){e.min=yt(t.min,n.min,i),e.max=yt(t.max,n.max,i)}function MR(e,t,n,i){h1(e.x,t.x,n.x,i),h1(e.y,t.y,n.y,i)}function DR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $R={duration:.45,ease:[.4,0,.1,1]},m1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),p1=m1("applewebkit/")&&!m1("chrome/")?Math.round:tr;function g1(e){e.min=p1(e.min),e.max=p1(e.max)}function LR(e){g1(e.x),g1(e.y)}function mz(e,t,n){return e==="position"||e==="preserve-aspect"&&!oR(i1(t),i1(n),.2)}function UR(e){return e!==e.root&&e.scroll?.wasRoot}const PR=hz({attachResizeListener:(e,t)=>hl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Gh={current:void 0},pz=hz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gh.current){const e=new PR({});e.mount(window),e.setOptions({layoutScroll:!0}),Gh.current=e}return Gh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ug=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function y1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function VR(...e){return t=>{let n=!1;const i=e.map(o=>{const u=y1(o,t);return!n&&typeof u=="function"&&(n=!0),u});if(n)return()=>{for(let o=0;o<i.length;o++){const u=i[o];typeof u=="function"?u():y1(e[o],null)}}}}function ZR(...e){return E.useCallback(VR(...e),e)}class BR extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=Km(i)&&i.offsetWidth||0,u=Km(i)&&i.offsetHeight||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=o-l.width-l.left,l.bottom=u-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function IR({children:e,isPresent:t,anchorX:n,anchorY:i,root:o}){const u=E.useId(),l=E.useRef(null),f=E.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=E.useContext(ug),h=e.props?.ref??e?.ref,p=ZR(l,h);return E.useInsertionEffect(()=>{const{width:y,height:x,top:b,left:_,right:z,bottom:C}=f.current;if(t||!l.current||!y||!x)return;const j=n==="left"?`left: ${_}`:`right: ${z}`,O=i==="bottom"?`bottom: ${C}`:`top: ${b}`;l.current.dataset.motionPopId=u;const A=document.createElement("style");d&&(A.nonce=d);const R=o??document.head;return R.appendChild(A),A.sheet&&A.sheet.insertRule(`
|
|
12
|
-
[data-motion-pop-id="${u}"] {
|
|
13
|
-
position: absolute !important;
|
|
14
|
-
width: ${y}px !important;
|
|
15
|
-
height: ${x}px !important;
|
|
16
|
-
${j}px !important;
|
|
17
|
-
${O}px !important;
|
|
18
|
-
}
|
|
19
|
-
`),()=>{R.contains(A)&&R.removeChild(A)}},[t]),v.jsx(BR,{isPresent:t,childRef:l,sizeRef:f,children:E.cloneElement(e,{ref:p})})}const HR=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:o,presenceAffectsLayout:u,mode:l,anchorX:f,anchorY:d,root:h})=>{const p=Dp(FR),y=E.useId();let x=!0,b=E.useMemo(()=>(x=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:_=>{p.set(_,!0);for(const z of p.values())if(!z)return;i&&i()},register:_=>(p.set(_,!1),()=>p.delete(_))}),[n,p,i]);return u&&x&&(b={...b}),E.useMemo(()=>{p.forEach((_,z)=>p.set(z,!1))},[n]),E.useEffect(()=>{!n&&!p.size&&i&&i()},[n]),l==="popLayout"&&(e=v.jsx(IR,{isPresent:n,anchorX:f,anchorY:d,root:h,children:e})),v.jsx(Bc.Provider,{value:b,children:e})};function FR(){return new Map}function gz(e=!0){const t=E.useContext(Bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:o}=t,u=E.useId();E.useEffect(()=>{if(e)return o(u)},[e]);const l=E.useCallback(()=>e&&i&&i(u),[u,i,e]);return!n&&i?[!1,l]:[!0]}const Ku=e=>e.key||"";function x1(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const qR=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:u="sync",propagate:l=!1,anchorX:f="left",anchorY:d="top",root:h})=>{const[p,y]=gz(l),x=E.useMemo(()=>x1(e),[e]),b=l&&!p?[]:x.map(Ku),_=E.useRef(!0),z=E.useRef(x),C=Dp(()=>new Map),j=E.useRef(new Set),[O,A]=E.useState(x),[R,L]=E.useState(x);Yk(()=>{_.current=!1,z.current=x;for(let V=0;V<R.length;V++){const K=Ku(R[V]);b.includes(K)?(C.delete(K),j.current.delete(K)):C.get(K)!==!0&&C.set(K,!1)}},[R,b.length,b.join("-")]);const $=[];if(x!==O){let V=[...x];for(let K=0;K<R.length;K++){const ue=R[K],re=Ku(ue);b.includes(re)||(V.splice(K,0,ue),$.push(ue))}return u==="wait"&&$.length&&(V=$),L(x1(V)),A(x),null}const{forceRender:G}=E.useContext(Mp);return v.jsx(v.Fragment,{children:R.map(V=>{const K=Ku(V),ue=l&&!p?!1:x===R||b.includes(K),re=()=>{if(j.current.has(K))return;if(j.current.add(K),C.has(K))C.set(K,!0);else return;let oe=!0;C.forEach(ke=>{ke||(oe=!1)}),oe&&(G?.(),L(z.current),l&&y?.(),i&&i())};return v.jsx(HR,{isPresent:ue,initial:!_.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:u,root:h,onExitComplete:ue?void 0:re,anchorX:f,anchorY:d,children:V},K)})})},yz=E.createContext({strict:!1}),v1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let b1=!1;function GR(){if(b1)return;const e={};for(const t in v1)e[t]={isEnabled:n=>v1[t].some(i=>!!n[i])};qw(e),b1=!0}function xz(){return GR(),O4()}function YR(e){const t=xz();for(const n in e)t[n]={...t[n],...e[n]};qw(t)}const XR=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Tc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XR.has(e)}let vz=e=>!Tc(e);function KR(e){typeof e=="function"&&(vz=t=>t.startsWith("on")?!Tc(t):e(t))}try{KR(require("@emotion/is-prop-valid").default)}catch{}function JR(e,t,n){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(vz(o)||n===!0&&Tc(o)||!t&&!Tc(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const Fc=E.createContext({});function QR(e,t){if(Hc(e)){const{initial:n,animate:i}=e;return{initial:n===!1||dl(n)?n:void 0,animate:dl(i)?i:void 0}}return e.inherit!==!1?t:{}}function WR(e){const{initial:t,animate:n}=QR(e,E.useContext(Fc));return E.useMemo(()=>({initial:t,animate:n}),[S1(t),S1(n)])}function S1(e){return Array.isArray(e)?e.join(" "):e}const cg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bz(e,t,n){for(const i in t)!nn(t[i])&&!Ww(i,n)&&(e[i]=t[i])}function eM({transformTemplate:e},t){return E.useMemo(()=>{const n=cg();return sg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tM(e,t){const n=e.style||{},i={};return bz(i,n,e),Object.assign(i,eM(e,t)),i}function nM(e,t){const n={},i=tM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const Sz=()=>({...cg(),attrs:{}});function rM(e,t,n,i){const o=E.useMemo(()=>{const u=Sz();return ez(u,t,nz(i),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[t]);if(e.style){const u={};bz(u,e.style,e),o.style={...u,...o.style}}return o}const iM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fg(e){return typeof e!="string"||e.includes("-")?!1:!!(iM.indexOf(e)>-1||/[A-Z]/u.test(e))}function aM(e,t,n,{latestValues:i},o,u=!1,l){const d=(l??fg(e)?rM:nM)(t,i,o,e),h=JR(t,typeof e=="string",u),p=e!==E.Fragment?{...h,...d,ref:n}:{},{children:y}=t,x=E.useMemo(()=>nn(y)?y.get():y,[y]);return E.createElement(e,{...p,children:x})}function oM({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,o){return{latestValues:sM(n,i,o,e),renderState:t()}}function sM(e,t,n,i){const o={},u=i(e,{});for(const x in u)o[x]=gc(u[x]);let{initial:l,animate:f}=e;const d=Hc(e),h=Fw(e);t&&h&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const y=p?f:l;if(y&&typeof y!="boolean"&&!Ic(y)){const x=Array.isArray(y)?y:[y];for(let b=0;b<x.length;b++){const _=eg(e,x[b]);if(_){const{transitionEnd:z,transition:C,...j}=_;for(const O in j){let A=j[O];if(Array.isArray(A)){const R=p?A.length-1:0;A=A[R]}A!==null&&(o[O]=A)}for(const O in z)o[O]=z[O]}}}return o}const kz=e=>(t,n)=>{const i=E.useContext(Fc),o=E.useContext(Bc),u=()=>oM(e,t,i,o);return n?u():Dp(u)},lM=kz({scrapeMotionValuesFromProps:lg,createRenderState:cg}),uM=kz({scrapeMotionValuesFromProps:rz,createRenderState:Sz}),cM=Symbol.for("motionComponentSymbol");function fM(e,t,n){const i=E.useRef(n);E.useInsertionEffect(()=>{i.current=n});const o=E.useRef(null);return E.useCallback(u=>{u&&e.onMount?.(u),t&&(u?t.mount(u):t.unmount());const l=i.current;if(typeof l=="function")if(u){const f=l(u);typeof f=="function"&&(o.current=f)}else o.current?(o.current(),o.current=null):l(u);else l&&(l.current=u)},[t])}const wz=E.createContext({});function Ks(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dM(e,t,n,i,o,u){const{visualElement:l}=E.useContext(Fc),f=E.useContext(yz),d=E.useContext(Bc),h=E.useContext(ug).reducedMotion,p=E.useRef(null),y=E.useRef(!1);i=i||f.renderer,!p.current&&i&&(p.current=i(e,{visualState:t,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:u}),y.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,b=E.useContext(wz);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&hM(p.current,n,o,b);const _=E.useRef(!1);E.useInsertionEffect(()=>{x&&_.current&&x.update(n,d)});const z=n[Nw],C=E.useRef(!!z&&!window.MotionHandoffIsComplete?.(z)&&window.MotionHasOptimisedAnimation?.(z));return Yk(()=>{y.current=!0,x&&(_.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),C.current&&x.animationState&&x.animationState.animateChanges())}),E.useEffect(()=>{x&&(!C.current&&x.animationState&&x.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(z)}),C.current=!1),x.enteringChildren=void 0)}),x}function hM(e,t,n,i){const{layoutId:o,layout:u,drag:l,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zz(e.parent)),e.projection.setOptions({layoutId:o,layout:u,alwaysMeasureLayout:!!l||f&&Ks(f),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:d,layoutRoot:h})}function zz(e){if(e)return e.options.allowProjection!==!1?e.projection:zz(e.parent)}function Yh(e,{forwardMotionProps:t=!1,type:n}={},i,o){i&&YR(i);const u=n?n==="svg":fg(e),l=u?uM:lM;function f(h,p){let y;const x={...E.useContext(ug),...h,layoutId:mM(h)},{isStatic:b}=x,_=WR(h),z=l(h,b);if(!b&&Gk){pM();const C=gM(x);y=C.MeasureLayout,_.visualElement=dM(e,z,x,o,C.ProjectionNode,u)}return v.jsxs(Fc.Provider,{value:_,children:[y&&_.visualElement?v.jsx(y,{visualElement:_.visualElement,...x}):null,aM(e,h,fM(z,_.visualElement,p),z,b,t,u)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=E.forwardRef(f);return d[cM]=e,d}function mM({layoutId:e}){const t=E.useContext(Mp).id;return t&&e!==void 0?t+"-"+e:e}function pM(e,t){E.useContext(yz).strict}function gM(e){const t=xz(),{drag:n,layout:i}=t;if(!n&&!i)return{};const o={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function yM(e,t){if(typeof Proxy>"u")return Yh;const n=new Map,i=(u,l)=>Yh(u,l,e,t),o=(u,l)=>i(u,l);return new Proxy(o,{get:(u,l)=>l==="create"?i:(n.has(l)||n.set(l,Yh(l,void 0,e,t)),n.get(l))})}const xM=(e,t)=>t.isSVG??fg(e)?new X4(t):new I4(t,{allowProjection:e!==E.Fragment});class vM extends Oi{constructor(t){super(t),t.animationState||(t.animationState=eR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ic(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let bM=0;class SM extends Oi{constructor(){super(...arguments),this.id=bM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const kM={animation:{Feature:vM},exit:{Feature:SM}};function El(e){return{point:{x:e.pageX,y:e.pageY}}}const wM=e=>t=>ig(t)&&e(t,El(t));function nl(e,t,n,i){return hl(e,t,wM(n),i)}const _z=({current:e})=>e?e.ownerDocument.defaultView:null,k1=(e,t)=>Math.abs(e-t);function zM(e,t){const n=k1(e.x,t.x),i=k1(e.y,t.y);return Math.sqrt(n**2+i**2)}const w1=new Set(["auto","scroll"]);class Ez{constructor(t,n,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:u=!1,distanceThreshold:l=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Kh(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,z=zM(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!z)return;const{point:C}=b,{timestamp:j}=Qt;this.history.push({...C,timestamp:j});const{onStart:O,onMove:A}=this.handlers;_||(O&&O(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Xh(_,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:z,onSessionEnd:C,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=Kh(b.type==="pointercancel"?this.lastMoveEventInfo:Xh(_,this.transformPagePoint),this.history);this.startEvent&&z&&z(b,O),C&&C(b,O)},!ig(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=l,this.contextWindow=o||window;const d=El(t),h=Xh(d,this.transformPagePoint),{point:p}=h,{timestamp:y}=Qt;this.history=[{...p,timestamp:y}];const{onSessionStart:x}=n;x&&x(t,Kh(h,this.history)),this.removeListeners=wl(nl(this.contextWindow,"pointermove",this.handlePointerMove),nl(this.contextWindow,"pointerup",this.handlePointerUp),nl(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(w1.has(i.overflowX)||w1.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,o=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},u={x:o.x-n.x,y:o.y-n.y};u.x===0&&u.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(t,o),ft.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ci(this.updatePoint)}}function Xh(e,t){return t?{point:t(e.point)}:e}function z1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kh({point:e},t){return{point:e,delta:z1(e,Tz(t)),offset:z1(e,_M(t)),velocity:EM(t,.1)}}function _M(e){return e[0]}function Tz(e){return e[e.length-1]}function EM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const o=Tz(e);for(;n>=0&&(i=e[n],!(o.timestamp-i.timestamp>Xr(t)));)n--;if(!i)return{x:0,y:0};const u=er(o.timestamp-i.timestamp);if(u===0)return{x:0,y:0};const l={x:(o.x-i.x)/u,y:(o.y-i.y)/u};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function TM(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?yt(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?yt(n,e,i.max):Math.min(e,n)),e}function _1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function CM(e,{top:t,left:n,bottom:i,right:o}){return{x:_1(e.x,n,o),y:_1(e.y,t,i)}}function E1(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function AM(e,t){return{x:E1(e.x,t.x),y:E1(e.y,t.y)}}function jM(e,t){let n=.5;const i=dn(e),o=dn(t);return o>i?n=ul(t.min,t.max-i,e.min):i>o&&(n=ul(e.min,e.max-o,t.min)),wr(0,1,n)}function NM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const tp=.35;function OM(e=tp){return e===!1?e=0:e===!0&&(e=tp),{x:T1(e,"left","right"),y:T1(e,"top","bottom")}}function T1(e,t,n){return{min:C1(e,t),max:C1(e,n)}}function C1(e,t){return typeof e=="number"?e:e[t]||0}const RM=new WeakMap;class MM{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=It(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=y=>{n?(this.stopAnimation(),this.snapToCursor(El(y).point)):this.pauseAnimation()},l=(y,x)=>{this.stopAnimation();const{drag:b,dragPropagation:_,onDragStart:z}=this.getProps();if(b&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=b4(b),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kn(j=>{let O=this.getAxisMotionValue(j).get()||0;if(kr.test(O)){const{projection:A}=this.visualElement;if(A&&A.layout){const R=A.layout.layoutBox[j];R&&(O=dn(R)*(parseFloat(O)/100))}}this.originPoint[j]=O}),z&&ft.postRender(()=>z(y,x)),Gm(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},f=(y,x)=>{this.latestPointerEvent=y,this.latestPanInfo=x;const{dragPropagation:b,dragDirectionLock:_,onDirectionLock:z,onDrag:C}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:j}=x;if(_&&this.currentDirection===null){this.currentDirection=DM(j),this.currentDirection!==null&&z&&z(this.currentDirection);return}this.updateAxis("x",x.point,j),this.updateAxis("y",x.point,j),this.visualElement.render(),C&&C(y,x)},d=(y,x)=>{this.latestPointerEvent=y,this.latestPanInfo=x,this.stop(y,x),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Kn(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:p}=this.getProps();this.panSession=new Ez(t,{onSessionStart:u,onStart:l,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:i,contextWindow:_z(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,o=n||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!o||!i)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:f}=this.getProps();f&&ft.postRender(()=>f(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:o}=this.getProps();if(!i||!Ju(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let l=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(l=TM(l,this.constraints[t],this.elastic[t])),u.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Ks(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=CM(i.layoutBox,t):this.constraints=!1,this.elastic=OM(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Kn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=NM(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ks(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=L4(i,o.root,this.visualElement.getTransformPagePoint());let l=AM(o.layout.layoutBox,u);if(n){const f=n(M4(l));this.hasMutatedConstraints=!!f,f&&(l=Yw(f))}return l}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:o,dragTransition:u,dragSnapToOrigin:l,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Kn(p=>{if(!Ju(p,n,this.currentDirection))return;let y=d&&d[p]||{};l&&(y={min:0,max:0});const x=o?200:1e6,b=o?40:1e7,_={type:"inertia",velocity:i?t[p]:0,bounceStiffness:x,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(p,_)});return Promise.all(h).then(f)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Gm(this.visualElement,t),i.start(Wp(t,i,0,n,this.visualElement,!1))}stopAnimation(){Kn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Kn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[n];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Kn(n=>{const{drag:i}=this.getProps();if(!Ju(n,i,this.currentDirection))return;const{projection:o}=this.visualElement,u=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:f}=o.layout.layoutBox[n],d=u.get()||0;u.set(t[n]-yt(l,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ks(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Kn(l=>{const f=this.getAxisMotionValue(l);if(f&&this.constraints!==!1){const d=f.get();o[l]=jM({min:d,max:d},this.constraints[l])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Kn(l=>{if(!Ju(l,t,null))return;const f=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];f.set(yt(d,h,o[l]))})}addListeners(){if(!this.visualElement.current)return;RM.set(this.visualElement,this);const t=this.visualElement.current,n=nl(t,"pointerdown",d=>{const{drag:h,dragListener:p=!0}=this.getProps(),y=d.target,x=y!==t&&Bw(y);h&&p&&!x&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();Ks(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,u=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ft.read(i);const l=hl(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Kn(p=>{const y=this.getAxisMotionValue(p);y&&(this.originPoint[p]+=d[p].translate,y.set(y.get()+d[p].translate))}),this.visualElement.render())}));return()=>{l(),n(),u(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:u=!1,dragElastic:l=tp,dragMomentum:f=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:o,dragConstraints:u,dragElastic:l,dragMomentum:f}}}function Ju(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function DM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $M extends Oi{constructor(t){super(t),this.removeGroupControls=tr,this.removeListeners=tr,this.controls=new MM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const A1=e=>(t,n)=>{e&&ft.postRender(()=>e(t,n))};class LM extends Oi{constructor(){super(...arguments),this.removePointerDownListener=tr}onPointerDown(t){this.session=new Ez(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_z(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:A1(t),onStart:A1(n),onMove:i,onEnd:(u,l)=>{delete this.session,o&&ft.postRender(()=>o(u,l))}}}mount(){this.removePointerDownListener=nl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Jh=!1;class UM extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:o}=this.props,{projection:u}=t;u&&(n.group&&n.group.add(u),i&&i.register&&o&&i.register(u),Jh&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:o,isPresent:u}=this.props,{projection:l}=i;return l&&(l.isPresent=u,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),Jh=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==u?l.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?l.promote():l.relegate()||ft.postRender(()=>{const f=l.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:o}=t;Jh=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cz(e){const[t,n]=gz(),i=E.useContext(Mp);return v.jsx(UM,{...e,layoutGroup:i,switchLayoutGroup:E.useContext(wz),isPresent:t,safeToRemove:n})}const PM={pan:{Feature:LM},drag:{Feature:$M,ProjectionNode:pz,MeasureLayout:Cz}};function j1(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,u=i[o];u&&ft.postRender(()=>u(t,El(t)))}class VM extends Oi{mount(){const{current:t}=this.node;t&&(this.unmount=S4(t,(n,i)=>(j1(this.node,i,"Start"),o=>j1(this.node,o,"End"))))}unmount(){}}class ZM extends Oi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wl(hl(this.node.current,"focus",()=>this.onFocus()),hl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function N1(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),u=i[o];u&&ft.postRender(()=>u(t,El(t)))}class BM extends Oi{mount(){const{current:t}=this.node;t&&(this.unmount=z4(t,(n,i)=>(N1(this.node,i,"Start"),(o,{success:u})=>N1(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const np=new WeakMap,Qh=new WeakMap,IM=e=>{const t=np.get(e.target);t&&t(e)},HM=e=>{e.forEach(IM)};function FM({root:e,...t}){const n=e||document;Qh.has(n)||Qh.set(n,{});const i=Qh.get(n),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(HM,{root:e,...t})),i[o]}function qM(e,t,n){const i=FM(t);return np.set(e,n),i.observe(e),()=>{np.delete(e),i.unobserve(e)}}const GM={some:0,all:1};class YM extends Oi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:o="some",once:u}=t,l={root:n?n.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:GM[o]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,u&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:y}=this.node.getProps(),x=h?p:y;x&&x(d)};return qM(this.node.current,l,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(XM(t,n))&&this.startObserver()}unmount(){}}function XM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const KM={inView:{Feature:YM},tap:{Feature:BM},focus:{Feature:ZM},hover:{Feature:VM}},JM={layout:{ProjectionNode:pz,MeasureLayout:Cz}},QM={...kM,...KM,...PM,...JM},Sr=yM(QM,xM),Az=()=>{const[e,t]=E.useState(!!localStorage.getItem("morpheus.auth.token"));return E.useEffect(()=>{const o=()=>{t(!!localStorage.getItem("morpheus.auth.token"))};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[]),{isAuthenticated:e,login:o=>{localStorage.setItem("morpheus.auth.token",o),t(!0)},logout:()=>{localStorage.removeItem("morpheus.auth.token"),t(!1),window.location.href="/login"}}};function WM({onMenuClick:e,isDark:t,toggleTheme:n}){return v.jsxs("header",{className:"lg:hidden fixed top-0 left-0 right-0 z-50 bg-azure-surface dark:bg-black border-b border-azure-border dark:border-matrix-primary/30 p-4 flex items-center justify-between",children:[v.jsxs("h1",{className:"text-lg font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[v.jsx(po,{className:"w-6 h-6"}),"MORPHEUS"]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("button",{onClick:n,className:"p-1 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight","aria-label":t?"Modo claro":"Modo escuro",children:t?v.jsx($k,{className:"w-5 h-5"}):v.jsx(Dk,{className:"w-5 h-5"})}),v.jsx("button",{onClick:e,className:"p-2 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-secondary","aria-label":"Abrir menu",children:v.jsx(fj,{className:"w-6 h-6"})})]})]})}const qc=({open:e,onOpenChange:t,children:n})=>e?v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>t(!1)}),v.jsx("div",{className:"relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full max-w-md md:max-w-2xl max-h-[90vh] overflow-hidden flex flex-col",children:n})]}):null,Gc=({className:e,children:t})=>v.jsx("div",{className:`relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full max-w-md md:max-w-2xl max-h-[90vh] overflow-hidden flex flex-col ${e}`,children:v.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:t})}),Yc=({children:e})=>v.jsx("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left border-b border-azure-border dark:border-matrix-primary p-6",children:e}),Xc=({className:e,children:t})=>v.jsx("h3",{className:`text-lg font-semibold leading-none tracking-tight ${e}`,children:t}),eD=({className:e,children:t})=>v.jsx("div",{className:`mt-6 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 ${e}`,children:t}),Wn=({className:e,variant:t="default",size:n="default",...i})=>{const f=`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 ${t==="destructive"?"bg-red-500 text-zinc-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90":t==="outline"?"border border-azure-border dark:border-matrix-primary bg-transparent hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-primary dark:text-matrix-secondary":t==="secondary"?"bg-azure-surface dark:bg-zinc-800 hover:bg-azure-hover dark:hover:bg-zinc-700/80 text-azure-text-primary dark:text-matrix-secondary":t==="ghost"?"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-primary dark:text-matrix-secondary":t==="link"?"text-azure-primary dark:text-matrix-highlight underline-offset-4 hover:underline":"bg-azure-primary dark:bg-matrix-highlight text-azure-text-inverse dark:text-black hover:bg-azure-primary/90 dark:hover:bg-matrix-highlight/90"} ${n==="sm"?"h-9 px-3 rounded-md":n==="lg"?"h-11 px-8 rounded-md":n==="icon"?"h-10 w-10":"h-10 px-4 py-2"} ${e||""}`;return v.jsx("button",{className:f,...i})};function tD({isOpen:e,onClose:t,onConfirm:n}){return v.jsx(qc,{open:e,onOpenChange:t,children:v.jsxs(Gc,{className:"sm:max-w-md bg-azure-surface dark:bg-zinc-900 border-azure-border dark:border-matrix-primary",children:[v.jsx(Yc,{children:v.jsx(Xc,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:"Confirm Restart"})}),v.jsxs("div",{children:[v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary mb-6",children:"Are you sure you want to restart the Morpheus agent? This will temporarily disconnect all services and channels."}),v.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-end",children:[v.jsx(Wn,{variant:"outline",onClick:t,children:"Cancel"}),v.jsx(Wn,{variant:"destructive",onClick:()=>{n(),t()},children:"Confirm Restart"})]})]})]})})}function nD({children:e}){const t=dr(),[n,i]=E.useState(()=>{const x=localStorage.getItem("theme");return x?x==="dark":!0}),[o,u]=E.useState(!1),[l,f]=E.useState(!1),{logout:d}=Az(),h=async()=>{try{await Dt.post("/restart",{}),alert("Restart initiated successfully. The agent will restart shortly.")}catch(x){console.error("Failed to restart:",x),alert("Failed to restart the agent. Please try again.")}};E.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]),E.useEffect(()=>{u(!1)},[t.pathname]);const p=[{icon:t0,label:"Dashboard",path:"/"},{icon:sl,label:"Chat",path:"/chat"},{icon:o0,label:"Zaion",path:"/zaion"},{icon:i0,label:"MCP Servers",path:"/mcp-servers"},{icon:wm,label:"Usage Stats",path:"/stats"},{icon:po,label:"Sati Memories",path:"/sati-memories"}],y=[{icon:t0,label:"Dashboard",path:"/"},{icon:sl,label:"Chat",path:"/chat"},{icon:o0,label:"Zaion",path:"/zaion"},{icon:i0,label:"MCP Servers",path:"/mcp-servers"},{icon:wm,label:"Usage Stats",path:"/stats"},{icon:po,label:"Sati Memories",path:"/sati-memories"}];return v.jsxs("div",{className:"flex flex-col h-screen bg-azure-bg dark:bg-black text-azure-text-primary dark:text-matrix-secondary font-mono overflow-hidden transition-colors duration-300",children:[v.jsx(WM,{onMenuClick:()=>u(!0),isDark:n,toggleTheme:()=>i(!n)}),v.jsxs("div",{className:"flex flex-1 overflow-hidden pt-16 lg:pt-0",children:[" ",v.jsxs("div",{className:"hidden lg:flex w-64 border-r border-azure-border dark:border-matrix-primary/30 bg-azure-surface dark:bg-black flex-col shrink-0 transition-colors duration-300",children:[v.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[v.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[v.jsx(po,{className:"w-6 h-6"}),"MORPHEUS"]}),v.jsx("button",{onClick:()=>i(!n),className:"p-1 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors",children:n?v.jsx($k,{className:"w-4 h-4"}):v.jsx(Dk,{className:"w-4 h-4"})})]}),v.jsxs("nav",{className:"flex-1 p-4 space-y-2",children:[p.map(x=>{const b=t.pathname===x.path;return v.jsxs(mo,{to:x.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${b?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,children:[v.jsx(x.icon,{className:"w-5 h-5"}),v.jsx("span",{children:x.label})]},x.path)}),v.jsxs(mo,{to:"/logs",className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${t.pathname==="/logs"?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,children:[v.jsx(s0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logs"})]},"/logs")]}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary transition-colors",children:[v.jsx(a0,{className:"w-5 h-5"}),v.jsx("span",{children:"Restart"})]})}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:d,className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-secondary hover:text-red-600 transition-colors",children:[v.jsx(n0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logout"})]})})]}),v.jsx(qR,{children:o&&v.jsxs(Sr.div,{className:"fixed inset-0 z-50 lg:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>u(!1),children:[v.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),v.jsxs(Sr.div,{className:"absolute left-0 top-0 bottom-0 w-64 bg-azure-surface dark:bg-black flex flex-col shadow-xl",initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{type:"spring",damping:25,stiffness:200},onClick:x=>x.stopPropagation(),children:[v.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[v.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[v.jsx(po,{className:"w-6 h-6"}),"MORPHEUS"]}),v.jsx("button",{onClick:()=>u(!1),className:"p-2 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors","aria-label":"Fechar menu",children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),v.jsxs("nav",{className:"flex-1 p-4 space-y-2 overflow-y-auto",children:[y.map(x=>{const b=t.pathname===x.path;return v.jsxs(mo,{to:x.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${b?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,onClick:()=>u(!1),children:[v.jsx(x.icon,{className:"w-5 h-5"}),v.jsx("span",{children:x.label})]},x.path)}),v.jsxs(mo,{to:"/logs",className:"flex items-center gap-3 px-4 py-3 rounded transition-colors hidden lg:flex hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary",onClick:()=>u(!1),children:[v.jsx(s0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logs"})]})]}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:()=>{f(!0),u(!1)},className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary transition-colors",children:[v.jsx(a0,{className:"w-5 h-5"}),v.jsx("span",{children:"Restart"})]})}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:()=>{d(),u(!1)},className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-secondary hover:text-red-600 transition-colors",children:[v.jsx(n0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logout"})]})})]})]})}),v.jsxs("main",{className:`flex-1 p-4 md:p-8 relative flex flex-col ${t.pathname==="/chat"?"overflow-hidden":"overflow-auto"}`,children:[v.jsx("div",{className:`w-full mx-auto flex-1 ${t.pathname==="/chat"?"h-full":"max-w-6xl"}`,children:e}),v.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.1)_50%),linear-gradient(90deg,rgba(0,255,0,0.03),rgba(0,255,0,0.01))] bg-[length:100%_2px,3px_100%] opacity-0 dark:opacity-20 transition-opacity duration-300"})]})]}),v.jsx(gN,{}),v.jsx(tD,{isOpen:l,onClose:()=>f(!1),onConfirm:h})]})}const rD={hidden:{opacity:0,y:20},show:{opacity:1,y:0}},fa=({title:e,value:t,icon:n,subValue:i})=>v.jsxs(Sr.div,{variants:rD,className:"border border-azure-border dark:border-matrix-primary bg-azure-surface/50 dark:bg-zinc-950/50 p-6 rounded relative overflow-hidden group hover:border-azure-primary dark:hover:border-matrix-highlight transition-colors",children:[v.jsxs("div",{className:"flex justify-between items-start mb-4",children:[v.jsx("h3",{className:"text-azure-text-secondary dark:text-matrix-secondary text-sm font-bold uppercase",children:e}),v.jsx(n,{className:"w-6 h-6 text-azure-primary dark:text-matrix-primary group-hover:text-azure-primary dark:group-hover:text-matrix-highlight transition-colors"})]}),v.jsx("div",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight mb-1 font-mono tracking-tighter truncate",children:t}),i&&v.jsx("div",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary opacity-70 font-mono",children:i})]}),rp={fetchUsageStats:async()=>Dt.get("/stats/usage"),fetchGroupedUsageStats:async()=>Dt.get("/stats/usage/grouped")};function iD(){const{data:e}=ya("/api/stats/usage",rp.fetchUsageStats,{refreshInterval:5e3});return v.jsxs(v.Fragment,{children:[v.jsx(fa,{title:"Total Input",value:e?e.totalInputTokens.toLocaleString():"-",icon:PA,subValue:"Tokens processed"}),v.jsx(fa,{title:"Total Output",value:e?e.totalOutputTokens.toLocaleString():"-",icon:ZA,subValue:"Tokens generated"})]})}function aD(){const{data:e}=Fk(),t={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},n={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return v.jsxs(Sr.div,{className:"space-y-8",variants:t,initial:"hidden",animate:"show",children:[v.jsxs(Sr.div,{variants:n,children:[v.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight mb-2",children:"SYSTEM STATUS"}),v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"Overview of the Morpheus agent runtime."})]}),v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[v.jsx(fa,{title:"Agent Status",value:e?.status.toUpperCase()||"CONNECTING...",icon:po,subValue:e?`PID: ${e.pid}`:""}),v.jsx(fa,{title:"Uptime",value:e?qk(e.uptimeSeconds):"-",icon:Ok,subValue:e?`${e.uptimeSeconds.toFixed(0)} seconds`:""}),v.jsx(fa,{title:"Version",value:e?.projectVersion||"-",icon:Rk,subValue:`Node ${e?.nodeVersion||"-"}`}),v.jsx(fa,{title:"Provider",value:e?.llmProvider?.toUpperCase()||"-",icon:qA,subValue:"LLM Inference Engine"}),v.jsx(fa,{title:"Model",value:e?.llmModel||"-",icon:HA,subValue:"Active Model"}),v.jsx(iD,{})]})]})}const oD=({sessions:e,activeSessionId:t,onSelectSession:n,onCreateSession:i,onArchiveSession:o,onDeleteSession:u,onRenameSession:l,isOpen:f,toggleSidebar:d})=>{const[h,p]=E.useState(null),[y,x]=E.useState(""),b=E.useRef(null);E.useEffect(()=>{h&&b.current&&b.current.focus()},[h]);const _=(O,A)=>{O.stopPropagation(),p(A.id),x(A.title||"Untitled Session")},z=O=>{O?.stopPropagation(),h&&y.trim()&&(l(h,y.trim()),p(null))},C=O=>{O?.stopPropagation(),p(null)},j=O=>{O.key==="Enter"?z():O.key==="Escape"&&C()};return f?v.jsxs("div",{className:"w-80 bg-white dark:bg-black border-r border-gray-200 dark:border-matrix-primary/30 flex flex-col h-full transition-all duration-300",children:[v.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-matrix-primary/30 flex justify-between items-center bg-azure-bg dark:bg-black",children:[v.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-matrix-highlight",children:"Sessions"}),v.jsx("button",{onClick:d,className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-matrix-primary/20 text-gray-500 dark:text-matrix-secondary",children:v.jsx(sl,{size:18})})]}),v.jsx("div",{className:"p-4",children:v.jsxs("button",{onClick:i,className:"w-full flex items-center justify-center gap-2 bg-azure-primary text-white dark:bg-matrix-highlight dark:text-black py-2 px-4 rounded-lg hover:bg-azure-secondary dark:hover:bg-matrix-secondary transition-colors shadow-sm",children:[v.jsx(r0,{size:18}),v.jsx("span",{children:"New Chat"})]})}),v.jsxs("div",{className:"flex-1 overflow-y-auto px-2 space-y-1 custom-scrollbar",children:[e.map(O=>v.jsxs("div",{onClick:()=>n(O.id),className:`group flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all border ${t===O.id?"bg-azure-hover dark:bg-matrix-primary/20 border-azure-primary dark:border-matrix-highlight":"hover:bg-gray-50 dark:hover:bg-matrix-primary/10 border-transparent"}`,children:[v.jsx("div",{className:"flex flex-col overflow-hidden w-full mr-2",children:h===O.id?v.jsx("div",{className:"flex items-center gap-1 w-full",onClick:A=>A.stopPropagation(),children:v.jsx("input",{ref:b,type:"text",value:y,onChange:A=>x(A.target.value),onKeyDown:j,className:"w-full text-sm px-1 py-0.5 bg-white dark:bg-black border border-azure-primary dark:border-matrix-highlight rounded focus:outline-none dark:text-matrix-highlight"})}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:`text-sm font-medium truncate ${t===O.id?"text-azure-primary dark:text-matrix-highlight":"text-gray-700 dark:text-matrix-secondary"}`,children:O.title||"Untitled Session"}),v.jsx("span",{className:"text-xs text-gray-400 dark:text-matrix-secondary/70 mt-0.5",children:new Date(O.started_at).toLocaleString()})]})}),v.jsx("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:h===O.id?v.jsxs(v.Fragment,{children:[v.jsx("button",{onClick:z,className:"p-1.5 text-green-600 hover:bg-green-50 dark:text-matrix-highlight dark:hover:bg-matrix-primary/20 rounded",title:"Save",children:v.jsx(KA,{size:14})}),v.jsx("button",{onClick:C,className:"p-1.5 text-red-500 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20 rounded",title:"Cancel",children:v.jsx($j,{size:14})})]}):v.jsxs(v.Fragment,{children:[v.jsx("button",{onClick:A=>_(A,O),className:"p-1.5 text-gray-400 hover:text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20 dark:text-matrix-secondary/50 dark:hover:text-blue-400 rounded",title:"Rename",children:v.jsx(gj,{size:14})}),v.jsx("button",{onClick:A=>{A.stopPropagation(),o(O.id)},className:"p-1.5 text-gray-400 hover:text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-900/20 dark:text-matrix-secondary/50 dark:hover:text-amber-500 rounded",title:"Archive",children:v.jsx(LA,{size:14})}),v.jsx("button",{onClick:A=>{A.stopPropagation(),u(O.id)},className:"p-1.5 text-gray-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 dark:text-matrix-secondary/50 dark:hover:text-red-500 rounded",title:"Delete",children:v.jsx(zm,{size:14})})]})})]},O.id)),e.length===0&&v.jsx("div",{className:"text-center text-gray-400 dark:text-matrix-secondary/50 mt-10 text-sm",children:"No active sessions."})]})]}):v.jsxs("div",{className:"w-16 bg-white dark:bg-black border-r border-gray-200 dark:border-matrix-primary/30 flex flex-col items-center py-4 space-y-4 transition-colors duration-300",children:[v.jsx("button",{onClick:d,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-matrix-primary/20 text-gray-500 dark:text-matrix-secondary",title:"Expand Sidebar",children:v.jsx(sl,{})}),v.jsx("div",{className:"border-t border-gray-200 dark:border-matrix-primary/30 w-full my-2"}),v.jsx("button",{onClick:i,className:"p-3 bg-azure-primary text-white dark:bg-matrix-highlight dark:text-black rounded-full hover:bg-azure-secondary dark:hover:bg-matrix-secondary shadow-lg transition-all",title:"New Session",children:v.jsx(r0,{size:20})})]})};function sD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const lD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cD={};function O1(e,t){return(cD.jsx?uD:lD).test(e)}const fD=/[ \t\n\f\r]/g;function dD(e){return typeof e=="object"?e.type==="text"?R1(e.value):!1:R1(e)}function R1(e){return e.replace(fD,"")===""}class Tl{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Tl.prototype.normal={};Tl.prototype.property={};Tl.prototype.space=void 0;function jz(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new Tl(n,i,t)}function ip(e){return e.toLowerCase()}class zn{constructor(t,n){this.attribute=n,this.property=t}}zn.prototype.attribute="";zn.prototype.booleanish=!1;zn.prototype.boolean=!1;zn.prototype.commaOrSpaceSeparated=!1;zn.prototype.commaSeparated=!1;zn.prototype.defined=!1;zn.prototype.mustUseProperty=!1;zn.prototype.number=!1;zn.prototype.overloadedBoolean=!1;zn.prototype.property="";zn.prototype.spaceSeparated=!1;zn.prototype.space=void 0;let hD=0;const je=ba(),Rt=ba(),ap=ba(),ae=ba(),at=ba(),Eo=ba(),Mn=ba();function ba(){return 2**++hD}const op=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Rt,commaOrSpaceSeparated:Mn,commaSeparated:Eo,number:ae,overloadedBoolean:ap,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),Wh=Object.keys(op);class dg extends zn{constructor(t,n,i,o){let u=-1;if(super(t,n),M1(this,"space",o),typeof i=="number")for(;++u<Wh.length;){const l=Wh[u];M1(this,Wh[u],(i&op[l])===op[l])}}}dg.prototype.defined=!0;function M1(e,t,n){n&&(e[t]=n)}function Zo(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const u=new dg(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),t[i]=u,n[ip(i)]=i,n[ip(u.attribute)]=i}return new Tl(t,n,e.space)}const Nz=Zo({properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:at,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:ae,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:at,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:Rt,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Oz(e,t){return t in e?e[t]:t}function Rz(e,t){return Oz(e,t.toLowerCase())}const mD=Zo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Eo,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:at,autoFocus:je,autoPlay:je,blocking:at,capture:null,charSet:null,checked:je,cite:null,className:at,cols:ae,colSpan:null,content:null,contentEditable:Rt,controls:je,controlsList:at,coords:ae|Eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:ap,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:at,height:ae,hidden:ap,high:ae,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:at,itemRef:at,itemScope:je,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:ae,pattern:null,ping:at,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:at,required:je,reversed:je,rows:ae,rowSpan:ae,sandbox:at,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Rt,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:Rz}),pD=Zo({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:Mn,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:at,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:Eo,g2:Eo,glyphName:Eo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,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:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mn,rev:Mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mn,requiredFeatures:Mn,requiredFonts:Mn,requiredFormats:Mn,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mn,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Oz}),Mz=Zo({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()}}),Dz=Zo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rz}),$z=Zo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gD={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"},yD=/[A-Z]/g,D1=/-[a-z]/g,xD=/^data[-\w.:]+$/i;function vD(e,t){const n=ip(t);let i=t,o=zn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&xD.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(D1,SD);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!D1.test(u)){let l=u.replace(yD,bD);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=dg}return new o(i,t)}function bD(e){return"-"+e.toLowerCase()}function SD(e){return e.charAt(1).toUpperCase()}const kD=jz([Nz,mD,Mz,Dz,$z],"html"),hg=jz([Nz,pD,Mz,Dz,$z],"svg");function wD(e){return e.join(" ").trim()}var lo={},em,$1;function zD(){if($1)return em;$1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
20
|
-
`,h="/",p="*",y="",x="comment",b="declaration";function _(C,j){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];j=j||{};var O=1,A=1;function R(le){var ne=le.match(t);ne&&(O+=ne.length);var P=le.lastIndexOf(d);A=~P?le.length-P:A+le.length}function L(){var le={line:O,column:A};return function(ne){return ne.position=new $(le),K(),ne}}function $(le){this.start=le,this.end={line:O,column:A},this.source=j.source}$.prototype.content=C;function G(le){var ne=new Error(j.source+":"+O+":"+A+": "+le);if(ne.reason=le,ne.filename=j.source,ne.line=O,ne.column=A,ne.source=C,!j.silent)throw ne}function V(le){var ne=le.exec(C);if(ne){var P=ne[0];return R(P),C=C.slice(P.length),ne}}function K(){V(n)}function ue(le){var ne;for(le=le||[];ne=re();)ne!==!1&&le.push(ne);return le}function re(){var le=L();if(!(h!=C.charAt(0)||p!=C.charAt(1))){for(var ne=2;y!=C.charAt(ne)&&(p!=C.charAt(ne)||h!=C.charAt(ne+1));)++ne;if(ne+=2,y===C.charAt(ne-1))return G("End of comment missing");var P=C.slice(2,ne-2);return A+=2,R(P),C=C.slice(ne),A+=2,le({type:x,comment:P})}}function oe(){var le=L(),ne=V(i);if(ne){if(re(),!V(o))return G("property missing ':'");var P=V(u),Y=le({type:b,property:z(ne[0].replace(e,y)),value:P?z(P[0].replace(e,y)):y});return V(l),Y}}function ke(){var le=[];ue(le);for(var ne;ne=oe();)ne!==!1&&(le.push(ne),ue(le));return le}return K(),ke()}function z(C){return C?C.replace(f,y):y}return em=_,em}var L1;function _D(){if(L1)return lo;L1=1;var e=lo&&lo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(lo,"__esModule",{value:!0}),lo.default=n;const t=e(zD());function n(i,o){let u=null;if(!i||typeof i!="string")return u;const l=(0,t.default)(i),f=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;f?o(h,p,d):p&&(u=u||{},u[h]=p)}),u}return lo}var Is={},U1;function ED(){if(U1)return Is;U1=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},f=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),u(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,f):h=h.replace(i,f),h.replace(t,l))};return Is.camelCase=d,Is}var Hs,P1;function TD(){if(P1)return Hs;P1=1;var e=Hs&&Hs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(_D()),n=ED();function i(o,u){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(l[(0,n.camelCase)(f,u)]=d)}),l}return i.default=i,Hs=i,Hs}var CD=TD();const AD=Sp(CD),Lz=Uz("end"),mg=Uz("start");function Uz(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 jD(e){const t=mg(e),n=Lz(e);if(t&&n)return{start:t,end:n}}function rl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?V1(e.position):"start"in e||"end"in e?V1(e):"line"in e||"column"in e?sp(e):""}function sp(e){return Z1(e&&e.line)+":"+Z1(e&&e.column)}function V1(e){return sp(e&&e.start)+"-"+sp(e&&e.end)}function Z1(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",u={},l=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?o=t:!u.cause&&t&&(l=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?u.ruleId=i:(u.source=i.slice(0,d),u.ruleId=i.slice(d+1))}if(!u.place&&u.ancestors&&u.ancestors){const d=u.ancestors[u.ancestors.length-1];d&&(u.place=d.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=rl(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=l&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rn.prototype.file="";rn.prototype.name="";rn.prototype.reason="";rn.prototype.message="";rn.prototype.stack="";rn.prototype.column=void 0;rn.prototype.line=void 0;rn.prototype.ancestors=void 0;rn.prototype.cause=void 0;rn.prototype.fatal=void 0;rn.prototype.place=void 0;rn.prototype.ruleId=void 0;rn.prototype.source=void 0;const pg={}.hasOwnProperty,ND=new Map,OD=/[A-Z]/g,RD=new Set(["table","tbody","thead","tfoot","tr"]),MD=new Set(["td","th"]),Pz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DD(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=ID(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=BD(n,t.jsx,t.jsxs)}const o={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"?hg:kD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Vz(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function Vz(e,t,n){if(t.type==="element")return $D(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return LD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return PD(e,t,n);if(t.type==="mdxjsEsm")return UD(e,t);if(t.type==="root")return VD(e,t,n);if(t.type==="text")return ZD(e,t)}function $D(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=hg,e.schema=o),e.ancestors.push(t);const u=Bz(e,t.tagName,!1),l=HD(e,t);let f=yg(e,t);return RD.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!dD(d):!0})),Zz(e,l,u,t),gg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function LD(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)}ml(e,t.position)}function UD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ml(e,t.position)}function PD(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=hg,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:Bz(e,t.name,!0),l=FD(e,t),f=yg(e,t);return Zz(e,l,u,t),gg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function VD(e,t,n){const i={};return gg(i,yg(e,t)),e.create(t,e.Fragment,i,n)}function ZD(e,t){return t.value}function Zz(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function gg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function BD(e,t,n){return i;function i(o,u,l,f){const h=Array.isArray(l.children)?n:t;return f?h(u,l,f):h(u,l)}}function ID(e,t){return n;function n(i,o,u,l){const f=Array.isArray(u.children),d=mg(i);return t(o,u,l,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function HD(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&pg.call(t.properties,o)){const u=qD(e,o,t.properties[o]);if(u){const[l,f]=u;e.tableCellAlignToStyle&&l==="align"&&typeof f=="string"&&MD.has(t.tagName)?i=f:n[l]=f}}if(i){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function FD(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const l=u.expression;l.type;const f=l.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else ml(e,t.position);else{const o=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else ml(e,t.position);else u=i.value===null?!0:i.value;n[o]=u}return n}function yg(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:ND;for(;++i<t.children.length;){const u=t.children[i];let l;if(e.passKeys){const d=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const f=Vz(e,u,l);f!==void 0&&n.push(f)}return n}function qD(e,t,n){const i=vD(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?sD(n):wD(n)),i.property==="style"){let o=typeof n=="object"?n:GD(e,String(n));return e.stylePropertyNameCase==="css"&&(o=YD(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?gD[i.property]||i.property:i.attribute,n]}}function GD(e,t){try{return AD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Pz+"#cannot-parse-style-attribute",o}}function Bz(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,l;for(;++u<o.length;){const f=O1(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};l=l?{type:"MemberExpression",object:l,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}i=l}else i=O1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return pg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);ml(e)}function ml(e,t){const n=new rn("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=Pz+"#cannot-handle-mdx-estrees-without-createevaluater",n}function YD(e){const t={};let n;for(n in e)pg.call(e,n)&&(t[XD(n)]=e[n]);return t}function XD(e){let t=e.replace(OD,KD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function KD(e){return"-"+e.toLowerCase()}const tm={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"]},JD={};function QD(e,t){const n=JD,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Iz(e,i,o)}function Iz(e,t,n){if(WD(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 B1(e.children,t,n)}return Array.isArray(e)?B1(e,t,n):""}function B1(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=Iz(e[o],t,n);return i.join("")}function WD(e){return!!(e&&typeof e=="object")}const I1=document.createElement("i");function xg(e){const t="&"+e+";";I1.innerHTML=t;const n=I1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zr(e,t,n,i){const o=e.length;let u=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o: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);u<i.length;)l=i.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function Qn(e,t){return e.length>0?(zr(e,e.length,0,t),e):t}const H1={}.hasOwnProperty;function e3(e){const t={};let n=-1;for(;++n<e.length;)t3(t,e[n]);return t}function t3(e,t){let n;for(n in t){const o=(H1.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){H1.call(o,l)||(o[l]=[]);const f=u[l];n3(o[l],Array.isArray(f)?f:f?[f]:[])}}}function n3(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);zr(e,0,0,i)}function Hz(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 To(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const br=Ri(/[A-Za-z]/),Dn=Ri(/[\dA-Za-z]/),r3=Ri(/[#-'*+\--9=?A-Z^-~]/);function lp(e){return e!==null&&(e<32||e===127)}const up=Ri(/\d/),i3=Ri(/[\dA-Fa-f]/),a3=Ri(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function wn(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const o3=Ri(new RegExp("\\p{P}|\\p{S}","u")),s3=Ri(/\s/);function Ri(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bo(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&Dn(e.charCodeAt(n+1))&&Dn(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(n+1);u<56320&&f>56319&&f<57344?(l=String.fromCharCode(u,f),o=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function ot(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(d){return Fe(d)?(e.enter(n),f(d)):t(d)}function f(d){return Fe(d)&&u++<o?(e.consume(d),f):(e.exit(n),t(d))}}const l3={tokenize:u3};function u3(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ot(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(f)}function l(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return _e(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),l)}}const c3={tokenize:f3},F1={tokenize:d3};function f3(e){const t=this,n=[];let i=0,o,u,l;return f;function f(A){if(i<n.length){const R=n[i];return t.containerState=R[1],e.attempt(R[0].continuation,d,h)(A)}return h(A)}function d(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&O();const R=t.events.length;let L=R,$;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){$=t.events[L][1].end;break}j(i);let G=R;for(;G<t.events.length;)t.events[G][1].end={...$},G++;return zr(t.events,L+1,0,t.events.slice(R)),t.events.length=G,h(A)}return f(A)}function h(A){if(i===n.length){if(!o)return x(A);if(o.currentConstruct&&o.currentConstruct.concrete)return _(A);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(F1,p,y)(A)}function p(A){return o&&O(),j(i),x(A)}function y(A){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,_(A)}function x(A){return t.containerState={},e.attempt(F1,b,_)(A)}function b(A){return i++,n.push([t.currentConstruct,t.containerState]),x(A)}function _(A){if(A===null){o&&O(),j(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),z(A)}function z(A){if(A===null){C(e.exit("chunkFlow"),!0),j(0),e.consume(A);return}return _e(A)?(e.consume(A),C(e.exit("chunkFlow")),i=0,t.interrupt=void 0,f):(e.consume(A),z)}function C(A,R){const L=t.sliceStream(A);if(R&&L.push(null),A.previous=u,u&&(u.next=A),u=A,o.defineSkip(A.start),o.write(L),t.parser.lazy[A.start.line]){let $=o.events.length;for(;$--;)if(o.events[$][1].start.offset<l&&(!o.events[$][1].end||o.events[$][1].end.offset>l))return;const G=t.events.length;let V=G,K,ue;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(K){ue=t.events[V][1].end;break}K=!0}for(j(i),$=G;$<t.events.length;)t.events[$][1].end={...ue},$++;zr(t.events,V+1,0,t.events.slice(G)),t.events.length=$}}function j(A){let R=n.length;for(;R-- >A;){const L=n[R];t.containerState=L[1],L[0].exit.call(t,e)}n.length=A}function O(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function d3(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 q1(e){if(e===null||wn(e)||s3(e))return 1;if(o3(e))return 2}function vg(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!i.includes(u)&&(t=u(t,n),i.push(u))}return t}const cp={name:"attention",resolveAll:h3,tokenize:m3};function h3(e,t){let n=-1,i,o,u,l,f,d,h,p;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;d=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 y={...e[i][1].end},x={...e[n][1].start};G1(y,-d),G1(x,d),l={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},u={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...f.end}},e[i][1].end={...l.start},e[n][1].start={...f.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=Qn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=Qn(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=Qn(h,vg(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=Qn(h,[["exit",u,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Qn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,zr(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function m3(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=q1(i);let u;return l;function l(d){return u=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===u)return e.consume(d),f;const h=e.exit("attentionSequence"),p=q1(d),y=!p||p===2&&o||n.includes(d),x=!o||o===2&&p||n.includes(i);return h._open=!!(u===42?y:y&&(o||!x)),h._close=!!(u===42?x:x&&(p||!y)),t(d)}}function G1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const p3={name:"autolink",tokenize:g3};function g3(e,t,n){let i=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return br(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||Dn(b)?(i=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),i=0,d):(b===43||b===45||b===46||Dn(b))&&i++<32?(e.consume(b),f):(i=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||lp(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),p):r3(b)?(e.consume(b),h):n(b)}function p(b){return Dn(b)?y(b):n(b)}function y(b){return b===46?(e.consume(b),i=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):x(b)}function x(b){if((b===45||Dn(b))&&i++<63){const _=b===45?x:y;return e.consume(b),_}return n(b)}}const Kc={partial:!0,tokenize:y3};function y3(e,t,n){return i;function i(u){return Fe(u)?ot(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||_e(u)?t(u):n(u)}}const Fz={continuation:{tokenize:v3},exit:b3,name:"blockQuote",tokenize:x3};function x3(e,t,n){const i=this;return o;function o(l){if(l===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return Fe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function v3(e,t,n){const i=this;return o;function o(l){return Fe(l)?ot(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(Fz,t,n)(l)}}function b3(e){e.exit("blockQuote")}const qz={name:"characterEscape",tokenize:S3};function S3(e,t,n){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return a3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const Gz={name:"characterReference",tokenize:k3};function k3(e,t,n){const i=this;let o=0,u,l;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,l=Dn,p(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=i3,p):(e.enter("characterReferenceValue"),u=7,l=up,p(y))}function p(y){if(y===59&&o){const x=e.exit("characterReferenceValue");return l===Dn&&!xg(i.sliceSerialize(x))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(y)&&o++<u?(e.consume(y),p):n(y)}}const Y1={partial:!0,tokenize:z3},X1={concrete:!0,name:"codeFenced",tokenize:w3};function w3(e,t,n){const i=this,o={partial:!0,tokenize:L};let u=0,l=0,f;return d;function d($){return h($)}function h($){const G=i.events[i.events.length-1];return u=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,f=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p($)}function p($){return $===f?(l++,e.consume($),p):l<3?n($):(e.exit("codeFencedFenceSequence"),Fe($)?ot(e,y,"whitespace")($):y($))}function y($){return $===null||_e($)?(e.exit("codeFencedFence"),i.interrupt?t($):e.check(Y1,z,R)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x($))}function x($){return $===null||_e($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y($)):Fe($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ot(e,b,"whitespace")($)):$===96&&$===f?n($):(e.consume($),x)}function b($){return $===null||_e($)?y($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_($))}function _($){return $===null||_e($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y($)):$===96&&$===f?n($):(e.consume($),_)}function z($){return e.attempt(o,R,C)($)}function C($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),j}function j($){return u>0&&Fe($)?ot(e,O,"linePrefix",u+1)($):O($)}function O($){return $===null||_e($)?e.check(Y1,z,R)($):(e.enter("codeFlowValue"),A($))}function A($){return $===null||_e($)?(e.exit("codeFlowValue"),O($)):(e.consume($),A)}function R($){return e.exit("codeFenced"),t($)}function L($,G,V){let K=0;return ue;function ue(ne){return $.enter("lineEnding"),$.consume(ne),$.exit("lineEnding"),re}function re(ne){return $.enter("codeFencedFence"),Fe(ne)?ot($,oe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):oe(ne)}function oe(ne){return ne===f?($.enter("codeFencedFenceSequence"),ke(ne)):V(ne)}function ke(ne){return ne===f?(K++,$.consume(ne),ke):K>=l?($.exit("codeFencedFenceSequence"),Fe(ne)?ot($,le,"whitespace")(ne):le(ne)):V(ne)}function le(ne){return ne===null||_e(ne)?($.exit("codeFencedFence"),G(ne)):V(ne)}}}function z3(e,t,n){const i=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const nm={name:"codeIndented",tokenize:E3},_3={partial:!0,tokenize:T3};function E3(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),ot(e,u,"linePrefix",5)(h)}function u(h){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):_e(h)?e.attempt(_3,l,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||_e(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function T3(e,t,n){const i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):_e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):ot(e,u,"linePrefix",5)(l)}function u(l){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(l):_e(l)?o(l):n(l)}}const C3={name:"codeText",previous:j3,resolve:A3,tokenize:N3};function A3(e){let t=e.length-4,n=3,i,o;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;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function j3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function N3(e,t,n){let i=0,o,u;return l;function l(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(u=e.enter("codeTextSequence"),o=0,p(y)):_e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||_e(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function p(y){return y===96?(e.consume(y),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(u.type="codeTextData",h(y))}}class O3{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 o=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Fs(this.left,i),u.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),Fs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fs(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);Fs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Fs(this.left,n.reverse())}}}function Fs(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 Yz(e){const t={};let n=-1,i,o,u,l,f,d,h;const p=new O3(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,u=0,u<d.length&&d[u][1].type==="lineEndingBlank"&&(u+=2),u<d.length&&d[u][1].type==="content"))for(;++u<d.length&&d[u][1].type!=="content";)d[u][1].type==="chunkText"&&(d[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,R3(p,n)),n=t[n],h=!0);else if(i[1]._container){for(u=n,o=void 0;u--;)if(l=p.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=u);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},f=p.slice(o,n),f.unshift(i),p.splice(o,n-o+1,f))}}return zr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function R3(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const u=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const f=l.events,d=[],h={};let p,y,x=-1,b=n,_=0,z=0;const C=[z];for(;b;){for(;e.get(++o)[1]!==b;);u.push(o),b._tokenizer||(p=i.sliceStream(b),b.next||p.push(null),y&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=n;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(z=x+1,C.push(z),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):C.pop(),x=C.length;x--;){const j=f.slice(C[x],C[x+1]),O=u.pop();d.push([O,O+j.length-1]),e.splice(O,2,j)}for(d.reverse(),x=-1;++x<d.length;)h[_+d[x][0]]=_+d[x][1],_+=d[x][1]-d[x][0]-1;return h}const M3={resolve:$3,tokenize:L3},D3={partial:!0,tokenize:U3};function $3(e){return Yz(e),e}function L3(e,t){let n;return i;function i(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):_e(f)?e.check(D3,l,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function l(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function U3(e,t,n){const i=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ot(e,u,"linePrefix")}function u(l){if(l===null||_e(l))return n(l);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function Xz(e,t,n,i,o,u,l,f,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return y;function y(j){return j===60?(e.enter(i),e.enter(o),e.enter(u),e.consume(j),e.exit(u),x):j===null||j===32||j===41||lp(j)?n(j):(e.enter(i),e.enter(l),e.enter(f),e.enter("chunkString",{contentType:"string"}),z(j))}function x(j){return j===62?(e.enter(u),e.consume(j),e.exit(u),e.exit(o),e.exit(i),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===62?(e.exit("chunkString"),e.exit(f),x(j)):j===null||j===60||_e(j)?n(j):(e.consume(j),j===92?_:b)}function _(j){return j===60||j===62||j===92?(e.consume(j),b):b(j)}function z(j){return!p&&(j===null||j===41||wn(j))?(e.exit("chunkString"),e.exit(f),e.exit(l),e.exit(i),t(j)):p<h&&j===40?(e.consume(j),p++,z):j===41?(e.consume(j),p--,z):j===null||j===32||j===40||lp(j)?n(j):(e.consume(j),j===92?C:z)}function C(j){return j===40||j===41||j===92?(e.consume(j),z):z(j)}}function Kz(e,t,n,i,o,u){const l=this;let f=0,d;return h;function h(b){return e.enter(i),e.enter(o),e.consume(b),e.exit(o),e.enter(u),p}function p(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(u),e.enter(o),e.consume(b),e.exit(o),e.exit(i),t):_e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||_e(b)||f++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Fe(b)),b===92?x:y)}function x(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function Jz(e,t,n,i,o,u){let l;return f;function f(x){return x===34||x===39||x===40?(e.enter(i),e.enter(o),e.consume(x),e.exit(o),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),t):(e.enter(u),h(x))}function h(x){return x===l?(e.exit(u),d(l)):x===null?n(x):_e(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ot(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||_e(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?y:p)}function y(x){return x===l||x===92?(e.consume(x),p):p(x)}}function il(e,t){let n;return i;function i(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Fe(o)?ot(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const P3={name:"definition",tokenize:Z3},V3={partial:!0,tokenize:B3};function Z3(e,t,n){const i=this;let o;return u;function u(b){return e.enter("definition"),l(b)}function l(b){return Kz.call(i,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=To(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return wn(b)?il(e,h)(b):h(b)}function h(b){return Xz(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(V3,y,y)(b)}function y(b){return Fe(b)?ot(e,x,"whitespace")(b):x(b)}function x(b){return b===null||_e(b)?(e.exit("definition"),i.parser.defined.push(o),t(b)):n(b)}}function B3(e,t,n){return i;function i(f){return wn(f)?il(e,o)(f):n(f)}function o(f){return Jz(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Fe(f)?ot(e,l,"whitespace")(f):l(f)}function l(f){return f===null||_e(f)?t(f):n(f)}}const I3={name:"hardBreakEscape",tokenize:H3};function H3(e,t,n){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return _e(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const F3={name:"headingAtx",resolve:q3,tokenize:G3};function q3(e,t){let n=e.length-2,i=3,o,u;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&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},u={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},zr(e,i,n-i+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function G3(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),u(p)}function u(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&i++<6?(e.consume(p),l):p===null||wn(p)?(e.exit("atxHeadingSequence"),f(p)):n(p)}function f(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||_e(p)?(e.exit("atxHeading"),t(p)):Fe(p)?ot(e,f,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),f(p))}function h(p){return p===null||p===35||wn(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),h)}}const Y3=["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"],K1=["pre","script","style","textarea"],X3={concrete:!0,name:"htmlFlow",resolveTo:Q3,tokenize:W3},K3={partial:!0,tokenize:t$},J3={partial:!0,tokenize:e$};function Q3(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 W3(e,t,n){const i=this;let o,u,l,f,d;return h;function h(w){return p(w)}function p(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),y}function y(w){return w===33?(e.consume(w),x):w===47?(e.consume(w),u=!0,z):w===63?(e.consume(w),o=3,i.interrupt?t:N):br(w)?(e.consume(w),l=String.fromCharCode(w),C):n(w)}function x(w){return w===45?(e.consume(w),o=2,b):w===91?(e.consume(w),o=5,f=0,_):br(w)?(e.consume(w),o=4,i.interrupt?t:N):n(w)}function b(w){return w===45?(e.consume(w),i.interrupt?t:N):n(w)}function _(w){const ie="CDATA[";return w===ie.charCodeAt(f++)?(e.consume(w),f===ie.length?i.interrupt?t:oe:_):n(w)}function z(w){return br(w)?(e.consume(w),l=String.fromCharCode(w),C):n(w)}function C(w){if(w===null||w===47||w===62||wn(w)){const ie=w===47,ve=l.toLowerCase();return!ie&&!u&&K1.includes(ve)?(o=1,i.interrupt?t(w):oe(w)):Y3.includes(l.toLowerCase())?(o=6,ie?(e.consume(w),j):i.interrupt?t(w):oe(w)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(w):u?O(w):A(w))}return w===45||Dn(w)?(e.consume(w),l+=String.fromCharCode(w),C):n(w)}function j(w){return w===62?(e.consume(w),i.interrupt?t:oe):n(w)}function O(w){return Fe(w)?(e.consume(w),O):ue(w)}function A(w){return w===47?(e.consume(w),ue):w===58||w===95||br(w)?(e.consume(w),R):Fe(w)?(e.consume(w),A):ue(w)}function R(w){return w===45||w===46||w===58||w===95||Dn(w)?(e.consume(w),R):L(w)}function L(w){return w===61?(e.consume(w),$):Fe(w)?(e.consume(w),L):A(w)}function $(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),d=w,G):Fe(w)?(e.consume(w),$):V(w)}function G(w){return w===d?(e.consume(w),d=null,K):w===null||_e(w)?n(w):(e.consume(w),G)}function V(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||wn(w)?L(w):(e.consume(w),V)}function K(w){return w===47||w===62||Fe(w)?A(w):n(w)}function ue(w){return w===62?(e.consume(w),re):n(w)}function re(w){return w===null||_e(w)?oe(w):Fe(w)?(e.consume(w),re):n(w)}function oe(w){return w===45&&o===2?(e.consume(w),P):w===60&&o===1?(e.consume(w),Y):w===62&&o===4?(e.consume(w),T):w===63&&o===3?(e.consume(w),N):w===93&&o===5?(e.consume(w),ce):_e(w)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(K3,q,ke)(w)):w===null||_e(w)?(e.exit("htmlFlowData"),ke(w)):(e.consume(w),oe)}function ke(w){return e.check(J3,le,q)(w)}function le(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),ne}function ne(w){return w===null||_e(w)?ke(w):(e.enter("htmlFlowData"),oe(w))}function P(w){return w===45?(e.consume(w),N):oe(w)}function Y(w){return w===47?(e.consume(w),l="",Z):oe(w)}function Z(w){if(w===62){const ie=l.toLowerCase();return K1.includes(ie)?(e.consume(w),T):oe(w)}return br(w)&&l.length<8?(e.consume(w),l+=String.fromCharCode(w),Z):oe(w)}function ce(w){return w===93?(e.consume(w),N):oe(w)}function N(w){return w===62?(e.consume(w),T):w===45&&o===2?(e.consume(w),N):oe(w)}function T(w){return w===null||_e(w)?(e.exit("htmlFlowData"),q(w)):(e.consume(w),T)}function q(w){return e.exit("htmlFlow"),t(w)}}function e$(e,t,n){const i=this;return o;function o(l){return _e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function t$(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Kc,t,n)}}const n$={name:"htmlText",tokenize:r$};function r$(e,t,n){const i=this;let o,u,l;return f;function f(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),L):N===63?(e.consume(N),A):br(N)?(e.consume(N),V):n(N)}function h(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),u=0,_):br(N)?(e.consume(N),O):n(N)}function p(N){return N===45?(e.consume(N),b):n(N)}function y(N){return N===null?n(N):N===45?(e.consume(N),x):_e(N)?(l=y,Y(N)):(e.consume(N),y)}function x(N){return N===45?(e.consume(N),b):y(N)}function b(N){return N===62?P(N):N===45?x(N):y(N)}function _(N){const T="CDATA[";return N===T.charCodeAt(u++)?(e.consume(N),u===T.length?z:_):n(N)}function z(N){return N===null?n(N):N===93?(e.consume(N),C):_e(N)?(l=z,Y(N)):(e.consume(N),z)}function C(N){return N===93?(e.consume(N),j):z(N)}function j(N){return N===62?P(N):N===93?(e.consume(N),j):z(N)}function O(N){return N===null||N===62?P(N):_e(N)?(l=O,Y(N)):(e.consume(N),O)}function A(N){return N===null?n(N):N===63?(e.consume(N),R):_e(N)?(l=A,Y(N)):(e.consume(N),A)}function R(N){return N===62?P(N):A(N)}function L(N){return br(N)?(e.consume(N),$):n(N)}function $(N){return N===45||Dn(N)?(e.consume(N),$):G(N)}function G(N){return _e(N)?(l=G,Y(N)):Fe(N)?(e.consume(N),G):P(N)}function V(N){return N===45||Dn(N)?(e.consume(N),V):N===47||N===62||wn(N)?K(N):n(N)}function K(N){return N===47?(e.consume(N),P):N===58||N===95||br(N)?(e.consume(N),ue):_e(N)?(l=K,Y(N)):Fe(N)?(e.consume(N),K):P(N)}function ue(N){return N===45||N===46||N===58||N===95||Dn(N)?(e.consume(N),ue):re(N)}function re(N){return N===61?(e.consume(N),oe):_e(N)?(l=re,Y(N)):Fe(N)?(e.consume(N),re):K(N)}function oe(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,ke):_e(N)?(l=oe,Y(N)):Fe(N)?(e.consume(N),oe):(e.consume(N),le)}function ke(N){return N===o?(e.consume(N),o=void 0,ne):N===null?n(N):_e(N)?(l=ke,Y(N)):(e.consume(N),ke)}function le(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||wn(N)?K(N):(e.consume(N),le)}function ne(N){return N===47||N===62||wn(N)?K(N):n(N)}function P(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function Y(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Z}function Z(N){return Fe(N)?ot(e,ce,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ce(N)}function ce(N){return e.enter("htmlTextData"),l(N)}}const bg={name:"labelEnd",resolveAll:s$,resolveTo:l$,tokenize:u$},i$={tokenize:c$},a$={tokenize:f$},o$={tokenize:d$};function s$(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 o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&zr(e,0,e.length,n),e}function l$(e,t){let n=e.length,i=0,o,u,l,f;for(;n--;)if(o=e[n][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[l-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=Qn(f,e.slice(u+1,u+i+3)),f=Qn(f,[["enter",p,t]]),f=Qn(f,vg(t.parser.constructs.insideSpan.null,e.slice(u+i+4,l-3),t)),f=Qn(f,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),f=Qn(f,e.slice(l+1)),f=Qn(f,[["exit",d,t]]),zr(e,u,e.length,f),e}function u$(e,t,n){const i=this;let o=i.events.length,u,l;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){u=i.events[o][1];break}return f;function f(x){return u?u._inactive?y(x):(l=i.parser.defined.includes(To(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(i$,p,l?p:y)(x):x===91?e.attempt(a$,p,l?h:y)(x):l?p(x):y(x)}function h(x){return e.attempt(o$,p,y)(x)}function p(x){return t(x)}function y(x){return u._balanced=!0,n(x)}}function c$(e,t,n){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return wn(y)?il(e,u)(y):u(y)}function u(y){return y===41?p(y):Xz(e,l,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function l(y){return wn(y)?il(e,d)(y):p(y)}function f(y){return n(y)}function d(y){return y===34||y===39||y===40?Jz(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):p(y)}function h(y){return wn(y)?il(e,p)(y):p(y)}function p(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function f$(e,t,n){const i=this;return o;function o(f){return Kz.call(i,e,u,l,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(To(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function l(f){return n(f)}}function d$(e,t,n){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const h$={name:"labelStartImage",resolveAll:bg.resolveAll,tokenize:m$};function m$(e,t,n){const i=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),l):n(f)}function l(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(f):t(f)}}const p$={name:"labelStartLink",resolveAll:bg.resolveAll,tokenize:g$};function g$(e,t,n){const i=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),u}function u(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const rm={name:"lineEnding",tokenize:y$};function y$(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ot(e,t,"linePrefix")}}const xc={name:"thematicBreak",tokenize:x$};function x$(e,t,n){let i=0,o;return u;function u(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||_e(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Fe(h)?ot(e,f,"whitespace")(h):f(h))}}const kn={continuation:{tokenize:k$},exit:z$,name:"list",tokenize:S$},v$={partial:!0,tokenize:_$},b$={partial:!0,tokenize:w$};function S$(e,t,n){const i=this,o=i.events[i.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return f;function f(b){const _=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:up(b)){if(i.containerState.type||(i.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(xc,n,h)(b):h(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return up(b)&&++l<10?(e.consume(b),d):(!i.interrupt||l<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(Kc,i.interrupt?n:p,e.attempt(v$,x,y))}function p(b){return i.containerState.initialBlankLine=!0,u++,x(b)}function y(b){return Fe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):n(b)}function x(b){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function k$(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Kc,o,u);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ot(e,t,"listItemIndent",i.containerState.size+1)(f)}function u(f){return i.containerState.furtherBlankLines||!Fe(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(b$,t,l)(f))}function l(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,ot(e,e.attempt(kn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function w$(e,t,n){const i=this;return ot(e,o,"listItemIndent",i.containerState.size+1);function o(u){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(u):n(u)}}function z$(e){e.exit(this.containerState.type)}function _$(e,t,n){const i=this;return ot(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const l=i.events[i.events.length-1];return!Fe(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const J1={name:"setextUnderline",resolveTo:E$,tokenize:T$};function E$(e,t){let n=e.length,i,o,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",l,t]),e.splice(u+1,0,["exit",e[i][1],t]),e[i][1].end={...e[u][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function T$(e,t,n){const i=this;let o;return u;function u(h){let p=i.events.length,y;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){y=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Fe(h)?ot(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||_e(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const C$={tokenize:A$};function A$(e){const t=this,n=e.attempt(Kc,i,e.attempt(this.parser.constructs.flowInitial,o,ot(e,e.attempt(this.parser.constructs.flow,o,e.attempt(M3,o)),"linePrefix")));return n;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const j$={resolveAll:Wz()},N$=Qz("string"),O$=Qz("text");function Qz(e){return{resolveAll:Wz(e==="text"?R$:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],u=n.attempt(o,l,f);return l;function l(p){return h(p)?u(p):f(p)}function f(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),u(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const y=o[p];let x=-1;if(y)for(;++x<y.length;){const b=y[x];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function Wz(e){return t;function t(n,i){let o=-1,u;for(;++o<=n.length;)u===void 0?n[o]&&n[o][1].type==="data"&&(u=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(n,i):n}}function R$(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],o=t.sliceStream(i);let u=o.length,l=-1,f=0,d;for(;u--;){const h=o[u];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)f++,l--;if(l)break;l=-1}else if(h===-2)d=!0,f++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:i.start._bufferIndex+l,_index:i.start._index+u,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const M$={42:kn,43:kn,45:kn,48:kn,49:kn,50:kn,51:kn,52:kn,53:kn,54:kn,55:kn,56:kn,57:kn,62:Fz},D$={91:P3},$$={[-2]:nm,[-1]:nm,32:nm},L$={35:F3,42:xc,45:[J1,xc],60:X3,61:J1,95:xc,96:X1,126:X1},U$={38:Gz,92:qz},P$={[-5]:rm,[-4]:rm,[-3]:rm,33:h$,38:Gz,42:cp,60:[p3,n$],91:p$,92:[I3,qz],93:bg,95:cp,96:C3},V$={null:[cp,j$]},Z$={null:[42,95]},B$={null:[]},I$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Z$,contentInitial:D$,disable:B$,document:M$,flow:L$,flowInitial:$$,insideSpan:V$,string:U$,text:P$},Symbol.toStringTag,{value:"Module"}));function H$(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 o={},u=[];let l=[],f=[];const d={attempt:G(L),check:G($),consume:O,enter:A,exit:R,interrupt:G($,{interrupt:!0})},h={code:null,containerState:{},defineSkip:z,events:[],now:_,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:y};let p=t.tokenize.call(h,d);return t.resolveAll&&u.push(t),h;function y(re){return l=Qn(l,re),C(),l[l.length-1]!==null?[]:(V(t,0),h.events=vg(u,h.events,h),h.events)}function x(re,oe){return q$(b(re),oe)}function b(re){return F$(l,re)}function _(){const{_bufferIndex:re,_index:oe,line:ke,column:le,offset:ne}=i;return{_bufferIndex:re,_index:oe,line:ke,column:le,offset:ne}}function z(re){o[re.line]=re.column,ue()}function C(){let re;for(;i._index<l.length;){const oe=l[i._index];if(typeof oe=="string")for(re=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===re&&i._bufferIndex<oe.length;)j(oe.charCodeAt(i._bufferIndex));else j(oe)}}function j(re){p=p(re)}function O(re){_e(re)?(i.line++,i.column=1,i.offset+=re===-3?2:1,ue()):re!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=re}function A(re,oe){const ke=oe||{};return ke.type=re,ke.start=_(),h.events.push(["enter",ke,h]),f.push(ke),ke}function R(re){const oe=f.pop();return oe.end=_(),h.events.push(["exit",oe,h]),oe}function L(re,oe){V(re,oe.from)}function $(re,oe){oe.restore()}function G(re,oe){return ke;function ke(le,ne,P){let Y,Z,ce,N;return Array.isArray(le)?q(le):"tokenize"in le?q([le]):T(le);function T(pe){return ge;function ge(Ge){const De=Ge!==null&&pe[Ge],Ct=Ge!==null&&pe.null,an=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Ct)?Ct:Ct?[Ct]:[]];return q(an)(Ge)}}function q(pe){return Y=pe,Z=0,pe.length===0?P:w(pe[Z])}function w(pe){return ge;function ge(Ge){return N=K(),ce=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?ve():pe.tokenize.call(oe?Object.assign(Object.create(h),oe):h,d,ie,ve)(Ge)}}function ie(pe){return re(ce,N),ne}function ve(pe){return N.restore(),++Z<Y.length?w(Y[Z]):P}}}function V(re,oe){re.resolveAll&&!u.includes(re)&&u.push(re),re.resolve&&zr(h.events,oe,h.events.length-oe,re.resolve(h.events.slice(oe),h)),re.resolveTo&&(h.events=re.resolveTo(h.events,h))}function K(){const re=_(),oe=h.previous,ke=h.currentConstruct,le=h.events.length,ne=Array.from(f);return{from:le,restore:P};function P(){i=re,h.previous=oe,h.currentConstruct=ke,h.events.length=le,f=ne,ue()}}function ue(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function F$(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(i,u)];else{if(l=e.slice(n,o),i>-1){const f=l[0];typeof f=="string"?l[0]=f.slice(i):l.shift()}u>0&&l.push(e[o].slice(0,u))}return l}function q$(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const u=e[n];let l;if(typeof u=="string")l=u;else switch(u){case-5:{l="\r";break}case-4:{l=`
|
|
21
|
-
`;break}case-3:{l=`\r
|
|
22
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(u)}o=u===-2,i.push(l)}return i.join("")}function G$(e){const i={constructs:e3([I$,...(e||{}).extensions||[]]),content:o(l3),defined:[],document:o(c3),flow:o(C$),lazy:{},string:o(N$),text:o(O$)};return i;function o(u){return l;function l(f){return H$(i,u,f)}}}function Y$(e){for(;!Yz(e););return e}const Q1=/[\0\t\n\r]/g;function X$(){let e=1,t="",n=!0,i;return o;function o(u,l,f){const d=[];let h,p,y,x,b;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),y=0,t="",n&&(u.charCodeAt(0)===65279&&y++,n=void 0);y<u.length;){if(Q1.lastIndex=y,h=Q1.exec(u),x=h&&h.index!==void 0?h.index:u.length,b=u.charCodeAt(x),!h){t=u.slice(y);break}if(b===10&&y===x&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),y<x&&(d.push(u.slice(y,x)),e+=x-y),b){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}y=x+1}return f&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}const K$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function J$(e){return e.replace(K$,Q$)}function Q$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return Hz(n.slice(u?2:1),u?16:10)}return xg(n)||e}const e_={}.hasOwnProperty;function W$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),e5(n)(Y$(G$(n).document().write(X$()(e,t,!0))))}function e5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Je),autolinkProtocol:K,autolinkEmail:K,atxHeading:u(Ui),blockQuote:u(Ct),characterEscape:K,characterReference:K,codeFenced:u(an),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(an,l),codeText:u(Ln,l),codeTextData:K,data:K,codeFlowValue:K,definition:u(hr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Un),hardBreakEscape:u(Ze),hardBreakTrailing:u(Ze),htmlFlow:u(tt,l),htmlFlowData:K,htmlText:u(tt,l),htmlTextData:K,image:u(st),label:l,link:u(Je),listItem:u(Pn),listItemValue:x,listOrdered:u(Ht,y),listUnordered:u(Ht),paragraph:u(_t),reference:w,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Ui),strong:u(Pt),thematicBreak:u(wa)},exit:{atxHeading:d(),atxHeadingSequence:L,autolink:d(),autolinkEmail:De,autolinkProtocol:Ge,blockQuote:d(),characterEscapeValue:ue,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:pe,characterReference:ge,codeFenced:d(C),codeFencedFence:z,codeFencedFenceInfo:b,codeFencedFenceMeta:_,codeFlowValue:ue,codeIndented:d(j),codeText:d(ne),codeTextData:ue,data:ue,definition:d(),definitionDestinationString:R,definitionLabelString:O,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(oe),hardBreakTrailing:d(oe),htmlFlow:d(ke),htmlFlowData:ue,htmlText:d(le),htmlTextData:ue,image:d(Y),label:ce,labelText:Z,lineEnding:re,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ie,resourceDestinationString:N,resourceTitleString:T,resource:q,setextHeading:d(V),setextHeadingLineSequence:G,setextHeadingText:$,strong:d(),thematicBreak:d()}};t_(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(J){let se={type:"root",children:[]};const ye={stack:[se],tokenStack:[],config:t,enter:f,exit:h,buffer:l,resume:p,data:n},ze=[];let Pe=-1;for(;++Pe<J.length;)if(J[Pe][1].type==="listOrdered"||J[Pe][1].type==="listUnordered")if(J[Pe][0]==="enter")ze.push(Pe);else{const on=ze.pop();Pe=o(J,on,Pe)}for(Pe=-1;++Pe<J.length;){const on=t[J[Pe][0]];e_.call(on,J[Pe][1].type)&&on[J[Pe][1].type].call(Object.assign({sliceSerialize:J[Pe][2].sliceSerialize},ye),J[Pe][1])}if(ye.tokenStack.length>0){const on=ye.tokenStack[ye.tokenStack.length-1];(on[1]||W1).call(ye,void 0,on[0])}for(se.position={start:wi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:wi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)se=t.transforms[Pe](se)||se;return se}function o(J,se,ye){let ze=se-1,Pe=-1,on=!1,En,sn,Vt,hn;for(;++ze<=ye;){const nt=J[ze];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?Pe++:Pe--,hn=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(En&&!hn&&!Pe&&!Vt&&(Vt=ze),hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hn=void 0}if(!Pe&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||Pe===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(En){let Qr=ze;for(sn=void 0;Qr--;){const ir=J[Qr];if(ir[1].type==="lineEnding"||ir[1].type==="lineEndingBlank"){if(ir[0]==="exit")continue;sn&&(J[sn][1].type="lineEndingBlank",on=!0),ir[1].type="lineEnding",sn=Qr}else if(!(ir[1].type==="linePrefix"||ir[1].type==="blockQuotePrefix"||ir[1].type==="blockQuotePrefixWhitespace"||ir[1].type==="blockQuoteMarker"||ir[1].type==="listItemIndent"))break}Vt&&(!sn||Vt<sn)&&(En._spread=!0),En.end=Object.assign({},sn?J[sn][1].start:nt[1].end),J.splice(sn||ze,0,["exit",En,nt[2]]),ze++,ye++}if(nt[1].type==="listItemPrefix"){const Qr={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};En=Qr,J.splice(ze,0,["enter",Qr,nt[2]]),ze++,ye++,Vt=void 0,hn=!0}}}return J[se][1]._spread=on,ye}function u(J,se){return ye;function ye(ze){f.call(this,J(ze),ze),se&&se.call(this,ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function f(J,se,ye){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([se,ye||void 0]),J.position={start:wi(se.start),end:void 0}}function d(J){return se;function se(ye){J&&J.call(this,ye),h.call(this,ye)}}function h(J,se){const ye=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==J.type&&(se?se.call(this,J,ze[0]):(ze[1]||W1).call(this,J,ze[0]));else throw new Error("Cannot close `"+J.type+"` ("+rl({start:J.start,end:J.end})+"): it’s not open");ye.position.end=wi(J.end)}function p(){return QD(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(J){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function b(){const J=this.resume(),se=this.stack[this.stack.length-1];se.lang=J}function _(){const J=this.resume(),se=this.stack[this.stack.length-1];se.meta=J}function z(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J.replace(/(\r?\n|\r)$/g,"")}function O(J){const se=this.resume(),ye=this.stack[this.stack.length-1];ye.label=se,ye.identifier=To(this.sliceSerialize(J)).toLowerCase()}function A(){const J=this.resume(),se=this.stack[this.stack.length-1];se.title=J}function R(){const J=this.resume(),se=this.stack[this.stack.length-1];se.url=J}function L(J){const se=this.stack[this.stack.length-1];if(!se.depth){const ye=this.sliceSerialize(J).length;se.depth=ye}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function G(J){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function K(J){const ye=this.stack[this.stack.length-1].children;let ze=ye[ye.length-1];(!ze||ze.type!=="text")&&(ze=lt(),ze.position={start:wi(J.start),end:void 0},ye.push(ze)),this.stack.push(ze)}function ue(J){const se=this.stack.pop();se.value+=this.sliceSerialize(J),se.position.end=wi(J.end)}function re(J){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=se.children[se.children.length-1];ye.position.end=wi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(K.call(this,J),ue.call(this,J))}function oe(){this.data.atHardBreak=!0}function ke(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J}function le(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J}function ne(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J}function P(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=se,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Y(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=se,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Z(J){const se=this.sliceSerialize(J),ye=this.stack[this.stack.length-2];ye.label=J$(se),ye.identifier=To(se).toLowerCase()}function ce(){const J=this.stack[this.stack.length-1],se=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ze=J.children;ye.children=ze}else ye.alt=se}function N(){const J=this.resume(),se=this.stack[this.stack.length-1];se.url=J}function T(){const J=this.resume(),se=this.stack[this.stack.length-1];se.title=J}function q(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ie(J){const se=this.resume(),ye=this.stack[this.stack.length-1];ye.label=se,ye.identifier=To(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function ve(J){this.data.characterReferenceType=J.type}function pe(J){const se=this.sliceSerialize(J),ye=this.data.characterReferenceType;let ze;ye?(ze=Hz(se,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=xg(se);const Pe=this.stack[this.stack.length-1];Pe.value+=ze}function ge(J){const se=this.stack.pop();se.position.end=wi(J.end)}function Ge(J){ue.call(this,J);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(J)}function De(J){ue.call(this,J);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(J)}function Ct(){return{type:"blockquote",children:[]}}function an(){return{type:"code",lang:null,meta:null,value:""}}function Ln(){return{type:"inlineCode",value:""}}function hr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Un(){return{type:"emphasis",children:[]}}function Ui(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function tt(){return{type:"html",value:""}}function st(){return{type:"image",title:null,url:"",alt:null}}function Je(){return{type:"link",title:null,url:"",children:[]}}function Ht(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Pn(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function _t(){return{type:"paragraph",children:[]}}function Pt(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function wa(){return{type:"thematicBreak"}}}function wi(e){return{line:e.line,column:e.column,offset:e.offset}}function t_(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?t_(e,i):t5(e,i)}}function t5(e,t){let n;for(n in t)if(e_.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 W1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rl({start:t.start,end:t.end})+") is still open")}function n5(e){const t=this;t.parser=n;function n(i){return W$(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function r5(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 i5(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
23
|
-
`}]}function a5(e,t){const n=t.value?t.value+`
|
|
24
|
-
`:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function o5(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function s5(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l5(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=Bo(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let l,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=u+1,f+=1,e.footnoteCounts.set(i,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function u5(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 c5(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function n_(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 o=e.all(t),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=i:o.push({type:"text",value:i}),o}function f5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return n_(e,t);const o={src:Bo(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function d5(e,t){const n={src:Bo(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 h5(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 m5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return n_(e,t);const o={href:Bo(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function p5(e,t){const n={href:Bo(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 g5(e,t,n){const i=e.all(t),o=n?y5(n):r_(t),u={},l=[];if(typeof t.checked=="boolean"){const p=i[0];let y;p&&p.type==="element"&&p.tagName==="p"?y=p:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const p=i[f];(o||f!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
25
|
-
`}),p.type==="element"&&p.tagName==="p"&&!o?l.push(...p.children):l.push(p)}const d=i[i.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
26
|
-
`});const h={type:"element",tagName:"li",properties:u,children:l};return e.patch(t,h),e.applyData(t,h)}function y5(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=r_(n[i])}return t}function r_(e){const t=e.spread;return t??e.children.length>1}function x5(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const l=i[o];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 u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,u),e.applyData(t,u)}function v5(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b5(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function S5(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k5(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=mg(t.children[1]),d=Lz(t.children[t.children.length-1]);f&&d&&(l.position={start:f,end:d}),o.push(l)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function w5(e,t,n){const i=n?n.children:void 0,u=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,f=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const y=t.children[d],x={},b=l?l[d]:void 0;b&&(x.align=b);let _={type:"element",tagName:u,properties:x,children:[]};y&&(_.children=e.all(y),e.patch(y,_),_=e.applyData(y,_)),h.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function z5(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const eS=9,tS=32;function _5(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const u=[];for(;i;)u.push(nS(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return u.push(nS(t.slice(o),o>0,!1)),u.join("")}function nS(e,t,n){let i=0,o=e.length;if(t){let u=e.codePointAt(i);for(;u===eS||u===tS;)i++,u=e.codePointAt(i)}if(n){let u=e.codePointAt(o-1);for(;u===eS||u===tS;)o--,u=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function E5(e,t){const n={type:"text",value:_5(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function T5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const C5={blockquote:r5,break:i5,code:a5,delete:o5,emphasis:s5,footnoteReference:l5,heading:u5,html:c5,imageReference:f5,image:d5,inlineCode:h5,linkReference:m5,link:p5,listItem:g5,list:x5,paragraph:v5,root:b5,strong:S5,table:k5,tableCell:z5,tableRow:w5,text:E5,thematicBreak:T5,toml:Qu,yaml:Qu,definition:Qu,footnoteDefinition:Qu};function Qu(){}const i_=-1,Jc=0,al=1,Cc=2,Sg=3,kg=4,wg=5,zg=6,a_=7,o_=8,rS=typeof self=="object"?self:globalThis,A5=(e,t)=>{const n=(o,u)=>(e.set(u,o),o),i=o=>{if(e.has(o))return e.get(o);const[u,l]=t[o];switch(u){case Jc:case i_:return n(l,o);case al:{const f=n([],o);for(const d of l)f.push(i(d));return f}case Cc:{const f=n({},o);for(const[d,h]of l)f[i(d)]=i(h);return f}case Sg:return n(new Date(l),o);case kg:{const{source:f,flags:d}=l;return n(new RegExp(f,d),o)}case wg:{const f=n(new Map,o);for(const[d,h]of l)f.set(i(d),i(h));return f}case zg:{const f=n(new Set,o);for(const d of l)f.add(i(d));return f}case a_:{const{name:f,message:d}=l;return n(new rS[f](d),o)}case o_:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:f}=new Uint8Array(l);return n(new DataView(f),l)}}return n(new rS[u](l),o)};return i},iS=e=>A5(new Map,e)(0),uo="",{toString:j5}={},{keys:N5}=Object,qs=e=>{const t=typeof e;if(t!=="object"||!e)return[Jc,t];const n=j5.call(e).slice(8,-1);switch(n){case"Array":return[al,uo];case"Object":return[Cc,uo];case"Date":return[Sg,uo];case"RegExp":return[kg,uo];case"Map":return[wg,uo];case"Set":return[zg,uo];case"DataView":return[al,n]}return n.includes("Array")?[al,n]:n.includes("Error")?[a_,n]:[Cc,n]},Wu=([e,t])=>e===Jc&&(t==="function"||t==="symbol"),O5=(e,t,n,i)=>{const o=(l,f)=>{const d=i.push(l)-1;return n.set(f,d),d},u=l=>{if(n.has(l))return n.get(l);let[f,d]=qs(l);switch(f){case Jc:{let p=l;switch(d){case"bigint":f=o_,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([i_],l)}return o([f,p],l)}case al:{if(d){let x=l;return d==="DataView"?x=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(l)),o([d,[...x]],l)}const p=[],y=o([f,p],l);for(const x of l)p.push(u(x));return y}case Cc:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const p=[],y=o([f,p],l);for(const x of N5(l))(e||!Wu(qs(l[x])))&&p.push([u(x),u(l[x])]);return y}case Sg:return o([f,l.toISOString()],l);case kg:{const{source:p,flags:y}=l;return o([f,{source:p,flags:y}],l)}case wg:{const p=[],y=o([f,p],l);for(const[x,b]of l)(e||!(Wu(qs(x))||Wu(qs(b))))&&p.push([u(x),u(b)]);return y}case zg:{const p=[],y=o([f,p],l);for(const x of l)(e||!Wu(qs(x)))&&p.push(u(x));return y}}const{message:h}=l;return o([f,{name:d,message:h}],l)};return u},aS=(e,{json:t,lossy:n}={})=>{const i=[];return O5(!(t||n),!!t,new Map,i)(e),i},Ac=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?iS(aS(e,t)):structuredClone(e):(e,t)=>iS(aS(e,t));function R5(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 M5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function D5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||R5,i=e.options.footnoteBackLabel||M5,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),y=String(h.identifier).toUpperCase(),x=Bo(y.toLowerCase());let b=0;const _=[],z=e.footnoteCounts.get(y);for(;z!==void 0&&++b<=z;){_.length>0&&_.push({type:"text",value:" "});let O=typeof n=="string"?n:n(d,b);typeof O=="string"&&(O={type:"text",value:O}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,b),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const O=C.children[C.children.length-1];O&&O.type==="text"?O.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(..._)}else p.push(..._);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(p,!0)};e.patch(h,j),f.push(j)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ac(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
27
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
28
|
-
`}]}}const s_=(function(e){if(e==null)return P5;if(typeof e=="function")return Qc(e);if(typeof e=="object")return Array.isArray(e)?$5(e):L5(e);if(typeof e=="string")return U5(e);throw new Error("Expected function, string, or object as test")});function $5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=s_(e[n]);return Qc(i);function i(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function L5(e){const t=e;return Qc(n);function n(i){const o=i;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function U5(e){return Qc(t);function t(n){return n&&n.type===e}}function Qc(e){return t;function t(n,i,o){return!!(V5(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function P5(){return!0}function V5(e){return e!==null&&typeof e=="object"&&"type"in e}const l_=[],Z5=!0,oS=!1,B5="skip";function I5(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const u=s_(o),l=i?-1:1;f(e,void 0,[])();function f(d,h,p){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=l_,_,z,C;if((!t||u(d,h,p[p.length-1]||void 0))&&(b=H5(n(d,p)),b[0]===oS))return b;if("children"in d&&d.children){const j=d;if(j.children&&b[0]!==B5)for(z=(i?j.children.length:-1)+l,C=p.concat(j);z>-1&&z<j.children.length;){const O=j.children[z];if(_=f(O,z,C)(),_[0]===oS)return _;z=typeof _[1]=="number"?_[1]:z+l}}return b}}}function H5(e){return Array.isArray(e)?e:typeof e=="number"?[Z5,e]:e==null?l_:[e]}function u_(e,t,n,i){let o,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,o=n):(u=t,l=n,o=i),I5(e,u,f,o);function f(d,h){const p=h[h.length-1],y=p?p.children.indexOf(d):void 0;return l(d,y,p)}}const fp={}.hasOwnProperty,F5={};function q5(e,t){const n=t||F5,i=new Map,o=new Map,u=new Map,l={...C5,...n.handlers},f={all:h,applyData:Y5,definitionById:i,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:l,one:d,options:n,patch:G5,wrap:K5};return u_(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const y=p.type==="definition"?i:o,x=String(p.identifier).toUpperCase();y.has(x)||y.set(x,p)}}),f;function d(p,y){const x=p.type,b=f.handlers[x];if(fp.call(f.handlers,x)&&b)return b(f,p,y);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in p){const{children:z,...C}=p,j=Ac(C);return j.children=f.all(p),j}return Ac(p)}return(f.options.unknownHandler||X5)(f,p,y)}function h(p){const y=[];if("children"in p){const x=p.children;let b=-1;for(;++b<x.length;){const _=f.one(x[b],p);if(_){if(b&&x[b-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=sS(_.value)),!Array.isArray(_)&&_.type==="element")){const z=_.children[0];z&&z.type==="text"&&(z.value=sS(z.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function G5(e,t){e.position&&(t.position=jD(e))}function Y5(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,u=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"&&u&&Object.assign(n.properties,Ac(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function X5(e,t){const n=t.data||{},i="value"in t&&!(fp.call(n,"hProperties")||fp.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 K5(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
29
|
-
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
30
|
-
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
31
|
-
`}),n}function sS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function lS(e,t){const n=q5(e,t),i=n.one(e,void 0),o=D5(n),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
32
|
-
`},o),u}function J5(e,t){return e&&"run"in e?async function(n,i){const o=lS(n,{file:i,...t});await e.run(o,i)}:function(n,i){return lS(n,{file:i,...e||t})}}function uS(e){if(e)throw e}var im,cS;function Q5(){if(cS)return im;cS=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!y)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},f=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return im=function d(){var h,p,y,x,b,_,z=arguments[0],C=1,j=arguments.length,O=!1;for(typeof z=="boolean"&&(O=z,z=arguments[1]||{},C=2),(z==null||typeof z!="object"&&typeof z!="function")&&(z={});C<j;++C)if(h=arguments[C],h!=null)for(p in h)y=f(z,p),x=f(h,p),z!==x&&(O&&x&&(u(x)||(b=o(x)))?(b?(b=!1,_=y&&o(y)?y:[]):_=y&&u(y)?y:{},l(z,{name:p,newValue:d(O,_,x)})):typeof x<"u"&&l(z,{name:p,newValue:x}));return z},im}var W5=Q5();const am=Sp(W5);function dp(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 e6(){const e=[],t={run:n,use:i};return t;function n(...o){let u=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);f(null,...o);function f(d,...h){const p=e[++u];let y=-1;if(d){l(d);return}for(;++y<o.length;)(h[y]===null||h[y]===void 0)&&(h[y]=o[y]);o=h,p?t6(p,f)(...h):l(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function t6(e,t){let n;return i;function i(...l){const f=e.length>l.length;let d;f&&l.push(o);try{d=e.apply(this,l)}catch(h){const p=h;if(f&&n)throw p;return o(p)}f||(d&&d.then&&typeof d.then=="function"?d.then(u,o):d instanceof Error?o(d):u(d))}function o(l,...f){n||(n=!0,t(l,...f))}function u(l){o(null,l)}}const xr={basename:n6,dirname:r6,extname:i6,join:a6,sep:"/"};function n6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cl(e);let n=0,i=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else i<0&&(u=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else l<0&&(u=!0,l=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(i=o):(f=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function r6(e){if(Cl(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 i6(e){Cl(e);let t=e.length,n=-1,i=0,o=-1,u=0,l;for(;t--;){const f=e.codePointAt(t);if(f===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),f===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||n<0||u===0||u===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function a6(...e){let t=-1,n;for(;++t<e.length;)Cl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":o6(n)}function o6(e){Cl(e);const t=e.codePointAt(0)===47;let n=s6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function s6(e,t){let n="",i=0,o=-1,u=0,l=-1,f,d;for(;++l<=e.length;){if(l<e.length)f=e.codePointAt(l);else{if(f===47)break;f=47}if(f===47){if(!(o===l-1||u===1))if(o!==l-1&&u===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=l,u=0;continue}}else if(n.length>0){n="",i=0,o=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),i=l-o-1;o=l,u=0}else f===46&&u>-1?u++:u=-1}return n}function Cl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const l6={cwd:u6};function u6(){return"/"}function hp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function c6(e){if(typeof e=="string")e=new URL(e);else if(!hp(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 f6(e)}function f6(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const om=["history","path","basename","stem","extname","dirname"];class c_{constructor(t){let n;t?hp(t)?n={path:t}:typeof t=="string"||d6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":l6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<om.length;){const u=om[i];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)om.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?xr.basename(this.path):void 0}set basename(t){lm(t,"basename"),sm(t,"basename"),this.path=xr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xr.dirname(this.path):void 0}set dirname(t){fS(this.basename,"dirname"),this.path=xr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xr.extname(this.path):void 0}set extname(t){if(sm(t,"extname"),fS(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=xr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hp(t)&&(t=c6(t)),lm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xr.basename(this.path,this.extname):void 0}set stem(t){lm(t,"stem"),sm(t,"stem"),this.path=xr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new rn(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sm(e,t){if(e&&e.includes(xr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xr.sep+"`")}function lm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function d6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h6=(function(e){const i=this.constructor.prototype,o=i[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),m6={}.hasOwnProperty;class _g extends h6{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=e6()}copy(){const t=new _g;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(am(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fm("data",this.frozen),this.namespace[t]=n,this):m6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fm("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 o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ec(t),i=this.parser||this.Parser;return um("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),um("process",this.parser||this.Parser),cm("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,l){const f=ec(t),d=i.parse(f);i.run(d,f,function(p,y,x){if(p||!y||!x)return h(p);const b=y,_=i.stringify(b,x);y6(_)?x.value=_:x.result=_,h(p,x)});function h(p,y){p||!y?l(p):u?u(y):n(void 0,y)}}}processSync(t){let n=!1,i;return this.freeze(),um("processSync",this.parser||this.Parser),cm("processSync",this.compiler||this.Compiler),this.process(t,o),hS("processSync","process",n),i;function o(u,l){n=!0,uS(u),i=l}}run(t,n,i){dS(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?u(void 0,i):new Promise(u);function u(l,f){const d=ec(n);o.run(t,d,h);function h(p,y,x){const b=y||t;p?f(p):l?l(b):i(void 0,b,x)}}}runSync(t,n){let i=!1,o;return this.run(t,n,u),hS("runSync","run",i),o;function u(l,f){uS(l),o=f,i=!0}}stringify(t,n){this.freeze();const i=ec(n),o=this.compiler||this.Compiler;return cm("stringify",o),dS(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(fm("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...y]=h;d(p,y)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(o.settings=am(!0,o.settings,h.settings))}function f(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const y=h[p];u(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let y=-1,x=-1;for(;++y<i.length;)if(i[y][0]===h){x=y;break}if(x===-1)i.push([h,...p]);else if(p.length>0){let[b,..._]=p;const z=i[x][1];dp(z)&&dp(b)&&(b=am(!0,z,b)),i[x]=[h,b,..._]}}}}const p6=new _g().freeze();function um(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fm(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 dS(e){if(!dp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ec(e){return g6(e)?e:new c_(e)}function g6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y6(e){return typeof e=="string"||x6(e)}function x6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const v6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mS=[],pS={allowDangerousHtml:!0},b6=/^(https?|ircs?|mailto|xmpp)$/i,S6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function k6(e){const t=w6(e),n=z6(e);return _6(t.runSync(t.parse(n),n),e)}function w6(e){const t=e.rehypePlugins||mS,n=e.remarkPlugins||mS,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pS}:pS;return p6().use(n5).use(n).use(J5,i).use(t)}function z6(e){const t=e.children||"",n=new c_;return typeof t=="string"&&(n.value=t),n}function _6(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,u=t.disallowedElements,l=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||E6;for(const p of S6)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+v6+p.id,void 0);return u_(e,h),DD(e,{Fragment:v.Fragment,components:o,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(p,y,x){if(p.type==="raw"&&x&&typeof y=="number")return l?x.children.splice(y,1):x.children[y]={type:"text",value:p.value},y;if(p.type==="element"){let b;for(b in tm)if(Object.hasOwn(tm,b)&&Object.hasOwn(p.properties,b)){const _=p.properties[b],z=tm[b];(z===null||z.includes(p.tagName))&&(p.properties[b]=d(String(_||""),b,p))}}if(p.type==="element"){let b=n?!n.includes(p.tagName):u?u.includes(p.tagName):!1;if(!b&&i&&typeof y=="number"&&(b=!i(p,y,x)),b&&x&&typeof y=="number")return f&&p.children?x.children.splice(y,1,...p.children):x.children.splice(y,1),y}}}function E6(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||b6.test(e.slice(0,t))?e:""}const T6=({messages:e,onSendMessage:t,isLoading:n,activeSessionId:i})=>{const[o,u]=E.useState(""),l=E.useRef(null),f=()=>{l.current?.scrollIntoView({behavior:"smooth"})};E.useEffect(()=>{f()},[e,n]);const d=h=>{h.preventDefault(),!(!o.trim()||n)&&(t(o),u(""))};return i?v.jsxs("div",{className:"flex-1 flex flex-col h-full bg-gray-50 dark:bg-black relative overflow-hidden transition-colors duration-300",children:[v.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6 min-h-0",children:[e.map((h,p)=>v.jsxs("div",{className:`flex gap-4 ${h.type==="human"?"justify-end":"justify-start"}`,children:[h.type!=="human"&&v.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 ${h.type==="tool"?"bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400":"bg-azure-primary/10 text-azure-primary dark:bg-matrix-primary/20 dark:text-matrix-highlight"}`,children:h.type==="tool"?v.jsx(Rk,{size:16}):v.jsx(e0,{size:18})}),v.jsx("div",{className:`max-w-[80%] rounded-2xl p-4 shadow-sm ${h.type==="human"?"bg-azure-primary text-white dark:bg-matrix-primary dark:text-matrix-highlight dark:border dark:border-matrix-highlight/20 rounded-br-none":h.type==="tool"?"bg-gray-100 dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 text-gray-800 dark:text-gray-200 font-mono text-sm":"bg-white dark:bg-black border border-gray-100 dark:border-matrix-primary/30 text-gray-800 dark:text-matrix-secondary rounded-bl-none"}`,children:h.type==="tool"?v.jsxs("div",{className:"overflow-x-auto",children:[v.jsx("p",{className:"text-xs text-gray-500 mb-1 font-sans font-semibold",children:"Tool Output:"}),v.jsx("pre",{className:"whitespace-pre-wrap break-all",children:typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2)})]}):v.jsx("div",{className:"prose dark:prose-invert max-w-none text-sm leading-relaxed dark:prose-p:text-matrix-secondary dark:prose-headings:text-matrix-highlight dark:prose-strong:text-matrix-highlight dark:prose-code:text-matrix-highlight",children:v.jsx(k6,{children:h.content})})}),h.type==="human"&&v.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-200 dark:bg-matrix-primary/20 flex items-center justify-center flex-shrink-0 text-gray-500 dark:text-matrix-secondary",children:v.jsx(Mj,{size:18})})]},p)),n&&v.jsxs("div",{className:"flex gap-4 justify-start",children:[v.jsx("div",{className:"w-8 h-8 rounded-full bg-azure-primary/10 text-azure-primary dark:bg-matrix-primary/20 dark:text-matrix-highlight flex items-center justify-center flex-shrink-0",children:v.jsx(e0,{size:18})}),v.jsxs("div",{className:"bg-white dark:bg-black border border-gray-100 dark:border-matrix-primary/30 p-4 rounded-2xl rounded-bl-none shadow-sm flex items-center gap-2",children:[v.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"0ms"}}),v.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"150ms"}}),v.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]}),v.jsx("div",{ref:l})]}),v.jsx("div",{className:"p-4 bg-white dark:bg-black border-t border-gray-200 dark:border-matrix-primary/30 shrink-0",children:v.jsxs("form",{onSubmit:d,className:"max-w-4xl mx-auto relative flex items-center gap-2",children:[v.jsx("input",{type:"text",value:o,onChange:h=>u(h.target.value),placeholder:"Type your message...",className:"flex-1 bg-gray-100 dark:bg-black/50 border border-transparent dark:border-matrix-primary/30 rounded-xl px-4 py-3 focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight outline-none transition-all dark:text-matrix-highlight dark:placeholder-matrix-secondary/50",disabled:n}),v.jsx("button",{type:"submit",disabled:!o.trim()||n,className:"p-3 bg-azure-primary text-white dark:bg-matrix-secondary dark:text-black dark:hover:bg-matrix-highlight rounded-xl hover:bg-azure-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors shadow-md",children:v.jsx(zj,{size:20})})]})})]}):v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-gray-50 dark:bg-black text-gray-400 dark:text-matrix-secondary/50 h-full",children:[v.jsx(C6,{size:48,className:"mb-4 opacity-20"}),v.jsx("p",{children:"Select a session to start chatting or create a new one."})]})},C6=({size:e,className:t})=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:v.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),ia={getSessions:async()=>Dt.get("/sessions"),createSession:async()=>Dt.post("/sessions",{}),deleteSession:async e=>Dt.delete(`/sessions/${e}`),renameSession:async(e,t)=>Dt.patch(`/sessions/${e}/title`,{title:t}),archiveSession:async e=>Dt.post(`/sessions/${e}/archive`,{}),getMessages:async e=>Dt.get(`/sessions/${e}/messages`),sendMessage:async(e,t)=>Dt.post("/chat",{sessionId:e,message:t})};function A6({isOpen:e,onClose:t,onConfirm:n,title:i,description:o,confirmJson:u="Confirm",variant:l="default"}){return v.jsx(qc,{open:e,onOpenChange:t,children:v.jsxs(Gc,{className:"sm:max-w-md bg-azure-surface dark:bg-black border-azure-border dark:border-matrix-primary/30",children:[v.jsx(Yc,{children:v.jsx(Xc,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:i})}),v.jsx("div",{className:"py-4",children:v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary",children:o})}),v.jsxs(eD,{className:"flex flex-col sm:flex-row gap-3 sm:justify-end",children:[v.jsx(Wn,{variant:"outline",onClick:t,className:"dark:border-matrix-primary/30 dark:text-matrix-secondary dark:hover:bg-matrix-primary/20",children:"Cancel"}),v.jsx(Wn,{variant:l,onClick:()=>{n(),t()},className:l==="destructive"?"dark:bg-red-900/50 dark:text-red-200 dark:hover:bg-red-800/60":"dark:bg-matrix-primary dark:text-black dark:hover:bg-matrix-highlight",children:u})]})]})})}const j6=()=>{const[e,t]=E.useState([]),[n,i]=E.useState(null),[o,u]=E.useState([]),[l,f]=E.useState(!1),[d,h]=E.useState(!0),[p,y]=E.useState({isOpen:!1,title:"",description:"",onConfirm:()=>{}}),x=async()=>{try{const A=await ia.getSessions();t(A)}catch(A){console.error("Failed to load sessions:",A)}};E.useEffect(()=>{x()},[]),E.useEffect(()=>{n?b(n):u([])},[n]);const b=async A=>{try{const R=await ia.getMessages(A);u(R.filter(L=>L.type!=="system"&&L.type!=="tool"))}catch(R){console.error("Failed to load messages:",R)}},_=async()=>{try{const A=await ia.createSession();await x(),i(A.id)}catch(A){console.error("Failed to create session:",A)}},z=async A=>{if(!n)return;const R={type:"human",content:A};u(L=>[...L,R]),f(!0);try{await ia.sendMessage(n,A),await b(n),await x()}catch(L){console.error("Failed to send message:",L)}finally{f(!1)}},C=A=>{y({isOpen:!0,title:"Archive Session",description:"Are you sure you want to archive this session? It will be moved to the archives.",confirmJson:"Archive",onConfirm:async()=>{try{await ia.archiveSession(A),n===A&&i(null),await x()}catch(R){console.error("Failed to archive session:",R)}}})},j=A=>{y({isOpen:!0,title:"Delete Session",description:"Are you sure you want to DELETE this session? This action cannot be undone.",confirmJson:"Delete",variant:"destructive",onConfirm:async()=>{try{await ia.deleteSession(A),n===A&&i(null),await x()}catch(R){console.error("Failed to delete session:",R)}}})},O=async(A,R)=>{try{await ia.renameSession(A,R),await x()}catch(L){console.error("Failed to rename session:",L)}};return v.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-gray-50 dark:bg-zinc-950",children:[v.jsx(oD,{sessions:e,activeSessionId:n,onSelectSession:i,onCreateSession:_,onArchiveSession:C,onDeleteSession:j,onRenameSession:O,isOpen:d,toggleSidebar:()=>h(!d)}),v.jsx("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:v.jsx(T6,{messages:o,onSendMessage:z,isLoading:l,activeSessionId:n})}),v.jsx(A6,{isOpen:p.isOpen,onClose:()=>y(A=>({...A,isOpen:!1})),onConfirm:p.onConfirm,title:p.title,description:p.description,confirmJson:p.confirmJson,variant:p.variant})]})};function aa({title:e,description:t,children:n}){return v.jsxs("div",{className:"border border-azure-border dark:border-matrix-primary rounded-lg p-6 bg-azure-surface/50 dark:bg-matrix-base/50",children:[v.jsxs("div",{className:"mb-4",children:[v.jsx("h3",{className:"text-lg font-medium text-azure-text-primary dark:text-matrix-highlight",children:e}),t&&v.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mt-1",children:t})]}),v.jsx("div",{className:"space-y-4",children:n})]})}const N6=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},O6=(e,t)=>({classGroupId:e,validator:t}),f_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),jc="-",gS=[],R6="arbitrary..",M6=e=>{const t=$6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return D6(l);const f=l.split(jc),d=f[0]===""&&f.length>1?1:0;return d_(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=i[l],h=n[l];return d?h?N6(h,d):d:h||gS}return n[l]||gS}}},d_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],u=n.nextPart.get(o);if(u){const h=d_(e,t+1,u);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(jc):e.slice(t).join(jc),d=l.length;for(let h=0;h<d;h++){const p=l[h];if(p.validator(f))return p.classGroupId}},D6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?R6+i:void 0})(),$6=e=>{const{theme:t,classGroups:n}=e;return L6(n,t)},L6=(e,t)=>{const n=f_();for(const i in e){const o=e[i];Eg(o,n,i,t)}return n},Eg=(e,t,n,i)=>{const o=e.length;for(let u=0;u<o;u++){const l=e[u];U6(l,t,n,i)}},U6=(e,t,n,i)=>{if(typeof e=="string"){P6(e,t,n);return}if(typeof e=="function"){V6(e,t,n,i);return}Z6(e,t,n,i)},P6=(e,t,n)=>{const i=e===""?t:h_(t,e);i.classGroupId=n},V6=(e,t,n,i)=>{if(B6(e)){Eg(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(O6(n,e))},Z6=(e,t,n,i)=>{const o=Object.entries(e),u=o.length;for(let l=0;l<u;l++){const[f,d]=o[l];Eg(d,h_(t,f),n,i)}},h_=(e,t)=>{let n=e;const i=t.split(jc),o=i.length;for(let u=0;u<o;u++){const l=i[u];let f=n.nextPart.get(l);f||(f=f_(),n.nextPart.set(l,f)),n=f}return n},B6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,I6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(u,l)=>{n[u]=l,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(u){let l=n[u];if(l!==void 0)return l;if((l=i[u])!==void 0)return o(u,l),l},set(u,l){u in n?n[u]=l:o(u,l)}}},mp="!",yS=":",H6=[],xS=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),F6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const u=[];let l=0,f=0,d=0,h;const p=o.length;for(let z=0;z<p;z++){const C=o[z];if(l===0&&f===0){if(C===yS){u.push(o.slice(d,z)),d=z+1;continue}if(C==="/"){h=z;continue}}C==="["?l++:C==="]"?l--:C==="("?f++:C===")"&&f--}const y=u.length===0?o:o.slice(d);let x=y,b=!1;y.endsWith(mp)?(x=y.slice(0,-1),b=!0):y.startsWith(mp)&&(x=y.slice(1),b=!0);const _=h&&h>d?h-d:void 0;return xS(u,b,x,_)};if(t){const o=t+yS,u=i;i=l=>l.startsWith(o)?u(l.slice(o.length)):xS(H6,!1,l,void 0,!0)}if(n){const o=i;i=u=>n({className:u,parseClassName:o})}return i},q6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let u=0;u<n.length;u++){const l=n[u],f=l[0]==="[",d=t.has(l);f||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(l)):o.push(l)}return o.length>0&&(o.sort(),i.push(...o)),i}},G6=e=>({cache:I6(e.cacheSize),parseClassName:F6(e),sortModifiers:q6(e),...M6(e)}),Y6=/\s+/,X6=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:u}=t,l=[],f=e.trim().split(Y6);let d="";for(let h=f.length-1;h>=0;h-=1){const p=f[h],{isExternal:y,modifiers:x,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:z}=n(p);if(y){d=p+(d.length>0?" "+d:d);continue}let C=!!z,j=i(C?_.substring(0,z):_);if(!j){if(!C){d=p+(d.length>0?" "+d:d);continue}if(j=i(_),!j){d=p+(d.length>0?" "+d:d);continue}C=!1}const O=x.length===0?"":x.length===1?x[0]:u(x).join(":"),A=b?O+mp:O,R=A+j;if(l.indexOf(R)>-1)continue;l.push(R);const L=o(j,C);for(let $=0;$<L.length;++$){const G=L[$];l.push(A+G)}d=p+(d.length>0?" "+d:d)}return d},K6=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=m_(n))&&(o&&(o+=" "),o+=i);return o},m_=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=m_(e[i]))&&(n&&(n+=" "),n+=t);return n},J6=(e,...t)=>{let n,i,o,u;const l=d=>{const h=t.reduce((p,y)=>y(p),e());return n=G6(h),i=n.cache.get,o=n.cache.set,u=f,f(d)},f=d=>{const h=i(d);if(h)return h;const p=X6(d,n);return o(d,p),p};return u=l,(...d)=>u(K6(...d))},Q6=[],Bt=e=>{const t=n=>n[e]||Q6;return t.isThemeGetter=!0,t},p_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,g_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W6=/^\d+\/\d+$/,eL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tL=/\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$/,nL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,co=e=>W6.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),zi=e=>!!e&&Number.isInteger(Number(e)),dm=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Fr=e=>eL.test(e),aL=()=>!0,oL=e=>tL.test(e)&&!nL.test(e),y_=()=>!1,sL=e=>rL.test(e),lL=e=>iL.test(e),uL=e=>!de(e)&&!he(e),cL=e=>Io(e,b_,y_),de=e=>p_.test(e),oa=e=>Io(e,S_,oL),hm=e=>Io(e,pL,Ne),vS=e=>Io(e,x_,y_),fL=e=>Io(e,v_,lL),tc=e=>Io(e,k_,sL),he=e=>g_.test(e),Gs=e=>Ho(e,S_),dL=e=>Ho(e,gL),bS=e=>Ho(e,x_),hL=e=>Ho(e,b_),mL=e=>Ho(e,v_),nc=e=>Ho(e,k_,!0),Io=(e,t,n)=>{const i=p_.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Ho=(e,t,n=!1)=>{const i=g_.exec(e);return i?i[1]?t(i[1]):n:!1},x_=e=>e==="position"||e==="percentage",v_=e=>e==="image"||e==="url",b_=e=>e==="length"||e==="size"||e==="bg-size",S_=e=>e==="length",pL=e=>e==="number",gL=e=>e==="family-name",k_=e=>e==="shadow",yL=()=>{const e=Bt("color"),t=Bt("font"),n=Bt("text"),i=Bt("font-weight"),o=Bt("tracking"),u=Bt("leading"),l=Bt("breakpoint"),f=Bt("container"),d=Bt("spacing"),h=Bt("radius"),p=Bt("shadow"),y=Bt("inset-shadow"),x=Bt("text-shadow"),b=Bt("drop-shadow"),_=Bt("blur"),z=Bt("perspective"),C=Bt("aspect"),j=Bt("ease"),O=Bt("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),he,de],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],V=()=>[he,de,d],K=()=>[co,"full","auto",...V()],ue=()=>[zi,"none","subgrid",he,de],re=()=>["auto",{span:["full",zi,he,de]},zi,he,de],oe=()=>[zi,"auto",he,de],ke=()=>["auto","min","max","fr",he,de],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...V()],Y=()=>[co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],Z=()=>[e,he,de],ce=()=>[...R(),bS,vS,{position:[he,de]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",hL,cL,{size:[he,de]}],q=()=>[dm,Gs,oa],w=()=>["","none","full",h,he,de],ie=()=>["",Ne,Gs,oa],ve=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Ne,dm,bS,vS],Ge=()=>["","none",_,he,de],De=()=>["none",Ne,he,de],Ct=()=>["none",Ne,he,de],an=()=>[Ne,he,de],Ln=()=>[co,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[aL],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[uL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fr],shadow:[Fr],spacing:["px",Ne],text:[Fr],"text-shadow":[Fr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",co,de,he,C]}],container:["container"],columns:[{columns:[Ne,de,he,f]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:L()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[zi,"auto",he,de]}],basis:[{basis:[co,"full","auto",f,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,co,"auto","initial","none",de]}],grow:[{grow:["",Ne,he,de]}],shrink:[{shrink:["",Ne,he,de]}],order:[{order:[zi,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[f,"screen",...Y()]}],"min-w":[{"min-w":[f,"screen","none",...Y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,Gs,oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,he,hm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dm,de]}],"font-family":[{font:[dL,de,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:[o,he,de]}],"line-clamp":[{"line-clamp":[Ne,"none",he,hm]}],leading:[{leading:[u,...V()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",he,oa]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Ne,"auto",he,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,de]}],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",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},zi,he,de],radial:["",he,de],conic:[zi,he,de]},mL,fL]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:w()}],"rounded-s":[{"rounded-s":w()}],"rounded-e":[{"rounded-e":w()}],"rounded-t":[{"rounded-t":w()}],"rounded-r":[{"rounded-r":w()}],"rounded-b":[{"rounded-b":w()}],"rounded-l":[{"rounded-l":w()}],"rounded-ss":[{"rounded-ss":w()}],"rounded-se":[{"rounded-se":w()}],"rounded-ee":[{"rounded-ee":w()}],"rounded-es":[{"rounded-es":w()}],"rounded-tl":[{"rounded-tl":w()}],"rounded-tr":[{"rounded-tr":w()}],"rounded-br":[{"rounded-br":w()}],"rounded-bl":[{"rounded-bl":w()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,he,de]}],"outline-w":[{outline:["",Ne,Gs,oa]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",p,nc,tc]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",y,nc,tc]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Ne,oa]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",x,nc,tc]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Ne,he,de]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:Ge()}],brightness:[{brightness:[Ne,he,de]}],contrast:[{contrast:[Ne,he,de]}],"drop-shadow":[{"drop-shadow":["","none",b,nc,tc]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Ne,he,de]}],"hue-rotate":[{"hue-rotate":[Ne,he,de]}],invert:[{invert:["",Ne,he,de]}],saturate:[{saturate:[Ne,he,de]}],sepia:[{sepia:["",Ne,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":Ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,he,de]}],"backdrop-invert":[{"backdrop-invert":["",Ne,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,he,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",he,de]}],ease:[{ease:["linear","initial",j,he,de]}],delay:[{delay:[Ne,he,de]}],animate:[{animate:["none",O,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[z,he,de]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:an()}],"skew-x":[{"skew-x":an()}],"skew-y":[{"skew-y":an()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ln()}],"translate-x":[{"translate-x":Ln()}],"translate-y":[{"translate-y":Ln()}],"translate-z":[{"translate-z":Ln()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"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",he,de]}],"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":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",he,de]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Ne,Gs,oa,hm]}],stroke:[{stroke:["none",...Z()]}],"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"]}},Co=J6(yL);function Sn({label:e,error:t,helperText:n,className:i,...o}){return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),v.jsx("input",{className:Co("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight placeholder-azure-text-secondary/50 dark:placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors",t&&"border-red-500 focus:border-red-500 focus:ring-red-500",i),...o}),n&&!t&&v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&v.jsx("p",{className:"text-xs text-red-500",children:t})]})}function rc({label:e,options:t,error:n,helperText:i,className:o,...u}){return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),v.jsx("select",{className:Co("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors appearance-none",n&&"border-red-500 focus:border-red-500 focus:ring-red-500",o),...u,children:t.map(l=>v.jsx("option",{value:l.value,className:"bg-azure-bg dark:bg-matrix-base",children:l.label},l.value))}),i&&!n&&v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i}),n&&v.jsx("p",{className:"text-xs text-red-500",children:n})]})}function fo({label:e,error:t,helperText:n,className:i,...o}){return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),v.jsx("input",{type:"number",className:Co("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight placeholder-azure-text-secondary/50 dark:placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors",t&&"border-red-500 focus:border-red-500 focus:ring-red-500",i),...o}),n&&!t&&v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&v.jsx("p",{className:"text-xs text-red-500",children:t})]})}function Ys({label:e,checked:t,onChange:n,helperText:i,disabled:o}){return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("span",{className:Co("text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",o&&"opacity-50"),children:e}),i&&v.jsx("span",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i})]}),v.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>!o&&n(!t),className:Co("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:ring-offset-2 focus:ring-offset-azure-bg dark:focus:ring-offset-black",t?"bg-azure-primary dark:bg-matrix-highlight":"bg-slate-300 dark:bg-matrix-primary",o&&"opacity-50 cursor-not-allowed"),children:v.jsx("span",{className:Co("inline-block h-4 w-4 transform rounded-full bg-white dark:bg-black transition-transform",t?"translate-x-6":"translate-x-1")})})]})}const ic={fetchConfig:async()=>Dt.get("/config"),updateConfig:async e=>Dt.post("/config",e),getSatiConfig:async()=>Dt.get("/config/sati"),updateSatiConfig:async e=>Dt.post("/config/sati",e),deleteSatiConfig:async()=>Dt.delete("/config/sati")};function Q(e,t,n){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,p=Object.keys(h);for(let y=0;y<p.length;y++){const x=p[y];x in f||(f[x]=h[x].bind(f))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(f){var d;const h=n?.Parent?new u:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const p of h._zod.deferred)p();return h}return Object.defineProperty(l,"init",{value:i}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}let Ao=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},w_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};const z_={};function ji(e){return z_}function __(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function pp(e,t){return typeof t=="bigint"?t.toString():t}function Wc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Tg(e){return e==null}function Cg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function xL(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let o=(i.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(o=Number.parseInt(d[1]))}const u=n>o?n:o,l=Number.parseInt(e.toFixed(u).replace(".","")),f=Number.parseInt(t.toFixed(u).replace(".",""));return l%f/10**u}const SS=Symbol("evaluating");function qe(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==SS)return i===void 0&&(i=SS,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Sa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mi(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function kS(e){return JSON.stringify(e)}function vL(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const E_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function pl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const bL=Wc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Oo(e){if(pl(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(pl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function T_(e){return Oo(e)?{...e}:Array.isArray(e)?[...e]:e}const SL=new Set(["string","number","symbol"]);function Ro(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Di(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function kL(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const wL={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function zL(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Mi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return Sa(this,"shape",l),l},checks:[]});return Di(e,u)}function _L(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Mi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return Sa(this,"shape",l),l},checks:[]});return Di(e,u)}function EL(e,t){if(!Oo(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const u=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(u,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Mi(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return Sa(this,"shape",u),u}});return Di(e,o)}function TL(e,t){if(!Oo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Mi(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Sa(this,"shape",i),i}});return Di(e,n)}function CL(e,t){const n=Mi(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Sa(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Di(e,n)}function AL(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Mi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return Sa(this,"shape",d),d},checks:[]});return Di(t,l)}function jL(e,t,n){const i=Mi(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(n)for(const l in n){if(!(l in u))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)u[l]=new e({type:"nonoptional",innerType:o[l]});return Sa(this,"shape",u),u}});return Di(t,i)}function bo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function So(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function ac(e){return typeof e=="string"?e:e?.message}function Ni(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=ac(e.inst?._zod.def?.error?.(e))??ac(t?.error?.(e))??ac(n.customError?.(e))??ac(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Ag(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const C_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,pp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},A_=Q("$ZodError",C_),j_=Q("$ZodError",C_,{Parent:Error});function NL(e,t=n=>n.message){const n={},i=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}function OL(e,t=n=>n.message){const n={_errors:[]},i=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,f=0;for(;f<u.path.length;){const d=u.path[f];f===u.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(u))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return i(e),n}const jg=e=>(t,n,i,o)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new Ao;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>Ni(d,u,ji())));throw E_(f,o?.callee),f}return l.value},Ng=e=>async(t,n,i,o)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>Ni(d,u,ji())));throw E_(f,o?.callee),f}return l.value},ef=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new Ao;return u.issues.length?{success:!1,error:new(e??A_)(u.issues.map(l=>Ni(l,o,ji())))}:{success:!0,data:u.value}},RL=ef(j_),tf=e=>async(t,n,i)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(l=>Ni(l,o,ji())))}:{success:!0,data:u.value}},ML=tf(j_),DL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return jg(e)(t,n,o)},$L=e=>(t,n,i)=>jg(e)(t,n,i),LL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ng(e)(t,n,o)},UL=e=>async(t,n,i)=>Ng(e)(t,n,i),PL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ef(e)(t,n,o)},VL=e=>(t,n,i)=>ef(e)(t,n,i),ZL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return tf(e)(t,n,o)},BL=e=>async(t,n,i)=>tf(e)(t,n,i),IL=/^[cC][^\s-]{8,}$/,HL=/^[0-9a-z]+$/,FL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qL=/^[0-9a-vA-V]{20}$/,GL=/^[A-Za-z0-9]{27}$/,YL=/^[a-zA-Z0-9_-]{21}$/,XL=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,KL=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,JL=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,QL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function WL(){return new RegExp(QL,"u")}const e9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,t9=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,n9=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,r9=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,i9=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,N_=/^[A-Za-z0-9_-]*$/,a9=/^\+[1-9]\d{6,14}$/,O_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",o9=new RegExp(`^${O_}$`);function R_(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function s9(e){return new RegExp(`^${R_(e)}$`)}function l9(e){const t=R_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${O_}T(?:${i})$`)}const u9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},c9=/^-?\d+$/,M_=/^-?\d+(?:\.\d+)?$/,f9=/^(?:true|false)$/i,d9=/^[^A-Z]*$/,h9=/^[^a-z]*$/,_n=Q("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),D_={number:"number",bigint:"bigint",object:"date"},$_=Q("$ZodCheckLessThan",(e,t)=>{_n.init(e,t);const n=D_[typeof t.value];e._zod.onattach.push(i=>{const o=i._zod.bag,u=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<u&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),L_=Q("$ZodCheckGreaterThan",(e,t)=>{_n.init(e,t);const n=D_[typeof t.value];e._zod.onattach.push(i=>{const o=i._zod.bag,u=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),m9=Q("$ZodCheckMultipleOf",(e,t)=>{_n.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):xL(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),p9=Q("$ZodCheckNumberFormat",(e,t)=>{_n.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,u]=wL[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=o,f.maximum=u,n&&(f.pattern=c9)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}f<o&&l.issues.push({origin:"number",input:f,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),f>u&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}}),g9=Q("$ZodCheckMaxLength",(e,t)=>{var n;_n.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Tg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const o=i.value;if(o.length<=t.maximum)return;const l=Ag(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),y9=Q("$ZodCheckMinLength",(e,t)=>{var n;_n.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Tg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const l=Ag(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),x9=Q("$ZodCheckLengthEquals",(e,t)=>{var n;_n.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Tg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,u=o.length;if(u===t.length)return;const l=Ag(o),f=u>t.length;i.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),nf=Q("$ZodCheckStringFormat",(e,t)=>{var n,i;_n.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),v9=Q("$ZodCheckRegex",(e,t)=>{nf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),b9=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=d9),nf.init(e,t)}),S9=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=h9),nf.init(e,t)}),k9=Q("$ZodCheckIncludes",(e,t)=>{_n.init(e,t);const n=Ro(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),w9=Q("$ZodCheckStartsWith",(e,t)=>{_n.init(e,t);const n=new RegExp(`^${Ro(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),z9=Q("$ZodCheckEndsWith",(e,t)=>{_n.init(e,t);const n=new RegExp(`.*${Ro(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),_9=Q("$ZodCheckOverwrite",(e,t)=>{_n.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});let E9=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
33
|
-
`).filter(l=>l),o=Math.min(...i.map(l=>l.length-l.trimStart().length)),u=i.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of u)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...n,o.join(`
|
|
34
|
-
`))}};const T9={major:4,minor:3,patch:6},xt=Q("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=T9;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,f,d)=>{let h=bo(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const x=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new Ao;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==x&&(h||(h=bo(l,x)))});else{if(l.issues.length===x)continue;h||(h=bo(l,x))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(bo(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new Ao;return h.then(p=>e._zod.parse(p,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(p=>u(p,l,f)):u(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new Ao;return d.then(h=>o(h,i,f))}return o(d,i,f)}}qe(e,"~standard",()=>({validate:o=>{try{const u=RL(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return ML(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Og=Q("$ZodString",(e,t)=>{xt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??u9(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),pt=Q("$ZodStringFormat",(e,t)=>{nf.init(e,t),Og.init(e,t)}),C9=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=KL),pt.init(e,t)}),A9=Q("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wS(i))}else t.pattern??(t.pattern=wS());pt.init(e,t)}),j9=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=JL),pt.init(e,t)}),N9=Q("$ZodURL",(e,t)=>{pt.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),O9=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=WL()),pt.init(e,t)}),R9=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=YL),pt.init(e,t)}),M9=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=IL),pt.init(e,t)}),D9=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=HL),pt.init(e,t)}),$9=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=FL),pt.init(e,t)}),L9=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qL),pt.init(e,t)}),U9=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=GL),pt.init(e,t)}),P9=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=l9(t)),pt.init(e,t)}),V9=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=o9),pt.init(e,t)}),Z9=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=s9(t)),pt.init(e,t)}),B9=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=XL),pt.init(e,t)}),I9=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=e9),pt.init(e,t),e._zod.bag.format="ipv4"}),H9=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=t9),pt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),F9=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=n9),pt.init(e,t)}),q9=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=r9),pt.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[o,u]=i;if(!u)throw new Error;const l=Number(u);if(`${l}`!==u)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function U_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const G9=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=i9),pt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{U_(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Y9(e){if(!N_.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return U_(n)}const X9=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=N_),pt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Y9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),K9=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=a9),pt.init(e,t)});function J9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Q9=Q("$ZodJWT",(e,t)=>{pt.init(e,t),e._zod.check=n=>{J9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),P_=Q("$ZodNumber",(e,t)=>{xt.init(e,t),e._zod.pattern=e._zod.bag.pattern??M_,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...u?{received:u}:{}}),n}}),W9=Q("$ZodNumberFormat",(e,t)=>{p9.init(e,t),P_.init(e,t)}),eU=Q("$ZodBoolean",(e,t)=>{xt.init(e,t),e._zod.pattern=f9,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),tU=Q("$ZodUnknown",(e,t)=>{xt.init(e,t),e._zod.parse=n=>n}),nU=Q("$ZodNever",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function zS(e,t,n){e.issues.length&&t.issues.push(...So(n,e.issues)),t.value[n]=e.value}const rU=Q("$ZodArray",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const u=[];for(let l=0;l<o.length;l++){const f=o[l],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?u.push(d.then(h=>zS(h,n,l))):zS(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Nc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...So(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function V_(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=kL(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Z_(e,t,n,i,o,u){const l=[],f=o.keySet,d=o.catchall._zod,h=d.def.type,p=d.optout==="optional";for(const y in t){if(f.has(y))continue;if(h==="never"){l.push(y);continue}const x=d.run({value:t[y],issues:[]},i);x instanceof Promise?e.push(x.then(b=>Nc(b,n,y,t,p))):Nc(x,n,y,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const iU=Q("$ZodObject",(e,t)=>{if(xt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Wc(()=>V_(t));qe(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const p=f[h]._zod;if(p.values){d[h]??(d[h]=new Set);for(const y of p.values)d[h].add(y)}}return d});const o=pl,u=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=i.value);const h=f.value;if(!o(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const p=[],y=l.shape;for(const x of l.keys){const b=y[x],_=b._zod.optout==="optional",z=b._zod.run({value:h[x],issues:[]},d);z instanceof Promise?p.push(z.then(C=>Nc(C,f,x,h,_))):Nc(z,f,x,h,_)}return u?Z_(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),aU=Q("$ZodObjectJIT",(e,t)=>{iU.init(e,t);const n=e._zod.parse,i=Wc(()=>V_(t)),o=x=>{const b=new E9(["shape","payload","ctx"]),_=i.value,z=A=>{const R=kS(A);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};b.write("const input = payload.value;");const C=Object.create(null);let j=0;for(const A of _.keys)C[A]=`key_${j++}`;b.write("const newResult = {};");for(const A of _.keys){const R=C[A],L=kS(A),G=x[A]?._zod?.optout==="optional";b.write(`const ${R} = ${z(A)};`),G?b.write(`
|
|
35
|
-
if (${R}.issues.length) {
|
|
36
|
-
if (${L} in input) {
|
|
37
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
38
|
-
...iss,
|
|
39
|
-
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
40
|
-
})));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (${R}.value === undefined) {
|
|
45
|
-
if (${L} in input) {
|
|
46
|
-
newResult[${L}] = undefined;
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
newResult[${L}] = ${R}.value;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
`):b.write(`
|
|
53
|
-
if (${R}.issues.length) {
|
|
54
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
55
|
-
...iss,
|
|
56
|
-
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
57
|
-
})));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (${R}.value === undefined) {
|
|
61
|
-
if (${L} in input) {
|
|
62
|
-
newResult[${L}] = undefined;
|
|
63
|
-
}
|
|
64
|
-
} else {
|
|
65
|
-
newResult[${L}] = ${R}.value;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
`)}b.write("payload.value = newResult;"),b.write("return payload;");const O=b.compile();return(A,R)=>O(x,A,R)};let u;const l=pl,f=!z_.jitless,h=f&&bL.value,p=t.catchall;let y;e._zod.parse=(x,b)=>{y??(y=i.value);const _=x.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),x=u(x,b),p?Z_([],_,x,b,y,e):x):n(x,b):(x.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),x)}});function _S(e,t,n,i){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!bo(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(u=>u.issues.map(l=>Ni(l,i,ji())))}),t)}const B_=Q("$ZodUnion",(e,t)=>{xt.init(e,t),qe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),qe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),qe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),qe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Cg(u.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return i(o,u);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>_S(d,o,e,u)):_S(f,o,e,u)}}),oU=Q("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,B_.init(e,t);const n=e._zod.parse;qe(e._zod,"propValues",()=>{const o={};for(const u of t.options){const l=u._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const[f,d]of Object.entries(l)){o[f]||(o[f]=new Set);for(const h of d)o[f].add(h)}}return o});const i=Wc(()=>{const o=t.options,u=new Map;for(const l of o){const f=l._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of f){if(u.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);u.set(d,l)}}return u});e._zod.parse=(o,u)=>{const l=o.value;if(!pl(l))return o.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),o;const f=i.value.get(l?.[t.discriminator]);return f?f._zod.run(o,u):t.unionFallback?n(o,u):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),o)}}),sU=Q("$ZodIntersection",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},i),l=t.right._zod.run({value:o,issues:[]},i);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([d,h])=>ES(n,d,h)):ES(n,u,l)}});function gp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Oo(e)&&Oo(t)){const n=Object.keys(t),i=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of i){const l=gp(e[u],t[u]);if(!l.valid)return{valid:!1,mergeErrorPath:[u,...l.mergeErrorPath]};o[u]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const o=e[i],u=t[i],l=gp(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ES(e,t,n){const i=new Map;let o;for(const f of t.issues)if(f.code==="unrecognized_keys"){o??(o=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of n.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const u=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length&&o&&e.issues.push({...o,keys:u}),bo(e))return e;const l=gp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const lU=Q("$ZodRecord",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Oo(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const u=[],l=t.keyType._zod.values;if(l){n.value={};const f=new Set;for(const h of l)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const p=t.valueType._zod.run({value:o[h],issues:[]},i);p instanceof Promise?u.push(p.then(y=>{y.issues.length&&n.issues.push(...So(h,y.issues)),n.value[h]=y.value})):(p.issues.length&&n.issues.push(...So(h,p.issues)),n.value[h]=p.value)}let d;for(const h in o)f.has(h)||(d=d??[],d.push(h));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d})}else{n.value={};for(const f of Reflect.ownKeys(o)){if(f==="__proto__")continue;let d=t.keyType._zod.run({value:f,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&M_.test(f)&&d.issues.length){const y=t.keyType._zod.run({value:Number(f),issues:[]},i);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(d=y)}if(d.issues.length){t.mode==="loose"?n.value[f]=o[f]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(y=>Ni(y,i,ji())),input:f,path:[f],inst:e});continue}const p=t.valueType._zod.run({value:o[f],issues:[]},i);p instanceof Promise?u.push(p.then(y=>{y.issues.length&&n.issues.push(...So(f,y.issues)),n.value[d.value]=y.value})):(p.issues.length&&n.issues.push(...So(f,p.issues)),n.value[d.value]=p.value)}}return u.length?Promise.all(u).then(()=>n):n}}),uU=Q("$ZodEnum",(e,t)=>{xt.init(e,t);const n=__(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>SL.has(typeof o)).map(o=>typeof o=="string"?Ro(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return i.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),cU=Q("$ZodLiteral",(e,t)=>{if(xt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Ro(i):i?Ro(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,o)=>{const u=i.value;return n.has(u)||i.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),i}}),fU=Q("$ZodTransform",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new w_(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Ao;return n.value=o,n}});function TS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const I_=Q("$ZodOptional",(e,t)=>{xt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Cg(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>TS(u,n.value)):TS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),dU=Q("$ZodExactOptional",(e,t)=>{I_.init(e,t),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),hU=Q("$ZodNullable",(e,t)=>{xt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Cg(n.source)}|null)$`):void 0}),qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),mU=Q("$ZodDefault",(e,t)=>{xt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>CS(u,t)):CS(o,t)}});function CS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const pU=Q("$ZodPrefault",(e,t)=>{xt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),gU=Q("$ZodNonOptional",(e,t)=>{xt.init(e,t),qe(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>AS(u,e)):AS(o,e)}});function AS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const yU=Q("$ZodCatch",(e,t)=>{xt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>(n.value=u.value,u.issues.length&&(n.value=t.catchValue({...n,error:{issues:u.issues.map(l=>Ni(l,i,ji()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Ni(u,i,ji()))},input:n.value}),n.issues=[]),n)}}),xU=Q("$ZodPipe",(e,t)=>{xt.init(e,t),qe(e._zod,"values",()=>t.in._zod.values),qe(e._zod,"optin",()=>t.in._zod.optin),qe(e._zod,"optout",()=>t.out._zod.optout),qe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const u=t.out._zod.run(n,i);return u instanceof Promise?u.then(l=>oc(l,t.in,i)):oc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>oc(u,t.out,i)):oc(o,t.out,i)}});function oc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const vU=Q("$ZodReadonly",(e,t)=>{xt.init(e,t),qe(e._zod,"propValues",()=>t.innerType._zod.propValues),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"optin",()=>t.innerType?._zod?.optin),qe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(jS):jS(o)}});function jS(e){return e.value=Object.freeze(e.value),e}const bU=Q("$ZodCustom",(e,t)=>{_n.init(e,t),xt.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(u=>NS(u,n,i,e));NS(o,n,i,e)}});function NS(e,t,n,i){if(!e){const o={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(gl(o))}}var OS;let SU=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function kU(){return new SU}(OS=globalThis).__zod_globalRegistry??(OS.__zod_globalRegistry=kU());const Js=globalThis.__zod_globalRegistry;function wU(e,t){return new e({type:"string",...be(t)})}function zU(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function RS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function _U(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function EU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function TU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function CU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function AU(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function jU(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function NU(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function OU(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function RU(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function MU(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function DU(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function $U(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function LU(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function UU(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function PU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function VU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function ZU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function BU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function IU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function HU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function FU(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function qU(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function GU(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function YU(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function XU(e,t){return new e({type:"number",checks:[],...be(t)})}function KU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function JU(e,t){return new e({type:"boolean",...be(t)})}function QU(e){return new e({type:"unknown"})}function WU(e,t){return new e({type:"never",...be(t)})}function MS(e,t){return new $_({check:"less_than",...be(t),value:e,inclusive:!1})}function mm(e,t){return new $_({check:"less_than",...be(t),value:e,inclusive:!0})}function DS(e,t){return new L_({check:"greater_than",...be(t),value:e,inclusive:!1})}function pm(e,t){return new L_({check:"greater_than",...be(t),value:e,inclusive:!0})}function $S(e,t){return new m9({check:"multiple_of",...be(t),value:e})}function H_(e,t){return new g9({check:"max_length",...be(t),maximum:e})}function Oc(e,t){return new y9({check:"min_length",...be(t),minimum:e})}function F_(e,t){return new x9({check:"length_equals",...be(t),length:e})}function eP(e,t){return new v9({check:"string_format",format:"regex",...be(t),pattern:e})}function tP(e){return new b9({check:"string_format",format:"lowercase",...be(e)})}function nP(e){return new S9({check:"string_format",format:"uppercase",...be(e)})}function rP(e,t){return new k9({check:"string_format",format:"includes",...be(t),includes:e})}function iP(e,t){return new w9({check:"string_format",format:"starts_with",...be(t),prefix:e})}function aP(e,t){return new z9({check:"string_format",format:"ends_with",...be(t),suffix:e})}function Fo(e){return new _9({check:"overwrite",tx:e})}function oP(e){return Fo(t=>t.normalize(e))}function sP(){return Fo(e=>e.trim())}function lP(){return Fo(e=>e.toLowerCase())}function uP(){return Fo(e=>e.toUpperCase())}function cP(){return Fo(e=>vL(e))}function fP(e,t,n){return new e({type:"array",element:t,...be(n)})}function dP(e,t,n){return new e({type:"custom",check:"custom",fn:t,...be(n)})}function hP(e){const t=mP(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(gl(i,n.value,t._zod.def));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(gl(o))}},e(n.value,n)));return t}function mP(e,t){const n=new _n({check:"custom",...be(t)});return n._zod.check=e,n}function q_(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Js,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $t(e,t,n={path:[],schemaPath:[]}){var i;const o=e._zod.def,u=t.seen.get(e);if(u)return u.count++,n.schemaPath.includes(e)&&(u.cycle=n.path),u.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const x=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,x,p)}const y=e._zod.parent;y&&(l.ref||(l.ref=y),$t(y,t,p),t.seen.get(y).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&un(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((i=l.schema).default??(i.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function G_(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=i.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,l[0])}}const o=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(l[0])?.id,x=e.external.uri??(_=>_);if(y)return{ref:x(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${x("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},u=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=o(l);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const y in p)delete p[y];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
69
|
-
|
|
70
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){u(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){u(l);continue}}if(e.metadataRegistry.get(l[0])?.id){u(l);continue}if(f.cycle){u(l);continue}if(f.count>1&&e.reused==="ref"){u(l);continue}}}function Y_(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},p=f.ref;if(f.ref=null,p){i(p);const x=e.seen.get(p),b=x.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===p)for(const z in d)z==="$ref"||z==="allOf"||z in h||delete d[z];if(b.$ref&&x.def)for(const z in d)z==="$ref"||z==="allOf"||z in x.def&&JSON.stringify(d[z])===JSON.stringify(x.def[z])&&delete d[z]}const y=l._zod.parent;if(y&&y!==p){i(y);const x=e.seen.get(y);if(x?.schema.$ref&&(d.$ref=x.schema.$ref,x.def))for(const b in d)b==="$ref"||b==="allOf"||b in x.def&&JSON.stringify(d[b])===JSON.stringify(x.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())i(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const u=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(u[f.defId]=f.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Rc(t,"input",e.processors),output:Rc(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function un(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return un(i.element,n);if(i.type==="set")return un(i.valueType,n);if(i.type==="lazy")return un(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return un(i.innerType,n);if(i.type==="intersection")return un(i.left,n)||un(i.right,n);if(i.type==="record"||i.type==="map")return un(i.keyType,n)||un(i.valueType,n);if(i.type==="pipe")return un(i.in,n)||un(i.out,n);if(i.type==="object"){for(const o in i.shape)if(un(i.shape[o],n))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(un(o,n))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(un(o,n))return!0;return!!(i.rest&&un(i.rest,n))}return!1}const pP=(e,t={})=>n=>{const i=q_({...n,processors:t});return $t(e,i),G_(i,e),Y_(i,e)},Rc=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=q_({...o??{},target:u,io:t,processors:n});return $t(e,l),G_(l,e),Y_(l,e)},gP={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},yP=(e,t,n,i)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),f&&(o.format=gP[f]??f,o.format===""&&delete o.format,f==="time"&&delete o.format),h&&(o.contentEncoding=h),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},xP=(e,t,n,i)=>{const o=n,{minimum:u,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:p}=e._zod.bag;typeof f=="string"&&f.includes("int")?o.type="integer":o.type="number",typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p),typeof u=="number"&&(o.minimum=u,typeof p=="number"&&t.target!=="draft-04"&&(p>=u?delete o.minimum:delete o.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=h,o.exclusiveMaximum=!0):o.exclusiveMaximum=h),typeof l=="number"&&(o.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},vP=(e,t,n,i)=>{n.type="boolean"},bP=(e,t,n,i)=>{n.not={}},SP=(e,t,n,i)=>{},kP=(e,t,n,i)=>{const o=e._zod.def,u=__(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},wP=(e,t,n,i)=>{const o=e._zod.def,u=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(l))}else u.push(l);if(u.length!==0)if(u.length===1){const l=u[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),u.every(l=>typeof l=="boolean")&&(n.type="boolean"),u.every(l=>l===null)&&(n.type="null"),n.enum=u},zP=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},_P=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},EP=(e,t,n,i)=>{const o=n,u=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof f=="number"&&(o.maxItems=f),o.type="array",o.items=$t(u.element,t,{...i,path:[...i.path,"items"]})},TP=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=$t(l[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=$t(u.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},CP=(e,t,n,i)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((f,d)=>$t(f,t,{...i,path:[...i.path,u?"oneOf":"anyOf",d]}));u?n.oneOf=l:n.anyOf=l},AP=(e,t,n,i)=>{const o=e._zod.def,u=$t(o.left,t,{...i,path:[...i.path,"allOf",0]}),l=$t(o.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(u)?u.allOf:[u],...f(l)?l.allOf:[l]];n.allOf=d},jP=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object";const l=u.keyType,d=l._zod.bag?.patterns;if(u.mode==="loose"&&d&&d.size>0){const p=$t(u.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});o.patternProperties={};for(const y of d)o.patternProperties[y.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=$t(u.keyType,t,{...i,path:[...i.path,"propertyNames"]})),o.additionalProperties=$t(u.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const h=l._zod.values;if(h){const p=[...h].filter(y=>typeof y=="string"||typeof y=="number");p.length>0&&(o.required=p)}},NP=(e,t,n,i)=>{const o=e._zod.def,u=$t(o.innerType,t,i),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},OP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},RP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},MP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},DP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},$P=(e,t,n,i)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;$t(u,t,i);const l=t.seen.get(e);l.ref=u},LP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},X_=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},UP=Q("ZodISODateTime",(e,t)=>{P9.init(e,t),bt.init(e,t)});function PP(e){return FU(UP,e)}const VP=Q("ZodISODate",(e,t)=>{V9.init(e,t),bt.init(e,t)});function ZP(e){return qU(VP,e)}const BP=Q("ZodISOTime",(e,t)=>{Z9.init(e,t),bt.init(e,t)});function IP(e){return GU(BP,e)}const HP=Q("ZodISODuration",(e,t)=>{B9.init(e,t),bt.init(e,t)});function FP(e){return YU(HP,e)}const qP=(e,t)=>{A_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>OL(e,n)},flatten:{value:n=>NL(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,pp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,pp,2)}},isEmpty:{get(){return e.issues.length===0}}})},nr=Q("ZodError",qP,{Parent:Error}),GP=jg(nr),YP=Ng(nr),XP=ef(nr),KP=tf(nr),JP=DL(nr),QP=$L(nr),WP=LL(nr),eV=UL(nr),tV=PL(nr),nV=VL(nr),rV=ZL(nr),iV=BL(nr),vt=Q("ZodType",(e,t)=>(xt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Rc(e,"input"),output:Rc(e,"output")}}),e.toJSONSchema=pP(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Mi(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Di(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>GP(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>XP(e,n,i),e.parseAsync=async(n,i)=>YP(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>KP(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>JP(e,n,i),e.decode=(n,i)=>QP(e,n,i),e.encodeAsync=async(n,i)=>WP(e,n,i),e.decodeAsync=async(n,i)=>eV(e,n,i),e.safeEncode=(n,i)=>tV(e,n,i),e.safeDecode=(n,i)=>nV(e,n,i),e.safeEncodeAsync=async(n,i)=>rV(e,n,i),e.safeDecodeAsync=async(n,i)=>iV(e,n,i),e.refine=(n,i)=>e.check(QV(n,i)),e.superRefine=n=>e.check(WV(n)),e.overwrite=n=>e.check(Fo(n)),e.optional=()=>ZS(e),e.exactOptional=()=>PV(e),e.nullable=()=>BS(e),e.nullish=()=>ZS(BS(e)),e.nonoptional=n=>FV(e,n),e.array=()=>yl(e),e.or=n=>W_([e,n]),e.and=n=>RV(e,n),e.transform=n=>IS(e,LV(n)),e.default=n=>BV(e,n),e.prefault=n=>HV(e,n),e.catch=n=>GV(e,n),e.pipe=n=>IS(e,n),e.readonly=()=>KV(e),e.describe=n=>{const i=e.clone();return Js.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return Js.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Js.get(e);const i=e.clone();return Js.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),K_=Q("_ZodString",(e,t)=>{Og.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>yP(e,i,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(eP(...i)),e.includes=(...i)=>e.check(rP(...i)),e.startsWith=(...i)=>e.check(iP(...i)),e.endsWith=(...i)=>e.check(aP(...i)),e.min=(...i)=>e.check(Oc(...i)),e.max=(...i)=>e.check(H_(...i)),e.length=(...i)=>e.check(F_(...i)),e.nonempty=(...i)=>e.check(Oc(1,...i)),e.lowercase=i=>e.check(tP(i)),e.uppercase=i=>e.check(nP(i)),e.trim=()=>e.check(sP()),e.normalize=(...i)=>e.check(oP(...i)),e.toLowerCase=()=>e.check(lP()),e.toUpperCase=()=>e.check(uP()),e.slugify=()=>e.check(cP())}),aV=Q("ZodString",(e,t)=>{Og.init(e,t),K_.init(e,t),e.email=n=>e.check(zU(oV,n)),e.url=n=>e.check(AU(sV,n)),e.jwt=n=>e.check(HU(kV,n)),e.emoji=n=>e.check(jU(lV,n)),e.guid=n=>e.check(RS(LS,n)),e.uuid=n=>e.check(_U(sc,n)),e.uuidv4=n=>e.check(EU(sc,n)),e.uuidv6=n=>e.check(TU(sc,n)),e.uuidv7=n=>e.check(CU(sc,n)),e.nanoid=n=>e.check(NU(uV,n)),e.guid=n=>e.check(RS(LS,n)),e.cuid=n=>e.check(OU(cV,n)),e.cuid2=n=>e.check(RU(fV,n)),e.ulid=n=>e.check(MU(dV,n)),e.base64=n=>e.check(ZU(vV,n)),e.base64url=n=>e.check(BU(bV,n)),e.xid=n=>e.check(DU(hV,n)),e.ksuid=n=>e.check($U(mV,n)),e.ipv4=n=>e.check(LU(pV,n)),e.ipv6=n=>e.check(UU(gV,n)),e.cidrv4=n=>e.check(PU(yV,n)),e.cidrv6=n=>e.check(VU(xV,n)),e.e164=n=>e.check(IU(SV,n)),e.datetime=n=>e.check(PP(n)),e.date=n=>e.check(ZP(n)),e.time=n=>e.check(IP(n)),e.duration=n=>e.check(FP(n))});function it(e){return wU(aV,e)}const bt=Q("ZodStringFormat",(e,t)=>{pt.init(e,t),K_.init(e,t)}),oV=Q("ZodEmail",(e,t)=>{j9.init(e,t),bt.init(e,t)}),LS=Q("ZodGUID",(e,t)=>{C9.init(e,t),bt.init(e,t)}),sc=Q("ZodUUID",(e,t)=>{A9.init(e,t),bt.init(e,t)}),sV=Q("ZodURL",(e,t)=>{N9.init(e,t),bt.init(e,t)}),lV=Q("ZodEmoji",(e,t)=>{O9.init(e,t),bt.init(e,t)}),uV=Q("ZodNanoID",(e,t)=>{R9.init(e,t),bt.init(e,t)}),cV=Q("ZodCUID",(e,t)=>{M9.init(e,t),bt.init(e,t)}),fV=Q("ZodCUID2",(e,t)=>{D9.init(e,t),bt.init(e,t)}),dV=Q("ZodULID",(e,t)=>{$9.init(e,t),bt.init(e,t)}),hV=Q("ZodXID",(e,t)=>{L9.init(e,t),bt.init(e,t)}),mV=Q("ZodKSUID",(e,t)=>{U9.init(e,t),bt.init(e,t)}),pV=Q("ZodIPv4",(e,t)=>{I9.init(e,t),bt.init(e,t)}),gV=Q("ZodIPv6",(e,t)=>{H9.init(e,t),bt.init(e,t)}),yV=Q("ZodCIDRv4",(e,t)=>{F9.init(e,t),bt.init(e,t)}),xV=Q("ZodCIDRv6",(e,t)=>{q9.init(e,t),bt.init(e,t)}),vV=Q("ZodBase64",(e,t)=>{G9.init(e,t),bt.init(e,t)}),bV=Q("ZodBase64URL",(e,t)=>{X9.init(e,t),bt.init(e,t)}),SV=Q("ZodE164",(e,t)=>{K9.init(e,t),bt.init(e,t)}),kV=Q("ZodJWT",(e,t)=>{Q9.init(e,t),bt.init(e,t)}),J_=Q("ZodNumber",(e,t)=>{P_.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>xP(e,i,o),e.gt=(i,o)=>e.check(DS(i,o)),e.gte=(i,o)=>e.check(pm(i,o)),e.min=(i,o)=>e.check(pm(i,o)),e.lt=(i,o)=>e.check(MS(i,o)),e.lte=(i,o)=>e.check(mm(i,o)),e.max=(i,o)=>e.check(mm(i,o)),e.int=i=>e.check(US(i)),e.safe=i=>e.check(US(i)),e.positive=i=>e.check(DS(0,i)),e.nonnegative=i=>e.check(pm(0,i)),e.negative=i=>e.check(MS(0,i)),e.nonpositive=i=>e.check(mm(0,i)),e.multipleOf=(i,o)=>e.check($S(i,o)),e.step=(i,o)=>e.check($S(i,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ga(e){return XU(J_,e)}const wV=Q("ZodNumberFormat",(e,t)=>{W9.init(e,t),J_.init(e,t)});function US(e){return KU(wV,e)}const zV=Q("ZodBoolean",(e,t)=>{eU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>vP(e,n,i)});function ko(e){return JU(zV,e)}const _V=Q("ZodUnknown",(e,t)=>{tU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>SP()});function PS(){return QU(_V)}const EV=Q("ZodNever",(e,t)=>{nU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>bP(e,n,i)});function TV(e){return WU(EV,e)}const CV=Q("ZodArray",(e,t)=>{rU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>EP(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check(Oc(n,i)),e.nonempty=n=>e.check(Oc(1,n)),e.max=(n,i)=>e.check(H_(n,i)),e.length=(n,i)=>e.check(F_(n,i)),e.unwrap=()=>e.element});function yl(e,t){return fP(CV,e,t)}const AV=Q("ZodObject",(e,t)=>{aU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>TP(e,n,i,o),qe(e,"shape",()=>t.shape),e.keyof=()=>rf(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:PS()}),e.loose=()=>e.clone({...e._zod.def,catchall:PS()}),e.strict=()=>e.clone({...e._zod.def,catchall:TV()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>EL(e,n),e.safeExtend=n=>TL(e,n),e.merge=n=>CL(e,n),e.pick=n=>zL(e,n),e.omit=n=>_L(e,n),e.partial=(...n)=>AL(eE,e,n[0]),e.required=(...n)=>jL(tE,e,n[0])});function Jn(e,t){const n={type:"object",shape:e??{},...be(t)};return new AV(n)}const Q_=Q("ZodUnion",(e,t)=>{B_.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>CP(e,n,i,o),e.options=t.options});function W_(e,t){return new Q_({type:"union",options:e,...be(t)})}const jV=Q("ZodDiscriminatedUnion",(e,t)=>{Q_.init(e,t),oU.init(e,t)});function NV(e,t,n){return new jV({type:"union",options:t,discriminator:e,...be(n)})}const OV=Q("ZodIntersection",(e,t)=>{sU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>AP(e,n,i,o)});function RV(e,t){return new OV({type:"intersection",left:e,right:t})}const MV=Q("ZodRecord",(e,t)=>{lU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>jP(e,n,i,o),e.keyType=t.keyType,e.valueType=t.valueType});function vc(e,t,n){return new MV({type:"record",keyType:e,valueType:t,...be(n)})}const yp=Q("ZodEnum",(e,t)=>{uU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>kP(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const u={};for(const l of i)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new yp({...t,checks:[],...be(o),entries:u})},e.exclude=(i,o)=>{const u={...t.entries};for(const l of i)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new yp({...t,checks:[],...be(o),entries:u})}});function rf(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new yp({type:"enum",entries:n,...be(t)})}const DV=Q("ZodLiteral",(e,t)=>{cU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>wP(e,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function VS(e,t){return new DV({type:"literal",values:Array.isArray(e)?e:[e],...be(t)})}const $V=Q("ZodTransform",(e,t)=>{fU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>_P(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new w_(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(gl(u,n.value,t));else{const l=u;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(gl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function LV(e){return new $V({type:"transform",transform:e})}const eE=Q("ZodOptional",(e,t)=>{I_.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>X_(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function ZS(e){return new eE({type:"optional",innerType:e})}const UV=Q("ZodExactOptional",(e,t)=>{dU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>X_(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function PV(e){return new UV({type:"optional",innerType:e})}const VV=Q("ZodNullable",(e,t)=>{hU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>NP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function BS(e){return new VV({type:"nullable",innerType:e})}const ZV=Q("ZodDefault",(e,t)=>{mU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>RP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function BV(e,t){return new ZV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():T_(t)}})}const IV=Q("ZodPrefault",(e,t)=>{pU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>MP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function HV(e,t){return new IV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():T_(t)}})}const tE=Q("ZodNonOptional",(e,t)=>{gU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>OP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function FV(e,t){return new tE({type:"nonoptional",innerType:e,...be(t)})}const qV=Q("ZodCatch",(e,t)=>{yU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>DP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function GV(e,t){return new qV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const YV=Q("ZodPipe",(e,t)=>{xU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>$P(e,n,i,o),e.in=t.in,e.out=t.out});function IS(e,t){return new YV({type:"pipe",in:e,out:t})}const XV=Q("ZodReadonly",(e,t)=>{vU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>LP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function KV(e){return new XV({type:"readonly",innerType:e})}const JV=Q("ZodCustom",(e,t)=>{bU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zP(e,n)});function QV(e,t={}){return dP(JV,e,t)}function WV(e){return hP(e)}const ht={agent:{name:"morpheus",personality:"helpful_dev"},logging:{enabled:!0,level:"info",retention:"14d"},audio:{provider:"google",model:"gemini-2.5-flash-lite",enabled:!0,maxDurationSeconds:300,supportedMimeTypes:["audio/ogg","audio/mp3","audio/mpeg","audio/wav"]},memory:{limit:100},llm:{provider:"openai",model:"gpt-4",temperature:.7,context_window:100},channels:{telegram:{enabled:!1,allowedUsers:[]},discord:{enabled:!1}},ui:{enabled:!0,port:3333}},e8=Jn({provider:rf(["google","openai","openrouter","ollama"]).default(ht.audio.provider),model:it().min(1).default(ht.audio.model),enabled:ko().default(ht.audio.enabled),apiKey:it().optional(),base_url:it().optional(),maxDurationSeconds:ga().default(ht.audio.maxDurationSeconds),supportedMimeTypes:yl(it()).default(ht.audio.supportedMimeTypes)}),nE=Jn({provider:rf(["openai","anthropic","openrouter","ollama","gemini"]).default(ht.llm.provider),model:it().min(1).default(ht.llm.model),temperature:ga().min(0).max(1).default(ht.llm.temperature),max_tokens:ga().int().positive().optional(),api_key:it().optional(),base_url:it().optional(),context_window:ga().int().positive().optional()}),t8=nE.extend({memory_limit:ga().int().positive().optional(),enabled_archived_sessions:ko().default(!0)}),n8=Jn({agent:Jn({name:it().default(ht.agent.name),personality:it().default(ht.agent.personality)}).default(ht.agent),llm:nE.default(ht.llm),sati:t8.optional(),audio:e8.default(ht.audio),memory:Jn({limit:ga().int().positive().optional()}).default(ht.memory),channels:Jn({telegram:Jn({enabled:ko().default(!1),token:it().optional(),allowedUsers:yl(it()).default([])}).default(ht.channels.telegram),discord:Jn({enabled:ko().default(!1),token:it().optional()}).default(ht.channels.discord)}).default(ht.channels),ui:Jn({enabled:ko().default(ht.ui.enabled),port:ga().default(ht.ui.port)}).default(ht.ui),logging:Jn({enabled:ko().default(ht.logging.enabled),level:rf(["debug","info","warn","error"]).default(ht.logging.level),retention:it().default(ht.logging.retention)}).default(ht.logging)}),r8=NV("transport",[Jn({transport:VS("stdio"),command:it().min(1,"Command is required for stdio transport"),args:yl(it()).optional().default([]),env:vc(it(),it()).optional().default({}),_comment:it().optional()}),Jn({transport:VS("http"),url:it().url("Valid URL is required for http transport"),headers:vc(it(),it()).optional().default({}),args:yl(it()).optional().default([]),env:vc(it(),it()).optional().default({}),_comment:it().optional()})]);vc(it(),W_([r8,it()]));function te(e,t,n){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,p=Object.keys(h);for(let y=0;y<p.length;y++){const x=p[y];x in f||(f[x]=h[x].bind(f))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(f){var d;const h=n?.Parent?new u:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const p of h._zod.deferred)p();return h}return Object.defineProperty(l,"init",{value:i}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class jo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const iE={};function xa(e){return iE}function aE(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function xp(e,t){return typeof t=="bigint"?t.toString():t}function Rg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Mg(e){return e==null}function Dg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const HS=Symbol("evaluating");function Ke(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==HS)return i===void 0&&(i=HS,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ka(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $i(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function FS(e){return JSON.stringify(e)}function i8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const oE="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Mc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const a8=Rg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function xl(e){if(Mc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Mc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sE(e){return xl(e)?{...e}:Array.isArray(e)?[...e]:e}const o8=new Set(["string","number","symbol"]);function Mo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Li(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function Ee(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function s8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function l8(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=$i(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return ka(this,"shape",l),l},checks:[]});return Li(e,u)}function u8(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=$i(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return ka(this,"shape",l),l},checks:[]});return Li(e,u)}function c8(e,t){if(!xl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const u=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(u,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=$i(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return ka(this,"shape",u),u}});return Li(e,o)}function f8(e,t){if(!xl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$i(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ka(this,"shape",i),i}});return Li(e,n)}function d8(e,t){const n=$i(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ka(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Li(e,n)}function h8(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=$i(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return ka(this,"shape",d),d},checks:[]});return Li(t,l)}function m8(e,t,n){const i=$i(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(n)for(const l in n){if(!(l in u))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)u[l]=new e({type:"nonoptional",innerType:o[l]});return ka(this,"shape",u),u}});return Li(t,i)}function wo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function lE(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function lc(e){return typeof e=="string"?e:e?.message}function va(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=lc(e.inst?._zod.def?.error?.(e))??lc(t?.error?.(e))??lc(n.customError?.(e))??lc(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function $g(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const uE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cE=te("$ZodError",uE),fE=te("$ZodError",uE,{Parent:Error});function p8(e,t=n=>n.message){const n={},i=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}function g8(e,t=n=>n.message){const n={_errors:[]},i=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,f=0;for(;f<u.path.length;){const d=u.path[f];f===u.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(u))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return i(e),n}const Lg=e=>(t,n,i,o)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new jo;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>va(d,u,xa())));throw oE(f,o?.callee),f}return l.value},Ug=e=>async(t,n,i,o)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>va(d,u,xa())));throw oE(f,o?.callee),f}return l.value},af=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new jo;return u.issues.length?{success:!1,error:new(e??cE)(u.issues.map(l=>va(l,o,xa())))}:{success:!0,data:u.value}},y8=af(fE),of=e=>async(t,n,i)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(l=>va(l,o,xa())))}:{success:!0,data:u.value}},x8=of(fE),v8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Lg(e)(t,n,o)},b8=e=>(t,n,i)=>Lg(e)(t,n,i),S8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ug(e)(t,n,o)},k8=e=>async(t,n,i)=>Ug(e)(t,n,i),w8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return af(e)(t,n,o)},z8=e=>(t,n,i)=>af(e)(t,n,i),_8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return of(e)(t,n,o)},E8=e=>async(t,n,i)=>of(e)(t,n,i),T8=/^[cC][^\s-]{8,}$/,C8=/^[0-9a-z]+$/,A8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,j8=/^[0-9a-vA-V]{20}$/,N8=/^[A-Za-z0-9]{27}$/,O8=/^[a-zA-Z0-9_-]{21}$/,R8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,M8=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,D8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function L8(){return new RegExp($8,"u")}const U8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,P8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,V8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Z8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,B8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dE=/^[A-Za-z0-9_-]*$/,I8=/^\+[1-9]\d{6,14}$/,hE="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",H8=new RegExp(`^${hE}$`);function mE(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function F8(e){return new RegExp(`^${mE(e)}$`)}function q8(e){const t=mE({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${hE}T(?:${i})$`)}const G8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Y8=/^[^A-Z]*$/,X8=/^[^a-z]*$/,Er=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),K8=te("$ZodCheckMaxLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Mg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const o=i.value;if(o.length<=t.maximum)return;const l=$g(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),J8=te("$ZodCheckMinLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Mg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const l=$g(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Q8=te("$ZodCheckLengthEquals",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Mg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,u=o.length;if(u===t.length)return;const l=$g(o),f=u>t.length;i.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),sf=te("$ZodCheckStringFormat",(e,t)=>{var n,i;Er.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),W8=te("$ZodCheckRegex",(e,t)=>{sf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eZ=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Y8),sf.init(e,t)}),tZ=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=X8),sf.init(e,t)}),nZ=te("$ZodCheckIncludes",(e,t)=>{Er.init(e,t);const n=Mo(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),rZ=te("$ZodCheckStartsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`^${Mo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),iZ=te("$ZodCheckEndsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`.*${Mo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),aZ=te("$ZodCheckOverwrite",(e,t)=>{Er.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class oZ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
71
|
-
`).filter(l=>l),o=Math.min(...i.map(l=>l.length-l.trimStart().length)),u=i.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of u)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...n,o.join(`
|
|
72
|
-
`))}}const sZ={major:4,minor:3,patch:6},Lt=te("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sZ;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,f,d)=>{let h=wo(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const x=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new jo;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==x&&(h||(h=wo(l,x)))});else{if(l.issues.length===x)continue;h||(h=wo(l,x))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(wo(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new jo;return h.then(p=>e._zod.parse(p,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(p=>u(p,l,f)):u(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new jo;return d.then(h=>o(h,i,f))}return o(d,i,f)}}Ke(e,"~standard",()=>({validate:o=>{try{const u=y8(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return x8(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Pg=te("$ZodString",(e,t)=>{Lt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??G8(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),gt=te("$ZodStringFormat",(e,t)=>{sf.init(e,t),Pg.init(e,t)}),lZ=te("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=M8),gt.init(e,t)}),uZ=te("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qS(i))}else t.pattern??(t.pattern=qS());gt.init(e,t)}),cZ=te("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=D8),gt.init(e,t)}),fZ=te("$ZodURL",(e,t)=>{gt.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),dZ=te("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=L8()),gt.init(e,t)}),hZ=te("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=O8),gt.init(e,t)}),mZ=te("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=T8),gt.init(e,t)}),pZ=te("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=C8),gt.init(e,t)}),gZ=te("$ZodULID",(e,t)=>{t.pattern??(t.pattern=A8),gt.init(e,t)}),yZ=te("$ZodXID",(e,t)=>{t.pattern??(t.pattern=j8),gt.init(e,t)}),xZ=te("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=N8),gt.init(e,t)}),vZ=te("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=q8(t)),gt.init(e,t)}),bZ=te("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=H8),gt.init(e,t)}),SZ=te("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=F8(t)),gt.init(e,t)}),kZ=te("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=R8),gt.init(e,t)}),wZ=te("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=U8),gt.init(e,t),e._zod.bag.format="ipv4"}),zZ=te("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=P8),gt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),_Z=te("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=V8),gt.init(e,t)}),EZ=te("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Z8),gt.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[o,u]=i;if(!u)throw new Error;const l=Number(u);if(`${l}`!==u)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function pE(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const TZ=te("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=B8),gt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{pE(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function CZ(e){if(!dE.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return pE(n)}const AZ=te("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=dE),gt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{CZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),jZ=te("$ZodE164",(e,t)=>{t.pattern??(t.pattern=I8),gt.init(e,t)});function NZ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const OZ=te("$ZodJWT",(e,t)=>{gt.init(e,t),e._zod.check=n=>{NZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),RZ=te("$ZodUnknown",(e,t)=>{Lt.init(e,t),e._zod.parse=n=>n}),MZ=te("$ZodNever",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function GS(e,t,n){e.issues.length&&t.issues.push(...lE(n,e.issues)),t.value[n]=e.value}const DZ=te("$ZodArray",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const u=[];for(let l=0;l<o.length;l++){const f=o[l],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?u.push(d.then(h=>GS(h,n,l))):GS(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Dc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...lE(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function gE(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=s8(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function yE(e,t,n,i,o,u){const l=[],f=o.keySet,d=o.catchall._zod,h=d.def.type,p=d.optout==="optional";for(const y in t){if(f.has(y))continue;if(h==="never"){l.push(y);continue}const x=d.run({value:t[y],issues:[]},i);x instanceof Promise?e.push(x.then(b=>Dc(b,n,y,t,p))):Dc(x,n,y,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const $Z=te("$ZodObject",(e,t)=>{if(Lt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Rg(()=>gE(t));Ke(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const p=f[h]._zod;if(p.values){d[h]??(d[h]=new Set);for(const y of p.values)d[h].add(y)}}return d});const o=Mc,u=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=i.value);const h=f.value;if(!o(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const p=[],y=l.shape;for(const x of l.keys){const b=y[x],_=b._zod.optout==="optional",z=b._zod.run({value:h[x],issues:[]},d);z instanceof Promise?p.push(z.then(C=>Dc(C,f,x,h,_))):Dc(z,f,x,h,_)}return u?yE(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),LZ=te("$ZodObjectJIT",(e,t)=>{$Z.init(e,t);const n=e._zod.parse,i=Rg(()=>gE(t)),o=x=>{const b=new oZ(["shape","payload","ctx"]),_=i.value,z=A=>{const R=FS(A);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};b.write("const input = payload.value;");const C=Object.create(null);let j=0;for(const A of _.keys)C[A]=`key_${j++}`;b.write("const newResult = {};");for(const A of _.keys){const R=C[A],L=FS(A),G=x[A]?._zod?.optout==="optional";b.write(`const ${R} = ${z(A)};`),G?b.write(`
|
|
73
|
-
if (${R}.issues.length) {
|
|
74
|
-
if (${L} in input) {
|
|
75
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
76
|
-
...iss,
|
|
77
|
-
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
78
|
-
})));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (${R}.value === undefined) {
|
|
83
|
-
if (${L} in input) {
|
|
84
|
-
newResult[${L}] = undefined;
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
newResult[${L}] = ${R}.value;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
`):b.write(`
|
|
91
|
-
if (${R}.issues.length) {
|
|
92
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
93
|
-
...iss,
|
|
94
|
-
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
95
|
-
})));
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (${R}.value === undefined) {
|
|
99
|
-
if (${L} in input) {
|
|
100
|
-
newResult[${L}] = undefined;
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
newResult[${L}] = ${R}.value;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
`)}b.write("payload.value = newResult;"),b.write("return payload;");const O=b.compile();return(A,R)=>O(x,A,R)};let u;const l=Mc,f=!iE.jitless,h=f&&a8.value,p=t.catchall;let y;e._zod.parse=(x,b)=>{y??(y=i.value);const _=x.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),x=u(x,b),p?yE([],_,x,b,y,e):x):n(x,b):(x.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),x)}});function YS(e,t,n,i){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!wo(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(u=>u.issues.map(l=>va(l,i,xa())))}),t)}const UZ=te("$ZodUnion",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ke(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ke(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ke(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Dg(u.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return i(o,u);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>YS(d,o,e,u)):YS(f,o,e,u)}}),PZ=te("$ZodIntersection",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},i),l=t.right._zod.run({value:o,issues:[]},i);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([d,h])=>XS(n,d,h)):XS(n,u,l)}});function vp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xl(e)&&xl(t)){const n=Object.keys(t),i=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of i){const l=vp(e[u],t[u]);if(!l.valid)return{valid:!1,mergeErrorPath:[u,...l.mergeErrorPath]};o[u]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const o=e[i],u=t[i],l=vp(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function XS(e,t,n){const i=new Map;let o;for(const f of t.issues)if(f.code==="unrecognized_keys"){o??(o=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of n.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const u=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length&&o&&e.issues.push({...o,keys:u}),wo(e))return e;const l=vp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const VZ=te("$ZodEnum",(e,t)=>{Lt.init(e,t);const n=aE(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>o8.has(typeof o)).map(o=>typeof o=="string"?Mo(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return i.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),ZZ=te("$ZodLiteral",(e,t)=>{if(Lt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Mo(i):i?Mo(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,o)=>{const u=i.value;return n.has(u)||i.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),i}}),BZ=te("$ZodTransform",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new rE(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new jo;return n.value=o,n}});function KS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const xE=te("$ZodOptional",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Dg(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>KS(u,n.value)):KS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),IZ=te("$ZodExactOptional",(e,t)=>{xE.init(e,t),Ke(e._zod,"values",()=>t.innerType._zod.values),Ke(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),HZ=te("$ZodNullable",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.innerType._zod.optin),Ke(e._zod,"optout",()=>t.innerType._zod.optout),Ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Dg(n.source)}|null)$`):void 0}),Ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),FZ=te("$ZodDefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>JS(u,t)):JS(o,t)}});function JS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const qZ=te("$ZodPrefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),GZ=te("$ZodNonOptional",(e,t)=>{Lt.init(e,t),Ke(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>QS(u,e)):QS(o,e)}});function QS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const YZ=te("$ZodCatch",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.innerType._zod.optin),Ke(e._zod,"optout",()=>t.innerType._zod.optout),Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>(n.value=u.value,u.issues.length&&(n.value=t.catchValue({...n,error:{issues:u.issues.map(l=>va(l,i,xa()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>va(u,i,xa()))},input:n.value}),n.issues=[]),n)}}),XZ=te("$ZodPipe",(e,t)=>{Lt.init(e,t),Ke(e._zod,"values",()=>t.in._zod.values),Ke(e._zod,"optin",()=>t.in._zod.optin),Ke(e._zod,"optout",()=>t.out._zod.optout),Ke(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const u=t.out._zod.run(n,i);return u instanceof Promise?u.then(l=>uc(l,t.in,i)):uc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>uc(u,t.out,i)):uc(o,t.out,i)}});function uc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const KZ=te("$ZodReadonly",(e,t)=>{Lt.init(e,t),Ke(e._zod,"propValues",()=>t.innerType._zod.propValues),Ke(e._zod,"values",()=>t.innerType._zod.values),Ke(e._zod,"optin",()=>t.innerType?._zod?.optin),Ke(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(WS):WS(o)}});function WS(e){return e.value=Object.freeze(e.value),e}const JZ=te("$ZodCustom",(e,t)=>{Er.init(e,t),Lt.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(u=>ek(u,n,i,e));ek(o,n,i,e)}});function ek(e,t,n,i){if(!e){const o={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(vl(o))}}var tk;class QZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function WZ(){return new QZ}(tk=globalThis).__zod_globalRegistry??(tk.__zod_globalRegistry=WZ());const Qs=globalThis.__zod_globalRegistry;function eB(e,t){return new e({type:"string",...Ee(t)})}function tB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ee(t)})}function nk(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(t)})}function nB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(t)})}function rB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(t)})}function iB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(t)})}function aB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(t)})}function oB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ee(t)})}function sB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(t)})}function lB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(t)})}function uB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(t)})}function cB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(t)})}function fB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(t)})}function dB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(t)})}function hB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(t)})}function mB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(t)})}function pB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(t)})}function gB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(t)})}function yB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(t)})}function xB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(t)})}function vB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(t)})}function bB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(t)})}function SB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(t)})}function kB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(t)})}function wB(e,t){return new e({type:"string",format:"date",check:"string_format",...Ee(t)})}function zB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ee(t)})}function _B(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ee(t)})}function EB(e){return new e({type:"unknown"})}function TB(e,t){return new e({type:"never",...Ee(t)})}function vE(e,t){return new K8({check:"max_length",...Ee(t),maximum:e})}function $c(e,t){return new J8({check:"min_length",...Ee(t),minimum:e})}function bE(e,t){return new Q8({check:"length_equals",...Ee(t),length:e})}function CB(e,t){return new W8({check:"string_format",format:"regex",...Ee(t),pattern:e})}function AB(e){return new eZ({check:"string_format",format:"lowercase",...Ee(e)})}function jB(e){return new tZ({check:"string_format",format:"uppercase",...Ee(e)})}function NB(e,t){return new nZ({check:"string_format",format:"includes",...Ee(t),includes:e})}function OB(e,t){return new rZ({check:"string_format",format:"starts_with",...Ee(t),prefix:e})}function RB(e,t){return new iZ({check:"string_format",format:"ends_with",...Ee(t),suffix:e})}function qo(e){return new aZ({check:"overwrite",tx:e})}function MB(e){return qo(t=>t.normalize(e))}function DB(){return qo(e=>e.trim())}function $B(){return qo(e=>e.toLowerCase())}function LB(){return qo(e=>e.toUpperCase())}function UB(){return qo(e=>i8(e))}function PB(e,t,n){return new e({type:"array",element:t,...Ee(n)})}function VB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ee(n)})}function ZB(e){const t=BB(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(vl(i,n.value,t._zod.def));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(vl(o))}},e(n.value,n)));return t}function BB(e,t){const n=new Er({check:"custom",...Ee(t)});return n._zod.check=e,n}function SE(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Qs,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Wt(e,t,n={path:[],schemaPath:[]}){var i;const o=e._zod.def,u=t.seen.get(e);if(u)return u.count++,n.schemaPath.includes(e)&&(u.cycle=n.path),u.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const x=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,x,p)}const y=e._zod.parent;y&&(l.ref||(l.ref=y),Wt(y,t,p),t.seen.get(y).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&cn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((i=l.schema).default??(i.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function kE(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=i.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,l[0])}}const o=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(l[0])?.id,x=e.external.uri??(_=>_);if(y)return{ref:x(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${x("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},u=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=o(l);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const y in p)delete p[y];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
107
|
-
|
|
108
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){u(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){u(l);continue}}if(e.metadataRegistry.get(l[0])?.id){u(l);continue}if(f.cycle){u(l);continue}if(f.count>1&&e.reused==="ref"){u(l);continue}}}function wE(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},p=f.ref;if(f.ref=null,p){i(p);const x=e.seen.get(p),b=x.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===p)for(const z in d)z==="$ref"||z==="allOf"||z in h||delete d[z];if(b.$ref&&x.def)for(const z in d)z==="$ref"||z==="allOf"||z in x.def&&JSON.stringify(d[z])===JSON.stringify(x.def[z])&&delete d[z]}const y=l._zod.parent;if(y&&y!==p){i(y);const x=e.seen.get(y);if(x?.schema.$ref&&(d.$ref=x.schema.$ref,x.def))for(const b in d)b==="$ref"||b==="allOf"||b in x.def&&JSON.stringify(d[b])===JSON.stringify(x.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())i(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const u=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(u[f.defId]=f.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Lc(t,"input",e.processors),output:Lc(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function cn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return cn(i.element,n);if(i.type==="set")return cn(i.valueType,n);if(i.type==="lazy")return cn(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return cn(i.innerType,n);if(i.type==="intersection")return cn(i.left,n)||cn(i.right,n);if(i.type==="record"||i.type==="map")return cn(i.keyType,n)||cn(i.valueType,n);if(i.type==="pipe")return cn(i.in,n)||cn(i.out,n);if(i.type==="object"){for(const o in i.shape)if(cn(i.shape[o],n))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(cn(o,n))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(cn(o,n))return!0;return!!(i.rest&&cn(i.rest,n))}return!1}const IB=(e,t={})=>n=>{const i=SE({...n,processors:t});return Wt(e,i),kE(i,e),wE(i,e)},Lc=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=SE({...o??{},target:u,io:t,processors:n});return Wt(e,l),kE(l,e),wE(l,e)},HB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FB=(e,t,n,i)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),f&&(o.format=HB[f]??f,o.format===""&&delete o.format,f==="time"&&delete o.format),h&&(o.contentEncoding=h),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},qB=(e,t,n,i)=>{n.not={}},GB=(e,t,n,i)=>{},YB=(e,t,n,i)=>{const o=e._zod.def,u=aE(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},XB=(e,t,n,i)=>{const o=e._zod.def,u=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(l))}else u.push(l);if(u.length!==0)if(u.length===1){const l=u[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),u.every(l=>typeof l=="boolean")&&(n.type="boolean"),u.every(l=>l===null)&&(n.type="null"),n.enum=u},KB=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},JB=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},QB=(e,t,n,i)=>{const o=n,u=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof f=="number"&&(o.maxItems=f),o.type="array",o.items=Wt(u.element,t,{...i,path:[...i.path,"items"]})},WB=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=Wt(l[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=Wt(u.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},eI=(e,t,n,i)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((f,d)=>Wt(f,t,{...i,path:[...i.path,u?"oneOf":"anyOf",d]}));u?n.oneOf=l:n.anyOf=l},tI=(e,t,n,i)=>{const o=e._zod.def,u=Wt(o.left,t,{...i,path:[...i.path,"allOf",0]}),l=Wt(o.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(u)?u.allOf:[u],...f(l)?l.allOf:[l]];n.allOf=d},nI=(e,t,n,i)=>{const o=e._zod.def,u=Wt(o.innerType,t,i),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},rI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},iI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},aI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},oI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},sI=(e,t,n,i)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Wt(u,t,i);const l=t.seen.get(e);l.ref=u},lI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},zE=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},uI=te("ZodISODateTime",(e,t)=>{vZ.init(e,t),St.init(e,t)});function cI(e){return kB(uI,e)}const fI=te("ZodISODate",(e,t)=>{bZ.init(e,t),St.init(e,t)});function dI(e){return wB(fI,e)}const hI=te("ZodISOTime",(e,t)=>{SZ.init(e,t),St.init(e,t)});function mI(e){return zB(hI,e)}const pI=te("ZodISODuration",(e,t)=>{kZ.init(e,t),St.init(e,t)});function gI(e){return _B(pI,e)}const _E=(e,t)=>{cE.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>g8(e,n)},flatten:{value:n=>p8(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xp,2)}},isEmpty:{get(){return e.issues.length===0}}})},yI=te("ZodError",_E),rr=te("ZodError",_E,{Parent:Error}),xI=Lg(rr),vI=Ug(rr),bI=af(rr),SI=of(rr),kI=v8(rr),wI=b8(rr),zI=S8(rr),_I=k8(rr),EI=w8(rr),TI=z8(rr),CI=_8(rr),AI=E8(rr),Ut=te("ZodType",(e,t)=>(Lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Lc(e,"input"),output:Lc(e,"output")}}),e.toJSONSchema=IB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($i(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Li(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>xI(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>bI(e,n,i),e.parseAsync=async(n,i)=>vI(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>SI(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>kI(e,n,i),e.decode=(n,i)=>wI(e,n,i),e.encodeAsync=async(n,i)=>zI(e,n,i),e.decodeAsync=async(n,i)=>_I(e,n,i),e.safeEncode=(n,i)=>EI(e,n,i),e.safeDecode=(n,i)=>TI(e,n,i),e.safeEncodeAsync=async(n,i)=>CI(e,n,i),e.safeDecodeAsync=async(n,i)=>AI(e,n,i),e.refine=(n,i)=>e.check(k7(n,i)),e.superRefine=n=>e.check(w7(n)),e.overwrite=n=>e.check(qo(n)),e.optional=()=>ok(e),e.exactOptional=()=>u7(e),e.nullable=()=>sk(e),e.nullish=()=>ok(sk(e)),e.nonoptional=n=>p7(e,n),e.array=()=>QI(e),e.or=n=>TE([e,n]),e.and=n=>r7(e,n),e.transform=n=>lk(e,s7(n)),e.default=n=>d7(e,n),e.prefault=n=>m7(e,n),e.catch=n=>y7(e,n),e.pipe=n=>lk(e,n),e.readonly=()=>b7(e),e.describe=n=>{const i=e.clone();return Qs.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return Qs.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Qs.get(e);const i=e.clone();return Qs.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),EE=te("_ZodString",(e,t)=>{Pg.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>FB(e,i,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(CB(...i)),e.includes=(...i)=>e.check(NB(...i)),e.startsWith=(...i)=>e.check(OB(...i)),e.endsWith=(...i)=>e.check(RB(...i)),e.min=(...i)=>e.check($c(...i)),e.max=(...i)=>e.check(vE(...i)),e.length=(...i)=>e.check(bE(...i)),e.nonempty=(...i)=>e.check($c(1,...i)),e.lowercase=i=>e.check(AB(i)),e.uppercase=i=>e.check(jB(i)),e.trim=()=>e.check(DB()),e.normalize=(...i)=>e.check(MB(...i)),e.toLowerCase=()=>e.check($B()),e.toUpperCase=()=>e.check(LB()),e.slugify=()=>e.check(UB())}),jI=te("ZodString",(e,t)=>{Pg.init(e,t),EE.init(e,t),e.email=n=>e.check(tB(NI,n)),e.url=n=>e.check(oB(OI,n)),e.jwt=n=>e.check(SB(GI,n)),e.emoji=n=>e.check(sB(RI,n)),e.guid=n=>e.check(nk(rk,n)),e.uuid=n=>e.check(nB(cc,n)),e.uuidv4=n=>e.check(rB(cc,n)),e.uuidv6=n=>e.check(iB(cc,n)),e.uuidv7=n=>e.check(aB(cc,n)),e.nanoid=n=>e.check(lB(MI,n)),e.guid=n=>e.check(nk(rk,n)),e.cuid=n=>e.check(uB(DI,n)),e.cuid2=n=>e.check(cB($I,n)),e.ulid=n=>e.check(fB(LI,n)),e.base64=n=>e.check(xB(HI,n)),e.base64url=n=>e.check(vB(FI,n)),e.xid=n=>e.check(dB(UI,n)),e.ksuid=n=>e.check(hB(PI,n)),e.ipv4=n=>e.check(mB(VI,n)),e.ipv6=n=>e.check(pB(ZI,n)),e.cidrv4=n=>e.check(gB(BI,n)),e.cidrv6=n=>e.check(yB(II,n)),e.e164=n=>e.check(bB(qI,n)),e.datetime=n=>e.check(cI(n)),e.date=n=>e.check(dI(n)),e.time=n=>e.check(mI(n)),e.duration=n=>e.check(gI(n))});function gm(e){return eB(jI,e)}const St=te("ZodStringFormat",(e,t)=>{gt.init(e,t),EE.init(e,t)}),NI=te("ZodEmail",(e,t)=>{cZ.init(e,t),St.init(e,t)}),rk=te("ZodGUID",(e,t)=>{lZ.init(e,t),St.init(e,t)}),cc=te("ZodUUID",(e,t)=>{uZ.init(e,t),St.init(e,t)}),OI=te("ZodURL",(e,t)=>{fZ.init(e,t),St.init(e,t)}),RI=te("ZodEmoji",(e,t)=>{dZ.init(e,t),St.init(e,t)}),MI=te("ZodNanoID",(e,t)=>{hZ.init(e,t),St.init(e,t)}),DI=te("ZodCUID",(e,t)=>{mZ.init(e,t),St.init(e,t)}),$I=te("ZodCUID2",(e,t)=>{pZ.init(e,t),St.init(e,t)}),LI=te("ZodULID",(e,t)=>{gZ.init(e,t),St.init(e,t)}),UI=te("ZodXID",(e,t)=>{yZ.init(e,t),St.init(e,t)}),PI=te("ZodKSUID",(e,t)=>{xZ.init(e,t),St.init(e,t)}),VI=te("ZodIPv4",(e,t)=>{wZ.init(e,t),St.init(e,t)}),ZI=te("ZodIPv6",(e,t)=>{zZ.init(e,t),St.init(e,t)}),BI=te("ZodCIDRv4",(e,t)=>{_Z.init(e,t),St.init(e,t)}),II=te("ZodCIDRv6",(e,t)=>{EZ.init(e,t),St.init(e,t)}),HI=te("ZodBase64",(e,t)=>{TZ.init(e,t),St.init(e,t)}),FI=te("ZodBase64URL",(e,t)=>{AZ.init(e,t),St.init(e,t)}),qI=te("ZodE164",(e,t)=>{jZ.init(e,t),St.init(e,t)}),GI=te("ZodJWT",(e,t)=>{OZ.init(e,t),St.init(e,t)}),YI=te("ZodUnknown",(e,t)=>{RZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>GB()});function ik(){return EB(YI)}const XI=te("ZodNever",(e,t)=>{MZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>qB(e,n,i)});function KI(e){return TB(XI,e)}const JI=te("ZodArray",(e,t)=>{DZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>QB(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check($c(n,i)),e.nonempty=n=>e.check($c(1,n)),e.max=(n,i)=>e.check(vE(n,i)),e.length=(n,i)=>e.check(bE(n,i)),e.unwrap=()=>e.element});function QI(e,t){return PB(JI,e,t)}const WI=te("ZodObject",(e,t)=>{LZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>WB(e,n,i,o),Ke(e,"shape",()=>t.shape),e.keyof=()=>i7(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ik()}),e.loose=()=>e.clone({...e._zod.def,catchall:ik()}),e.strict=()=>e.clone({...e._zod.def,catchall:KI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>c8(e,n),e.safeExtend=n=>f8(e,n),e.merge=n=>d8(e,n),e.pick=n=>l8(e,n),e.omit=n=>u8(e,n),e.partial=(...n)=>h8(CE,e,n[0]),e.required=(...n)=>m8(AE,e,n[0])});function e7(e,t){const n={type:"object",shape:e??{},...Ee(t)};return new WI(n)}const t7=te("ZodUnion",(e,t)=>{UZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>eI(e,n,i,o),e.options=t.options});function TE(e,t){return new t7({type:"union",options:e,...Ee(t)})}const n7=te("ZodIntersection",(e,t)=>{PZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>tI(e,n,i,o)});function r7(e,t){return new n7({type:"intersection",left:e,right:t})}const bp=te("ZodEnum",(e,t)=>{VZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>YB(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const u={};for(const l of i)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new bp({...t,checks:[],...Ee(o),entries:u})},e.exclude=(i,o)=>{const u={...t.entries};for(const l of i)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new bp({...t,checks:[],...Ee(o),entries:u})}});function i7(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new bp({type:"enum",entries:n,...Ee(t)})}const a7=te("ZodLiteral",(e,t)=>{ZZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>XB(e,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ak(e,t){return new a7({type:"literal",values:Array.isArray(e)?e:[e],...Ee(t)})}const o7=te("ZodTransform",(e,t)=>{BZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>JB(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new rE(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(vl(u,n.value,t));else{const l=u;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(vl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function s7(e){return new o7({type:"transform",transform:e})}const CE=te("ZodOptional",(e,t)=>{xE.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function ok(e){return new CE({type:"optional",innerType:e})}const l7=te("ZodExactOptional",(e,t)=>{IZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function u7(e){return new l7({type:"optional",innerType:e})}const c7=te("ZodNullable",(e,t)=>{HZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>nI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function sk(e){return new c7({type:"nullable",innerType:e})}const f7=te("ZodDefault",(e,t)=>{FZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>iI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function d7(e,t){return new f7({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():sE(t)}})}const h7=te("ZodPrefault",(e,t)=>{qZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>aI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function m7(e,t){return new h7({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():sE(t)}})}const AE=te("ZodNonOptional",(e,t)=>{GZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>rI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function p7(e,t){return new AE({type:"nonoptional",innerType:e,...Ee(t)})}const g7=te("ZodCatch",(e,t)=>{YZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>oI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function y7(e,t){return new g7({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const x7=te("ZodPipe",(e,t)=>{XZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>sI(e,n,i,o),e.in=t.in,e.out=t.out});function lk(e,t){return new x7({type:"pipe",in:e,out:t})}const v7=te("ZodReadonly",(e,t)=>{KZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>lI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function b7(e){return new v7({type:"readonly",innerType:e})}const S7=te("ZodCustom",(e,t)=>{JZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>KB(e,n)});function k7(e,t={}){return VB(S7,e,t)}function w7(e){return ZB(e)}const z7=[{id:"general",label:"General"},{id:"llm",label:"LLM"},{id:"audio",label:"Audio"},{id:"channels",label:"Channels"},{id:"ui",label:"Interface"},{id:"logging",label:"Logging"}];function _7(){const{data:e,error:t}=ya("/api/config",ic.fetchConfig),{data:n}=ya("/api/config/sati",ic.getSatiConfig),[i,o]=E.useState(null),[u,l]=E.useState(null),[f,d]=E.useState("general"),[h,p]=E.useState(!1),[y,x]=E.useState({}),[b,_]=E.useState(null);E.useEffect(()=>{e&&!i&&o(e)},[e]),E.useEffect(()=>{n&&!u&&l(n)},[n]);const z=JSON.stringify(e)!==JSON.stringify(i)||JSON.stringify(n)!==JSON.stringify(u),C=(R,L)=>{if(!i)return;const $=JSON.parse(JSON.stringify(i));let G=$;for(let V=0;V<R.length-1;V++)G=G[R[V]];G[R[R.length-1]]=L,o($);try{n8.parse($),x({})}catch(V){if(V instanceof yI){const K={};V.errors.forEach(ue=>{const re=ue.path.join(".");K[re]=ue.message}),x(K)}}},j=(R,L)=>{u&&l({...u,[R]:L})},O=()=>{!i||!u||l({...u,provider:i.llm.provider,model:i.llm.model,api_key:i.llm.api_key})},A=async()=>{if(i){p(!0),_(null);try{await ic.updateConfig(i),u&&await ic.updateSatiConfig(u),Rm("/api/config"),Rm("/api/config/sati"),_({type:"success",message:"Settings saved successfully. Restart Morpheus daemon for changes to take effect."})}catch(R){if(_({type:"error",message:R.message}),R.details&&Array.isArray(R.details)){const L={};R.details.forEach($=>{const G=$.path.join(".");L[G]=$.message}),x(L)}}finally{p(!1)}}};return t?v.jsx("div",{className:"p-8 text-red-500",children:"Failed to load configuration"}):i?v.jsxs("div",{className:"max-w-4xl mx-auto p-0 md:p-6 space-y-6",children:[v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Zaion Settings"}),v.jsx("button",{onClick:A,disabled:!z||Object.keys(y).length>0||h,className:`px-4 py-2 rounded font-medium transition-colors ${z&&Object.keys(y).length===0?"bg-azure-primary text-white hover:bg-azure-active dark:bg-matrix-highlight dark:text-black dark:hover:bg-matrix-highlight/90":"bg-azure-border text-azure-text-secondary cursor-not-allowed dark:bg-matrix-primary/50 dark:text-matrix-highlight/50"}`,children:h?"Saving...":"Save Changes"})]}),b&&v.jsx("div",{className:`p-4 rounded border ${b.type==="success"?"border-azure-primary text-azure-primary bg-azure-primary/10 dark:border-matrix-highlight dark:text-matrix-highlight dark:bg-matrix-highlight/10":"border-red-500 text-red-500 bg-red-900/10"}`,children:b.message}),v.jsx("div",{className:"overflow-x-auto py-1 hide-scrollbar",children:v.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px min-w-max",children:z7.map(R=>v.jsx("button",{onClick:()=>d(R.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors flex-shrink-0 ${f===R.id?"bg-azure-surface/50 text-azure-primary border-t border-x border-azure-border dark:bg-matrix-primary/20 dark:text-matrix-highlight dark:border-t dark:border-x dark:border-matrix-primary":"text-azure-text-secondary hover:text-azure-primary dark:text-matrix-secondary dark:hover:text-matrix-highlight"}`,children:R.label},R.id))})}),v.jsxs("div",{className:"space-y-6",children:[f==="general"&&v.jsxs(aa,{title:"Agent Identity",children:[v.jsx(Sn,{label:"Agent Name",value:i.agent.name,onChange:R=>C(["agent","name"],R.target.value),error:y["agent.name"]}),v.jsx(Sn,{label:"Personality",value:i.agent.personality,onChange:R=>C(["agent","personality"],R.target.value),error:y["agent.personality"]})]}),f==="llm"&&v.jsxs(v.Fragment,{children:[v.jsxs(aa,{title:"Oracle Agent",children:[v.jsx(rc,{label:"Provider",value:i.llm.provider,onChange:R=>C(["llm","provider"],R.target.value),options:[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"OpenRouter",value:"openrouter"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}],error:y["llm.provider"]}),v.jsx(Sn,{label:"Model Name",value:i.llm.model,onChange:R=>C(["llm","model"],R.target.value),error:y["llm.model"]}),v.jsx(fo,{label:"Temperature",value:i.llm.temperature,onChange:R=>C(["llm","temperature"],parseFloat(R.target.value)),step:.1,min:0,max:1,error:y["llm.temperature"]}),v.jsx(fo,{label:"Max Tokens",value:i.llm.max_tokens??"",onChange:R=>C(["llm","max_tokens"],R.target.value?parseInt(R.target.value):void 0),min:1,error:y["llm.max_tokens"],helperText:"Maximum tokens per response. Leave empty for model default."}),v.jsx(fo,{label:"Context Window (Messages)",value:i.llm.context_window??100,onChange:R=>C(["llm","context_window"],parseInt(R.target.value)),min:1,step:1,error:y["llm.context_window"],helperText:"Number of past interactions to load into LLM context (e.g., 100)."}),v.jsx(Sn,{label:"API Key",type:"password",value:i.llm.api_key||"",onChange:R=>C(["llm","api_key"],R.target.value),placeholder:"sk-...",helperText:"Stored locally."}),i.llm.provider==="openrouter"&&v.jsx(Sn,{label:"Base URL",value:i.llm.base_url||"https://openrouter.ai/api/v1",onChange:R=>C(["llm","base_url"],R.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"})]}),v.jsxs(aa,{title:"Sati Agent",children:[v.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mb-4",children:"Configure the LLM used for memory consolidation"}),v.jsxs("div",{className:"mb-4",children:[v.jsx("button",{type:"button",onClick:O,className:"px-3 py-1.5 text-sm bg-azure-surface border border-azure-border rounded hover:bg-azure-primary/10 dark:bg-matrix-primary/20 dark:border-matrix-primary dark:hover:bg-matrix-highlight/10 text-azure-primary dark:text-matrix-highlight transition-colors",children:"Copy from Oracle Agent"}),v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary mt-1",children:"Copy Provider, Model, and API Key from Oracle Agent configuration"})]}),u&&v.jsxs(v.Fragment,{children:[v.jsx(rc,{label:"Provider",value:u.provider,onChange:R=>j("provider",R.target.value),options:[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"OpenRouter",value:"openrouter"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}]}),v.jsx(Sn,{label:"Model Name",value:u.model,onChange:R=>j("model",R.target.value)}),v.jsx(Sn,{label:"API Key",type:"password",value:u.api_key||"",onChange:R=>j("api_key",R.target.value),placeholder:"sk-...",helperText:"Stored locally."}),u.provider==="openrouter"&&v.jsx(Sn,{label:"Base URL",value:u.base_url||"https://openrouter.ai/api/v1",onChange:R=>j("base_url",R.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"}),v.jsx(fo,{label:"Memory Limit",value:u.memory_limit??10,onChange:R=>j("memory_limit",parseInt(R.target.value)),min:1,step:1,helperText:"Number of memory items to retrieve from long-term storage."}),v.jsx(Ys,{label:"Enable Archived Sessions in Memory Retrieval",checked:u.enabled_archived_sessions??!0,onChange:R=>j("enabled_archived_sessions",R)})]})]})]}),f==="audio"&&v.jsxs(aa,{title:"Audio Transcription",children:[v.jsx(Ys,{label:"Enable Audio",checked:i.audio.enabled,onChange:R=>C(["audio","enabled"],R)}),v.jsx(rc,{label:"Provider",value:i.audio.provider||"google",onChange:R=>C(["audio","provider"],R.target.value),options:[{label:"Google Gemini",value:"google"},{label:"OpenAI (Whisper)",value:"openai"},{label:"OpenRouter (multimodal)",value:"openrouter"},{label:"Ollama (Whisper local)",value:"ollama"}],error:y["audio.provider"]}),v.jsx(Sn,{label:"Model",value:i.audio.model,onChange:R=>C(["audio","model"],R.target.value),placeholder:"e.g. whisper-1, gemini-2.5-flash-lite...",helperText:"Model to use for audio transcription.",error:y["audio.model"]}),i.audio.provider==="ollama"&&v.jsx(Sn,{label:"Base URL",value:i.audio.base_url||"",onChange:R=>C(["audio","base_url"],R.target.value),placeholder:"http://localhost:11434",helperText:"Ollama base URL. Requires a Whisper model loaded (ollama pull whisper)."}),v.jsx(Sn,{label:"API Key",type:"password",value:i.audio.apiKey||"",onChange:R=>C(["audio","apiKey"],R.target.value),placeholder:"If different from LLM key...",helperText:"Leave empty to use LLM API key if using the same provider."}),v.jsx(fo,{label:"Max Duration (Seconds)",value:i.audio.maxDurationSeconds,onChange:R=>C(["audio","maxDurationSeconds"],parseInt(R.target.value)),min:1}),v.jsx(Sn,{label:"Supported Mime Types",value:i.audio.supportedMimeTypes.join(", "),onChange:R=>C(["audio","supportedMimeTypes"],R.target.value.split(",").map(L=>L.trim()).filter(Boolean)),helperText:"Comma separated list (e.g. audio/ogg, audio/mp3)"})]}),f==="channels"&&v.jsxs(aa,{title:"Telegram",children:[v.jsx(Ys,{label:"Enable Telegram",checked:i.channels.telegram.enabled,onChange:R=>C(["channels","telegram","enabled"],R)}),i.channels.telegram.enabled&&v.jsxs("div",{className:"space-y-4 mt-4 pl-4 border-l border-matrix-primary",children:[v.jsx(Sn,{label:"Bot Token",type:"password",value:i.channels.telegram.token||"",onChange:R=>C(["channels","telegram","token"],R.target.value)}),v.jsx(Sn,{label:"Allowed Users (comma separated)",value:i.channels.telegram.allowedUsers.join(", "),onChange:R=>C(["channels","telegram","allowedUsers"],R.target.value.split(",").map(L=>L.trim()).filter(Boolean)),helperText:"User IDs allowed to interact with the bot"})]})]}),f==="ui"&&v.jsxs(aa,{title:"Dashboard",children:[v.jsx(Ys,{label:"Enable Web UI",checked:i.ui.enabled,onChange:R=>C(["ui","enabled"],R)}),v.jsx(fo,{label:"Port",value:i.ui.port,onChange:R=>C(["ui","port"],parseInt(R.target.value)),disabled:!0,helperText:"Requires restart to change."})]}),f==="logging"&&v.jsxs(aa,{title:"Logging",children:[v.jsx(Ys,{label:"Enable Logging",checked:i.logging.enabled,onChange:R=>C(["logging","enabled"],R)}),v.jsx(rc,{label:"Log Level",value:i.logging.level,onChange:R=>C(["logging","level"],R.target.value),options:[{label:"Debug",value:"debug"},{label:"Info",value:"info"},{label:"Warning",value:"warn"},{label:"Error",value:"error"}]})]})]})]}):v.jsx("div",{className:"p-8 text-azure-primary dark:text-matrix-highlight",children:"Loading settings..."})}function E7(){const{data:e}=mN(),[t,n]=E.useState(null),{data:i,mutate:o}=pN(t);return E.useEffect(()=>{!t&&e&&e.length>0&&n(e[0].name)},[e,t]),v.jsxs(Sr.div,{className:"h-full flex flex-col space-y-4 pt-16 md:pt-0",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.3},children:[v.jsxs("div",{children:[v.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"SYSTEM LOGS"}),v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"View runtime logs."})]}),v.jsxs("div",{className:"flex-1 flex gap-4 overflow-hidden border border-azure-border dark:border-matrix-primary rounded bg-azure-surface dark:bg-zinc-950 p-4",children:[v.jsxs("div",{className:"w-64 flex flex-col gap-2 border-r border-azure-border dark:border-matrix-primary pr-4 overflow-y-auto shrink-0",children:[v.jsx("h3",{className:"font-bold text-azure-text-secondary dark:text-matrix-secondary mb-2 sticky top-0 bg-azure-surface dark:bg-zinc-950",children:"LOG FILES"}),e?.map(u=>v.jsxs("button",{onClick:()=>n(u.name),className:`text-left px-3 py-2 rounded text-sm truncate flex items-center gap-2 group transition-colors ${t===u.name?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"text-azure-text-secondary dark:text-matrix-secondary hover:bg-azure-hover dark:hover:bg-zinc-900 group-hover:text-azure-primary dark:group-hover:text-matrix-highlight"}`,children:[v.jsx(rj,{className:"w-4 h-4 shrink-0"}),v.jsxs("div",{className:"flex flex-col overflow-hidden",children:[v.jsx("span",{className:"truncate font-bold",children:u.name}),v.jsxs("span",{className:"text-xs opacity-70",children:[(u.size/1024).toFixed(1)," KB"]})]})]},u.name))]}),v.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden bg-azure-bg dark:bg-black border border-azure-border dark:border-matrix-primary/50 rounded",children:[v.jsxs("div",{className:"flex justify-between items-center p-2 bg-azure-hover dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary/50",children:[v.jsx("span",{className:"text-azure-text-primary dark:text-matrix-highlight font-bold font-mono text-sm",children:t}),v.jsx("button",{onClick:()=>o(),className:"text-azure-text-secondary dark:text-matrix-secondary hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",children:v.jsx(vj,{className:"w-4 h-4"})})]}),v.jsx("div",{className:"flex-1 overflow-auto p-4 font-mono text-xs whitespace-pre-wrap text-azure-text-primary dark:text-white",children:i?i.lines.join(`
|
|
109
|
-
`):"Select a log file to view content..."})]})]})]})}function T7(){const[e,t]=E.useState(null),[n,i]=E.useState([]),[o,u]=E.useState(!0),[l,f]=E.useState("");if(E.useEffect(()=>{async function p(){try{const[y,x]=await Promise.all([rp.fetchUsageStats(),rp.fetchGroupedUsageStats()]);t(y),i(x)}catch(y){f("Failed to load usage statistics"),console.error(y)}finally{u(!1)}}p()},[]),o)return v.jsx("div",{className:"flex items-center justify-center h-64 text-azure-accent dark:text-matrix-highlight font-mono animate-pulse",children:"LOADING_DATA_STREAM..."});if(l)return v.jsxs("div",{className:"p-4 bg-red-900/20 border border-red-500/50 text-red-500 font-mono rounded",children:["ERROR_ACCESSING_DATABASE: ",l]});const d={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},h={hidden:{y:20,opacity:0},show:{y:0,opacity:1}};return v.jsxs(Sr.div,{variants:d,initial:"hidden",animate:"show",className:"space-y-6",children:[v.jsx("div",{className:"flex items-center justify-between border-b border-azure-border dark:border-matrix-primary pb-4",children:v.jsxs("div",{children:[v.jsxs("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight font-mono flex items-center gap-2",children:[v.jsx(wm,{className:"w-6 h-6"}),"USAGE_ANALYTICS"]}),v.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1 font-mono text-sm",children:"Resource consumption tracking and metrics"})]})}),v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[v.jsxs(Sr.div,{variants:h,className:"p-6 bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg shadow-sm backdrop-blur-sm",children:[v.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[v.jsx(sl,{className:"w-5 h-5"}),v.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Input Tokens"})]}),v.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalInputTokens.toLocaleString()??0})]}),v.jsxs(Sr.div,{variants:h,className:"p-6 bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg shadow-sm backdrop-blur-sm",children:[v.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[v.jsx(ej,{className:"w-5 h-5"}),v.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Output Tokens"})]}),v.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalOutputTokens.toLocaleString()??0})]})]}),v.jsxs(Sr.div,{variants:h,className:"bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg overflow-hidden backdrop-blur-sm",children:[v.jsx("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary bg-azure-bg dark:bg-zinc-900/50",children:v.jsx("h3",{className:"text-lg font-bold text-azure-text-primary dark:text-matrix-highlight font-mono uppercase",children:"Usage Breakdown by Model"})}),v.jsx("div",{className:"overflow-x-auto",children:v.jsxs("table",{className:"w-full text-left font-mono text-sm",children:[v.jsx("thead",{className:"bg-azure-bg dark:bg-zinc-900/50 text-azure-text-secondary dark:text-matrix-secondary border-b border-azure-border dark:border-matrix-primary",children:v.jsxs("tr",{children:[v.jsx("th",{className:"p-4",children:"Provider"}),v.jsx("th",{className:"p-4",children:"Model"}),v.jsx("th",{className:"p-4 text-right",children:"Messages"}),v.jsx("th",{className:"p-4 text-right",children:"Input Tokens"}),v.jsx("th",{className:"p-4 text-right",children:"Output Tokens"}),v.jsx("th",{className:"p-4 text-right",children:"Total Tokens"})]})}),v.jsx("tbody",{className:"divide-y divide-azure-border dark:divide-matrix-primary/30",children:n.length===0?v.jsx("tr",{children:v.jsx("td",{colSpan:6,className:"p-8 text-center text-azure-text-muted dark:text-matrix-secondary italic",children:"NO_DATA_AVAILABLE"})}):n.map((p,y)=>v.jsxs("tr",{className:"hover:bg-azure-hover dark:hover:bg-matrix-primary/10 transition-colors",children:[v.jsx("td",{className:"p-4 font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.provider}),v.jsx("td",{className:"p-4 text-azure-text-secondary dark:text-matrix-secondary",children:p.model}),v.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.messageCount.toLocaleString()}),v.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalInputTokens.toLocaleString()}),v.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalOutputTokens.toLocaleString()}),v.jsx("td",{className:"p-4 text-right font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.totalTokens.toLocaleString()})]},`${p.provider}-${p.model}-${y}`))})]})})]})]})}const C7=()=>{const[e,t]=E.useState(""),[n,i]=E.useState(""),o=Ep(),u=dr(),l=f=>{f.preventDefault(),e&&(i(""),fetch("/api/config",{headers:{"x-architect-pass":e}}).then(async d=>{if(d.ok){localStorage.setItem("morpheus.auth.token",e);const h=u.state?.from?.pathname||"/";o(h,{replace:!0})}else i("Invalid architect password")}).catch(()=>{i("Connection failed")}))};return v.jsx("div",{className:"flex items-center justify-center min-h-screen bg-azure-bg dark:bg-black text-azure-primary dark:text-green-500 font-mono",children:v.jsxs("div",{className:"max-w-md w-full p-8 border border-azure-primary dark:border-green-500 shadow-xl dark:shadow-[0_0_15px_rgba(34,197,94,0.3)] bg-white dark:bg-black rounded-lg dark:rounded-none",children:[v.jsx("h1",{className:"text-2xl font-bold mb-6 text-center tracking-widest uppercase text-azure-primary dark:text-green-500",children:"> The Architect Login"}),v.jsxs("form",{onSubmit:l,className:"space-y-6",children:[v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm mb-2 opacity-70 text-azure-text-secondary dark:text-green-500",children:"ACCESS_PASS:"}),v.jsx("input",{type:"password",value:e,onChange:f=>t(f.target.value),className:"w-full bg-azure-bg dark:bg-black border border-azure-border dark:border-green-800 p-2 focus:outline-none focus:border-azure-primary dark:focus:border-green-500 text-azure-text-primary dark:text-green-500 placeholder-azure-text-secondary/50 dark:placeholder-green-900 rounded dark:rounded-none",placeholder:"••••••••",autoFocus:!0})]}),n&&v.jsxs("div",{className:"text-red-500 text-sm animate-pulse",children:["[!] ERROR: ",n]}),v.jsx("button",{type:"submit",className:"w-full bg-azure-primary hover:bg-azure-active dark:bg-green-900 dark:hover:bg-green-700 text-white dark:text-black font-bold py-2 transition-colors duration-200 uppercase tracking-wider rounded dark:rounded-none",children:"Authenticate"})]}),v.jsx("div",{className:"mt-8 text-[10px] opacity-30 text-center uppercase text-azure-text-secondary dark:text-green-500",children:"Morpheus OS v0.1.5 | Unauthorized access is logged."})]})})},A7=({children:e})=>{const{isAuthenticated:t}=Az(),n=dr();return t?v.jsx(v.Fragment,{children:e}):v.jsx(_k,{to:"/login",state:{from:n},replace:!0})},j7=({className:e,...t})=>v.jsx("div",{className:"relative w-full overflow-auto",children:v.jsx("table",{className:`w-full caption-bottom text-sm ${e}`,...t})}),N7=({...e})=>v.jsx("thead",{...e}),O7=({...e})=>v.jsx("tbody",{...e}),ym=({...e})=>v.jsx("tr",{className:"border-b border-azure-border dark:border-matrix-primary/30 transition-colors hover:bg-azure-hover/50 dark:hover:bg-matrix-primary/10",...e}),ho=({className:e,...t})=>v.jsx("th",{className:`h-12 px-4 text-left align-middle font-medium text-azure-text-secondary dark:text-matrix-secondary/70 [&:has([role=checkbox])]:pr-0 ${e}`,...t}),sa=({className:e,...t})=>v.jsx("td",{className:`p-4 align-middle [&:has([role=checkbox])]:pr-0 ${e}`,...t}),uk=({checked:e,onCheckedChange:t,className:n,...i})=>{const o=u=>{t&&t(u.target.checked),i.onChange&&i.onChange(u)};return v.jsx("input",{type:"checkbox",checked:e,onChange:o,className:`h-4 w-4 rounded border-azure-border dark:border-matrix-primary bg-azure-surface dark:bg-zinc-900 text-azure-primary dark:text-matrix-highlight focus:ring-azure-primary dark:focus:ring-matrix-highlight ${n||""}`,...i})},Uc=({className:e,variant:t="default",...n})=>{const o=`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-zinc-950 focus:ring-offset-2 dark:focus:ring-zinc-300 ${t==="destructive"?"border-transparent bg-red-500 text-zinc-50 dark:bg-red-900 dark:text-zinc-50":t==="secondary"?"border-transparent bg-azure-surface dark:bg-zinc-800 text-azure-text-secondary dark:text-matrix-secondary":t==="outline"?"text-azure-text-primary dark:text-matrix-secondary border-azure-border dark:border-matrix-primary":"border-transparent bg-azure-primary dark:bg-matrix-highlight text-azure-text-inverse dark:text-black"} ${e||""}`;return v.jsx("div",{className:o,...n})},xm=({className:e,...t})=>v.jsx("div",{className:`rounded-lg border border-azure-border dark:border-matrix-primary/30 bg-azure-surface dark:bg-zinc-900 text-azure-text-primary dark:text-matrix-secondary shadow-sm ${e||""}`,...t}),ck=({className:e,...t})=>v.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${e||""}`,...t}),R7=({className:e,...t})=>v.jsx("h3",{className:`text-2xl font-semibold leading-none tracking-tight ${e||""}`,...t}),vm=({className:e,...t})=>v.jsx("div",{className:`p-6 pt-0 ${e||""}`,...t}),M7=({className:e,variant:t="default",...n})=>{const o=`relative w-full rounded-lg border p-4 ${t==="destructive"?"border-red-500/50 text-red-700 dark:border-red-900/50 dark:text-red-300":"border-azure-border dark:border-matrix-primary"} ${e||""}`;return v.jsx("div",{className:o,...n})},D7=({className:e,...t})=>v.jsx("div",{className:`text-sm [&_p]:leading-relaxed ${e||""}`,...t}),jE=({isOpen:e,onClose:t,title:n,children:i,size:o="md"})=>{if(!e)return null;const u={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};return v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),v.jsxs("div",{className:`relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full ${u[o]} max-h-[90vh] overflow-hidden flex flex-col`,children:[n&&v.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-azure-border dark:border-matrix-primary",children:[n&&v.jsx("h3",{className:"text-lg font-semibold text-azure-text-primary dark:text-matrix-secondary",children:n}),t&&v.jsx("button",{onClick:t,className:"text-azure-text-secondary dark:text-matrix-tertiary hover:text-azure-text-primary dark:hover:text-matrix-secondary",children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:v.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),v.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:i})]})]})},$7=({isOpen:e,onClose:t,memory:n})=>n?v.jsx(jE,{isOpen:e,onClose:t,title:"Memory Details",size:"lg",children:v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Cj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Category"})]}),v.jsx("div",{children:v.jsx(Uc,{variant:"outline",children:n.category})}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Oj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Importance"})]}),v.jsx("div",{children:v.jsx(Uc,{variant:n.importance==="critical"?"destructive":n.importance==="high"?"default":n.importance==="medium"?"secondary":"outline",children:n.importance})}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Nk,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Created"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.created_at).toLocaleString()}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Ok,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Updated"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.updated_at).toLocaleString()}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Mk,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Access Count"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.access_count}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(aj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Hash"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary break-all text-sm",children:n.hash}),n.source&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(sj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Source"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.source})]})]}),v.jsxs("div",{children:[v.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Summary"}),v.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary bg-azure-surface dark:bg-zinc-800 p-3 rounded-md",children:n.summary})]}),n.details&&v.jsxs("div",{children:[v.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Details"}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary bg-azure-surface dark:bg-zinc-800 p-3 rounded-md whitespace-pre-wrap",children:n.details})]}),v.jsx("div",{className:"flex justify-end pt-4",children:v.jsx(Wn,{onClick:t,children:"Close"})})]})}):null,L7=({isOpen:e,onClose:t,onConfirm:n,title:i="Confirm Deletion",message:o="Are you sure you want to delete this item? This action cannot be undone.",confirmButtonText:u="Delete",cancelButtonText:l="Cancel"})=>v.jsx(jE,{isOpen:e,onClose:t,title:i,size:"md",children:v.jsxs("div",{className:"space-y-6",children:[v.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary",children:o}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(Wn,{variant:"outline",onClick:t,children:l}),v.jsx(Wn,{variant:"destructive",onClick:()=>{n(),t()},children:u})]})]})}),U7=()=>{const[e,t]=E.useState(!1),[n,i]=E.useState(null),o=E.useCallback(d=>(t(!0),i(null),Dt.get(d).then(h=>h).catch(h=>{throw i(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]),u=E.useCallback((d,h)=>(t(!0),i(null),Dt.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),l=E.useCallback((d,h)=>(t(!0),i(null),Dt.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),f=E.useCallback(d=>(t(!0),i(null),Dt.delete(d).then(h=>h).catch(h=>{throw i(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]);return{get:o,post:u,put:l,del:f,loading:e,error:n}},P7=()=>{const[e,t]=E.useState([]),[n,i]=E.useState(!0),[o,u]=E.useState([]),[l,f]=E.useState(""),[d,h]=E.useState("all"),[p,y]=E.useState("all"),[x,b]=E.useState(null),[_,z]=E.useState(!1),[C,j]=E.useState(null),[O,A]=E.useState(!1),[R,L]=E.useState(null),[$,G]=E.useState(!1),{get:V,del:K,post:ue}=U7();E.useEffect(()=>{re()},[]);const re=async()=>{try{i(!0);const T=await V("/sati/memories");t(T),b(null)}catch(T){b("Failed to load memories. Please try again."),console.error("Error fetching memories:",T)}finally{i(!1)}},oe=()=>{o.length===Z.length?u([]):u(Z.map(T=>T.id))},ke=T=>{o.includes(T)?u(o.filter(q=>q!==T)):u([...o,T])},le=async()=>{if(o.length!==0)try{await ue("/sati/memories/bulk-delete",{ids:o}),await re(),u([]),z(!1)}catch(T){b("Failed to delete memories. Please try again."),console.error("Error deleting memories:",T)}},ne=T=>{L(T),G(!0)},P=async()=>{if(R)try{await K(`/sati/memories/${R}`),await re()}catch(T){b("Failed to delete memory. Please try again."),console.error("Error deleting memory:",T)}finally{L(null),G(!1)}},Y=T=>{j(T),A(!0)},Z=e.filter(T=>{const q=T.summary.toLowerCase().includes(l.toLowerCase())||T.details?.toLowerCase().includes(l.toLowerCase())||T.category.toLowerCase().includes(l.toLowerCase()),w=d==="all"||T.category===d,ie=p==="all"||T.importance===p;return q&&w&&ie&&!T.archived}),ce=Array.from(new Set(e.map(T=>T.category))),N=Array.from(new Set(e.map(T=>T.importance)));return n?v.jsx(xm,{className:"w-full",children:v.jsx(vm,{className:"flex justify-center items-center h-64",children:v.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-azure-primary dark:border-matrix-highlight"})})}):v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Sati Memories"}),v.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1",children:"View and manage your long-term memories stored by Sati"})]}),o.length>0&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("span",{className:"text-sm text-azure-text-muted dark:text-matrix-secondary",children:[o.length," selected"]}),v.jsxs(Wn,{variant:"destructive",size:"sm",onClick:()=>z(!0),disabled:o.length===0,children:[v.jsx(zm,{className:"w-4 h-4 mr-1"}),"Delete Selected"]})]})]}),x&&v.jsx(M7,{variant:"destructive",children:v.jsx(D7,{children:x})}),v.jsxs(xm,{children:[v.jsx(ck,{className:"border-b border-azure-border dark:border-matrix-primary",children:v.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[v.jsxs("div",{className:"flex flex-col relative w-full",children:[v.jsx(kj,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-azure-text-secondary dark:text-matrix-secondary w-4 h-4"}),v.jsx("input",{type:"text",placeholder:"Search memories...",value:l,onChange:T=>f(T.target.value),className:"w-full pl-10 pr-4 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]}),v.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[v.jsxs("select",{value:d,onChange:T=>h(T.target.value),className:"px-3 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight flex-grow",children:[v.jsx("option",{value:"all",children:"All Categories"}),ce.map(T=>v.jsx("option",{value:T,children:T},T))]}),v.jsxs("select",{value:p,onChange:T=>y(T.target.value),className:"px-3 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight flex-grow",children:[v.jsx("option",{value:"all",children:"All Importance"}),N.map(T=>v.jsx("option",{value:T,children:T},T))]})]})]})}),v.jsx(vm,{className:"p-0",children:v.jsxs(j7,{children:[v.jsx(N7,{children:v.jsxs(ym,{className:"hover:bg-transparent",children:[v.jsx(ho,{className:"w-12",children:v.jsx(uk,{checked:Z.length>0&&o.length===Z.length,onCheckedChange:oe})}),v.jsx(ho,{children:"Summary"}),v.jsx(ho,{children:"Category"}),v.jsx(ho,{children:"Importance"}),v.jsx(ho,{children:"Created"}),v.jsx(ho,{className:"w-32",children:"Actions"})]})}),v.jsx(O7,{children:Z.length===0?v.jsx(ym,{children:v.jsx(sa,{colSpan:6,className:"text-center py-8 text-azure-text-secondary dark:text-matrix-secondary",children:n?"Loading memories...":"No memories found"})}):Z.map(T=>v.jsxs(ym,{children:[v.jsx(sa,{children:v.jsx(uk,{checked:o.includes(T.id),onCheckedChange:()=>ke(T.id)})}),v.jsx(sa,{className:"font-medium max-w-xs truncate",children:T.summary}),v.jsx(sa,{children:v.jsx(Uc,{variant:"outline",children:T.category})}),v.jsx(sa,{children:v.jsx(Uc,{variant:T.importance==="critical"?"destructive":T.importance==="high"?"default":T.importance==="medium"?"secondary":"outline",children:T.importance})}),v.jsx(sa,{children:v.jsxs("div",{className:"flex items-center gap-1 text-azure-text-secondary dark:text-matrix-secondary",children:[v.jsx(Nk,{className:"w-4 h-4"}),new Date(T.created_at).toLocaleDateString()]})}),v.jsx(sa,{children:v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Wn,{variant:"ghost",size:"sm",onClick:()=>Y(T),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",children:v.jsx(Mk,{className:"w-4 h-4"})}),v.jsx(Wn,{variant:"ghost",size:"sm",onClick:()=>ne(T.id),className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",children:v.jsx(zm,{className:"w-4 h-4"})})]})})]},T.id))})]})})]}),_&&v.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:v.jsxs(xm,{className:"w-full max-w-md mx-4",children:[v.jsx(ck,{children:v.jsx(R7,{children:"Delete Memories"})}),v.jsxs(vm,{children:[v.jsxs("p",{className:"mb-4",children:["Are you sure you want to delete ",o.length," ","memory(ies)? This action cannot be undone."]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(Wn,{variant:"outline",onClick:()=>z(!1),children:"Cancel"}),v.jsx(Wn,{variant:"destructive",onClick:le,children:"Delete"})]})]})]})}),v.jsx($7,{isOpen:O,onClose:()=>A(!1),memory:C}),v.jsx(L7,{isOpen:$,onClose:()=>G(!1),onConfirm:P,title:"Confirm Memory Deletion",message:"Are you sure you want to delete this memory? This action cannot be undone.",confirmButtonText:"Delete Memory",cancelButtonText:"Cancel"})]})},la=da.getInstance(),ua={fetchServers:async()=>la.get("/mcp/servers"),addServer:async(e,t)=>la.post("/mcp/servers",{name:e,config:t}),updateServer:async(e,t)=>la.put(`/mcp/servers/${encodeURIComponent(e)}`,{config:t}),deleteServer:async e=>la.delete(`/mcp/servers/${encodeURIComponent(e)}`),toggleServer:async(e,t)=>la.patch(`/mcp/servers/${encodeURIComponent(e)}/toggle`,{enabled:t}),reloadTools:async()=>la.post("/mcp/reload",{}),fetchStatus:async()=>la.get("/mcp/status")},V7=({label:e,values:t,onChange:n,placeholder:i})=>{const o=t.length>0?t:[""],u=(d,h)=>{const p=[...o];p[d]=h,n(p.filter(y=>y.trim().length>0))},l=()=>n([...o,""]),f=d=>{const h=o.filter((p,y)=>y!==d);n(h.filter(p=>p.trim().length>0))};return v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),o.map((d,h)=>v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{className:"flex-1 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:d,placeholder:i,onChange:p=>u(h,p.target.value)}),v.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>f(h),children:"Remove"})]},`${e}-${h}`)),v.jsx("button",{type:"button",className:"text-sm font-semibold text-azure-primary hover:text-azure-secondary dark:text-matrix-highlight hover:dark:text-matrix-secondary",onClick:l,children:"Add argument"})]})},fk=({label:e,values:t,onChange:n,keyPlaceholder:i,valuePlaceholder:o})=>{const u=E.useMemo(()=>t.length>0?t:[{key:"",value:""}],[t]),l=(h,p,y)=>{const x=[...u];x[h]={...x[h],[p]:y},n(x.filter(b=>b.key.trim().length>0||b.value.trim().length>0))},f=()=>n([...u,{key:"",value:""}]),d=h=>{const p=u.filter((y,x)=>x!==h);n(p.filter(y=>y.key.trim().length>0||y.value.trim().length>0))};return v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),u.map((h,p)=>v.jsxs("div",{className:"grid gap-2 md:grid-cols-5",children:[v.jsx("input",{className:"col-span-2 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:h.key,placeholder:i,onChange:y=>l(p,"key",y.target.value)}),v.jsx("input",{className:"col-span-2 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:h.value,placeholder:o,onChange:y=>l(p,"value",y.target.value)}),v.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>d(p),children:"Remove"})]},`${e}-${p}`)),v.jsx("button",{type:"button",className:"text-sm font-semibold text-azure-primary hover:text-azure-secondary dark:text-matrix-highlight hover:dark:text-matrix-secondary",onClick:f,children:"Add entry"})]})},Z7=({transport:e,command:t,url:n,args:i,env:o,headers:u,onCommandChange:l,onUrlChange:f,onArgsChange:d,onEnvChange:h,onHeadersChange:p})=>v.jsxs("div",{className:"space-y-4",children:[e==="stdio"&&v.jsxs(v.Fragment,{children:[v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Command",v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:t,onChange:y=>l(y.target.value),placeholder:"npx"})]}),v.jsx(V7,{label:"Arguments",values:i,onChange:d,placeholder:"--flag"})]}),e==="http"&&v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["URL",v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:n,onChange:y=>f(y.target.value),placeholder:"https://example.com/mcp"})]}),v.jsx(fk,{label:"Environment Variables",values:o,onChange:h,keyPlaceholder:"KEY",valuePlaceholder:"value"}),e==="http"&&v.jsx(fk,{label:"Headers",values:u,onChange:p,keyPlaceholder:"Header",valuePlaceholder:"value"})]}),B7=e7({name:gm().min(1,"Name is required"),transport:TE([ak("stdio"),ak("http")]),command:gm().optional(),url:gm().optional()}),fc=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],bm=e=>e.reduce((t,n)=>(n.key.trim().length===0||(t[n.key]=n.value),t),{}),I7=({open:e,mode:t,initial:n,onClose:i,onSubmit:o})=>{const[u,l]=E.useState(n?.name??""),[f,d]=E.useState(n?.config.transport??"stdio"),[h,p]=E.useState(n?.config.transport==="stdio"?n.config.command:""),[y,x]=E.useState(n?.config.transport==="http"?n.config.url:""),[b,_]=E.useState(n?.config.args??[]),[z,C]=E.useState(fc(n?.config.env)),[j,O]=E.useState(n?.config.transport==="http"?fc(n.config.headers):[]),[A,R]=E.useState(null);E.useEffect(()=>{e&&(l(n?.name??""),d(n?.config.transport??"stdio"),p(n?.config.transport==="stdio"?n.config.command:""),x(n?.config.transport==="http"?n.config.url:""),_(n?.config.args??[]),C(fc(n?.config.env)),O(n?.config.transport==="http"?fc(n.config.headers):[]),R(null))},[e,n]);const L=t==="create",$=async()=>{const V=B7.safeParse({name:u,transport:f,command:h,url:y});if(!V.success){R(V.error.issues[0]?.message??"Invalid form");return}if(f==="stdio"&&(!h||h.trim().length===0)){R("Command is required for stdio transport.");return}if(f==="http"&&(!y||y.trim().length===0)){R("URL is required for http transport.");return}const K=f==="stdio"?{transport:"stdio",command:h.trim(),args:b.length>0?b:void 0,env:z.length>0?bm(z):void 0}:{transport:"http",url:y.trim(),headers:j.length>0?bm(j):void 0,env:z.length>0?bm(z):void 0};R(null),await o(u.trim(),K)},G=E.useMemo(()=>t==="create"?"Add MCP Server":"Edit MCP Server",[t]);return v.jsx(qc,{open:e,onOpenChange:i,children:v.jsxs(Gc,{children:[v.jsx(Yc,{children:v.jsx(Xc,{children:G})}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Name",v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none disabled:bg-azure-border dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight dark:disabled:bg-matrix-primary/50",value:u,onChange:V=>l(V.target.value),placeholder:"coolify",disabled:!L})]}),v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Transport",v.jsxs("select",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:f,onChange:V=>d(V.target.value),children:[v.jsx("option",{value:"stdio",children:"stdio"}),v.jsx("option",{value:"http",children:"http"})]})]}),v.jsx(Z7,{transport:f,command:h,url:y,args:b,env:z,headers:j,onCommandChange:p,onUrlChange:x,onArgsChange:_,onEnvChange:C,onHeadersChange:O}),A&&v.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-red-900 dark:bg-red-950/50 dark:text-red-400",children:A}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-4 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:i,children:"Cancel"}),v.jsx("button",{type:"button",className:"rounded-md bg-azure-primary px-4 py-2 text-sm font-semibold text-white shadow hover:bg-azure-secondary dark:bg-matrix-highlight dark:text-matrix-bg hover:dark:bg-matrix-secondary",onClick:$,children:"Save"})]})]})]})})},H7=({server:e,probeResult:t,onEdit:n,onDelete:i,onToggle:o})=>v.jsxs("div",{className:"rounded-2xl border border-azure-border bg-azure-surface/80 p-4 shadow-sm overflow-hidden dark:border-matrix-primary dark:bg-zinc-950/70",children:[v.jsxs("div",{className:"flex items-start justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"text-lg font-semibold text-azure-text-primary break-words dark:text-matrix-highlight",children:e.name}),v.jsx("div",{className:"text-xs uppercase tracking-wide text-azure-text-muted dark:text-matrix-secondary",children:e.config.transport})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[t&&v.jsx("span",{title:t.ok?`${t.toolCount} tools`:t.error,className:`rounded-full px-2 py-0.5 text-xs font-semibold ${t.ok?"bg-green-500/20 text-green-600 dark:bg-green-400/20 dark:text-green-400":"bg-red-500/20 text-red-600 dark:bg-red-400/20 dark:text-red-400"}`,children:t.ok?`✓ ${t.toolCount} tools`:"✗ Failed"}),v.jsx("button",{type:"button",className:`rounded-full px-3 py-1 text-xs font-semibold ${e.enabled?"bg-matrix-highlight dark:text-matrix-primary":"bg-azure-border text-azure-text-secondary dark:bg-matrix-primary/50 dark:text-matrix-secondary"}`,onClick:()=>o(e,!e.enabled),children:e.enabled?"Enabled":"Disabled"})]})]}),v.jsxs("div",{className:"mt-4 space-y-2 text-sm text-azure-text-secondary dark:text-matrix-secondary",children:[e.config.transport==="stdio"&&v.jsxs("div",{className:"break-all",children:[v.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Command:"})," ",e.config.command]}),e.config.transport==="http"&&v.jsxs("div",{className:"break-all",children:[v.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"URL:"})," ",e.config.url]}),e.config.args&&e.config.args.length>0&&v.jsxs("div",{className:"break-all",children:[v.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Args:"})," ",e.config.args.join(" ")]}),t&&!t.ok&&t.error&&v.jsx("div",{className:"mt-1 break-all rounded border border-red-300 bg-red-50 px-2 py-1 text-xs text-red-600 dark:border-red-900 dark:bg-red-950/30 dark:text-red-400",children:t.error.length>120?t.error.slice(0,120)+"…":t.error})]}),v.jsxs("div",{className:"mt-4 flex gap-2",children:[v.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-3 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:()=>n(e),children:"Edit"}),v.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>i(e),children:"Delete"})]})]}),F7=()=>{const{data:e,error:t,mutate:n,isLoading:i}=ya("/api/mcp/servers",()=>ua.fetchServers()),[o,u]=E.useState(""),[l,f]=E.useState("all"),[d,h]=E.useState(!1),[p,y]=E.useState(null),[x,b]=E.useState(!1),[_,z]=E.useState(null),[C,j]=E.useState(null),[O,A]=E.useState({}),[R,L]=E.useState(!1),[$,G]=E.useState(!1),V=e?.servers??[],K=E.useMemo(()=>V.filter(Z=>{const ce=Z.name.toLowerCase().includes(o.toLowerCase()),N=l==="all"||Z.config.transport===l;return ce&&N}),[V,o,l]),ue=()=>{y(null),h(!0)},re=Z=>{y(Z),h(!0)},oe=async(Z,ce)=>{try{p?await ua.updateServer(p.name,ce):await ua.addServer(Z,ce),h(!1),y(null),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(N){j({type:"error",message:N.message||"Failed to save MCP server."})}},ke=async Z=>{z(Z),b(!0)},le=async()=>{if(_)try{await ua.deleteServer(_.name),await n(),b(!1),z(null),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(Z){j({type:"error",message:Z.message||"Failed to delete MCP server."})}},ne=async()=>{L(!0);try{const Z=await ua.fetchStatus(),ce={};for(const N of Z.servers)ce[N.name]=N;A(ce)}catch(Z){j({type:"error",message:Z.message||"Failed to check MCP status."})}finally{L(!1)}},P=async()=>{G(!0);try{await ua.reloadTools(),j({type:"success",message:"MCP tools reloaded successfully."})}catch(Z){j({type:"error",message:Z.message||"Failed to reload MCP tools."})}finally{G(!1)}},Y=async(Z,ce)=>{try{await ua.toggleServer(Z.name,ce),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(N){j({type:"error",message:N.message||"Failed to toggle MCP server."})}};return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-semibold text-azure-primary dark:text-matrix-highlight",children:"MCP Servers"}),v.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Manage MCP servers stored in mcps.json."})]}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx("button",{type:"button",disabled:R,className:"rounded-md border border-azure-border px-4 py-2 text-sm font-semibold text-azure-text-primary shadow hover:border-azure-primary hover:text-azure-primary disabled:opacity-50 dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:ne,children:R?"Checking…":"Check Status"}),v.jsx("button",{type:"button",disabled:$,className:"rounded-md border border-azure-border px-4 py-2 text-sm font-semibold text-azure-text-primary shadow hover:border-azure-primary hover:text-azure-primary disabled:opacity-50 dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:P,children:$?"Reloading…":"Reload MCPs"}),v.jsx("button",{type:"button",className:"rounded-md bg-azure-primary px-4 py-2 text-sm font-semibold text-white shadow hover:bg-azure-secondary dark:bg-matrix-highlight dark:text-matrix-bg hover:dark:bg-matrix-secondary",onClick:ue,children:"Add Server"})]})]}),C&&v.jsx("div",{className:`p-4 rounded border ${C.type==="success"?"border-azure-primary text-azure-primary bg-azure-primary/10 dark:border-matrix-highlight dark:text-matrix-highlight dark:bg-matrix-highlight/10":"border-red-500 text-red-500 bg-red-900/10"}`,children:C.message}),v.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center",children:[v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:o,onChange:Z=>u(Z.target.value),placeholder:"Search by name"}),v.jsxs("select",{className:"rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:l,onChange:Z=>f(Z.target.value),children:[v.jsx("option",{value:"all",children:"All"}),v.jsx("option",{value:"stdio",children:"stdio"}),v.jsx("option",{value:"http",children:"http"})]})]}),i&&v.jsx("div",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Loading MCP servers..."}),t&&v.jsx("div",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to load MCP servers."}),!i&&K.length===0&&v.jsx("div",{className:"rounded-2xl border border-dashed border-azure-border bg-azure-surface/60 p-6 text-center text-sm text-azure-text-secondary dark:border-matrix-primary dark:bg-zinc-950/60 dark:text-matrix-secondary",children:"No MCP servers found. Add a server to get started."}),v.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:K.map(Z=>v.jsx(H7,{server:Z,probeResult:O[Z.name],onEdit:re,onDelete:ke,onToggle:Y},`${Z.name}-${Z.enabled?"on":"off"}`))}),v.jsx(I7,{open:d,mode:p?"edit":"create",initial:p??void 0,onClose:()=>h(!1),onSubmit:oe}),v.jsx(qc,{open:x,onOpenChange:b,children:v.jsxs(Gc,{children:[v.jsx(Yc,{children:v.jsx(Xc,{children:"Confirm Deletion"})}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:["Are you sure you want to delete the MCP server ",v.jsxs("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:['"',_?.name,'"']}),"? This action cannot be undone."]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-4 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:()=>b(!1),children:"Cancel"}),v.jsx("button",{type:"button",className:"rounded-md bg-red-500 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-red-400 dark:bg-red-600 hover:dark:bg-red-500",onClick:le,children:"Delete"})]})]})]})})]})};function q7(){return v.jsx(bA,{children:v.jsxs(Jb,{children:[v.jsx(ur,{path:"/login",element:v.jsx(C7,{})}),v.jsx(ur,{path:"/*",element:v.jsx(A7,{children:v.jsx(nD,{children:v.jsxs(Jb,{children:[v.jsx(ur,{path:"/",element:v.jsx(aD,{})}),v.jsx(ur,{path:"/chat",element:v.jsx(j6,{})}),v.jsx(ur,{path:"/zaion",element:v.jsx(_7,{})}),v.jsx(ur,{path:"/logs",element:v.jsx(E7,{})}),v.jsx(ur,{path:"/stats",element:v.jsx(T7,{})}),v.jsx(ur,{path:"/sati-memories",element:v.jsx(P7,{})}),v.jsx(ur,{path:"/mcp-servers",element:v.jsx(F7,{})}),v.jsx(ur,{path:"*",element:v.jsx(_k,{to:"/",replace:!0})})]})})})})]})})}eC.createRoot(document.getElementById("root")).render(v.jsx(E.StrictMode,{children:v.jsx(q7,{})}));
|