morpheus-cli 0.1.4 → 0.1.6

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.
Files changed (40) hide show
  1. package/README.md +266 -211
  2. package/bin/morpheus.js +30 -0
  3. package/dist/channels/telegram.js +11 -3
  4. package/dist/cli/commands/config.js +18 -3
  5. package/dist/cli/commands/init.js +3 -3
  6. package/dist/cli/index.js +4 -0
  7. package/dist/config/mcp-loader.js +42 -0
  8. package/dist/config/schemas.js +16 -0
  9. package/dist/http/__tests__/auth.test.js +53 -0
  10. package/dist/http/api.js +12 -0
  11. package/dist/http/middleware/auth.js +23 -0
  12. package/dist/http/server.js +2 -1
  13. package/dist/runtime/__tests__/agent.test.js +8 -4
  14. package/dist/runtime/__tests__/agent_memory_limit.test.js +61 -0
  15. package/dist/runtime/__tests__/agent_persistence.test.js +1 -1
  16. package/dist/runtime/__tests__/manual_start_verify.js +4 -0
  17. package/dist/runtime/agent.js +84 -9
  18. package/dist/runtime/audio-agent.js +11 -1
  19. package/dist/runtime/display.js +12 -0
  20. package/dist/runtime/memory/sqlite.js +142 -9
  21. package/dist/runtime/providers/factory.js +50 -6
  22. package/dist/runtime/scaffold.js +5 -0
  23. package/dist/runtime/tools/__tests__/factory.test.js +42 -0
  24. package/dist/runtime/tools/__tests__/tools.test.js +127 -0
  25. package/dist/runtime/tools/analytics-tools.js +73 -0
  26. package/dist/runtime/tools/config-tools.js +70 -0
  27. package/dist/runtime/tools/diagnostic-tools.js +124 -0
  28. package/dist/runtime/tools/factory.js +78 -0
  29. package/dist/runtime/tools/index.js +4 -0
  30. package/dist/types/auth.js +4 -0
  31. package/dist/types/config.js +4 -0
  32. package/dist/types/mcp.js +11 -0
  33. package/dist/types/tools.js +2 -0
  34. package/dist/types/usage.js +1 -0
  35. package/dist/ui/assets/index-4kQpg2wK.js +50 -0
  36. package/dist/ui/assets/index-CwL7mn36.css +1 -0
  37. package/dist/ui/index.html +2 -2
  38. package/package.json +5 -2
  39. package/dist/ui/assets/index-Az60Fu0M.js +0 -50
  40. package/dist/ui/assets/index-nNle8n-Z.css +0 -1
@@ -0,0 +1,50 @@
1
+ (function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const f of l)if(f.type==="childList")for(const c of f.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const f={};return l.integrity&&(f.integrity=l.integrity),l.referrerPolicy&&(f.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?f.credentials="include":l.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(l){if(l.ep)return;l.ep=!0;const f=r(l);fetch(l.href,f)}})();function T_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Af={exports:{}},Ao={};var Zy;function __(){if(Zy)return Ao;Zy=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(o,l,f){var c=null;if(f!==void 0&&(c=""+f),l.key!==void 0&&(c=""+l.key),"key"in l){f={};for(var h in l)h!=="key"&&(f[h]=l[h])}else f=l;return l=f.ref,{$$typeof:e,type:o,key:c,ref:l!==void 0?l:null,props:f}}return Ao.Fragment=a,Ao.jsx=r,Ao.jsxs=r,Ao}var Hy;function E_(){return Hy||(Hy=1,Af.exports=__()),Af.exports}var R=E_(),zf={exports:{}},de={};var $y;function w_(){if($y)return de;$y=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function x(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,O={};function L(A,Z,K){this.props=A,this.context=Z,this.refs=O,this.updater=K||M}L.prototype.isReactComponent={},L.prototype.setState=function(A,Z){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,Z,"setState")},L.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function C(){}C.prototype=L.prototype;function k(A,Z,K){this.props=A,this.context=Z,this.refs=O,this.updater=K||M}var Q=k.prototype=new C;Q.constructor=k,T(Q,L.prototype),Q.isPureReactComponent=!0;var q=Array.isArray;function I(){}var F={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function W(A,Z,K){var J=K.ref;return{$$typeof:e,type:A,key:Z,ref:J!==void 0?J:null,props:K}}function xe(A,Z){return W(A.type,Z,A.props)}function Ae(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function Ce(A){var Z={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(K){return Z[K]})}var ot=/\/+/g;function je(A,Z){return typeof A=="object"&&A!==null&&A.key!=null?Ce(""+A.key):Z.toString(36)}function ke(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(I,I):(A.status="pending",A.then(function(Z){A.status==="pending"&&(A.status="fulfilled",A.value=Z)},function(Z){A.status==="pending"&&(A.status="rejected",A.reason=Z)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function U(A,Z,K,J,le){var fe=typeof A;(fe==="undefined"||fe==="boolean")&&(A=null);var re=!1;if(A===null)re=!0;else switch(fe){case"bigint":case"string":case"number":re=!0;break;case"object":switch(A.$$typeof){case e:case a:re=!0;break;case y:return re=A._init,U(re(A._payload),Z,K,J,le)}}if(re)return le=le(A),re=J===""?"."+je(A,0):J,q(le)?(K="",re!=null&&(K=re.replace(ot,"$&/")+"/"),U(le,Z,K,"",function(Pt){return Pt})):le!=null&&(Ae(le)&&(le=xe(le,K+(le.key==null||A&&A.key===le.key?"":(""+le.key).replace(ot,"$&/")+"/")+re)),Z.push(le)),1;re=0;var st=J===""?".":J+":";if(q(A))for(var Re=0;Re<A.length;Re++)J=A[Re],fe=st+je(J,Re),re+=U(J,Z,K,fe,le);else if(Re=x(A),typeof Re=="function")for(A=Re.call(A),Re=0;!(J=A.next()).done;)J=J.value,fe=st+je(J,Re++),re+=U(J,Z,K,fe,le);else if(fe==="object"){if(typeof A.then=="function")return U(ke(A),Z,K,J,le);throw Z=String(A),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return re}function X(A,Z,K){if(A==null)return A;var J=[],le=0;return U(A,J,"","",function(fe){return Z.call(K,fe,le++)}),J}function Y(A){if(A._status===-1){var Z=A._result;Z=Z(),Z.then(function(K){(A._status===0||A._status===-1)&&(A._status=1,A._result=K)},function(K){(A._status===0||A._status===-1)&&(A._status=2,A._result=K)}),A._status===-1&&(A._status=0,A._result=Z)}if(A._status===1)return A._result.default;throw A._result}var ce=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},pe={map:X,forEach:function(A,Z,K){X(A,function(){Z.apply(this,arguments)},K)},count:function(A){var Z=0;return X(A,function(){Z++}),Z},toArray:function(A){return X(A,function(Z){return Z})||[]},only:function(A){if(!Ae(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return de.Activity=v,de.Children=pe,de.Component=L,de.Fragment=r,de.Profiler=l,de.PureComponent=k,de.StrictMode=o,de.Suspense=m,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,de.__COMPILER_RUNTIME={__proto__:null,c:function(A){return F.H.useMemoCache(A)}},de.cache=function(A){return function(){return A.apply(null,arguments)}},de.cacheSignal=function(){return null},de.cloneElement=function(A,Z,K){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var J=T({},A.props),le=A.key;if(Z!=null)for(fe in Z.key!==void 0&&(le=""+Z.key),Z)!P.call(Z,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Z.ref===void 0||(J[fe]=Z[fe]);var fe=arguments.length-2;if(fe===1)J.children=K;else if(1<fe){for(var re=Array(fe),st=0;st<fe;st++)re[st]=arguments[st+2];J.children=re}return W(A.type,le,J)},de.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:f,_context:A},A},de.createElement=function(A,Z,K){var J,le={},fe=null;if(Z!=null)for(J in Z.key!==void 0&&(fe=""+Z.key),Z)P.call(Z,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(le[J]=Z[J]);var re=arguments.length-2;if(re===1)le.children=K;else if(1<re){for(var st=Array(re),Re=0;Re<re;Re++)st[Re]=arguments[Re+2];le.children=st}if(A&&A.defaultProps)for(J in re=A.defaultProps,re)le[J]===void 0&&(le[J]=re[J]);return W(A,fe,le)},de.createRef=function(){return{current:null}},de.forwardRef=function(A){return{$$typeof:h,render:A}},de.isValidElement=Ae,de.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:Y}},de.memo=function(A,Z){return{$$typeof:p,type:A,compare:Z===void 0?null:Z}},de.startTransition=function(A){var Z=F.T,K={};F.T=K;try{var J=A(),le=F.S;le!==null&&le(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(I,ce)}catch(fe){ce(fe)}finally{Z!==null&&K.types!==null&&(Z.types=K.types),F.T=Z}},de.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},de.use=function(A){return F.H.use(A)},de.useActionState=function(A,Z,K){return F.H.useActionState(A,Z,K)},de.useCallback=function(A,Z){return F.H.useCallback(A,Z)},de.useContext=function(A){return F.H.useContext(A)},de.useDebugValue=function(){},de.useDeferredValue=function(A,Z){return F.H.useDeferredValue(A,Z)},de.useEffect=function(A,Z){return F.H.useEffect(A,Z)},de.useEffectEvent=function(A){return F.H.useEffectEvent(A)},de.useId=function(){return F.H.useId()},de.useImperativeHandle=function(A,Z,K){return F.H.useImperativeHandle(A,Z,K)},de.useInsertionEffect=function(A,Z){return F.H.useInsertionEffect(A,Z)},de.useLayoutEffect=function(A,Z){return F.H.useLayoutEffect(A,Z)},de.useMemo=function(A,Z){return F.H.useMemo(A,Z)},de.useOptimistic=function(A,Z){return F.H.useOptimistic(A,Z)},de.useReducer=function(A,Z,K){return F.H.useReducer(A,Z,K)},de.useRef=function(A){return F.H.useRef(A)},de.useState=function(A){return F.H.useState(A)},de.useSyncExternalStore=function(A,Z,K){return F.H.useSyncExternalStore(A,Z,K)},de.useTransition=function(){return F.H.useTransition()},de.version="19.2.4",de}var Gy;function tu(){return Gy||(Gy=1,zf.exports=w_()),zf.exports}var w=tu();const Xd=T_(w);var Cf={exports:{}},zo={},Rf={exports:{}},Mf={};var qy;function A_(){return qy||(qy=1,(function(e){function a(U,X){var Y=U.length;U.push(X);e:for(;0<Y;){var ce=Y-1>>>1,pe=U[ce];if(0<l(pe,X))U[ce]=X,U[Y]=pe,Y=ce;else break e}}function r(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var X=U[0],Y=U.pop();if(Y!==X){U[0]=Y;e:for(var ce=0,pe=U.length,A=pe>>>1;ce<A;){var Z=2*(ce+1)-1,K=U[Z],J=Z+1,le=U[J];if(0>l(K,Y))J<pe&&0>l(le,K)?(U[ce]=le,U[J]=Y,ce=J):(U[ce]=K,U[Z]=Y,ce=Z);else if(J<pe&&0>l(le,Y))U[ce]=le,U[J]=Y,ce=J;else break e}}return X}function l(U,X){var Y=U.sortIndex-X.sortIndex;return Y!==0?Y:U.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;e.unstable_now=function(){return f.now()}}else{var c=Date,h=c.now();e.unstable_now=function(){return c.now()-h}}var m=[],p=[],y=1,v=null,S=3,x=!1,M=!1,T=!1,O=!1,L=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function Q(U){for(var X=r(p);X!==null;){if(X.callback===null)o(p);else if(X.startTime<=U)o(p),X.sortIndex=X.expirationTime,a(m,X);else break;X=r(p)}}function q(U){if(T=!1,Q(U),!M)if(r(m)!==null)M=!0,I||(I=!0,Ce());else{var X=r(p);X!==null&&ke(q,X.startTime-U)}}var I=!1,F=-1,P=5,W=-1;function xe(){return O?!0:!(e.unstable_now()-W<P)}function Ae(){if(O=!1,I){var U=e.unstable_now();W=U;var X=!0;try{e:{M=!1,T&&(T=!1,C(F),F=-1),x=!0;var Y=S;try{t:{for(Q(U),v=r(m);v!==null&&!(v.expirationTime>U&&xe());){var ce=v.callback;if(typeof ce=="function"){v.callback=null,S=v.priorityLevel;var pe=ce(v.expirationTime<=U);if(U=e.unstable_now(),typeof pe=="function"){v.callback=pe,Q(U),X=!0;break t}v===r(m)&&o(m),Q(U)}else o(m);v=r(m)}if(v!==null)X=!0;else{var A=r(p);A!==null&&ke(q,A.startTime-U),X=!1}}break e}finally{v=null,S=Y,x=!1}X=void 0}}finally{X?Ce():I=!1}}}var Ce;if(typeof k=="function")Ce=function(){k(Ae)};else if(typeof MessageChannel<"u"){var ot=new MessageChannel,je=ot.port2;ot.port1.onmessage=Ae,Ce=function(){je.postMessage(null)}}else Ce=function(){L(Ae,0)};function ke(U,X){F=L(function(){U(e.unstable_now())},X)}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(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return S},e.unstable_next=function(U){switch(S){case 1:case 2:case 3:var X=3;break;default:X=S}var Y=S;S=X;try{return U()}finally{S=Y}},e.unstable_requestPaint=function(){O=!0},e.unstable_runWithPriority=function(U,X){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var Y=S;S=U;try{return X()}finally{S=Y}},e.unstable_scheduleCallback=function(U,X,Y){var ce=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?ce+Y:ce):Y=ce,U){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=Y+pe,U={id:y++,callback:X,priorityLevel:U,startTime:Y,expirationTime:pe,sortIndex:-1},Y>ce?(U.sortIndex=Y,a(p,U),r(m)===null&&U===r(p)&&(T?(C(F),F=-1):T=!0,ke(q,Y-ce))):(U.sortIndex=pe,a(m,U),M||x||(M=!0,I||(I=!0,Ce()))),U},e.unstable_shouldYield=xe,e.unstable_wrapCallback=function(U){var X=S;return function(){var Y=S;S=X;try{return U.apply(this,arguments)}finally{S=Y}}}})(Mf)),Mf}var Yy;function z_(){return Yy||(Yy=1,Rf.exports=A_()),Rf.exports}var Of={exports:{}},Rt={};var Py;function C_(){if(Py)return Rt;Py=1;var e=tu();function a(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function f(m,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:m,containerInfo:p,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Rt.createPortal=function(m,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return f(m,p,null,y)},Rt.flushSync=function(m){var p=c.T,y=o.p;try{if(c.T=null,o.p=2,m)return m()}finally{c.T=p,o.p=y,o.d.f()}},Rt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(m,p))},Rt.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},Rt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var y=p.as,v=h(y,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?o.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:x}):y==="script"&&o.d.X(m,{crossOrigin:v,integrity:S,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Rt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=h(p.as,p.crossOrigin);o.d.M(m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(m)},Rt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=h(y,p.crossOrigin);o.d.L(m,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Rt.preloadModule=function(m,p){if(typeof m=="string")if(p){var y=h(p.as,p.crossOrigin);o.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(m)},Rt.requestFormReset=function(m){o.d.r(m)},Rt.unstable_batchedUpdates=function(m,p){return m(p)},Rt.useFormState=function(m,p,y){return c.H.useFormState(m,p,y)},Rt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Rt.version="19.2.4",Rt}var Xy;function R_(){if(Xy)return Of.exports;Xy=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(a){console.error(a)}}return e(),Of.exports=C_(),Of.exports}var Ky;function M_(){if(Ky)return zo;Ky=1;var e=z_(),a=tu(),r=R_();function o(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){var n=t,i=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(i=n.return),t=n.return;while(t)}return n.tag===3?i:null}function c(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function h(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function m(t){if(f(t)!==t)throw Error(o(188))}function p(t){var n=t.alternate;if(!n){if(n=f(t),n===null)throw Error(o(188));return n!==t?null:t}for(var i=t,s=n;;){var u=i.return;if(u===null)break;var d=u.alternate;if(d===null){if(s=u.return,s!==null){i=s;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===i)return m(u),t;if(d===s)return m(u),n;d=d.sibling}throw Error(o(188))}if(i.return!==s.return)i=u,s=d;else{for(var g=!1,b=u.child;b;){if(b===i){g=!0,i=u,s=d;break}if(b===s){g=!0,s=u,i=d;break}b=b.sibling}if(!g){for(b=d.child;b;){if(b===i){g=!0,i=d,s=u;break}if(b===s){g=!0,s=d,i=u;break}b=b.sibling}if(!g)throw Error(o(189))}}if(i.alternate!==s)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:n}function y(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=y(t),n!==null)return n;t=t.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),k=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function Ce(t){return t===null||typeof t!="object"?null:(t=Ae&&t[Ae]||t["@@iterator"],typeof t=="function"?t:null)}var ot=Symbol.for("react.client.reference");function je(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ot?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case T:return"Fragment";case L:return"Profiler";case O:return"StrictMode";case q:return"Suspense";case I:return"SuspenseList";case W:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case M:return"Portal";case k:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case Q:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case F:return n=t.displayName||null,n!==null?n:je(t.type)||"Memo";case P:n=t._payload,t=t._init;try{return je(t(n))}catch{}}return null}var ke=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},ce=[],pe=-1;function A(t){return{current:t}}function Z(t){0>pe||(t.current=ce[pe],ce[pe]=null,pe--)}function K(t,n){pe++,ce[pe]=t.current,t.current=n}var J=A(null),le=A(null),fe=A(null),re=A(null);function st(t,n){switch(K(fe,n),K(le,t),K(J,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?uy(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=uy(n),t=cy(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Z(J),K(J,t)}function Re(){Z(J),Z(le),Z(fe)}function Pt(t){t.memoizedState!==null&&K(re,t);var n=J.current,i=cy(n,t.type);n!==i&&(K(le,t),K(J,i))}function zn(t){le.current===t&&(Z(J),Z(le)),re.current===t&&(Z(re),To._currentValue=Y)}var Cn,ca;function Rn(t){if(Cn===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);Cn=n&&n[1]||"",ca=-1<i.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Cn+t+ca}var rs=!1;function Me(t,n){if(!t||rs)return"";rs=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(V){var j=V}Reflect.construct(t,[],G)}else{try{G.call()}catch(V){j=V}t.call(G.prototype)}}else{try{throw Error()}catch(V){j=V}(G=t())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(V){if(V&&j&&typeof V.stack=="string")return[V.stack,j.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),g=d[0],b=d[1];if(g&&b){var _=g.split(`
4
+ `),N=b.split(`
5
+ `);for(u=s=0;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;for(;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;if(s===_.length||u===N.length)for(s=_.length-1,u=N.length-1;1<=s&&0<=u&&_[s]!==N[u];)u--;for(;1<=s&&0<=u;s--,u--)if(_[s]!==N[u]){if(s!==1||u!==1)do if(s--,u--,0>u||_[s]!==N[u]){var B=`
6
+ `+_[s].replace(" at new "," at ");return t.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",t.displayName)),B}while(1<=s&&0<=u);break}}}finally{rs=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?Rn(i):""}function qe(t,n){switch(t.tag){case 26:case 27:case 5:return Rn(t.type);case 16:return Rn("Lazy");case 13:return t.child!==n&&n!==null?Rn("Suspense Fallback"):Rn("Suspense");case 19:return Rn("SuspenseList");case 0:case 15:return Me(t.type,!1);case 11:return Me(t.type.render,!1);case 1:return Me(t.type,!0);case 31:return Rn("Activity");default:return""}}function Qe(t){try{var n="",i=null;do n+=qe(t,i),i=t,t=t.return;while(t);return n}catch(s){return`
7
+ Error generating stack: `+s.message+`
8
+ `+s.stack}}var Ze=Object.prototype.hasOwnProperty,Dt=e.unstable_scheduleCallback,Mn=e.unstable_cancelCallback,mt=e.unstable_shouldYield,St=e.unstable_requestPaint,Fe=e.unstable_now,os=e.unstable_getCurrentPriorityLevel,Mr=e.unstable_ImmediatePriority,Or=e.unstable_UserBlockingPriority,xt=e.unstable_NormalPriority,vn=e.unstable_LowPriority,Ti=e.unstable_IdlePriority,du=e.log,Dr=e.unstable_setDisableYieldValue,Nr=null,Xt=null;function fa(t){if(typeof du=="function"&&Dr(t),Xt&&typeof Xt.setStrictMode=="function")try{Xt.setStrictMode(Nr,t)}catch{}}var Kt=Math.clz32?Math.clz32:lx,ox=Math.log,sx=Math.LN2;function lx(t){return t>>>=0,t===0?32:31-(ox(t)/sx|0)|0}var ss=256,ls=262144,us=4194304;function Ka(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function cs(t,n,i){var s=t.pendingLanes;if(s===0)return 0;var u=0,d=t.suspendedLanes,g=t.pingedLanes;t=t.warmLanes;var b=s&134217727;return b!==0?(s=b&~d,s!==0?u=Ka(s):(g&=b,g!==0?u=Ka(g):i||(i=b&~t,i!==0&&(u=Ka(i))))):(b=s&~d,b!==0?u=Ka(b):g!==0?u=Ka(g):i||(i=s&~t,i!==0&&(u=Ka(i)))),u===0?0:n!==0&&n!==u&&(n&d)===0&&(d=u&-u,i=n&-n,d>=i||d===32&&(i&4194048)!==0)?n:u}function jr(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function ux(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 qh(){var t=us;return us<<=1,(us&62914560)===0&&(us=4194304),t}function hu(t){for(var n=[],i=0;31>i;i++)n.push(t);return n}function kr(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function cx(t,n,i,s,u,d){var g=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var b=t.entanglements,_=t.expirationTimes,N=t.hiddenUpdates;for(i=g&~i;0<i;){var B=31-Kt(i),G=1<<B;b[B]=0,_[B]=-1;var j=N[B];if(j!==null)for(N[B]=null,B=0;B<j.length;B++){var V=j[B];V!==null&&(V.lane&=-536870913)}i&=~G}s!==0&&Yh(t,s,0),d!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=d&~(g&~n))}function Yh(t,n,i){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-Kt(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|i&261930}function Ph(t,n){var i=t.entangledLanes|=n;for(t=t.entanglements;i;){var s=31-Kt(i),u=1<<s;u&n|t[s]&n&&(t[s]|=n),i&=~u}}function Xh(t,n){var i=n&-n;return i=(i&42)!==0?1:mu(i),(i&(t.suspendedLanes|n))!==0?0:i}function mu(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function pu(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Kh(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:Ny(t.type))}function Qh(t,n){var i=X.p;try{return X.p=t,n()}finally{X.p=i}}var da=Math.random().toString(36).slice(2),Tt="__reactFiber$"+da,Ut="__reactProps$"+da,_i="__reactContainer$"+da,gu="__reactEvents$"+da,fx="__reactListeners$"+da,dx="__reactHandles$"+da,Fh="__reactResources$"+da,Vr="__reactMarker$"+da;function yu(t){delete t[Tt],delete t[Ut],delete t[gu],delete t[fx],delete t[dx]}function Ei(t){var n=t[Tt];if(n)return n;for(var i=t.parentNode;i;){if(n=i[_i]||i[Tt]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(t=yy(t);t!==null;){if(i=t[Tt])return i;t=yy(t)}return n}t=i,i=t.parentNode}return null}function wi(t){if(t=t[Tt]||t[_i]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Lr(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(o(33))}function Ai(t){var n=t[Fh];return n||(n=t[Fh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function vt(t){t[Vr]=!0}var Jh=new Set,Ih={};function Qa(t,n){zi(t,n),zi(t+"Capture",n)}function zi(t,n){for(Ih[t]=n,t=0;t<n.length;t++)Jh.add(n[t])}var hx=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]*$"),Wh={},em={};function mx(t){return Ze.call(em,t)?!0:Ze.call(Wh,t)?!1:hx.test(t)?em[t]=!0:(Wh[t]=!0,!1)}function fs(t,n,i){if(mx(n))if(i===null)t.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+i)}}function ds(t,n,i){if(i===null)t.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+i)}}function Bn(t,n,i,s){if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(n,i,""+s)}}function an(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function tm(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function px(t,n,i){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,d=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return u.call(this)},set:function(g){i=""+g,d.call(this,g)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function vu(t){if(!t._valueTracker){var n=tm(t)?"checked":"value";t._valueTracker=px(t,n,""+t[n])}}function nm(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var i=n.getValue(),s="";return t&&(s=tm(t)?t.checked?"true":"false":t.value),t=s,t!==i?(n.setValue(t),!0):!1}function hs(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var gx=/[\n"\\]/g;function rn(t){return t.replace(gx,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function bu(t,n,i,s,u,d,g,b){t.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.type=g:t.removeAttribute("type"),n!=null?g==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+an(n)):t.value!==""+an(n)&&(t.value=""+an(n)):g!=="submit"&&g!=="reset"||t.removeAttribute("value"),n!=null?Su(t,g,an(n)):i!=null?Su(t,g,an(i)):s!=null&&t.removeAttribute("value"),u==null&&d!=null&&(t.defaultChecked=!!d),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.name=""+an(b):t.removeAttribute("name")}function am(t,n,i,s,u,d,g,b){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.type=d),n!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){vu(t);return}i=i!=null?""+an(i):"",n=n!=null?""+an(n):i,b||n===t.value||(t.value=n),t.defaultValue=n}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=b?t.checked:!!s,t.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.name=g),vu(t)}function Su(t,n,i){n==="number"&&hs(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function Ci(t,n,i,s){if(t=t.options,n){n={};for(var u=0;u<i.length;u++)n["$"+i[u]]=!0;for(i=0;i<t.length;i++)u=n.hasOwnProperty("$"+t[i].value),t[i].selected!==u&&(t[i].selected=u),u&&s&&(t[i].defaultSelected=!0)}else{for(i=""+an(i),n=null,u=0;u<t.length;u++){if(t[u].value===i){t[u].selected=!0,s&&(t[u].defaultSelected=!0);return}n!==null||t[u].disabled||(n=t[u])}n!==null&&(n.selected=!0)}}function im(t,n,i){if(n!=null&&(n=""+an(n),n!==t.value&&(t.value=n),i==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=i!=null?""+an(i):""}function rm(t,n,i,s){if(n==null){if(s!=null){if(i!=null)throw Error(o(92));if(ke(s)){if(1<s.length)throw Error(o(93));s=s[0]}i=s}i==null&&(i=""),n=i}i=an(n),t.defaultValue=i,s=t.textContent,s===i&&s!==""&&s!==null&&(t.value=s),vu(t)}function Ri(t,n){if(n){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=n;return}}t.textContent=n}var yx=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 om(t,n,i){var s=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,i):typeof i!="number"||i===0||yx.has(n)?n==="float"?t.cssFloat=i:t[n]=(""+i).trim():t[n]=i+"px"}function sm(t,n,i){if(n!=null&&typeof n!="object")throw Error(o(62));if(t=t.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var u in n)s=n[u],n.hasOwnProperty(u)&&i[u]!==s&&om(t,u,s)}else for(var d in n)n.hasOwnProperty(d)&&om(t,d,n[d])}function xu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 vx=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"]]),bx=/^[\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 ms(t){return bx.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Zn(){}var Tu=null;function _u(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Mi=null,Oi=null;function lm(t){var n=wi(t);if(n&&(t=n.stateNode)){var i=t[Ut]||null;e:switch(t=n.stateNode,n.type){case"input":if(bu(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+rn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var s=i[n];if(s!==t&&s.form===t.form){var u=s[Ut]||null;if(!u)throw Error(o(90));bu(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<i.length;n++)s=i[n],s.form===t.form&&nm(s)}break e;case"textarea":im(t,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Ci(t,!!i.multiple,n,!1)}}}var Eu=!1;function um(t,n,i){if(Eu)return t(n,i);Eu=!0;try{var s=t(n);return s}finally{if(Eu=!1,(Mi!==null||Oi!==null)&&(tl(),Mi&&(n=Mi,t=Oi,Oi=Mi=null,lm(n),t)))for(n=0;n<t.length;n++)lm(t[n])}}function Ur(t,n){var i=t.stateNode;if(i===null)return null;var s=i[Ut]||null;if(s===null)return null;i=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,n,typeof i));return i}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wu=!1;if(Hn)try{var Br={};Object.defineProperty(Br,"passive",{get:function(){wu=!0}}),window.addEventListener("test",Br,Br),window.removeEventListener("test",Br,Br)}catch{wu=!1}var ha=null,Au=null,ps=null;function cm(){if(ps)return ps;var t,n=Au,i=n.length,s,u="value"in ha?ha.value:ha.textContent,d=u.length;for(t=0;t<i&&n[t]===u[t];t++);var g=i-t;for(s=1;s<=g&&n[i-s]===u[d-s];s++);return ps=u.slice(t,1<s?1-s:void 0)}function gs(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function ys(){return!0}function fm(){return!1}function Bt(t){function n(i,s,u,d,g){this._reactName=i,this._targetInst=u,this.type=s,this.nativeEvent=d,this.target=g,this.currentTarget=null;for(var b in t)t.hasOwnProperty(b)&&(i=t[b],this[b]=i?i(d):d[b]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?ys:fm,this.isPropagationStopped=fm,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ys)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),n}var Fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vs=Bt(Fa),Zr=v({},Fa,{view:0,detail:0}),Sx=Bt(Zr),zu,Cu,Hr,bs=v({},Zr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Hr&&(Hr&&t.type==="mousemove"?(zu=t.screenX-Hr.screenX,Cu=t.screenY-Hr.screenY):Cu=zu=0,Hr=t),zu)},movementY:function(t){return"movementY"in t?t.movementY:Cu}}),dm=Bt(bs),xx=v({},bs,{dataTransfer:0}),Tx=Bt(xx),_x=v({},Zr,{relatedTarget:0}),Ru=Bt(_x),Ex=v({},Fa,{animationName:0,elapsedTime:0,pseudoElement:0}),wx=Bt(Ex),Ax=v({},Fa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),zx=Bt(Ax),Cx=v({},Fa,{data:0}),hm=Bt(Cx),Rx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mx={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"},Ox={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dx(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Ox[t])?!!n[t]:!1}function Mu(){return Dx}var Nx=v({},Zr,{key:function(t){if(t.key){var n=Rx[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=gs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Mx[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mu,charCode:function(t){return t.type==="keypress"?gs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?gs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),jx=Bt(Nx),kx=v({},bs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mm=Bt(kx),Vx=v({},Zr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mu}),Lx=Bt(Vx),Ux=v({},Fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bx=Bt(Ux),Zx=v({},bs,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Hx=Bt(Zx),$x=v({},Fa,{newState:0,oldState:0}),Gx=Bt($x),qx=[9,13,27,32],Ou=Hn&&"CompositionEvent"in window,$r=null;Hn&&"documentMode"in document&&($r=document.documentMode);var Yx=Hn&&"TextEvent"in window&&!$r,pm=Hn&&(!Ou||$r&&8<$r&&11>=$r),gm=" ",ym=!1;function vm(t,n){switch(t){case"keyup":return qx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Di=!1;function Px(t,n){switch(t){case"compositionend":return bm(n);case"keypress":return n.which!==32?null:(ym=!0,gm);case"textInput":return t=n.data,t===gm&&ym?null:t;default:return null}}function Xx(t,n){if(Di)return t==="compositionend"||!Ou&&vm(t,n)?(t=cm(),ps=Au=ha=null,Di=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return pm&&n.locale!=="ko"?null:n.data;default:return null}}var Kx={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 Sm(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Kx[t.type]:n==="textarea"}function xm(t,n,i,s){Mi?Oi?Oi.push(s):Oi=[s]:Mi=s,n=ll(n,"onChange"),0<n.length&&(i=new vs("onChange","change",null,i,s),t.push({event:i,listeners:n}))}var Gr=null,qr=null;function Qx(t){ay(t,0)}function Ss(t){var n=Lr(t);if(nm(n))return t}function Tm(t,n){if(t==="change")return n}var _m=!1;if(Hn){var Du;if(Hn){var Nu="oninput"in document;if(!Nu){var Em=document.createElement("div");Em.setAttribute("oninput","return;"),Nu=typeof Em.oninput=="function"}Du=Nu}else Du=!1;_m=Du&&(!document.documentMode||9<document.documentMode)}function wm(){Gr&&(Gr.detachEvent("onpropertychange",Am),qr=Gr=null)}function Am(t){if(t.propertyName==="value"&&Ss(qr)){var n=[];xm(n,qr,t,_u(t)),um(Qx,n)}}function Fx(t,n,i){t==="focusin"?(wm(),Gr=n,qr=i,Gr.attachEvent("onpropertychange",Am)):t==="focusout"&&wm()}function Jx(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ss(qr)}function Ix(t,n){if(t==="click")return Ss(n)}function Wx(t,n){if(t==="input"||t==="change")return Ss(n)}function eT(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Qt=typeof Object.is=="function"?Object.is:eT;function Yr(t,n){if(Qt(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var i=Object.keys(t),s=Object.keys(n);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var u=i[s];if(!Ze.call(n,u)||!Qt(t[u],n[u]))return!1}return!0}function zm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cm(t,n){var i=zm(t);t=0;for(var s;i;){if(i.nodeType===3){if(s=t+i.textContent.length,t<=n&&s>=n)return{node:i,offset:n-t};t=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=zm(i)}}function Rm(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Rm(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Mm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=hs(t.document);n instanceof t.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)t=n.contentWindow;else break;n=hs(t.document)}return n}function ju(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var tT=Hn&&"documentMode"in document&&11>=document.documentMode,Ni=null,ku=null,Pr=null,Vu=!1;function Om(t,n,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Vu||Ni==null||Ni!==hs(s)||(s=Ni,"selectionStart"in s&&ju(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Pr&&Yr(Pr,s)||(Pr=s,s=ll(ku,"onSelect"),0<s.length&&(n=new vs("onSelect","select",null,n,i),t.push({event:n,listeners:s}),n.target=Ni)))}function Ja(t,n){var i={};return i[t.toLowerCase()]=n.toLowerCase(),i["Webkit"+t]="webkit"+n,i["Moz"+t]="moz"+n,i}var ji={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionrun:Ja("Transition","TransitionRun"),transitionstart:Ja("Transition","TransitionStart"),transitioncancel:Ja("Transition","TransitionCancel"),transitionend:Ja("Transition","TransitionEnd")},Lu={},Dm={};Hn&&(Dm=document.createElement("div").style,"AnimationEvent"in window||(delete ji.animationend.animation,delete ji.animationiteration.animation,delete ji.animationstart.animation),"TransitionEvent"in window||delete ji.transitionend.transition);function Ia(t){if(Lu[t])return Lu[t];if(!ji[t])return t;var n=ji[t],i;for(i in n)if(n.hasOwnProperty(i)&&i in Dm)return Lu[t]=n[i];return t}var Nm=Ia("animationend"),jm=Ia("animationiteration"),km=Ia("animationstart"),nT=Ia("transitionrun"),aT=Ia("transitionstart"),iT=Ia("transitioncancel"),Vm=Ia("transitionend"),Lm=new Map,Uu="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(" ");Uu.push("scrollEnd");function bn(t,n){Lm.set(t,n),Qa(n,[t])}var xs=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},on=[],ki=0,Bu=0;function Ts(){for(var t=ki,n=Bu=ki=0;n<t;){var i=on[n];on[n++]=null;var s=on[n];on[n++]=null;var u=on[n];on[n++]=null;var d=on[n];if(on[n++]=null,s!==null&&u!==null){var g=s.pending;g===null?u.next=u:(u.next=g.next,g.next=u),s.pending=u}d!==0&&Um(i,u,d)}}function _s(t,n,i,s){on[ki++]=t,on[ki++]=n,on[ki++]=i,on[ki++]=s,Bu|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Zu(t,n,i,s){return _s(t,n,i,s),Es(t)}function Wa(t,n){return _s(t,null,null,n),Es(t)}function Um(t,n,i){t.lanes|=i;var s=t.alternate;s!==null&&(s.lanes|=i);for(var u=!1,d=t.return;d!==null;)d.childLanes|=i,s=d.alternate,s!==null&&(s.childLanes|=i),d.tag===22&&(t=d.stateNode,t===null||t._visibility&1||(u=!0)),t=d,d=d.return;return t.tag===3?(d=t.stateNode,u&&n!==null&&(u=31-Kt(i),t=d.hiddenUpdates,s=t[u],s===null?t[u]=[n]:s.push(n),n.lane=i|536870912),d):null}function Es(t){if(50<po)throw po=0,Qc=null,Error(o(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Vi={};function rT(t,n,i,s){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(t,n,i,s){return new rT(t,n,i,s)}function Hu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function $n(t,n){var i=t.alternate;return i===null?(i=Ft(t.tag,n,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=n,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,n=t.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Bm(t,n){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,n=i.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function ws(t,n,i,s,u,d){var g=0;if(s=t,typeof t=="function")Hu(t)&&(g=1);else if(typeof t=="string")g=c_(t,i,J.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case W:return t=Ft(31,i,n,u),t.elementType=W,t.lanes=d,t;case T:return ei(i.children,u,d,n);case O:g=8,u|=24;break;case L:return t=Ft(12,i,n,u|2),t.elementType=L,t.lanes=d,t;case q:return t=Ft(13,i,n,u),t.elementType=q,t.lanes=d,t;case I:return t=Ft(19,i,n,u),t.elementType=I,t.lanes=d,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:g=10;break e;case C:g=9;break e;case Q:g=11;break e;case F:g=14;break e;case P:g=16,s=null;break e}g=29,i=Error(o(130,t===null?"null":typeof t,"")),s=null}return n=Ft(g,i,n,u),n.elementType=t,n.type=s,n.lanes=d,n}function ei(t,n,i,s){return t=Ft(7,t,s,n),t.lanes=i,t}function $u(t,n,i){return t=Ft(6,t,null,n),t.lanes=i,t}function Zm(t){var n=Ft(18,null,null,0);return n.stateNode=t,n}function Gu(t,n,i){return n=Ft(4,t.children!==null?t.children:[],t.key,n),n.lanes=i,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Hm=new WeakMap;function sn(t,n){if(typeof t=="object"&&t!==null){var i=Hm.get(t);return i!==void 0?i:(n={value:t,source:n,stack:Qe(n)},Hm.set(t,n),n)}return{value:t,source:n,stack:Qe(n)}}var Li=[],Ui=0,As=null,Xr=0,ln=[],un=0,ma=null,On=1,Dn="";function Gn(t,n){Li[Ui++]=Xr,Li[Ui++]=As,As=t,Xr=n}function $m(t,n,i){ln[un++]=On,ln[un++]=Dn,ln[un++]=ma,ma=t;var s=On;t=Dn;var u=32-Kt(s)-1;s&=~(1<<u),i+=1;var d=32-Kt(n)+u;if(30<d){var g=u-u%5;d=(s&(1<<g)-1).toString(32),s>>=g,u-=g,On=1<<32-Kt(n)+u|i<<u|s,Dn=d+t}else On=1<<d|i<<u|s,Dn=t}function qu(t){t.return!==null&&(Gn(t,1),$m(t,1,0))}function Yu(t){for(;t===As;)As=Li[--Ui],Li[Ui]=null,Xr=Li[--Ui],Li[Ui]=null;for(;t===ma;)ma=ln[--un],ln[un]=null,Dn=ln[--un],ln[un]=null,On=ln[--un],ln[un]=null}function Gm(t,n){ln[un++]=On,ln[un++]=Dn,ln[un++]=ma,On=n.id,Dn=n.overflow,ma=t}var _t=null,He=null,Te=!1,pa=null,cn=!1,Pu=Error(o(519));function ga(t){var n=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Kr(sn(n,t)),Pu}function qm(t){var n=t.stateNode,i=t.type,s=t.memoizedProps;switch(n[Tt]=t,n[Ut]=s,i){case"dialog":ve("cancel",n),ve("close",n);break;case"iframe":case"object":case"embed":ve("load",n);break;case"video":case"audio":for(i=0;i<yo.length;i++)ve(yo[i],n);break;case"source":ve("error",n);break;case"img":case"image":case"link":ve("error",n),ve("load",n);break;case"details":ve("toggle",n);break;case"input":ve("invalid",n),am(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ve("invalid",n);break;case"textarea":ve("invalid",n),rm(n,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||s.suppressHydrationWarning===!0||sy(n.textContent,i)?(s.popover!=null&&(ve("beforetoggle",n),ve("toggle",n)),s.onScroll!=null&&ve("scroll",n),s.onScrollEnd!=null&&ve("scrollend",n),s.onClick!=null&&(n.onclick=Zn),n=!0):n=!1,n||ga(t,!0)}function Ym(t){for(_t=t.return;_t;)switch(_t.tag){case 5:case 31:case 13:cn=!1;return;case 27:case 3:cn=!0;return;default:_t=_t.return}}function Bi(t){if(t!==_t)return!1;if(!Te)return Ym(t),Te=!0,!1;var n=t.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||ff(t.type,t.memoizedProps)),i=!i),i&&He&&ga(t),Ym(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));He=gy(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));He=gy(t)}else n===27?(n=He,Ma(t.type)?(t=gf,gf=null,He=t):He=n):He=_t?dn(t.stateNode.nextSibling):null;return!0}function ti(){He=_t=null,Te=!1}function Xu(){var t=pa;return t!==null&&(Gt===null?Gt=t:Gt.push.apply(Gt,t),pa=null),t}function Kr(t){pa===null?pa=[t]:pa.push(t)}var Ku=A(null),ni=null,qn=null;function ya(t,n,i){K(Ku,n._currentValue),n._currentValue=i}function Yn(t){t._currentValue=Ku.current,Z(Ku)}function Qu(t,n,i){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===i)break;t=t.return}}function Fu(t,n,i,s){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var d=u.dependencies;if(d!==null){var g=u.child;d=d.firstContext;e:for(;d!==null;){var b=d;d=u;for(var _=0;_<n.length;_++)if(b.context===n[_]){d.lanes|=i,b=d.alternate,b!==null&&(b.lanes|=i),Qu(d.return,i,t),s||(g=null);break e}d=b.next}}else if(u.tag===18){if(g=u.return,g===null)throw Error(o(341));g.lanes|=i,d=g.alternate,d!==null&&(d.lanes|=i),Qu(g,i,t),g=null}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===t){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}}function Zi(t,n,i,s){t=null;for(var u=n,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var g=u.alternate;if(g===null)throw Error(o(387));if(g=g.memoizedProps,g!==null){var b=u.type;Qt(u.pendingProps.value,g.value)||(t!==null?t.push(b):t=[b])}}else if(u===re.current){if(g=u.alternate,g===null)throw Error(o(387));g.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(To):t=[To])}u=u.return}t!==null&&Fu(n,t,i,s),n.flags|=262144}function zs(t){for(t=t.firstContext;t!==null;){if(!Qt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ai(t){ni=t,qn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Et(t){return Pm(ni,t)}function Cs(t,n){return ni===null&&ai(t),Pm(t,n)}function Pm(t,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},qn===null){if(t===null)throw Error(o(308));qn=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else qn=qn.next=n;return i}var oT=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(i,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(i){return i()})}},sT=e.unstable_scheduleCallback,lT=e.unstable_NormalPriority,lt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ju(){return{controller:new oT,data:new Map,refCount:0}}function Qr(t){t.refCount--,t.refCount===0&&sT(lT,function(){t.controller.abort()})}var Fr=null,Iu=0,Hi=0,$i=null;function uT(t,n){if(Fr===null){var i=Fr=[];Iu=0,Hi=tf(),$i={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Iu++,n.then(Xm,Xm),n}function Xm(){if(--Iu===0&&Fr!==null){$i!==null&&($i.status="fulfilled");var t=Fr;Fr=null,Hi=0,$i=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function cT(t,n){var i=[],s={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var u=0;u<i.length;u++)(0,i[u])(n)},function(u){for(s.status="rejected",s.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),s}var Km=U.S;U.S=function(t,n){Og=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&uT(t,n),Km!==null&&Km(t,n)};var ii=A(null);function Wu(){var t=ii.current;return t!==null?t:Be.pooledCache}function Rs(t,n){n===null?K(ii,ii.current):K(ii,n.pool)}function Qm(){var t=Wu();return t===null?null:{parent:lt._currentValue,pool:t}}var Gi=Error(o(460)),ec=Error(o(474)),Ms=Error(o(542)),Os={then:function(){}};function Fm(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Jm(t,n,i){switch(i=t[i],i===void 0?t.push(n):i!==n&&(n.then(Zn,Zn),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Wm(t),t;default:if(typeof n.status=="string")n.then(Zn,Zn);else{if(t=Be,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=s}},function(s){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Wm(t),t}throw oi=n,Gi}}function ri(t){try{var n=t._init;return n(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(oi=i,Gi):i}}var oi=null;function Im(){if(oi===null)throw Error(o(459));var t=oi;return oi=null,t}function Wm(t){if(t===Gi||t===Ms)throw Error(o(483))}var qi=null,Jr=0;function Ds(t){var n=Jr;return Jr+=1,qi===null&&(qi=[]),Jm(qi,t,n)}function Ir(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Ns(t,n){throw n.$$typeof===S?Error(o(525)):(t=Object.prototype.toString.call(n),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function ep(t){function n(z,E){if(t){var D=z.deletions;D===null?(z.deletions=[E],z.flags|=16):D.push(E)}}function i(z,E){if(!t)return null;for(;E!==null;)n(z,E),E=E.sibling;return null}function s(z){for(var E=new Map;z!==null;)z.key!==null?E.set(z.key,z):E.set(z.index,z),z=z.sibling;return E}function u(z,E){return z=$n(z,E),z.index=0,z.sibling=null,z}function d(z,E,D){return z.index=D,t?(D=z.alternate,D!==null?(D=D.index,D<E?(z.flags|=67108866,E):D):(z.flags|=67108866,E)):(z.flags|=1048576,E)}function g(z){return t&&z.alternate===null&&(z.flags|=67108866),z}function b(z,E,D,H){return E===null||E.tag!==6?(E=$u(D,z.mode,H),E.return=z,E):(E=u(E,D),E.return=z,E)}function _(z,E,D,H){var oe=D.type;return oe===T?B(z,E,D.props.children,H,D.key):E!==null&&(E.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===P&&ri(oe)===E.type)?(E=u(E,D.props),Ir(E,D),E.return=z,E):(E=ws(D.type,D.key,D.props,null,z.mode,H),Ir(E,D),E.return=z,E)}function N(z,E,D,H){return E===null||E.tag!==4||E.stateNode.containerInfo!==D.containerInfo||E.stateNode.implementation!==D.implementation?(E=Gu(D,z.mode,H),E.return=z,E):(E=u(E,D.children||[]),E.return=z,E)}function B(z,E,D,H,oe){return E===null||E.tag!==7?(E=ei(D,z.mode,H,oe),E.return=z,E):(E=u(E,D),E.return=z,E)}function G(z,E,D){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=$u(""+E,z.mode,D),E.return=z,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case x:return D=ws(E.type,E.key,E.props,null,z.mode,D),Ir(D,E),D.return=z,D;case M:return E=Gu(E,z.mode,D),E.return=z,E;case P:return E=ri(E),G(z,E,D)}if(ke(E)||Ce(E))return E=ei(E,z.mode,D,null),E.return=z,E;if(typeof E.then=="function")return G(z,Ds(E),D);if(E.$$typeof===k)return G(z,Cs(z,E),D);Ns(z,E)}return null}function j(z,E,D,H){var oe=E!==null?E.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return oe!==null?null:b(z,E,""+D,H);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case x:return D.key===oe?_(z,E,D,H):null;case M:return D.key===oe?N(z,E,D,H):null;case P:return D=ri(D),j(z,E,D,H)}if(ke(D)||Ce(D))return oe!==null?null:B(z,E,D,H,null);if(typeof D.then=="function")return j(z,E,Ds(D),H);if(D.$$typeof===k)return j(z,E,Cs(z,D),H);Ns(z,D)}return null}function V(z,E,D,H,oe){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return z=z.get(D)||null,b(E,z,""+H,oe);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case x:return z=z.get(H.key===null?D:H.key)||null,_(E,z,H,oe);case M:return z=z.get(H.key===null?D:H.key)||null,N(E,z,H,oe);case P:return H=ri(H),V(z,E,D,H,oe)}if(ke(H)||Ce(H))return z=z.get(D)||null,B(E,z,H,oe,null);if(typeof H.then=="function")return V(z,E,D,Ds(H),oe);if(H.$$typeof===k)return V(z,E,D,Cs(E,H),oe);Ns(E,H)}return null}function ee(z,E,D,H){for(var oe=null,Ee=null,ie=E,me=E=0,Se=null;ie!==null&&me<D.length;me++){ie.index>me?(Se=ie,ie=null):Se=ie.sibling;var we=j(z,ie,D[me],H);if(we===null){ie===null&&(ie=Se);break}t&&ie&&we.alternate===null&&n(z,ie),E=d(we,E,me),Ee===null?oe=we:Ee.sibling=we,Ee=we,ie=Se}if(me===D.length)return i(z,ie),Te&&Gn(z,me),oe;if(ie===null){for(;me<D.length;me++)ie=G(z,D[me],H),ie!==null&&(E=d(ie,E,me),Ee===null?oe=ie:Ee.sibling=ie,Ee=ie);return Te&&Gn(z,me),oe}for(ie=s(ie);me<D.length;me++)Se=V(ie,z,me,D[me],H),Se!==null&&(t&&Se.alternate!==null&&ie.delete(Se.key===null?me:Se.key),E=d(Se,E,me),Ee===null?oe=Se:Ee.sibling=Se,Ee=Se);return t&&ie.forEach(function(ka){return n(z,ka)}),Te&&Gn(z,me),oe}function ue(z,E,D,H){if(D==null)throw Error(o(151));for(var oe=null,Ee=null,ie=E,me=E=0,Se=null,we=D.next();ie!==null&&!we.done;me++,we=D.next()){ie.index>me?(Se=ie,ie=null):Se=ie.sibling;var ka=j(z,ie,we.value,H);if(ka===null){ie===null&&(ie=Se);break}t&&ie&&ka.alternate===null&&n(z,ie),E=d(ka,E,me),Ee===null?oe=ka:Ee.sibling=ka,Ee=ka,ie=Se}if(we.done)return i(z,ie),Te&&Gn(z,me),oe;if(ie===null){for(;!we.done;me++,we=D.next())we=G(z,we.value,H),we!==null&&(E=d(we,E,me),Ee===null?oe=we:Ee.sibling=we,Ee=we);return Te&&Gn(z,me),oe}for(ie=s(ie);!we.done;me++,we=D.next())we=V(ie,z,me,we.value,H),we!==null&&(t&&we.alternate!==null&&ie.delete(we.key===null?me:we.key),E=d(we,E,me),Ee===null?oe=we:Ee.sibling=we,Ee=we);return t&&ie.forEach(function(x_){return n(z,x_)}),Te&&Gn(z,me),oe}function Ue(z,E,D,H){if(typeof D=="object"&&D!==null&&D.type===T&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case x:e:{for(var oe=D.key;E!==null;){if(E.key===oe){if(oe=D.type,oe===T){if(E.tag===7){i(z,E.sibling),H=u(E,D.props.children),H.return=z,z=H;break e}}else if(E.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===P&&ri(oe)===E.type){i(z,E.sibling),H=u(E,D.props),Ir(H,D),H.return=z,z=H;break e}i(z,E);break}else n(z,E);E=E.sibling}D.type===T?(H=ei(D.props.children,z.mode,H,D.key),H.return=z,z=H):(H=ws(D.type,D.key,D.props,null,z.mode,H),Ir(H,D),H.return=z,z=H)}return g(z);case M:e:{for(oe=D.key;E!==null;){if(E.key===oe)if(E.tag===4&&E.stateNode.containerInfo===D.containerInfo&&E.stateNode.implementation===D.implementation){i(z,E.sibling),H=u(E,D.children||[]),H.return=z,z=H;break e}else{i(z,E);break}else n(z,E);E=E.sibling}H=Gu(D,z.mode,H),H.return=z,z=H}return g(z);case P:return D=ri(D),Ue(z,E,D,H)}if(ke(D))return ee(z,E,D,H);if(Ce(D)){if(oe=Ce(D),typeof oe!="function")throw Error(o(150));return D=oe.call(D),ue(z,E,D,H)}if(typeof D.then=="function")return Ue(z,E,Ds(D),H);if(D.$$typeof===k)return Ue(z,E,Cs(z,D),H);Ns(z,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,E!==null&&E.tag===6?(i(z,E.sibling),H=u(E,D),H.return=z,z=H):(i(z,E),H=$u(D,z.mode,H),H.return=z,z=H),g(z)):i(z,E)}return function(z,E,D,H){try{Jr=0;var oe=Ue(z,E,D,H);return qi=null,oe}catch(ie){if(ie===Gi||ie===Ms)throw ie;var Ee=Ft(29,ie,null,z.mode);return Ee.lanes=H,Ee.return=z,Ee}}}var si=ep(!0),tp=ep(!1),va=!1;function tc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nc(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ba(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Sa(t,n,i){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(ze&2)!==0){var u=s.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),s.pending=n,n=Es(t),Um(t,null,i),n}return _s(t,s,n,i),Es(t)}function Wr(t,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,i|=s,n.lanes=i,Ph(t,i)}}function ac(t,n){var i=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var u=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var g={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?u=d=g:d=d.next=g,i=i.next}while(i!==null);d===null?u=d=n:d=d.next=n}else u=d=n;i={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=n:t.next=n,i.lastBaseUpdate=n}var ic=!1;function eo(){if(ic){var t=$i;if(t!==null)throw t}}function to(t,n,i,s){ic=!1;var u=t.updateQueue;va=!1;var d=u.firstBaseUpdate,g=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var _=b,N=_.next;_.next=null,g===null?d=N:g.next=N,g=_;var B=t.alternate;B!==null&&(B=B.updateQueue,b=B.lastBaseUpdate,b!==g&&(b===null?B.firstBaseUpdate=N:b.next=N,B.lastBaseUpdate=_))}if(d!==null){var G=u.baseState;g=0,B=N=_=null,b=d;do{var j=b.lane&-536870913,V=j!==b.lane;if(V?(be&j)===j:(s&j)===j){j!==0&&j===Hi&&(ic=!0),B!==null&&(B=B.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ee=t,ue=b;j=n;var Ue=i;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){G=ee.call(Ue,G,j);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ue.payload,j=typeof ee=="function"?ee.call(Ue,G,j):ee,j==null)break e;G=v({},G,j);break e;case 2:va=!0}}j=b.callback,j!==null&&(t.flags|=64,V&&(t.flags|=8192),V=u.callbacks,V===null?u.callbacks=[j]:V.push(j))}else V={lane:j,tag:b.tag,payload:b.payload,callback:b.callback,next:null},B===null?(N=B=V,_=G):B=B.next=V,g|=j;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;V=b,b=V.next,V.next=null,u.lastBaseUpdate=V,u.shared.pending=null}}while(!0);B===null&&(_=G),u.baseState=_,u.firstBaseUpdate=N,u.lastBaseUpdate=B,d===null&&(u.shared.lanes=0),wa|=g,t.lanes=g,t.memoizedState=G}}function np(t,n){if(typeof t!="function")throw Error(o(191,t));t.call(n)}function ap(t,n){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)np(i[t],n)}var Yi=A(null),js=A(0);function ip(t,n){t=ea,K(js,t),K(Yi,n),ea=t|n.baseLanes}function rc(){K(js,ea),K(Yi,Yi.current)}function oc(){ea=js.current,Z(Yi),Z(js)}var Jt=A(null),fn=null;function xa(t){var n=t.alternate;K(it,it.current&1),K(Jt,t),fn===null&&(n===null||Yi.current!==null||n.memoizedState!==null)&&(fn=t)}function sc(t){K(it,it.current),K(Jt,t),fn===null&&(fn=t)}function rp(t){t.tag===22?(K(it,it.current),K(Jt,t),fn===null&&(fn=t)):Ta()}function Ta(){K(it,it.current),K(Jt,Jt.current)}function It(t){Z(Jt),fn===t&&(fn=null),Z(it)}var it=A(0);function ks(t){for(var n=t;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||mf(i)||pf(i)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Pn=0,he=null,Ve=null,ut=null,Vs=!1,Pi=!1,li=!1,Ls=0,no=0,Xi=null,fT=0;function We(){throw Error(o(321))}function lc(t,n){if(n===null)return!1;for(var i=0;i<n.length&&i<t.length;i++)if(!Qt(t[i],n[i]))return!1;return!0}function uc(t,n,i,s,u,d){return Pn=d,he=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=t===null||t.memoizedState===null?$p:Ec,li=!1,d=i(s,u),li=!1,Pi&&(d=sp(n,i,s,u)),op(t),d}function op(t){U.H=ro;var n=Ve!==null&&Ve.next!==null;if(Pn=0,ut=Ve=he=null,Vs=!1,no=0,Xi=null,n)throw Error(o(300));t===null||ct||(t=t.dependencies,t!==null&&zs(t)&&(ct=!0))}function sp(t,n,i,s){he=t;var u=0;do{if(Pi&&(Xi=null),no=0,Pi=!1,25<=u)throw Error(o(301));if(u+=1,ut=Ve=null,t.updateQueue!=null){var d=t.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}U.H=Gp,d=n(i,s)}while(Pi);return d}function dT(){var t=U.H,n=t.useState()[0];return n=typeof n.then=="function"?ao(n):n,t=t.useState()[0],(Ve!==null?Ve.memoizedState:null)!==t&&(he.flags|=1024),n}function cc(){var t=Ls!==0;return Ls=0,t}function fc(t,n,i){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~i}function dc(t){if(Vs){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Vs=!1}Pn=0,ut=Ve=he=null,Pi=!1,no=Ls=0,Xi=null}function Nt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?he.memoizedState=ut=t:ut=ut.next=t,ut}function rt(){if(Ve===null){var t=he.alternate;t=t!==null?t.memoizedState:null}else t=Ve.next;var n=ut===null?he.memoizedState:ut.next;if(n!==null)ut=n,Ve=t;else{if(t===null)throw he.alternate===null?Error(o(467)):Error(o(310));Ve=t,t={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},ut===null?he.memoizedState=ut=t:ut=ut.next=t}return ut}function Us(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ao(t){var n=no;return no+=1,Xi===null&&(Xi=[]),t=Jm(Xi,t,n),n=he,(ut===null?n.memoizedState:ut.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?$p:Ec),t}function Bs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ao(t);if(t.$$typeof===k)return Et(t)}throw Error(o(438,String(t)))}function hc(t){var n=null,i=he.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var s=he.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Us(),he.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(t),s=0;s<t;s++)i[s]=xe;return n.index++,i}function Xn(t,n){return typeof n=="function"?n(t):n}function Zs(t){var n=rt();return mc(n,Ve,t)}function mc(t,n,i){var s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=i;var u=t.baseQueue,d=s.pending;if(d!==null){if(u!==null){var g=u.next;u.next=d.next,d.next=g}n.baseQueue=u=d,s.pending=null}if(d=t.baseState,u===null)t.memoizedState=d;else{n=u.next;var b=g=null,_=null,N=n,B=!1;do{var G=N.lane&-536870913;if(G!==N.lane?(be&G)===G:(Pn&G)===G){var j=N.revertLane;if(j===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),G===Hi&&(B=!0);else if((Pn&j)===j){N=N.next,j===Hi&&(B=!0);continue}else G={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},_===null?(b=_=G,g=d):_=_.next=G,he.lanes|=j,wa|=j;G=N.action,li&&i(d,G),d=N.hasEagerState?N.eagerState:i(d,G)}else j={lane:G,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},_===null?(b=_=j,g=d):_=_.next=j,he.lanes|=G,wa|=G;N=N.next}while(N!==null&&N!==n);if(_===null?g=d:_.next=b,!Qt(d,t.memoizedState)&&(ct=!0,B&&(i=$i,i!==null)))throw i;t.memoizedState=d,t.baseState=g,t.baseQueue=_,s.lastRenderedState=d}return u===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function pc(t){var n=rt(),i=n.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var s=i.dispatch,u=i.pending,d=n.memoizedState;if(u!==null){i.pending=null;var g=u=u.next;do d=t(d,g.action),g=g.next;while(g!==u);Qt(d,n.memoizedState)||(ct=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),i.lastRenderedState=d}return[d,s]}function lp(t,n,i){var s=he,u=rt(),d=Te;if(d){if(i===void 0)throw Error(o(407));i=i()}else i=n();var g=!Qt((Ve||u).memoizedState,i);if(g&&(u.memoizedState=i,ct=!0),u=u.queue,vc(fp.bind(null,s,u,t),[t]),u.getSnapshot!==n||g||ut!==null&&ut.memoizedState.tag&1){if(s.flags|=2048,Ki(9,{destroy:void 0},cp.bind(null,s,u,i,n),null),Be===null)throw Error(o(349));d||(Pn&127)!==0||up(s,n,i)}return i}function up(t,n,i){t.flags|=16384,t={getSnapshot:n,value:i},n=he.updateQueue,n===null?(n=Us(),he.updateQueue=n,n.stores=[t]):(i=n.stores,i===null?n.stores=[t]:i.push(t))}function cp(t,n,i,s){n.value=i,n.getSnapshot=s,dp(n)&&hp(t)}function fp(t,n,i){return i(function(){dp(n)&&hp(t)})}function dp(t){var n=t.getSnapshot;t=t.value;try{var i=n();return!Qt(t,i)}catch{return!0}}function hp(t){var n=Wa(t,2);n!==null&&qt(n,t,2)}function gc(t){var n=Nt();if(typeof t=="function"){var i=t;if(t=i(),li){fa(!0);try{i()}finally{fa(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:t},n}function mp(t,n,i,s){return t.baseState=i,mc(t,Ve,typeof s=="function"?s:Xn)}function hT(t,n,i,s,u){if(Gs(t))throw Error(o(485));if(t=n.action,t!==null){var d={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){d.listeners.push(g)}};U.T!==null?i(!0):d.isTransition=!1,s(d),i=n.pending,i===null?(d.next=n.pending=d,pp(n,d)):(d.next=i.next,n.pending=i.next=d)}}function pp(t,n){var i=n.action,s=n.payload,u=t.state;if(n.isTransition){var d=U.T,g={};U.T=g;try{var b=i(u,s),_=U.S;_!==null&&_(g,b),gp(t,n,b)}catch(N){yc(t,n,N)}finally{d!==null&&g.types!==null&&(d.types=g.types),U.T=d}}else try{d=i(u,s),gp(t,n,d)}catch(N){yc(t,n,N)}}function gp(t,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){yp(t,n,s)},function(s){return yc(t,n,s)}):yp(t,n,i)}function yp(t,n,i){n.status="fulfilled",n.value=i,vp(n),t.state=i,n=t.pending,n!==null&&(i=n.next,i===n?t.pending=null:(i=i.next,n.next=i,pp(t,i)))}function yc(t,n,i){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=i,vp(n),n=n.next;while(n!==s)}t.action=null}function vp(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function bp(t,n){return n}function Sp(t,n){if(Te){var i=Be.formState;if(i!==null){e:{var s=he;if(Te){if(He){t:{for(var u=He,d=cn;u.nodeType!==8;){if(!d){u=null;break t}if(u=dn(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){He=dn(u.nextSibling),s=u.data==="F!";break e}}ga(s)}s=!1}s&&(n=i[0])}}return i=Nt(),i.memoizedState=i.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bp,lastRenderedState:n},i.queue=s,i=Bp.bind(null,he,s),s.dispatch=i,s=gc(!1),d=_c.bind(null,he,!1,s.queue),s=Nt(),u={state:n,dispatch:null,action:t,pending:null},s.queue=u,i=hT.bind(null,he,u,d,i),u.dispatch=i,s.memoizedState=t,[n,i,!1]}function xp(t){var n=rt();return Tp(n,Ve,t)}function Tp(t,n,i){if(n=mc(t,n,bp)[0],t=Zs(Xn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=ao(n)}catch(g){throw g===Gi?Ms:g}else s=n;n=rt();var u=n.queue,d=u.dispatch;return i!==n.memoizedState&&(he.flags|=2048,Ki(9,{destroy:void 0},mT.bind(null,u,i),null)),[s,d,t]}function mT(t,n){t.action=n}function _p(t){var n=rt(),i=Ve;if(i!==null)return Tp(n,i,t);rt(),n=n.memoizedState,i=rt();var s=i.queue.dispatch;return i.memoizedState=t,[n,s,!1]}function Ki(t,n,i,s){return t={tag:t,create:i,deps:s,inst:n,next:null},n=he.updateQueue,n===null&&(n=Us(),he.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=t.next=t:(s=i.next,i.next=t,t.next=s,n.lastEffect=t),t}function Ep(){return rt().memoizedState}function Hs(t,n,i,s){var u=Nt();he.flags|=t,u.memoizedState=Ki(1|n,{destroy:void 0},i,s===void 0?null:s)}function $s(t,n,i,s){var u=rt();s=s===void 0?null:s;var d=u.memoizedState.inst;Ve!==null&&s!==null&&lc(s,Ve.memoizedState.deps)?u.memoizedState=Ki(n,d,i,s):(he.flags|=t,u.memoizedState=Ki(1|n,d,i,s))}function wp(t,n){Hs(8390656,8,t,n)}function vc(t,n){$s(2048,8,t,n)}function pT(t){he.flags|=4;var n=he.updateQueue;if(n===null)n=Us(),he.updateQueue=n,n.events=[t];else{var i=n.events;i===null?n.events=[t]:i.push(t)}}function Ap(t){var n=rt().memoizedState;return pT({ref:n,nextImpl:t}),function(){if((ze&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function zp(t,n){return $s(4,2,t,n)}function Cp(t,n){return $s(4,4,t,n)}function Rp(t,n){if(typeof n=="function"){t=t();var i=n(t);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Mp(t,n,i){i=i!=null?i.concat([t]):null,$s(4,4,Rp.bind(null,n,t),i)}function bc(){}function Op(t,n){var i=rt();n=n===void 0?null:n;var s=i.memoizedState;return n!==null&&lc(n,s[1])?s[0]:(i.memoizedState=[t,n],t)}function Dp(t,n){var i=rt();n=n===void 0?null:n;var s=i.memoizedState;if(n!==null&&lc(n,s[1]))return s[0];if(s=t(),li){fa(!0);try{t()}finally{fa(!1)}}return i.memoizedState=[s,n],s}function Sc(t,n,i){return i===void 0||(Pn&1073741824)!==0&&(be&261930)===0?t.memoizedState=n:(t.memoizedState=i,t=Ng(),he.lanes|=t,wa|=t,i)}function Np(t,n,i,s){return Qt(i,n)?i:Yi.current!==null?(t=Sc(t,i,s),Qt(t,n)||(ct=!0),t):(Pn&42)===0||(Pn&1073741824)!==0&&(be&261930)===0?(ct=!0,t.memoizedState=i):(t=Ng(),he.lanes|=t,wa|=t,n)}function jp(t,n,i,s,u){var d=X.p;X.p=d!==0&&8>d?d:8;var g=U.T,b={};U.T=b,_c(t,!1,n,i);try{var _=u(),N=U.S;if(N!==null&&N(b,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var B=cT(_,s);io(t,n,B,tn(t))}else io(t,n,s,tn(t))}catch(G){io(t,n,{then:function(){},status:"rejected",reason:G},tn())}finally{X.p=d,g!==null&&b.types!==null&&(g.types=b.types),U.T=g}}function gT(){}function xc(t,n,i,s){if(t.tag!==5)throw Error(o(476));var u=kp(t).queue;jp(t,u,n,Y,i===null?gT:function(){return Vp(t),i(s)})}function kp(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:Y},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:i},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Vp(t){var n=kp(t);n.next===null&&(n=t.alternate.memoizedState),io(t,n.next.queue,{},tn())}function Tc(){return Et(To)}function Lp(){return rt().memoizedState}function Up(){return rt().memoizedState}function yT(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var i=tn();t=ba(i);var s=Sa(n,t,i);s!==null&&(qt(s,n,i),Wr(s,n,i)),n={cache:Ju()},t.payload=n;return}n=n.return}}function vT(t,n,i){var s=tn();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Gs(t)?Zp(n,i):(i=Zu(t,n,i,s),i!==null&&(qt(i,t,s),Hp(i,n,s)))}function Bp(t,n,i){var s=tn();io(t,n,i,s)}function io(t,n,i,s){var u={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Gs(t))Zp(n,u);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var g=n.lastRenderedState,b=d(g,i);if(u.hasEagerState=!0,u.eagerState=b,Qt(b,g))return _s(t,n,u,0),Be===null&&Ts(),!1}catch{}if(i=Zu(t,n,u,s),i!==null)return qt(i,t,s),Hp(i,n,s),!0}return!1}function _c(t,n,i,s){if(s={lane:2,revertLane:tf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Gs(t)){if(n)throw Error(o(479))}else n=Zu(t,i,s,2),n!==null&&qt(n,t,2)}function Gs(t){var n=t.alternate;return t===he||n!==null&&n===he}function Zp(t,n){Pi=Vs=!0;var i=t.pending;i===null?n.next=n:(n.next=i.next,i.next=n),t.pending=n}function Hp(t,n,i){if((i&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,i|=s,n.lanes=i,Ph(t,i)}}var ro={readContext:Et,use:Bs,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We};ro.useEffectEvent=We;var $p={readContext:Et,use:Bs,useCallback:function(t,n){return Nt().memoizedState=[t,n===void 0?null:n],t},useContext:Et,useEffect:wp,useImperativeHandle:function(t,n,i){i=i!=null?i.concat([t]):null,Hs(4194308,4,Rp.bind(null,n,t),i)},useLayoutEffect:function(t,n){return Hs(4194308,4,t,n)},useInsertionEffect:function(t,n){Hs(4,2,t,n)},useMemo:function(t,n){var i=Nt();n=n===void 0?null:n;var s=t();if(li){fa(!0);try{t()}finally{fa(!1)}}return i.memoizedState=[s,n],s},useReducer:function(t,n,i){var s=Nt();if(i!==void 0){var u=i(n);if(li){fa(!0);try{i(n)}finally{fa(!1)}}}else u=n;return s.memoizedState=s.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},s.queue=t,t=t.dispatch=vT.bind(null,he,t),[s.memoizedState,t]},useRef:function(t){var n=Nt();return t={current:t},n.memoizedState=t},useState:function(t){t=gc(t);var n=t.queue,i=Bp.bind(null,he,n);return n.dispatch=i,[t.memoizedState,i]},useDebugValue:bc,useDeferredValue:function(t,n){var i=Nt();return Sc(i,t,n)},useTransition:function(){var t=gc(!1);return t=jp.bind(null,he,t.queue,!0,!1),Nt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,i){var s=he,u=Nt();if(Te){if(i===void 0)throw Error(o(407));i=i()}else{if(i=n(),Be===null)throw Error(o(349));(be&127)!==0||up(s,n,i)}u.memoizedState=i;var d={value:i,getSnapshot:n};return u.queue=d,wp(fp.bind(null,s,d,t),[t]),s.flags|=2048,Ki(9,{destroy:void 0},cp.bind(null,s,d,i,n),null),i},useId:function(){var t=Nt(),n=Be.identifierPrefix;if(Te){var i=Dn,s=On;i=(s&~(1<<32-Kt(s)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Ls++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=fT++,n="_"+n+"r_"+i.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Tc,useFormState:Sp,useActionState:Sp,useOptimistic:function(t){var n=Nt();n.memoizedState=n.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=_c.bind(null,he,!0,i),i.dispatch=n,[t,n]},useMemoCache:hc,useCacheRefresh:function(){return Nt().memoizedState=yT.bind(null,he)},useEffectEvent:function(t){var n=Nt(),i={impl:t};return n.memoizedState=i,function(){if((ze&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Ec={readContext:Et,use:Bs,useCallback:Op,useContext:Et,useEffect:vc,useImperativeHandle:Mp,useInsertionEffect:zp,useLayoutEffect:Cp,useMemo:Dp,useReducer:Zs,useRef:Ep,useState:function(){return Zs(Xn)},useDebugValue:bc,useDeferredValue:function(t,n){var i=rt();return Np(i,Ve.memoizedState,t,n)},useTransition:function(){var t=Zs(Xn)[0],n=rt().memoizedState;return[typeof t=="boolean"?t:ao(t),n]},useSyncExternalStore:lp,useId:Lp,useHostTransitionStatus:Tc,useFormState:xp,useActionState:xp,useOptimistic:function(t,n){var i=rt();return mp(i,Ve,t,n)},useMemoCache:hc,useCacheRefresh:Up};Ec.useEffectEvent=Ap;var Gp={readContext:Et,use:Bs,useCallback:Op,useContext:Et,useEffect:vc,useImperativeHandle:Mp,useInsertionEffect:zp,useLayoutEffect:Cp,useMemo:Dp,useReducer:pc,useRef:Ep,useState:function(){return pc(Xn)},useDebugValue:bc,useDeferredValue:function(t,n){var i=rt();return Ve===null?Sc(i,t,n):Np(i,Ve.memoizedState,t,n)},useTransition:function(){var t=pc(Xn)[0],n=rt().memoizedState;return[typeof t=="boolean"?t:ao(t),n]},useSyncExternalStore:lp,useId:Lp,useHostTransitionStatus:Tc,useFormState:_p,useActionState:_p,useOptimistic:function(t,n){var i=rt();return Ve!==null?mp(i,Ve,t,n):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:hc,useCacheRefresh:Up};Gp.useEffectEvent=Ap;function wc(t,n,i,s){n=t.memoizedState,i=i(s,n),i=i==null?n:v({},n,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Ac={enqueueSetState:function(t,n,i){t=t._reactInternals;var s=tn(),u=ba(s);u.payload=n,i!=null&&(u.callback=i),n=Sa(t,u,s),n!==null&&(qt(n,t,s),Wr(n,t,s))},enqueueReplaceState:function(t,n,i){t=t._reactInternals;var s=tn(),u=ba(s);u.tag=1,u.payload=n,i!=null&&(u.callback=i),n=Sa(t,u,s),n!==null&&(qt(n,t,s),Wr(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var i=tn(),s=ba(i);s.tag=2,n!=null&&(s.callback=n),n=Sa(t,s,i),n!==null&&(qt(n,t,i),Wr(n,t,i))}};function qp(t,n,i,s,u,d,g){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,d,g):n.prototype&&n.prototype.isPureReactComponent?!Yr(i,s)||!Yr(u,d):!0}function Yp(t,n,i,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,s),n.state!==t&&Ac.enqueueReplaceState(n,n.state,null)}function ui(t,n){var i=n;if("ref"in n){i={};for(var s in n)s!=="ref"&&(i[s]=n[s])}if(t=t.defaultProps){i===n&&(i=v({},i));for(var u in t)i[u]===void 0&&(i[u]=t[u])}return i}function Pp(t){xs(t)}function Xp(t){console.error(t)}function Kp(t){xs(t)}function qs(t,n){try{var i=t.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Qp(t,n,i){try{var s=t.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function zc(t,n,i){return i=ba(i),i.tag=3,i.payload={element:null},i.callback=function(){qs(t,n)},i}function Fp(t){return t=ba(t),t.tag=3,t}function Jp(t,n,i,s){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var d=s.value;t.payload=function(){return u(d)},t.callback=function(){Qp(n,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(t.callback=function(){Qp(n,i,s),typeof u!="function"&&(Aa===null?Aa=new Set([this]):Aa.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function bT(t,n,i,s,u){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=i.alternate,n!==null&&Zi(n,i,u,!0),i=Jt.current,i!==null){switch(i.tag){case 31:case 13:return fn===null?nl():i.alternate===null&&et===0&&(et=3),i.flags&=-257,i.flags|=65536,i.lanes=u,s===Os?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([s]):n.add(s),Ic(t,s,u)),!1;case 22:return i.flags|=65536,s===Os?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([s]):i.add(s)),Ic(t,s,u)),!1}throw Error(o(435,i.tag))}return Ic(t,s,u),nl(),!1}if(Te)return n=Jt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,s!==Pu&&(t=Error(o(422),{cause:s}),Kr(sn(t,i)))):(s!==Pu&&(n=Error(o(423),{cause:s}),Kr(sn(n,i))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,s=sn(s,i),u=zc(t.stateNode,s,u),ac(t,u),et!==4&&(et=2)),!1;var d=Error(o(520),{cause:s});if(d=sn(d,i),mo===null?mo=[d]:mo.push(d),et!==4&&(et=2),n===null)return!0;s=sn(s,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,t=u&-u,i.lanes|=t,t=zc(i.stateNode,s,t),ac(i,t),!1;case 1:if(n=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Aa===null||!Aa.has(d))))return i.flags|=65536,u&=-u,i.lanes|=u,u=Fp(u),Jp(u,t,i,s),ac(i,u),!1}i=i.return}while(i!==null);return!1}var Cc=Error(o(461)),ct=!1;function wt(t,n,i,s){n.child=t===null?tp(n,null,i,s):si(n,t.child,i,s)}function Ip(t,n,i,s,u){i=i.render;var d=n.ref;if("ref"in s){var g={};for(var b in s)b!=="ref"&&(g[b]=s[b])}else g=s;return ai(n),s=uc(t,n,i,g,d,u),b=cc(),t!==null&&!ct?(fc(t,n,u),Kn(t,n,u)):(Te&&b&&qu(n),n.flags|=1,wt(t,n,s,u),n.child)}function Wp(t,n,i,s,u){if(t===null){var d=i.type;return typeof d=="function"&&!Hu(d)&&d.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=d,eg(t,n,d,s,u)):(t=ws(i.type,null,s,n,n.mode,u),t.ref=n.ref,t.return=n,n.child=t)}if(d=t.child,!Vc(t,u)){var g=d.memoizedProps;if(i=i.compare,i=i!==null?i:Yr,i(g,s)&&t.ref===n.ref)return Kn(t,n,u)}return n.flags|=1,t=$n(d,s),t.ref=n.ref,t.return=n,n.child=t}function eg(t,n,i,s,u){if(t!==null){var d=t.memoizedProps;if(Yr(d,s)&&t.ref===n.ref)if(ct=!1,n.pendingProps=s=d,Vc(t,u))(t.flags&131072)!==0&&(ct=!0);else return n.lanes=t.lanes,Kn(t,n,u)}return Rc(t,n,i,s,u)}function tg(t,n,i,s){var u=s.children,d=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,t!==null){for(s=n.child=t.child,u=0;s!==null;)u=u|s.lanes|s.childLanes,s=s.sibling;s=u&~d}else s=0,n.child=null;return ng(t,n,d,i,s)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Rs(n,d!==null?d.cachePool:null),d!==null?ip(n,d):rc(),rp(n);else return s=n.lanes=536870912,ng(t,n,d!==null?d.baseLanes|i:i,i,s)}else d!==null?(Rs(n,d.cachePool),ip(n,d),Ta(),n.memoizedState=null):(t!==null&&Rs(n,null),rc(),Ta());return wt(t,n,u,i),n.child}function oo(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ng(t,n,i,s,u){var d=Wu();return d=d===null?null:{parent:lt._currentValue,pool:d},n.memoizedState={baseLanes:i,cachePool:d},t!==null&&Rs(n,null),rc(),rp(n),t!==null&&Zi(t,n,s,!0),n.childLanes=u,null}function Ys(t,n){return n=Xs({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function ag(t,n,i){return si(n,t.child,null,i),t=Ys(n,n.pendingProps),t.flags|=2,It(n),n.memoizedState=null,t}function ST(t,n,i){var s=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(Te){if(s.mode==="hidden")return t=Ys(n,s),n.lanes=536870912,oo(null,t);if(sc(n),(t=He)?(t=py(t,cn),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ma!==null?{id:On,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},i=Zm(t),i.return=n,n.child=i,_t=n,He=null)):t=null,t===null)throw ga(n);return n.lanes=536870912,null}return Ys(n,s)}var d=t.memoizedState;if(d!==null){var g=d.dehydrated;if(sc(n),u)if(n.flags&256)n.flags&=-257,n=ag(t,n,i);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(o(558));else if(ct||Zi(t,n,i,!1),u=(i&t.childLanes)!==0,ct||u){if(s=Be,s!==null&&(g=Xh(s,i),g!==0&&g!==d.retryLane))throw d.retryLane=g,Wa(t,g),qt(s,t,g),Cc;nl(),n=ag(t,n,i)}else t=d.treeContext,He=dn(g.nextSibling),_t=n,Te=!0,pa=null,cn=!1,t!==null&&Gm(n,t),n=Ys(n,s),n.flags|=4096;return n}return t=$n(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Ps(t,n){var i=n.ref;if(i===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(t===null||t.ref!==i)&&(n.flags|=4194816)}}function Rc(t,n,i,s,u){return ai(n),i=uc(t,n,i,s,void 0,u),s=cc(),t!==null&&!ct?(fc(t,n,u),Kn(t,n,u)):(Te&&s&&qu(n),n.flags|=1,wt(t,n,i,u),n.child)}function ig(t,n,i,s,u,d){return ai(n),n.updateQueue=null,i=sp(n,s,i,u),op(t),s=cc(),t!==null&&!ct?(fc(t,n,d),Kn(t,n,d)):(Te&&s&&qu(n),n.flags|=1,wt(t,n,i,d),n.child)}function rg(t,n,i,s,u){if(ai(n),n.stateNode===null){var d=Vi,g=i.contextType;typeof g=="object"&&g!==null&&(d=Et(g)),d=new i(s,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ac,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=s,d.state=n.memoizedState,d.refs={},tc(n),g=i.contextType,d.context=typeof g=="object"&&g!==null?Et(g):Vi,d.state=n.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(wc(n,i,g,s),d.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(g=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),g!==d.state&&Ac.enqueueReplaceState(d,d.state,null),to(n,s,d,u),eo(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){d=n.stateNode;var b=n.memoizedProps,_=ui(i,b);d.props=_;var N=d.context,B=i.contextType;g=Vi,typeof B=="object"&&B!==null&&(g=Et(B));var G=i.getDerivedStateFromProps;B=typeof G=="function"||typeof d.getSnapshotBeforeUpdate=="function",b=n.pendingProps!==b,B||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b||N!==g)&&Yp(n,d,s,g),va=!1;var j=n.memoizedState;d.state=j,to(n,s,d,u),eo(),N=n.memoizedState,b||j!==N||va?(typeof G=="function"&&(wc(n,i,G,s),N=n.memoizedState),(_=va||qp(n,i,_,s,j,N,g))?(B||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=N),d.props=s,d.state=N,d.context=g,s=_):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{d=n.stateNode,nc(t,n),g=n.memoizedProps,B=ui(i,g),d.props=B,G=n.pendingProps,j=d.context,N=i.contextType,_=Vi,typeof N=="object"&&N!==null&&(_=Et(N)),b=i.getDerivedStateFromProps,(N=typeof b=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(g!==G||j!==_)&&Yp(n,d,s,_),va=!1,j=n.memoizedState,d.state=j,to(n,s,d,u),eo();var V=n.memoizedState;g!==G||j!==V||va||t!==null&&t.dependencies!==null&&zs(t.dependencies)?(typeof b=="function"&&(wc(n,i,b,s),V=n.memoizedState),(B=va||qp(n,i,B,s,j,V,_)||t!==null&&t.dependencies!==null&&zs(t.dependencies))?(N||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,V,_),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,V,_)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=V),d.props=s,d.state=V,d.context=_,s=B):(typeof d.componentDidUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(n.flags|=1024),s=!1)}return d=s,Ps(t,n),s=(n.flags&128)!==0,d||s?(d=n.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,t!==null&&s?(n.child=si(n,t.child,null,u),n.child=si(n,null,i,u)):wt(t,n,i,u),n.memoizedState=d.state,t=n.child):t=Kn(t,n,u),t}function og(t,n,i,s){return ti(),n.flags|=256,wt(t,n,i,s),n.child}var Mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(t){return{baseLanes:t,cachePool:Qm()}}function Dc(t,n,i){return t=t!==null?t.childLanes&~i:0,n&&(t|=en),t}function sg(t,n,i){var s=n.pendingProps,u=!1,d=(n.flags&128)!==0,g;if((g=d)||(g=t!==null&&t.memoizedState===null?!1:(it.current&2)!==0),g&&(u=!0,n.flags&=-129),g=(n.flags&32)!==0,n.flags&=-33,t===null){if(Te){if(u?xa(n):Ta(),(t=He)?(t=py(t,cn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ma!==null?{id:On,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},i=Zm(t),i.return=n,n.child=i,_t=n,He=null)):t=null,t===null)throw ga(n);return pf(t)?n.lanes=32:n.lanes=536870912,null}var b=s.children;return s=s.fallback,u?(Ta(),u=n.mode,b=Xs({mode:"hidden",children:b},u),s=ei(s,u,i,null),b.return=n,s.return=n,b.sibling=s,n.child=b,s=n.child,s.memoizedState=Oc(i),s.childLanes=Dc(t,g,i),n.memoizedState=Mc,oo(null,s)):(xa(n),Nc(n,b))}var _=t.memoizedState;if(_!==null&&(b=_.dehydrated,b!==null)){if(d)n.flags&256?(xa(n),n.flags&=-257,n=jc(t,n,i)):n.memoizedState!==null?(Ta(),n.child=t.child,n.flags|=128,n=null):(Ta(),b=s.fallback,u=n.mode,s=Xs({mode:"visible",children:s.children},u),b=ei(b,u,i,null),b.flags|=2,s.return=n,b.return=n,s.sibling=b,n.child=s,si(n,t.child,null,i),s=n.child,s.memoizedState=Oc(i),s.childLanes=Dc(t,g,i),n.memoizedState=Mc,n=oo(null,s));else if(xa(n),pf(b)){if(g=b.nextSibling&&b.nextSibling.dataset,g)var N=g.dgst;g=N,s=Error(o(419)),s.stack="",s.digest=g,Kr({value:s,source:null,stack:null}),n=jc(t,n,i)}else if(ct||Zi(t,n,i,!1),g=(i&t.childLanes)!==0,ct||g){if(g=Be,g!==null&&(s=Xh(g,i),s!==0&&s!==_.retryLane))throw _.retryLane=s,Wa(t,s),qt(g,t,s),Cc;mf(b)||nl(),n=jc(t,n,i)}else mf(b)?(n.flags|=192,n.child=t.child,n=null):(t=_.treeContext,He=dn(b.nextSibling),_t=n,Te=!0,pa=null,cn=!1,t!==null&&Gm(n,t),n=Nc(n,s.children),n.flags|=4096);return n}return u?(Ta(),b=s.fallback,u=n.mode,_=t.child,N=_.sibling,s=$n(_,{mode:"hidden",children:s.children}),s.subtreeFlags=_.subtreeFlags&65011712,N!==null?b=$n(N,b):(b=ei(b,u,i,null),b.flags|=2),b.return=n,s.return=n,s.sibling=b,n.child=s,oo(null,s),s=n.child,b=t.child.memoizedState,b===null?b=Oc(i):(u=b.cachePool,u!==null?(_=lt._currentValue,u=u.parent!==_?{parent:_,pool:_}:u):u=Qm(),b={baseLanes:b.baseLanes|i,cachePool:u}),s.memoizedState=b,s.childLanes=Dc(t,g,i),n.memoizedState=Mc,oo(t.child,s)):(xa(n),i=t.child,t=i.sibling,i=$n(i,{mode:"visible",children:s.children}),i.return=n,i.sibling=null,t!==null&&(g=n.deletions,g===null?(n.deletions=[t],n.flags|=16):g.push(t)),n.child=i,n.memoizedState=null,i)}function Nc(t,n){return n=Xs({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Xs(t,n){return t=Ft(22,t,null,n),t.lanes=0,t}function jc(t,n,i){return si(n,t.child,null,i),t=Nc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function lg(t,n,i){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),Qu(t.return,n,i)}function kc(t,n,i,s,u,d){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:u,treeForkCount:d}:(g.isBackwards=n,g.rendering=null,g.renderingStartTime=0,g.last=s,g.tail=i,g.tailMode=u,g.treeForkCount=d)}function ug(t,n,i){var s=n.pendingProps,u=s.revealOrder,d=s.tail;s=s.children;var g=it.current,b=(g&2)!==0;if(b?(g=g&1|2,n.flags|=128):g&=1,K(it,g),wt(t,n,s,i),s=Te?Xr:0,!b&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&lg(t,i,n);else if(t.tag===19)lg(t,i,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(u){case"forwards":for(i=n.child,u=null;i!==null;)t=i.alternate,t!==null&&ks(t)===null&&(u=i),i=i.sibling;i=u,i===null?(u=n.child,n.child=null):(u=i.sibling,i.sibling=null),kc(n,!1,u,i,d,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=n.child,n.child=null;u!==null;){if(t=u.alternate,t!==null&&ks(t)===null){n.child=u;break}t=u.sibling,u.sibling=i,i=u,u=t}kc(n,!0,i,null,d,s);break;case"together":kc(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function Kn(t,n,i){if(t!==null&&(n.dependencies=t.dependencies),wa|=n.lanes,(i&n.childLanes)===0)if(t!==null){if(Zi(t,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(o(153));if(n.child!==null){for(t=n.child,i=$n(t,t.pendingProps),n.child=i,i.return=n;t.sibling!==null;)t=t.sibling,i=i.sibling=$n(t,t.pendingProps),i.return=n;i.sibling=null}return n.child}function Vc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&zs(t)))}function xT(t,n,i){switch(n.tag){case 3:st(n,n.stateNode.containerInfo),ya(n,lt,t.memoizedState.cache),ti();break;case 27:case 5:Pt(n);break;case 4:st(n,n.stateNode.containerInfo);break;case 10:ya(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,sc(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(xa(n),n.flags|=128,null):(i&n.child.childLanes)!==0?sg(t,n,i):(xa(n),t=Kn(t,n,i),t!==null?t.sibling:null);xa(n);break;case 19:var u=(t.flags&128)!==0;if(s=(i&n.childLanes)!==0,s||(Zi(t,n,i,!1),s=(i&n.childLanes)!==0),u){if(s)return ug(t,n,i);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),K(it,it.current),s)break;return null;case 22:return n.lanes=0,tg(t,n,i,n.pendingProps);case 24:ya(n,lt,t.memoizedState.cache)}return Kn(t,n,i)}function cg(t,n,i){if(t!==null)if(t.memoizedProps!==n.pendingProps)ct=!0;else{if(!Vc(t,i)&&(n.flags&128)===0)return ct=!1,xT(t,n,i);ct=(t.flags&131072)!==0}else ct=!1,Te&&(n.flags&1048576)!==0&&$m(n,Xr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=ri(n.elementType),n.type=t,typeof t=="function")Hu(t)?(s=ui(t,s),n.tag=1,n=rg(null,n,t,s,i)):(n.tag=0,n=Rc(null,n,t,s,i));else{if(t!=null){var u=t.$$typeof;if(u===Q){n.tag=11,n=Ip(null,n,t,s,i);break e}else if(u===F){n.tag=14,n=Wp(null,n,t,s,i);break e}}throw n=je(t)||t,Error(o(306,n,""))}}return n;case 0:return Rc(t,n,n.type,n.pendingProps,i);case 1:return s=n.type,u=ui(s,n.pendingProps),rg(t,n,s,u,i);case 3:e:{if(st(n,n.stateNode.containerInfo),t===null)throw Error(o(387));s=n.pendingProps;var d=n.memoizedState;u=d.element,nc(t,n),to(n,s,null,i);var g=n.memoizedState;if(s=g.cache,ya(n,lt,s),s!==d.cache&&Fu(n,[lt],i,!0),eo(),s=g.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:g.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=og(t,n,s,i);break e}else if(s!==u){u=sn(Error(o(424)),n),Kr(u),n=og(t,n,s,i);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,He=dn(t.firstChild),_t=n,Te=!0,pa=null,cn=!0,i=tp(n,null,s,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ti(),s===u){n=Kn(t,n,i);break e}wt(t,n,s,i)}n=n.child}return n;case 26:return Ps(t,n),t===null?(i=xy(n.type,null,n.pendingProps,null))?n.memoizedState=i:Te||(i=n.type,t=n.pendingProps,s=ul(fe.current).createElement(i),s[Tt]=n,s[Ut]=t,At(s,i,t),vt(s),n.stateNode=s):n.memoizedState=xy(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Pt(n),t===null&&Te&&(s=n.stateNode=vy(n.type,n.pendingProps,fe.current),_t=n,cn=!0,u=He,Ma(n.type)?(gf=u,He=dn(s.firstChild)):He=u),wt(t,n,n.pendingProps.children,i),Ps(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Te&&((u=s=He)&&(s=JT(s,n.type,n.pendingProps,cn),s!==null?(n.stateNode=s,_t=n,He=dn(s.firstChild),cn=!1,u=!0):u=!1),u||ga(n)),Pt(n),u=n.type,d=n.pendingProps,g=t!==null?t.memoizedProps:null,s=d.children,ff(u,d)?s=null:g!==null&&ff(u,g)&&(n.flags|=32),n.memoizedState!==null&&(u=uc(t,n,dT,null,null,i),To._currentValue=u),Ps(t,n),wt(t,n,s,i),n.child;case 6:return t===null&&Te&&((t=i=He)&&(i=IT(i,n.pendingProps,cn),i!==null?(n.stateNode=i,_t=n,He=null,t=!0):t=!1),t||ga(n)),null;case 13:return sg(t,n,i);case 4:return st(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=si(n,null,s,i):wt(t,n,s,i),n.child;case 11:return Ip(t,n,n.type,n.pendingProps,i);case 7:return wt(t,n,n.pendingProps,i),n.child;case 8:return wt(t,n,n.pendingProps.children,i),n.child;case 12:return wt(t,n,n.pendingProps.children,i),n.child;case 10:return s=n.pendingProps,ya(n,n.type,s.value),wt(t,n,s.children,i),n.child;case 9:return u=n.type._context,s=n.pendingProps.children,ai(n),u=Et(u),s=s(u),n.flags|=1,wt(t,n,s,i),n.child;case 14:return Wp(t,n,n.type,n.pendingProps,i);case 15:return eg(t,n,n.type,n.pendingProps,i);case 19:return ug(t,n,i);case 31:return ST(t,n,i);case 22:return tg(t,n,i,n.pendingProps);case 24:return ai(n),s=Et(lt),t===null?(u=Wu(),u===null&&(u=Be,d=Ju(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=i),u=d),n.memoizedState={parent:s,cache:u},tc(n),ya(n,lt,u)):((t.lanes&i)!==0&&(nc(t,n),to(n,null,null,i),eo()),u=t.memoizedState,d=n.memoizedState,u.parent!==s?(u={parent:s,cache:s},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),ya(n,lt,s)):(s=d.cache,ya(n,lt,s),s!==u.cache&&Fu(n,[lt],i,!0))),wt(t,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function Qn(t){t.flags|=4}function Lc(t,n,i,s,u){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(u&335544128)===u)if(t.stateNode.complete)t.flags|=8192;else if(Lg())t.flags|=8192;else throw oi=Os,ec}else t.flags&=-16777217}function fg(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ay(n))if(Lg())t.flags|=8192;else throw oi=Os,ec}function Ks(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?qh():536870912,t.lanes|=n,Ii|=n)}function so(t,n){if(!Te)switch(t.tailMode){case"hidden":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function $e(t){var n=t.alternate!==null&&t.alternate.child===t.child,i=0,s=0;if(n)for(var u=t.child;u!==null;)i|=u.lanes|u.childLanes,s|=u.subtreeFlags&65011712,s|=u.flags&65011712,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)i|=u.lanes|u.childLanes,s|=u.subtreeFlags,s|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=s,t.childLanes=i,n}function TT(t,n,i){var s=n.pendingProps;switch(Yu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(n),null;case 1:return $e(n),null;case 3:return i=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),Yn(lt),Re(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Bi(n)?Qn(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Xu())),$e(n),null;case 26:var u=n.type,d=n.memoizedState;return t===null?(Qn(n),d!==null?($e(n),fg(n,d)):($e(n),Lc(n,u,null,s,i))):d?d!==t.memoizedState?(Qn(n),$e(n),fg(n,d)):($e(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&Qn(n),$e(n),Lc(n,u,t,s,i)),null;case 27:if(zn(n),i=fe.current,u=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&Qn(n);else{if(!s){if(n.stateNode===null)throw Error(o(166));return $e(n),null}t=J.current,Bi(n)?qm(n):(t=vy(u,s,i),n.stateNode=t,Qn(n))}return $e(n),null;case 5:if(zn(n),u=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&Qn(n);else{if(!s){if(n.stateNode===null)throw Error(o(166));return $e(n),null}if(d=J.current,Bi(n))qm(n);else{var g=ul(fe.current);switch(d){case 1:d=g.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=g.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=g.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?g.createElement(u,{is:s.is}):g.createElement(u)}}d[Tt]=n,d[Ut]=s;e:for(g=n.child;g!==null;){if(g.tag===5||g.tag===6)d.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===n)break e;for(;g.sibling===null;){if(g.return===null||g.return===n)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}n.stateNode=d;e:switch(At(d,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Qn(n)}}return $e(n),Lc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,i),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&Qn(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(o(166));if(t=fe.current,Bi(n)){if(t=n.stateNode,i=n.memoizedProps,s=null,u=_t,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}t[Tt]=n,t=!!(t.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||sy(t.nodeValue,i)),t||ga(n,!0)}else t=ul(t).createTextNode(s),t[Tt]=n,n.stateNode=t}return $e(n),null;case 31:if(i=n.memoizedState,t===null||t.memoizedState!==null){if(s=Bi(n),i!==null){if(t===null){if(!s)throw Error(o(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Tt]=n}else ti(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),t=!1}else i=Xu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return n.flags&256?(It(n),n):(It(n),null);if((n.flags&128)!==0)throw Error(o(558))}return $e(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=Bi(n),s!==null&&s.dehydrated!==null){if(t===null){if(!u)throw Error(o(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Tt]=n}else ti(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),u=!1}else u=Xu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(It(n),n):(It(n),null)}return It(n),(n.flags&128)!==0?(n.lanes=i,n):(i=s!==null,t=t!==null&&t.memoizedState!==null,i&&(s=n.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==u&&(s.flags|=2048)),i!==t&&i&&(n.child.flags|=8192),Ks(n,n.updateQueue),$e(n),null);case 4:return Re(),t===null&&of(n.stateNode.containerInfo),$e(n),null;case 10:return Yn(n.type),$e(n),null;case 19:if(Z(it),s=n.memoizedState,s===null)return $e(n),null;if(u=(n.flags&128)!==0,d=s.rendering,d===null)if(u)so(s,!1);else{if(et!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(d=ks(t),d!==null){for(n.flags|=128,so(s,!1),t=d.updateQueue,n.updateQueue=t,Ks(n,t),n.subtreeFlags=0,t=i,i=n.child;i!==null;)Bm(i,t),i=i.sibling;return K(it,it.current&1|2),Te&&Gn(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&Fe()>Ws&&(n.flags|=128,u=!0,so(s,!1),n.lanes=4194304)}else{if(!u)if(t=ks(d),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,Ks(n,t),so(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Te)return $e(n),null}else 2*Fe()-s.renderingStartTime>Ws&&i!==536870912&&(n.flags|=128,u=!0,so(s,!1),n.lanes=4194304);s.isBackwards?(d.sibling=n.child,n.child=d):(t=s.last,t!==null?t.sibling=d:n.child=d,s.last=d)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Fe(),t.sibling=null,i=it.current,K(it,u?i&1|2:i&1),Te&&Gn(n,s.treeForkCount),t):($e(n),null);case 22:case 23:return It(n),oc(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(i&536870912)!==0&&(n.flags&128)===0&&($e(n),n.subtreeFlags&6&&(n.flags|=8192)):$e(n),i=n.updateQueue,i!==null&&Ks(n,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==i&&(n.flags|=2048),t!==null&&Z(ii),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Yn(lt),$e(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function _T(t,n){switch(Yu(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Yn(lt),Re(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return zn(n),null;case 31:if(n.memoizedState!==null){if(It(n),n.alternate===null)throw Error(o(340));ti()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(It(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(o(340));ti()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Z(it),null;case 4:return Re(),null;case 10:return Yn(n.type),null;case 22:case 23:return It(n),oc(),t!==null&&Z(ii),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Yn(lt),null;case 25:return null;default:return null}}function dg(t,n){switch(Yu(n),n.tag){case 3:Yn(lt),Re();break;case 26:case 27:case 5:zn(n);break;case 4:Re();break;case 31:n.memoizedState!==null&&It(n);break;case 13:It(n);break;case 19:Z(it);break;case 10:Yn(n.type);break;case 22:case 23:It(n),oc(),t!==null&&Z(ii);break;case 24:Yn(lt)}}function lo(t,n){try{var i=n.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var u=s.next;i=u;do{if((i.tag&t)===t){s=void 0;var d=i.create,g=i.inst;s=d(),g.destroy=s}i=i.next}while(i!==u)}}catch(b){De(n,n.return,b)}}function _a(t,n,i){try{var s=n.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var d=u.next;s=d;do{if((s.tag&t)===t){var g=s.inst,b=g.destroy;if(b!==void 0){g.destroy=void 0,u=n;var _=i,N=b;try{N()}catch(B){De(u,_,B)}}}s=s.next}while(s!==d)}}catch(B){De(n,n.return,B)}}function hg(t){var n=t.updateQueue;if(n!==null){var i=t.stateNode;try{ap(n,i)}catch(s){De(t,t.return,s)}}}function mg(t,n,i){i.props=ui(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(s){De(t,n,s)}}function uo(t,n){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof i=="function"?t.refCleanup=i(s):i.current=s}}catch(u){De(t,n,u)}}function Nn(t,n){var i=t.ref,s=t.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(u){De(t,n,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){De(t,n,u)}else i.current=null}function pg(t){var n=t.type,i=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(u){De(t,t.return,u)}}function Uc(t,n,i){try{var s=t.stateNode;YT(s,t.type,i,n),s[Ut]=n}catch(u){De(t,t.return,u)}}function gg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ma(t.type)||t.tag===4}function Bc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||gg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ma(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zc(t,n,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(t),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Zn));else if(s!==4&&(s===27&&Ma(t.type)&&(i=t.stateNode,n=null),t=t.child,t!==null))for(Zc(t,n,i),t=t.sibling;t!==null;)Zc(t,n,i),t=t.sibling}function Qs(t,n,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?i.insertBefore(t,n):i.appendChild(t);else if(s!==4&&(s===27&&Ma(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Qs(t,n,i),t=t.sibling;t!==null;)Qs(t,n,i),t=t.sibling}function yg(t){var n=t.stateNode,i=t.memoizedProps;try{for(var s=t.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);At(n,s,i),n[Tt]=t,n[Ut]=i}catch(d){De(t,t.return,d)}}var Fn=!1,ft=!1,Hc=!1,vg=typeof WeakSet=="function"?WeakSet:Set,bt=null;function ET(t,n){if(t=t.containerInfo,uf=gl,t=Mm(t),ju(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var u=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var g=0,b=-1,_=-1,N=0,B=0,G=t,j=null;t:for(;;){for(var V;G!==i||u!==0&&G.nodeType!==3||(b=g+u),G!==d||s!==0&&G.nodeType!==3||(_=g+s),G.nodeType===3&&(g+=G.nodeValue.length),(V=G.firstChild)!==null;)j=G,G=V;for(;;){if(G===t)break t;if(j===i&&++N===u&&(b=g),j===d&&++B===s&&(_=g),(V=G.nextSibling)!==null)break;G=j,j=G.parentNode}G=V}i=b===-1||_===-1?null:{start:b,end:_}}else i=null}i=i||{start:0,end:0}}else i=null;for(cf={focusedElem:t,selectionRange:i},gl=!1,bt=n;bt!==null;)if(n=bt,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,bt=t;else for(;bt!==null;){switch(n=bt,d=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)u=t[i],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&d!==null){t=void 0,i=n,u=d.memoizedProps,d=d.memoizedState,s=i.stateNode;try{var ee=ui(i.type,u);t=s.getSnapshotBeforeUpdate(ee,d),s.__reactInternalSnapshotBeforeUpdate=t}catch(ue){De(i,i.return,ue)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,i=t.nodeType,i===9)hf(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":hf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=n.sibling,t!==null){t.return=n.return,bt=t;break}bt=n.return}}function bg(t,n,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:In(t,i),s&4&&lo(5,i);break;case 1:if(In(t,i),s&4)if(t=i.stateNode,n===null)try{t.componentDidMount()}catch(g){De(i,i.return,g)}else{var u=ui(i.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(u,n,t.__reactInternalSnapshotBeforeUpdate)}catch(g){De(i,i.return,g)}}s&64&&hg(i),s&512&&uo(i,i.return);break;case 3:if(In(t,i),s&64&&(t=i.updateQueue,t!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{ap(t,n)}catch(g){De(i,i.return,g)}}break;case 27:n===null&&s&4&&yg(i);case 26:case 5:In(t,i),n===null&&s&4&&pg(i),s&512&&uo(i,i.return);break;case 12:In(t,i);break;case 31:In(t,i),s&4&&Tg(t,i);break;case 13:In(t,i),s&4&&_g(t,i),s&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=NT.bind(null,i),WT(t,i))));break;case 22:if(s=i.memoizedState!==null||Fn,!s){n=n!==null&&n.memoizedState!==null||ft,u=Fn;var d=ft;Fn=s,(ft=n)&&!d?Wn(t,i,(i.subtreeFlags&8772)!==0):In(t,i),Fn=u,ft=d}break;case 30:break;default:In(t,i)}}function Sg(t){var n=t.alternate;n!==null&&(t.alternate=null,Sg(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&yu(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Ye=null,Zt=!1;function Jn(t,n,i){for(i=i.child;i!==null;)xg(t,n,i),i=i.sibling}function xg(t,n,i){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(Nr,i)}catch{}switch(i.tag){case 26:ft||Nn(i,n),Jn(t,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ft||Nn(i,n);var s=Ye,u=Zt;Ma(i.type)&&(Ye=i.stateNode,Zt=!1),Jn(t,n,i),bo(i.stateNode),Ye=s,Zt=u;break;case 5:ft||Nn(i,n);case 6:if(s=Ye,u=Zt,Ye=null,Jn(t,n,i),Ye=s,Zt=u,Ye!==null)if(Zt)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(i.stateNode)}catch(d){De(i,n,d)}else try{Ye.removeChild(i.stateNode)}catch(d){De(i,n,d)}break;case 18:Ye!==null&&(Zt?(t=Ye,hy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),or(t)):hy(Ye,i.stateNode));break;case 4:s=Ye,u=Zt,Ye=i.stateNode.containerInfo,Zt=!0,Jn(t,n,i),Ye=s,Zt=u;break;case 0:case 11:case 14:case 15:_a(2,i,n),ft||_a(4,i,n),Jn(t,n,i);break;case 1:ft||(Nn(i,n),s=i.stateNode,typeof s.componentWillUnmount=="function"&&mg(i,n,s)),Jn(t,n,i);break;case 21:Jn(t,n,i);break;case 22:ft=(s=ft)||i.memoizedState!==null,Jn(t,n,i),ft=s;break;default:Jn(t,n,i)}}function Tg(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{or(t)}catch(i){De(n,n.return,i)}}}function _g(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{or(t)}catch(i){De(n,n.return,i)}}function wT(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new vg),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new vg),n;default:throw Error(o(435,t.tag))}}function Fs(t,n){var i=wT(t);n.forEach(function(s){if(!i.has(s)){i.add(s);var u=jT.bind(null,t,s);s.then(u,u)}})}function Ht(t,n){var i=n.deletions;if(i!==null)for(var s=0;s<i.length;s++){var u=i[s],d=t,g=n,b=g;e:for(;b!==null;){switch(b.tag){case 27:if(Ma(b.type)){Ye=b.stateNode,Zt=!1;break e}break;case 5:Ye=b.stateNode,Zt=!1;break e;case 3:case 4:Ye=b.stateNode.containerInfo,Zt=!0;break e}b=b.return}if(Ye===null)throw Error(o(160));xg(d,g,u),Ye=null,Zt=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Eg(n,t),n=n.sibling}var Sn=null;function Eg(t,n){var i=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ht(n,t),$t(t),s&4&&(_a(3,t,t.return),lo(3,t),_a(5,t,t.return));break;case 1:Ht(n,t),$t(t),s&512&&(ft||i===null||Nn(i,i.return)),s&64&&Fn&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var u=Sn;if(Ht(n,t),$t(t),s&512&&(ft||i===null||Nn(i,i.return)),s&4){var d=i!==null?i.memoizedState:null;if(s=t.memoizedState,i===null)if(s===null)if(t.stateNode===null){e:{s=t.type,i=t.memoizedProps,u=u.ownerDocument||u;t:switch(s){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Vr]||d[Tt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(s),u.head.insertBefore(d,u.querySelector("head > title"))),At(d,s,i),d[Tt]=t,vt(d),s=d;break e;case"link":var g=Ey("link","href",u).get(s+(i.href||""));if(g){for(var b=0;b<g.length;b++)if(d=g[b],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){g.splice(b,1);break t}}d=u.createElement(s),At(d,s,i),u.head.appendChild(d);break;case"meta":if(g=Ey("meta","content",u).get(s+(i.content||""))){for(b=0;b<g.length;b++)if(d=g[b],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){g.splice(b,1);break t}}d=u.createElement(s),At(d,s,i),u.head.appendChild(d);break;default:throw Error(o(468,s))}d[Tt]=t,vt(d),s=d}t.stateNode=s}else wy(u,t.type,t.stateNode);else t.stateNode=_y(u,s,t.memoizedProps);else d!==s?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,s===null?wy(u,t.type,t.stateNode):_y(u,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Uc(t,t.memoizedProps,i.memoizedProps)}break;case 27:Ht(n,t),$t(t),s&512&&(ft||i===null||Nn(i,i.return)),i!==null&&s&4&&Uc(t,t.memoizedProps,i.memoizedProps);break;case 5:if(Ht(n,t),$t(t),s&512&&(ft||i===null||Nn(i,i.return)),t.flags&32){u=t.stateNode;try{Ri(u,"")}catch(ee){De(t,t.return,ee)}}s&4&&t.stateNode!=null&&(u=t.memoizedProps,Uc(t,u,i!==null?i.memoizedProps:u)),s&1024&&(Hc=!0);break;case 6:if(Ht(n,t),$t(t),s&4){if(t.stateNode===null)throw Error(o(162));s=t.memoizedProps,i=t.stateNode;try{i.nodeValue=s}catch(ee){De(t,t.return,ee)}}break;case 3:if(dl=null,u=Sn,Sn=cl(n.containerInfo),Ht(n,t),Sn=u,$t(t),s&4&&i!==null&&i.memoizedState.isDehydrated)try{or(n.containerInfo)}catch(ee){De(t,t.return,ee)}Hc&&(Hc=!1,wg(t));break;case 4:s=Sn,Sn=cl(t.stateNode.containerInfo),Ht(n,t),$t(t),Sn=s;break;case 12:Ht(n,t),$t(t);break;case 31:Ht(n,t),$t(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Fs(t,s)));break;case 13:Ht(n,t),$t(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Is=Fe()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Fs(t,s)));break;case 22:u=t.memoizedState!==null;var _=i!==null&&i.memoizedState!==null,N=Fn,B=ft;if(Fn=N||u,ft=B||_,Ht(n,t),ft=B,Fn=N,$t(t),s&8192)e:for(n=t.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(i===null||_||Fn||ft||ci(t)),i=null,n=t;;){if(n.tag===5||n.tag===26){if(i===null){_=i=n;try{if(d=_.stateNode,u)g=d.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{b=_.stateNode;var G=_.memoizedProps.style,j=G!=null&&G.hasOwnProperty("display")?G.display:null;b.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(ee){De(_,_.return,ee)}}}else if(n.tag===6){if(i===null){_=n;try{_.stateNode.nodeValue=u?"":_.memoizedProps}catch(ee){De(_,_.return,ee)}}}else if(n.tag===18){if(i===null){_=n;try{var V=_.stateNode;u?my(V,!0):my(_.stateNode,!1)}catch(ee){De(_,_.return,ee)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=t.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Fs(t,i))));break;case 19:Ht(n,t),$t(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Fs(t,s)));break;case 30:break;case 21:break;default:Ht(n,t),$t(t)}}function $t(t){var n=t.flags;if(n&2){try{for(var i,s=t.return;s!==null;){if(gg(s)){i=s;break}s=s.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var u=i.stateNode,d=Bc(t);Qs(t,d,u);break;case 5:var g=i.stateNode;i.flags&32&&(Ri(g,""),i.flags&=-33);var b=Bc(t);Qs(t,b,g);break;case 3:case 4:var _=i.stateNode.containerInfo,N=Bc(t);Zc(t,N,_);break;default:throw Error(o(161))}}catch(B){De(t,t.return,B)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function wg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;wg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function In(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)bg(t,n.alternate,n),n=n.sibling}function ci(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:_a(4,n,n.return),ci(n);break;case 1:Nn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&mg(n,n.return,i),ci(n);break;case 27:bo(n.stateNode);case 26:case 5:Nn(n,n.return),ci(n);break;case 22:n.memoizedState===null&&ci(n);break;case 30:ci(n);break;default:ci(n)}t=t.sibling}}function Wn(t,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,u=t,d=n,g=d.flags;switch(d.tag){case 0:case 11:case 15:Wn(u,d,i),lo(4,d);break;case 1:if(Wn(u,d,i),s=d,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(N){De(s,s.return,N)}if(s=d,u=s.updateQueue,u!==null){var b=s.stateNode;try{var _=u.shared.hiddenCallbacks;if(_!==null)for(u.shared.hiddenCallbacks=null,u=0;u<_.length;u++)np(_[u],b)}catch(N){De(s,s.return,N)}}i&&g&64&&hg(d),uo(d,d.return);break;case 27:yg(d);case 26:case 5:Wn(u,d,i),i&&s===null&&g&4&&pg(d),uo(d,d.return);break;case 12:Wn(u,d,i);break;case 31:Wn(u,d,i),i&&g&4&&Tg(u,d);break;case 13:Wn(u,d,i),i&&g&4&&_g(u,d);break;case 22:d.memoizedState===null&&Wn(u,d,i),uo(d,d.return);break;case 30:break;default:Wn(u,d,i)}n=n.sibling}}function $c(t,n){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&Qr(i))}function Gc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Qr(t))}function xn(t,n,i,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ag(t,n,i,s),n=n.sibling}function Ag(t,n,i,s){var u=n.flags;switch(n.tag){case 0:case 11:case 15:xn(t,n,i,s),u&2048&&lo(9,n);break;case 1:xn(t,n,i,s);break;case 3:xn(t,n,i,s),u&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Qr(t)));break;case 12:if(u&2048){xn(t,n,i,s),t=n.stateNode;try{var d=n.memoizedProps,g=d.id,b=d.onPostCommit;typeof b=="function"&&b(g,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){De(n,n.return,_)}}else xn(t,n,i,s);break;case 31:xn(t,n,i,s);break;case 13:xn(t,n,i,s);break;case 23:break;case 22:d=n.stateNode,g=n.alternate,n.memoizedState!==null?d._visibility&2?xn(t,n,i,s):co(t,n):d._visibility&2?xn(t,n,i,s):(d._visibility|=2,Qi(t,n,i,s,(n.subtreeFlags&10256)!==0||!1)),u&2048&&$c(g,n);break;case 24:xn(t,n,i,s),u&2048&&Gc(n.alternate,n);break;default:xn(t,n,i,s)}}function Qi(t,n,i,s,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=t,g=n,b=i,_=s,N=g.flags;switch(g.tag){case 0:case 11:case 15:Qi(d,g,b,_,u),lo(8,g);break;case 23:break;case 22:var B=g.stateNode;g.memoizedState!==null?B._visibility&2?Qi(d,g,b,_,u):co(d,g):(B._visibility|=2,Qi(d,g,b,_,u)),u&&N&2048&&$c(g.alternate,g);break;case 24:Qi(d,g,b,_,u),u&&N&2048&&Gc(g.alternate,g);break;default:Qi(d,g,b,_,u)}n=n.sibling}}function co(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=t,s=n,u=s.flags;switch(s.tag){case 22:co(i,s),u&2048&&$c(s.alternate,s);break;case 24:co(i,s),u&2048&&Gc(s.alternate,s);break;default:co(i,s)}n=n.sibling}}var fo=8192;function Fi(t,n,i){if(t.subtreeFlags&fo)for(t=t.child;t!==null;)zg(t,n,i),t=t.sibling}function zg(t,n,i){switch(t.tag){case 26:Fi(t,n,i),t.flags&fo&&t.memoizedState!==null&&f_(i,Sn,t.memoizedState,t.memoizedProps);break;case 5:Fi(t,n,i);break;case 3:case 4:var s=Sn;Sn=cl(t.stateNode.containerInfo),Fi(t,n,i),Sn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=fo,fo=16777216,Fi(t,n,i),fo=s):Fi(t,n,i));break;default:Fi(t,n,i)}}function Cg(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function ho(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];bt=s,Mg(s,t)}Cg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rg(t),t=t.sibling}function Rg(t){switch(t.tag){case 0:case 11:case 15:ho(t),t.flags&2048&&_a(9,t,t.return);break;case 3:ho(t);break;case 12:ho(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Js(t)):ho(t);break;default:ho(t)}}function Js(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];bt=s,Mg(s,t)}Cg(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:_a(8,n,n.return),Js(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,Js(n));break;default:Js(n)}t=t.sibling}}function Mg(t,n){for(;bt!==null;){var i=bt;switch(i.tag){case 0:case 11:case 15:_a(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Qr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,bt=s;else e:for(i=t;bt!==null;){s=bt;var u=s.sibling,d=s.return;if(Sg(s),s===i){bt=null;break e}if(u!==null){u.return=d,bt=u;break e}bt=d}}}var AT={getCacheForType:function(t){var n=Et(lt),i=n.data.get(t);return i===void 0&&(i=t(),n.data.set(t,i)),i},cacheSignal:function(){return Et(lt).controller.signal}},zT=typeof WeakMap=="function"?WeakMap:Map,ze=0,Be=null,ye=null,be=0,Oe=0,Wt=null,Ea=!1,Ji=!1,qc=!1,ea=0,et=0,wa=0,fi=0,Yc=0,en=0,Ii=0,mo=null,Gt=null,Pc=!1,Is=0,Og=0,Ws=1/0,el=null,Aa=null,pt=0,za=null,Wi=null,ta=0,Xc=0,Kc=null,Dg=null,po=0,Qc=null;function tn(){return(ze&2)!==0&&be!==0?be&-be:U.T!==null?tf():Kh()}function Ng(){if(en===0)if((be&536870912)===0||Te){var t=ls;ls<<=1,(ls&3932160)===0&&(ls=262144),en=t}else en=536870912;return t=Jt.current,t!==null&&(t.flags|=32),en}function qt(t,n,i){(t===Be&&(Oe===2||Oe===9)||t.cancelPendingCommit!==null)&&(er(t,0),Ca(t,be,en,!1)),kr(t,i),((ze&2)===0||t!==Be)&&(t===Be&&((ze&2)===0&&(fi|=i),et===4&&Ca(t,be,en,!1)),jn(t))}function jg(t,n,i){if((ze&6)!==0)throw Error(o(327));var s=!i&&(n&127)===0&&(n&t.expiredLanes)===0||jr(t,n),u=s?MT(t,n):Jc(t,n,!0),d=s;do{if(u===0){Ji&&!s&&Ca(t,n,0,!1);break}else{if(i=t.current.alternate,d&&!CT(i)){u=Jc(t,n,!1),d=!1;continue}if(u===2){if(d=n,t.errorRecoveryDisabledLanes&d)var g=0;else g=t.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){n=g;e:{var b=t;u=mo;var _=b.current.memoizedState.isDehydrated;if(_&&(er(b,g).flags|=256),g=Jc(b,g,!1),g!==2){if(qc&&!_){b.errorRecoveryDisabledLanes|=d,fi|=d,u=4;break e}d=Gt,Gt=u,d!==null&&(Gt===null?Gt=d:Gt.push.apply(Gt,d))}u=g}if(d=!1,u!==2)continue}}if(u===1){er(t,0),Ca(t,n,0,!0);break}e:{switch(s=t,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:Ca(s,n,en,!Ea);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(u=Is+300-Fe(),10<u)){if(Ca(s,n,en,!Ea),cs(s,0,!0)!==0)break e;ta=n,s.timeoutHandle=fy(kg.bind(null,s,i,Gt,el,Pc,n,en,fi,Ii,Ea,d,"Throttled",-0,0),u);break e}kg(s,i,Gt,el,Pc,n,en,fi,Ii,Ea,d,null,-0,0)}}break}while(!0);jn(t)}function kg(t,n,i,s,u,d,g,b,_,N,B,G,j,V){if(t.timeoutHandle=-1,G=n.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},zg(n,d,G);var ee=(d&62914560)===d?Is-Fe():(d&4194048)===d?Og-Fe():0;if(ee=d_(G,ee),ee!==null){ta=d,t.cancelPendingCommit=ee(Gg.bind(null,t,n,d,i,s,u,g,b,_,B,G,null,j,V)),Ca(t,d,g,!N);return}}Gg(t,n,d,i,s,u,g,b,_)}function CT(t){for(var n=t;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var u=i[s],d=u.getSnapshot;u=u.value;try{if(!Qt(d(),u))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ca(t,n,i,s){n&=~Yc,n&=~fi,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var u=n;0<u;){var d=31-Kt(u),g=1<<d;s[d]=-1,u&=~g}i!==0&&Yh(t,i,n)}function tl(){return(ze&6)===0?(go(0),!1):!0}function Fc(){if(ye!==null){if(Oe===0)var t=ye.return;else t=ye,qn=ni=null,dc(t),qi=null,Jr=0,t=ye;for(;t!==null;)dg(t.alternate,t),t=t.return;ye=null}}function er(t,n){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,KT(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),ta=0,Fc(),Be=t,ye=i=$n(t.current,null),be=n,Oe=0,Wt=null,Ea=!1,Ji=jr(t,n),qc=!1,Ii=en=Yc=fi=wa=et=0,Gt=mo=null,Pc=!1,(n&8)!==0&&(n|=n&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=n;0<s;){var u=31-Kt(s),d=1<<u;n|=t[u],s&=~d}return ea=n,Ts(),i}function Vg(t,n){he=null,U.H=ro,n===Gi||n===Ms?(n=Im(),Oe=3):n===ec?(n=Im(),Oe=4):Oe=n===Cc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Wt=n,ye===null&&(et=1,qs(t,sn(n,t.current)))}function Lg(){var t=Jt.current;return t===null?!0:(be&4194048)===be?fn===null:(be&62914560)===be||(be&536870912)!==0?t===fn:!1}function Ug(){var t=U.H;return U.H=ro,t===null?ro:t}function Bg(){var t=U.A;return U.A=AT,t}function nl(){et=4,Ea||(be&4194048)!==be&&Jt.current!==null||(Ji=!0),(wa&134217727)===0&&(fi&134217727)===0||Be===null||Ca(Be,be,en,!1)}function Jc(t,n,i){var s=ze;ze|=2;var u=Ug(),d=Bg();(Be!==t||be!==n)&&(el=null,er(t,n)),n=!1;var g=et;e:do try{if(Oe!==0&&ye!==null){var b=ye,_=Wt;switch(Oe){case 8:Fc(),g=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(n=!0);var N=Oe;if(Oe=0,Wt=null,tr(t,b,_,N),i&&Ji){g=0;break e}break;default:N=Oe,Oe=0,Wt=null,tr(t,b,_,N)}}RT(),g=et;break}catch(B){Vg(t,B)}while(!0);return n&&t.shellSuspendCounter++,qn=ni=null,ze=s,U.H=u,U.A=d,ye===null&&(Be=null,be=0,Ts()),g}function RT(){for(;ye!==null;)Zg(ye)}function MT(t,n){var i=ze;ze|=2;var s=Ug(),u=Bg();Be!==t||be!==n?(el=null,Ws=Fe()+500,er(t,n)):Ji=jr(t,n);e:do try{if(Oe!==0&&ye!==null){n=ye;var d=Wt;t:switch(Oe){case 1:Oe=0,Wt=null,tr(t,n,d,1);break;case 2:case 9:if(Fm(d)){Oe=0,Wt=null,Hg(n);break}n=function(){Oe!==2&&Oe!==9||Be!==t||(Oe=7),jn(t)},d.then(n,n);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Fm(d)?(Oe=0,Wt=null,Hg(n)):(Oe=0,Wt=null,tr(t,n,d,7));break;case 5:var g=null;switch(ye.tag){case 26:g=ye.memoizedState;case 5:case 27:var b=ye;if(g?Ay(g):b.stateNode.complete){Oe=0,Wt=null;var _=b.sibling;if(_!==null)ye=_;else{var N=b.return;N!==null?(ye=N,al(N)):ye=null}break t}}Oe=0,Wt=null,tr(t,n,d,5);break;case 6:Oe=0,Wt=null,tr(t,n,d,6);break;case 8:Fc(),et=6;break e;default:throw Error(o(462))}}OT();break}catch(B){Vg(t,B)}while(!0);return qn=ni=null,U.H=s,U.A=u,ze=i,ye!==null?0:(Be=null,be=0,Ts(),et)}function OT(){for(;ye!==null&&!mt();)Zg(ye)}function Zg(t){var n=cg(t.alternate,t,ea);t.memoizedProps=t.pendingProps,n===null?al(t):ye=n}function Hg(t){var n=t,i=n.alternate;switch(n.tag){case 15:case 0:n=ig(i,n,n.pendingProps,n.type,void 0,be);break;case 11:n=ig(i,n,n.pendingProps,n.type.render,n.ref,be);break;case 5:dc(n);default:dg(i,n),n=ye=Bm(n,ea),n=cg(i,n,ea)}t.memoizedProps=t.pendingProps,n===null?al(t):ye=n}function tr(t,n,i,s){qn=ni=null,dc(n),qi=null,Jr=0;var u=n.return;try{if(bT(t,u,n,i,be)){et=1,qs(t,sn(i,t.current)),ye=null;return}}catch(d){if(u!==null)throw ye=u,d;et=1,qs(t,sn(i,t.current)),ye=null;return}n.flags&32768?(Te||s===1?t=!0:Ji||(be&536870912)!==0?t=!1:(Ea=t=!0,(s===2||s===9||s===3||s===6)&&(s=Jt.current,s!==null&&s.tag===13&&(s.flags|=16384))),$g(n,t)):al(n)}function al(t){var n=t;do{if((n.flags&32768)!==0){$g(n,Ea);return}t=n.return;var i=TT(n.alternate,n,ea);if(i!==null){ye=i;return}if(n=n.sibling,n!==null){ye=n;return}ye=n=t}while(n!==null);et===0&&(et=5)}function $g(t,n){do{var i=_T(t.alternate,t);if(i!==null){i.flags&=32767,ye=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(t=t.sibling,t!==null)){ye=t;return}ye=t=i}while(t!==null);et=6,ye=null}function Gg(t,n,i,s,u,d,g,b,_){t.cancelPendingCommit=null;do il();while(pt!==0);if((ze&6)!==0)throw Error(o(327));if(n!==null){if(n===t.current)throw Error(o(177));if(d=n.lanes|n.childLanes,d|=Bu,cx(t,i,d,g,b,_),t===Be&&(ye=Be=null,be=0),Wi=n,za=t,ta=i,Xc=d,Kc=u,Dg=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,kT(xt,function(){return Kg(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,u=X.p,X.p=2,g=ze,ze|=4;try{ET(t,n,i)}finally{ze=g,X.p=u,U.T=s}}pt=1,qg(),Yg(),Pg()}}function qg(){if(pt===1){pt=0;var t=za,n=Wi,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var s=X.p;X.p=2;var u=ze;ze|=4;try{Eg(n,t);var d=cf,g=Mm(t.containerInfo),b=d.focusedElem,_=d.selectionRange;if(g!==b&&b&&b.ownerDocument&&Rm(b.ownerDocument.documentElement,b)){if(_!==null&&ju(b)){var N=_.start,B=_.end;if(B===void 0&&(B=N),"selectionStart"in b)b.selectionStart=N,b.selectionEnd=Math.min(B,b.value.length);else{var G=b.ownerDocument||document,j=G&&G.defaultView||window;if(j.getSelection){var V=j.getSelection(),ee=b.textContent.length,ue=Math.min(_.start,ee),Ue=_.end===void 0?ue:Math.min(_.end,ee);!V.extend&&ue>Ue&&(g=Ue,Ue=ue,ue=g);var z=Cm(b,ue),E=Cm(b,Ue);if(z&&E&&(V.rangeCount!==1||V.anchorNode!==z.node||V.anchorOffset!==z.offset||V.focusNode!==E.node||V.focusOffset!==E.offset)){var D=G.createRange();D.setStart(z.node,z.offset),V.removeAllRanges(),ue>Ue?(V.addRange(D),V.extend(E.node,E.offset)):(D.setEnd(E.node,E.offset),V.addRange(D))}}}}for(G=[],V=b;V=V.parentNode;)V.nodeType===1&&G.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<G.length;b++){var H=G[b];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}gl=!!uf,cf=uf=null}finally{ze=u,X.p=s,U.T=i}}t.current=n,pt=2}}function Yg(){if(pt===2){pt=0;var t=za,n=Wi,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var s=X.p;X.p=2;var u=ze;ze|=4;try{bg(t,n.alternate,n)}finally{ze=u,X.p=s,U.T=i}}pt=3}}function Pg(){if(pt===4||pt===3){pt=0,St();var t=za,n=Wi,i=ta,s=Dg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?pt=5:(pt=0,Wi=za=null,Xg(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(Aa=null),pu(i),n=n.stateNode,Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(Nr,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=U.T,u=X.p,X.p=2,U.T=null;try{for(var d=t.onRecoverableError,g=0;g<s.length;g++){var b=s[g];d(b.value,{componentStack:b.stack})}}finally{U.T=n,X.p=u}}(ta&3)!==0&&il(),jn(t),u=t.pendingLanes,(i&261930)!==0&&(u&42)!==0?t===Qc?po++:(po=0,Qc=t):po=0,go(0)}}function Xg(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Qr(n)))}function il(){return qg(),Yg(),Pg(),Kg()}function Kg(){if(pt!==5)return!1;var t=za,n=Xc;Xc=0;var i=pu(ta),s=U.T,u=X.p;try{X.p=32>i?32:i,U.T=null,i=Kc,Kc=null;var d=za,g=ta;if(pt=0,Wi=za=null,ta=0,(ze&6)!==0)throw Error(o(331));var b=ze;if(ze|=4,Rg(d.current),Ag(d,d.current,g,i),ze=b,go(0,!1),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(Nr,d)}catch{}return!0}finally{X.p=u,U.T=s,Xg(t,n)}}function Qg(t,n,i){n=sn(i,n),n=zc(t.stateNode,n,2),t=Sa(t,n,2),t!==null&&(kr(t,2),jn(t))}function De(t,n,i){if(t.tag===3)Qg(t,t,i);else for(;n!==null;){if(n.tag===3){Qg(n,t,i);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Aa===null||!Aa.has(s))){t=sn(i,t),i=Fp(2),s=Sa(n,i,2),s!==null&&(Jp(i,s,n,t),kr(s,2),jn(s));break}}n=n.return}}function Ic(t,n,i){var s=t.pingCache;if(s===null){s=t.pingCache=new zT;var u=new Set;s.set(n,u)}else u=s.get(n),u===void 0&&(u=new Set,s.set(n,u));u.has(i)||(qc=!0,u.add(i),t=DT.bind(null,t,n,i),n.then(t,t))}function DT(t,n,i){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Be===t&&(be&i)===i&&(et===4||et===3&&(be&62914560)===be&&300>Fe()-Is?(ze&2)===0&&er(t,0):Yc|=i,Ii===be&&(Ii=0)),jn(t)}function Fg(t,n){n===0&&(n=qh()),t=Wa(t,n),t!==null&&(kr(t,n),jn(t))}function NT(t){var n=t.memoizedState,i=0;n!==null&&(i=n.retryLane),Fg(t,i)}function jT(t,n){var i=0;switch(t.tag){case 31:case 13:var s=t.stateNode,u=t.memoizedState;u!==null&&(i=u.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(n),Fg(t,i)}function kT(t,n){return Dt(t,n)}var rl=null,nr=null,Wc=!1,ol=!1,ef=!1,Ra=0;function jn(t){t!==nr&&t.next===null&&(nr===null?rl=nr=t:nr=nr.next=t),ol=!0,Wc||(Wc=!0,LT())}function go(t,n){if(!ef&&ol){ef=!0;do for(var i=!1,s=rl;s!==null;){if(t!==0){var u=s.pendingLanes;if(u===0)var d=0;else{var g=s.suspendedLanes,b=s.pingedLanes;d=(1<<31-Kt(42|t)+1)-1,d&=u&~(g&~b),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,ey(s,d))}else d=be,d=cs(s,s===Be?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||jr(s,d)||(i=!0,ey(s,d));s=s.next}while(i);ef=!1}}function VT(){Jg()}function Jg(){ol=Wc=!1;var t=0;Ra!==0&&XT()&&(t=Ra);for(var n=Fe(),i=null,s=rl;s!==null;){var u=s.next,d=Ig(s,n);d===0?(s.next=null,i===null?rl=u:i.next=u,u===null&&(nr=i)):(i=s,(t!==0||(d&3)!==0)&&(ol=!0)),s=u}pt!==0&&pt!==5||go(t),Ra!==0&&(Ra=0)}function Ig(t,n){for(var i=t.suspendedLanes,s=t.pingedLanes,u=t.expirationTimes,d=t.pendingLanes&-62914561;0<d;){var g=31-Kt(d),b=1<<g,_=u[g];_===-1?((b&i)===0||(b&s)!==0)&&(u[g]=ux(b,n)):_<=n&&(t.expiredLanes|=b),d&=~b}if(n=Be,i=be,i=cs(t,t===n?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,i===0||t===n&&(Oe===2||Oe===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Mn(s),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||jr(t,i)){if(n=i&-i,n===t.callbackPriority)return n;switch(s!==null&&Mn(s),pu(i)){case 2:case 8:i=Or;break;case 32:i=xt;break;case 268435456:i=Ti;break;default:i=xt}return s=Wg.bind(null,t),i=Dt(i,s),t.callbackPriority=n,t.callbackNode=i,n}return s!==null&&s!==null&&Mn(s),t.callbackPriority=2,t.callbackNode=null,2}function Wg(t,n){if(pt!==0&&pt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(il()&&t.callbackNode!==i)return null;var s=be;return s=cs(t,t===Be?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(jg(t,s,n),Ig(t,Fe()),t.callbackNode!=null&&t.callbackNode===i?Wg.bind(null,t):null)}function ey(t,n){if(il())return null;jg(t,n,!0)}function LT(){QT(function(){(ze&6)!==0?Dt(Mr,VT):Jg()})}function tf(){if(Ra===0){var t=Hi;t===0&&(t=ss,ss<<=1,(ss&261888)===0&&(ss=256)),Ra=t}return Ra}function ty(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ms(""+t)}function ny(t,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,t.id&&i.setAttribute("form",t.id),n.parentNode.insertBefore(i,n),t=new FormData(t),i.parentNode.removeChild(i),t}function UT(t,n,i,s,u){if(n==="submit"&&i&&i.stateNode===u){var d=ty((u[Ut]||null).action),g=s.submitter;g&&(n=(n=g[Ut]||null)?ty(n.formAction):g.getAttribute("formAction"),n!==null&&(d=n,g=null));var b=new vs("action","action",null,s,u);t.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ra!==0){var _=g?ny(u,g):new FormData(u);xc(i,{pending:!0,data:_,method:u.method,action:d},null,_)}}else typeof d=="function"&&(b.preventDefault(),_=g?ny(u,g):new FormData(u),xc(i,{pending:!0,data:_,method:u.method,action:d},d,_))},currentTarget:u}]})}}for(var nf=0;nf<Uu.length;nf++){var af=Uu[nf],BT=af.toLowerCase(),ZT=af[0].toUpperCase()+af.slice(1);bn(BT,"on"+ZT)}bn(Nm,"onAnimationEnd"),bn(jm,"onAnimationIteration"),bn(km,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn(nT,"onTransitionRun"),bn(aT,"onTransitionStart"),bn(iT,"onTransitionCancel"),bn(Vm,"onTransitionEnd"),zi("onMouseEnter",["mouseout","mouseover"]),zi("onMouseLeave",["mouseout","mouseover"]),zi("onPointerEnter",["pointerout","pointerover"]),zi("onPointerLeave",["pointerout","pointerover"]),Qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="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(" "),HT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yo));function ay(t,n){n=(n&4)!==0;for(var i=0;i<t.length;i++){var s=t[i],u=s.event;s=s.listeners;e:{var d=void 0;if(n)for(var g=s.length-1;0<=g;g--){var b=s[g],_=b.instance,N=b.currentTarget;if(b=b.listener,_!==d&&u.isPropagationStopped())break e;d=b,u.currentTarget=N;try{d(u)}catch(B){xs(B)}u.currentTarget=null,d=_}else for(g=0;g<s.length;g++){if(b=s[g],_=b.instance,N=b.currentTarget,b=b.listener,_!==d&&u.isPropagationStopped())break e;d=b,u.currentTarget=N;try{d(u)}catch(B){xs(B)}u.currentTarget=null,d=_}}}}function ve(t,n){var i=n[gu];i===void 0&&(i=n[gu]=new Set);var s=t+"__bubble";i.has(s)||(iy(n,t,2,!1),i.add(s))}function rf(t,n,i){var s=0;n&&(s|=4),iy(i,t,s,n)}var sl="_reactListening"+Math.random().toString(36).slice(2);function of(t){if(!t[sl]){t[sl]=!0,Jh.forEach(function(i){i!=="selectionchange"&&(HT.has(i)||rf(i,!1,t),rf(i,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[sl]||(n[sl]=!0,rf("selectionchange",!1,n))}}function iy(t,n,i,s){switch(Ny(n)){case 2:var u=p_;break;case 8:u=g_;break;default:u=xf}i=u.bind(null,n,i,t),u=void 0,!wu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),s?u!==void 0?t.addEventListener(n,i,{capture:!0,passive:u}):t.addEventListener(n,i,!0):u!==void 0?t.addEventListener(n,i,{passive:u}):t.addEventListener(n,i,!1)}function sf(t,n,i,s,u){var d=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var b=s.stateNode.containerInfo;if(b===u)break;if(g===4)for(g=s.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===u)return;g=g.return}for(;b!==null;){if(g=Ei(b),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){s=d=g;continue e}b=b.parentNode}}s=s.return}um(function(){var N=d,B=_u(i),G=[];e:{var j=Lm.get(t);if(j!==void 0){var V=vs,ee=t;switch(t){case"keypress":if(gs(i)===0)break e;case"keydown":case"keyup":V=jx;break;case"focusin":ee="focus",V=Ru;break;case"focusout":ee="blur",V=Ru;break;case"beforeblur":case"afterblur":V=Ru;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=dm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Tx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=Lx;break;case Nm:case jm:case km:V=wx;break;case Vm:V=Bx;break;case"scroll":case"scrollend":V=Sx;break;case"wheel":V=Hx;break;case"copy":case"cut":case"paste":V=zx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=mm;break;case"toggle":case"beforetoggle":V=Gx}var ue=(n&4)!==0,Ue=!ue&&(t==="scroll"||t==="scrollend"),z=ue?j!==null?j+"Capture":null:j;ue=[];for(var E=N,D;E!==null;){var H=E;if(D=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||D===null||z===null||(H=Ur(E,z),H!=null&&ue.push(vo(E,H,D))),Ue)break;E=E.return}0<ue.length&&(j=new V(j,ee,null,i,B),G.push({event:j,listeners:ue}))}}if((n&7)===0){e:{if(j=t==="mouseover"||t==="pointerover",V=t==="mouseout"||t==="pointerout",j&&i!==Tu&&(ee=i.relatedTarget||i.fromElement)&&(Ei(ee)||ee[_i]))break e;if((V||j)&&(j=B.window===B?B:(j=B.ownerDocument)?j.defaultView||j.parentWindow:window,V?(ee=i.relatedTarget||i.toElement,V=N,ee=ee?Ei(ee):null,ee!==null&&(Ue=f(ee),ue=ee.tag,ee!==Ue||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(V=null,ee=N),V!==ee)){if(ue=dm,H="onMouseLeave",z="onMouseEnter",E="mouse",(t==="pointerout"||t==="pointerover")&&(ue=mm,H="onPointerLeave",z="onPointerEnter",E="pointer"),Ue=V==null?j:Lr(V),D=ee==null?j:Lr(ee),j=new ue(H,E+"leave",V,i,B),j.target=Ue,j.relatedTarget=D,H=null,Ei(B)===N&&(ue=new ue(z,E+"enter",ee,i,B),ue.target=D,ue.relatedTarget=Ue,H=ue),Ue=H,V&&ee)t:{for(ue=$T,z=V,E=ee,D=0,H=z;H;H=ue(H))D++;H=0;for(var oe=E;oe;oe=ue(oe))H++;for(;0<D-H;)z=ue(z),D--;for(;0<H-D;)E=ue(E),H--;for(;D--;){if(z===E||E!==null&&z===E.alternate){ue=z;break t}z=ue(z),E=ue(E)}ue=null}else ue=null;V!==null&&ry(G,j,V,ue,!1),ee!==null&&Ue!==null&&ry(G,Ue,ee,ue,!0)}}e:{if(j=N?Lr(N):window,V=j.nodeName&&j.nodeName.toLowerCase(),V==="select"||V==="input"&&j.type==="file")var Ee=Tm;else if(Sm(j))if(_m)Ee=Wx;else{Ee=Jx;var ie=Fx}else V=j.nodeName,!V||V.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?N&&xu(N.elementType)&&(Ee=Tm):Ee=Ix;if(Ee&&(Ee=Ee(t,N))){xm(G,Ee,i,B);break e}ie&&ie(t,j,N),t==="focusout"&&N&&j.type==="number"&&N.memoizedProps.value!=null&&Su(j,"number",j.value)}switch(ie=N?Lr(N):window,t){case"focusin":(Sm(ie)||ie.contentEditable==="true")&&(Ni=ie,ku=N,Pr=null);break;case"focusout":Pr=ku=Ni=null;break;case"mousedown":Vu=!0;break;case"contextmenu":case"mouseup":case"dragend":Vu=!1,Om(G,i,B);break;case"selectionchange":if(tT)break;case"keydown":case"keyup":Om(G,i,B)}var me;if(Ou)e:{switch(t){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Di?vm(t,i)&&(Se="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Se="onCompositionStart");Se&&(pm&&i.locale!=="ko"&&(Di||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Di&&(me=cm()):(ha=B,Au="value"in ha?ha.value:ha.textContent,Di=!0)),ie=ll(N,Se),0<ie.length&&(Se=new hm(Se,t,null,i,B),G.push({event:Se,listeners:ie}),me?Se.data=me:(me=bm(i),me!==null&&(Se.data=me)))),(me=Yx?Px(t,i):Xx(t,i))&&(Se=ll(N,"onBeforeInput"),0<Se.length&&(ie=new hm("onBeforeInput","beforeinput",null,i,B),G.push({event:ie,listeners:Se}),ie.data=me)),UT(G,t,N,i,B)}ay(G,n)})}function vo(t,n,i){return{instance:t,listener:n,currentTarget:i}}function ll(t,n){for(var i=n+"Capture",s=[];t!==null;){var u=t,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=Ur(t,i),u!=null&&s.unshift(vo(t,u,d)),u=Ur(t,n),u!=null&&s.push(vo(t,u,d))),t.tag===3)return s;t=t.return}return[]}function $T(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function ry(t,n,i,s,u){for(var d=n._reactName,g=[];i!==null&&i!==s;){var b=i,_=b.alternate,N=b.stateNode;if(b=b.tag,_!==null&&_===s)break;b!==5&&b!==26&&b!==27||N===null||(_=N,u?(N=Ur(i,d),N!=null&&g.unshift(vo(i,N,_))):u||(N=Ur(i,d),N!=null&&g.push(vo(i,N,_)))),i=i.return}g.length!==0&&t.push({event:n,listeners:g})}var GT=/\r\n?/g,qT=/\u0000|\uFFFD/g;function oy(t){return(typeof t=="string"?t:""+t).replace(GT,`
9
+ `).replace(qT,"")}function sy(t,n){return n=oy(n),oy(t)===n}function Le(t,n,i,s,u,d){switch(i){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Ri(t,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Ri(t,""+s);break;case"className":ds(t,"class",s);break;case"tabIndex":ds(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ds(t,i,s);break;case"style":sm(t,s,d);break;case"data":if(n!=="object"){ds(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||i!=="href")){t.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=ms(""+s),t.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(i,"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 d=="function"&&(i==="formAction"?(n!=="input"&&Le(t,n,"name",u.name,u,null),Le(t,n,"formEncType",u.formEncType,u,null),Le(t,n,"formMethod",u.formMethod,u,null),Le(t,n,"formTarget",u.formTarget,u,null)):(Le(t,n,"encType",u.encType,u,null),Le(t,n,"method",u.method,u,null),Le(t,n,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=ms(""+s),t.setAttribute(i,s);break;case"onClick":s!=null&&(t.onclick=Zn);break;case"onScroll":s!=null&&ve("scroll",t);break;case"onScrollEnd":s!=null&&ve("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(u.children!=null)throw Error(o(60));t.innerHTML=i}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}i=ms(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,""+s):t.removeAttribute(i);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":s===!0?t.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,s):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(i,s):t.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(i):t.setAttribute(i,s);break;case"popover":ve("beforetoggle",t),ve("toggle",t),fs(t,"popover",s);break;case"xlinkActuate":Bn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Bn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Bn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Bn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Bn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Bn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Bn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Bn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Bn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":fs(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=vx.get(i)||i,fs(t,i,s))}}function lf(t,n,i,s,u,d){switch(i){case"style":sm(t,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(u.children!=null)throw Error(o(60));t.innerHTML=i}}break;case"children":typeof s=="string"?Ri(t,s):(typeof s=="number"||typeof s=="bigint")&&Ri(t,""+s);break;case"onScroll":s!=null&&ve("scroll",t);break;case"onScrollEnd":s!=null&&ve("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ih.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),n=i.slice(2,u?i.length-7:void 0),d=t[Ut]||null,d=d!=null?d[i]:null,typeof d=="function"&&t.removeEventListener(n,d,u),typeof s=="function")){typeof d!="function"&&d!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(n,s,u);break e}i in t?t[i]=s:s===!0?t.setAttribute(i,""):fs(t,i,s)}}}function At(t,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",t),ve("load",t);var s=!1,u=!1,d;for(d in i)if(i.hasOwnProperty(d)){var g=i[d];if(g!=null)switch(d){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:Le(t,n,d,g,i,null)}}u&&Le(t,n,"srcSet",i.srcSet,i,null),s&&Le(t,n,"src",i.src,i,null);return;case"input":ve("invalid",t);var b=d=g=u=null,_=null,N=null;for(s in i)if(i.hasOwnProperty(s)){var B=i[s];if(B!=null)switch(s){case"name":u=B;break;case"type":g=B;break;case"checked":_=B;break;case"defaultChecked":N=B;break;case"value":d=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,n));break;default:Le(t,n,s,B,i,null)}}am(t,d,b,_,N,g,u,!1);return;case"select":ve("invalid",t),s=g=d=null;for(u in i)if(i.hasOwnProperty(u)&&(b=i[u],b!=null))switch(u){case"value":d=b;break;case"defaultValue":g=b;break;case"multiple":s=b;default:Le(t,n,u,b,i,null)}n=d,i=g,t.multiple=!!s,n!=null?Ci(t,!!s,n,!1):i!=null&&Ci(t,!!s,i,!0);return;case"textarea":ve("invalid",t),d=u=s=null;for(g in i)if(i.hasOwnProperty(g)&&(b=i[g],b!=null))switch(g){case"value":s=b;break;case"defaultValue":u=b;break;case"children":d=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:Le(t,n,g,b,i,null)}rm(t,s,u,d);return;case"option":for(_ in i)i.hasOwnProperty(_)&&(s=i[_],s!=null)&&(_==="selected"?t.selected=s&&typeof s!="function"&&typeof s!="symbol":Le(t,n,_,s,i,null));return;case"dialog":ve("beforetoggle",t),ve("toggle",t),ve("cancel",t),ve("close",t);break;case"iframe":case"object":ve("load",t);break;case"video":case"audio":for(s=0;s<yo.length;s++)ve(yo[s],t);break;case"image":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"embed":case"source":case"link":ve("error",t),ve("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in i)if(i.hasOwnProperty(N)&&(s=i[N],s!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:Le(t,n,N,s,i,null)}return;default:if(xu(n)){for(B in i)i.hasOwnProperty(B)&&(s=i[B],s!==void 0&&lf(t,n,B,s,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(s=i[b],s!=null&&Le(t,n,b,s,i,null))}function YT(t,n,i,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,g=null,b=null,_=null,N=null,B=null;for(V in i){var G=i[V];if(i.hasOwnProperty(V)&&G!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":_=G;default:s.hasOwnProperty(V)||Le(t,n,V,null,s,G)}}for(var j in s){var V=s[j];if(G=i[j],s.hasOwnProperty(j)&&(V!=null||G!=null))switch(j){case"type":d=V;break;case"name":u=V;break;case"checked":N=V;break;case"defaultChecked":B=V;break;case"value":g=V;break;case"defaultValue":b=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,n));break;default:V!==G&&Le(t,n,j,V,s,G)}}bu(t,g,b,_,N,B,d,u);return;case"select":V=g=b=j=null;for(d in i)if(_=i[d],i.hasOwnProperty(d)&&_!=null)switch(d){case"value":break;case"multiple":V=_;default:s.hasOwnProperty(d)||Le(t,n,d,null,s,_)}for(u in s)if(d=s[u],_=i[u],s.hasOwnProperty(u)&&(d!=null||_!=null))switch(u){case"value":j=d;break;case"defaultValue":b=d;break;case"multiple":g=d;default:d!==_&&Le(t,n,u,d,s,_)}n=b,i=g,s=V,j!=null?Ci(t,!!i,j,!1):!!s!=!!i&&(n!=null?Ci(t,!!i,n,!0):Ci(t,!!i,i?[]:"",!1));return;case"textarea":V=j=null;for(b in i)if(u=i[b],i.hasOwnProperty(b)&&u!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Le(t,n,b,null,s,u)}for(g in s)if(u=s[g],d=i[g],s.hasOwnProperty(g)&&(u!=null||d!=null))switch(g){case"value":j=u;break;case"defaultValue":V=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&Le(t,n,g,u,s,d)}im(t,j,V);return;case"option":for(var ee in i)j=i[ee],i.hasOwnProperty(ee)&&j!=null&&!s.hasOwnProperty(ee)&&(ee==="selected"?t.selected=!1:Le(t,n,ee,null,s,j));for(_ in s)j=s[_],V=i[_],s.hasOwnProperty(_)&&j!==V&&(j!=null||V!=null)&&(_==="selected"?t.selected=j&&typeof j!="function"&&typeof j!="symbol":Le(t,n,_,j,s,V));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 ue in i)j=i[ue],i.hasOwnProperty(ue)&&j!=null&&!s.hasOwnProperty(ue)&&Le(t,n,ue,null,s,j);for(N in s)if(j=s[N],V=i[N],s.hasOwnProperty(N)&&j!==V&&(j!=null||V!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(137,n));break;default:Le(t,n,N,j,s,V)}return;default:if(xu(n)){for(var Ue in i)j=i[Ue],i.hasOwnProperty(Ue)&&j!==void 0&&!s.hasOwnProperty(Ue)&&lf(t,n,Ue,void 0,s,j);for(B in s)j=s[B],V=i[B],!s.hasOwnProperty(B)||j===V||j===void 0&&V===void 0||lf(t,n,B,j,s,V);return}}for(var z in i)j=i[z],i.hasOwnProperty(z)&&j!=null&&!s.hasOwnProperty(z)&&Le(t,n,z,null,s,j);for(G in s)j=s[G],V=i[G],!s.hasOwnProperty(G)||j===V||j==null&&V==null||Le(t,n,G,j,s,V)}function ly(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PT(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var u=i[s],d=u.transferSize,g=u.initiatorType,b=u.duration;if(d&&b&&ly(g)){for(g=0,b=u.responseEnd,s+=1;s<i.length;s++){var _=i[s],N=_.startTime;if(N>b)break;var B=_.transferSize,G=_.initiatorType;B&&ly(G)&&(_=_.responseEnd,g+=B*(_<b?1:(b-N)/(_-N)))}if(--s,n+=8*(d+g)/(u.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var uf=null,cf=null;function ul(t){return t.nodeType===9?t:t.ownerDocument}function uy(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function cy(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function ff(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var df=null;function XT(){var t=window.event;return t&&t.type==="popstate"?t===df?!1:(df=t,!0):(df=null,!1)}var fy=typeof setTimeout=="function"?setTimeout:void 0,KT=typeof clearTimeout=="function"?clearTimeout:void 0,dy=typeof Promise=="function"?Promise:void 0,QT=typeof queueMicrotask=="function"?queueMicrotask:typeof dy<"u"?function(t){return dy.resolve(null).then(t).catch(FT)}:fy;function FT(t){setTimeout(function(){throw t})}function Ma(t){return t==="head"}function hy(t,n){var i=n,s=0;do{var u=i.nextSibling;if(t.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(s===0){t.removeChild(u),or(n);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")bo(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,bo(i);for(var d=i.firstChild;d;){var g=d.nextSibling,b=d.nodeName;d[Vr]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=g}}else i==="body"&&bo(t.ownerDocument.body);i=u}while(i);or(n)}function my(t,n){var i=t;t=0;do{var s=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=s}while(i)}function hf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":hf(i),yu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function JT(t,n,i,s){for(;t.nodeType===1;){var u=i;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Vr])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(d=t.getAttribute("rel"),d==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(d!==u.rel||t.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||t.getAttribute("title")!==(u.title==null?null:u.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(d=t.getAttribute("src"),(d!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===d)return t}else return t;if(t=dn(t.nextSibling),t===null)break}return null}function IT(t,n,i){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=dn(t.nextSibling),t===null))return null;return t}function py(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=dn(t.nextSibling),t===null))return null;return t}function mf(t){return t.data==="$?"||t.data==="$~"}function pf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function WT(t,n){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||i.readyState!=="loading")n();else{var s=function(){n(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function dn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var gf=null;function gy(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(n===0)return dn(t.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}t=t.nextSibling}return null}function yy(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return t;n--}else i!=="/$"&&i!=="/&"||n++}t=t.previousSibling}return null}function vy(t,n,i){switch(n=ul(i),t){case"html":if(t=n.documentElement,!t)throw Error(o(452));return t;case"head":if(t=n.head,!t)throw Error(o(453));return t;case"body":if(t=n.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function bo(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);yu(t)}var hn=new Map,by=new Set;function cl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var na=X.d;X.d={f:e_,r:t_,D:n_,C:a_,L:i_,m:r_,X:s_,S:o_,M:l_};function e_(){var t=na.f(),n=tl();return t||n}function t_(t){var n=wi(t);n!==null&&n.tag===5&&n.type==="form"?Vp(n):na.r(t)}var ar=typeof document>"u"?null:document;function Sy(t,n,i){var s=ar;if(s&&typeof n=="string"&&n){var u=rn(n);u='link[rel="'+t+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),by.has(u)||(by.add(u),t={rel:t,crossOrigin:i,href:n},s.querySelector(u)===null&&(n=s.createElement("link"),At(n,"link",t),vt(n),s.head.appendChild(n)))}}function n_(t){na.D(t),Sy("dns-prefetch",t,null)}function a_(t,n){na.C(t,n),Sy("preconnect",t,n)}function i_(t,n,i){na.L(t,n,i);var s=ar;if(s&&t&&n){var u='link[rel="preload"][as="'+rn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+rn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+rn(i.imageSizes)+'"]')):u+='[href="'+rn(t)+'"]';var d=u;switch(n){case"style":d=ir(t);break;case"script":d=rr(t)}hn.has(d)||(t=v({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:t,as:n},i),hn.set(d,t),s.querySelector(u)!==null||n==="style"&&s.querySelector(So(d))||n==="script"&&s.querySelector(xo(d))||(n=s.createElement("link"),At(n,"link",t),vt(n),s.head.appendChild(n)))}}function r_(t,n){na.m(t,n);var i=ar;if(i&&t){var s=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+rn(s)+'"][href="'+rn(t)+'"]',d=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=rr(t)}if(!hn.has(d)&&(t=v({rel:"modulepreload",href:t},n),hn.set(d,t),i.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(xo(d)))return}s=i.createElement("link"),At(s,"link",t),vt(s),i.head.appendChild(s)}}}function o_(t,n,i){na.S(t,n,i);var s=ar;if(s&&t){var u=Ai(s).hoistableStyles,d=ir(t);n=n||"default";var g=u.get(d);if(!g){var b={loading:0,preload:null};if(g=s.querySelector(So(d)))b.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":n},i),(i=hn.get(d))&&yf(t,i);var _=g=s.createElement("link");vt(_),At(_,"link",t),_._p=new Promise(function(N,B){_.onload=N,_.onerror=B}),_.addEventListener("load",function(){b.loading|=1}),_.addEventListener("error",function(){b.loading|=2}),b.loading|=4,fl(g,n,s)}g={type:"stylesheet",instance:g,count:1,state:b},u.set(d,g)}}}function s_(t,n){na.X(t,n);var i=ar;if(i&&t){var s=Ai(i).hoistableScripts,u=rr(t),d=s.get(u);d||(d=i.querySelector(xo(u)),d||(t=v({src:t,async:!0},n),(n=hn.get(u))&&vf(t,n),d=i.createElement("script"),vt(d),At(d,"link",t),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(u,d))}}function l_(t,n){na.M(t,n);var i=ar;if(i&&t){var s=Ai(i).hoistableScripts,u=rr(t),d=s.get(u);d||(d=i.querySelector(xo(u)),d||(t=v({src:t,async:!0,type:"module"},n),(n=hn.get(u))&&vf(t,n),d=i.createElement("script"),vt(d),At(d,"link",t),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(u,d))}}function xy(t,n,i,s){var u=(u=fe.current)?cl(u):null;if(!u)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=ir(i.href),i=Ai(u).hoistableStyles,s=i.get(n),s||(s={type:"style",instance:null,count:0,state:null},i.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=ir(i.href);var d=Ai(u).hoistableStyles,g=d.get(t);if(g||(u=u.ownerDocument||u,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(t,g),(d=u.querySelector(So(t)))&&!d._p&&(g.instance=d,g.state.loading=5),hn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},hn.set(t,i),d||u_(u,t,i,g.state))),n&&s===null)throw Error(o(528,""));return g}if(n&&s!==null)throw Error(o(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=rr(i),i=Ai(u).hoistableScripts,s=i.get(n),s||(s={type:"script",instance:null,count:0,state:null},i.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function ir(t){return'href="'+rn(t)+'"'}function So(t){return'link[rel="stylesheet"]['+t+"]"}function Ty(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function u_(t,n,i,s){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=t.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),At(n,"link",i),vt(n),t.head.appendChild(n))}function rr(t){return'[src="'+rn(t)+'"]'}function xo(t){return"script[async]"+t}function _y(t,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+rn(i.href)+'"]');if(s)return n.instance=s,vt(s),s;var u=v({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),vt(s),At(s,"style",u),fl(s,i.precedence,t),n.instance=s;case"stylesheet":u=ir(i.href);var d=t.querySelector(So(u));if(d)return n.state.loading|=4,n.instance=d,vt(d),d;s=Ty(i),(u=hn.get(u))&&yf(s,u),d=(t.ownerDocument||t).createElement("link"),vt(d);var g=d;return g._p=new Promise(function(b,_){g.onload=b,g.onerror=_}),At(d,"link",s),n.state.loading|=4,fl(d,i.precedence,t),n.instance=d;case"script":return d=rr(i.src),(u=t.querySelector(xo(d)))?(n.instance=u,vt(u),u):(s=i,(u=hn.get(d))&&(s=v({},i),vf(s,u)),t=t.ownerDocument||t,u=t.createElement("script"),vt(u),At(u,"link",s),t.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,fl(s,i.precedence,t));return n.instance}function fl(t,n,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,d=u,g=0;g<s.length;g++){var b=s[g];if(b.dataset.precedence===n)d=b;else if(d!==u)break}d?d.parentNode.insertBefore(t,d.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(t,n.firstChild))}function yf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function vf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var dl=null;function Ey(t,n,i){if(dl===null){var s=new Map,u=dl=new Map;u.set(i,s)}else u=dl,s=u.get(i),s||(s=new Map,u.set(i,s));if(s.has(t))return s;for(s.set(t,null),i=i.getElementsByTagName(t),u=0;u<i.length;u++){var d=i[u];if(!(d[Vr]||d[Tt]||t==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var g=d.getAttribute(n)||"";g=t+g;var b=s.get(g);b?b.push(d):s.set(g,[d])}}return s}function wy(t,n,i){t=t.ownerDocument||t,t.head.insertBefore(i,n==="title"?t.querySelector("head > title"):null)}function c_(t,n,i){if(i===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Ay(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function f_(t,n,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=ir(s.href),d=n.querySelector(So(u));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=hl.bind(t),n.then(t,t)),i.state.loading|=4,i.instance=d,vt(d);return}d=n.ownerDocument||n,s=Ty(s),(u=hn.get(u))&&yf(s,u),d=d.createElement("link"),vt(d);var g=d;g._p=new Promise(function(b,_){g.onload=b,g.onerror=_}),At(d,"link",s),i.instance=d}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=hl.bind(t),n.addEventListener("load",i),n.addEventListener("error",i))}}var bf=0;function d_(t,n){return t.stylesheets&&t.count===0&&pl(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var s=setTimeout(function(){if(t.stylesheets&&pl(t,t.stylesheets),t.unsuspend){var d=t.unsuspend;t.unsuspend=null,d()}},6e4+n);0<t.imgBytes&&bf===0&&(bf=62500*PT());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&pl(t,t.stylesheets),t.unsuspend)){var d=t.unsuspend;t.unsuspend=null,d()}},(t.imgBytes>bf?50:800)+n);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function hl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pl(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ml=null;function pl(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ml=new Map,n.forEach(h_,t),ml=null,hl.call(t))}function h_(t,n){if(!(n.state.loading&4)){var i=ml.get(t);if(i)var s=i.get(null);else{i=new Map,ml.set(t,i);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var g=u[d];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(i.set(g.dataset.precedence,g),s=g)}s&&i.set(null,s)}u=n.instance,g=u.getAttribute("data-precedence"),d=i.get(g)||s,d===s&&i.set(null,u),i.set(g,u),this.count++,s=hl.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),d?d.parentNode.insertBefore(u,d.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),n.state.loading|=4}}var To={$$typeof:k,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function m_(t,n,i,s,u,d,g,b,_){this.tag=1,this.containerInfo=t,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=hu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hu(0),this.hiddenUpdates=hu(null),this.identifierPrefix=s,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function zy(t,n,i,s,u,d,g,b,_,N,B,G){return t=new m_(t,n,i,g,_,N,B,G,b),n=1,d===!0&&(n|=24),d=Ft(3,null,null,n),t.current=d,d.stateNode=t,n=Ju(),n.refCount++,t.pooledCache=n,n.refCount++,d.memoizedState={element:s,isDehydrated:i,cache:n},tc(d),t}function Cy(t){return t?(t=Vi,t):Vi}function Ry(t,n,i,s,u,d){u=Cy(u),s.context===null?s.context=u:s.pendingContext=u,s=ba(n),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=Sa(t,s,n),i!==null&&(qt(i,t,n),Wr(i,t,n))}function My(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<n?i:n}}function Sf(t,n){My(t,n),(t=t.alternate)&&My(t,n)}function Oy(t){if(t.tag===13||t.tag===31){var n=Wa(t,67108864);n!==null&&qt(n,t,67108864),Sf(t,67108864)}}function Dy(t){if(t.tag===13||t.tag===31){var n=tn();n=mu(n);var i=Wa(t,n);i!==null&&qt(i,t,n),Sf(t,n)}}var gl=!0;function p_(t,n,i,s){var u=U.T;U.T=null;var d=X.p;try{X.p=2,xf(t,n,i,s)}finally{X.p=d,U.T=u}}function g_(t,n,i,s){var u=U.T;U.T=null;var d=X.p;try{X.p=8,xf(t,n,i,s)}finally{X.p=d,U.T=u}}function xf(t,n,i,s){if(gl){var u=Tf(s);if(u===null)sf(t,n,s,yl,i),jy(t,s);else if(v_(u,t,n,i,s))s.stopPropagation();else if(jy(t,s),n&4&&-1<y_.indexOf(t)){for(;u!==null;){var d=wi(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var g=Ka(d.pendingLanes);if(g!==0){var b=d;for(b.pendingLanes|=2,b.entangledLanes|=2;g;){var _=1<<31-Kt(g);b.entanglements[1]|=_,g&=~_}jn(d),(ze&6)===0&&(Ws=Fe()+500,go(0))}}break;case 31:case 13:b=Wa(d,2),b!==null&&qt(b,d,2),tl(),Sf(d,2)}if(d=Tf(s),d===null&&sf(t,n,s,yl,i),d===u)break;u=d}u!==null&&s.stopPropagation()}else sf(t,n,s,null,i)}}function Tf(t){return t=_u(t),_f(t)}var yl=null;function _f(t){if(yl=null,t=Ei(t),t!==null){var n=f(t);if(n===null)t=null;else{var i=n.tag;if(i===13){if(t=c(n),t!==null)return t;t=null}else if(i===31){if(t=h(n),t!==null)return t;t=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return yl=t,null}function Ny(t){switch(t){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(os()){case Mr:return 2;case Or:return 8;case xt:case vn:return 32;case Ti:return 268435456;default:return 32}default:return 32}}var Ef=!1,Oa=null,Da=null,Na=null,_o=new Map,Eo=new Map,ja=[],y_="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 jy(t,n){switch(t){case"focusin":case"focusout":Oa=null;break;case"dragenter":case"dragleave":Da=null;break;case"mouseover":case"mouseout":Na=null;break;case"pointerover":case"pointerout":_o.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Eo.delete(n.pointerId)}}function wo(t,n,i,s,u,d){return t===null||t.nativeEvent!==d?(t={blockedOn:n,domEventName:i,eventSystemFlags:s,nativeEvent:d,targetContainers:[u]},n!==null&&(n=wi(n),n!==null&&Oy(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),t)}function v_(t,n,i,s,u){switch(n){case"focusin":return Oa=wo(Oa,t,n,i,s,u),!0;case"dragenter":return Da=wo(Da,t,n,i,s,u),!0;case"mouseover":return Na=wo(Na,t,n,i,s,u),!0;case"pointerover":var d=u.pointerId;return _o.set(d,wo(_o.get(d)||null,t,n,i,s,u)),!0;case"gotpointercapture":return d=u.pointerId,Eo.set(d,wo(Eo.get(d)||null,t,n,i,s,u)),!0}return!1}function ky(t){var n=Ei(t.target);if(n!==null){var i=f(n);if(i!==null){if(n=i.tag,n===13){if(n=c(i),n!==null){t.blockedOn=n,Qh(t.priority,function(){Dy(i)});return}}else if(n===31){if(n=h(i),n!==null){t.blockedOn=n,Qh(t.priority,function(){Dy(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function vl(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var i=Tf(t.nativeEvent);if(i===null){i=t.nativeEvent;var s=new i.constructor(i.type,i);Tu=s,i.target.dispatchEvent(s),Tu=null}else return n=wi(i),n!==null&&Oy(n),t.blockedOn=i,!1;n.shift()}return!0}function Vy(t,n,i){vl(t)&&i.delete(n)}function b_(){Ef=!1,Oa!==null&&vl(Oa)&&(Oa=null),Da!==null&&vl(Da)&&(Da=null),Na!==null&&vl(Na)&&(Na=null),_o.forEach(Vy),Eo.forEach(Vy)}function bl(t,n){t.blockedOn===n&&(t.blockedOn=null,Ef||(Ef=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,b_)))}var Sl=null;function Ly(t){Sl!==t&&(Sl=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sl===t&&(Sl=null);for(var n=0;n<t.length;n+=3){var i=t[n],s=t[n+1],u=t[n+2];if(typeof s!="function"){if(_f(s||i)===null)continue;break}var d=wi(i);d!==null&&(t.splice(n,3),n-=3,xc(d,{pending:!0,data:u,method:i.method,action:s},s,u))}}))}function or(t){function n(_){return bl(_,t)}Oa!==null&&bl(Oa,t),Da!==null&&bl(Da,t),Na!==null&&bl(Na,t),_o.forEach(n),Eo.forEach(n);for(var i=0;i<ja.length;i++){var s=ja[i];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ja.length&&(i=ja[0],i.blockedOn===null);)ky(i),i.blockedOn===null&&ja.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var u=i[s],d=i[s+1],g=u[Ut]||null;if(typeof d=="function")g||Ly(i);else if(g){var b=null;if(d&&d.hasAttribute("formAction")){if(u=d,g=d[Ut]||null)b=g.formAction;else if(_f(u)!==null)continue}else b=g.action;typeof b=="function"?i[s+1]=b:(i.splice(s,3),s-=3),Ly(i)}}}function Uy(){function t(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(g){return u=g})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function wf(t){this._internalRoot=t}xl.prototype.render=wf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(o(409));var i=n.current,s=tn();Ry(i,s,t,n,null,null)},xl.prototype.unmount=wf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Ry(t.current,2,null,t,null,null),tl(),n[_i]=null}};function xl(t){this._internalRoot=t}xl.prototype.unstable_scheduleHydration=function(t){if(t){var n=Kh();t={blockedOn:null,target:t,priority:n};for(var i=0;i<ja.length&&n!==0&&n<ja[i].priority;i++);ja.splice(i,0,t),i===0&&ky(t)}};var By=a.version;if(By!=="19.2.4")throw Error(o(527,By,"19.2.4"));X.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=p(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var S_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tl.isDisabled&&Tl.supportsFiber)try{Nr=Tl.inject(S_),Xt=Tl}catch{}}return zo.createRoot=function(t,n){if(!l(t))throw Error(o(299));var i=!1,s="",u=Pp,d=Xp,g=Kp;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(g=n.onRecoverableError)),n=zy(t,1,!1,null,null,i,s,null,u,d,g,Uy),t[_i]=n.current,of(t),new wf(n)},zo.hydrateRoot=function(t,n,i){if(!l(t))throw Error(o(299));var s=!1,u="",d=Pp,g=Xp,b=Kp,_=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(_=i.formState)),n=zy(t,1,!0,n,i??null,s,u,_,d,g,b,Uy),n.context=Cy(null),i=n.current,s=tn(),s=mu(s),u=ba(s),u.callback=null,Sa(i,u,s),i=s,n.current.lanes=i,kr(n,i),jn(n),t[_i]=n.current,of(t),new xl(n)},zo.version="19.2.4",zo}var Qy;function O_(){if(Qy)return Cf.exports;Qy=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(a){console.error(a)}}return e(),Cf.exports=M_(),Cf.exports}var D_=O_();var Fy="popstate";function N_(e={}){function a(o,l){let{pathname:f,search:c,hash:h}=o.location;return cd("",{pathname:f,search:c,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function r(o,l){return typeof l=="string"?l:Ho(l)}return k_(a,r,null,e)}function Xe(e,a){if(e===!1||e===null||typeof e>"u")throw new Error(a)}function wn(e,a){if(!e){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function j_(){return Math.random().toString(36).substring(2,10)}function Jy(e,a){return{usr:e.state,key:e.key,idx:a}}function cd(e,a,r=null,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof a=="string"?xr(a):a,state:r,key:a&&a.key||o||j_()}}function Ho({pathname:e="/",search:a="",hash:r=""}){return a&&a!=="?"&&(e+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function xr(e){let a={};if(e){let r=e.indexOf("#");r>=0&&(a.hash=e.substring(r),e=e.substring(0,r));let o=e.indexOf("?");o>=0&&(a.search=e.substring(o),e=e.substring(0,o)),e&&(a.pathname=e)}return a}function k_(e,a,r,o={}){let{window:l=document.defaultView,v5Compat:f=!1}=o,c=l.history,h="POP",m=null,p=y();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function y(){return(c.state||{idx:null}).idx}function v(){h="POP";let O=y(),L=O==null?null:O-p;p=O,m&&m({action:h,location:T.location,delta:L})}function S(O,L){h="PUSH";let C=cd(T.location,O,L);p=y()+1;let k=Jy(C,p),Q=T.createHref(C);try{c.pushState(k,"",Q)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;l.location.assign(Q)}f&&m&&m({action:h,location:T.location,delta:1})}function x(O,L){h="REPLACE";let C=cd(T.location,O,L);p=y();let k=Jy(C,p),Q=T.createHref(C);c.replaceState(k,"",Q),f&&m&&m({action:h,location:T.location,delta:0})}function M(O){return V_(O)}let T={get action(){return h},get location(){return e(l,c)},listen(O){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(Fy,v),m=O,()=>{l.removeEventListener(Fy,v),m=null}},createHref(O){return a(l,O)},createURL:M,encodeLocation(O){let L=M(O);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:S,replace:x,go(O){return c.go(O)}};return T}function V_(e,a=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Xe(r,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Ho(e);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function nb(e,a,r="/"){return L_(e,a,r,!1)}function L_(e,a,r,o){let l=typeof a=="string"?xr(a):a,f=la(l.pathname||"/",r);if(f==null)return null;let c=ab(e);U_(c);let h=null;for(let m=0;h==null&&m<c.length;++m){let p=Q_(f);h=X_(c[m],p,o)}return h}function ab(e,a=[],r=[],o="",l=!1){let f=(c,h,m=l,p)=>{let y={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:h,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&m)return;Xe(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let v=oa([o,y.relativePath]),S=r.concat(y);c.children&&c.children.length>0&&(Xe(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),ab(c.children,a,S,v,m)),!(c.path==null&&!c.index)&&a.push({path:v,score:Y_(v,c.index),routesMeta:S})};return e.forEach((c,h)=>{if(c.path===""||!c.path?.includes("?"))f(c,h);else for(let m of ib(c.path))f(c,h,!0,m)}),a}function ib(e){let a=e.split("/");if(a.length===0)return[];let[r,...o]=a,l=r.endsWith("?"),f=r.replace(/\?$/,"");if(o.length===0)return l?[f,""]:[f];let c=ib(o.join("/")),h=[];return h.push(...c.map(m=>m===""?f:[f,m].join("/"))),l&&h.push(...c),h.map(m=>e.startsWith("/")&&m===""?"/":m)}function U_(e){e.sort((a,r)=>a.score!==r.score?r.score-a.score:P_(a.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var B_=/^:[\w-]+$/,Z_=3,H_=2,$_=1,G_=10,q_=-2,Iy=e=>e==="*";function Y_(e,a){let r=e.split("/"),o=r.length;return r.some(Iy)&&(o+=q_),a&&(o+=H_),r.filter(l=>!Iy(l)).reduce((l,f)=>l+(B_.test(f)?Z_:f===""?$_:G_),o)}function P_(e,a){return e.length===a.length&&e.slice(0,-1).every((o,l)=>o===a[l])?e[e.length-1]-a[a.length-1]:0}function X_(e,a,r=!1){let{routesMeta:o}=e,l={},f="/",c=[];for(let h=0;h<o.length;++h){let m=o[h],p=h===o.length-1,y=f==="/"?a:a.slice(f.length)||"/",v=Hl({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},y),S=m.route;if(!v&&p&&r&&!o[o.length-1].route.index&&(v=Hl({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!v)return null;Object.assign(l,v.params),c.push({params:l,pathname:oa([f,v.pathname]),pathnameBase:W_(oa([f,v.pathnameBase])),route:S}),v.pathnameBase!=="/"&&(f=oa([f,v.pathnameBase]))}return c}function Hl(e,a){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=K_(e.path,e.caseSensitive,e.end),l=a.match(r);if(!l)return null;let f=l[0],c=f.replace(/(.)\/+$/,"$1"),h=l.slice(1);return{params:o.reduce((p,{paramName:y,isOptional:v},S)=>{if(y==="*"){let M=h[S]||"";c=f.slice(0,f.length-M.length).replace(/(.)\/+$/,"$1")}const x=h[S];return v&&!x?p[y]=void 0:p[y]=(x||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:c,pattern:e}}function K_(e,a=!1,r=!0){wn(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 o=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,h,m)=>(o.push({paramName:h,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,a?void 0:"i"),o]}function Q_(e){try{return e.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return wn(!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 (${a}).`),e}}function la(e,a){if(a==="/")return e;if(!e.toLowerCase().startsWith(a.toLowerCase()))return null;let r=a.endsWith("/")?a.length-1:a.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}var F_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function J_(e,a="/"){let{pathname:r,search:o="",hash:l=""}=typeof e=="string"?xr(e):e,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=Wy(r.substring(1),"/"):f=Wy(r,a)):f=a,{pathname:f,search:eE(o),hash:tE(l)}}function Wy(e,a){let r=a.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function Df(e,a,r,o){return`Cannot include a '${e}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function I_(e){return e.filter((a,r)=>r===0||a.route.path&&a.route.path.length>0)}function Kd(e){let a=I_(e);return a.map((r,o)=>o===a.length-1?r.pathname:r.pathnameBase)}function Qd(e,a,r,o=!1){let l;typeof e=="string"?l=xr(e):(l={...e},Xe(!l.pathname||!l.pathname.includes("?"),Df("?","pathname","search",l)),Xe(!l.pathname||!l.pathname.includes("#"),Df("#","pathname","hash",l)),Xe(!l.search||!l.search.includes("#"),Df("#","search","hash",l)));let f=e===""||l.pathname==="",c=f?"/":l.pathname,h;if(c==null)h=r;else{let v=a.length-1;if(!o&&c.startsWith("..")){let S=c.split("/");for(;S[0]==="..";)S.shift(),v-=1;l.pathname=S.join("/")}h=v>=0?a[v]:"/"}let m=J_(l,h),p=c&&c!=="/"&&c.endsWith("/"),y=(f||c===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(p||y)&&(m.pathname+="/"),m}var oa=e=>e.join("/").replace(/\/\/+/g,"/"),W_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),eE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,tE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,nE=class{constructor(e,a,r,o=!1){this.status=e,this.statusText=a||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function aE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function iE(e){return e.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var rb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ob(e,a){let r=e;if(typeof r!="string"||!F_.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let o=r,l=!1;if(rb)try{let f=new URL(window.location.href),c=r.startsWith("//")?new URL(f.protocol+r):new URL(r),h=la(c.pathname,a);c.origin===f.origin&&h!=null?r=h+c.search+c.hash:l=!0}catch{wn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:l,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sb=["POST","PUT","PATCH","DELETE"];new Set(sb);var rE=["GET",...sb];new Set(rE);var Tr=w.createContext(null);Tr.displayName="DataRouter";var nu=w.createContext(null);nu.displayName="DataRouterState";var oE=w.createContext(!1),lb=w.createContext({isTransitioning:!1});lb.displayName="ViewTransition";var sE=w.createContext(new Map);sE.displayName="Fetchers";var lE=w.createContext(null);lE.displayName="Await";var nn=w.createContext(null);nn.displayName="Navigation";var Jo=w.createContext(null);Jo.displayName="Location";var Un=w.createContext({outlet:null,matches:[],isDataRoute:!1});Un.displayName="Route";var Fd=w.createContext(null);Fd.displayName="RouteError";var ub="REACT_ROUTER_ERROR",uE="REDIRECT",cE="ROUTE_ERROR_RESPONSE";function fE(e){if(e.startsWith(`${ub}:${uE}:{`))try{let a=JSON.parse(e.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function dE(e){if(e.startsWith(`${ub}:${cE}:{`))try{let a=JSON.parse(e.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new nE(a.status,a.statusText,a.data)}catch{}}function hE(e,{relative:a}={}){Xe(_r(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=w.useContext(nn),{hash:l,pathname:f,search:c}=Io(e,{relative:a}),h=f;return r!=="/"&&(h=f==="/"?r:oa([r,f])),o.createHref({pathname:h,search:c,hash:l})}function _r(){return w.useContext(Jo)!=null}function An(){return Xe(_r(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Jo).location}var cb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fb(e){w.useContext(nn).static||w.useLayoutEffect(e)}function Jd(){let{isDataRoute:e}=w.useContext(Un);return e?AE():mE()}function mE(){Xe(_r(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(Tr),{basename:a,navigator:r}=w.useContext(nn),{matches:o}=w.useContext(Un),{pathname:l}=An(),f=JSON.stringify(Kd(o)),c=w.useRef(!1);return fb(()=>{c.current=!0}),w.useCallback((m,p={})=>{if(wn(c.current,cb),!c.current)return;if(typeof m=="number"){r.go(m);return}let y=Qd(m,JSON.parse(f),l,p.relative==="path");e==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:oa([a,y.pathname])),(p.replace?r.replace:r.push)(y,p.state,p)},[a,r,f,l,e])}w.createContext(null);function Io(e,{relative:a}={}){let{matches:r}=w.useContext(Un),{pathname:o}=An(),l=JSON.stringify(Kd(r));return w.useMemo(()=>Qd(e,JSON.parse(l),o,a==="path"),[e,l,o,a])}function pE(e,a){return db(e,a)}function db(e,a,r,o,l){Xe(_r(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=w.useContext(nn),{matches:c}=w.useContext(Un),h=c[c.length-1],m=h?h.params:{},p=h?h.pathname:"/",y=h?h.pathnameBase:"/",v=h&&h.route;{let C=v&&v.path||"";mb(p,!v||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${C}">) 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="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let S=An(),x;if(a){let C=typeof a=="string"?xr(a):a;Xe(y==="/"||C.pathname?.startsWith(y),`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 "${y}" but pathname "${C.pathname}" was given in the \`location\` prop.`),x=C}else x=S;let M=x.pathname||"/",T=M;if(y!=="/"){let C=y.replace(/^\//,"").split("/");T="/"+M.replace(/^\//,"").split("/").slice(C.length).join("/")}let O=nb(e,{pathname:T});wn(v||O!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),wn(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 L=SE(O&&O.map(C=>Object.assign({},C,{params:Object.assign({},m,C.params),pathname:oa([y,f.encodeLocation?f.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?y:oa([y,f.encodeLocation?f.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),c,r,o,l);return a&&L?w.createElement(Jo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},L):L}function gE(){let e=wE(),a=aE(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},a),r?w.createElement("pre",{style:l},r):null,c)}var yE=w.createElement(gE,null),hb=class extends w.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,a){return a.location!==e.location||a.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:a.error,location:a.location,revalidation:e.revalidation||a.revalidation}}componentDidCatch(e,a){this.props.onError?this.props.onError(e,a):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 r=dE(e.digest);r&&(e=r)}let a=e!==void 0?w.createElement(Un.Provider,{value:this.props.routeContext},w.createElement(Fd.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(vE,{error:e},a):a}};hb.contextType=oE;var Nf=new WeakMap;function vE({children:e,error:a}){let{basename:r}=w.useContext(nn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=fE(a.digest);if(o){let l=Nf.get(a);if(l)throw l;let f=ob(o.location,r);if(rb&&!Nf.get(a))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw Nf.set(a,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return e}function bE({routeContext:e,match:a,children:r}){let o=w.useContext(Tr);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),w.createElement(Un.Provider,{value:e},r)}function SE(e,a=[],r=null,o=null,l=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let f=e,c=r?.errors;if(c!=null){let y=f.findIndex(v=>v.route.id&&c?.[v.route.id]!==void 0);Xe(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),f=f.slice(0,Math.min(f.length,y+1))}let h=!1,m=-1;if(r)for(let y=0;y<f.length;y++){let v=f[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(m=y),v.route.id){let{loaderData:S,errors:x}=r,M=v.route.loader&&!S.hasOwnProperty(v.route.id)&&(!x||x[v.route.id]===void 0);if(v.route.lazy||M){h=!0,m>=0?f=f.slice(0,m+1):f=[f[0]];break}}}let p=r&&o?(y,v)=>{o(y,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:iE(r.matches),errorInfo:v})}:void 0;return f.reduceRight((y,v,S)=>{let x,M=!1,T=null,O=null;r&&(x=c&&v.route.id?c[v.route.id]:void 0,T=v.route.errorElement||yE,h&&(m<0&&S===0?(mb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,O=null):m===S&&(M=!0,O=v.route.hydrateFallbackElement||null)));let L=a.concat(f.slice(0,S+1)),C=()=>{let k;return x?k=T:M?k=O:v.route.Component?k=w.createElement(v.route.Component,null):v.route.element?k=v.route.element:k=y,w.createElement(bE,{match:v,routeContext:{outlet:y,matches:L,isDataRoute:r!=null},children:k})};return r&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?w.createElement(hb,{location:r.location,revalidation:r.revalidation,component:T,error:x,children:C(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:p}):C()},null)}function Id(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xE(e){let a=w.useContext(Tr);return Xe(a,Id(e)),a}function TE(e){let a=w.useContext(nu);return Xe(a,Id(e)),a}function _E(e){let a=w.useContext(Un);return Xe(a,Id(e)),a}function Wd(e){let a=_E(e),r=a.matches[a.matches.length-1];return Xe(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function EE(){return Wd("useRouteId")}function wE(){let e=w.useContext(Fd),a=TE("useRouteError"),r=Wd("useRouteError");return e!==void 0?e:a.errors?.[r]}function AE(){let{router:e}=xE("useNavigate"),a=Wd("useNavigate"),r=w.useRef(!1);return fb(()=>{r.current=!0}),w.useCallback(async(l,f={})=>{wn(r.current,cb),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:a,...f}))},[e,a])}var ev={};function mb(e,a,r){!a&&!ev[e]&&(ev[e]=!0,wn(!1,r))}w.memo(zE);function zE({routes:e,future:a,state:r,onError:o}){return db(e,void 0,r,o,a)}function pb({to:e,replace:a,state:r,relative:o}){Xe(_r(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=w.useContext(nn);wn(!l,"<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:f}=w.useContext(Un),{pathname:c}=An(),h=Jd(),m=Qd(e,Kd(f),c,o==="path"),p=JSON.stringify(m);return w.useEffect(()=>{h(JSON.parse(p),{replace:a,state:r,relative:o})},[h,p,o,a,r]),null}function pi(e){Xe(!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 CE({basename:e="/",children:a=null,location:r,navigationType:o="POP",navigator:l,static:f=!1,unstable_useTransitions:c}){Xe(!_r(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=e.replace(/^\/*/,"/"),m=w.useMemo(()=>({basename:h,navigator:l,static:f,unstable_useTransitions:c,future:{}}),[h,l,f,c]);typeof r=="string"&&(r=xr(r));let{pathname:p="/",search:y="",hash:v="",state:S=null,key:x="default"}=r,M=w.useMemo(()=>{let T=la(p,h);return T==null?null:{location:{pathname:T,search:y,hash:v,state:S,key:x},navigationType:o}},[h,p,y,v,S,x,o]);return wn(M!=null,`<Router basename="${h}"> is not able to match the URL "${p}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:w.createElement(nn.Provider,{value:m},w.createElement(Jo.Provider,{children:a,value:M}))}function tv({children:e,location:a}){return pE(fd(e),a)}function fd(e,a=[]){let r=[];return w.Children.forEach(e,(o,l)=>{if(!w.isValidElement(o))return;let f=[...a,l];if(o.type===w.Fragment){r.push.apply(r,fd(o.props.children,f));return}Xe(o.type===pi,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Xe(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(c.children=fd(o.props.children,f)),r.push(c)}),r}var kl="get",Vl="application/x-www-form-urlencoded";function au(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function RE(e){return au(e)&&e.tagName.toLowerCase()==="button"}function ME(e){return au(e)&&e.tagName.toLowerCase()==="form"}function OE(e){return au(e)&&e.tagName.toLowerCase()==="input"}function DE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function NE(e,a){return e.button===0&&(!a||a==="_self")&&!DE(e)}var _l=null;function jE(){if(_l===null)try{new FormData(document.createElement("form"),0),_l=!1}catch{_l=!0}return _l}var kE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function jf(e){return e!=null&&!kE.has(e)?(wn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vl}"`),null):e}function VE(e,a){let r,o,l,f,c;if(ME(e)){let h=e.getAttribute("action");o=h?la(h,a):null,r=e.getAttribute("method")||kl,l=jf(e.getAttribute("enctype"))||Vl,f=new FormData(e)}else if(RE(e)||OE(e)&&(e.type==="submit"||e.type==="image")){let h=e.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=e.getAttribute("formaction")||h.getAttribute("action");if(o=m?la(m,a):null,r=e.getAttribute("formmethod")||h.getAttribute("method")||kl,l=jf(e.getAttribute("formenctype"))||jf(h.getAttribute("enctype"))||Vl,f=new FormData(h,e),!jE()){let{name:p,type:y,value:v}=e;if(y==="image"){let S=p?`${p}.`:"";f.append(`${S}x`,"0"),f.append(`${S}y`,"0")}else p&&f.append(p,v)}}else{if(au(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=kl,o=null,l=Vl,c=e}return f&&l==="text/plain"&&(c=f,f=void 0),{action:o,method:r.toLowerCase(),encType:l,formData:f,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function eh(e,a){if(e===!1||e===null||typeof e>"u")throw new Error(a)}function LE(e,a,r,o){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${o}`:l.pathname=`${l.pathname}.${o}`:l.pathname==="/"?l.pathname=`_root.${o}`:a&&la(l.pathname,a)==="/"?l.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${o}`,l}async function UE(e,a){if(e.id in a)return a[e.id];try{let r=await import(e.module);return a[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function BE(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 ZE(e,a,r){let o=await Promise.all(e.map(async l=>{let f=a.routes[l.route.id];if(f){let c=await UE(f,r);return c.links?c.links():[]}return[]}));return qE(o.flat(1).filter(BE).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function nv(e,a,r,o,l,f){let c=(m,p)=>r[p]?m.route.id!==r[p].route.id:!0,h=(m,p)=>r[p].pathname!==m.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==m.params["*"];return f==="assets"?a.filter((m,p)=>c(m,p)||h(m,p)):f==="data"?a.filter((m,p)=>{let y=o.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(c(m,p)||h(m,p))return!0;if(m.route.shouldRevalidate){let v=m.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function HE(e,a,{includeHydrateFallback:r}={}){return $E(e.map(o=>{let l=a.routes[o.route.id];if(!l)return[];let f=[l.module];return l.clientActionModule&&(f=f.concat(l.clientActionModule)),l.clientLoaderModule&&(f=f.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(f=f.concat(l.hydrateFallbackModule)),l.imports&&(f=f.concat(l.imports)),f}).flat(1))}function $E(e){return[...new Set(e)]}function GE(e){let a={},r=Object.keys(e).sort();for(let o of r)a[o]=e[o];return a}function qE(e,a){let r=new Set;return new Set(a),e.reduce((o,l)=>{let f=JSON.stringify(GE(l));return r.has(f)||(r.add(f),o.push({key:f,link:l})),o},[])}function gb(){let e=w.useContext(Tr);return eh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function YE(){let e=w.useContext(nu);return eh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var th=w.createContext(void 0);th.displayName="FrameworkContext";function yb(){let e=w.useContext(th);return eh(e,"You must render this element inside a <HydratedRouter> element"),e}function PE(e,a){let r=w.useContext(th),[o,l]=w.useState(!1),[f,c]=w.useState(!1),{onFocus:h,onBlur:m,onMouseEnter:p,onMouseLeave:y,onTouchStart:v}=a,S=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let T=L=>{L.forEach(C=>{c(C.isIntersecting)})},O=new IntersectionObserver(T,{threshold:.5});return S.current&&O.observe(S.current),()=>{O.disconnect()}}},[e]),w.useEffect(()=>{if(o){let T=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(T)}}},[o]);let x=()=>{l(!0)},M=()=>{l(!1),c(!1)};return r?e!=="intent"?[f,S,{}]:[f,S,{onFocus:Co(h,x),onBlur:Co(m,M),onMouseEnter:Co(p,x),onMouseLeave:Co(y,M),onTouchStart:Co(v,x)}]:[!1,S,{}]}function Co(e,a){return r=>{e&&e(r),r.defaultPrevented||a(r)}}function XE({page:e,...a}){let{router:r}=gb(),o=w.useMemo(()=>nb(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?w.createElement(QE,{page:e,matches:o,...a}):null}function KE(e){let{manifest:a,routeModules:r}=yb(),[o,l]=w.useState([]);return w.useEffect(()=>{let f=!1;return ZE(e,a,r).then(c=>{f||l(c)}),()=>{f=!0}},[e,a,r]),o}function QE({page:e,matches:a,...r}){let o=An(),{future:l,manifest:f,routeModules:c}=yb(),{basename:h}=gb(),{loaderData:m,matches:p}=YE(),y=w.useMemo(()=>nv(e,a,p,f,o,"data"),[e,a,p,f,o]),v=w.useMemo(()=>nv(e,a,p,f,o,"assets"),[e,a,p,f,o]),S=w.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let T=new Set,O=!1;if(a.forEach(C=>{let k=f.routes[C.route.id];!k||!k.hasLoader||(!y.some(Q=>Q.route.id===C.route.id)&&C.route.id in m&&c[C.route.id]?.shouldRevalidate||k.hasClientLoader?O=!0:T.add(C.route.id))}),T.size===0)return[];let L=LE(e,h,l.unstable_trailingSlashAwareDataRequests,"data");return O&&T.size>0&&L.searchParams.set("_routes",a.filter(C=>T.has(C.route.id)).map(C=>C.route.id).join(",")),[L.pathname+L.search]},[h,l.unstable_trailingSlashAwareDataRequests,m,o,f,y,a,e,c]),x=w.useMemo(()=>HE(v,f),[v,f]),M=KE(v);return w.createElement(w.Fragment,null,S.map(T=>w.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...r})),x.map(T=>w.createElement("link",{key:T,rel:"modulepreload",href:T,...r})),M.map(({key:T,link:O})=>w.createElement("link",{key:T,nonce:r.nonce,...O,crossOrigin:O.crossOrigin??r.crossOrigin})))}function FE(...e){return a=>{e.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}var JE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{JE&&(window.__reactRouterVersion="7.13.0")}catch{}function IE({basename:e,children:a,unstable_useTransitions:r,window:o}){let l=w.useRef();l.current==null&&(l.current=N_({window:o,v5Compat:!0}));let f=l.current,[c,h]=w.useState({action:f.action,location:f.location}),m=w.useCallback(p=>{r===!1?h(p):w.startTransition(()=>h(p))},[r]);return w.useLayoutEffect(()=>f.listen(m),[f,m]),w.createElement(CE,{basename:e,children:a,location:c.location,navigationType:c.action,navigator:f,unstable_useTransitions:r})}var vb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nh=w.forwardRef(function({onClick:a,discover:r="render",prefetch:o="none",relative:l,reloadDocument:f,replace:c,state:h,target:m,to:p,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S,...x},M){let{basename:T,unstable_useTransitions:O}=w.useContext(nn),L=typeof p=="string"&&vb.test(p),C=ob(p,T);p=C.to;let k=hE(p,{relative:l}),[Q,q,I]=PE(o,x),F=nw(p,{replace:c,state:h,target:m,preventScrollReset:y,relative:l,viewTransition:v,unstable_defaultShouldRevalidate:S,unstable_useTransitions:O});function P(xe){a&&a(xe),xe.defaultPrevented||F(xe)}let W=w.createElement("a",{...x,...I,href:C.absoluteURL||k,onClick:C.isExternal||f?a:P,ref:FE(M,q),target:m,"data-discover":!L&&r==="render"?"true":void 0});return Q&&!L?w.createElement(w.Fragment,null,W,w.createElement(XE,{page:k})):W});nh.displayName="Link";var WE=w.forwardRef(function({"aria-current":a="page",caseSensitive:r=!1,className:o="",end:l=!1,style:f,to:c,viewTransition:h,children:m,...p},y){let v=Io(c,{relative:p.relative}),S=An(),x=w.useContext(nu),{navigator:M,basename:T}=w.useContext(nn),O=x!=null&&sw(v)&&h===!0,L=M.encodeLocation?M.encodeLocation(v).pathname:v.pathname,C=S.pathname,k=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(C=C.toLowerCase(),k=k?k.toLowerCase():null,L=L.toLowerCase()),k&&T&&(k=la(k,T)||k);const Q=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let q=C===L||!l&&C.startsWith(L)&&C.charAt(Q)==="/",I=k!=null&&(k===L||!l&&k.startsWith(L)&&k.charAt(L.length)==="/"),F={isActive:q,isPending:I,isTransitioning:O},P=q?a:void 0,W;typeof o=="function"?W=o(F):W=[o,q?"active":null,I?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let xe=typeof f=="function"?f(F):f;return w.createElement(nh,{...p,"aria-current":P,className:W,ref:y,style:xe,to:c,viewTransition:h},typeof m=="function"?m(F):m)});WE.displayName="NavLink";var ew=w.forwardRef(({discover:e="render",fetcherKey:a,navigate:r,reloadDocument:o,replace:l,state:f,method:c=kl,action:h,onSubmit:m,relative:p,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S,...x},M)=>{let{unstable_useTransitions:T}=w.useContext(nn),O=rw(),L=ow(h,{relative:p}),C=c.toLowerCase()==="get"?"get":"post",k=typeof h=="string"&&vb.test(h),Q=q=>{if(m&&m(q),q.defaultPrevented)return;q.preventDefault();let I=q.nativeEvent.submitter,F=I?.getAttribute("formmethod")||c,P=()=>O(I||q.currentTarget,{fetcherKey:a,method:F,navigate:r,replace:l,state:f,relative:p,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S});T&&r!==!1?w.startTransition(()=>P()):P()};return w.createElement("form",{ref:M,method:C,action:L,onSubmit:o?m:Q,...x,"data-discover":!k&&e==="render"?"true":void 0})});ew.displayName="Form";function tw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bb(e){let a=w.useContext(Tr);return Xe(a,tw(e)),a}function nw(e,{target:a,replace:r,state:o,preventScrollReset:l,relative:f,viewTransition:c,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let p=Jd(),y=An(),v=Io(e,{relative:f});return w.useCallback(S=>{if(NE(S,a)){S.preventDefault();let x=r!==void 0?r:Ho(y)===Ho(v),M=()=>p(e,{replace:x,state:o,preventScrollReset:l,relative:f,viewTransition:c,unstable_defaultShouldRevalidate:h});m?w.startTransition(()=>M()):M()}},[y,p,v,r,o,a,e,l,f,c,h,m])}var aw=0,iw=()=>`__${String(++aw)}__`;function rw(){let{router:e}=bb("useSubmit"),{basename:a}=w.useContext(nn),r=EE(),o=e.fetch,l=e.navigate;return w.useCallback(async(f,c={})=>{let{action:h,method:m,encType:p,formData:y,body:v}=VE(f,a);if(c.navigate===!1){let S=c.fetcherKey||iw();await o(S,r,c.action||h,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||m,formEncType:c.encType||p,flushSync:c.flushSync})}else await l(c.action||h,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||m,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,l,a,r])}function ow(e,{relative:a}={}){let{basename:r}=w.useContext(nn),o=w.useContext(Un);Xe(o,"useFormAction must be used inside a RouteContext");let[l]=o.matches.slice(-1),f={...Io(e||".",{relative:a})},c=An();if(e==null){f.search=c.search;let h=new URLSearchParams(f.search),m=h.getAll("index");if(m.some(y=>y==="")){h.delete("index"),m.filter(v=>v).forEach(v=>h.append("index",v));let y=h.toString();f.search=y?`?${y}`:""}}return(!e||e===".")&&l.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:oa([r,f.pathname])),Ho(f)}function sw(e,{relative:a}={}){let r=w.useContext(lb);Xe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=bb("useViewTransitionState"),l=Io(e,{relative:a});if(!r.isTransitioning)return!1;let f=la(r.currentLocation.pathname,o)||r.currentLocation.pathname,c=la(r.nextLocation.pathname,o)||r.nextLocation.pathname;return Hl(l.pathname,c)!=null||Hl(l.pathname,f)!=null}const Sb=(...e)=>e.filter((a,r,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===r).join(" ").trim();const lw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const uw=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,r,o)=>o?o.toUpperCase():r.toLowerCase());const av=e=>{const a=uw(e);return a.charAt(0).toUpperCase()+a.slice(1)};var cw={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 fw=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const dw=w.forwardRef(({color:e="currentColor",size:a=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:l="",children:f,iconNode:c,...h},m)=>w.createElement("svg",{ref:m,...cw,width:a,height:a,stroke:e,strokeWidth:o?Number(r)*24/Number(a):r,className:Sb("lucide",l),...!f&&!fw(h)&&{"aria-hidden":"true"},...h},[...c.map(([p,y])=>w.createElement(p,y)),...Array.isArray(f)?f:[f]]));const Lt=(e,a)=>{const r=w.forwardRef(({className:o,...l},f)=>w.createElement(dw,{ref:f,iconNode:a,className:Sb(`lucide-${lw(av(e))}`,`lucide-${e}`,o),...l}));return r.displayName=av(e),r};const hw=[["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"}]],xb=Lt("activity",hw);const mw=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],pw=Lt("arrow-down",mw);const gw=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],yw=Lt("arrow-up",gw);const vw=[["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"}]],bw=Lt("box",vw);const Sw=[["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"}]],xw=Lt("brain",Sw);const Tw=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_w=Lt("clock",Tw);const Ew=[["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"}]],ww=Lt("cpu",Ew);const Aw=[["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"}]],zw=Lt("file-text",Aw);const Cw=[["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"}]],Rw=Lt("layout-dashboard",Cw);const Mw=[["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"}]],Ow=Lt("log-out",Mw);const Dw=[["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"}]],Nw=Lt("moon",Dw);const jw=[["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"}]],kw=Lt("refresh-cw",jw);const Vw=[["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"}]],Lw=Lt("settings",Vw);const Uw=[["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"}]],Bw=Lt("sun",Uw);const Zw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Hw=Lt("terminal",Zw);var kf={exports:{}},Vf={};var iv;function $w(){if(iv)return Vf;iv=1;var e=tu();function a(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var r=typeof Object.is=="function"?Object.is:a,o=e.useState,l=e.useEffect,f=e.useLayoutEffect,c=e.useDebugValue;function h(v,S){var x=S(),M=o({inst:{value:x,getSnapshot:S}}),T=M[0].inst,O=M[1];return f(function(){T.value=x,T.getSnapshot=S,m(T)&&O({inst:T})},[v,x,S]),l(function(){return m(T)&&O({inst:T}),v(function(){m(T)&&O({inst:T})})},[v]),c(x),x}function m(v){var S=v.getSnapshot;v=v.value;try{var x=S();return!r(v,x)}catch{return!0}}function p(v,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return Vf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Vf}var rv;function Gw(){return rv||(rv=1,kf.exports=$w()),kf.exports}var ov=Gw();const Tb=0,_b=1,Eb=2,sv=3;var lv=Object.prototype.hasOwnProperty;function dd(e,a){var r,o;if(e===a)return!0;if(e&&a&&(r=e.constructor)===a.constructor){if(r===Date)return e.getTime()===a.getTime();if(r===RegExp)return e.toString()===a.toString();if(r===Array){if((o=e.length)===a.length)for(;o--&&dd(e[o],a[o]););return o===-1}if(!r||typeof e=="object"){o=0;for(r in e)if(lv.call(e,r)&&++o&&!lv.call(a,r)||!(r in a)||!dd(e[r],a[r]))return!1;return Object.keys(a).length===o}}return e!==e&&a!==a}const ia=new WeakMap,ra=()=>{},Mt=ra(),hd=Object,_e=e=>e===Mt,kn=e=>typeof e=="function",Za=(e,a)=>({...e,...a}),wb=e=>kn(e.then),Lf={},El={},ah="undefined",Wo=typeof window!=ah,md=typeof document!=ah,qw=Wo&&"Deno"in window,Yw=()=>Wo&&typeof window.requestAnimationFrame!=ah,Ab=(e,a)=>{const r=ia.get(e);return[()=>!_e(a)&&e.get(a)||Lf,o=>{if(!_e(a)){const l=e.get(a);a in El||(El[a]=l),r[5](a,Za(l,o),l||Lf)}},r[6],()=>!_e(a)&&a in El?El[a]:!_e(a)&&e.get(a)||Lf]};let pd=!0;const Pw=()=>pd,[gd,yd]=Wo&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ra,ra],Xw=()=>{const e=md&&document.visibilityState;return _e(e)||e!=="hidden"},Kw=e=>(md&&document.addEventListener("visibilitychange",e),gd("focus",e),()=>{md&&document.removeEventListener("visibilitychange",e),yd("focus",e)}),Qw=e=>{const a=()=>{pd=!0,e()},r=()=>{pd=!1};return gd("online",a),gd("offline",r),()=>{yd("online",a),yd("offline",r)}},Fw={isOnline:Pw,isVisible:Xw},Jw={initFocus:Kw,initReconnect:Qw},uv=!Xd.useId,pr=!Wo||qw,Iw=e=>Yw()?window.requestAnimationFrame(e):setTimeout(e,1),Uf=pr?w.useEffect:w.useLayoutEffect,Bf=typeof navigator<"u"&&navigator.connection,cv=!pr&&Bf&&(["slow-2g","2g"].includes(Bf.effectiveType)||Bf.saveData),wl=new WeakMap,Ww=e=>hd.prototype.toString.call(e),Zf=(e,a)=>e===`[object ${a}]`;let e2=0;const vd=e=>{const a=typeof e,r=Ww(e),o=Zf(r,"Date"),l=Zf(r,"RegExp"),f=Zf(r,"Object");let c,h;if(hd(e)===e&&!o&&!l){if(c=wl.get(e),c)return c;if(c=++e2+"~",wl.set(e,c),Array.isArray(e)){for(c="@",h=0;h<e.length;h++)c+=vd(e[h])+",";wl.set(e,c)}if(f){c="#";const m=hd.keys(e).sort();for(;!_e(h=m.pop());)_e(e[h])||(c+=h+":"+vd(e[h])+",");wl.set(e,c)}}else c=o?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return c},ih=e=>{if(kn(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?vd(e):"",[e,a]};let t2=0;const bd=()=>++t2;async function zb(...e){const[a,r,o,l]=e,f=Za({populateCache:!0,throwOnError:!0},typeof l=="boolean"?{revalidate:l}:l||{});let c=f.populateCache;const h=f.rollbackOnError;let m=f.optimisticData;const p=S=>typeof h=="function"?h(S):h!==!1,y=f.throwOnError;if(kn(r)){const S=r,x=[],M=a.keys();for(const T of M)!/^\$(inf|sub)\$/.test(T)&&S(a.get(T)._k)&&x.push(T);return Promise.all(x.map(v))}return v(r);async function v(S){const[x]=ih(S);if(!x)return;const[M,T]=Ab(a,x),[O,L,C,k]=ia.get(a),Q=()=>{const je=O[x];return(kn(f.revalidate)?f.revalidate(M().data,S):f.revalidate!==!1)&&(delete C[x],delete k[x],je&&je[0])?je[0](Eb).then(()=>M().data):M().data};if(e.length<3)return Q();let q=o,I,F=!1;const P=bd();L[x]=[P,0];const W=!_e(m),xe=M(),Ae=xe.data,Ce=xe._c,ot=_e(Ce)?Ae:Ce;if(W&&(m=kn(m)?m(ot,Ae):m,T({data:m,_c:ot})),kn(q))try{q=q(ot)}catch(je){I=je,F=!0}if(q&&wb(q))if(q=await q.catch(je=>{I=je,F=!0}),P!==L[x][0]){if(F)throw I;return q}else F&&W&&p(I)&&(c=!0,T({data:ot,_c:Mt}));if(c&&!F)if(kn(c)){const je=c(q,ot);T({data:je,error:Mt,_c:Mt})}else T({data:q,error:Mt,_c:Mt});if(L[x][1]=bd(),Promise.resolve(Q()).then(()=>{T({_c:Mt})}),F){if(y)throw I;return}return q}}const fv=(e,a)=>{for(const r in e)e[r][0]&&e[r][0](a)},n2=(e,a)=>{if(!ia.has(e)){const r=Za(Jw,a),o=Object.create(null),l=zb.bind(Mt,e);let f=ra;const c=Object.create(null),h=(y,v)=>{const S=c[y]||[];return c[y]=S,S.push(v),()=>S.splice(S.indexOf(v),1)},m=(y,v,S)=>{e.set(y,v);const x=c[y];if(x)for(const M of x)M(v,S)},p=()=>{if(!ia.has(e)&&(ia.set(e,[o,Object.create(null),Object.create(null),Object.create(null),l,m,h]),!pr)){const y=r.initFocus(setTimeout.bind(Mt,fv.bind(Mt,o,Tb))),v=r.initReconnect(setTimeout.bind(Mt,fv.bind(Mt,o,_b)));f=()=>{y&&y(),v&&v(),ia.delete(e)}}};return p(),[e,l,p,f]}return[e,ia.get(e)[4]]},a2=(e,a,r,o,l)=>{const f=r.errorRetryCount,c=l.retryCount,h=~~((Math.random()+.5)*(1<<(c<8?c:8)))*r.errorRetryInterval;!_e(f)&&c>f||setTimeout(o,h,l)},i2=dd,[Cb,Rb]=n2(new Map),r2=Za({onLoadingSlow:ra,onSuccess:ra,onError:ra,onErrorRetry:a2,onDiscarded:ra,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:cv?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:cv?5e3:3e3,compare:i2,isPaused:()=>!1,cache:Cb,mutate:Rb,fallback:{}},Fw),o2=(e,a)=>{const r=Za(e,a);if(a){const{use:o,fallback:l}=e,{use:f,fallback:c}=a;o&&f&&(r.use=o.concat(f)),l&&c&&(r.fallback=Za(l,c))}return r},s2=w.createContext({}),l2="$inf$",Mb=Wo&&window.__SWR_DEVTOOLS_USE__,u2=Mb?window.__SWR_DEVTOOLS_USE__:[],c2=()=>{Mb&&(window.__SWR_DEVTOOLS_REACT__=Xd)},f2=e=>kn(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],d2=()=>{const e=w.useContext(s2);return w.useMemo(()=>Za(r2,e),[e])},h2=e=>(a,r,o)=>e(a,r&&((...f)=>{const[c]=ih(a),[,,,h]=ia.get(Cb);if(c.startsWith(l2))return r(...f);const m=h[c];return _e(m)?r(...f):(delete h[c],m)}),o),m2=u2.concat(h2),p2=e=>function(...r){const o=d2(),[l,f,c]=f2(r),h=o2(o,c);let m=e;const{use:p}=h,y=(p||[]).concat(m2);for(let v=y.length;v--;)m=y[v](m);return m(l,f||h.fetcher||null,h)},g2=(e,a,r)=>{const o=a[e]||(a[e]=[]);return o.push(r),()=>{const l=o.indexOf(r);l>=0&&(o[l]=o[o.length-1],o.pop())}};c2();const Hf=Xd.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(a=>{e.status="fulfilled",e.value=a},a=>{e.status="rejected",e.reason=a}),e}}),$f={dedupe:!0},dv=Promise.resolve(Mt),y2=(e,a,r)=>{const{cache:o,compare:l,suspense:f,fallbackData:c,revalidateOnMount:h,revalidateIfStale:m,refreshInterval:p,refreshWhenHidden:y,refreshWhenOffline:v,keepPreviousData:S,strictServerPrefetchWarning:x}=r,[M,T,O,L]=ia.get(o),[C,k]=ih(e),Q=w.useRef(!1),q=w.useRef(!1),I=w.useRef(C),F=w.useRef(a),P=w.useRef(r),W=()=>P.current,xe=()=>W().isVisible()&&W().isOnline(),[Ae,Ce,ot,je]=Ab(o,C),ke=w.useRef({}).current,U=_e(c)?_e(r.fallback)?Mt:r.fallback[C]:c,X=(Me,qe)=>{for(const Qe in ke){const Ze=Qe;if(Ze==="data"){if(!l(Me[Ze],qe[Ze])&&(!_e(Me[Ze])||!l(fe,qe[Ze])))return!1}else if(qe[Ze]!==Me[Ze])return!1}return!0},Y=w.useMemo(()=>{const Me=!C||!a?!1:_e(h)?W().isPaused()||f?!1:m!==!1:h,qe=St=>{const Fe=Za(St);return delete Fe._k,Me?{isValidating:!0,isLoading:!0,...Fe}:Fe},Qe=Ae(),Ze=je(),Dt=qe(Qe),Mn=Qe===Ze?Dt:qe(Ze);let mt=Dt;return[()=>{const St=qe(Ae());return X(St,mt)?(mt.data=St.data,mt.isLoading=St.isLoading,mt.isValidating=St.isValidating,mt.error=St.error,mt):(mt=St,St)},()=>Mn]},[o,C]),ce=ov.useSyncExternalStore(w.useCallback(Me=>ot(C,(qe,Qe)=>{X(Qe,qe)||Me()}),[o,C]),Y[0],Y[1]),pe=!Q.current,A=M[C]&&M[C].length>0,Z=ce.data,K=_e(Z)?U&&wb(U)?Hf(U):U:Z,J=ce.error,le=w.useRef(K),fe=S?_e(Z)?_e(le.current)?K:le.current:Z:K,re=C&&_e(K),st=!pr&&ov.useSyncExternalStore(()=>ra,()=>!1,()=>!0);x&&st&&!f&&re&&console.warn(`Missing pre-initiated data for serialized key "${C}" 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 Re=A&&!_e(J)?!1:pe&&!_e(h)?h:W().isPaused()?!1:f?_e(K)?!1:m:_e(K)||m,Pt=!!(C&&a&&pe&&Re),zn=_e(ce.isValidating)?Pt:ce.isValidating,Cn=_e(ce.isLoading)?Pt:ce.isLoading,ca=w.useCallback(async Me=>{const qe=F.current;if(!C||!qe||q.current||W().isPaused())return!1;let Qe,Ze,Dt=!0;const Mn=Me||{},mt=!O[C]||!Mn.dedupe,St=()=>uv?!q.current&&C===I.current&&Q.current:C===I.current,Fe={isValidating:!1,isLoading:!1},os=()=>{Ce(Fe)},Mr=()=>{const xt=O[C];xt&&xt[1]===Ze&&delete O[C]},Or={isValidating:!0};_e(Ae().data)&&(Or.isLoading=!0);try{if(mt&&(Ce(Or),r.loadingTimeout&&_e(Ae().data)&&setTimeout(()=>{Dt&&St()&&W().onLoadingSlow(C,r)},r.loadingTimeout),O[C]=[qe(k),bd()]),[Qe,Ze]=O[C],Qe=await Qe,mt&&setTimeout(Mr,r.dedupingInterval),!O[C]||O[C][1]!==Ze)return mt&&St()&&W().onDiscarded(C),!1;Fe.error=Mt;const xt=T[C];if(!_e(xt)&&(Ze<=xt[0]||Ze<=xt[1]||xt[1]===0))return os(),mt&&St()&&W().onDiscarded(C),!1;const vn=Ae().data;Fe.data=l(vn,Qe)?vn:Qe,mt&&St()&&W().onSuccess(Qe,C,r)}catch(xt){Mr();const vn=W(),{shouldRetryOnError:Ti}=vn;vn.isPaused()||(Fe.error=xt,mt&&St()&&(vn.onError(xt,C,vn),(Ti===!0||kn(Ti)&&Ti(xt))&&(!W().revalidateOnFocus||!W().revalidateOnReconnect||xe())&&vn.onErrorRetry(xt,C,vn,du=>{const Dr=M[C];Dr&&Dr[0]&&Dr[0](sv,du)},{retryCount:(Mn.retryCount||0)+1,dedupe:!0})))}return Dt=!1,os(),!0},[C,o]),Rn=w.useCallback((...Me)=>zb(o,I.current,...Me),[]);if(Uf(()=>{F.current=a,P.current=r,_e(Z)||(le.current=Z)}),Uf(()=>{if(!C)return;const Me=ca.bind(Mt,$f);let qe=0;W().revalidateOnFocus&&(qe=Date.now()+W().focusThrottleInterval);const Ze=g2(C,M,(Dt,Mn={})=>{if(Dt==Tb){const mt=Date.now();W().revalidateOnFocus&&mt>qe&&xe()&&(qe=mt+W().focusThrottleInterval,Me())}else if(Dt==_b)W().revalidateOnReconnect&&xe()&&Me();else{if(Dt==Eb)return ca();if(Dt==sv)return ca(Mn)}});return q.current=!1,I.current=C,Q.current=!0,Ce({_k:k}),Re&&(O[C]||(_e(K)||pr?Me():Iw(Me))),()=>{q.current=!0,Ze()}},[C]),Uf(()=>{let Me;function qe(){const Ze=kn(p)?p(Ae().data):p;Ze&&Me!==-1&&(Me=setTimeout(Qe,Ze))}function Qe(){!Ae().error&&(y||W().isVisible())&&(v||W().isOnline())?ca($f).then(qe):qe()}return qe(),()=>{Me&&(clearTimeout(Me),Me=-1)}},[p,y,v,C]),w.useDebugValue(fe),f){if(!uv&&pr&&re)throw new Error("Fallback data is required when using Suspense in SSR.");re&&(F.current=a,P.current=r,q.current=!1);const Me=L[C],qe=!_e(Me)&&re?Rn(Me):dv;if(Hf(qe),!_e(J)&&re)throw J;const Qe=re?ca($f):dv;!_e(fe)&&re&&(Qe.status="fulfilled",Qe.value=!0),Hf(Qe)}return{mutate:Rn,get data(){return ke.data=!0,fe},get error(){return ke.error=!0,J},get isValidating(){return ke.isValidating=!0,zn},get isLoading(){return ke.isLoading=!0,Cn}}},es=p2(y2),v2="x-architect-pass",hv="/api";class lr{static instance;constructor(){}static getInstance(){return lr.instance||(lr.instance=new lr),lr.instance}getHeaders(a={}){const r=localStorage.getItem("morpheus.auth.token"),o={...a};return r&&(o[v2]=r),o}async handleResponse(a){if(a.status===401)throw localStorage.removeItem("morpheus.auth.token"),window.location.pathname.endsWith("/login")||(window.location.href="/login"),new Error("Unauthorized");if(!a.ok){const r=await a.json().catch(()=>({error:"Unknown error"})),o=new Error(r.error||`HTTP error! status: ${a.status}`);throw o.details=r.details,o}return a.json()}async get(a){const r=await fetch(`${hv}${a}`,{headers:this.getHeaders()});return this.handleResponse(r)}async post(a,r){const o=await fetch(`${hv}${a}`,{method:"POST",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(r)});return this.handleResponse(o)}}const $l=lr.getInstance(),$o="/api",rh=e=>{const a=e.startsWith($o)?e.substring($o.length):e;return $l.get(a)};function Ob(){return es(`${$o}/status`,rh,{refreshInterval:5e3})}function b2(){return es(`${$o}/logs`,rh)}function S2(e){return es(e?`${$o}/logs/${e}?limit=1000`:null,rh,{refreshInterval:2e3})}function x2(){const{data:e}=Ob();return R.jsxs("footer",{className:"h-8 bg-zinc-950 border-t border-matrix-primary flex items-center px-4 text-xs justify-between select-none z-10 shrink-0",children:[R.jsxs("div",{className:"flex gap-4",children:[R.jsxs("span",{className:e?"text-matrix-highlight":"text-red-500",children:["● ",e?.status.toUpperCase()||"OFFLINE"]}),R.jsxs("span",{children:["PID: ",e?.pid||"-"]}),R.jsxs("span",{children:["UPTIME: ",e?Math.floor(e.uptimeSeconds/60)+"m":"-"]})]}),R.jsxs("div",{className:"flex gap-4 opacity-70",children:[R.jsxs("span",{children:["v",e?.projectVersion||"0.0.0"]}),R.jsx("span",{children:e?.agentName||"Morpheus"})]})]})}const Db=w.createContext({});function T2(e){const a=w.useRef(null);return a.current===null&&(a.current=e()),a.current}const Nb=typeof window<"u",_2=Nb?w.useLayoutEffect:w.useEffect,oh=w.createContext(null);function sh(e,a){e.indexOf(a)===-1&&e.push(a)}function lh(e,a){const r=e.indexOf(a);r>-1&&e.splice(r,1)}const Ln=(e,a,r)=>r>a?a:r<e?e:r;let uh=()=>{};const ua={},jb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function kb(e){return typeof e=="object"&&e!==null}const Vb=e=>/^0[^.\s]+$/u.test(e);function ch(e){let a;return()=>(a===void 0&&(a=e()),a)}const gn=e=>e,E2=(e,a)=>r=>a(e(r)),ts=(...e)=>e.reduce(E2),Go=(e,a,r)=>{const o=a-e;return o===0?1:(r-e)/o};class fh{constructor(){this.subscriptions=[]}add(a){return sh(this.subscriptions,a),()=>lh(this.subscriptions,a)}notify(a,r,o){const l=this.subscriptions.length;if(l)if(l===1)this.subscriptions[0](a,r,o);else for(let f=0;f<l;f++){const c=this.subscriptions[f];c&&c(a,r,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const sa=e=>e*1e3,pn=e=>e/1e3;function Lb(e,a){return a?e*(1e3/a):0}const Ub=(e,a,r)=>(((1-3*r+3*a)*e+(3*r-6*a))*e+3*a)*e,w2=1e-7,A2=12;function z2(e,a,r,o,l){let f,c,h=0;do c=a+(r-a)/2,f=Ub(c,o,l)-e,f>0?r=c:a=c;while(Math.abs(f)>w2&&++h<A2);return c}function ns(e,a,r,o){if(e===a&&r===o)return gn;const l=f=>z2(f,0,1,e,r);return f=>f===0||f===1?f:Ub(l(f),a,o)}const Bb=e=>a=>a<=.5?e(2*a)/2:(2-e(2*(1-a)))/2,Zb=e=>a=>1-e(1-a),Hb=ns(.33,1.53,.69,.99),dh=Zb(Hb),$b=Bb(dh),Gb=e=>(e*=2)<1?.5*dh(e):.5*(2-Math.pow(2,-10*(e-1))),hh=e=>1-Math.sin(Math.acos(e)),qb=Zb(hh),Yb=Bb(hh),C2=ns(.42,0,1,1),R2=ns(0,0,.58,1),Pb=ns(.42,0,.58,1),M2=e=>Array.isArray(e)&&typeof e[0]!="number",Xb=e=>Array.isArray(e)&&typeof e[0]=="number",O2={linear:gn,easeIn:C2,easeInOut:Pb,easeOut:R2,circIn:hh,circInOut:Yb,circOut:qb,backIn:dh,backInOut:$b,backOut:Hb,anticipate:Gb},D2=e=>typeof e=="string",mv=e=>{if(Xb(e)){uh(e.length===4);const[a,r,o,l]=e;return ns(a,r,o,l)}else if(D2(e))return O2[e];return e},Al=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function N2(e,a){let r=new Set,o=new Set,l=!1,f=!1;const c=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function m(y){c.has(y)&&(p.schedule(y),e()),y(h)}const p={schedule:(y,v=!1,S=!1)=>{const M=S&&l?r:o;return v&&c.add(y),M.has(y)||M.add(y),y},cancel:y=>{o.delete(y),c.delete(y)},process:y=>{if(h=y,l){f=!0;return}l=!0,[r,o]=[o,r],r.forEach(m),r.clear(),l=!1,f&&(f=!1,p.process(y))}};return p}const j2=40;function Kb(e,a){let r=!1,o=!0;const l={delta:0,timestamp:0,isProcessing:!1},f=()=>r=!0,c=Al.reduce((k,Q)=>(k[Q]=N2(f),k),{}),{setup:h,read:m,resolveKeyframes:p,preUpdate:y,update:v,preRender:S,render:x,postRender:M}=c,T=()=>{const k=ua.useManualTiming?l.timestamp:performance.now();r=!1,ua.useManualTiming||(l.delta=o?1e3/60:Math.max(Math.min(k-l.timestamp,j2),1)),l.timestamp=k,l.isProcessing=!0,h.process(l),m.process(l),p.process(l),y.process(l),v.process(l),S.process(l),x.process(l),M.process(l),l.isProcessing=!1,r&&a&&(o=!1,e(T))},O=()=>{r=!0,o=!0,l.isProcessing||e(T)};return{schedule:Al.reduce((k,Q)=>{const q=c[Q];return k[Q]=(I,F=!1,P=!1)=>(r||O(),q.schedule(I,F,P)),k},{}),cancel:k=>{for(let Q=0;Q<Al.length;Q++)c[Al[Q]].cancel(k)},state:l,steps:c}}const{schedule:Ge,cancel:Ha,state:zt,steps:Gf}=Kb(typeof requestAnimationFrame<"u"?requestAnimationFrame:gn,!0);let Ll;function k2(){Ll=void 0}const kt={now:()=>(Ll===void 0&&kt.set(zt.isProcessing||ua.useManualTiming?zt.timestamp:performance.now()),Ll),set:e=>{Ll=e,queueMicrotask(k2)}},Qb=e=>a=>typeof a=="string"&&a.startsWith(e),Fb=Qb("--"),V2=Qb("var(--"),mh=e=>V2(e)?L2.test(e.split("/*")[0].trim()):!1,L2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function pv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Er={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qo={...Er,transform:e=>Ln(0,1,e)},zl={...Er,default:1},Lo=e=>Math.round(e*1e5)/1e5,ph=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function U2(e){return e==null}const B2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gh=(e,a)=>r=>!!(typeof r=="string"&&B2.test(r)&&r.startsWith(e)||a&&!U2(r)&&Object.prototype.hasOwnProperty.call(r,a)),Jb=(e,a,r)=>o=>{if(typeof o!="string")return o;const[l,f,c,h]=o.match(ph);return{[e]:parseFloat(l),[a]:parseFloat(f),[r]:parseFloat(c),alpha:h!==void 0?parseFloat(h):1}},Z2=e=>Ln(0,255,e),qf={...Er,transform:e=>Math.round(Z2(e))},vi={test:gh("rgb","red"),parse:Jb("red","green","blue"),transform:({red:e,green:a,blue:r,alpha:o=1})=>"rgba("+qf.transform(e)+", "+qf.transform(a)+", "+qf.transform(r)+", "+Lo(qo.transform(o))+")"};function H2(e){let a="",r="",o="",l="";return e.length>5?(a=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),l=e.substring(7,9)):(a=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),l=e.substring(4,5),a+=a,r+=r,o+=o,l+=l),{red:parseInt(a,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:l?parseInt(l,16)/255:1}}const Sd={test:gh("#"),parse:H2,transform:vi.transform},as=e=>({test:a=>typeof a=="string"&&a.endsWith(e)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${e}`}),Ua=as("deg"),Vn=as("%"),ae=as("px"),$2=as("vh"),G2=as("vw"),gv={...Vn,parse:e=>Vn.parse(e)/100,transform:e=>Vn.transform(e*100)},ur={test:gh("hsl","hue"),parse:Jb("hue","saturation","lightness"),transform:({hue:e,saturation:a,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+Vn.transform(Lo(a))+", "+Vn.transform(Lo(r))+", "+Lo(qo.transform(o))+")"},dt={test:e=>vi.test(e)||Sd.test(e)||ur.test(e),parse:e=>vi.test(e)?vi.parse(e):ur.test(e)?ur.parse(e):Sd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?vi.transform(e):ur.transform(e),getAnimatableNone:e=>{const a=dt.parse(e);return a.alpha=0,dt.transform(a)}},q2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Y2(e){return isNaN(e)&&typeof e=="string"&&(e.match(ph)?.length||0)+(e.match(q2)?.length||0)>0}const Ib="number",Wb="color",P2="var",X2="var(",yv="${}",K2=/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 Yo(e){const a=e.toString(),r=[],o={color:[],number:[],var:[]},l=[];let f=0;const h=a.replace(K2,m=>(dt.test(m)?(o.color.push(f),l.push(Wb),r.push(dt.parse(m))):m.startsWith(X2)?(o.var.push(f),l.push(P2),r.push(m)):(o.number.push(f),l.push(Ib),r.push(parseFloat(m))),++f,yv)).split(yv);return{values:r,split:h,indexes:o,types:l}}function e1(e){return Yo(e).values}function t1(e){const{split:a,types:r}=Yo(e),o=a.length;return l=>{let f="";for(let c=0;c<o;c++)if(f+=a[c],l[c]!==void 0){const h=r[c];h===Ib?f+=Lo(l[c]):h===Wb?f+=dt.transform(l[c]):f+=l[c]}return f}}const Q2=e=>typeof e=="number"?0:dt.test(e)?dt.getAnimatableNone(e):e;function F2(e){const a=e1(e);return t1(e)(a.map(Q2))}const $a={test:Y2,parse:e1,createTransformer:t1,getAnimatableNone:F2};function Yf(e,a,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(a-e)*6*r:r<1/2?a:r<2/3?e+(a-e)*(2/3-r)*6:e}function J2({hue:e,saturation:a,lightness:r,alpha:o}){e/=360,a/=100,r/=100;let l=0,f=0,c=0;if(!a)l=f=c=r;else{const h=r<.5?r*(1+a):r+a-r*a,m=2*r-h;l=Yf(m,h,e+1/3),f=Yf(m,h,e),c=Yf(m,h,e-1/3)}return{red:Math.round(l*255),green:Math.round(f*255),blue:Math.round(c*255),alpha:o}}function Gl(e,a){return r=>r>0?a:e}const Je=(e,a,r)=>e+(a-e)*r,Pf=(e,a,r)=>{const o=e*e,l=r*(a*a-o)+o;return l<0?0:Math.sqrt(l)},I2=[Sd,vi,ur],W2=e=>I2.find(a=>a.test(e));function vv(e){const a=W2(e);if(!a)return!1;let r=a.parse(e);return a===ur&&(r=J2(r)),r}const bv=(e,a)=>{const r=vv(e),o=vv(a);if(!r||!o)return Gl(e,a);const l={...r};return f=>(l.red=Pf(r.red,o.red,f),l.green=Pf(r.green,o.green,f),l.blue=Pf(r.blue,o.blue,f),l.alpha=Je(r.alpha,o.alpha,f),vi.transform(l))},xd=new Set(["none","hidden"]);function eA(e,a){return xd.has(e)?r=>r<=0?e:a:r=>r>=1?a:e}function tA(e,a){return r=>Je(e,a,r)}function yh(e){return typeof e=="number"?tA:typeof e=="string"?mh(e)?Gl:dt.test(e)?bv:iA:Array.isArray(e)?n1:typeof e=="object"?dt.test(e)?bv:nA:Gl}function n1(e,a){const r=[...e],o=r.length,l=e.map((f,c)=>yh(f)(f,a[c]));return f=>{for(let c=0;c<o;c++)r[c]=l[c](f);return r}}function nA(e,a){const r={...e,...a},o={};for(const l in r)e[l]!==void 0&&a[l]!==void 0&&(o[l]=yh(e[l])(e[l],a[l]));return l=>{for(const f in o)r[f]=o[f](l);return r}}function aA(e,a){const r=[],o={color:0,var:0,number:0};for(let l=0;l<a.values.length;l++){const f=a.types[l],c=e.indexes[f][o[f]],h=e.values[c]??0;r[l]=h,o[f]++}return r}const iA=(e,a)=>{const r=$a.createTransformer(a),o=Yo(e),l=Yo(a);return o.indexes.var.length===l.indexes.var.length&&o.indexes.color.length===l.indexes.color.length&&o.indexes.number.length>=l.indexes.number.length?xd.has(e)&&!l.values.length||xd.has(a)&&!o.values.length?eA(e,a):ts(n1(aA(o,l),l.values),r):Gl(e,a)};function a1(e,a,r){return typeof e=="number"&&typeof a=="number"&&typeof r=="number"?Je(e,a,r):yh(e)(e,a)}const rA=e=>{const a=({timestamp:r})=>e(r);return{start:(r=!0)=>Ge.update(a,r),stop:()=>Ha(a),now:()=>zt.isProcessing?zt.timestamp:kt.now()}},i1=(e,a,r=10)=>{let o="";const l=Math.max(Math.round(a/r),2);for(let f=0;f<l;f++)o+=Math.round(e(f/(l-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},ql=2e4;function vh(e){let a=0;const r=50;let o=e.next(a);for(;!o.done&&a<ql;)a+=r,o=e.next(a);return a>=ql?1/0:a}function oA(e,a=100,r){const o=r({...e,keyframes:[0,a]}),l=Math.min(vh(o),ql);return{type:"keyframes",ease:f=>o.next(l*f).value/a,duration:pn(l)}}const sA=5;function r1(e,a,r){const o=Math.max(a-sA,0);return Lb(r-e(o),a-o)}const tt={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},Xf=.001;function lA({duration:e=tt.duration,bounce:a=tt.bounce,velocity:r=tt.velocity,mass:o=tt.mass}){let l,f,c=1-a;c=Ln(tt.minDamping,tt.maxDamping,c),e=Ln(tt.minDuration,tt.maxDuration,pn(e)),c<1?(l=p=>{const y=p*c,v=y*e,S=y-r,x=Td(p,c),M=Math.exp(-v);return Xf-S/x*M},f=p=>{const v=p*c*e,S=v*r+r,x=Math.pow(c,2)*Math.pow(p,2)*e,M=Math.exp(-v),T=Td(Math.pow(p,2),c);return(-l(p)+Xf>0?-1:1)*((S-x)*M)/T}):(l=p=>{const y=Math.exp(-p*e),v=(p-r)*e+1;return-Xf+y*v},f=p=>{const y=Math.exp(-p*e),v=(r-p)*(e*e);return y*v});const h=5/e,m=cA(l,f,h);if(e=sa(e),isNaN(m))return{stiffness:tt.stiffness,damping:tt.damping,duration:e};{const p=Math.pow(m,2)*o;return{stiffness:p,damping:c*2*Math.sqrt(o*p),duration:e}}}const uA=12;function cA(e,a,r){let o=r;for(let l=1;l<uA;l++)o=o-e(o)/a(o);return o}function Td(e,a){return e*Math.sqrt(1-a*a)}const fA=["duration","bounce"],dA=["stiffness","damping","mass"];function Sv(e,a){return a.some(r=>e[r]!==void 0)}function hA(e){let a={velocity:tt.velocity,stiffness:tt.stiffness,damping:tt.damping,mass:tt.mass,isResolvedFromDuration:!1,...e};if(!Sv(e,dA)&&Sv(e,fA))if(e.visualDuration){const r=e.visualDuration,o=2*Math.PI/(r*1.2),l=o*o,f=2*Ln(.05,1,1-(e.bounce||0))*Math.sqrt(l);a={...a,mass:tt.mass,stiffness:l,damping:f}}else{const r=lA(e);a={...a,...r,mass:tt.mass},a.isResolvedFromDuration=!0}return a}function Yl(e=tt.visualDuration,a=tt.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:a}:e;let{restSpeed:o,restDelta:l}=r;const f=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],h={done:!1,value:f},{stiffness:m,damping:p,mass:y,duration:v,velocity:S,isResolvedFromDuration:x}=hA({...r,velocity:-pn(r.velocity||0)}),M=S||0,T=p/(2*Math.sqrt(m*y)),O=c-f,L=pn(Math.sqrt(m/y)),C=Math.abs(O)<5;o||(o=C?tt.restSpeed.granular:tt.restSpeed.default),l||(l=C?tt.restDelta.granular:tt.restDelta.default);let k;if(T<1){const q=Td(L,T);k=I=>{const F=Math.exp(-T*L*I);return c-F*((M+T*L*O)/q*Math.sin(q*I)+O*Math.cos(q*I))}}else if(T===1)k=q=>c-Math.exp(-L*q)*(O+(M+L*O)*q);else{const q=L*Math.sqrt(T*T-1);k=I=>{const F=Math.exp(-T*L*I),P=Math.min(q*I,300);return c-F*((M+T*L*O)*Math.sinh(P)+q*O*Math.cosh(P))/q}}const Q={calculatedDuration:x&&v||null,next:q=>{const I=k(q);if(x)h.done=q>=v;else{let F=q===0?M:0;T<1&&(F=q===0?sa(M):r1(k,q,I));const P=Math.abs(F)<=o,W=Math.abs(c-I)<=l;h.done=P&&W}return h.value=h.done?c:I,h},toString:()=>{const q=Math.min(vh(Q),ql),I=i1(F=>Q.next(q*F).value,q,30);return q+"ms "+I},toTransition:()=>{}};return Q}Yl.applyToOptions=e=>{const a=oA(e,100,Yl);return e.ease=a.ease,e.duration=sa(a.duration),e.type="keyframes",e};function _d({keyframes:e,velocity:a=0,power:r=.8,timeConstant:o=325,bounceDamping:l=10,bounceStiffness:f=500,modifyTarget:c,min:h,max:m,restDelta:p=.5,restSpeed:y}){const v=e[0],S={done:!1,value:v},x=P=>h!==void 0&&P<h||m!==void 0&&P>m,M=P=>h===void 0?m:m===void 0||Math.abs(h-P)<Math.abs(m-P)?h:m;let T=r*a;const O=v+T,L=c===void 0?O:c(O);L!==O&&(T=L-v);const C=P=>-T*Math.exp(-P/o),k=P=>L+C(P),Q=P=>{const W=C(P),xe=k(P);S.done=Math.abs(W)<=p,S.value=S.done?L:xe};let q,I;const F=P=>{x(S.value)&&(q=P,I=Yl({keyframes:[S.value,M(S.value)],velocity:r1(k,P,S.value),damping:l,stiffness:f,restDelta:p,restSpeed:y}))};return F(0),{calculatedDuration:null,next:P=>{let W=!1;return!I&&q===void 0&&(W=!0,Q(P),F(P)),q!==void 0&&P>=q?I.next(P-q):(!W&&Q(P),S)}}}function mA(e,a,r){const o=[],l=r||ua.mix||a1,f=e.length-1;for(let c=0;c<f;c++){let h=l(e[c],e[c+1]);if(a){const m=Array.isArray(a)?a[c]||gn:a;h=ts(m,h)}o.push(h)}return o}function pA(e,a,{clamp:r=!0,ease:o,mixer:l}={}){const f=e.length;if(uh(f===a.length),f===1)return()=>a[0];if(f===2&&a[0]===a[1])return()=>a[1];const c=e[0]===e[1];e[0]>e[f-1]&&(e=[...e].reverse(),a=[...a].reverse());const h=mA(a,o,l),m=h.length,p=y=>{if(c&&y<e[0])return a[0];let v=0;if(m>1)for(;v<e.length-2&&!(y<e[v+1]);v++);const S=Go(e[v],e[v+1],y);return h[v](S)};return r?y=>p(Ln(e[0],e[f-1],y)):p}function gA(e,a){const r=e[e.length-1];for(let o=1;o<=a;o++){const l=Go(0,a,o);e.push(Je(r,1,l))}}function yA(e){const a=[0];return gA(a,e.length-1),a}function vA(e,a){return e.map(r=>r*a)}function bA(e,a){return e.map(()=>a||Pb).splice(0,e.length-1)}function Uo({duration:e=300,keyframes:a,times:r,ease:o="easeInOut"}){const l=M2(o)?o.map(mv):mv(o),f={done:!1,value:a[0]},c=vA(r&&r.length===a.length?r:yA(a),e),h=pA(c,a,{ease:Array.isArray(l)?l:bA(a,l)});return{calculatedDuration:e,next:m=>(f.value=h(m),f.done=m>=e,f)}}const SA=e=>e!==null;function bh(e,{repeat:a,repeatType:r="loop"},o,l=1){const f=e.filter(SA),h=l<0||a&&r!=="loop"&&a%2===1?0:f.length-1;return!h||o===void 0?f[h]:o}const xA={decay:_d,inertia:_d,tween:Uo,keyframes:Uo,spring:Yl};function o1(e){typeof e.type=="string"&&(e.type=xA[e.type])}class Sh{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,r){return this.finished.then(a,r)}}const TA=e=>e/100;class xh extends Sh{constructor(a){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==kt.now()&&this.tick(kt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;o1(a);const{type:r=Uo,repeat:o=0,repeatDelay:l=0,repeatType:f,velocity:c=0}=a;let{keyframes:h}=a;const m=r||Uo;m!==Uo&&typeof h[0]!="number"&&(this.mixKeyframes=ts(TA,a1(h[0],h[1])),h=[0,100]);const p=m({...a,keyframes:h});f==="mirror"&&(this.mirroredGenerator=m({...a,keyframes:[...h].reverse(),velocity:-c})),p.calculatedDuration===null&&(p.calculatedDuration=vh(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+l,this.totalDuration=this.resolvedDuration*(o+1)-l,this.generator=p}updateTime(a){const r=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(a,r=!1){const{generator:o,totalDuration:l,mixKeyframes:f,mirroredGenerator:c,resolvedDuration:h,calculatedDuration:m}=this;if(this.startTime===null)return o.next(0);const{delay:p=0,keyframes:y,repeat:v,repeatType:S,repeatDelay:x,type:M,onUpdate:T,finalKeyframe:O}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-l/this.speed,this.startTime)),r?this.currentTime=a:this.updateTime(a);const L=this.currentTime-p*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?L<0:L>l;this.currentTime=Math.max(L,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let k=this.currentTime,Q=o;if(v){const P=Math.min(this.currentTime,l)/h;let W=Math.floor(P),xe=P%1;!xe&&P>=1&&(xe=1),xe===1&&W--,W=Math.min(W,v+1),W%2&&(S==="reverse"?(xe=1-xe,x&&(xe-=x/h)):S==="mirror"&&(Q=c)),k=Ln(0,1,xe)*h}const q=C?{done:!1,value:y[0]}:Q.next(k);f&&(q.value=f(q.value));let{done:I}=q;!C&&m!==null&&(I=this.playbackSpeed>=0?this.currentTime>=l:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return F&&M!==_d&&(q.value=bh(y,this.options,O,this.speed)),T&&T(q.value),F&&this.finish(),q}then(a,r){return this.finished.then(a,r)}get duration(){return pn(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+pn(a)}get time(){return pn(this.currentTime)}set time(a){a=sa(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(a){this.updateTime(kt.now());const r=this.playbackSpeed!==a;this.playbackSpeed=a,r&&(this.time=pn(this.currentTime))}play(){if(this.isStopped)return;const{driver:a=rA,startTime:r}=this.options;this.driver||(this.driver=a(l=>this.tick(l))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),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(kt.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(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),a.observe(this)}}function _A(e){for(let a=1;a<e.length;a++)e[a]??(e[a]=e[a-1])}const bi=e=>e*180/Math.PI,Ed=e=>{const a=bi(Math.atan2(e[1],e[0]));return wd(a)},EA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ed,rotateZ:Ed,skewX:e=>bi(Math.atan(e[1])),skewY:e=>bi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wd=e=>(e=e%360,e<0&&(e+=360),e),xv=Ed,Tv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_v=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),wA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tv,scaleY:_v,scale:e=>(Tv(e)+_v(e))/2,rotateX:e=>wd(bi(Math.atan2(e[6],e[5]))),rotateY:e=>wd(bi(Math.atan2(-e[2],e[0]))),rotateZ:xv,rotate:xv,skewX:e=>bi(Math.atan(e[4])),skewY:e=>bi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ad(e){return e.includes("scale")?1:0}function zd(e,a){if(!e||e==="none")return Ad(a);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,l;if(r)o=wA,l=r;else{const h=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=EA,l=h}if(!l)return Ad(a);const f=o[a],c=l[1].split(",").map(zA);return typeof f=="function"?f(c):c[f]}const AA=(e,a)=>{const{transform:r="none"}=getComputedStyle(e);return zd(r,a)};function zA(e){return parseFloat(e.trim())}const wr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ar=new Set(wr),Ev=e=>e===Er||e===ae,CA=new Set(["x","y","z"]),RA=wr.filter(e=>!CA.has(e));function MA(e){const a=[];return RA.forEach(r=>{const o=e.getValue(r);o!==void 0&&(a.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),a}const Ba={width:({x:e},{paddingLeft:a="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(a)-parseFloat(r),height:({y:e},{paddingTop:a="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(a)-parseFloat(r),top:(e,{top:a})=>parseFloat(a),left:(e,{left:a})=>parseFloat(a),bottom:({y:e},{top:a})=>parseFloat(a)+(e.max-e.min),right:({x:e},{left:a})=>parseFloat(a)+(e.max-e.min),x:(e,{transform:a})=>zd(a,"x"),y:(e,{transform:a})=>zd(a,"y")};Ba.translateX=Ba.x;Ba.translateY=Ba.y;const Si=new Set;let Cd=!1,Rd=!1,Md=!1;function s1(){if(Rd){const e=Array.from(Si).filter(o=>o.needsMeasurement),a=new Set(e.map(o=>o.element)),r=new Map;a.forEach(o=>{const l=MA(o);l.length&&(r.set(o,l),o.render())}),e.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const l=r.get(o);l&&l.forEach(([f,c])=>{o.getValue(f)?.set(c)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Rd=!1,Cd=!1,Si.forEach(e=>e.complete(Md)),Si.clear()}function l1(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rd=!0)})}function OA(){Md=!0,l1(),s1(),Md=!1}class Th{constructor(a,r,o,l,f,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=r,this.name=o,this.motionValue=l,this.element=f,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Si.add(this),Cd||(Cd=!0,Ge.read(l1),Ge.resolveKeyframes(s1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:r,element:o,motionValue:l}=this;if(a[0]===null){const f=l?.get(),c=a[a.length-1];if(f!==void 0)a[0]=f;else if(o&&r){const h=o.readValue(r,c);h!=null&&(a[0]=h)}a[0]===void 0&&(a[0]=c),l&&f===void 0&&l.set(a[0])}_A(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Si.delete(this)}cancel(){this.state==="scheduled"&&(Si.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const DA=e=>e.startsWith("--");function NA(e,a,r){DA(a)?e.style.setProperty(a,r):e.style[a]=r}const jA=ch(()=>window.ScrollTimeline!==void 0),kA={};function VA(e,a){const r=ch(e);return()=>kA[a]??r()}const u1=VA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Do=([e,a,r,o])=>`cubic-bezier(${e}, ${a}, ${r}, ${o})`,wv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Do([0,.65,.55,1]),circOut:Do([.55,0,1,.45]),backIn:Do([.31,.01,.66,-.59]),backOut:Do([.33,1.53,.69,.99])};function c1(e,a){if(e)return typeof e=="function"?u1()?i1(e,a):"ease-out":Xb(e)?Do(e):Array.isArray(e)?e.map(r=>c1(r,a)||wv.easeOut):wv[e]}function LA(e,a,r,{delay:o=0,duration:l=300,repeat:f=0,repeatType:c="loop",ease:h="easeOut",times:m}={},p=void 0){const y={[a]:r};m&&(y.offset=m);const v=c1(h,l);Array.isArray(v)&&(y.easing=v);const S={delay:o,duration:l,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:f+1,direction:c==="reverse"?"alternate":"normal"};return p&&(S.pseudoElement=p),e.animate(y,S)}function f1(e){return typeof e=="function"&&"applyToOptions"in e}function UA({type:e,...a}){return f1(e)&&u1()?e.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class BA extends Sh{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:r,name:o,keyframes:l,pseudoElement:f,allowFlatten:c=!1,finalKeyframe:h,onComplete:m}=a;this.isPseudoElement=!!f,this.allowFlatten=c,this.options=a,uh(typeof a.type!="string");const p=UA(a);this.animation=LA(r,o,l,p,f),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!f){const y=bh(l,this.options,h,this.speed);this.updateMotionValue?this.updateMotionValue(y):NA(r,o,y),this.animation.cancel()}m?.(),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:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const a=this.animation.effect?.getComputedTiming?.().duration||0;return pn(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+pn(a)}get time(){return pn(Number(this.animation.currentTime)||0)}set time(a){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=sa(a)}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,a&&jA()?(this.animation.timeline=a,gn):r(this)}}const d1={anticipate:Gb,backInOut:$b,circInOut:Yb};function ZA(e){return e in d1}function HA(e){typeof e.ease=="string"&&ZA(e.ease)&&(e.ease=d1[e.ease])}const Kf=10;class $A extends BA{constructor(a){HA(a),o1(a),super(a),a.startTime!==void 0&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:r,onUpdate:o,onComplete:l,element:f,...c}=this.options;if(!r)return;if(a!==void 0){r.set(a);return}const h=new xh({...c,autoplay:!1}),m=Math.max(Kf,kt.now()-this.startTime),p=Ln(0,Kf,m-Kf);r.setWithVelocity(h.sample(Math.max(0,m-p)).value,h.sample(m).value,p),h.stop()}}const Av=(e,a)=>a==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($a.test(e)||e==="0")&&!e.startsWith("url("));function GA(e){const a=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==a)return!0}function qA(e,a,r,o){const l=e[0];if(l===null)return!1;if(a==="display"||a==="visibility")return!0;const f=e[e.length-1],c=Av(l,a),h=Av(f,a);return!c||!h?!1:GA(e)||(r==="spring"||f1(r))&&o}function Od(e){e.duration=0,e.type="keyframes"}const YA=new Set(["opacity","clipPath","filter","transform"]),PA=ch(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function XA(e){const{motionValue:a,name:r,repeatDelay:o,repeatType:l,damping:f,type:c}=e;if(!(a?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:p}=a.owner.getProps();return PA()&&r&&YA.has(r)&&(r!=="transform"||!p)&&!m&&!o&&l!=="mirror"&&f!==0&&c!=="inertia"}const KA=40;class QA extends Sh{constructor({autoplay:a=!0,delay:r=0,type:o="keyframes",repeat:l=0,repeatDelay:f=0,repeatType:c="loop",keyframes:h,name:m,motionValue:p,element:y,...v}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=kt.now();const S={autoplay:a,delay:r,type:o,repeat:l,repeatDelay:f,repeatType:c,name:m,motionValue:p,element:y,...v},x=y?.KeyframeResolver||Th;this.keyframeResolver=new x(h,(M,T,O)=>this.onKeyframesResolved(M,T,S,!O),m,p,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(a,r,o,l){this.keyframeResolver=void 0;const{name:f,type:c,velocity:h,delay:m,isHandoff:p,onUpdate:y}=o;this.resolvedAt=kt.now(),qA(a,f,c,h)||((ua.instantAnimations||!m)&&y?.(bh(a,o,r)),a[0]=a[a.length-1],Od(o),o.repeat=0);const S={startTime:l?this.resolvedAt?this.resolvedAt-this.createdAt>KA?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:a},x=!p&&XA(S),M=S.motionValue?.owner?.current,T=x?new $A({...S,element:M}):new xh(S);T.finished.then(()=>{this.notifyFinished()}).catch(gn),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(a,r){return this.finished.finally(a).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),OA()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function h1(e,a,r,o=0,l=1){const f=Array.from(e).sort((p,y)=>p.sortNodePosition(y)).indexOf(a),c=e.size,h=(c-1)*o;return typeof r=="function"?r(f,c):l===1?f*o:h-f*o}const FA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function JA(e){const a=FA.exec(e);if(!a)return[,];const[,r,o,l]=a;return[`--${r??o}`,l]}function m1(e,a,r=1){const[o,l]=JA(e);if(!o)return;const f=window.getComputedStyle(a).getPropertyValue(o);if(f){const c=f.trim();return jb(c)?parseFloat(c):c}return mh(l)?m1(l,a,r+1):l}const IA={type:"spring",stiffness:500,damping:25,restSpeed:10},WA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ez={type:"keyframes",duration:.8},tz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nz=(e,{keyframes:a})=>a.length>2?ez:Ar.has(e)?e.startsWith("scale")?WA(a[1]):IA:tz,az=e=>e!==null;function iz(e,{repeat:a,repeatType:r="loop"},o){const l=e.filter(az),f=a&&r!=="loop"&&a%2===1?0:l.length-1;return l[f]}function _h(e,a){return e?.[a]??e?.default??e}function rz({when:e,delay:a,delayChildren:r,staggerChildren:o,staggerDirection:l,repeat:f,repeatType:c,repeatDelay:h,from:m,elapsed:p,...y}){return!!Object.keys(y).length}const Eh=(e,a,r,o={},l,f)=>c=>{const h=_h(o,e)||{},m=h.delay||o.delay||0;let{elapsed:p=0}=o;p=p-sa(m);const y={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:a.getVelocity(),...h,delay:-p,onUpdate:S=>{a.set(S),h.onUpdate&&h.onUpdate(S)},onComplete:()=>{c(),h.onComplete&&h.onComplete()},name:e,motionValue:a,element:f?void 0:l};rz(h)||Object.assign(y,nz(e,y)),y.duration&&(y.duration=sa(y.duration)),y.repeatDelay&&(y.repeatDelay=sa(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(Od(y),y.delay===0&&(v=!0)),(ua.instantAnimations||ua.skipAnimations)&&(v=!0,Od(y),y.delay=0),y.allowFlatten=!h.type&&!h.ease,v&&!f&&a.get()!==void 0){const S=iz(y.keyframes,h);if(S!==void 0){Ge.update(()=>{y.onUpdate(S),y.onComplete()});return}}return h.isSync?new xh(y):new QA(y)};function zv(e){const a=[{},{}];return e?.values.forEach((r,o)=>{a[0][o]=r.get(),a[1][o]=r.getVelocity()}),a}function wh(e,a,r,o){if(typeof a=="function"){const[l,f]=zv(o);a=a(r!==void 0?r:e.custom,l,f)}if(typeof a=="string"&&(a=e.variants&&e.variants[a]),typeof a=="function"){const[l,f]=zv(o);a=a(r!==void 0?r:e.custom,l,f)}return a}function gr(e,a,r){const o=e.getProps();return wh(o,a,r!==void 0?r:o.custom,e)}const p1=new Set(["width","height","top","left","right","bottom",...wr]),Cv=30,oz=e=>!isNaN(parseFloat(e));class sz{constructor(a,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const l=kt.now();if(this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=r.owner}setCurrent(a){this.current=a,this.updatedAt=kt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=oz(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,r){this.events[a]||(this.events[a]=new fh);const o=this.events[a].add(r);return a==="change"?()=>{o(),Ge.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,r){this.passiveEffect=a,this.stopPassiveEffect=r}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,r=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=kt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Cv)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Cv);return Lb(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(a){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=a(r),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 br(e,a){return new sz(e,a)}const Dd=e=>Array.isArray(e);function lz(e,a,r){e.hasValue(a)?e.getValue(a).set(r):e.addValue(a,br(r))}function uz(e){return Dd(e)?e[e.length-1]||0:e}function cz(e,a){const r=gr(e,a);let{transitionEnd:o={},transition:l={},...f}=r||{};f={...f,...o};for(const c in f){const h=uz(f[c]);lz(e,c,h)}}const Ot=e=>!!(e&&e.getVelocity);function fz(e){return!!(Ot(e)&&e.add)}function Nd(e,a){const r=e.getValue("willChange");if(fz(r))return r.add(a);if(!r&&ua.WillChange){const o=new ua.WillChange("auto");e.addValue("willChange",o),o.add(a)}}function Ah(e){return e.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const dz="framerAppearId",g1="data-"+Ah(dz);function y1(e){return e.props[g1]}function hz({protectedKeys:e,needsAnimating:a},r){const o=e.hasOwnProperty(r)&&a[r]!==!0;return a[r]=!1,o}function v1(e,a,{delay:r=0,transitionOverride:o,type:l}={}){let{transition:f=e.getDefaultTransition(),transitionEnd:c,...h}=a;const m=f?.reduceMotion;o&&(f=o);const p=[],y=l&&e.animationState&&e.animationState.getState()[l];for(const v in h){const S=e.getValue(v,e.latestValues[v]??null),x=h[v];if(x===void 0||y&&hz(y,v))continue;const M={delay:r,..._h(f||{},v)},T=S.get();if(T!==void 0&&!S.isAnimating&&!Array.isArray(x)&&x===T&&!M.velocity)continue;let O=!1;if(window.MotionHandoffAnimation){const k=y1(e);if(k){const Q=window.MotionHandoffAnimation(k,v,Ge);Q!==null&&(M.startTime=Q,O=!0)}}Nd(e,v);const L=m??e.shouldReduceMotion;S.start(Eh(v,S,x,L&&p1.has(v)?{type:!1}:M,e,O));const C=S.animation;C&&p.push(C)}return c&&Promise.all(p).then(()=>{Ge.update(()=>{c&&cz(e,c)})}),p}function jd(e,a,r={}){const o=gr(e,a,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:l=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(l=r.transitionOverride);const f=o?()=>Promise.all(v1(e,o,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(m=0)=>{const{delayChildren:p=0,staggerChildren:y,staggerDirection:v}=l;return mz(e,a,m,p,y,v,r)}:()=>Promise.resolve(),{when:h}=l;if(h){const[m,p]=h==="beforeChildren"?[f,c]:[c,f];return m().then(()=>p())}else return Promise.all([f(),c(r.delay)])}function mz(e,a,r=0,o=0,l=0,f=1,c){const h=[];for(const m of e.variantChildren)m.notify("AnimationStart",a),h.push(jd(m,a,{...c,delay:r+(typeof o=="function"?0:o)+h1(e.variantChildren,m,o,l,f)}).then(()=>m.notify("AnimationComplete",a)));return Promise.all(h)}function pz(e,a,r={}){e.notify("AnimationStart",a);let o;if(Array.isArray(a)){const l=a.map(f=>jd(e,f,r));o=Promise.all(l)}else if(typeof a=="string")o=jd(e,a,r);else{const l=typeof a=="function"?gr(e,a,r.custom):a;o=Promise.all(v1(e,l,r))}return o.then(()=>{e.notify("AnimationComplete",a)})}const gz={test:e=>e==="auto",parse:e=>e},b1=e=>a=>a.test(e),S1=[Er,ae,Vn,Ua,G2,$2,gz],Rv=e=>S1.find(b1(e));function yz(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Vb(e):!0}const vz=new Set(["brightness","contrast","saturate","opacity"]);function bz(e){const[a,r]=e.slice(0,-1).split("(");if(a==="drop-shadow")return e;const[o]=r.match(ph)||[];if(!o)return e;const l=r.replace(o,"");let f=vz.has(a)?1:0;return o!==r&&(f*=100),a+"("+f+l+")"}const Sz=/\b([a-z-]*)\(.*?\)/gu,kd={...$a,getAnimatableNone:e=>{const a=e.match(Sz);return a?a.map(bz).join(" "):e}},Mv={...Er,transform:Math.round},xz={rotate:Ua,rotateX:Ua,rotateY:Ua,rotateZ:Ua,scale:zl,scaleX:zl,scaleY:zl,scaleZ:zl,skew:Ua,skewX:Ua,skewY:Ua,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:qo,originX:gv,originY:gv,originZ:ae},zh={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,inset:ae,insetBlock:ae,insetBlockStart:ae,insetBlockEnd:ae,insetInline:ae,insetInlineStart:ae,insetInlineEnd:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,paddingBlock:ae,paddingBlockStart:ae,paddingBlockEnd:ae,paddingInline:ae,paddingInlineStart:ae,paddingInlineEnd:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,marginBlock:ae,marginBlockStart:ae,marginBlockEnd:ae,marginInline:ae,marginInlineStart:ae,marginInlineEnd:ae,fontSize:ae,backgroundPositionX:ae,backgroundPositionY:ae,...xz,zIndex:Mv,fillOpacity:qo,strokeOpacity:qo,numOctaves:Mv},Tz={...zh,color:dt,backgroundColor:dt,outlineColor:dt,fill:dt,stroke:dt,borderColor:dt,borderTopColor:dt,borderRightColor:dt,borderBottomColor:dt,borderLeftColor:dt,filter:kd,WebkitFilter:kd},x1=e=>Tz[e];function T1(e,a){let r=x1(e);return r!==kd&&(r=$a),r.getAnimatableNone?r.getAnimatableNone(a):void 0}const _z=new Set(["auto","none","0"]);function Ez(e,a,r){let o=0,l;for(;o<e.length&&!l;){const f=e[o];typeof f=="string"&&!_z.has(f)&&Yo(f).values.length&&(l=e[o]),o++}if(l&&r)for(const f of a)e[f]=T1(r,l)}class wz extends Th{constructor(a,r,o,l,f){super(a,r,o,l,f,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let y=0;y<a.length;y++){let v=a[y];if(typeof v=="string"&&(v=v.trim(),mh(v))){const S=m1(v,r.current);S!==void 0&&(a[y]=S),y===a.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!p1.has(o)||a.length!==2)return;const[l,f]=a,c=Rv(l),h=Rv(f),m=pv(l),p=pv(f);if(m!==p&&Ba[o]){this.needsMeasurement=!0;return}if(c!==h)if(Ev(c)&&Ev(h))for(let y=0;y<a.length;y++){const v=a[y];typeof v=="string"&&(a[y]=parseFloat(v))}else Ba[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:r}=this,o=[];for(let l=0;l<a.length;l++)(a[l]===null||yz(a[l]))&&o.push(l);o.length&&Ez(a,o,r)}measureInitialState(){const{element:a,unresolvedKeyframes:r,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ba[o](a.measureViewportBox(),window.getComputedStyle(a.current)),r[0]=this.measuredOrigin;const l=r[r.length-1];l!==void 0&&a.getValue(o,l).jump(l,!1)}measureEndState(){const{element:a,name:r,unresolvedKeyframes:o}=this;if(!a||!a.current)return;const l=a.getValue(r);l&&l.jump(this.measuredOrigin,!1);const f=o.length-1,c=o[f];o[f]=Ba[r](a.measureViewportBox(),window.getComputedStyle(a.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([h,m])=>{a.getValue(h).set(m)}),this.resolveNoneKeyframes()}}function Az(e,a,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const l=r?.[e]??o.querySelectorAll(e);return l?Array.from(l):[]}return Array.from(e).filter(o=>o!=null)}const _1=(e,a)=>a&&typeof e=="number"?a.transform(e):e;function zz(e){return kb(e)&&"offsetHeight"in e}const{schedule:Ch}=Kb(queueMicrotask,!1),_n={x:!1,y:!1};function E1(){return _n.x||_n.y}function Cz(e){return e==="x"||e==="y"?_n[e]?null:(_n[e]=!0,()=>{_n[e]=!1}):_n.x||_n.y?null:(_n.x=_n.y=!0,()=>{_n.x=_n.y=!1})}function w1(e,a){const r=Az(e),o=new AbortController,l={passive:!0,...a,signal:o.signal};return[r,l,()=>o.abort()]}function Ov(e){return!(e.pointerType==="touch"||E1())}function Rz(e,a,r={}){const[o,l,f]=w1(e,r),c=h=>{if(!Ov(h))return;const{target:m}=h,p=a(m,h);if(typeof p!="function"||!m)return;const y=v=>{Ov(v)&&(p(v),m.removeEventListener("pointerleave",y))};m.addEventListener("pointerleave",y,l)};return o.forEach(h=>{h.addEventListener("pointerenter",c,l)}),f}const A1=(e,a)=>a?e===a?!0:A1(e,a.parentElement):!1,Rh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Mz=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function z1(e){return Mz.has(e.tagName)||e.isContentEditable===!0}const Ul=new WeakSet;function Dv(e){return a=>{a.key==="Enter"&&e(a)}}function Qf(e,a){e.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const Oz=(e,a)=>{const r=e.currentTarget;if(!r)return;const o=Dv(()=>{if(Ul.has(r))return;Qf(r,"down");const l=Dv(()=>{Qf(r,"up")}),f=()=>Qf(r,"cancel");r.addEventListener("keyup",l,a),r.addEventListener("blur",f,a)});r.addEventListener("keydown",o,a),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),a)};function Nv(e){return Rh(e)&&!E1()}function Dz(e,a,r={}){const[o,l,f]=w1(e,r),c=h=>{const m=h.currentTarget;if(!Nv(h))return;Ul.add(m);const p=a(m,h),y=(x,M)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",S),Ul.has(m)&&Ul.delete(m),Nv(x)&&typeof p=="function"&&p(x,{success:M})},v=x=>{y(x,m===window||m===document||r.useGlobalTarget||A1(m,x.target))},S=x=>{y(x,!1)};window.addEventListener("pointerup",v,l),window.addEventListener("pointercancel",S,l)};return o.forEach(h=>{(r.useGlobalTarget?window:h).addEventListener("pointerdown",c,l),zz(h)&&(h.addEventListener("focus",p=>Oz(p,l)),!z1(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),f}function C1(e){return kb(e)&&"ownerSVGElement"in e}function Nz(e){return C1(e)&&e.tagName==="svg"}const jz=[...S1,dt,$a],kz=e=>jz.find(b1(e)),jv=()=>({translate:0,scale:1,origin:0,originPoint:0}),cr=()=>({x:jv(),y:jv()}),kv=()=>({min:0,max:0}),yt=()=>({x:kv(),y:kv()}),Vd={current:null},R1={current:!1},Vz=typeof window<"u";function Lz(){if(R1.current=!0,!!Vz)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),a=()=>Vd.current=e.matches;e.addEventListener("change",a),a()}else Vd.current=!1}const Uz=new WeakMap;function iu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Po(e){return typeof e=="string"||Array.isArray(e)}const Mh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oh=["initial",...Mh];function ru(e){return iu(e.animate)||Oh.some(a=>Po(e[a]))}function M1(e){return!!(ru(e)||e.variants)}function Bz(e,a,r){for(const o in a){const l=a[o],f=r[o];if(Ot(l))e.addValue(o,l);else if(Ot(f))e.addValue(o,br(l,{owner:e}));else if(f!==l)if(e.hasValue(o)){const c=e.getValue(o);c.liveStyle===!0?c.jump(l):c.hasAnimated||c.set(l)}else{const c=e.getStaticValue(o);e.addValue(o,br(c!==void 0?c:l,{owner:e}))}}for(const o in r)a[o]===void 0&&e.removeValue(o);return a}const Vv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Pl={};function O1(e){Pl=e}function Zz(){return Pl}class Hz{scrapeMotionValuesFromProps(a,r,o){return{}}constructor({parent:a,props:r,presenceContext:o,reducedMotionConfig:l,blockInitialAnimation:f,visualState:c},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Th,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 S=kt.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,Ge.render(this.render,!1,!0))};const{latestValues:m,renderState:p}=c;this.latestValues=m,this.baseTarget={...m},this.initialValues=r.initial?{...m}:{},this.renderState=p,this.parent=a,this.props=r,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=l,this.options=h,this.blockInitialAnimation=!!f,this.isControllingVariants=ru(r),this.isVariantNode=M1(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,...v}=this.scrapeMotionValuesFromProps(r,{},this);for(const S in v){const x=v[S];m[S]!==void 0&&Ot(x)&&x.set(m[S])}}mount(a){this.current=a,Uz.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(R1.current||Lz(),this.shouldReduceMotion=Vd.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ha(this.notifyUpdate),Ha(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const r=this.features[a];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,r){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Ar.has(a);o&&this.onBindTransform&&this.onBindTransform();const l=r.on("change",c=>{this.latestValues[a]=c,this.props.onUpdate&&Ge.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let f;typeof window<"u"&&window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,a,r)),this.valueSubscriptions.set(a,()=>{l(),f&&f(),r.owner&&r.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Pl){const r=Pl[a];if(!r)continue;const{isEnabled:o,Feature:l}=r;if(!this.features[a]&&l&&o(this.props)&&(this.features[a]=new l(this)),this.features[a]){const f=this.features[a];f.isMounted?f.update():(f.mount(),f.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,r){this.latestValues[a]=r}update(a,r){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<Vv.length;o++){const l=Vv[o];this.propEventSubscriptions[l]&&(this.propEventSubscriptions[l](),delete this.propEventSubscriptions[l]);const f="on"+l,c=a[f];c&&(this.propEventSubscriptions[l]=this.on(l,c))}this.prevMotionValues=Bz(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]: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(a){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(a),()=>r.variantChildren.delete(a)}addValue(a,r){const o=this.values.get(a);r!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,r),this.values.set(a,r),this.latestValues[a]=r.get())}removeValue(a){this.values.delete(a);const r=this.valueSubscriptions.get(a);r&&(r(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,r){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&r!==void 0&&(o=br(r===null?void 0:r,{owner:this}),this.addValue(a,o)),o}readValue(a,r){let o=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return o!=null&&(typeof o=="string"&&(jb(o)||Vb(o))?o=parseFloat(o):!kz(o)&&$a.test(r)&&(o=T1(a,r)),this.setBaseTarget(a,Ot(o)?o.get():o)),Ot(o)?o.get():o}setBaseTarget(a,r){this.baseTarget[a]=r}getBaseTarget(a){const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const f=wh(this.props,r,this.presenceContext?.custom);f&&(o=f[a])}if(r&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,a);return l!==void 0&&!Ot(l)?l:this.initialValues[a]!==void 0&&o===void 0?void 0:this.baseTarget[a]}on(a,r){return this.events[a]||(this.events[a]=new fh),this.events[a].add(r)}notify(a,...r){this.events[a]&&this.events[a].notify(...r)}scheduleRenderMicrotask(){Ch.render(this.render)}}class D1 extends Hz{constructor(){super(...arguments),this.KeyframeResolver=wz}sortInstanceNodePosition(a,r){return a.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(a,r){const o=a.style;return o?o[r]:void 0}removeValueFromRenderState(a,{vars:r,style:o}){delete r[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;Ot(a)&&(this.childSubscription=a.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Ya{constructor(a){this.isMounted=!1,this.node=a}update(){}}function N1({top:e,left:a,right:r,bottom:o}){return{x:{min:a,max:r},y:{min:e,max:o}}}function $z({x:e,y:a}){return{top:a.min,right:e.max,bottom:a.max,left:e.min}}function Gz(e,a){if(!a)return e;const r=a({x:e.left,y:e.top}),o=a({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:o.y,right:o.x}}function Ff(e){return e===void 0||e===1}function Ld({scale:e,scaleX:a,scaleY:r}){return!Ff(e)||!Ff(a)||!Ff(r)}function gi(e){return Ld(e)||j1(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function j1(e){return Lv(e.x)||Lv(e.y)}function Lv(e){return e&&e!=="0%"}function Xl(e,a,r){const o=e-r,l=a*o;return r+l}function Uv(e,a,r,o,l){return l!==void 0&&(e=Xl(e,l,o)),Xl(e,r,o)+a}function Ud(e,a=0,r=1,o,l){e.min=Uv(e.min,a,r,o,l),e.max=Uv(e.max,a,r,o,l)}function k1(e,{x:a,y:r}){Ud(e.x,a.translate,a.scale,a.originPoint),Ud(e.y,r.translate,r.scale,r.originPoint)}const Bv=.999999999999,Zv=1.0000000000001;function qz(e,a,r,o=!1){const l=r.length;if(!l)return;a.x=a.y=1;let f,c;for(let h=0;h<l;h++){f=r[h],c=f.projectionDelta;const{visualElement:m}=f.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&dr(e,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),c&&(a.x*=c.x.scale,a.y*=c.y.scale,k1(e,c)),o&&gi(f.latestValues)&&dr(e,f.latestValues))}a.x<Zv&&a.x>Bv&&(a.x=1),a.y<Zv&&a.y>Bv&&(a.y=1)}function fr(e,a){e.min=e.min+a,e.max=e.max+a}function Hv(e,a,r,o,l=.5){const f=Je(e.min,e.max,l);Ud(e,a,r,f,o)}function dr(e,a){Hv(e.x,a.x,a.scaleX,a.scale,a.originX),Hv(e.y,a.y,a.scaleY,a.scale,a.originY)}function V1(e,a){return N1(Gz(e.getBoundingClientRect(),a))}function Yz(e,a,r){const o=V1(e,r),{scroll:l}=a;return l&&(fr(o.x,l.offset.x),fr(o.y,l.offset.y)),o}const Pz={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Xz=wr.length;function Kz(e,a,r){let o="",l=!0;for(let f=0;f<Xz;f++){const c=wr[f],h=e[c];if(h===void 0)continue;let m=!0;if(typeof h=="number")m=h===(c.startsWith("scale")?1:0);else{const p=parseFloat(h);m=c.startsWith("scale")?p===1:p===0}if(!m||r){const p=_1(h,zh[c]);if(!m){l=!1;const y=Pz[c]||c;o+=`${y}(${p}) `}r&&(a[c]=p)}}return o=o.trim(),r?o=r(a,l?"":o):l&&(o="none"),o}function Dh(e,a,r){const{style:o,vars:l,transformOrigin:f}=e;let c=!1,h=!1;for(const m in a){const p=a[m];if(Ar.has(m)){c=!0;continue}else if(Fb(m)){l[m]=p;continue}else{const y=_1(p,zh[m]);m.startsWith("origin")?(h=!0,f[m]=y):o[m]=y}}if(a.transform||(c||r?o.transform=Kz(a,e.transform,r):o.transform&&(o.transform="none")),h){const{originX:m="50%",originY:p="50%",originZ:y=0}=f;o.transformOrigin=`${m} ${p} ${y}`}}function L1(e,{style:a,vars:r},o,l){const f=e.style;let c;for(c in a)f[c]=a[c];l?.applyProjectionStyles(f,o);for(c in r)f.setProperty(c,r[c])}function $v(e,a){return a.max===a.min?0:e/(a.max-a.min)*100}const Ro={correct:(e,a)=>{if(!a.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const r=$v(e,a.target.x),o=$v(e,a.target.y);return`${r}% ${o}%`}},Qz={correct:(e,{treeScale:a,projectionDelta:r})=>{const o=e,l=$a.parse(e);if(l.length>5)return o;const f=$a.createTransformer(e),c=typeof l[0]!="number"?1:0,h=r.x.scale*a.x,m=r.y.scale*a.y;l[0+c]/=h,l[1+c]/=m;const p=Je(h,m,.5);return typeof l[2+c]=="number"&&(l[2+c]/=p),typeof l[3+c]=="number"&&(l[3+c]/=p),f(l)}},Bd={borderRadius:{...Ro,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ro,borderTopRightRadius:Ro,borderBottomLeftRadius:Ro,borderBottomRightRadius:Ro,boxShadow:Qz};function U1(e,{layout:a,layoutId:r}){return Ar.has(e)||e.startsWith("origin")||(a||r!==void 0)&&(!!Bd[e]||e==="opacity")}function Nh(e,a,r){const o=e.style,l=a?.style,f={};if(!o)return f;for(const c in o)(Ot(o[c])||l&&Ot(l[c])||U1(c,e)||r?.getValue(c)?.liveStyle!==void 0)&&(f[c]=o[c]);return f}function Fz(e){return window.getComputedStyle(e)}class Jz extends D1{constructor(){super(...arguments),this.type="html",this.renderInstance=L1}readValueFromInstance(a,r){if(Ar.has(r))return this.projection?.isProjecting?Ad(r):AA(a,r);{const o=Fz(a),l=(Fb(r)?o.getPropertyValue(r):o[r])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(a,{transformPagePoint:r}){return V1(a,r)}build(a,r,o){Dh(a,r,o.transformTemplate)}scrapeMotionValuesFromProps(a,r,o){return Nh(a,r,o)}}const Iz={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wz={offset:"strokeDashoffset",array:"strokeDasharray"};function eC(e,a,r=1,o=0,l=!0){e.pathLength=1;const f=l?Iz:Wz;e[f.offset]=`${-o}`,e[f.array]=`${a} ${r}`}const tC=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function B1(e,{attrX:a,attrY:r,attrScale:o,pathLength:l,pathSpacing:f=1,pathOffset:c=0,...h},m,p,y){if(Dh(e,h,p),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:S}=e;v.transform&&(S.transform=v.transform,delete v.transform),(S.transform||v.transformOrigin)&&(S.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),S.transform&&(S.transformBox=y?.transformBox??"fill-box",delete v.transformBox);for(const x of tC)v[x]!==void 0&&(S[x]=v[x],delete v[x]);a!==void 0&&(v.x=a),r!==void 0&&(v.y=r),o!==void 0&&(v.scale=o),l!==void 0&&eC(v,l,f,c,!1)}const Z1=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"]),H1=e=>typeof e=="string"&&e.toLowerCase()==="svg";function nC(e,a,r,o){L1(e,a,void 0,o);for(const l in a.attrs)e.setAttribute(Z1.has(l)?l:Ah(l),a.attrs[l])}function $1(e,a,r){const o=Nh(e,a,r);for(const l in e)if(Ot(e[l])||Ot(a[l])){const f=wr.indexOf(l)!==-1?"attr"+l.charAt(0).toUpperCase()+l.substring(1):l;o[f]=e[l]}return o}class aC extends D1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(a,r){return a[r]}readValueFromInstance(a,r){if(Ar.has(r)){const o=x1(r);return o&&o.default||0}return r=Z1.has(r)?r:Ah(r),a.getAttribute(r)}scrapeMotionValuesFromProps(a,r,o){return $1(a,r,o)}build(a,r,o){B1(a,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(a,r,o,l){nC(a,r,o,l)}mount(a){this.isSVGTag=H1(a.tagName),super.mount(a)}}const iC=Oh.length;function G1(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?G1(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const a={};for(let r=0;r<iC;r++){const o=Oh[r],l=e.props[o];(Po(l)||l===!1)&&(a[o]=l)}return a}function q1(e,a){if(!Array.isArray(a))return!1;const r=a.length;if(r!==e.length)return!1;for(let o=0;o<r;o++)if(a[o]!==e[o])return!1;return!0}const rC=[...Mh].reverse(),oC=Mh.length;function sC(e){return a=>Promise.all(a.map(({animation:r,options:o})=>pz(e,r,o)))}function lC(e){let a=sC(e),r=Gv(),o=!0;const l=m=>(p,y)=>{const v=gr(e,y,m==="exit"?e.presenceContext?.custom:void 0);if(v){const{transition:S,transitionEnd:x,...M}=v;p={...p,...M,...x}}return p};function f(m){a=m(e)}function c(m){const{props:p}=e,y=G1(e.parent)||{},v=[],S=new Set;let x={},M=1/0;for(let O=0;O<oC;O++){const L=rC[O],C=r[L],k=p[L]!==void 0?p[L]:y[L],Q=Po(k),q=L===m?C.isActive:null;q===!1&&(M=O);let I=k===y[L]&&k!==p[L]&&Q;if(I&&o&&e.manuallyAnimateOnMount&&(I=!1),C.protectedKeys={...x},!C.isActive&&q===null||!k&&!C.prevProp||iu(k)||typeof k=="boolean")continue;const F=uC(C.prevProp,k);let P=F||L===m&&C.isActive&&!I&&Q||O>M&&Q,W=!1;const xe=Array.isArray(k)?k:[k];let Ae=xe.reduce(l(L),{});q===!1&&(Ae={});const{prevResolvedValues:Ce={}}=C,ot={...Ce,...Ae},je=X=>{P=!0,S.has(X)&&(W=!0,S.delete(X)),C.needsAnimating[X]=!0;const Y=e.getValue(X);Y&&(Y.liveStyle=!1)};for(const X in ot){const Y=Ae[X],ce=Ce[X];if(x.hasOwnProperty(X))continue;let pe=!1;Dd(Y)&&Dd(ce)?pe=!q1(Y,ce):pe=Y!==ce,pe?Y!=null?je(X):S.add(X):Y!==void 0&&S.has(X)?je(X):C.protectedKeys[X]=!0}C.prevProp=k,C.prevResolvedValues=Ae,C.isActive&&(x={...x,...Ae}),o&&e.blockInitialAnimation&&(P=!1);const ke=I&&F;P&&(!ke||W)&&v.push(...xe.map(X=>{const Y={type:L};if(typeof X=="string"&&o&&!ke&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,pe=gr(ce,X);if(ce.enteringChildren&&pe){const{delayChildren:A}=pe.transition||{};Y.delay=h1(ce.enteringChildren,e,A)}}return{animation:X,options:Y}}))}if(S.size){const O={};if(typeof p.initial!="boolean"){const L=gr(e,Array.isArray(p.initial)?p.initial[0]:p.initial);L&&L.transition&&(O.transition=L.transition)}S.forEach(L=>{const C=e.getBaseTarget(L),k=e.getValue(L);k&&(k.liveStyle=!0),O[L]=C??null}),v.push({animation:O})}let T=!!v.length;return o&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(T=!1),o=!1,T?a(v):Promise.resolve()}function h(m,p){if(r[m].isActive===p)return Promise.resolve();e.variantChildren?.forEach(v=>v.animationState?.setActive(m,p)),r[m].isActive=p;const y=c(m);for(const v in r)r[v].protectedKeys={};return y}return{animateChanges:c,setActive:h,setAnimateFunction:f,getState:()=>r,reset:()=>{r=Gv()}}}function uC(e,a){return typeof a=="string"?a!==e:Array.isArray(a)?!q1(a,e):!1}function di(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Gv(){return{animate:di(!0),whileInView:di(),whileHover:di(),whileTap:di(),whileDrag:di(),whileFocus:di(),exit:di()}}function qv(e,a){e.min=a.min,e.max=a.max}function Tn(e,a){qv(e.x,a.x),qv(e.y,a.y)}function Yv(e,a){e.translate=a.translate,e.scale=a.scale,e.originPoint=a.originPoint,e.origin=a.origin}const Y1=1e-4,cC=1-Y1,fC=1+Y1,P1=.01,dC=0-P1,hC=0+P1;function Vt(e){return e.max-e.min}function mC(e,a,r){return Math.abs(e-a)<=r}function Pv(e,a,r,o=.5){e.origin=o,e.originPoint=Je(a.min,a.max,e.origin),e.scale=Vt(r)/Vt(a),e.translate=Je(r.min,r.max,e.origin)-e.originPoint,(e.scale>=cC&&e.scale<=fC||isNaN(e.scale))&&(e.scale=1),(e.translate>=dC&&e.translate<=hC||isNaN(e.translate))&&(e.translate=0)}function Bo(e,a,r,o){Pv(e.x,a.x,r.x,o?o.originX:void 0),Pv(e.y,a.y,r.y,o?o.originY:void 0)}function Xv(e,a,r){e.min=r.min+a.min,e.max=e.min+Vt(a)}function pC(e,a,r){Xv(e.x,a.x,r.x),Xv(e.y,a.y,r.y)}function Kv(e,a,r){e.min=a.min-r.min,e.max=e.min+Vt(a)}function Kl(e,a,r){Kv(e.x,a.x,r.x),Kv(e.y,a.y,r.y)}function Qv(e,a,r,o,l){return e-=a,e=Xl(e,1/r,o),l!==void 0&&(e=Xl(e,1/l,o)),e}function gC(e,a=0,r=1,o=.5,l,f=e,c=e){if(Vn.test(a)&&(a=parseFloat(a),a=Je(c.min,c.max,a/100)-c.min),typeof a!="number")return;let h=Je(f.min,f.max,o);e===f&&(h-=a),e.min=Qv(e.min,a,r,h,l),e.max=Qv(e.max,a,r,h,l)}function Fv(e,a,[r,o,l],f,c){gC(e,a[r],a[o],a[l],a.scale,f,c)}const yC=["x","scaleX","originX"],vC=["y","scaleY","originY"];function Jv(e,a,r,o){Fv(e.x,a,yC,r?r.x:void 0,o?o.x:void 0),Fv(e.y,a,vC,r?r.y:void 0,o?o.y:void 0)}function Iv(e){return e.translate===0&&e.scale===1}function X1(e){return Iv(e.x)&&Iv(e.y)}function Wv(e,a){return e.min===a.min&&e.max===a.max}function bC(e,a){return Wv(e.x,a.x)&&Wv(e.y,a.y)}function e0(e,a){return Math.round(e.min)===Math.round(a.min)&&Math.round(e.max)===Math.round(a.max)}function K1(e,a){return e0(e.x,a.x)&&e0(e.y,a.y)}function t0(e){return Vt(e.x)/Vt(e.y)}function n0(e,a){return e.translate===a.translate&&e.scale===a.scale&&e.originPoint===a.originPoint}function mn(e){return[e("x"),e("y")]}function SC(e,a,r){let o="";const l=e.x.translate/a.x,f=e.y.translate/a.y,c=r?.z||0;if((l||f||c)&&(o=`translate3d(${l}px, ${f}px, ${c}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),r){const{transformPerspective:p,rotate:y,rotateX:v,rotateY:S,skewX:x,skewY:M}=r;p&&(o=`perspective(${p}px) ${o}`),y&&(o+=`rotate(${y}deg) `),v&&(o+=`rotateX(${v}deg) `),S&&(o+=`rotateY(${S}deg) `),x&&(o+=`skewX(${x}deg) `),M&&(o+=`skewY(${M}deg) `)}const h=e.x.scale*a.x,m=e.y.scale*a.y;return(h!==1||m!==1)&&(o+=`scale(${h}, ${m})`),o||"none"}const Q1=["TopLeft","TopRight","BottomLeft","BottomRight"],xC=Q1.length,a0=e=>typeof e=="string"?parseFloat(e):e,i0=e=>typeof e=="number"||ae.test(e);function TC(e,a,r,o,l,f){l?(e.opacity=Je(0,r.opacity??1,_C(o)),e.opacityExit=Je(a.opacity??1,0,EC(o))):f&&(e.opacity=Je(a.opacity??1,r.opacity??1,o));for(let c=0;c<xC;c++){const h=`border${Q1[c]}Radius`;let m=r0(a,h),p=r0(r,h);if(m===void 0&&p===void 0)continue;m||(m=0),p||(p=0),m===0||p===0||i0(m)===i0(p)?(e[h]=Math.max(Je(a0(m),a0(p),o),0),(Vn.test(p)||Vn.test(m))&&(e[h]+="%")):e[h]=p}(a.rotate||r.rotate)&&(e.rotate=Je(a.rotate||0,r.rotate||0,o))}function r0(e,a){return e[a]!==void 0?e[a]:e.borderRadius}const _C=F1(0,.5,qb),EC=F1(.5,.95,gn);function F1(e,a,r){return o=>o<e?0:o>a?1:r(Go(e,a,o))}function wC(e,a,r){const o=Ot(e)?e:br(e);return o.start(Eh("",o,a,r)),o.animation}function Xo(e,a,r,o={passive:!0}){return e.addEventListener(a,r,o),()=>e.removeEventListener(a,r)}const AC=(e,a)=>e.depth-a.depth;class zC{constructor(){this.children=[],this.isDirty=!1}add(a){sh(this.children,a),this.isDirty=!0}remove(a){lh(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(AC),this.isDirty=!1,this.children.forEach(a)}}function CC(e,a){const r=kt.now(),o=({timestamp:l})=>{const f=l-r;f>=a&&(Ha(o),e(f-a))};return Ge.setup(o,!0),()=>Ha(o)}function Bl(e){return Ot(e)?e.get():e}class RC{constructor(){this.members=[]}add(a){sh(this.members,a),a.scheduleRender()}remove(a){if(lh(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(a){const r=this.members.findIndex(l=>a===l);if(r===0)return!1;let o;for(let l=r;l>=0;l--){const f=this.members[l];if(f.isPresent!==!1){o=f;break}}return o?(this.promote(o),!0):!1}promote(a,r){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender();const l=o.options.layoutDependency,f=a.options.layoutDependency;l!==void 0&&f!==void 0&&l===f||(a.resumeFrom=o,r&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0));const{crossfade:h}=a.options;h===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:r,resumingFrom:o}=a;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Zl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Jf=["","X","Y","Z"],MC=1e3;let OC=0;function If(e,a,r,o){const{latestValues:l}=a;l[e]&&(r[e]=l[e],a.setStaticValue(e,0),o&&(o[e]=0))}function J1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:a}=e.options;if(!a)return;const r=y1(a);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:l,layoutId:f}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Ge,!(l||f))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&J1(o)}function I1({attachResizeListener:e,defaultParent:a,measureScroll:r,checkIsScrollRoot:o,resetTransform:l}){return class{constructor(c={},h=a?.()){this.id=OC++,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(jC),this.nodes.forEach(UC),this.nodes.forEach(BC),this.nodes.forEach(kC)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new zC)}addEventListener(c,h){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new fh),this.eventHandlers.get(c).add(h)}notifyListeners(c,...h){const m=this.eventHandlers.get(c);m&&m.notify(...h)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=C1(c)&&!Nz(c),this.instance=c;const{layoutId:h,layout:m,visualElement:p}=this.options;if(p&&!p.current&&p.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||h)&&(this.isLayoutDirty=!0),e){let y,v=0;const S=()=>this.root.updateBlockedByResize=!1;Ge.read(()=>{v=window.innerWidth}),e(c,()=>{const x=window.innerWidth;x!==v&&(v=x,this.root.updateBlockedByResize=!0,y&&y(),y=CC(S,250),Zl.hasAnimatedSinceResize&&(Zl.hasAnimatedSinceResize=!1,this.nodes.forEach(l0)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&p&&(h||m)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:v,hasRelativeLayoutChanged:S,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=this.options.transition||p.getDefaultTransition()||qC,{onLayoutAnimationStart:T,onLayoutAnimationComplete:O}=p.getProps(),L=!this.targetLayout||!K1(this.targetLayout,x),C=!v&&S;if(this.options.layoutRoot||this.resumeFrom||C||v&&(L||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={..._h(M,"layout"),onPlay:T,onComplete:O};(p.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(y,C)}else v||l0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ha(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(ZC),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&J1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const v=this.path[y];v.shouldResetTransform=!0,v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:h,layout:m}=this.options;if(h===void 0&&!m)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(o0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(s0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(LC),this.nodes.forEach(DC),this.nodes.forEach(NC)):this.nodes.forEach(s0),this.clearAllSnapshots();const h=kt.now();zt.delta=Ln(0,1e3/60,h-zt.timestamp),zt.timestamp=h,zt.isProcessing=!0,Gf.update.process(zt),Gf.preRender.process(zt),Gf.render.process(zt),zt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ch.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VC),this.sharedNodes.forEach(HC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ge.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ge.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Vt(this.snapshot.measuredBox.x)&&!Vt(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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(h=!1),h&&this.instance){const m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:m,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!l)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!X1(this.projectionDelta),m=this.getTransformTemplate(),p=m?m(this.latestValues,""):void 0,y=p!==this.prevTransformTemplateValue;c&&this.instance&&(h||gi(this.latestValues)||y)&&(l(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const h=this.measurePageBox();let m=this.removeElementScroll(h);return c&&(m=this.removeTransform(m)),YC(m),{animationId:this.root.animationId,measuredBox:h,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return yt();const h=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(PC))){const{scroll:p}=this.root;p&&(fr(h.x,p.offset.x),fr(h.y,p.offset.y))}return h}removeElementScroll(c){const h=yt();if(Tn(h,c),this.scroll?.wasRoot)return h;for(let m=0;m<this.path.length;m++){const p=this.path[m],{scroll:y,options:v}=p;p!==this.root&&y&&v.layoutScroll&&(y.wasRoot&&Tn(h,c),fr(h.x,y.offset.x),fr(h.y,y.offset.y))}return h}applyTransform(c,h=!1){const m=yt();Tn(m,c);for(let p=0;p<this.path.length;p++){const y=this.path[p];!h&&y.options.layoutScroll&&y.scroll&&y!==y.root&&dr(m,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),gi(y.latestValues)&&dr(m,y.latestValues)}return gi(this.latestValues)&&dr(m,this.latestValues),m}removeTransform(c){const h=yt();Tn(h,c);for(let m=0;m<this.path.length;m++){const p=this.path[m];if(!p.instance||!gi(p.latestValues))continue;Ld(p.latestValues)&&p.updateSnapshot();const y=yt(),v=p.measurePageBox();Tn(y,v),Jv(h,p.latestValues,p.snapshot?p.snapshot.layoutBox:void 0,y)}return gi(this.latestValues)&&Jv(h,this.latestValues),h}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==zt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==h;if(!(c||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:v}=this.options;if(!this.layout||!(y||v))return;this.resolvedRelativeTargetAt=zt.timestamp;const S=this.getClosestProjectingParent();S&&this.linkedParentVersion!==S.layoutVersion&&!S.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(S&&S.layout?this.createRelativeTarget(S,this.layout.layoutBox,S.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Tn(this.target,this.layout.layoutBox),k1(this.target,this.targetDelta)):Tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?this.createRelativeTarget(S,this.target,S.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ld(this.parent.latestValues)||j1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,h,m){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Kl(this.relativeTargetOrigin,h,m),Tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),h=!!this.resumingFrom||this!==c;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===zt.timestamp&&(m=!1),m)return;const{layout:p,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||y))return;Tn(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,S=this.treeScale.y;qz(this.layoutCorrected,this.treeScale,this.path,h),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=yt());const{target:x}=c;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Yv(this.prevProjectionDelta.x,this.projectionDelta.x),Yv(this.prevProjectionDelta.y,this.projectionDelta.y)),Bo(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==S||!n0(this.projectionDelta.x,this.prevProjectionDelta.x)||!n0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cr(),this.projectionDelta=cr(),this.projectionDeltaWithTransform=cr()}setAnimationOrigin(c,h=!1){const m=this.snapshot,p=m?m.latestValues:{},y={...this.latestValues},v=cr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const S=yt(),x=m?m.source:void 0,M=this.layout?this.layout.source:void 0,T=x!==M,O=this.getStack(),L=!O||O.members.length<=1,C=!!(T&&!L&&this.options.crossfade===!0&&!this.path.some(GC));this.animationProgress=0;let k;this.mixTargetDelta=Q=>{const q=Q/1e3;u0(v.x,c.x,q),u0(v.y,c.y,q),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kl(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$C(this.relativeTarget,this.relativeTargetOrigin,S,q),k&&bC(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=yt()),Tn(k,this.relativeTarget)),T&&(this.animationValues=y,TC(y,p,this.latestValues,q,C,L)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=q},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ha(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ge.update(()=>{Zl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=br(0)),this.currentAnimation=wC(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),c.onUpdate&&c.onUpdate(h)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(MC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:h,target:m,layout:p,latestValues:y}=c;if(!(!h||!m||!p)){if(this!==c&&this.layout&&p&&W1(this.options.animationType,this.layout.layoutBox,p.layoutBox)){m=this.target||yt();const v=Vt(this.layout.layoutBox.x);m.x.min=c.target.x.min,m.x.max=m.x.min+v;const S=Vt(this.layout.layoutBox.y);m.y.min=c.target.y.min,m.y.max=m.y.min+S}Tn(h,m),dr(h,y),Bo(this.projectionDeltaWithTransform,this.layoutCorrected,h,y)}}registerSharedNode(c,h){this.sharedNodes.has(c)||this.sharedNodes.set(c,new RC),this.sharedNodes.get(c).add(h);const p=h.options.initialPromotionConfig;h.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(h):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:h,preserveFollowOpacity:m}={}){const p=this.getStack();p&&p.promote(this,m),c&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let h=!1;const{latestValues:m}=c;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(h=!0),!h)return;const p={};m.z&&If("z",c,p,this.animationValues);for(let y=0;y<Jf.length;y++)If(`rotate${Jf[y]}`,c,p,this.animationValues),If(`skew${Jf[y]}`,c,p,this.animationValues);c.render();for(const y in p)c.setStaticValue(y,p[y]),this.animationValues&&(this.animationValues[y]=p[y]);c.scheduleRender()}applyProjectionStyles(c,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=Bl(h?.pointerEvents)||"",c.transform=m?m(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=Bl(h?.pointerEvents)||""),this.hasProjected&&!gi(this.latestValues)&&(c.transform=m?m({},""):"none",this.hasProjected=!1);return}c.visibility="";const y=p.animationValues||p.latestValues;this.applyTransformsToTarget();let v=SC(this.projectionDeltaWithTransform,this.treeScale,y);m&&(v=m(y,v)),c.transform=v;const{x:S,y:x}=this.projectionDelta;c.transformOrigin=`${S.origin*100}% ${x.origin*100}% 0`,p.animationValues?c.opacity=p===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:c.opacity=p===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const M in Bd){if(y[M]===void 0)continue;const{correct:T,applyTo:O,isCSSVariable:L}=Bd[M],C=v==="none"?y[M]:T(y[M],p);if(O){const k=O.length;for(let Q=0;Q<k;Q++)c[O[Q]]=C}else L?this.options.visualElement.renderState.vars[M]=C:c[M]=C}this.options.layoutId&&(c.pointerEvents=p===this?Bl(h?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(o0),this.root.sharedNodes.clear()}}}function DC(e){e.updateLayout()}function NC(e){const a=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&a&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:l}=e.options,f=a.source!==e.layout.source;l==="size"?mn(y=>{const v=f?a.measuredBox[y]:a.layoutBox[y],S=Vt(v);v.min=r[y].min,v.max=v.min+S}):W1(l,a.layoutBox,r)&&mn(y=>{const v=f?a.measuredBox[y]:a.layoutBox[y],S=Vt(r[y]);v.max=v.min+S,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+S)});const c=cr();Bo(c,r,a.layoutBox);const h=cr();f?Bo(h,e.applyTransform(o,!0),a.measuredBox):Bo(h,r,a.layoutBox);const m=!X1(c);let p=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:v,layout:S}=y;if(v&&S){const x=yt();Kl(x,a.layoutBox,v.layoutBox);const M=yt();Kl(M,r,S.layoutBox),K1(x,M)||(p=!0),y.options.layoutRoot&&(e.relativeTarget=M,e.relativeTargetOrigin=x,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:a,delta:h,layoutDelta:c,hasLayoutChanged:m,hasRelativeLayoutChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function jC(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 kC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VC(e){e.clearSnapshot()}function o0(e){e.clearMeasurements()}function s0(e){e.isLayoutDirty=!1}function LC(e){const{visualElement:a}=e.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),e.resetTransform()}function l0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UC(e){e.resolveTargetDelta()}function BC(e){e.calcProjection()}function ZC(e){e.resetSkewAndRotation()}function HC(e){e.removeLeadSnapshot()}function u0(e,a,r){e.translate=Je(a.translate,0,r),e.scale=Je(a.scale,1,r),e.origin=a.origin,e.originPoint=a.originPoint}function c0(e,a,r,o){e.min=Je(a.min,r.min,o),e.max=Je(a.max,r.max,o)}function $C(e,a,r,o){c0(e.x,a.x,r.x,o),c0(e.y,a.y,r.y,o)}function GC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qC={duration:.45,ease:[.4,0,.1,1]},f0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),d0=f0("applewebkit/")&&!f0("chrome/")?Math.round:gn;function h0(e){e.min=d0(e.min),e.max=d0(e.max)}function YC(e){h0(e.x),h0(e.y)}function W1(e,a,r){return e==="position"||e==="preserve-aspect"&&!mC(t0(a),t0(r),.2)}function PC(e){return e!==e.root&&e.scroll?.wasRoot}const XC=I1({attachResizeListener:(e,a)=>Xo(e,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Wf={current:void 0},eS=I1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wf.current){const e=new XC({});e.mount(window),e.setOptions({layoutScroll:!0}),Wf.current=e}return Wf.current},resetTransform:(e,a)=>{e.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),tS=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function KC(e=!0){const a=w.useContext(oh);if(a===null)return[!0,null];const{isPresent:r,onExitComplete:o,register:l}=a,f=w.useId();w.useEffect(()=>{if(e)return l(f)},[e]);const c=w.useCallback(()=>e&&o&&o(f),[f,o,e]);return!r&&o?[!1,c]:[!0]}const nS=w.createContext({strict:!1}),m0={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 p0=!1;function QC(){if(p0)return;const e={};for(const a in m0)e[a]={isEnabled:r=>m0[a].some(o=>!!r[o])};O1(e),p0=!0}function aS(){return QC(),Zz()}function FC(e){const a=aS();for(const r in e)a[r]={...a[r],...e[r]};O1(a)}const JC=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 Ql(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||JC.has(e)}let iS=e=>!Ql(e);function IC(e){typeof e=="function"&&(iS=a=>a.startsWith("on")?!Ql(a):e(a))}try{IC(require("@emotion/is-prop-valid").default)}catch{}function WC(e,a,r){const o={};for(const l in e)l==="values"&&typeof e.values=="object"||(iS(l)||r===!0&&Ql(l)||!a&&!Ql(l)||e.draggable&&l.startsWith("onDrag"))&&(o[l]=e[l]);return o}const ou=w.createContext({});function eR(e,a){if(ru(e)){const{initial:r,animate:o}=e;return{initial:r===!1||Po(r)?r:void 0,animate:Po(o)?o:void 0}}return e.inherit!==!1?a:{}}function tR(e){const{initial:a,animate:r}=eR(e,w.useContext(ou));return w.useMemo(()=>({initial:a,animate:r}),[g0(a),g0(r)])}function g0(e){return Array.isArray(e)?e.join(" "):e}const jh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rS(e,a,r){for(const o in a)!Ot(a[o])&&!U1(o,r)&&(e[o]=a[o])}function nR({transformTemplate:e},a){return w.useMemo(()=>{const r=jh();return Dh(r,a,e),Object.assign({},r.vars,r.style)},[a])}function aR(e,a){const r=e.style||{},o={};return rS(o,r,e),Object.assign(o,nR(e,a)),o}function iR(e,a){const r={},o=aR(e,a);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const oS=()=>({...jh(),attrs:{}});function rR(e,a,r,o){const l=w.useMemo(()=>{const f=oS();return B1(f,a,H1(o),e.transformTemplate,e.style),{...f.attrs,style:{...f.style}}},[a]);if(e.style){const f={};rS(f,e.style,e),l.style={...f,...l.style}}return l}const oR=["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 kh(e){return typeof e!="string"||e.includes("-")?!1:!!(oR.indexOf(e)>-1||/[A-Z]/u.test(e))}function sR(e,a,r,{latestValues:o},l,f=!1,c){const m=(c??kh(e)?rR:iR)(a,o,l,e),p=WC(a,typeof e=="string",f),y=e!==w.Fragment?{...p,...m,ref:r}:{},{children:v}=a,S=w.useMemo(()=>Ot(v)?v.get():v,[v]);return w.createElement(e,{...y,children:S})}function lR({scrapeMotionValuesFromProps:e,createRenderState:a},r,o,l){return{latestValues:uR(r,o,l,e),renderState:a()}}function uR(e,a,r,o){const l={},f=o(e,{});for(const S in f)l[S]=Bl(f[S]);let{initial:c,animate:h}=e;const m=ru(e),p=M1(e);a&&p&&!m&&e.inherit!==!1&&(c===void 0&&(c=a.initial),h===void 0&&(h=a.animate));let y=r?r.initial===!1:!1;y=y||c===!1;const v=y?h:c;if(v&&typeof v!="boolean"&&!iu(v)){const S=Array.isArray(v)?v:[v];for(let x=0;x<S.length;x++){const M=wh(e,S[x]);if(M){const{transitionEnd:T,transition:O,...L}=M;for(const C in L){let k=L[C];if(Array.isArray(k)){const Q=y?k.length-1:0;k=k[Q]}k!==null&&(l[C]=k)}for(const C in T)l[C]=T[C]}}}return l}const sS=e=>(a,r)=>{const o=w.useContext(ou),l=w.useContext(oh),f=()=>lR(e,a,o,l);return r?f():T2(f)},cR=sS({scrapeMotionValuesFromProps:Nh,createRenderState:jh}),fR=sS({scrapeMotionValuesFromProps:$1,createRenderState:oS}),dR=Symbol.for("motionComponentSymbol");function hR(e,a,r){const o=w.useRef(r);w.useInsertionEffect(()=>{o.current=r});const l=w.useRef(null);return w.useCallback(f=>{f&&e.onMount?.(f),a&&(f?a.mount(f):a.unmount());const c=o.current;if(typeof c=="function")if(f){const h=c(f);typeof h=="function"&&(l.current=h)}else l.current?(l.current(),l.current=null):c(f);else c&&(c.current=f)},[a])}const lS=w.createContext({});function No(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function mR(e,a,r,o,l,f){const{visualElement:c}=w.useContext(ou),h=w.useContext(nS),m=w.useContext(oh),p=w.useContext(tS).reducedMotion,y=w.useRef(null),v=w.useRef(!1);o=o||h.renderer,!y.current&&o&&(y.current=o(e,{visualState:a,parent:c,props:r,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:p,isSVG:f}),v.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const S=y.current,x=w.useContext(lS);S&&!S.projection&&l&&(S.type==="html"||S.type==="svg")&&pR(y.current,r,l,x);const M=w.useRef(!1);w.useInsertionEffect(()=>{S&&M.current&&S.update(r,m)});const T=r[g1],O=w.useRef(!!T&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return _2(()=>{v.current=!0,S&&(M.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),O.current&&S.animationState&&S.animationState.animateChanges())}),w.useEffect(()=>{S&&(!O.current&&S.animationState&&S.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),O.current=!1),S.enteringChildren=void 0)}),S}function pR(e,a,r,o){const{layoutId:l,layout:f,drag:c,dragConstraints:h,layoutScroll:m,layoutRoot:p,layoutCrossfade:y}=a;e.projection=new r(e.latestValues,a["data-framer-portal-id"]?void 0:uS(e.parent)),e.projection.setOptions({layoutId:l,layout:f,alwaysMeasureLayout:!!c||h&&No(h),visualElement:e,animationType:typeof f=="string"?f:"both",initialPromotionConfig:o,crossfade:y,layoutScroll:m,layoutRoot:p})}function uS(e){if(e)return e.options.allowProjection!==!1?e.projection:uS(e.parent)}function ed(e,{forwardMotionProps:a=!1,type:r}={},o,l){o&&FC(o);const f=r?r==="svg":kh(e),c=f?fR:cR;function h(p,y){let v;const S={...w.useContext(tS),...p,layoutId:gR(p)},{isStatic:x}=S,M=tR(p),T=c(p,x);if(!x&&Nb){yR();const O=vR(S);v=O.MeasureLayout,M.visualElement=mR(e,T,S,l,O.ProjectionNode,f)}return R.jsxs(ou.Provider,{value:M,children:[v&&M.visualElement?R.jsx(v,{visualElement:M.visualElement,...S}):null,sR(e,p,hR(T,M.visualElement,y),T,x,a,f)]})}h.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const m=w.forwardRef(h);return m[dR]=e,m}function gR({layoutId:e}){const a=w.useContext(Db).id;return a&&e!==void 0?a+"-"+e:e}function yR(e,a){w.useContext(nS).strict}function vR(e){const a=aS(),{drag:r,layout:o}=a;if(!r&&!o)return{};const l={...r,...o};return{MeasureLayout:r?.isEnabled(e)||o?.isEnabled(e)?l.MeasureLayout:void 0,ProjectionNode:l.ProjectionNode}}function bR(e,a){if(typeof Proxy>"u")return ed;const r=new Map,o=(f,c)=>ed(f,c,e,a),l=(f,c)=>o(f,c);return new Proxy(l,{get:(f,c)=>c==="create"?o:(r.has(c)||r.set(c,ed(c,void 0,e,a)),r.get(c))})}const SR=(e,a)=>a.isSVG??kh(e)?new aC(a):new Jz(a,{allowProjection:e!==w.Fragment});class xR extends Ya{constructor(a){super(a),a.animationState||(a.animationState=lC(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();iu(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:r}=this.node.prevProps||{};a!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let TR=0;class _R extends Ya{constructor(){super(...arguments),this.id=TR++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const l=this.node.animationState.setActive("exit",!a);r&&!a&&l.then(()=>{r(this.id)})}mount(){const{register:a,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const ER={animation:{Feature:xR},exit:{Feature:_R}};function is(e){return{point:{x:e.pageX,y:e.pageY}}}const wR=e=>a=>Rh(a)&&e(a,is(a));function Zo(e,a,r,o){return Xo(e,a,wR(r),o)}const cS=({current:e})=>e?e.ownerDocument.defaultView:null,y0=(e,a)=>Math.abs(e-a);function AR(e,a){const r=y0(e.x,a.x),o=y0(e.y,a.y);return Math.sqrt(r**2+o**2)}const v0=new Set(["auto","scroll"]);class fS{constructor(a,r,{transformPagePoint:o,contextWindow:l=window,dragSnapToOrigin:f=!1,distanceThreshold:c=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=nd(this.lastMoveEventInfo,this.history),M=this.startEvent!==null,T=AR(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!M&&!T)return;const{point:O}=x,{timestamp:L}=zt;this.history.push({...O,timestamp:L});const{onStart:C,onMove:k}=this.handlers;M||(C&&C(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,x)},this.handlePointerMove=(x,M)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=td(M,this.transformPagePoint),Ge.update(this.updatePoint,!0)},this.handlePointerUp=(x,M)=>{this.end();const{onEnd:T,onSessionEnd:O,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=nd(x.type==="pointercancel"?this.lastMoveEventInfo:td(M,this.transformPagePoint),this.history);this.startEvent&&T&&T(x,C),O&&O(x,C)},!Rh(a))return;this.dragSnapToOrigin=f,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=c,this.contextWindow=l||window;const m=is(a),p=td(m,this.transformPagePoint),{point:y}=p,{timestamp:v}=zt;this.history=[{...y,timestamp:v}];const{onSessionStart:S}=r;S&&S(a,nd(p,this.history)),this.removeListeners=ts(Zo(this.contextWindow,"pointermove",this.handlePointerMove),Zo(this.contextWindow,"pointerup",this.handlePointerUp),Zo(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(a){let r=a.parentElement;for(;r;){const o=getComputedStyle(r);(v0.has(o.overflowX)||v0.has(o.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.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(a){const r=this.scrollPositions.get(a);if(!r)return;const o=a===window,l=o?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},f={x:l.x-r.x,y:l.y-r.y};f.x===0&&f.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=f.x,this.lastMoveEventInfo.point.y+=f.y):this.history.length>0&&(this.history[0].x-=f.x,this.history[0].y-=f.y),this.scrollPositions.set(a,l),Ge.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ha(this.updatePoint)}}function td(e,a){return a?{point:a(e.point)}:e}function b0(e,a){return{x:e.x-a.x,y:e.y-a.y}}function nd({point:e},a){return{point:e,delta:b0(e,dS(a)),offset:b0(e,zR(a)),velocity:CR(a,.1)}}function zR(e){return e[0]}function dS(e){return e[e.length-1]}function CR(e,a){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null;const l=dS(e);for(;r>=0&&(o=e[r],!(l.timestamp-o.timestamp>sa(a)));)r--;if(!o)return{x:0,y:0};const f=pn(l.timestamp-o.timestamp);if(f===0)return{x:0,y:0};const c={x:(l.x-o.x)/f,y:(l.y-o.y)/f};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function RR(e,{min:a,max:r},o){return a!==void 0&&e<a?e=o?Je(a,e,o.min):Math.max(e,a):r!==void 0&&e>r&&(e=o?Je(r,e,o.max):Math.min(e,r)),e}function S0(e,a,r){return{min:a!==void 0?e.min+a:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function MR(e,{top:a,left:r,bottom:o,right:l}){return{x:S0(e.x,r,l),y:S0(e.y,a,o)}}function x0(e,a){let r=a.min-e.min,o=a.max-e.max;return a.max-a.min<e.max-e.min&&([r,o]=[o,r]),{min:r,max:o}}function OR(e,a){return{x:x0(e.x,a.x),y:x0(e.y,a.y)}}function DR(e,a){let r=.5;const o=Vt(e),l=Vt(a);return l>o?r=Go(a.min,a.max-o,e.min):o>l&&(r=Go(e.min,e.max-l,a.min)),Ln(0,1,r)}function NR(e,a){const r={};return a.min!==void 0&&(r.min=a.min-e.min),a.max!==void 0&&(r.max=a.max-e.min),r}const Zd=.35;function jR(e=Zd){return e===!1?e=0:e===!0&&(e=Zd),{x:T0(e,"left","right"),y:T0(e,"top","bottom")}}function T0(e,a,r){return{min:_0(e,a),max:_0(e,r)}}function _0(e,a){return typeof e=="number"?e:e[a]||0}const kR=new WeakMap;class VR{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:r=!1,distanceThreshold:o}={}){const{presenceContext:l}=this.visualElement;if(l&&l.isPresent===!1)return;const f=v=>{r?(this.stopAnimation(),this.snapToCursor(is(v).point)):this.pauseAnimation()},c=(v,S)=>{this.stopAnimation();const{drag:x,dragPropagation:M,onDragStart:T}=this.getProps();if(x&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Cz(x),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mn(L=>{let C=this.getAxisMotionValue(L).get()||0;if(Vn.test(C)){const{projection:k}=this.visualElement;if(k&&k.layout){const Q=k.layout.layoutBox[L];Q&&(C=Vt(Q)*(parseFloat(C)/100))}}this.originPoint[L]=C}),T&&Ge.postRender(()=>T(v,S)),Nd(this.visualElement,"transform");const{animationState:O}=this.visualElement;O&&O.setActive("whileDrag",!0)},h=(v,S)=>{this.latestPointerEvent=v,this.latestPanInfo=S;const{dragPropagation:x,dragDirectionLock:M,onDirectionLock:T,onDrag:O}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:L}=S;if(M&&this.currentDirection===null){this.currentDirection=LR(L),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",S.point,L),this.updateAxis("y",S.point,L),this.visualElement.render(),O&&O(v,S)},m=(v,S)=>{this.latestPointerEvent=v,this.latestPanInfo=S,this.stop(v,S),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>mn(v=>this.getAnimationState(v)==="paused"&&this.getAxisMotionValue(v).animation?.play()),{dragSnapToOrigin:y}=this.getProps();this.panSession=new fS(a,{onSessionStart:f,onStart:c,onMove:h,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:o,contextWindow:cS(this.visualElement),element:this.visualElement.current})}stop(a,r){const o=a||this.latestPointerEvent,l=r||this.latestPanInfo,f=this.isDragging;if(this.cancel(),!f||!l||!o)return;const{velocity:c}=l;this.startAnimation(c);const{onDragEnd:h}=this.getProps();h&&Ge.postRender(()=>h(o,l))}cancel(){this.isDragging=!1;const{projection:a,animationState:r}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,r,o){const{drag:l}=this.getProps();if(!o||!Cl(a,l,this.currentDirection))return;const f=this.getAxisMotionValue(a);let c=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(c=RR(c,this.constraints[a],this.elastic[a])),f.set(c)}resolveConstraints(){const{dragConstraints:a,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,l=this.constraints;a&&No(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&o?this.constraints=MR(o.layoutBox,a):this.constraints=!1,this.elastic=jR(r),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&mn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=NR(o.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:r}=this.getProps();if(!a||!No(a))return!1;const o=a.current,{projection:l}=this.visualElement;if(!l||!l.layout)return!1;const f=Yz(o,l.root,this.visualElement.getTransformPagePoint());let c=OR(l.layout.layoutBox,f);if(r){const h=r($z(c));this.hasMutatedConstraints=!!h,h&&(c=N1(h))}return c}startAnimation(a){const{drag:r,dragMomentum:o,dragElastic:l,dragTransition:f,dragSnapToOrigin:c,onDragTransitionEnd:h}=this.getProps(),m=this.constraints||{},p=mn(y=>{if(!Cl(y,r,this.currentDirection))return;let v=m&&m[y]||{};c&&(v={min:0,max:0});const S=l?200:1e6,x=l?40:1e7,M={type:"inertia",velocity:o?a[y]:0,bounceStiffness:S,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...f,...v};return this.startAxisValueAnimation(y,M)});return Promise.all(p).then(h)}startAxisValueAnimation(a,r){const o=this.getAxisMotionValue(a);return Nd(this.visualElement,a),o.start(Eh(a,o,0,r,this.visualElement,!1))}stopAnimation(){mn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){mn(a=>this.getAxisMotionValue(a).animation?.pause())}getAnimationState(a){return this.getAxisMotionValue(a).animation?.state}getAxisMotionValue(a){const r=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),l=o[r];return l||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){mn(r=>{const{drag:o}=this.getProps();if(!Cl(r,o,this.currentDirection))return;const{projection:l}=this.visualElement,f=this.getAxisMotionValue(r);if(l&&l.layout){const{min:c,max:h}=l.layout.layoutBox[r],m=f.get()||0;f.set(a[r]-Je(c,h,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!No(r)||!o||!this.constraints)return;this.stopAnimation();const l={x:0,y:0};mn(c=>{const h=this.getAxisMotionValue(c);if(h&&this.constraints!==!1){const m=h.get();l[c]=DR({min:m,max:m},this.constraints[c])}});const{transformTemplate:f}=this.visualElement.getProps();this.visualElement.current.style.transform=f?f({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),mn(c=>{if(!Cl(c,a,null))return;const h=this.getAxisMotionValue(c),{min:m,max:p}=this.constraints[c];h.set(Je(m,p,l[c]))})}addListeners(){if(!this.visualElement.current)return;kR.set(this.visualElement,this);const a=this.visualElement.current,r=Zo(a,"pointerdown",m=>{const{drag:p,dragListener:y=!0}=this.getProps(),v=m.target,S=v!==a&&z1(v);p&&y&&!S&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();No(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:l}=this.visualElement,f=l.addEventListener("measure",o);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),Ge.read(o);const c=Xo(window,"resize",()=>this.scalePositionWithinConstraints()),h=l.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:p})=>{this.isDragging&&p&&(mn(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=m[y].translate,v.set(v.get()+m[y].translate))}),this.visualElement.render())}));return()=>{c(),r(),f(),h&&h()}}getProps(){const a=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:o=!1,dragPropagation:l=!1,dragConstraints:f=!1,dragElastic:c=Zd,dragMomentum:h=!0}=a;return{...a,drag:r,dragDirectionLock:o,dragPropagation:l,dragConstraints:f,dragElastic:c,dragMomentum:h}}}function Cl(e,a,r){return(a===!0||a===e)&&(r===null||r===e)}function LR(e,a=10){let r=null;return Math.abs(e.y)>a?r="y":Math.abs(e.x)>a&&(r="x"),r}class UR extends Ya{constructor(a){super(a),this.removeGroupControls=gn,this.removeListeners=gn,this.controls=new VR(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gn}update(){const{dragControls:a}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};a!==r&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const E0=e=>(a,r)=>{e&&Ge.postRender(()=>e(a,r))};class BR extends Ya{constructor(){super(...arguments),this.removePointerDownListener=gn}onPointerDown(a){this.session=new fS(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cS(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:r,onPan:o,onPanEnd:l}=this.node.getProps();return{onSessionStart:E0(a),onStart:E0(r),onMove:o,onEnd:(f,c)=>{delete this.session,l&&Ge.postRender(()=>l(f,c))}}}mount(){this.removePointerDownListener=Zo(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ad=!1;class ZR extends w.Component{componentDidMount(){const{visualElement:a,layoutGroup:r,switchLayoutGroup:o,layoutId:l}=this.props,{projection:f}=a;f&&(r.group&&r.group.add(f),o&&o.register&&l&&o.register(f),ad&&f.root.didUpdate(),f.addEventListener("animationComplete",()=>{this.safeToRemove()}),f.setOptions({...f.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Zl.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:r,visualElement:o,drag:l,isPresent:f}=this.props,{projection:c}=o;return c&&(c.isPresent=f,a.layoutDependency!==r&&c.setOptions({...c.options,layoutDependency:r}),ad=!0,l||a.layoutDependency!==r||r===void 0||a.isPresent!==f?c.willUpdate():this.safeToRemove(),a.isPresent!==f&&(f?c.promote():c.relegate()||Ge.postRender(()=>{const h=c.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Ch.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:l}=a;ad=!0,l&&(l.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(l),o&&o.deregister&&o.deregister(l))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function hS(e){const[a,r]=KC(),o=w.useContext(Db);return R.jsx(ZR,{...e,layoutGroup:o,switchLayoutGroup:w.useContext(lS),isPresent:a,safeToRemove:r})}const HR={pan:{Feature:BR},drag:{Feature:UR,ProjectionNode:eS,MeasureLayout:hS}};function w0(e,a,r){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",r==="Start");const l="onHover"+r,f=o[l];f&&Ge.postRender(()=>f(a,is(a)))}class $R extends Ya{mount(){const{current:a}=this.node;a&&(this.unmount=Rz(a,(r,o)=>(w0(this.node,o,"Start"),l=>w0(this.node,l,"End"))))}unmount(){}}class GR extends Ya{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!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=ts(Xo(this.node.current,"focus",()=>this.onFocus()),Xo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function A0(e,a,r){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",r==="Start");const l="onTap"+(r==="End"?"":r),f=o[l];f&&Ge.postRender(()=>f(a,is(a)))}class qR extends Ya{mount(){const{current:a}=this.node;a&&(this.unmount=Dz(a,(r,o)=>(A0(this.node,o,"Start"),(l,{success:f})=>A0(this.node,l,f?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Hd=new WeakMap,id=new WeakMap,YR=e=>{const a=Hd.get(e.target);a&&a(e)},PR=e=>{e.forEach(YR)};function XR({root:e,...a}){const r=e||document;id.has(r)||id.set(r,{});const o=id.get(r),l=JSON.stringify(a);return o[l]||(o[l]=new IntersectionObserver(PR,{root:e,...a})),o[l]}function KR(e,a,r){const o=XR(a);return Hd.set(e,r),o.observe(e),()=>{Hd.delete(e),o.unobserve(e)}}const QR={some:0,all:1};class FR extends Ya{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:r,margin:o,amount:l="some",once:f}=a,c={root:r?r.current:void 0,rootMargin:o,threshold:typeof l=="number"?l:QR[l]},h=m=>{const{isIntersecting:p}=m;if(this.isInView===p||(this.isInView=p,f&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),S=p?y:v;S&&S(m)};return KR(this.node.current,c,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:r}=this.node;["amount","margin","root"].some(JR(a,r))&&this.startObserver()}unmount(){}}function JR({viewport:e={}},{viewport:a={}}={}){return r=>e[r]!==a[r]}const IR={inView:{Feature:FR},tap:{Feature:qR},focus:{Feature:GR},hover:{Feature:$R}},WR={layout:{ProjectionNode:eS,MeasureLayout:hS}},eM={...ER,...IR,...HR,...WR},Ko=bR(eM,SR),mS=()=>{const[e,a]=w.useState(!!localStorage.getItem("morpheus.auth.token"));return w.useEffect(()=>{const l=()=>{a(!!localStorage.getItem("morpheus.auth.token"))};return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[]),{isAuthenticated:e,login:l=>{localStorage.setItem("morpheus.auth.token",l),a(!0)},logout:()=>{localStorage.removeItem("morpheus.auth.token"),a(!1),window.location.href="/login"}}};function tM({children:e}){const a=An(),[r,o]=w.useState(!0),{logout:l}=mS();w.useEffect(()=>{const c=localStorage.getItem("theme");o(c?c==="dark":!0)},[]),w.useEffect(()=>{r?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[r]);const f=[{icon:Rw,label:"Dashboard",path:"/"},{icon:Lw,label:"Configuration",path:"/config"},{icon:Hw,label:"Logs",path:"/logs"}];return R.jsxs("div",{className:"flex flex-col h-screen bg-gray-50 dark:bg-black text-gray-900 dark:text-matrix-secondary font-mono overflow-hidden transition-colors duration-300",children:[R.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[R.jsxs(Ko.div,{className:"w-64 border-r border-gray-200 dark:border-matrix-primary bg-white dark:bg-zinc-950 flex flex-col shrink-0 transition-colors duration-300",initial:{x:-64,opacity:0},animate:{x:0,opacity:1},transition:{duration:.9,type:"spring"},children:[R.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-matrix-primary flex justify-between items-center",children:[R.jsxs("h1",{className:"text-xl font-bold text-green-700 dark:text-matrix-highlight flex items-center gap-2",children:[R.jsx(xb,{className:"w-6 h-6"}),"MORPHEUS"]}),R.jsx("button",{onClick:()=>o(!r),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-matrix-primary/50 text-gray-500 dark:text-matrix-secondary transition-colors",children:r?R.jsx(Bw,{className:"w-4 h-4"}):R.jsx(Nw,{className:"w-4 h-4"})})]}),R.jsx("nav",{className:"flex-1 p-4 space-y-2",children:f.map(c=>{const h=a.pathname===c.path;return R.jsxs(nh,{to:c.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${h?"bg-green-100 text-green-800 dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-gray-100 dark:hover:bg-matrix-primary/50 text-gray-600 dark:text-matrix-secondary"}`,children:[R.jsx(c.icon,{className:"w-5 h-5"}),R.jsx("span",{children:c.label})]},c.path)})}),R.jsx("div",{className:"p-4 border-t border-gray-200 dark:border-matrix-primary",children:R.jsxs("button",{onClick:l,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-gray-600 dark:text-matrix-secondary hover:text-red-600 transition-colors",children:[R.jsx(Ow,{className:"w-5 h-5"}),R.jsx("span",{children:"Logout"})]})})]}),R.jsxs("main",{className:"flex-1 overflow-auto p-8 relative flex flex-col",children:[R.jsx("div",{className:"max-w-6xl w-full mx-auto flex-1",children:e}),R.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"})]})]}),R.jsx(x2,{})]})}const nM={hidden:{opacity:0,y:20},show:{opacity:1,y:0}},yi=({title:e,value:a,icon:r,subValue:o})=>R.jsxs(Ko.div,{variants:nM,className:"border border-matrix-primary bg-zinc-950/50 p-6 rounded relative overflow-hidden group hover:border-matrix-highlight transition-colors",children:[R.jsxs("div",{className:"flex justify-between items-start mb-4",children:[R.jsx("h3",{className:"text-matrix-secondary text-sm font-bold uppercase",children:e}),R.jsx(r,{className:"w-6 h-6 text-matrix-primary group-hover:text-matrix-highlight transition-colors"})]}),R.jsx("div",{className:"text-3xl font-bold text-matrix-highlight mb-1 font-mono tracking-tighter truncate",children:a}),o&&R.jsx("div",{className:"text-xs text-matrix-secondary opacity-70 font-mono",children:o})]}),aM={fetchUsageStats:async()=>$l.get("/stats/usage")};function iM(){const{data:e}=es("/api/stats/usage",aM.fetchUsageStats,{refreshInterval:5e3});return R.jsxs(R.Fragment,{children:[R.jsx(yi,{title:"Total Input",value:e?e.totalInputTokens.toLocaleString():"-",icon:pw,subValue:"Tokens processed"}),R.jsx(yi,{title:"Total Output",value:e?e.totalOutputTokens.toLocaleString():"-",icon:yw,subValue:"Tokens generated"})]})}function rM(){const{data:e}=Ob(),a={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},r={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return R.jsxs(Ko.div,{className:"space-y-8",variants:a,initial:"hidden",animate:"show",children:[R.jsxs(Ko.div,{variants:r,children:[R.jsx("h2",{className:"text-2xl font-bold text-matrix-highlight mb-2",children:"SYSTEM STATUS"}),R.jsx("p",{className:"text-matrix-secondary opacity-80",children:"Overview of the Morpheus agent runtime."})]}),R.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[R.jsx(yi,{title:"Agent Status",value:e?.status.toUpperCase()||"CONNECTING...",icon:xb,subValue:e?`PID: ${e.pid}`:""}),R.jsx(yi,{title:"Uptime",value:e?`${Math.floor(e.uptimeSeconds/60)}m`:"-",icon:_w,subValue:e?`${e.uptimeSeconds.toFixed(0)} seconds`:""}),R.jsx(yi,{title:"Version",value:e?.projectVersion||"-",icon:ww,subValue:`Node ${e?.nodeVersion||"-"}`}),R.jsx(yi,{title:"Provider",value:e?.llmProvider?.toUpperCase()||"-",icon:xw,subValue:"LLM Inference Engine"}),R.jsx(yi,{title:"Model",value:e?.llmModel||"-",icon:bw,subValue:"Active Model"}),R.jsx(iM,{})]})]})}function hi({title:e,description:a,children:r}){return R.jsxs("div",{className:"border border-matrix-primary rounded-lg p-6 bg-matrix-base/50",children:[R.jsxs("div",{className:"mb-4",children:[R.jsx("h3",{className:"text-lg font-medium text-matrix-highlight",children:e}),a&&R.jsx("p",{className:"text-sm text-matrix-secondary mt-1",children:a})]}),R.jsx("div",{className:"space-y-4",children:r})]})}const oM=(e,a)=>{const r=new Array(e.length+a.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<a.length;o++)r[e.length+o]=a[o];return r},sM=(e,a)=>({classGroupId:e,validator:a}),pS=(e=new Map,a=null,r)=>({nextPart:e,validators:a,classGroupId:r}),Fl="-",z0=[],lM="arbitrary..",uM=e=>{const a=fM(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return cM(c);const h=c.split(Fl),m=h[0]===""&&h.length>1?1:0;return gS(h,m,a)},getConflictingClassGroupIds:(c,h)=>{if(h){const m=o[c],p=r[c];return m?p?oM(p,m):m:p||z0}return r[c]||z0}}},gS=(e,a,r)=>{if(e.length-a===0)return r.classGroupId;const l=e[a],f=r.nextPart.get(l);if(f){const p=gS(e,a+1,f);if(p)return p}const c=r.validators;if(c===null)return;const h=a===0?e.join(Fl):e.slice(a).join(Fl),m=c.length;for(let p=0;p<m;p++){const y=c[p];if(y.validator(h))return y.classGroupId}},cM=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=e.slice(1,-1),r=a.indexOf(":"),o=a.slice(0,r);return o?lM+o:void 0})(),fM=e=>{const{theme:a,classGroups:r}=e;return dM(r,a)},dM=(e,a)=>{const r=pS();for(const o in e){const l=e[o];Vh(l,r,o,a)}return r},Vh=(e,a,r,o)=>{const l=e.length;for(let f=0;f<l;f++){const c=e[f];hM(c,a,r,o)}},hM=(e,a,r,o)=>{if(typeof e=="string"){mM(e,a,r);return}if(typeof e=="function"){pM(e,a,r,o);return}gM(e,a,r,o)},mM=(e,a,r)=>{const o=e===""?a:yS(a,e);o.classGroupId=r},pM=(e,a,r,o)=>{if(yM(e)){Vh(e(o),a,r,o);return}a.validators===null&&(a.validators=[]),a.validators.push(sM(r,e))},gM=(e,a,r,o)=>{const l=Object.entries(e),f=l.length;for(let c=0;c<f;c++){const[h,m]=l[c];Vh(m,yS(a,h),r,o)}},yS=(e,a)=>{let r=e;const o=a.split(Fl),l=o.length;for(let f=0;f<l;f++){const c=o[f];let h=r.nextPart.get(c);h||(h=pS(),r.nextPart.set(c,h)),r=h}return r},yM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,vM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let a=0,r=Object.create(null),o=Object.create(null);const l=(f,c)=>{r[f]=c,a++,a>e&&(a=0,o=r,r=Object.create(null))};return{get(f){let c=r[f];if(c!==void 0)return c;if((c=o[f])!==void 0)return l(f,c),c},set(f,c){f in r?r[f]=c:l(f,c)}}},$d="!",C0=":",bM=[],R0=(e,a,r,o,l)=>({modifiers:e,hasImportantModifier:a,baseClassName:r,maybePostfixModifierPosition:o,isExternal:l}),SM=e=>{const{prefix:a,experimentalParseClassName:r}=e;let o=l=>{const f=[];let c=0,h=0,m=0,p;const y=l.length;for(let T=0;T<y;T++){const O=l[T];if(c===0&&h===0){if(O===C0){f.push(l.slice(m,T)),m=T+1;continue}if(O==="/"){p=T;continue}}O==="["?c++:O==="]"?c--:O==="("?h++:O===")"&&h--}const v=f.length===0?l:l.slice(m);let S=v,x=!1;v.endsWith($d)?(S=v.slice(0,-1),x=!0):v.startsWith($d)&&(S=v.slice(1),x=!0);const M=p&&p>m?p-m:void 0;return R0(f,x,S,M)};if(a){const l=a+C0,f=o;o=c=>c.startsWith(l)?f(c.slice(l.length)):R0(bM,!1,c,void 0,!0)}if(r){const l=o;o=f=>r({className:f,parseClassName:l})}return o},xM=e=>{const a=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{a.set(r,1e6+o)}),r=>{const o=[];let l=[];for(let f=0;f<r.length;f++){const c=r[f],h=c[0]==="[",m=a.has(c);h||m?(l.length>0&&(l.sort(),o.push(...l),l=[]),o.push(c)):l.push(c)}return l.length>0&&(l.sort(),o.push(...l)),o}},TM=e=>({cache:vM(e.cacheSize),parseClassName:SM(e),sortModifiers:xM(e),...uM(e)}),_M=/\s+/,EM=(e,a)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l,sortModifiers:f}=a,c=[],h=e.trim().split(_M);let m="";for(let p=h.length-1;p>=0;p-=1){const y=h[p],{isExternal:v,modifiers:S,hasImportantModifier:x,baseClassName:M,maybePostfixModifierPosition:T}=r(y);if(v){m=y+(m.length>0?" "+m:m);continue}let O=!!T,L=o(O?M.substring(0,T):M);if(!L){if(!O){m=y+(m.length>0?" "+m:m);continue}if(L=o(M),!L){m=y+(m.length>0?" "+m:m);continue}O=!1}const C=S.length===0?"":S.length===1?S[0]:f(S).join(":"),k=x?C+$d:C,Q=k+L;if(c.indexOf(Q)>-1)continue;c.push(Q);const q=l(L,O);for(let I=0;I<q.length;++I){const F=q[I];c.push(k+F)}m=y+(m.length>0?" "+m:m)}return m},wM=(...e)=>{let a=0,r,o,l="";for(;a<e.length;)(r=e[a++])&&(o=vS(r))&&(l&&(l+=" "),l+=o);return l},vS=e=>{if(typeof e=="string")return e;let a,r="";for(let o=0;o<e.length;o++)e[o]&&(a=vS(e[o]))&&(r&&(r+=" "),r+=a);return r},AM=(e,...a)=>{let r,o,l,f;const c=m=>{const p=a.reduce((y,v)=>v(y),e());return r=TM(p),o=r.cache.get,l=r.cache.set,f=h,h(m)},h=m=>{const p=o(m);if(p)return p;const y=EM(m,r);return l(m,y),y};return f=c,(...m)=>f(wM(...m))},zM=[],gt=e=>{const a=r=>r[e]||zM;return a.isThemeGetter=!0,a},bS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,SS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,CM=/^\d+\/\d+$/,RM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MM=/\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$/,OM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,DM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=e=>CM.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),Va=e=>!!e&&Number.isInteger(Number(e)),rd=e=>e.endsWith("%")&&ge(e.slice(0,-1)),aa=e=>RM.test(e),jM=()=>!0,kM=e=>MM.test(e)&&!OM.test(e),xS=()=>!1,VM=e=>DM.test(e),LM=e=>NM.test(e),UM=e=>!te(e)&&!ne(e),BM=e=>zr(e,ES,xS),te=e=>bS.test(e),mi=e=>zr(e,wS,kM),od=e=>zr(e,qM,ge),M0=e=>zr(e,TS,xS),ZM=e=>zr(e,_S,LM),Rl=e=>zr(e,AS,VM),ne=e=>SS.test(e),Mo=e=>Cr(e,wS),HM=e=>Cr(e,YM),O0=e=>Cr(e,TS),$M=e=>Cr(e,ES),GM=e=>Cr(e,_S),Ml=e=>Cr(e,AS,!0),zr=(e,a,r)=>{const o=bS.exec(e);return o?o[1]?a(o[1]):r(o[2]):!1},Cr=(e,a,r=!1)=>{const o=SS.exec(e);return o?o[1]?a(o[1]):r:!1},TS=e=>e==="position"||e==="percentage",_S=e=>e==="image"||e==="url",ES=e=>e==="length"||e==="size"||e==="bg-size",wS=e=>e==="length",qM=e=>e==="number",YM=e=>e==="family-name",AS=e=>e==="shadow",PM=()=>{const e=gt("color"),a=gt("font"),r=gt("text"),o=gt("font-weight"),l=gt("tracking"),f=gt("leading"),c=gt("breakpoint"),h=gt("container"),m=gt("spacing"),p=gt("radius"),y=gt("shadow"),v=gt("inset-shadow"),S=gt("text-shadow"),x=gt("drop-shadow"),M=gt("blur"),T=gt("perspective"),O=gt("aspect"),L=gt("ease"),C=gt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...Q(),ne,te],I=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],P=()=>[ne,te,m],W=()=>[sr,"full","auto",...P()],xe=()=>[Va,"none","subgrid",ne,te],Ae=()=>["auto",{span:["full",Va,ne,te]},Va,ne,te],Ce=()=>[Va,"auto",ne,te],ot=()=>["auto","min","max","fr",ne,te],je=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ke=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...P()],X=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],Y=()=>[e,ne,te],ce=()=>[...Q(),O0,M0,{position:[ne,te]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",$M,BM,{size:[ne,te]}],Z=()=>[rd,Mo,mi],K=()=>["","none","full",p,ne,te],J=()=>["",ge,Mo,mi],le=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[ge,rd,O0,M0],st=()=>["","none",M,ne,te],Re=()=>["none",ge,ne,te],Pt=()=>["none",ge,ne,te],zn=()=>[ge,ne,te],Cn=()=>[sr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[aa],breakpoint:[aa],color:[jM],container:[aa],"drop-shadow":[aa],ease:["in","out","in-out"],font:[UM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[aa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[aa],shadow:[aa],spacing:["px",ge],text:[aa],"text-shadow":[aa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,te,ne,O]}],container:["container"],columns:[{columns:[ge,te,ne,h]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:q()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Va,"auto",ne,te]}],basis:[{basis:[sr,"full","auto",h,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,sr,"auto","initial","none",te]}],grow:[{grow:["",ge,ne,te]}],shrink:[{shrink:["",ge,ne,te]}],order:[{order:[Va,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":xe()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":Ce()}],"col-end":[{"col-end":Ce()}],"grid-rows":[{"grid-rows":xe()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":Ce()}],"row-end":[{"row-end":Ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ot()}],"auto-rows":[{"auto-rows":ot()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...je(),"normal"]}],"justify-items":[{"justify-items":[...ke(),"normal"]}],"justify-self":[{"justify-self":["auto",...ke()]}],"align-content":[{content:["normal",...je()]}],"align-items":[{items:[...ke(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ke(),{baseline:["","last"]}]}],"place-content":[{"place-content":je()}],"place-items":[{"place-items":[...ke(),"baseline"]}],"place-self":[{"place-self":["auto",...ke()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[h,"screen",...X()]}],"min-w":[{"min-w":[h,"screen","none",...X()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[c]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Mo,mi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ne,od]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rd,te]}],"font-family":[{font:[HM,te,a]}],"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:[l,ne,te]}],"line-clamp":[{"line-clamp":[ge,"none",ne,od]}],leading:[{leading:[f,...P()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",ne,mi]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[ge,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],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",ne,te]}],"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:pe()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Va,ne,te],radial:["",ne,te],conic:[Va,ne,te]},GM,ZM]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,ne,te]}],"outline-w":[{outline:["",ge,Mo,mi]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",y,Ml,Rl]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",v,Ml,Rl]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[ge,mi]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",S,Ml,Rl]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[ge,ne,te]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":Q()}],"mask-image-conic-pos":[{"mask-conic":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:st()}],brightness:[{brightness:[ge,ne,te]}],contrast:[{contrast:[ge,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",x,Ml,Rl]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",ge,ne,te]}],"hue-rotate":[{"hue-rotate":[ge,ne,te]}],invert:[{invert:["",ge,ne,te]}],saturate:[{saturate:[ge,ne,te]}],sepia:[{sepia:["",ge,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":st()}],"backdrop-brightness":[{"backdrop-brightness":[ge,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[ge,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",ge,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[ge,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[ge,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,ne,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",ne,te]}],ease:[{ease:["linear","initial",L,ne,te]}],delay:[{delay:[ge,ne,te]}],animate:[{animate:["none",C,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,ne,te]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Pt()}],"scale-x":[{"scale-x":Pt()}],"scale-y":[{"scale-y":Pt()}],"scale-z":[{"scale-z":Pt()}],"scale-3d":["scale-3d"],skew:[{skew:zn()}],"skew-x":[{"skew-x":zn()}],"skew-y":[{"skew-y":zn()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Cn()}],"translate-x":[{"translate-x":Cn()}],"translate-y":[{"translate-y":Cn()}],"translate-z":[{"translate-z":Cn()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",ne,te]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",ne,te]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[ge,Mo,mi,od]}],stroke:[{stroke:["none",...Y()]}],"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"]}},yr=AM(PM);function La({label:e,error:a,helperText:r,className:o,...l}){return R.jsxs("div",{className:"flex flex-col gap-1.5",children:[R.jsx("label",{className:"text-sm font-medium text-matrix-highlight/80",children:e}),R.jsx("input",{className:yr("bg-matrix-base border border-matrix-primary text-matrix-highlight placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-matrix-highlight focus:border-matrix-highlight transition-colors",a&&"border-red-500 focus:border-red-500 focus:ring-red-500",o),...l}),r&&!a&&R.jsx("p",{className:"text-xs text-matrix-secondary",children:r}),a&&R.jsx("p",{className:"text-xs text-red-500",children:a})]})}function sd({label:e,options:a,error:r,helperText:o,className:l,...f}){return R.jsxs("div",{className:"flex flex-col gap-1.5",children:[R.jsx("label",{className:"text-sm font-medium text-matrix-highlight/80",children:e}),R.jsx("select",{className:yr("bg-matrix-base border border-matrix-primary text-matrix-highlight rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-matrix-highlight focus:border-matrix-highlight transition-colors appearance-none",r&&"border-red-500 focus:border-red-500 focus:ring-red-500",l),...f,children:a.map(c=>R.jsx("option",{value:c.value,className:"bg-matrix-base",children:c.label},c.value))}),o&&!r&&R.jsx("p",{className:"text-xs text-matrix-secondary",children:o}),r&&R.jsx("p",{className:"text-xs text-red-500",children:r})]})}function Oo({label:e,error:a,helperText:r,className:o,...l}){return R.jsxs("div",{className:"flex flex-col gap-1.5",children:[R.jsx("label",{className:"text-sm font-medium text-matrix-highlight/80",children:e}),R.jsx("input",{type:"number",className:yr("bg-matrix-base border border-matrix-primary text-matrix-highlight placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-matrix-highlight focus:border-matrix-highlight transition-colors",a&&"border-red-500 focus:border-red-500 focus:ring-red-500",o),...l}),r&&!a&&R.jsx("p",{className:"text-xs text-matrix-secondary",children:r}),a&&R.jsx("p",{className:"text-xs text-red-500",children:a})]})}function Ol({label:e,checked:a,onChange:r,helperText:o,disabled:l}){return R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("div",{className:"flex flex-col",children:[R.jsx("span",{className:yr("text-sm font-medium text-matrix-highlight/80",l&&"opacity-50"),children:e}),o&&R.jsx("span",{className:"text-xs text-matrix-secondary",children:o})]}),R.jsx("button",{type:"button",role:"switch","aria-checked":a,onClick:()=>!l&&r(!a),className:yr("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-matrix-highlight focus:ring-offset-2 focus:ring-offset-black",a?"bg-matrix-highlight":"bg-matrix-primary",l&&"opacity-50 cursor-not-allowed"),children:R.jsx("span",{className:yr("inline-block h-4 w-4 transform rounded-full bg-black transition-transform",a?"translate-x-6":"translate-x-1")})})]})}const D0={fetchConfig:async()=>$l.get("/config"),updateConfig:async e=>$l.post("/config",e)};function $(e,a,r){function o(h,m){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:m,constr:c,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),a(h,m);const p=c.prototype,y=Object.keys(p);for(let v=0;v<y.length;v++){const S=y[v];S in h||(h[S]=p[S].bind(h))}}const l=r?.Parent??Object;class f extends l{}Object.defineProperty(f,"name",{value:e});function c(h){var m;const p=r?.Parent?new f:this;o(p,h),(m=p._zod).deferred??(m.deferred=[]);for(const y of p._zod.deferred)y();return p}return Object.defineProperty(c,"init",{value:o}),Object.defineProperty(c,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class vr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class zS extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}const CS={};function Ga(e){return CS}function RS(e){const a=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,l])=>a.indexOf(+o)===-1).map(([o,l])=>l)}function Gd(e,a){return typeof a=="bigint"?a.toString():a}function Lh(e){return{get value(){{const a=e();return Object.defineProperty(this,"value",{value:a}),a}}}}function Uh(e){return e==null}function Bh(e){const a=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(a,r)}function XM(e,a){const r=(e.toString().split(".")[1]||"").length,o=a.toString();let l=(o.split(".")[1]||"").length;if(l===0&&/\d?e-\d?/.test(o)){const m=o.match(/\d?e-(\d?)/);m?.[1]&&(l=Number.parseInt(m[1]))}const f=r>l?r:l,c=Number.parseInt(e.toFixed(f).replace(".","")),h=Number.parseInt(a.toFixed(f).replace(".",""));return c%h/10**f}const N0=Symbol("evaluating");function Ne(e,a,r){let o;Object.defineProperty(e,a,{get(){if(o!==N0)return o===void 0&&(o=N0,o=r()),o},set(l){Object.defineProperty(e,a,{value:l})},configurable:!0})}function xi(e,a,r){Object.defineProperty(e,a,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Pa(...e){const a={};for(const r of e){const o=Object.getOwnPropertyDescriptors(r);Object.assign(a,o)}return Object.defineProperties({},a)}function j0(e){return JSON.stringify(e)}function KM(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const MS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Jl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const QM=Lh(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Sr(e){if(Jl(e)===!1)return!1;const a=e.constructor;if(a===void 0||typeof a!="function")return!0;const r=a.prototype;return!(Jl(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function OS(e){return Sr(e)?{...e}:Array.isArray(e)?[...e]:e}const FM=new Set(["string","number","symbol"]);function su(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xa(e,a,r){const o=new e._zod.constr(a??e._zod.def);return(!a||r?.parent)&&(o._zod.parent=e),o}function se(e){const a=e;if(!a)return{};if(typeof a=="string")return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");a.error=a.message}return delete a.message,typeof a.error=="string"?{...a,error:()=>a.error}:a}function JM(e){return Object.keys(e).filter(a=>e[a]._zod.optin==="optional"&&e[a]._zod.optout==="optional")}const IM={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 WM(e,a){const r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const f=Pa(e._zod.def,{get shape(){const c={};for(const h in a){if(!(h in r.shape))throw new Error(`Unrecognized key: "${h}"`);a[h]&&(c[h]=r.shape[h])}return xi(this,"shape",c),c},checks:[]});return Xa(e,f)}function eO(e,a){const r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const f=Pa(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const h in a){if(!(h in r.shape))throw new Error(`Unrecognized key: "${h}"`);a[h]&&delete c[h]}return xi(this,"shape",c),c},checks:[]});return Xa(e,f)}function tO(e,a){if(!Sr(a))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const f=e._zod.def.shape;for(const c in a)if(Object.getOwnPropertyDescriptor(f,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const l=Pa(e._zod.def,{get shape(){const f={...e._zod.def.shape,...a};return xi(this,"shape",f),f}});return Xa(e,l)}function nO(e,a){if(!Sr(a))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Pa(e._zod.def,{get shape(){const o={...e._zod.def.shape,...a};return xi(this,"shape",o),o}});return Xa(e,r)}function aO(e,a){const r=Pa(e._zod.def,{get shape(){const o={...e._zod.def.shape,...a._zod.def.shape};return xi(this,"shape",o),o},get catchall(){return a._zod.def.catchall},checks:[]});return Xa(e,r)}function iO(e,a,r){const l=a._zod.def.checks;if(l&&l.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=Pa(a._zod.def,{get shape(){const h=a._zod.def.shape,m={...h};if(r)for(const p in r){if(!(p in h))throw new Error(`Unrecognized key: "${p}"`);r[p]&&(m[p]=e?new e({type:"optional",innerType:h[p]}):h[p])}else for(const p in h)m[p]=e?new e({type:"optional",innerType:h[p]}):h[p];return xi(this,"shape",m),m},checks:[]});return Xa(a,c)}function rO(e,a,r){const o=Pa(a._zod.def,{get shape(){const l=a._zod.def.shape,f={...l};if(r)for(const c in r){if(!(c in f))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(f[c]=new e({type:"nonoptional",innerType:l[c]}))}else for(const c in l)f[c]=new e({type:"nonoptional",innerType:l[c]});return xi(this,"shape",f),f}});return Xa(a,o)}function hr(e,a=0){if(e.aborted===!0)return!0;for(let r=a;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function mr(e,a){return a.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Dl(e){return typeof e=="string"?e:e?.message}function qa(e,a,r){const o={...e,path:e.path??[]};if(!e.message){const l=Dl(e.inst?._zod.def?.error?.(e))??Dl(a?.error?.(e))??Dl(r.customError?.(e))??Dl(r.localeError?.(e))??"Invalid input";o.message=l}return delete o.inst,delete o.continue,a?.reportInput||delete o.input,o}function Zh(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Qo(...e){const[a,r,o]=e;return typeof a=="string"?{message:a,code:"custom",input:r,inst:o}:{...a}}const DS=(e,a)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:a,enumerable:!1}),e.message=JSON.stringify(a,Gd,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},NS=$("$ZodError",DS),jS=$("$ZodError",DS,{Parent:Error});function oO(e,a=r=>r.message){const r={},o=[];for(const l of e.issues)l.path.length>0?(r[l.path[0]]=r[l.path[0]]||[],r[l.path[0]].push(a(l))):o.push(a(l));return{formErrors:o,fieldErrors:r}}function sO(e,a=r=>r.message){const r={_errors:[]},o=l=>{for(const f of l.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(c=>o({issues:c}));else if(f.code==="invalid_key")o({issues:f.issues});else if(f.code==="invalid_element")o({issues:f.issues});else if(f.path.length===0)r._errors.push(a(f));else{let c=r,h=0;for(;h<f.path.length;){const m=f.path[h];h===f.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(a(f))):c[m]=c[m]||{_errors:[]},c=c[m],h++}}};return o(e),r}const Hh=e=>(a,r,o,l)=>{const f=o?Object.assign(o,{async:!1}):{async:!1},c=a._zod.run({value:r,issues:[]},f);if(c instanceof Promise)throw new vr;if(c.issues.length){const h=new(l?.Err??e)(c.issues.map(m=>qa(m,f,Ga())));throw MS(h,l?.callee),h}return c.value},$h=e=>async(a,r,o,l)=>{const f=o?Object.assign(o,{async:!0}):{async:!0};let c=a._zod.run({value:r,issues:[]},f);if(c instanceof Promise&&(c=await c),c.issues.length){const h=new(l?.Err??e)(c.issues.map(m=>qa(m,f,Ga())));throw MS(h,l?.callee),h}return c.value},lu=e=>(a,r,o)=>{const l=o?{...o,async:!1}:{async:!1},f=a._zod.run({value:r,issues:[]},l);if(f instanceof Promise)throw new vr;return f.issues.length?{success:!1,error:new(e??NS)(f.issues.map(c=>qa(c,l,Ga())))}:{success:!0,data:f.value}},lO=lu(jS),uu=e=>async(a,r,o)=>{const l=o?Object.assign(o,{async:!0}):{async:!0};let f=a._zod.run({value:r,issues:[]},l);return f instanceof Promise&&(f=await f),f.issues.length?{success:!1,error:new e(f.issues.map(c=>qa(c,l,Ga())))}:{success:!0,data:f.value}},uO=uu(jS),cO=e=>(a,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Hh(e)(a,r,l)},fO=e=>(a,r,o)=>Hh(e)(a,r,o),dO=e=>async(a,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return $h(e)(a,r,l)},hO=e=>async(a,r,o)=>$h(e)(a,r,o),mO=e=>(a,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return lu(e)(a,r,l)},pO=e=>(a,r,o)=>lu(e)(a,r,o),gO=e=>async(a,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return uu(e)(a,r,l)},yO=e=>async(a,r,o)=>uu(e)(a,r,o),vO=/^[cC][^\s-]{8,}$/,bO=/^[0-9a-z]+$/,SO=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xO=/^[0-9a-vA-V]{20}$/,TO=/^[A-Za-z0-9]{27}$/,_O=/^[a-zA-Z0-9_-]{21}$/,EO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,wO=/^([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})$/,k0=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)$/,AO=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,zO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function CO(){return new RegExp(zO,"u")}const RO=/^(?:(?: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])$/,MO=/^(([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}|:))$/,OO=/^((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])$/,DO=/^(([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])$/,NO=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,kS=/^[A-Za-z0-9_-]*$/,jO=/^\+[1-9]\d{6,14}$/,VS="(?:(?:\\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])))",kO=new RegExp(`^${VS}$`);function LS(e){const a="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${a}`:e.precision===0?`${a}:[0-5]\\d`:`${a}:[0-5]\\d\\.\\d{${e.precision}}`:`${a}(?::[0-5]\\d(?:\\.\\d+)?)?`}function VO(e){return new RegExp(`^${LS(e)}$`)}function LO(e){const a=LS({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${a}(?:${r.join("|")})`;return new RegExp(`^${VS}T(?:${o})$`)}const UO=e=>{const a=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${a}$`)},BO=/^-?\d+$/,US=/^-?\d+(?:\.\d+)?$/,ZO=/^(?:true|false)$/i,HO=/^[^A-Z]*$/,$O=/^[^a-z]*$/,Yt=$("$ZodCheck",(e,a)=>{var r;e._zod??(e._zod={}),e._zod.def=a,(r=e._zod).onattach??(r.onattach=[])}),BS={number:"number",bigint:"bigint",object:"date"},ZS=$("$ZodCheckLessThan",(e,a)=>{Yt.init(e,a);const r=BS[typeof a.value];e._zod.onattach.push(o=>{const l=o._zod.bag,f=(a.inclusive?l.maximum:l.exclusiveMaximum)??Number.POSITIVE_INFINITY;a.value<f&&(a.inclusive?l.maximum=a.value:l.exclusiveMaximum=a.value)}),e._zod.check=o=>{(a.inclusive?o.value<=a.value:o.value<a.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof a.value=="object"?a.value.getTime():a.value,input:o.value,inclusive:a.inclusive,inst:e,continue:!a.abort})}}),HS=$("$ZodCheckGreaterThan",(e,a)=>{Yt.init(e,a);const r=BS[typeof a.value];e._zod.onattach.push(o=>{const l=o._zod.bag,f=(a.inclusive?l.minimum:l.exclusiveMinimum)??Number.NEGATIVE_INFINITY;a.value>f&&(a.inclusive?l.minimum=a.value:l.exclusiveMinimum=a.value)}),e._zod.check=o=>{(a.inclusive?o.value>=a.value:o.value>a.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof a.value=="object"?a.value.getTime():a.value,input:o.value,inclusive:a.inclusive,inst:e,continue:!a.abort})}}),GO=$("$ZodCheckMultipleOf",(e,a)=>{Yt.init(e,a),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=a.value)}),e._zod.check=r=>{if(typeof r.value!=typeof a.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%a.value===BigInt(0):XM(r.value,a.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:a.value,input:r.value,inst:e,continue:!a.abort})}}),qO=$("$ZodCheckNumberFormat",(e,a)=>{Yt.init(e,a),a.format=a.format||"float64";const r=a.format?.includes("int"),o=r?"int":"number",[l,f]=IM[a.format];e._zod.onattach.push(c=>{const h=c._zod.bag;h.format=a.format,h.minimum=l,h.maximum=f,r&&(h.pattern=BO)}),e._zod.check=c=>{const h=c.value;if(r){if(!Number.isInteger(h)){c.issues.push({expected:o,format:a.format,code:"invalid_type",continue:!1,input:h,inst:e});return}if(!Number.isSafeInteger(h)){h>0?c.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!a.abort}):c.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!a.abort});return}}h<l&&c.issues.push({origin:"number",input:h,code:"too_small",minimum:l,inclusive:!0,inst:e,continue:!a.abort}),h>f&&c.issues.push({origin:"number",input:h,code:"too_big",maximum:f,inclusive:!0,inst:e,continue:!a.abort})}}),YO=$("$ZodCheckMaxLength",(e,a)=>{var r;Yt.init(e,a),(r=e._zod.def).when??(r.when=o=>{const l=o.value;return!Uh(l)&&l.length!==void 0}),e._zod.onattach.push(o=>{const l=o._zod.bag.maximum??Number.POSITIVE_INFINITY;a.maximum<l&&(o._zod.bag.maximum=a.maximum)}),e._zod.check=o=>{const l=o.value;if(l.length<=a.maximum)return;const c=Zh(l);o.issues.push({origin:c,code:"too_big",maximum:a.maximum,inclusive:!0,input:l,inst:e,continue:!a.abort})}}),PO=$("$ZodCheckMinLength",(e,a)=>{var r;Yt.init(e,a),(r=e._zod.def).when??(r.when=o=>{const l=o.value;return!Uh(l)&&l.length!==void 0}),e._zod.onattach.push(o=>{const l=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;a.minimum>l&&(o._zod.bag.minimum=a.minimum)}),e._zod.check=o=>{const l=o.value;if(l.length>=a.minimum)return;const c=Zh(l);o.issues.push({origin:c,code:"too_small",minimum:a.minimum,inclusive:!0,input:l,inst:e,continue:!a.abort})}}),XO=$("$ZodCheckLengthEquals",(e,a)=>{var r;Yt.init(e,a),(r=e._zod.def).when??(r.when=o=>{const l=o.value;return!Uh(l)&&l.length!==void 0}),e._zod.onattach.push(o=>{const l=o._zod.bag;l.minimum=a.length,l.maximum=a.length,l.length=a.length}),e._zod.check=o=>{const l=o.value,f=l.length;if(f===a.length)return;const c=Zh(l),h=f>a.length;o.issues.push({origin:c,...h?{code:"too_big",maximum:a.length}:{code:"too_small",minimum:a.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!a.abort})}}),cu=$("$ZodCheckStringFormat",(e,a)=>{var r,o;Yt.init(e,a),e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=a.format,a.pattern&&(f.patterns??(f.patterns=new Set),f.patterns.add(a.pattern))}),a.pattern?(r=e._zod).check??(r.check=l=>{a.pattern.lastIndex=0,!a.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:a.format,input:l.value,...a.pattern?{pattern:a.pattern.toString()}:{},inst:e,continue:!a.abort})}):(o=e._zod).check??(o.check=()=>{})}),KO=$("$ZodCheckRegex",(e,a)=>{cu.init(e,a),e._zod.check=r=>{a.pattern.lastIndex=0,!a.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:a.pattern.toString(),inst:e,continue:!a.abort})}}),QO=$("$ZodCheckLowerCase",(e,a)=>{a.pattern??(a.pattern=HO),cu.init(e,a)}),FO=$("$ZodCheckUpperCase",(e,a)=>{a.pattern??(a.pattern=$O),cu.init(e,a)}),JO=$("$ZodCheckIncludes",(e,a)=>{Yt.init(e,a);const r=su(a.includes),o=new RegExp(typeof a.position=="number"?`^.{${a.position}}${r}`:r);a.pattern=o,e._zod.onattach.push(l=>{const f=l._zod.bag;f.patterns??(f.patterns=new Set),f.patterns.add(o)}),e._zod.check=l=>{l.value.includes(a.includes,a.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:a.includes,input:l.value,inst:e,continue:!a.abort})}}),IO=$("$ZodCheckStartsWith",(e,a)=>{Yt.init(e,a);const r=new RegExp(`^${su(a.prefix)}.*`);a.pattern??(a.pattern=r),e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(a.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:a.prefix,input:o.value,inst:e,continue:!a.abort})}}),WO=$("$ZodCheckEndsWith",(e,a)=>{Yt.init(e,a);const r=new RegExp(`.*${su(a.suffix)}$`);a.pattern??(a.pattern=r),e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(a.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:a.suffix,input:o.value,inst:e,continue:!a.abort})}}),eD=$("$ZodCheckOverwrite",(e,a)=>{Yt.init(e,a),e._zod.check=r=>{r.value=a.tx(r.value)}});class tD{constructor(a=[]){this.content=[],this.indent=0,this&&(this.args=a)}indented(a){this.indent+=1,a(this),this.indent-=1}write(a){if(typeof a=="function"){a(this,{execution:"sync"}),a(this,{execution:"async"});return}const o=a.split(`
12
+ `).filter(c=>c),l=Math.min(...o.map(c=>c.length-c.trimStart().length)),f=o.map(c=>c.slice(l)).map(c=>" ".repeat(this.indent*2)+c);for(const c of f)this.content.push(c)}compile(){const a=Function,r=this?.args,l=[...(this?.content??[""]).map(f=>` ${f}`)];return new a(...r,l.join(`
13
+ `))}}const nD={major:4,minor:3,patch:6},nt=$("$ZodType",(e,a)=>{var r;e??(e={}),e._zod.def=a,e._zod.bag=e._zod.bag||{},e._zod.version=nD;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const l of o)for(const f of l._zod.onattach)f(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(c,h,m)=>{let p=hr(c),y;for(const v of h){if(v._zod.def.when){if(!v._zod.def.when(c))continue}else if(p)continue;const S=c.issues.length,x=v._zod.check(c);if(x instanceof Promise&&m?.async===!1)throw new vr;if(y||x instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await x,c.issues.length!==S&&(p||(p=hr(c,S)))});else{if(c.issues.length===S)continue;p||(p=hr(c,S))}}return y?y.then(()=>c):c},f=(c,h,m)=>{if(hr(c))return c.aborted=!0,c;const p=l(h,o,m);if(p instanceof Promise){if(m.async===!1)throw new vr;return p.then(y=>e._zod.parse(y,m))}return e._zod.parse(p,m)};e._zod.run=(c,h)=>{if(h.skipChecks)return e._zod.parse(c,h);if(h.direction==="backward"){const p=e._zod.parse({value:c.value,issues:[]},{...h,skipChecks:!0});return p instanceof Promise?p.then(y=>f(y,c,h)):f(p,c,h)}const m=e._zod.parse(c,h);if(m instanceof Promise){if(h.async===!1)throw new vr;return m.then(p=>l(p,o,h))}return l(m,o,h)}}Ne(e,"~standard",()=>({validate:l=>{try{const f=lO(e,l);return f.success?{value:f.data}:{issues:f.error?.issues}}catch{return uO(e,l).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Gh=$("$ZodString",(e,a)=>{nt.init(e,a),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??UO(e._zod.bag),e._zod.parse=(r,o)=>{if(a.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ke=$("$ZodStringFormat",(e,a)=>{cu.init(e,a),Gh.init(e,a)}),aD=$("$ZodGUID",(e,a)=>{a.pattern??(a.pattern=wO),Ke.init(e,a)}),iD=$("$ZodUUID",(e,a)=>{if(a.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[a.version];if(o===void 0)throw new Error(`Invalid UUID version: "${a.version}"`);a.pattern??(a.pattern=k0(o))}else a.pattern??(a.pattern=k0());Ke.init(e,a)}),rD=$("$ZodEmail",(e,a)=>{a.pattern??(a.pattern=AO),Ke.init(e,a)}),oD=$("$ZodURL",(e,a)=>{Ke.init(e,a),e._zod.check=r=>{try{const o=r.value.trim(),l=new URL(o);a.hostname&&(a.hostname.lastIndex=0,a.hostname.test(l.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:a.hostname.source,input:r.value,inst:e,continue:!a.abort})),a.protocol&&(a.protocol.lastIndex=0,a.protocol.test(l.protocol.endsWith(":")?l.protocol.slice(0,-1):l.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:a.protocol.source,input:r.value,inst:e,continue:!a.abort})),a.normalize?r.value=l.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!a.abort})}}}),sD=$("$ZodEmoji",(e,a)=>{a.pattern??(a.pattern=CO()),Ke.init(e,a)}),lD=$("$ZodNanoID",(e,a)=>{a.pattern??(a.pattern=_O),Ke.init(e,a)}),uD=$("$ZodCUID",(e,a)=>{a.pattern??(a.pattern=vO),Ke.init(e,a)}),cD=$("$ZodCUID2",(e,a)=>{a.pattern??(a.pattern=bO),Ke.init(e,a)}),fD=$("$ZodULID",(e,a)=>{a.pattern??(a.pattern=SO),Ke.init(e,a)}),dD=$("$ZodXID",(e,a)=>{a.pattern??(a.pattern=xO),Ke.init(e,a)}),hD=$("$ZodKSUID",(e,a)=>{a.pattern??(a.pattern=TO),Ke.init(e,a)}),mD=$("$ZodISODateTime",(e,a)=>{a.pattern??(a.pattern=LO(a)),Ke.init(e,a)}),pD=$("$ZodISODate",(e,a)=>{a.pattern??(a.pattern=kO),Ke.init(e,a)}),gD=$("$ZodISOTime",(e,a)=>{a.pattern??(a.pattern=VO(a)),Ke.init(e,a)}),yD=$("$ZodISODuration",(e,a)=>{a.pattern??(a.pattern=EO),Ke.init(e,a)}),vD=$("$ZodIPv4",(e,a)=>{a.pattern??(a.pattern=RO),Ke.init(e,a),e._zod.bag.format="ipv4"}),bD=$("$ZodIPv6",(e,a)=>{a.pattern??(a.pattern=MO),Ke.init(e,a),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!a.abort})}}}),SD=$("$ZodCIDRv4",(e,a)=>{a.pattern??(a.pattern=OO),Ke.init(e,a)}),xD=$("$ZodCIDRv6",(e,a)=>{a.pattern??(a.pattern=DO),Ke.init(e,a),e._zod.check=r=>{const o=r.value.split("/");try{if(o.length!==2)throw new Error;const[l,f]=o;if(!f)throw new Error;const c=Number(f);if(`${c}`!==f)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${l}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!a.abort})}}});function $S(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const TD=$("$ZodBase64",(e,a)=>{a.pattern??(a.pattern=NO),Ke.init(e,a),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{$S(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!a.abort})}});function _D(e){if(!kS.test(e))return!1;const a=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=a.padEnd(Math.ceil(a.length/4)*4,"=");return $S(r)}const ED=$("$ZodBase64URL",(e,a)=>{a.pattern??(a.pattern=kS),Ke.init(e,a),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{_D(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!a.abort})}}),wD=$("$ZodE164",(e,a)=>{a.pattern??(a.pattern=jO),Ke.init(e,a)});function AD(e,a=null){try{const r=e.split(".");if(r.length!==3)return!1;const[o]=r;if(!o)return!1;const l=JSON.parse(atob(o));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||a&&(!("alg"in l)||l.alg!==a))}catch{return!1}}const zD=$("$ZodJWT",(e,a)=>{Ke.init(e,a),e._zod.check=r=>{AD(r.value,a.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!a.abort})}}),GS=$("$ZodNumber",(e,a)=>{nt.init(e,a),e._zod.pattern=e._zod.bag.pattern??US,e._zod.parse=(r,o)=>{if(a.coerce)try{r.value=Number(r.value)}catch{}const l=r.value;if(typeof l=="number"&&!Number.isNaN(l)&&Number.isFinite(l))return r;const f=typeof l=="number"?Number.isNaN(l)?"NaN":Number.isFinite(l)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:l,inst:e,...f?{received:f}:{}}),r}}),CD=$("$ZodNumberFormat",(e,a)=>{qO.init(e,a),GS.init(e,a)}),RD=$("$ZodBoolean",(e,a)=>{nt.init(e,a),e._zod.pattern=ZO,e._zod.parse=(r,o)=>{if(a.coerce)try{r.value=!!r.value}catch{}const l=r.value;return typeof l=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),r}}),MD=$("$ZodUnknown",(e,a)=>{nt.init(e,a),e._zod.parse=r=>r}),OD=$("$ZodNever",(e,a)=>{nt.init(e,a),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function V0(e,a,r){e.issues.length&&a.issues.push(...mr(r,e.issues)),a.value[r]=e.value}const DD=$("$ZodArray",(e,a)=>{nt.init(e,a),e._zod.parse=(r,o)=>{const l=r.value;if(!Array.isArray(l))return r.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),r;r.value=Array(l.length);const f=[];for(let c=0;c<l.length;c++){const h=l[c],m=a.element._zod.run({value:h,issues:[]},o);m instanceof Promise?f.push(m.then(p=>V0(p,r,c))):V0(m,r,c)}return f.length?Promise.all(f).then(()=>r):r}});function Il(e,a,r,o,l){if(e.issues.length){if(l&&!(r in o))return;a.issues.push(...mr(r,e.issues))}e.value===void 0?r in o&&(a.value[r]=void 0):a.value[r]=e.value}function qS(e){const a=Object.keys(e.shape);for(const o of a)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const r=JM(e.shape);return{...e,keys:a,keySet:new Set(a),numKeys:a.length,optionalKeys:new Set(r)}}function YS(e,a,r,o,l,f){const c=[],h=l.keySet,m=l.catchall._zod,p=m.def.type,y=m.optout==="optional";for(const v in a){if(h.has(v))continue;if(p==="never"){c.push(v);continue}const S=m.run({value:a[v],issues:[]},o);S instanceof Promise?e.push(S.then(x=>Il(x,r,v,a,y))):Il(S,r,v,a,y)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:a,inst:f}),e.length?Promise.all(e).then(()=>r):r}const ND=$("$ZodObject",(e,a)=>{if(nt.init(e,a),!Object.getOwnPropertyDescriptor(a,"shape")?.get){const h=a.shape;Object.defineProperty(a,"shape",{get:()=>{const m={...h};return Object.defineProperty(a,"shape",{value:m}),m}})}const o=Lh(()=>qS(a));Ne(e._zod,"propValues",()=>{const h=a.shape,m={};for(const p in h){const y=h[p]._zod;if(y.values){m[p]??(m[p]=new Set);for(const v of y.values)m[p].add(v)}}return m});const l=Jl,f=a.catchall;let c;e._zod.parse=(h,m)=>{c??(c=o.value);const p=h.value;if(!l(p))return h.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),h;h.value={};const y=[],v=c.shape;for(const S of c.keys){const x=v[S],M=x._zod.optout==="optional",T=x._zod.run({value:p[S],issues:[]},m);T instanceof Promise?y.push(T.then(O=>Il(O,h,S,p,M))):Il(T,h,S,p,M)}return f?YS(y,p,h,m,o.value,e):y.length?Promise.all(y).then(()=>h):h}}),jD=$("$ZodObjectJIT",(e,a)=>{ND.init(e,a);const r=e._zod.parse,o=Lh(()=>qS(a)),l=S=>{const x=new tD(["shape","payload","ctx"]),M=o.value,T=k=>{const Q=j0(k);return`shape[${Q}]._zod.run({ value: input[${Q}], issues: [] }, ctx)`};x.write("const input = payload.value;");const O=Object.create(null);let L=0;for(const k of M.keys)O[k]=`key_${L++}`;x.write("const newResult = {};");for(const k of M.keys){const Q=O[k],q=j0(k),F=S[k]?._zod?.optout==="optional";x.write(`const ${Q} = ${T(k)};`),F?x.write(`
14
+ if (${Q}.issues.length) {
15
+ if (${q} in input) {
16
+ payload.issues = payload.issues.concat(${Q}.issues.map(iss => ({
17
+ ...iss,
18
+ path: iss.path ? [${q}, ...iss.path] : [${q}]
19
+ })));
20
+ }
21
+ }
22
+
23
+ if (${Q}.value === undefined) {
24
+ if (${q} in input) {
25
+ newResult[${q}] = undefined;
26
+ }
27
+ } else {
28
+ newResult[${q}] = ${Q}.value;
29
+ }
30
+
31
+ `):x.write(`
32
+ if (${Q}.issues.length) {
33
+ payload.issues = payload.issues.concat(${Q}.issues.map(iss => ({
34
+ ...iss,
35
+ path: iss.path ? [${q}, ...iss.path] : [${q}]
36
+ })));
37
+ }
38
+
39
+ if (${Q}.value === undefined) {
40
+ if (${q} in input) {
41
+ newResult[${q}] = undefined;
42
+ }
43
+ } else {
44
+ newResult[${q}] = ${Q}.value;
45
+ }
46
+
47
+ `)}x.write("payload.value = newResult;"),x.write("return payload;");const C=x.compile();return(k,Q)=>C(S,k,Q)};let f;const c=Jl,h=!CS.jitless,p=h&&QM.value,y=a.catchall;let v;e._zod.parse=(S,x)=>{v??(v=o.value);const M=S.value;return c(M)?h&&p&&x?.async===!1&&x.jitless!==!0?(f||(f=l(a.shape)),S=f(S,x),y?YS([],M,S,x,v,e):S):r(S,x):(S.issues.push({expected:"object",code:"invalid_type",input:M,inst:e}),S)}});function L0(e,a,r,o){for(const f of e)if(f.issues.length===0)return a.value=f.value,a;const l=e.filter(f=>!hr(f));return l.length===1?(a.value=l[0].value,l[0]):(a.issues.push({code:"invalid_union",input:a.value,inst:r,errors:e.map(f=>f.issues.map(c=>qa(c,o,Ga())))}),a)}const kD=$("$ZodUnion",(e,a)=>{nt.init(e,a),Ne(e._zod,"optin",()=>a.options.some(l=>l._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>a.options.some(l=>l._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(a.options.every(l=>l._zod.values))return new Set(a.options.flatMap(l=>Array.from(l._zod.values)))}),Ne(e._zod,"pattern",()=>{if(a.options.every(l=>l._zod.pattern)){const l=a.options.map(f=>f._zod.pattern);return new RegExp(`^(${l.map(f=>Bh(f.source)).join("|")})$`)}});const r=a.options.length===1,o=a.options[0]._zod.run;e._zod.parse=(l,f)=>{if(r)return o(l,f);let c=!1;const h=[];for(const m of a.options){const p=m._zod.run({value:l.value,issues:[]},f);if(p instanceof Promise)h.push(p),c=!0;else{if(p.issues.length===0)return p;h.push(p)}}return c?Promise.all(h).then(m=>L0(m,l,e,f)):L0(h,l,e,f)}}),VD=$("$ZodIntersection",(e,a)=>{nt.init(e,a),e._zod.parse=(r,o)=>{const l=r.value,f=a.left._zod.run({value:l,issues:[]},o),c=a.right._zod.run({value:l,issues:[]},o);return f instanceof Promise||c instanceof Promise?Promise.all([f,c]).then(([m,p])=>U0(r,m,p)):U0(r,f,c)}});function qd(e,a){if(e===a)return{valid:!0,data:e};if(e instanceof Date&&a instanceof Date&&+e==+a)return{valid:!0,data:e};if(Sr(e)&&Sr(a)){const r=Object.keys(a),o=Object.keys(e).filter(f=>r.indexOf(f)!==-1),l={...e,...a};for(const f of o){const c=qd(e[f],a[f]);if(!c.valid)return{valid:!1,mergeErrorPath:[f,...c.mergeErrorPath]};l[f]=c.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(a)){if(e.length!==a.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<e.length;o++){const l=e[o],f=a[o],c=qd(l,f);if(!c.valid)return{valid:!1,mergeErrorPath:[o,...c.mergeErrorPath]};r.push(c.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function U0(e,a,r){const o=new Map;let l;for(const h of a.issues)if(h.code==="unrecognized_keys"){l??(l=h);for(const m of h.keys)o.has(m)||o.set(m,{}),o.get(m).l=!0}else e.issues.push(h);for(const h of r.issues)if(h.code==="unrecognized_keys")for(const m of h.keys)o.has(m)||o.set(m,{}),o.get(m).r=!0;else e.issues.push(h);const f=[...o].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(f.length&&l&&e.issues.push({...l,keys:f}),hr(e))return e;const c=qd(a.value,r.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const LD=$("$ZodRecord",(e,a)=>{nt.init(e,a),e._zod.parse=(r,o)=>{const l=r.value;if(!Sr(l))return r.issues.push({expected:"record",code:"invalid_type",input:l,inst:e}),r;const f=[],c=a.keyType._zod.values;if(c){r.value={};const h=new Set;for(const p of c)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){h.add(typeof p=="number"?p.toString():p);const y=a.valueType._zod.run({value:l[p],issues:[]},o);y instanceof Promise?f.push(y.then(v=>{v.issues.length&&r.issues.push(...mr(p,v.issues)),r.value[p]=v.value})):(y.issues.length&&r.issues.push(...mr(p,y.issues)),r.value[p]=y.value)}let m;for(const p in l)h.has(p)||(m=m??[],m.push(p));m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:m})}else{r.value={};for(const h of Reflect.ownKeys(l)){if(h==="__proto__")continue;let m=a.keyType._zod.run({value:h,issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof h=="string"&&US.test(h)&&m.issues.length){const v=a.keyType._zod.run({value:Number(h),issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(m=v)}if(m.issues.length){a.mode==="loose"?r.value[h]=l[h]:r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(v=>qa(v,o,Ga())),input:h,path:[h],inst:e});continue}const y=a.valueType._zod.run({value:l[h],issues:[]},o);y instanceof Promise?f.push(y.then(v=>{v.issues.length&&r.issues.push(...mr(h,v.issues)),r.value[m.value]=v.value})):(y.issues.length&&r.issues.push(...mr(h,y.issues)),r.value[m.value]=y.value)}}return f.length?Promise.all(f).then(()=>r):r}}),UD=$("$ZodEnum",(e,a)=>{nt.init(e,a);const r=RS(a.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(l=>FM.has(typeof l)).map(l=>typeof l=="string"?su(l):l.toString()).join("|")})$`),e._zod.parse=(l,f)=>{const c=l.value;return o.has(c)||l.issues.push({code:"invalid_value",values:r,input:c,inst:e}),l}}),BD=$("$ZodTransform",(e,a)=>{nt.init(e,a),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zS(e.constructor.name);const l=a.transform(r.value,r);if(o.async)return(l instanceof Promise?l:Promise.resolve(l)).then(c=>(r.value=c,r));if(l instanceof Promise)throw new vr;return r.value=l,r}});function B0(e,a){return e.issues.length&&a===void 0?{issues:[],value:void 0}:e}const PS=$("$ZodOptional",(e,a)=>{nt.init(e,a),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>a.innerType._zod.values?new Set([...a.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{const r=a.innerType._zod.pattern;return r?new RegExp(`^(${Bh(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(a.innerType._zod.optin==="optional"){const l=a.innerType._zod.run(r,o);return l instanceof Promise?l.then(f=>B0(f,r.value)):B0(l,r.value)}return r.value===void 0?r:a.innerType._zod.run(r,o)}}),ZD=$("$ZodExactOptional",(e,a)=>{PS.init(e,a),Ne(e._zod,"values",()=>a.innerType._zod.values),Ne(e._zod,"pattern",()=>a.innerType._zod.pattern),e._zod.parse=(r,o)=>a.innerType._zod.run(r,o)}),HD=$("$ZodNullable",(e,a)=>{nt.init(e,a),Ne(e._zod,"optin",()=>a.innerType._zod.optin),Ne(e._zod,"optout",()=>a.innerType._zod.optout),Ne(e._zod,"pattern",()=>{const r=a.innerType._zod.pattern;return r?new RegExp(`^(${Bh(r.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>a.innerType._zod.values?new Set([...a.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:a.innerType._zod.run(r,o)}),$D=$("$ZodDefault",(e,a)=>{nt.init(e,a),e._zod.optin="optional",Ne(e._zod,"values",()=>a.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return a.innerType._zod.run(r,o);if(r.value===void 0)return r.value=a.defaultValue,r;const l=a.innerType._zod.run(r,o);return l instanceof Promise?l.then(f=>Z0(f,a)):Z0(l,a)}});function Z0(e,a){return e.value===void 0&&(e.value=a.defaultValue),e}const GD=$("$ZodPrefault",(e,a)=>{nt.init(e,a),e._zod.optin="optional",Ne(e._zod,"values",()=>a.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=a.defaultValue),a.innerType._zod.run(r,o))}),qD=$("$ZodNonOptional",(e,a)=>{nt.init(e,a),Ne(e._zod,"values",()=>{const r=a.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{const l=a.innerType._zod.run(r,o);return l instanceof Promise?l.then(f=>H0(f,e)):H0(l,e)}});function H0(e,a){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:a}),e}const YD=$("$ZodCatch",(e,a)=>{nt.init(e,a),Ne(e._zod,"optin",()=>a.innerType._zod.optin),Ne(e._zod,"optout",()=>a.innerType._zod.optout),Ne(e._zod,"values",()=>a.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return a.innerType._zod.run(r,o);const l=a.innerType._zod.run(r,o);return l instanceof Promise?l.then(f=>(r.value=f.value,f.issues.length&&(r.value=a.catchValue({...r,error:{issues:f.issues.map(c=>qa(c,o,Ga()))},input:r.value}),r.issues=[]),r)):(r.value=l.value,l.issues.length&&(r.value=a.catchValue({...r,error:{issues:l.issues.map(f=>qa(f,o,Ga()))},input:r.value}),r.issues=[]),r)}}),PD=$("$ZodPipe",(e,a)=>{nt.init(e,a),Ne(e._zod,"values",()=>a.in._zod.values),Ne(e._zod,"optin",()=>a.in._zod.optin),Ne(e._zod,"optout",()=>a.out._zod.optout),Ne(e._zod,"propValues",()=>a.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){const f=a.out._zod.run(r,o);return f instanceof Promise?f.then(c=>Nl(c,a.in,o)):Nl(f,a.in,o)}const l=a.in._zod.run(r,o);return l instanceof Promise?l.then(f=>Nl(f,a.out,o)):Nl(l,a.out,o)}});function Nl(e,a,r){return e.issues.length?(e.aborted=!0,e):a._zod.run({value:e.value,issues:e.issues},r)}const XD=$("$ZodReadonly",(e,a)=>{nt.init(e,a),Ne(e._zod,"propValues",()=>a.innerType._zod.propValues),Ne(e._zod,"values",()=>a.innerType._zod.values),Ne(e._zod,"optin",()=>a.innerType?._zod?.optin),Ne(e._zod,"optout",()=>a.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return a.innerType._zod.run(r,o);const l=a.innerType._zod.run(r,o);return l instanceof Promise?l.then($0):$0(l)}});function $0(e){return e.value=Object.freeze(e.value),e}const KD=$("$ZodCustom",(e,a)=>{Yt.init(e,a),nt.init(e,a),e._zod.parse=(r,o)=>r,e._zod.check=r=>{const o=r.value,l=a.fn(o);if(l instanceof Promise)return l.then(f=>G0(f,r,o,e));G0(l,r,o,e)}});function G0(e,a,r,o){if(!e){const l={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(l.params=o._zod.def.params),a.issues.push(Qo(l))}}var q0;let QD=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(a,...r){const o=r[0];return this._map.set(a,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,a),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(a){const r=this._map.get(a);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(a),this}get(a){const r=a._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const l={...o,...this._map.get(a)};return Object.keys(l).length?l:void 0}return this._map.get(a)}has(a){return this._map.has(a)}};function FD(){return new QD}(q0=globalThis).__zod_globalRegistry??(q0.__zod_globalRegistry=FD());const jo=globalThis.__zod_globalRegistry;function JD(e,a){return new e({type:"string",...se(a)})}function ID(e,a){return new e({type:"string",format:"email",check:"string_format",abort:!1,...se(a)})}function Y0(e,a){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...se(a)})}function WD(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...se(a)})}function e3(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...se(a)})}function t3(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...se(a)})}function n3(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...se(a)})}function a3(e,a){return new e({type:"string",format:"url",check:"string_format",abort:!1,...se(a)})}function i3(e,a){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...se(a)})}function r3(e,a){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...se(a)})}function o3(e,a){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...se(a)})}function s3(e,a){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...se(a)})}function l3(e,a){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...se(a)})}function u3(e,a){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...se(a)})}function c3(e,a){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...se(a)})}function f3(e,a){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...se(a)})}function d3(e,a){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...se(a)})}function h3(e,a){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...se(a)})}function m3(e,a){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...se(a)})}function p3(e,a){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...se(a)})}function g3(e,a){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...se(a)})}function y3(e,a){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...se(a)})}function v3(e,a){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...se(a)})}function b3(e,a){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...se(a)})}function S3(e,a){return new e({type:"string",format:"date",check:"string_format",...se(a)})}function x3(e,a){return new e({type:"string",format:"time",check:"string_format",precision:null,...se(a)})}function T3(e,a){return new e({type:"string",format:"duration",check:"string_format",...se(a)})}function _3(e,a){return new e({type:"number",checks:[],...se(a)})}function E3(e,a){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...se(a)})}function w3(e,a){return new e({type:"boolean",...se(a)})}function A3(e){return new e({type:"unknown"})}function z3(e,a){return new e({type:"never",...se(a)})}function P0(e,a){return new ZS({check:"less_than",...se(a),value:e,inclusive:!1})}function ld(e,a){return new ZS({check:"less_than",...se(a),value:e,inclusive:!0})}function X0(e,a){return new HS({check:"greater_than",...se(a),value:e,inclusive:!1})}function ud(e,a){return new HS({check:"greater_than",...se(a),value:e,inclusive:!0})}function K0(e,a){return new GO({check:"multiple_of",...se(a),value:e})}function XS(e,a){return new YO({check:"max_length",...se(a),maximum:e})}function Wl(e,a){return new PO({check:"min_length",...se(a),minimum:e})}function KS(e,a){return new XO({check:"length_equals",...se(a),length:e})}function C3(e,a){return new KO({check:"string_format",format:"regex",...se(a),pattern:e})}function R3(e){return new QO({check:"string_format",format:"lowercase",...se(e)})}function M3(e){return new FO({check:"string_format",format:"uppercase",...se(e)})}function O3(e,a){return new JO({check:"string_format",format:"includes",...se(a),includes:e})}function D3(e,a){return new IO({check:"string_format",format:"starts_with",...se(a),prefix:e})}function N3(e,a){return new WO({check:"string_format",format:"ends_with",...se(a),suffix:e})}function Rr(e){return new eD({check:"overwrite",tx:e})}function j3(e){return Rr(a=>a.normalize(e))}function k3(){return Rr(e=>e.trim())}function V3(){return Rr(e=>e.toLowerCase())}function L3(){return Rr(e=>e.toUpperCase())}function U3(){return Rr(e=>KM(e))}function B3(e,a,r){return new e({type:"array",element:a,...se(r)})}function Z3(e,a,r){return new e({type:"custom",check:"custom",fn:a,...se(r)})}function H3(e){const a=$3(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Qo(o,r.value,a._zod.def));else{const l=o;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=r.value),l.inst??(l.inst=a),l.continue??(l.continue=!a._zod.def.abort),r.issues.push(Qo(l))}},e(r.value,r)));return a}function $3(e,a){const r=new Yt({check:"custom",...se(a)});return r._zod.check=e,r}function QS(e){let a=e?.target??"draft-2020-12";return a==="draft-4"&&(a="draft-04"),a==="draft-7"&&(a="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??jo,target:a,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 ht(e,a,r={path:[],schemaPath:[]}){var o;const l=e._zod.def,f=a.seen.get(e);if(f)return f.count++,r.schemaPath.includes(e)&&(f.cycle=r.path),f.schema;const c={schema:{},count:1,cycle:void 0,path:r.path};a.seen.set(e,c);const h=e._zod.toJSONSchema?.();if(h)c.schema=h;else{const y={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(a,c.schema,y);else{const S=c.schema,x=a.processors[l.type];if(!x)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);x(e,a,S,y)}const v=e._zod.parent;v&&(c.ref||(c.ref=v),ht(v,a,y),a.seen.get(v).isParent=!0)}const m=a.metadataRegistry.get(e);return m&&Object.assign(c.schema,m),a.io==="input"&&jt(e)&&(delete c.schema.examples,delete c.schema.default),a.io==="input"&&c.schema._prefault&&((o=c.schema).default??(o.default=c.schema._prefault)),delete c.schema._prefault,a.seen.get(e).schema}function FS(e,a){const r=e.seen.get(a);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const c of e.seen.entries()){const h=e.metadataRegistry.get(c[0])?.id;if(h){const m=o.get(h);if(m&&m!==c[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(h,c[0])}}const l=c=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=e.external.registry.get(c[0])?.id,S=e.external.uri??(M=>M);if(v)return{ref:S(v)};const x=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=x,{defId:x,ref:`${S("__shared")}#/${h}/${x}`}}if(c[1]===r)return{ref:"#"};const p=`#/${h}/`,y=c[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:p+y}},f=c=>{if(c[1].schema.$ref)return;const h=c[1],{ref:m,defId:p}=l(c);h.def={...h.schema},p&&(h.defId=p);const y=h.schema;for(const v in y)delete y[v];y.$ref=m};if(e.cycles==="throw")for(const c of e.seen.entries()){const h=c[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
48
+
49
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const h=c[1];if(a===c[0]){f(c);continue}if(e.external){const p=e.external.registry.get(c[0])?.id;if(a!==c[0]&&p){f(c);continue}}if(e.metadataRegistry.get(c[0])?.id){f(c);continue}if(h.cycle){f(c);continue}if(h.count>1&&e.reused==="ref"){f(c);continue}}}function JS(e,a){const r=e.seen.get(a);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=c=>{const h=e.seen.get(c);if(h.ref===null)return;const m=h.def??h.schema,p={...m},y=h.ref;if(h.ref=null,y){o(y);const S=e.seen.get(y),x=S.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(x)):Object.assign(m,x),Object.assign(m,p),c._zod.parent===y)for(const T in m)T==="$ref"||T==="allOf"||T in p||delete m[T];if(x.$ref&&S.def)for(const T in m)T==="$ref"||T==="allOf"||T in S.def&&JSON.stringify(m[T])===JSON.stringify(S.def[T])&&delete m[T]}const v=c._zod.parent;if(v&&v!==y){o(v);const S=e.seen.get(v);if(S?.schema.$ref&&(m.$ref=S.schema.$ref,S.def))for(const x in m)x==="$ref"||x==="allOf"||x in S.def&&JSON.stringify(m[x])===JSON.stringify(S.def[x])&&delete m[x]}e.override({zodSchema:c,jsonSchema:m,path:h.path??[]})};for(const c of[...e.seen.entries()].reverse())o(c[0]);const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(a)?.id;if(!c)throw new Error("Schema is missing an `id` property");l.$id=e.external.uri(c)}Object.assign(l,r.def??r.schema);const f=e.external?.defs??{};for(const c of e.seen.entries()){const h=c[1];h.def&&h.defId&&(f[h.defId]=h.def)}e.external||Object.keys(f).length>0&&(e.target==="draft-2020-12"?l.$defs=f:l.definitions=f);try{const c=JSON.parse(JSON.stringify(l));return Object.defineProperty(c,"~standard",{value:{...a["~standard"],jsonSchema:{input:eu(a,"input",e.processors),output:eu(a,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function jt(e,a){const r=a??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return jt(o.element,r);if(o.type==="set")return jt(o.valueType,r);if(o.type==="lazy")return jt(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return jt(o.innerType,r);if(o.type==="intersection")return jt(o.left,r)||jt(o.right,r);if(o.type==="record"||o.type==="map")return jt(o.keyType,r)||jt(o.valueType,r);if(o.type==="pipe")return jt(o.in,r)||jt(o.out,r);if(o.type==="object"){for(const l in o.shape)if(jt(o.shape[l],r))return!0;return!1}if(o.type==="union"){for(const l of o.options)if(jt(l,r))return!0;return!1}if(o.type==="tuple"){for(const l of o.items)if(jt(l,r))return!0;return!!(o.rest&&jt(o.rest,r))}return!1}const G3=(e,a={})=>r=>{const o=QS({...r,processors:a});return ht(e,o),FS(o,e),JS(o,e)},eu=(e,a,r={})=>o=>{const{libraryOptions:l,target:f}=o??{},c=QS({...l??{},target:f,io:a,processors:r});return ht(e,c),FS(c,e),JS(c,e)},q3={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Y3=(e,a,r,o)=>{const l=r;l.type="string";const{minimum:f,maximum:c,format:h,patterns:m,contentEncoding:p}=e._zod.bag;if(typeof f=="number"&&(l.minLength=f),typeof c=="number"&&(l.maxLength=c),h&&(l.format=q3[h]??h,l.format===""&&delete l.format,h==="time"&&delete l.format),p&&(l.contentEncoding=p),m&&m.size>0){const y=[...m];y.length===1?l.pattern=y[0].source:y.length>1&&(l.allOf=[...y.map(v=>({...a.target==="draft-07"||a.target==="draft-04"||a.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},P3=(e,a,r,o)=>{const l=r,{minimum:f,maximum:c,format:h,multipleOf:m,exclusiveMaximum:p,exclusiveMinimum:y}=e._zod.bag;typeof h=="string"&&h.includes("int")?l.type="integer":l.type="number",typeof y=="number"&&(a.target==="draft-04"||a.target==="openapi-3.0"?(l.minimum=y,l.exclusiveMinimum=!0):l.exclusiveMinimum=y),typeof f=="number"&&(l.minimum=f,typeof y=="number"&&a.target!=="draft-04"&&(y>=f?delete l.minimum:delete l.exclusiveMinimum)),typeof p=="number"&&(a.target==="draft-04"||a.target==="openapi-3.0"?(l.maximum=p,l.exclusiveMaximum=!0):l.exclusiveMaximum=p),typeof c=="number"&&(l.maximum=c,typeof p=="number"&&a.target!=="draft-04"&&(p<=c?delete l.maximum:delete l.exclusiveMaximum)),typeof m=="number"&&(l.multipleOf=m)},X3=(e,a,r,o)=>{r.type="boolean"},K3=(e,a,r,o)=>{r.not={}},Q3=(e,a,r,o)=>{},F3=(e,a,r,o)=>{const l=e._zod.def,f=RS(l.entries);f.every(c=>typeof c=="number")&&(r.type="number"),f.every(c=>typeof c=="string")&&(r.type="string"),r.enum=f},J3=(e,a,r,o)=>{if(a.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},I3=(e,a,r,o)=>{if(a.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},W3=(e,a,r,o)=>{const l=r,f=e._zod.def,{minimum:c,maximum:h}=e._zod.bag;typeof c=="number"&&(l.minItems=c),typeof h=="number"&&(l.maxItems=h),l.type="array",l.items=ht(f.element,a,{...o,path:[...o.path,"items"]})},e4=(e,a,r,o)=>{const l=r,f=e._zod.def;l.type="object",l.properties={};const c=f.shape;for(const p in c)l.properties[p]=ht(c[p],a,{...o,path:[...o.path,"properties",p]});const h=new Set(Object.keys(c)),m=new Set([...h].filter(p=>{const y=f.shape[p]._zod;return a.io==="input"?y.optin===void 0:y.optout===void 0}));m.size>0&&(l.required=Array.from(m)),f.catchall?._zod.def.type==="never"?l.additionalProperties=!1:f.catchall?f.catchall&&(l.additionalProperties=ht(f.catchall,a,{...o,path:[...o.path,"additionalProperties"]})):a.io==="output"&&(l.additionalProperties=!1)},t4=(e,a,r,o)=>{const l=e._zod.def,f=l.inclusive===!1,c=l.options.map((h,m)=>ht(h,a,{...o,path:[...o.path,f?"oneOf":"anyOf",m]}));f?r.oneOf=c:r.anyOf=c},n4=(e,a,r,o)=>{const l=e._zod.def,f=ht(l.left,a,{...o,path:[...o.path,"allOf",0]}),c=ht(l.right,a,{...o,path:[...o.path,"allOf",1]}),h=p=>"allOf"in p&&Object.keys(p).length===1,m=[...h(f)?f.allOf:[f],...h(c)?c.allOf:[c]];r.allOf=m},a4=(e,a,r,o)=>{const l=r,f=e._zod.def;l.type="object";const c=f.keyType,m=c._zod.bag?.patterns;if(f.mode==="loose"&&m&&m.size>0){const y=ht(f.valueType,a,{...o,path:[...o.path,"patternProperties","*"]});l.patternProperties={};for(const v of m)l.patternProperties[v.source]=y}else(a.target==="draft-07"||a.target==="draft-2020-12")&&(l.propertyNames=ht(f.keyType,a,{...o,path:[...o.path,"propertyNames"]})),l.additionalProperties=ht(f.valueType,a,{...o,path:[...o.path,"additionalProperties"]});const p=c._zod.values;if(p){const y=[...p].filter(v=>typeof v=="string"||typeof v=="number");y.length>0&&(l.required=y)}},i4=(e,a,r,o)=>{const l=e._zod.def,f=ht(l.innerType,a,o),c=a.seen.get(e);a.target==="openapi-3.0"?(c.ref=l.innerType,r.nullable=!0):r.anyOf=[f,{type:"null"}]},r4=(e,a,r,o)=>{const l=e._zod.def;ht(l.innerType,a,o);const f=a.seen.get(e);f.ref=l.innerType},o4=(e,a,r,o)=>{const l=e._zod.def;ht(l.innerType,a,o);const f=a.seen.get(e);f.ref=l.innerType,r.default=JSON.parse(JSON.stringify(l.defaultValue))},s4=(e,a,r,o)=>{const l=e._zod.def;ht(l.innerType,a,o);const f=a.seen.get(e);f.ref=l.innerType,a.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(l.defaultValue)))},l4=(e,a,r,o)=>{const l=e._zod.def;ht(l.innerType,a,o);const f=a.seen.get(e);f.ref=l.innerType;let c;try{c=l.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=c},u4=(e,a,r,o)=>{const l=e._zod.def,f=a.io==="input"?l.in._zod.def.type==="transform"?l.out:l.in:l.out;ht(f,a,o);const c=a.seen.get(e);c.ref=f},c4=(e,a,r,o)=>{const l=e._zod.def;ht(l.innerType,a,o);const f=a.seen.get(e);f.ref=l.innerType,r.readOnly=!0},IS=(e,a,r,o)=>{const l=e._zod.def;ht(l.innerType,a,o);const f=a.seen.get(e);f.ref=l.innerType},f4=$("ZodISODateTime",(e,a)=>{mD.init(e,a),Ie.init(e,a)});function d4(e){return b3(f4,e)}const h4=$("ZodISODate",(e,a)=>{pD.init(e,a),Ie.init(e,a)});function m4(e){return S3(h4,e)}const p4=$("ZodISOTime",(e,a)=>{gD.init(e,a),Ie.init(e,a)});function g4(e){return x3(p4,e)}const y4=$("ZodISODuration",(e,a)=>{yD.init(e,a),Ie.init(e,a)});function v4(e){return T3(y4,e)}const b4=(e,a)=>{NS.init(e,a),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>sO(e,r)},flatten:{value:r=>oO(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Gd,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Gd,2)}},isEmpty:{get(){return e.issues.length===0}}})},yn=$("ZodError",b4,{Parent:Error}),S4=Hh(yn),x4=$h(yn),T4=lu(yn),_4=uu(yn),E4=cO(yn),w4=fO(yn),A4=dO(yn),z4=hO(yn),C4=mO(yn),R4=pO(yn),M4=gO(yn),O4=yO(yn),at=$("ZodType",(e,a)=>(nt.init(e,a),Object.assign(e["~standard"],{jsonSchema:{input:eu(e,"input"),output:eu(e,"output")}}),e.toJSONSchema=G3(e,{}),e.def=a,e.type=a.type,Object.defineProperty(e,"_def",{value:a}),e.check=(...r)=>e.clone(Pa(a,{checks:[...a.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(r,o)=>Xa(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>S4(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>T4(e,r,o),e.parseAsync=async(r,o)=>x4(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>_4(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>E4(e,r,o),e.decode=(r,o)=>w4(e,r,o),e.encodeAsync=async(r,o)=>A4(e,r,o),e.decodeAsync=async(r,o)=>z4(e,r,o),e.safeEncode=(r,o)=>C4(e,r,o),e.safeDecode=(r,o)=>R4(e,r,o),e.safeEncodeAsync=async(r,o)=>M4(e,r,o),e.safeDecodeAsync=async(r,o)=>O4(e,r,o),e.refine=(r,o)=>e.check(_N(r,o)),e.superRefine=r=>e.check(EN(r)),e.overwrite=r=>e.check(Rr(r)),e.optional=()=>I0(e),e.exactOptional=()=>cN(e),e.nullable=()=>W0(e),e.nullish=()=>I0(W0(e)),e.nonoptional=r=>gN(e,r),e.array=()=>fu(e),e.or=r=>tx([e,r]),e.and=r=>rN(e,r),e.transform=r=>eb(e,lN(r)),e.default=r=>hN(e,r),e.prefault=r=>pN(e,r),e.catch=r=>vN(e,r),e.pipe=r=>eb(e,r),e.readonly=()=>xN(e),e.describe=r=>{const o=e.clone();return jo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return jo.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return jo.get(e);const o=e.clone();return jo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),WS=$("_ZodString",(e,a)=>{Gh.init(e,a),at.init(e,a),e._zod.processJSONSchema=(o,l,f)=>Y3(e,o,l);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(C3(...o)),e.includes=(...o)=>e.check(O3(...o)),e.startsWith=(...o)=>e.check(D3(...o)),e.endsWith=(...o)=>e.check(N3(...o)),e.min=(...o)=>e.check(Wl(...o)),e.max=(...o)=>e.check(XS(...o)),e.length=(...o)=>e.check(KS(...o)),e.nonempty=(...o)=>e.check(Wl(1,...o)),e.lowercase=o=>e.check(R3(o)),e.uppercase=o=>e.check(M3(o)),e.trim=()=>e.check(k3()),e.normalize=(...o)=>e.check(j3(...o)),e.toLowerCase=()=>e.check(V3()),e.toUpperCase=()=>e.check(L3()),e.slugify=()=>e.check(U3())}),D4=$("ZodString",(e,a)=>{Gh.init(e,a),WS.init(e,a),e.email=r=>e.check(ID(N4,r)),e.url=r=>e.check(a3(j4,r)),e.jwt=r=>e.check(v3(Q4,r)),e.emoji=r=>e.check(i3(k4,r)),e.guid=r=>e.check(Y0(Q0,r)),e.uuid=r=>e.check(WD(jl,r)),e.uuidv4=r=>e.check(e3(jl,r)),e.uuidv6=r=>e.check(t3(jl,r)),e.uuidv7=r=>e.check(n3(jl,r)),e.nanoid=r=>e.check(r3(V4,r)),e.guid=r=>e.check(Y0(Q0,r)),e.cuid=r=>e.check(o3(L4,r)),e.cuid2=r=>e.check(s3(U4,r)),e.ulid=r=>e.check(l3(B4,r)),e.base64=r=>e.check(p3(P4,r)),e.base64url=r=>e.check(g3(X4,r)),e.xid=r=>e.check(u3(Z4,r)),e.ksuid=r=>e.check(c3(H4,r)),e.ipv4=r=>e.check(f3($4,r)),e.ipv6=r=>e.check(d3(G4,r)),e.cidrv4=r=>e.check(h3(q4,r)),e.cidrv6=r=>e.check(m3(Y4,r)),e.e164=r=>e.check(y3(K4,r)),e.datetime=r=>e.check(d4(r)),e.date=r=>e.check(m4(r)),e.time=r=>e.check(g4(r)),e.duration=r=>e.check(v4(r))});function Ct(e){return JD(D4,e)}const Ie=$("ZodStringFormat",(e,a)=>{Ke.init(e,a),WS.init(e,a)}),N4=$("ZodEmail",(e,a)=>{rD.init(e,a),Ie.init(e,a)}),Q0=$("ZodGUID",(e,a)=>{aD.init(e,a),Ie.init(e,a)}),jl=$("ZodUUID",(e,a)=>{iD.init(e,a),Ie.init(e,a)}),j4=$("ZodURL",(e,a)=>{oD.init(e,a),Ie.init(e,a)}),k4=$("ZodEmoji",(e,a)=>{sD.init(e,a),Ie.init(e,a)}),V4=$("ZodNanoID",(e,a)=>{lD.init(e,a),Ie.init(e,a)}),L4=$("ZodCUID",(e,a)=>{uD.init(e,a),Ie.init(e,a)}),U4=$("ZodCUID2",(e,a)=>{cD.init(e,a),Ie.init(e,a)}),B4=$("ZodULID",(e,a)=>{fD.init(e,a),Ie.init(e,a)}),Z4=$("ZodXID",(e,a)=>{dD.init(e,a),Ie.init(e,a)}),H4=$("ZodKSUID",(e,a)=>{hD.init(e,a),Ie.init(e,a)}),$4=$("ZodIPv4",(e,a)=>{vD.init(e,a),Ie.init(e,a)}),G4=$("ZodIPv6",(e,a)=>{bD.init(e,a),Ie.init(e,a)}),q4=$("ZodCIDRv4",(e,a)=>{SD.init(e,a),Ie.init(e,a)}),Y4=$("ZodCIDRv6",(e,a)=>{xD.init(e,a),Ie.init(e,a)}),P4=$("ZodBase64",(e,a)=>{TD.init(e,a),Ie.init(e,a)}),X4=$("ZodBase64URL",(e,a)=>{ED.init(e,a),Ie.init(e,a)}),K4=$("ZodE164",(e,a)=>{wD.init(e,a),Ie.init(e,a)}),Q4=$("ZodJWT",(e,a)=>{zD.init(e,a),Ie.init(e,a)}),ex=$("ZodNumber",(e,a)=>{GS.init(e,a),at.init(e,a),e._zod.processJSONSchema=(o,l,f)=>P3(e,o,l),e.gt=(o,l)=>e.check(X0(o,l)),e.gte=(o,l)=>e.check(ud(o,l)),e.min=(o,l)=>e.check(ud(o,l)),e.lt=(o,l)=>e.check(P0(o,l)),e.lte=(o,l)=>e.check(ld(o,l)),e.max=(o,l)=>e.check(ld(o,l)),e.int=o=>e.check(F0(o)),e.safe=o=>e.check(F0(o)),e.positive=o=>e.check(X0(0,o)),e.nonnegative=o=>e.check(ud(0,o)),e.negative=o=>e.check(P0(0,o)),e.nonpositive=o=>e.check(ld(0,o)),e.multipleOf=(o,l)=>e.check(K0(o,l)),e.step=(o,l)=>e.check(K0(o,l)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ko(e){return _3(ex,e)}const F4=$("ZodNumberFormat",(e,a)=>{CD.init(e,a),ex.init(e,a)});function F0(e){return E3(F4,e)}const J4=$("ZodBoolean",(e,a)=>{RD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>X3(e,r,o)});function Vo(e){return w3(J4,e)}const I4=$("ZodUnknown",(e,a)=>{MD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>Q3()});function J0(){return A3(I4)}const W4=$("ZodNever",(e,a)=>{OD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>K3(e,r,o)});function eN(e){return z3(W4,e)}const tN=$("ZodArray",(e,a)=>{DD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>W3(e,r,o,l),e.element=a.element,e.min=(r,o)=>e.check(Wl(r,o)),e.nonempty=r=>e.check(Wl(1,r)),e.max=(r,o)=>e.check(XS(r,o)),e.length=(r,o)=>e.check(KS(r,o)),e.unwrap=()=>e.element});function fu(e,a){return B3(tN,e,a)}const nN=$("ZodObject",(e,a)=>{jD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>e4(e,r,o,l),Ne(e,"shape",()=>a.shape),e.keyof=()=>Fo(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:J0()}),e.loose=()=>e.clone({...e._zod.def,catchall:J0()}),e.strict=()=>e.clone({...e._zod.def,catchall:eN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>tO(e,r),e.safeExtend=r=>nO(e,r),e.merge=r=>aO(e,r),e.pick=r=>WM(e,r),e.omit=r=>eO(e,r),e.partial=(...r)=>iO(ax,e,r[0]),e.required=(...r)=>rO(ix,e,r[0])});function En(e,a){const r={type:"object",shape:e??{},...se(a)};return new nN(r)}const aN=$("ZodUnion",(e,a)=>{kD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>t4(e,r,o,l),e.options=a.options});function tx(e,a){return new aN({type:"union",options:e,...se(a)})}const iN=$("ZodIntersection",(e,a)=>{VD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>n4(e,r,o,l)});function rN(e,a){return new iN({type:"intersection",left:e,right:a})}const oN=$("ZodRecord",(e,a)=>{LD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>a4(e,r,o,l),e.keyType=a.keyType,e.valueType=a.valueType});function nx(e,a,r){return new oN({type:"record",keyType:e,valueType:a,...se(r)})}const Yd=$("ZodEnum",(e,a)=>{UD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(o,l,f)=>F3(e,o,l),e.enum=a.entries,e.options=Object.values(a.entries);const r=new Set(Object.keys(a.entries));e.extract=(o,l)=>{const f={};for(const c of o)if(r.has(c))f[c]=a.entries[c];else throw new Error(`Key ${c} not found in enum`);return new Yd({...a,checks:[],...se(l),entries:f})},e.exclude=(o,l)=>{const f={...a.entries};for(const c of o)if(r.has(c))delete f[c];else throw new Error(`Key ${c} not found in enum`);return new Yd({...a,checks:[],...se(l),entries:f})}});function Fo(e,a){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Yd({type:"enum",entries:r,...se(a)})}const sN=$("ZodTransform",(e,a)=>{BD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>I3(e,r),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zS(e.constructor.name);r.addIssue=f=>{if(typeof f=="string")r.issues.push(Qo(f,r.value,a));else{const c=f;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=r.value),c.inst??(c.inst=e),r.issues.push(Qo(c))}};const l=a.transform(r.value,r);return l instanceof Promise?l.then(f=>(r.value=f,r)):(r.value=l,r)}});function lN(e){return new sN({type:"transform",transform:e})}const ax=$("ZodOptional",(e,a)=>{PS.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>IS(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function I0(e){return new ax({type:"optional",innerType:e})}const uN=$("ZodExactOptional",(e,a)=>{ZD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>IS(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function cN(e){return new uN({type:"optional",innerType:e})}const fN=$("ZodNullable",(e,a)=>{HD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>i4(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function W0(e){return new fN({type:"nullable",innerType:e})}const dN=$("ZodDefault",(e,a)=>{$D.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>o4(e,r,o,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hN(e,a){return new dN({type:"default",innerType:e,get defaultValue(){return typeof a=="function"?a():OS(a)}})}const mN=$("ZodPrefault",(e,a)=>{GD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>s4(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function pN(e,a){return new mN({type:"prefault",innerType:e,get defaultValue(){return typeof a=="function"?a():OS(a)}})}const ix=$("ZodNonOptional",(e,a)=>{qD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>r4(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function gN(e,a){return new ix({type:"nonoptional",innerType:e,...se(a)})}const yN=$("ZodCatch",(e,a)=>{YD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>l4(e,r,o,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vN(e,a){return new yN({type:"catch",innerType:e,catchValue:typeof a=="function"?a:()=>a})}const bN=$("ZodPipe",(e,a)=>{PD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>u4(e,r,o,l),e.in=a.in,e.out=a.out});function eb(e,a){return new bN({type:"pipe",in:e,out:a})}const SN=$("ZodReadonly",(e,a)=>{XD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>c4(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function xN(e){return new SN({type:"readonly",innerType:e})}const TN=$("ZodCustom",(e,a)=>{KD.init(e,a),at.init(e,a),e._zod.processJSONSchema=(r,o,l)=>J3(e,r)});function _N(e,a={}){return Z3(TN,e,a)}function EN(e){return H3(e)}const Pe={agent:{name:"morpheus",personality:"helpful_dev"},logging:{enabled:!0,level:"info",retention:"14d"},audio:{provider:"google",enabled:!0,maxDurationSeconds:300,supportedMimeTypes:["audio/ogg","audio/mp3","audio/mpeg","audio/wav"]},memory:{limit:100},llm:{provider:"openai",model:"gpt-4",temperature:.7},channels:{telegram:{enabled:!1,allowedUsers:[]},discord:{enabled:!1}},ui:{enabled:!0,port:3333}},wN=En({provider:Fo(["google"]).default(Pe.audio.provider),enabled:Vo().default(Pe.audio.enabled),apiKey:Ct().optional(),maxDurationSeconds:ko().default(Pe.audio.maxDurationSeconds),supportedMimeTypes:fu(Ct()).default(Pe.audio.supportedMimeTypes)}),AN=En({agent:En({name:Ct().default(Pe.agent.name),personality:Ct().default(Pe.agent.personality)}).default(Pe.agent),llm:En({provider:Fo(["openai","anthropic","ollama","gemini"]).default(Pe.llm.provider),model:Ct().min(1).default(Pe.llm.model),temperature:ko().min(0).max(1).default(Pe.llm.temperature),max_tokens:ko().int().positive().optional(),api_key:Ct().optional()}).default(Pe.llm),audio:wN.default(Pe.audio),memory:En({limit:ko().int().positive().default(Pe.memory.limit)}).default(Pe.memory),channels:En({telegram:En({enabled:Vo().default(!1),token:Ct().optional(),allowedUsers:fu(Ct()).default([])}).default(Pe.channels.telegram),discord:En({enabled:Vo().default(!1),token:Ct().optional()}).default(Pe.channels.discord)}).default(Pe.channels),ui:En({enabled:Vo().default(Pe.ui.enabled),port:ko().default(Pe.ui.port)}).default(Pe.ui),logging:En({enabled:Vo().default(Pe.logging.enabled),level:Fo(["debug","info","warn","error"]).default(Pe.logging.level),retention:Ct().default(Pe.logging.retention)}).default(Pe.logging)}),zN=En({transport:Fo(["stdio","http"]),command:Ct().min(1,"Command is required"),args:fu(Ct()).optional().default([]),env:nx(Ct(),Ct()).optional().default({}),_comment:Ct().optional()});nx(Ct(),tx([zN,Ct()]));function rx(e,a,r){function o(h,m){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:m,constr:c,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),a(h,m);const p=c.prototype,y=Object.keys(p);for(let v=0;v<y.length;v++){const S=y[v];S in h||(h[S]=p[S].bind(h))}}const l=r?.Parent??Object;class f extends l{}Object.defineProperty(f,"name",{value:e});function c(h){var m;const p=r?.Parent?new f:this;o(p,h),(m=p._zod).deferred??(m.deferred=[]);for(const y of p._zod.deferred)y();return p}return Object.defineProperty(c,"init",{value:o}),Object.defineProperty(c,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}function Pd(e,a){return typeof a=="bigint"?a.toString():a}const CN=(e,a)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:a,enumerable:!1}),e.message=JSON.stringify(a,Pd,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},RN=rx("$ZodError",CN);function MN(e,a=r=>r.message){const r={},o=[];for(const l of e.issues)l.path.length>0?(r[l.path[0]]=r[l.path[0]]||[],r[l.path[0]].push(a(l))):o.push(a(l));return{formErrors:o,fieldErrors:r}}function ON(e,a=r=>r.message){const r={_errors:[]},o=l=>{for(const f of l.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(c=>o({issues:c}));else if(f.code==="invalid_key")o({issues:f.issues});else if(f.code==="invalid_element")o({issues:f.issues});else if(f.path.length===0)r._errors.push(a(f));else{let c=r,h=0;for(;h<f.path.length;){const m=f.path[h];h===f.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(a(f))):c[m]=c[m]||{_errors:[]},c=c[m],h++}}};return o(e),r}var tb;class DN{constructor(){this._map=new WeakMap,this._idmap=new Map}add(a,...r){const o=r[0];return this._map.set(a,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,a),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(a){const r=this._map.get(a);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(a),this}get(a){const r=a._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const l={...o,...this._map.get(a)};return Object.keys(l).length?l:void 0}return this._map.get(a)}has(a){return this._map.has(a)}}function NN(){return new DN}(tb=globalThis).__zod_globalRegistry??(tb.__zod_globalRegistry=NN());const jN=(e,a)=>{RN.init(e,a),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ON(e,r)},flatten:{value:r=>MN(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Pd,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Pd,2)}},isEmpty:{get(){return e.issues.length===0}}})},kN=rx("ZodError",jN),VN=[{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 LN(){const{data:e,error:a}=es("/api/config",D0.fetchConfig),[r,o]=w.useState(null),[l,f]=w.useState("general"),[c,h]=w.useState(!1),[m,p]=w.useState({}),[y,v]=w.useState(null);w.useEffect(()=>{e&&!r&&o(e)},[e]);const S=JSON.stringify(e)!==JSON.stringify(r),x=(T,O)=>{if(!r)return;const L=JSON.parse(JSON.stringify(r));let C=L;for(let k=0;k<T.length-1;k++)C=C[T[k]];C[T[T.length-1]]=O,o(L);try{AN.parse(L),p({})}catch(k){if(k instanceof kN){const Q={};k.errors.forEach(q=>{const I=q.path.join(".");Q[I]=q.message}),p(Q)}}},M=async()=>{if(r){h(!0),v(null);try{await D0.updateConfig(r),Rb("/api/config"),v({type:"success",message:"Settings saved successfully"})}catch(T){if(v({type:"error",message:T.message}),T.details&&Array.isArray(T.details)){const O={};T.details.forEach(L=>{const C=L.path.join(".");O[C]=L.message}),p(O)}}finally{h(!1)}}};return a?R.jsx("div",{className:"p-8 text-red-500",children:"Failed to load configuration"}):r?R.jsxs("div",{className:"max-w-4xl mx-auto p-6 space-y-6",children:[R.jsxs("div",{className:"flex justify-between items-center",children:[R.jsx("h1",{className:"text-2xl font-bold text-matrix-highlight",children:"Settings"}),R.jsx("button",{onClick:M,disabled:!S||Object.keys(m).length>0||c,className:`px-4 py-2 rounded font-medium transition-colors ${S&&Object.keys(m).length===0?"bg-matrix-highlight text-black hover:bg-matrix-highlight/90":"bg-matrix-primary/50 text-matrix-highlight/50 cursor-not-allowed"}`,children:c?"Saving...":"Save Changes"})]}),y&&R.jsx("div",{className:`p-4 rounded border ${y.type==="success"?"border-matrix-highlight text-matrix-highlight bg-matrix-highlight/10":"border-red-500 text-red-500 bg-red-900/10"}`,children:y.message}),R.jsx("div",{className:"flex space-x-1 border-b border-matrix-primary pb-px",children:VN.map(T=>R.jsx("button",{onClick:()=>f(T.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors ${l===T.id?"bg-matrix-primary/20 text-matrix-highlight border-t border-x border-matrix-primary":"text-matrix-secondary hover:text-matrix-highlight"}`,children:T.label},T.id))}),R.jsxs("div",{className:"space-y-6",children:[l==="general"&&R.jsxs(hi,{title:"Agent Identity",children:[R.jsx(La,{label:"Agent Name",value:r.agent.name,onChange:T=>x(["agent","name"],T.target.value),error:m["agent.name"]}),R.jsx(La,{label:"Personality",value:r.agent.personality,onChange:T=>x(["agent","personality"],T.target.value),error:m["agent.personality"]})]}),l==="llm"&&R.jsxs(R.Fragment,{children:[R.jsxs(hi,{title:"LLM Provider",children:[R.jsx(sd,{label:"Provider",value:r.llm.provider,onChange:T=>x(["llm","provider"],T.target.value),options:[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}],error:m["llm.provider"]}),R.jsx(La,{label:"Model Name",value:r.llm.model,onChange:T=>x(["llm","model"],T.target.value),error:m["llm.model"]}),R.jsx(Oo,{label:"Temperature",value:r.llm.temperature,onChange:T=>x(["llm","temperature"],parseFloat(T.target.value)),step:.1,min:0,max:1,error:m["llm.temperature"]}),R.jsx(Oo,{label:"Memory Limit (Max Tokens)",value:r.llm.max_tokens??"",onChange:T=>x(["llm","max_tokens"],T.target.value?parseInt(T.target.value):void 0),min:1,error:m["llm.max_tokens"],helperText:"Limit the context window size. Leave empty for model default."}),R.jsx(La,{label:"API Key",type:"password",value:r.llm.api_key||"",onChange:T=>x(["llm","api_key"],T.target.value),placeholder:"sk-...",helperText:"Stored locally."})]}),R.jsxs(hi,{title:"Chat Memory",children:[R.jsx("div",{className:"text-sm text-matrix-secondary mb-4",children:"Control how much conversation history is retained and sent to the LLM."}),R.jsx(Oo,{label:"History Limit (Messages)",value:r.memory.limit,onChange:T=>x(["memory","limit"],parseInt(T.target.value)),min:1,step:1,error:m["memory.limit"],helperText:"Number of past interactions to load into context (e.g., 10)."})]})]}),l==="audio"&&R.jsxs(hi,{title:"Audio Transcription",children:[R.jsx(Ol,{label:"Enable Audio",checked:r.audio.enabled,onChange:T=>x(["audio","enabled"],T)}),R.jsx(sd,{label:"Provider",value:r.audio.provider||"google",onChange:T=>x(["audio","provider"],T.target.value),options:[{label:"Google Gemini",value:"google"}],error:m["audio.provider"]}),R.jsx(La,{label:"API Key",type:"password",value:r.audio.apiKey||"",onChange:T=>x(["audio","apiKey"],T.target.value),placeholder:"If different from LLM key...",helperText:"Leave empty to use LLM API key if using same provider."}),R.jsx(Oo,{label:"Max Duration (Seconds)",value:r.audio.maxDurationSeconds,onChange:T=>x(["audio","maxDurationSeconds"],parseInt(T.target.value)),min:1}),R.jsx(La,{label:"Supported Mime Types",value:r.audio.supportedMimeTypes.join(", "),onChange:T=>x(["audio","supportedMimeTypes"],T.target.value.split(",").map(O=>O.trim()).filter(Boolean)),helperText:"Comma separated list (e.g. audio/ogg, audio/mp3)"})]}),l==="channels"&&R.jsxs(hi,{title:"Telegram",children:[R.jsx(Ol,{label:"Enable Telegram",checked:r.channels.telegram.enabled,onChange:T=>x(["channels","telegram","enabled"],T)}),r.channels.telegram.enabled&&R.jsxs("div",{className:"space-y-4 mt-4 pl-4 border-l border-matrix-primary",children:[R.jsx(La,{label:"Bot Token",type:"password",value:r.channels.telegram.token||"",onChange:T=>x(["channels","telegram","token"],T.target.value)}),R.jsx(La,{label:"Allowed Users (comma separated)",value:r.channels.telegram.allowedUsers.join(", "),onChange:T=>x(["channels","telegram","allowedUsers"],T.target.value.split(",").map(O=>O.trim()).filter(Boolean)),helperText:"User IDs allowed to interact with the bot"})]})]}),l==="ui"&&R.jsxs(hi,{title:"Dashboard",children:[R.jsx(Ol,{label:"Enable Web UI",checked:r.ui.enabled,onChange:T=>x(["ui","enabled"],T)}),R.jsx(Oo,{label:"Port",value:r.ui.port,onChange:T=>x(["ui","port"],parseInt(T.target.value)),disabled:!0,helperText:"Requires restart to change."})]}),l==="logging"&&R.jsxs(hi,{title:"Logging",children:[R.jsx(Ol,{label:"Enable Logging",checked:r.logging.enabled,onChange:T=>x(["logging","enabled"],T)}),R.jsx(sd,{label:"Log Level",value:r.logging.level,onChange:T=>x(["logging","level"],T.target.value),options:[{label:"Debug",value:"debug"},{label:"Info",value:"info"},{label:"Warning",value:"warn"},{label:"Error",value:"error"}]})]})]})]}):R.jsx("div",{className:"p-8 text-matrix-highlight",children:"Loading settings..."})}function UN(){const{data:e}=b2(),[a,r]=w.useState(null),{data:o,mutate:l}=S2(a);return w.useEffect(()=>{!a&&e&&e.length>0&&r(e[0].name)},[e,a]),R.jsxs(Ko.div,{className:"h-full flex flex-col space-y-4",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.3},children:[R.jsxs("div",{children:[R.jsx("h2",{className:"text-2xl font-bold text-matrix-highlight",children:"SYSTEM LOGS"}),R.jsx("p",{className:"text-matrix-secondary opacity-80",children:"View runtime logs."})]}),R.jsxs("div",{className:"flex-1 flex gap-4 overflow-hidden border border-matrix-primary rounded bg-zinc-950 p-4",children:[R.jsxs("div",{className:"w-64 flex flex-col gap-2 border-r border-matrix-primary pr-4 overflow-y-auto shrink-0",children:[R.jsx("h3",{className:"font-bold text-matrix-secondary mb-2 sticky top-0 bg-zinc-950",children:"LOG FILES"}),e?.map(f=>R.jsxs("button",{onClick:()=>r(f.name),className:`text-left px-3 py-2 rounded text-sm truncate flex items-center gap-2 group transition-colors ${a===f.name?"bg-matrix-primary text-matrix-highlight":"text-matrix-secondary hover:bg-zinc-900 group-hover:text-matrix-highlight"}`,children:[R.jsx(zw,{className:"w-4 h-4 shrink-0"}),R.jsxs("div",{className:"flex flex-col overflow-hidden",children:[R.jsx("span",{className:"truncate font-bold",children:f.name}),R.jsxs("span",{className:"text-xs opacity-70",children:[(f.size/1024).toFixed(1)," KB"]})]})]},f.name))]}),R.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden bg-black border border-matrix-primary/50 rounded",children:[R.jsxs("div",{className:"flex justify-between items-center p-2 bg-zinc-900 border-b border-matrix-primary/50",children:[R.jsx("span",{className:"text-matrix-highlight font-bold font-mono text-sm",children:a}),R.jsx("button",{onClick:()=>l(),className:"text-matrix-secondary hover:text-matrix-highlight transition-colors",children:R.jsx(kw,{className:"w-4 h-4"})})]}),R.jsx("div",{className:"flex-1 overflow-auto p-4 font-mono text-xs whitespace-pre-wrap text-white",children:o?o.lines.join(`
50
+ `):"Select a log file to view content..."})]})]})]})}const BN=()=>{const[e,a]=w.useState(""),[r,o]=w.useState(""),l=Jd(),f=An(),c=h=>{h.preventDefault(),e&&(o(""),fetch("/api/config",{headers:{"x-architect-pass":e}}).then(async m=>{if(m.ok){localStorage.setItem("morpheus.auth.token",e);const p=f.state?.from?.pathname||"/";l(p,{replace:!0})}else o("Invalid architect password")}).catch(()=>{o("Connection failed")}))};return R.jsx("div",{className:"flex items-center justify-center min-h-screen bg-black text-green-500 font-mono",children:R.jsxs("div",{className:"max-w-md w-full p-8 border border-green-500 shadow-[0_0_15px_rgba(34,197,94,0.3)]",children:[R.jsx("h1",{className:"text-2xl font-bold mb-6 text-center tracking-widest uppercase",children:"> The Architect Login"}),R.jsxs("form",{onSubmit:c,className:"space-y-6",children:[R.jsxs("div",{children:[R.jsx("label",{className:"block text-sm mb-2 opacity-70",children:"ACCESS_PASS:"}),R.jsx("input",{type:"password",value:e,onChange:h=>a(h.target.value),className:"w-full bg-black border border-green-800 p-2 focus:outline-none focus:border-green-500 placeholder-green-900",placeholder:"••••••••",autoFocus:!0})]}),r&&R.jsxs("div",{className:"text-red-500 text-sm animate-pulse",children:["[!] ERROR: ",r]}),R.jsx("button",{type:"submit",className:"w-full bg-green-900 hover:bg-green-700 text-black font-bold py-2 transition-colors duration-200 uppercase tracking-wider",children:"Authenticate"})]}),R.jsx("div",{className:"mt-8 text-[10px] opacity-30 text-center uppercase",children:"Morpheus OS v0.1.5 | Unauthorized access is logged."})]})})},ZN=({children:e})=>{const{isAuthenticated:a}=mS(),r=An();return a?R.jsx(R.Fragment,{children:e}):R.jsx(pb,{to:"/login",state:{from:r},replace:!0})};function HN(){return R.jsx(IE,{children:R.jsxs(tv,{children:[R.jsx(pi,{path:"/login",element:R.jsx(BN,{})}),R.jsx(pi,{path:"/*",element:R.jsx(ZN,{children:R.jsx(tM,{children:R.jsxs(tv,{children:[R.jsx(pi,{path:"/",element:R.jsx(rM,{})}),R.jsx(pi,{path:"/config",element:R.jsx(LN,{})}),R.jsx(pi,{path:"/logs",element:R.jsx(UN,{})}),R.jsx(pi,{path:"*",element:R.jsx(pb,{to:"/",replace:!0})})]})})})})]})})}D_.createRoot(document.getElementById("root")).render(R.jsx(w.StrictMode,{children:R.jsx(HN,{})}));