@ogygie/studio 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,78 @@
1
+ (function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();function n_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lf={exports:{}},ir={};var kg;function a_(){if(kg)return ir;kg=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:e,type:r,key:d,ref:o!==void 0?o:null,props:c}}return ir.Fragment=a,ir.jsx=i,ir.jsxs=i,ir}var Lg;function s_(){return Lg||(Lg=1,lf.exports=a_()),lf.exports}var g=s_(),of={exports:{}},ge={};var Ug;function i_(){if(Ug)return ge;Ug=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(E){return E===null||typeof E!="object"?null:(E=x&&E[x]||E["@@iterator"],typeof E=="function"?E:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,z={};function T(E,Z,X){this.props=E,this.context=Z,this.refs=z,this.updater=X||w}T.prototype.isReactComponent={},T.prototype.setState=function(E,Z){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,Z,"setState")},T.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function L(){}L.prototype=T.prototype;function G(E,Z,X){this.props=E,this.context=Z,this.refs=z,this.updater=X||w}var V=G.prototype=new L;V.constructor=G,j(V,T.prototype),V.isPureReactComponent=!0;var W=Array.isArray;function $(){}var R={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function ie(E,Z,X){var ne=X.ref;return{$$typeof:e,type:E,key:Z,ref:ne!==void 0?ne:null,props:X}}function re(E,Z){return ie(E.type,Z,E.props)}function P(E){return typeof E=="object"&&E!==null&&E.$$typeof===e}function I(E){var Z={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(X){return Z[X]})}var fe=/\/+/g;function ye(E,Z){return typeof E=="object"&&E!==null&&E.key!=null?I(""+E.key):Z.toString(36)}function pe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then($,$):(E.status="pending",E.then(function(Z){E.status==="pending"&&(E.status="fulfilled",E.value=Z)},function(Z){E.status==="pending"&&(E.status="rejected",E.reason=Z)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function U(E,Z,X,ne,me){var xe=typeof E;(xe==="undefined"||xe==="boolean")&&(E=null);var Ee=!1;if(E===null)Ee=!0;else switch(xe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(E.$$typeof){case e:case a:Ee=!0;break;case b:return Ee=E._init,U(Ee(E._payload),Z,X,ne,me)}}if(Ee)return me=me(E),Ee=ne===""?"."+ye(E,0):ne,W(me)?(X="",Ee!=null&&(X=Ee.replace(fe,"$&/")+"/"),U(me,Z,X,"",function(fn){return fn})):me!=null&&(P(me)&&(me=re(me,X+(me.key==null||E&&E.key===me.key?"":(""+me.key).replace(fe,"$&/")+"/")+Ee)),Z.push(me)),1;Ee=0;var Ze=ne===""?".":ne+":";if(W(E))for(var He=0;He<E.length;He++)ne=E[He],xe=Ze+ye(ne,He),Ee+=U(ne,Z,X,xe,me);else if(He=S(E),typeof He=="function")for(E=He.call(E),He=0;!(ne=E.next()).done;)ne=ne.value,xe=Ze+ye(ne,He++),Ee+=U(ne,Z,X,xe,me);else if(xe==="object"){if(typeof E.then=="function")return U(pe(E),Z,X,ne,me);throw Z=String(E),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function C(E,Z,X){if(E==null)return E;var ne=[],me=0;return U(E,ne,"","",function(xe){return Z.call(X,xe,me++)}),ne}function q(E){if(E._status===-1){var Z=E._result;Z=Z(),Z.then(function(X){(E._status===0||E._status===-1)&&(E._status=1,E._result=X)},function(X){(E._status===0||E._status===-1)&&(E._status=2,E._result=X)}),E._status===-1&&(E._status=0,E._result=Z)}if(E._status===1)return E._result.default;throw E._result}var ae=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},ue={map:C,forEach:function(E,Z,X){C(E,function(){Z.apply(this,arguments)},X)},count:function(E){var Z=0;return C(E,function(){Z++}),Z},toArray:function(E){return C(E,function(Z){return Z})||[]},only:function(E){if(!P(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return ge.Activity=v,ge.Children=ue,ge.Component=T,ge.Fragment=i,ge.Profiler=o,ge.PureComponent=G,ge.StrictMode=r,ge.Suspense=p,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,ge.__COMPILER_RUNTIME={__proto__:null,c:function(E){return R.H.useMemoCache(E)}},ge.cache=function(E){return function(){return E.apply(null,arguments)}},ge.cacheSignal=function(){return null},ge.cloneElement=function(E,Z,X){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ne=j({},E.props),me=E.key;if(Z!=null)for(xe in Z.key!==void 0&&(me=""+Z.key),Z)!J.call(Z,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&Z.ref===void 0||(ne[xe]=Z[xe]);var xe=arguments.length-2;if(xe===1)ne.children=X;else if(1<xe){for(var Ee=Array(xe),Ze=0;Ze<xe;Ze++)Ee[Ze]=arguments[Ze+2];ne.children=Ee}return ie(E.type,me,ne)},ge.createContext=function(E){return E={$$typeof:d,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:c,_context:E},E},ge.createElement=function(E,Z,X){var ne,me={},xe=null;if(Z!=null)for(ne in Z.key!==void 0&&(xe=""+Z.key),Z)J.call(Z,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(me[ne]=Z[ne]);var Ee=arguments.length-2;if(Ee===1)me.children=X;else if(1<Ee){for(var Ze=Array(Ee),He=0;He<Ee;He++)Ze[He]=arguments[He+2];me.children=Ze}if(E&&E.defaultProps)for(ne in Ee=E.defaultProps,Ee)me[ne]===void 0&&(me[ne]=Ee[ne]);return ie(E,xe,me)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(E){return{$$typeof:h,render:E}},ge.isValidElement=P,ge.lazy=function(E){return{$$typeof:b,_payload:{_status:-1,_result:E},_init:q}},ge.memo=function(E,Z){return{$$typeof:m,type:E,compare:Z===void 0?null:Z}},ge.startTransition=function(E){var Z=R.T,X={};R.T=X;try{var ne=E(),me=R.S;me!==null&&me(X,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then($,ae)}catch(xe){ae(xe)}finally{Z!==null&&X.types!==null&&(Z.types=X.types),R.T=Z}},ge.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},ge.use=function(E){return R.H.use(E)},ge.useActionState=function(E,Z,X){return R.H.useActionState(E,Z,X)},ge.useCallback=function(E,Z){return R.H.useCallback(E,Z)},ge.useContext=function(E){return R.H.useContext(E)},ge.useDebugValue=function(){},ge.useDeferredValue=function(E,Z){return R.H.useDeferredValue(E,Z)},ge.useEffect=function(E,Z){return R.H.useEffect(E,Z)},ge.useEffectEvent=function(E){return R.H.useEffectEvent(E)},ge.useId=function(){return R.H.useId()},ge.useImperativeHandle=function(E,Z,X){return R.H.useImperativeHandle(E,Z,X)},ge.useInsertionEffect=function(E,Z){return R.H.useInsertionEffect(E,Z)},ge.useLayoutEffect=function(E,Z){return R.H.useLayoutEffect(E,Z)},ge.useMemo=function(E,Z){return R.H.useMemo(E,Z)},ge.useOptimistic=function(E,Z){return R.H.useOptimistic(E,Z)},ge.useReducer=function(E,Z,X){return R.H.useReducer(E,Z,X)},ge.useRef=function(E){return R.H.useRef(E)},ge.useState=function(E){return R.H.useState(E)},ge.useSyncExternalStore=function(E,Z,X){return R.H.useSyncExternalStore(E,Z,X)},ge.useTransition=function(){return R.H.useTransition()},ge.version="19.2.8",ge}var Zg;function Or(){return Zg||(Zg=1,of.exports=i_()),of.exports}var ee=Or();const Ro=n_(ee);var uf={exports:{}},rr={},cf={exports:{}},ff={};var qg;function r_(){return qg||(qg=1,(function(e){function a(U,C){var q=U.length;U.push(C);e:for(;0<q;){var ae=q-1>>>1,ue=U[ae];if(0<o(ue,C))U[ae]=C,U[q]=ue,q=ae;else break e}}function i(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var C=U[0],q=U.pop();if(q!==C){U[0]=q;e:for(var ae=0,ue=U.length,E=ue>>>1;ae<E;){var Z=2*(ae+1)-1,X=U[Z],ne=Z+1,me=U[ne];if(0>o(X,q))ne<ue&&0>o(me,X)?(U[ae]=me,U[ne]=q,ae=ne):(U[ae]=X,U[Z]=q,ae=Z);else if(ne<ue&&0>o(me,q))U[ae]=me,U[ne]=q,ae=ne;else break e}}return C}function o(U,C){var q=U.sortIndex-C.sortIndex;return q!==0?q:U.id-C.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();e.unstable_now=function(){return d.now()-h}}var p=[],m=[],b=1,v=null,x=3,S=!1,w=!1,j=!1,z=!1,T=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function V(U){for(var C=i(m);C!==null;){if(C.callback===null)r(m);else if(C.startTime<=U)r(m),C.sortIndex=C.expirationTime,a(p,C);else break;C=i(m)}}function W(U){if(j=!1,V(U),!w)if(i(p)!==null)w=!0,$||($=!0,I());else{var C=i(m);C!==null&&pe(W,C.startTime-U)}}var $=!1,R=-1,J=5,ie=-1;function re(){return z?!0:!(e.unstable_now()-ie<J)}function P(){if(z=!1,$){var U=e.unstable_now();ie=U;var C=!0;try{e:{w=!1,j&&(j=!1,L(R),R=-1),S=!0;var q=x;try{t:{for(V(U),v=i(p);v!==null&&!(v.expirationTime>U&&re());){var ae=v.callback;if(typeof ae=="function"){v.callback=null,x=v.priorityLevel;var ue=ae(v.expirationTime<=U);if(U=e.unstable_now(),typeof ue=="function"){v.callback=ue,V(U),C=!0;break t}v===i(p)&&r(p),V(U)}else r(p);v=i(p)}if(v!==null)C=!0;else{var E=i(m);E!==null&&pe(W,E.startTime-U),C=!1}}break e}finally{v=null,x=q,S=!1}C=void 0}}finally{C?I():$=!1}}}var I;if(typeof G=="function")I=function(){G(P)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ye=fe.port2;fe.port1.onmessage=P,I=function(){ye.postMessage(null)}}else I=function(){T(P,0)};function pe(U,C){R=T(function(){U(e.unstable_now())},C)}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"):J=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(U){switch(x){case 1:case 2:case 3:var C=3;break;default:C=x}var q=x;x=C;try{return U()}finally{x=q}},e.unstable_requestPaint=function(){z=!0},e.unstable_runWithPriority=function(U,C){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var q=x;x=U;try{return C()}finally{x=q}},e.unstable_scheduleCallback=function(U,C,q){var ae=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ae+q:ae):q=ae,U){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=q+ue,U={id:b++,callback:C,priorityLevel:U,startTime:q,expirationTime:ue,sortIndex:-1},q>ae?(U.sortIndex=q,a(m,U),i(p)===null&&U===i(m)&&(j?(L(R),R=-1):j=!0,pe(W,q-ae))):(U.sortIndex=ue,a(p,U),w||S||(w=!0,$||($=!0,I()))),U},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(U){var C=x;return function(){var q=x;x=C;try{return U.apply(this,arguments)}finally{x=q}}}})(ff)),ff}var Bg;function l_(){return Bg||(Bg=1,cf.exports=r_()),cf.exports}var df={exports:{}},vt={};var $g;function o_(){if($g)return vt;$g=1;var e=Or();function a(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,m,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:p,containerInfo:m,implementation:b}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,vt.createPortal=function(p,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return c(p,m,null,b)},vt.flushSync=function(p){var m=d.T,b=r.p;try{if(d.T=null,r.p=2,p)return p()}finally{d.T=m,r.p=b,r.d.f()}},vt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},vt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},vt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,v=h(b,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):b==="script"&&r.d.X(p,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},vt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},vt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,v=h(b,m.crossOrigin);r.d.L(p,b,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},vt.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},vt.requestFormReset=function(p){r.d.r(p)},vt.unstable_batchedUpdates=function(p,m){return p(m)},vt.useFormState=function(p,m,b){return d.H.useFormState(p,m,b)},vt.useFormStatus=function(){return d.H.useHostTransitionStatus()},vt.version="19.2.8",vt}var Hg;function Ov(){if(Hg)return df.exports;Hg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),df.exports=o_(),df.exports}var Qg;function u_(){if(Qg)return rr;Qg=1;var e=l_(),a=Or(),i=Ov();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s])}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 o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var n=t,s=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(s=n.return),t=n.return;while(t)}return n.tag===3?s:null}function d(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 p(t){if(c(t)!==t)throw Error(r(188))}function m(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(r(188));return n!==t?null:t}for(var s=t,l=n;;){var u=s.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){s=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===s)return p(u),t;if(f===l)return p(u),n;f=f.sibling}throw Error(r(188))}if(s.return!==l.return)s=u,l=f;else{for(var y=!1,_=u.child;_;){if(_===s){y=!0,s=u,l=f;break}if(_===l){y=!0,l=u,s=f;break}_=_.sibling}if(!y){for(_=f.child;_;){if(_===s){y=!0,s=f,l=u;break}if(_===l){y=!0,l=f,s=u;break}_=_.sibling}if(!y)throw Error(r(189))}}if(s.alternate!==l)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:n}function b(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=b(t),n!==null)return n;t=t.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),G=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function I(t){return t===null||typeof t!="object"?null:(t=P&&t[P]||t["@@iterator"],typeof t=="function"?t:null)}var fe=Symbol.for("react.client.reference");function ye(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===fe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case j:return"Fragment";case T:return"Profiler";case z:return"StrictMode";case W:return"Suspense";case $:return"SuspenseList";case ie:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case G:return t.displayName||"Context";case L:return(t._context.displayName||"Context")+".Consumer";case V:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case R:return n=t.displayName||null,n!==null?n:ye(t.type)||"Memo";case J:n=t._payload,t=t._init;try{return ye(t(n))}catch{}}return null}var pe=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},ae=[],ue=-1;function E(t){return{current:t}}function Z(t){0>ue||(t.current=ae[ue],ae[ue]=null,ue--)}function X(t,n){ue++,ae[ue]=t.current,t.current=n}var ne=E(null),me=E(null),xe=E(null),Ee=E(null);function Ze(t,n){switch(X(xe,n),X(me,t),X(ne,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?sg(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=sg(n),t=ig(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Z(ne),X(ne,t)}function He(){Z(ne),Z(me),Z(xe)}function fn(t){t.memoizedState!==null&&X(Ee,t);var n=ne.current,s=ig(n,t.type);n!==s&&(X(me,t),X(ne,s))}function Ra(t){me.current===t&&(Z(ne),Z(me)),Ee.current===t&&(Z(Ee),tr._currentValue=q)}var Ho,Dd;function Ca(t){if(Ho===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);Ho=n&&n[1]||"",Dd=-1<s.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ho+t+Dd}var Qo=!1;function Go(t,n){if(!t||Qo)return"";Qo=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(B){var k=B}Reflect.construct(t,[],F)}else{try{F.call()}catch(B){k=B}t.call(F.prototype)}}else{try{throw Error()}catch(B){k=B}(F=t())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(B){if(B&&k&&typeof B.stack=="string")return[B.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),y=f[0],_=f[1];if(y&&_){var O=y.split(`
4
+ `),D=_.split(`
5
+ `);for(u=l=0;l<O.length&&!O[l].includes("DetermineComponentFrameRoot");)l++;for(;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;if(l===O.length||u===D.length)for(l=O.length-1,u=D.length-1;1<=l&&0<=u&&O[l]!==D[u];)u--;for(;1<=l&&0<=u;l--,u--)if(O[l]!==D[u]){if(l!==1||u!==1)do if(l--,u--,0>u||O[l]!==D[u]){var H=`
6
+ `+O[l].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),H}while(1<=l&&0<=u);break}}}finally{Qo=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Ca(s):""}function M0(t,n){switch(t.tag){case 26:case 27:case 5:return Ca(t.type);case 16:return Ca("Lazy");case 13:return t.child!==n&&n!==null?Ca("Suspense Fallback"):Ca("Suspense");case 19:return Ca("SuspenseList");case 0:case 15:return Go(t.type,!1);case 11:return Go(t.type.render,!1);case 1:return Go(t.type,!0);case 31:return Ca("Activity");default:return""}}function kd(t){try{var n="",s=null;do n+=M0(t,s),s=t,t=t.return;while(t);return n}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var Ko=Object.prototype.hasOwnProperty,Yo=e.unstable_scheduleCallback,Fo=e.unstable_cancelCallback,D0=e.unstable_shouldYield,k0=e.unstable_requestPaint,Mt=e.unstable_now,L0=e.unstable_getCurrentPriorityLevel,Ld=e.unstable_ImmediatePriority,Ud=e.unstable_UserBlockingPriority,Tr=e.unstable_NormalPriority,U0=e.unstable_LowPriority,Zd=e.unstable_IdlePriority,Z0=e.log,q0=e.unstable_setDisableYieldValue,hi=null,Dt=null;function Kn(t){if(typeof Z0=="function"&&q0(t),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(hi,t)}catch{}}var kt=Math.clz32?Math.clz32:H0,B0=Math.log,$0=Math.LN2;function H0(t){return t>>>=0,t===0?32:31-(B0(t)/$0|0)|0}var Ar=256,Rr=262144,Cr=4194304;function Ma(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 Mr(t,n,s){var l=t.pendingLanes;if(l===0)return 0;var u=0,f=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var _=l&134217727;return _!==0?(l=_&~f,l!==0?u=Ma(l):(y&=_,y!==0?u=Ma(y):s||(s=_&~t,s!==0&&(u=Ma(s))))):(_=l&~f,_!==0?u=Ma(_):y!==0?u=Ma(y):s||(s=l&~t,s!==0&&(u=Ma(s)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,s=n&-n,f>=s||f===32&&(s&4194048)!==0)?n:u}function mi(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Q0(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 qd(){var t=Cr;return Cr<<=1,(Cr&62914560)===0&&(Cr=4194304),t}function Vo(t){for(var n=[],s=0;31>s;s++)n.push(t);return n}function pi(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function G0(t,n,s,l,u,f){var y=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var _=t.entanglements,O=t.expirationTimes,D=t.hiddenUpdates;for(s=y&~s;0<s;){var H=31-kt(s),F=1<<H;_[H]=0,O[H]=-1;var k=D[H];if(k!==null)for(D[H]=null,H=0;H<k.length;H++){var B=k[H];B!==null&&(B.lane&=-536870913)}s&=~F}l!==0&&Bd(t,l,0),f!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=f&~(y&~n))}function Bd(t,n,s){t.pendingLanes|=n,t.suspendedLanes&=~n;var l=31-kt(n);t.entangledLanes|=n,t.entanglements[l]=t.entanglements[l]|1073741824|s&261930}function $d(t,n){var s=t.entangledLanes|=n;for(t=t.entanglements;s;){var l=31-kt(s),u=1<<l;u&n|t[l]&n&&(t[l]|=n),s&=~u}}function Hd(t,n){var s=n&-n;return s=(s&42)!==0?1:Po(s),(s&(t.suspendedLanes|n))!==0?0:s}function Po(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 Xo(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Qd(){var t=C.p;return t!==0?t:(t=window.event,t===void 0?32:zg(t.type))}function Gd(t,n){var s=C.p;try{return C.p=t,n()}finally{C.p=s}}var Yn=Math.random().toString(36).slice(2),dt="__reactFiber$"+Yn,wt="__reactProps$"+Yn,us="__reactContainer$"+Yn,Jo="__reactEvents$"+Yn,K0="__reactListeners$"+Yn,Y0="__reactHandles$"+Yn,Kd="__reactResources$"+Yn,gi="__reactMarker$"+Yn;function Io(t){delete t[dt],delete t[wt],delete t[Jo],delete t[K0],delete t[Y0]}function cs(t){var n=t[dt];if(n)return n;for(var s=t.parentNode;s;){if(n=s[us]||s[dt]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(t=dg(t);t!==null;){if(s=t[dt])return s;t=dg(t)}return n}t=s,s=t.parentNode}return null}function fs(t){if(t=t[dt]||t[us]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function yi(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function ds(t){var n=t[Kd];return n||(n=t[Kd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ot(t){t[gi]=!0}var Yd=new Set,Fd={};function Da(t,n){hs(t,n),hs(t+"Capture",n)}function hs(t,n){for(Fd[t]=n,t=0;t<n.length;t++)Yd.add(n[t])}var F0=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]*$"),Vd={},Pd={};function V0(t){return Ko.call(Pd,t)?!0:Ko.call(Vd,t)?!1:F0.test(t)?Pd[t]=!0:(Vd[t]=!0,!1)}function Dr(t,n,s){if(V0(n))if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+s)}}function kr(t,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+s)}}function Sn(t,n,s,l){if(l===null)t.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(n,s,""+l)}}function Kt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Xd(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function P0(t,n,s){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,f=l.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return u.call(this)},set:function(y){s=""+y,f.call(this,y)}}),Object.defineProperty(t,n,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Wo(t){if(!t._valueTracker){var n=Xd(t)?"checked":"value";t._valueTracker=P0(t,n,""+t[n])}}function Jd(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var s=n.getValue(),l="";return t&&(l=Xd(t)?t.checked?"true":"false":t.value),t=l,t!==s?(n.setValue(t),!0):!1}function Lr(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 X0=/[\n"\\]/g;function Yt(t){return t.replace(X0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function eu(t,n,s,l,u,f,y,_){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),n!=null?y==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Kt(n)):t.value!==""+Kt(n)&&(t.value=""+Kt(n)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),n!=null?tu(t,y,Kt(n)):s!=null?tu(t,y,Kt(s)):l!=null&&t.removeAttribute("value"),u==null&&f!=null&&(t.defaultChecked=!!f),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Kt(_):t.removeAttribute("name")}function Id(t,n,s,l,u,f,y,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(t.type=f),n!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Wo(t);return}s=s!=null?""+Kt(s):"",n=n!=null?""+Kt(n):s,_||n===t.value||(t.value=n),t.defaultValue=n}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=_?t.checked:!!l,t.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),Wo(t)}function tu(t,n,s){n==="number"&&Lr(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function ms(t,n,s,l){if(t=t.options,n){n={};for(var u=0;u<s.length;u++)n["$"+s[u]]=!0;for(s=0;s<t.length;s++)u=n.hasOwnProperty("$"+t[s].value),t[s].selected!==u&&(t[s].selected=u),u&&l&&(t[s].defaultSelected=!0)}else{for(s=""+Kt(s),n=null,u=0;u<t.length;u++){if(t[u].value===s){t[u].selected=!0,l&&(t[u].defaultSelected=!0);return}n!==null||t[u].disabled||(n=t[u])}n!==null&&(n.selected=!0)}}function Wd(t,n,s){if(n!=null&&(n=""+Kt(n),n!==t.value&&(t.value=n),s==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=s!=null?""+Kt(s):""}function eh(t,n,s,l){if(n==null){if(l!=null){if(s!=null)throw Error(r(92));if(pe(l)){if(1<l.length)throw Error(r(93));l=l[0]}s=l}s==null&&(s=""),n=s}s=Kt(n),t.defaultValue=s,l=t.textContent,l===s&&l!==""&&l!==null&&(t.value=l),Wo(t)}function ps(t,n){if(n){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=n;return}}t.textContent=n}var J0=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 th(t,n,s){var l=n.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":l?t.setProperty(n,s):typeof s!="number"||s===0||J0.has(n)?n==="float"?t.cssFloat=s:t[n]=(""+s).trim():t[n]=s+"px"}function nh(t,n,s){if(n!=null&&typeof n!="object")throw Error(r(62));if(t=t.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var u in n)l=n[u],n.hasOwnProperty(u)&&s[u]!==l&&th(t,u,l)}else for(var f in n)n.hasOwnProperty(f)&&th(t,f,n[f])}function nu(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 I0=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"]]),W0=/^[\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 Ur(t){return W0.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function _n(){}var au=null;function su(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gs=null,ys=null;function ah(t){var n=fs(t);if(n&&(t=n.stateNode)){var s=t[wt]||null;e:switch(t=n.stateNode,n.type){case"input":if(eu(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Yt(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var l=s[n];if(l!==t&&l.form===t.form){var u=l[wt]||null;if(!u)throw Error(r(90));eu(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<s.length;n++)l=s[n],l.form===t.form&&Jd(l)}break e;case"textarea":Wd(t,s.value,s.defaultValue);break e;case"select":n=s.value,n!=null&&ms(t,!!s.multiple,n,!1)}}}var iu=!1;function sh(t,n,s){if(iu)return t(n,s);iu=!0;try{var l=t(n);return l}finally{if(iu=!1,(gs!==null||ys!==null)&&(jl(),gs&&(n=gs,t=ys,ys=gs=null,ah(n),t)))for(n=0;n<t.length;n++)ah(t[n])}}function vi(t,n){var s=t.stateNode;if(s===null)return null;var l=s[wt]||null;if(l===null)return null;s=l[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":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(r(231,n,typeof s));return s}var wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ru=!1;if(wn)try{var bi={};Object.defineProperty(bi,"passive",{get:function(){ru=!0}}),window.addEventListener("test",bi,bi),window.removeEventListener("test",bi,bi)}catch{ru=!1}var Fn=null,lu=null,Zr=null;function ih(){if(Zr)return Zr;var t,n=lu,s=n.length,l,u="value"in Fn?Fn.value:Fn.textContent,f=u.length;for(t=0;t<s&&n[t]===u[t];t++);var y=s-t;for(l=1;l<=y&&n[s-l]===u[f-l];l++);return Zr=u.slice(t,1<l?1-l:void 0)}function qr(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 Br(){return!0}function rh(){return!1}function jt(t){function n(s,l,u,f,y){this._reactName=s,this._targetInst=u,this.type=l,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(s=t[_],this[_]=s?s(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Br:rh,this.isPropagationStopped=rh,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Br)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Br)},persist:function(){},isPersistent:Br}),n}var ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$r=jt(ka),xi=v({},ka,{view:0,detail:0}),ex=jt(xi),ou,uu,Si,Hr=v({},xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fu,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!==Si&&(Si&&t.type==="mousemove"?(ou=t.screenX-Si.screenX,uu=t.screenY-Si.screenY):uu=ou=0,Si=t),ou)},movementY:function(t){return"movementY"in t?t.movementY:uu}}),lh=jt(Hr),tx=v({},Hr,{dataTransfer:0}),nx=jt(tx),ax=v({},xi,{relatedTarget:0}),cu=jt(ax),sx=v({},ka,{animationName:0,elapsedTime:0,pseudoElement:0}),ix=jt(sx),rx=v({},ka,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),lx=jt(rx),ox=v({},ka,{data:0}),oh=jt(ox),ux={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cx={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"},fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dx(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=fx[t])?!!n[t]:!1}function fu(){return dx}var hx=v({},xi,{key:function(t){if(t.key){var n=ux[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=qr(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?cx[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,charCode:function(t){return t.type==="keypress"?qr(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?qr(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),mx=jt(hx),px=v({},Hr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uh=jt(px),gx=v({},xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),yx=jt(gx),vx=v({},ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),bx=jt(vx),xx=v({},Hr,{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}),Sx=jt(xx),_x=v({},ka,{newState:0,oldState:0}),wx=jt(_x),jx=[9,13,27,32],du=wn&&"CompositionEvent"in window,_i=null;wn&&"documentMode"in document&&(_i=document.documentMode);var Ox=wn&&"TextEvent"in window&&!_i,ch=wn&&(!du||_i&&8<_i&&11>=_i),fh=" ",dh=!1;function hh(t,n){switch(t){case"keyup":return jx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var vs=!1;function Ex(t,n){switch(t){case"compositionend":return mh(n);case"keypress":return n.which!==32?null:(dh=!0,fh);case"textInput":return t=n.data,t===fh&&dh?null:t;default:return null}}function Nx(t,n){if(vs)return t==="compositionend"||!du&&hh(t,n)?(t=ih(),Zr=lu=Fn=null,vs=!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 ch&&n.locale!=="ko"?null:n.data;default:return null}}var zx={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 ph(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!zx[t.type]:n==="textarea"}function gh(t,n,s,l){gs?ys?ys.push(l):ys=[l]:gs=l,n=Rl(n,"onChange"),0<n.length&&(s=new $r("onChange","change",null,s,l),t.push({event:s,listeners:n}))}var wi=null,ji=null;function Tx(t){Ip(t,0)}function Qr(t){var n=yi(t);if(Jd(n))return t}function yh(t,n){if(t==="change")return n}var vh=!1;if(wn){var hu;if(wn){var mu="oninput"in document;if(!mu){var bh=document.createElement("div");bh.setAttribute("oninput","return;"),mu=typeof bh.oninput=="function"}hu=mu}else hu=!1;vh=hu&&(!document.documentMode||9<document.documentMode)}function xh(){wi&&(wi.detachEvent("onpropertychange",Sh),ji=wi=null)}function Sh(t){if(t.propertyName==="value"&&Qr(ji)){var n=[];gh(n,ji,t,su(t)),sh(Tx,n)}}function Ax(t,n,s){t==="focusin"?(xh(),wi=n,ji=s,wi.attachEvent("onpropertychange",Sh)):t==="focusout"&&xh()}function Rx(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Qr(ji)}function Cx(t,n){if(t==="click")return Qr(n)}function Mx(t,n){if(t==="input"||t==="change")return Qr(n)}function Dx(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Lt=typeof Object.is=="function"?Object.is:Dx;function Oi(t,n){if(Lt(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var s=Object.keys(t),l=Object.keys(n);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var u=s[l];if(!Ko.call(n,u)||!Lt(t[u],n[u]))return!1}return!0}function _h(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function wh(t,n){var s=_h(t);t=0;for(var l;s;){if(s.nodeType===3){if(l=t+s.textContent.length,t<=n&&l>=n)return{node:s,offset:n-t};t=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=_h(s)}}function jh(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?jh(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Oh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Lr(t.document);n instanceof t.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)t=n.contentWindow;else break;n=Lr(t.document)}return n}function pu(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 kx=wn&&"documentMode"in document&&11>=document.documentMode,bs=null,gu=null,Ei=null,yu=!1;function Eh(t,n,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;yu||bs==null||bs!==Lr(l)||(l=bs,"selectionStart"in l&&pu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ei&&Oi(Ei,l)||(Ei=l,l=Rl(gu,"onSelect"),0<l.length&&(n=new $r("onSelect","select",null,n,s),t.push({event:n,listeners:l}),n.target=bs)))}function La(t,n){var s={};return s[t.toLowerCase()]=n.toLowerCase(),s["Webkit"+t]="webkit"+n,s["Moz"+t]="moz"+n,s}var xs={animationend:La("Animation","AnimationEnd"),animationiteration:La("Animation","AnimationIteration"),animationstart:La("Animation","AnimationStart"),transitionrun:La("Transition","TransitionRun"),transitionstart:La("Transition","TransitionStart"),transitioncancel:La("Transition","TransitionCancel"),transitionend:La("Transition","TransitionEnd")},vu={},Nh={};wn&&(Nh=document.createElement("div").style,"AnimationEvent"in window||(delete xs.animationend.animation,delete xs.animationiteration.animation,delete xs.animationstart.animation),"TransitionEvent"in window||delete xs.transitionend.transition);function Ua(t){if(vu[t])return vu[t];if(!xs[t])return t;var n=xs[t],s;for(s in n)if(n.hasOwnProperty(s)&&s in Nh)return vu[t]=n[s];return t}var zh=Ua("animationend"),Th=Ua("animationiteration"),Ah=Ua("animationstart"),Lx=Ua("transitionrun"),Ux=Ua("transitionstart"),Zx=Ua("transitioncancel"),Rh=Ua("transitionend"),Ch=new Map,bu="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(" ");bu.push("scrollEnd");function an(t,n){Ch.set(t,n),Da(n,[t])}var Gr=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)},Ft=[],Ss=0,xu=0;function Kr(){for(var t=Ss,n=xu=Ss=0;n<t;){var s=Ft[n];Ft[n++]=null;var l=Ft[n];Ft[n++]=null;var u=Ft[n];Ft[n++]=null;var f=Ft[n];if(Ft[n++]=null,l!==null&&u!==null){var y=l.pending;y===null?u.next=u:(u.next=y.next,y.next=u),l.pending=u}f!==0&&Mh(s,u,f)}}function Yr(t,n,s,l){Ft[Ss++]=t,Ft[Ss++]=n,Ft[Ss++]=s,Ft[Ss++]=l,xu|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Su(t,n,s,l){return Yr(t,n,s,l),Fr(t)}function Za(t,n){return Yr(t,null,null,n),Fr(t)}function Mh(t,n,s){t.lanes|=s;var l=t.alternate;l!==null&&(l.lanes|=s);for(var u=!1,f=t.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),f.tag===22&&(t=f.stateNode,t===null||t._visibility&1||(u=!0)),t=f,f=f.return;return t.tag===3?(f=t.stateNode,u&&n!==null&&(u=31-kt(s),t=f.hiddenUpdates,l=t[u],l===null?t[u]=[n]:l.push(n),n.lane=s|536870912),f):null}function Fr(t){if(50<Vi)throw Vi=0,Ac=null,Error(r(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var _s={};function qx(t,n,s,l){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(t,n,s,l){return new qx(t,n,s,l)}function _u(t){return t=t.prototype,!(!t||!t.isReactComponent)}function jn(t,n){var s=t.alternate;return s===null?(s=Ut(t.tag,n,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=n,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,n=t.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function Dh(t,n){t.flags&=65011714;var s=t.alternate;return s===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=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,n=s.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Vr(t,n,s,l,u,f){var y=0;if(l=t,typeof t=="function")_u(t)&&(y=1);else if(typeof t=="string")y=GS(t,s,ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ie:return t=Ut(31,s,n,u),t.elementType=ie,t.lanes=f,t;case j:return qa(s.children,u,f,n);case z:y=8,u|=24;break;case T:return t=Ut(12,s,n,u|2),t.elementType=T,t.lanes=f,t;case W:return t=Ut(13,s,n,u),t.elementType=W,t.lanes=f,t;case $:return t=Ut(19,s,n,u),t.elementType=$,t.lanes=f,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case G:y=10;break e;case L:y=9;break e;case V:y=11;break e;case R:y=14;break e;case J:y=16,l=null;break e}y=29,s=Error(r(130,t===null?"null":typeof t,"")),l=null}return n=Ut(y,s,n,u),n.elementType=t,n.type=l,n.lanes=f,n}function qa(t,n,s,l){return t=Ut(7,t,l,n),t.lanes=s,t}function wu(t,n,s){return t=Ut(6,t,null,n),t.lanes=s,t}function kh(t){var n=Ut(18,null,null,0);return n.stateNode=t,n}function ju(t,n,s){return n=Ut(4,t.children!==null?t.children:[],t.key,n),n.lanes=s,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Lh=new WeakMap;function Vt(t,n){if(typeof t=="object"&&t!==null){var s=Lh.get(t);return s!==void 0?s:(n={value:t,source:n,stack:kd(n)},Lh.set(t,n),n)}return{value:t,source:n,stack:kd(n)}}var ws=[],js=0,Pr=null,Ni=0,Pt=[],Xt=0,Vn=null,dn=1,hn="";function On(t,n){ws[js++]=Ni,ws[js++]=Pr,Pr=t,Ni=n}function Uh(t,n,s){Pt[Xt++]=dn,Pt[Xt++]=hn,Pt[Xt++]=Vn,Vn=t;var l=dn;t=hn;var u=32-kt(l)-1;l&=~(1<<u),s+=1;var f=32-kt(n)+u;if(30<f){var y=u-u%5;f=(l&(1<<y)-1).toString(32),l>>=y,u-=y,dn=1<<32-kt(n)+u|s<<u|l,hn=f+t}else dn=1<<f|s<<u|l,hn=t}function Ou(t){t.return!==null&&(On(t,1),Uh(t,1,0))}function Eu(t){for(;t===Pr;)Pr=ws[--js],ws[js]=null,Ni=ws[--js],ws[js]=null;for(;t===Vn;)Vn=Pt[--Xt],Pt[Xt]=null,hn=Pt[--Xt],Pt[Xt]=null,dn=Pt[--Xt],Pt[Xt]=null}function Zh(t,n){Pt[Xt++]=dn,Pt[Xt++]=hn,Pt[Xt++]=Vn,dn=n.id,hn=n.overflow,Vn=t}var ht=null,Be=null,Oe=!1,Pn=null,Jt=!1,Nu=Error(r(519));function Xn(t){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zi(Vt(n,t)),Nu}function qh(t){var n=t.stateNode,s=t.type,l=t.memoizedProps;switch(n[dt]=t,n[wt]=l,s){case"dialog":_e("cancel",n),_e("close",n);break;case"iframe":case"object":case"embed":_e("load",n);break;case"video":case"audio":for(s=0;s<Xi.length;s++)_e(Xi[s],n);break;case"source":_e("error",n);break;case"img":case"image":case"link":_e("error",n),_e("load",n);break;case"details":_e("toggle",n);break;case"input":_e("invalid",n),Id(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",n);break;case"textarea":_e("invalid",n),eh(n,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||l.suppressHydrationWarning===!0||ng(n.textContent,s)?(l.popover!=null&&(_e("beforetoggle",n),_e("toggle",n)),l.onScroll!=null&&_e("scroll",n),l.onScrollEnd!=null&&_e("scrollend",n),l.onClick!=null&&(n.onclick=_n),n=!0):n=!1,n||Xn(t,!0)}function Bh(t){for(ht=t.return;ht;)switch(ht.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:ht=ht.return}}function Os(t){if(t!==ht)return!1;if(!Oe)return Bh(t),Oe=!0,!1;var n=t.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||Kc(t.type,t.memoizedProps)),s=!s),s&&Be&&Xn(t),Bh(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Be=fg(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Be=fg(t)}else n===27?(n=Be,ca(t.type)?(t=Xc,Xc=null,Be=t):Be=n):Be=ht?Wt(t.stateNode.nextSibling):null;return!0}function Ba(){Be=ht=null,Oe=!1}function zu(){var t=Pn;return t!==null&&(zt===null?zt=t:zt.push.apply(zt,t),Pn=null),t}function zi(t){Pn===null?Pn=[t]:Pn.push(t)}var Tu=E(null),$a=null,En=null;function Jn(t,n,s){X(Tu,n._currentValue),n._currentValue=s}function Nn(t){t._currentValue=Tu.current,Z(Tu)}function Au(t,n,s){for(;t!==null;){var l=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),t===s)break;t=t.return}}function Ru(t,n,s,l){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var f=u.dependencies;if(f!==null){var y=u.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=u;for(var O=0;O<n.length;O++)if(_.context===n[O]){f.lanes|=s,_=f.alternate,_!==null&&(_.lanes|=s),Au(f.return,s,t),l||(y=null);break e}f=_.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=s,f=y.alternate,f!==null&&(f.lanes|=s),Au(y,s,t),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===t){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Es(t,n,s,l){t=null;for(var u=n,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var _=u.type;Lt(u.pendingProps.value,y.value)||(t!==null?t.push(_):t=[_])}}else if(u===Ee.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(tr):t=[tr])}u=u.return}t!==null&&Ru(n,t,s,l),n.flags|=262144}function Xr(t){for(t=t.firstContext;t!==null;){if(!Lt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ha(t){$a=t,En=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function mt(t){return $h($a,t)}function Jr(t,n){return $a===null&&Ha(t),$h(t,n)}function $h(t,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},En===null){if(t===null)throw Error(r(308));En=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else En=En.next=n;return s}var Bx=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(s,l){t.push(l)}};this.abort=function(){n.aborted=!0,t.forEach(function(s){return s()})}},$x=e.unstable_scheduleCallback,Hx=e.unstable_NormalPriority,et={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new Bx,data:new Map,refCount:0}}function Ti(t){t.refCount--,t.refCount===0&&$x(Hx,function(){t.controller.abort()})}var Ai=null,Mu=0,Ns=0,zs=null;function Qx(t,n){if(Ai===null){var s=Ai=[];Mu=0,Ns=Lc(),zs={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Mu++,n.then(Hh,Hh),n}function Hh(){if(--Mu===0&&Ai!==null){zs!==null&&(zs.status="fulfilled");var t=Ai;Ai=null,Ns=0,zs=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Gx(t,n){var s=[],l={status:"pending",value:null,reason:null,then:function(u){s.push(u)}};return t.then(function(){l.status="fulfilled",l.value=n;for(var u=0;u<s.length;u++)(0,s[u])(n)},function(u){for(l.status="rejected",l.reason=u,u=0;u<s.length;u++)(0,s[u])(void 0)}),l}var Qh=U.S;U.S=function(t,n){Ep=Mt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Qx(t,n),Qh!==null&&Qh(t,n)};var Qa=E(null);function Du(){var t=Qa.current;return t!==null?t:Ue.pooledCache}function Ir(t,n){n===null?X(Qa,Qa.current):X(Qa,n.pool)}function Gh(){var t=Du();return t===null?null:{parent:et._currentValue,pool:t}}var Ts=Error(r(460)),ku=Error(r(474)),Wr=Error(r(542)),el={then:function(){}};function Kh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Yh(t,n,s){switch(s=t[s],s===void 0?t.push(n):s!==n&&(n.then(_n,_n),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Vh(t),t;default:if(typeof n.status=="string")n.then(_n,_n);else{if(t=Ue,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=n,t.status="pending",t.then(function(l){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=l}},function(l){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Vh(t),t}throw Ka=n,Ts}}function Ga(t){try{var n=t._init;return n(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ka=s,Ts):s}}var Ka=null;function Fh(){if(Ka===null)throw Error(r(459));var t=Ka;return Ka=null,t}function Vh(t){if(t===Ts||t===Wr)throw Error(r(483))}var As=null,Ri=0;function tl(t){var n=Ri;return Ri+=1,As===null&&(As=[]),Yh(As,t,n)}function Ci(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function nl(t,n){throw n.$$typeof===x?Error(r(525)):(t=Object.prototype.toString.call(n),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Ph(t){function n(A,N){if(t){var M=A.deletions;M===null?(A.deletions=[N],A.flags|=16):M.push(N)}}function s(A,N){if(!t)return null;for(;N!==null;)n(A,N),N=N.sibling;return null}function l(A){for(var N=new Map;A!==null;)A.key!==null?N.set(A.key,A):N.set(A.index,A),A=A.sibling;return N}function u(A,N){return A=jn(A,N),A.index=0,A.sibling=null,A}function f(A,N,M){return A.index=M,t?(M=A.alternate,M!==null?(M=M.index,M<N?(A.flags|=67108866,N):M):(A.flags|=67108866,N)):(A.flags|=1048576,N)}function y(A){return t&&A.alternate===null&&(A.flags|=67108866),A}function _(A,N,M,K){return N===null||N.tag!==6?(N=wu(M,A.mode,K),N.return=A,N):(N=u(N,M),N.return=A,N)}function O(A,N,M,K){var ce=M.type;return ce===j?H(A,N,M.props.children,K,M.key):N!==null&&(N.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===J&&Ga(ce)===N.type)?(N=u(N,M.props),Ci(N,M),N.return=A,N):(N=Vr(M.type,M.key,M.props,null,A.mode,K),Ci(N,M),N.return=A,N)}function D(A,N,M,K){return N===null||N.tag!==4||N.stateNode.containerInfo!==M.containerInfo||N.stateNode.implementation!==M.implementation?(N=ju(M,A.mode,K),N.return=A,N):(N=u(N,M.children||[]),N.return=A,N)}function H(A,N,M,K,ce){return N===null||N.tag!==7?(N=qa(M,A.mode,K,ce),N.return=A,N):(N=u(N,M),N.return=A,N)}function F(A,N,M){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=wu(""+N,A.mode,M),N.return=A,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case S:return M=Vr(N.type,N.key,N.props,null,A.mode,M),Ci(M,N),M.return=A,M;case w:return N=ju(N,A.mode,M),N.return=A,N;case J:return N=Ga(N),F(A,N,M)}if(pe(N)||I(N))return N=qa(N,A.mode,M,null),N.return=A,N;if(typeof N.then=="function")return F(A,tl(N),M);if(N.$$typeof===G)return F(A,Jr(A,N),M);nl(A,N)}return null}function k(A,N,M,K){var ce=N!==null?N.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ce!==null?null:_(A,N,""+M,K);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case S:return M.key===ce?O(A,N,M,K):null;case w:return M.key===ce?D(A,N,M,K):null;case J:return M=Ga(M),k(A,N,M,K)}if(pe(M)||I(M))return ce!==null?null:H(A,N,M,K,null);if(typeof M.then=="function")return k(A,N,tl(M),K);if(M.$$typeof===G)return k(A,N,Jr(A,M),K);nl(A,M)}return null}function B(A,N,M,K,ce){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return A=A.get(M)||null,_(N,A,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case S:return A=A.get(K.key===null?M:K.key)||null,O(N,A,K,ce);case w:return A=A.get(K.key===null?M:K.key)||null,D(N,A,K,ce);case J:return K=Ga(K),B(A,N,M,K,ce)}if(pe(K)||I(K))return A=A.get(M)||null,H(N,A,K,ce,null);if(typeof K.then=="function")return B(A,N,M,tl(K),ce);if(K.$$typeof===G)return B(A,N,M,Jr(N,K),ce);nl(N,K)}return null}function se(A,N,M,K){for(var ce=null,Ne=null,le=N,be=N=0,je=null;le!==null&&be<M.length;be++){le.index>be?(je=le,le=null):je=le.sibling;var ze=k(A,le,M[be],K);if(ze===null){le===null&&(le=je);break}t&&le&&ze.alternate===null&&n(A,le),N=f(ze,N,be),Ne===null?ce=ze:Ne.sibling=ze,Ne=ze,le=je}if(be===M.length)return s(A,le),Oe&&On(A,be),ce;if(le===null){for(;be<M.length;be++)le=F(A,M[be],K),le!==null&&(N=f(le,N,be),Ne===null?ce=le:Ne.sibling=le,Ne=le);return Oe&&On(A,be),ce}for(le=l(le);be<M.length;be++)je=B(le,A,be,M[be],K),je!==null&&(t&&je.alternate!==null&&le.delete(je.key===null?be:je.key),N=f(je,N,be),Ne===null?ce=je:Ne.sibling=je,Ne=je);return t&&le.forEach(function(pa){return n(A,pa)}),Oe&&On(A,be),ce}function de(A,N,M,K){if(M==null)throw Error(r(151));for(var ce=null,Ne=null,le=N,be=N=0,je=null,ze=M.next();le!==null&&!ze.done;be++,ze=M.next()){le.index>be?(je=le,le=null):je=le.sibling;var pa=k(A,le,ze.value,K);if(pa===null){le===null&&(le=je);break}t&&le&&pa.alternate===null&&n(A,le),N=f(pa,N,be),Ne===null?ce=pa:Ne.sibling=pa,Ne=pa,le=je}if(ze.done)return s(A,le),Oe&&On(A,be),ce;if(le===null){for(;!ze.done;be++,ze=M.next())ze=F(A,ze.value,K),ze!==null&&(N=f(ze,N,be),Ne===null?ce=ze:Ne.sibling=ze,Ne=ze);return Oe&&On(A,be),ce}for(le=l(le);!ze.done;be++,ze=M.next())ze=B(le,A,be,ze.value,K),ze!==null&&(t&&ze.alternate!==null&&le.delete(ze.key===null?be:ze.key),N=f(ze,N,be),Ne===null?ce=ze:Ne.sibling=ze,Ne=ze);return t&&le.forEach(function(t_){return n(A,t_)}),Oe&&On(A,be),ce}function Le(A,N,M,K){if(typeof M=="object"&&M!==null&&M.type===j&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case S:e:{for(var ce=M.key;N!==null;){if(N.key===ce){if(ce=M.type,ce===j){if(N.tag===7){s(A,N.sibling),K=u(N,M.props.children),K.return=A,A=K;break e}}else if(N.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===J&&Ga(ce)===N.type){s(A,N.sibling),K=u(N,M.props),Ci(K,M),K.return=A,A=K;break e}s(A,N);break}else n(A,N);N=N.sibling}M.type===j?(K=qa(M.props.children,A.mode,K,M.key),K.return=A,A=K):(K=Vr(M.type,M.key,M.props,null,A.mode,K),Ci(K,M),K.return=A,A=K)}return y(A);case w:e:{for(ce=M.key;N!==null;){if(N.key===ce)if(N.tag===4&&N.stateNode.containerInfo===M.containerInfo&&N.stateNode.implementation===M.implementation){s(A,N.sibling),K=u(N,M.children||[]),K.return=A,A=K;break e}else{s(A,N);break}else n(A,N);N=N.sibling}K=ju(M,A.mode,K),K.return=A,A=K}return y(A);case J:return M=Ga(M),Le(A,N,M,K)}if(pe(M))return se(A,N,M,K);if(I(M)){if(ce=I(M),typeof ce!="function")throw Error(r(150));return M=ce.call(M),de(A,N,M,K)}if(typeof M.then=="function")return Le(A,N,tl(M),K);if(M.$$typeof===G)return Le(A,N,Jr(A,M),K);nl(A,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,N!==null&&N.tag===6?(s(A,N.sibling),K=u(N,M),K.return=A,A=K):(s(A,N),K=wu(M,A.mode,K),K.return=A,A=K),y(A)):s(A,N)}return function(A,N,M,K){try{Ri=0;var ce=Le(A,N,M,K);return As=null,ce}catch(le){if(le===Ts||le===Wr)throw le;var Ne=Ut(29,le,null,A.mode);return Ne.lanes=K,Ne.return=A,Ne}}}var Ya=Ph(!0),Xh=Ph(!1),In=!1;function Lu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uu(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 Wn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ea(t,n,s){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Te&2)!==0){var u=l.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),l.pending=n,n=Fr(t),Mh(t,null,s),n}return Yr(t,l,n,s),Fr(t)}function Mi(t,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var l=n.lanes;l&=t.pendingLanes,s|=l,n.lanes=s,$d(t,s)}}function Zu(t,n){var s=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var u=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?u=f=y:f=f.next=y,s=s.next}while(s!==null);f===null?u=f=n:f=f.next=n}else u=f=n;s={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=n:t.next=n,s.lastBaseUpdate=n}var qu=!1;function Di(){if(qu){var t=zs;if(t!==null)throw t}}function ki(t,n,s,l){qu=!1;var u=t.updateQueue;In=!1;var f=u.firstBaseUpdate,y=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var O=_,D=O.next;O.next=null,y===null?f=D:y.next=D,y=O;var H=t.alternate;H!==null&&(H=H.updateQueue,_=H.lastBaseUpdate,_!==y&&(_===null?H.firstBaseUpdate=D:_.next=D,H.lastBaseUpdate=O))}if(f!==null){var F=u.baseState;y=0,H=D=O=null,_=f;do{var k=_.lane&-536870913,B=k!==_.lane;if(B?(we&k)===k:(l&k)===k){k!==0&&k===Ns&&(qu=!0),H!==null&&(H=H.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var se=t,de=_;k=n;var Le=s;switch(de.tag){case 1:if(se=de.payload,typeof se=="function"){F=se.call(Le,F,k);break e}F=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=de.payload,k=typeof se=="function"?se.call(Le,F,k):se,k==null)break e;F=v({},F,k);break e;case 2:In=!0}}k=_.callback,k!==null&&(t.flags|=64,B&&(t.flags|=8192),B=u.callbacks,B===null?u.callbacks=[k]:B.push(k))}else B={lane:k,tag:_.tag,payload:_.payload,callback:_.callback,next:null},H===null?(D=H=B,O=F):H=H.next=B,y|=k;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;B=_,_=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);H===null&&(O=F),u.baseState=O,u.firstBaseUpdate=D,u.lastBaseUpdate=H,f===null&&(u.shared.lanes=0),ia|=y,t.lanes=y,t.memoizedState=F}}function Jh(t,n){if(typeof t!="function")throw Error(r(191,t));t.call(n)}function Ih(t,n){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Jh(s[t],n)}var Rs=E(null),al=E(0);function Wh(t,n){t=Ln,X(al,t),X(Rs,n),Ln=t|n.baseLanes}function Bu(){X(al,Ln),X(Rs,Rs.current)}function $u(){Ln=al.current,Z(Rs),Z(al)}var Zt=E(null),It=null;function ta(t){var n=t.alternate;X(Xe,Xe.current&1),X(Zt,t),It===null&&(n===null||Rs.current!==null||n.memoizedState!==null)&&(It=t)}function Hu(t){X(Xe,Xe.current),X(Zt,t),It===null&&(It=t)}function em(t){t.tag===22?(X(Xe,Xe.current),X(Zt,t),It===null&&(It=t)):na()}function na(){X(Xe,Xe.current),X(Zt,Zt.current)}function qt(t){Z(Zt),It===t&&(It=null),Z(Xe)}var Xe=E(0);function sl(t){for(var n=t;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Vc(s)||Pc(s)))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 zn=0,ve=null,De=null,tt=null,il=!1,Cs=!1,Fa=!1,rl=0,Li=0,Ms=null,Kx=0;function Ve(){throw Error(r(321))}function Qu(t,n){if(n===null)return!1;for(var s=0;s<n.length&&s<t.length;s++)if(!Lt(t[s],n[s]))return!1;return!0}function Gu(t,n,s,l,u,f){return zn=f,ve=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=t===null||t.memoizedState===null?Um:ic,Fa=!1,f=s(l,u),Fa=!1,Cs&&(f=nm(n,s,l,u)),tm(t),f}function tm(t){U.H=qi;var n=De!==null&&De.next!==null;if(zn=0,tt=De=ve=null,il=!1,Li=0,Ms=null,n)throw Error(r(300));t===null||nt||(t=t.dependencies,t!==null&&Xr(t)&&(nt=!0))}function nm(t,n,s,l){ve=t;var u=0;do{if(Cs&&(Ms=null),Li=0,Cs=!1,25<=u)throw Error(r(301));if(u+=1,tt=De=null,t.updateQueue!=null){var f=t.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=Zm,f=n(s,l)}while(Cs);return f}function Yx(){var t=U.H,n=t.useState()[0];return n=typeof n.then=="function"?Ui(n):n,t=t.useState()[0],(De!==null?De.memoizedState:null)!==t&&(ve.flags|=1024),n}function Ku(){var t=rl!==0;return rl=0,t}function Yu(t,n,s){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~s}function Fu(t){if(il){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}il=!1}zn=0,tt=De=ve=null,Cs=!1,Li=rl=0,Ms=null}function bt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?ve.memoizedState=tt=t:tt=tt.next=t,tt}function Je(){if(De===null){var t=ve.alternate;t=t!==null?t.memoizedState:null}else t=De.next;var n=tt===null?ve.memoizedState:tt.next;if(n!==null)tt=n,De=t;else{if(t===null)throw ve.alternate===null?Error(r(467)):Error(r(310));De=t,t={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},tt===null?ve.memoizedState=tt=t:tt=tt.next=t}return tt}function ll(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ui(t){var n=Li;return Li+=1,Ms===null&&(Ms=[]),t=Yh(Ms,t,n),n=ve,(tt===null?n.memoizedState:tt.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Um:ic),t}function ol(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ui(t);if(t.$$typeof===G)return mt(t)}throw Error(r(438,String(t)))}function Vu(t){var n=null,s=ve.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var l=ve.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),s===null&&(s=ll(),ve.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0)for(s=n.data[n.index]=Array(t),l=0;l<t;l++)s[l]=re;return n.index++,s}function Tn(t,n){return typeof n=="function"?n(t):n}function ul(t){var n=Je();return Pu(n,De,t)}function Pu(t,n,s){var l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=s;var u=t.baseQueue,f=l.pending;if(f!==null){if(u!==null){var y=u.next;u.next=f.next,f.next=y}n.baseQueue=u=f,l.pending=null}if(f=t.baseState,u===null)t.memoizedState=f;else{n=u.next;var _=y=null,O=null,D=n,H=!1;do{var F=D.lane&-536870913;if(F!==D.lane?(we&F)===F:(zn&F)===F){var k=D.revertLane;if(k===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),F===Ns&&(H=!0);else if((zn&k)===k){D=D.next,k===Ns&&(H=!0);continue}else F={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},O===null?(_=O=F,y=f):O=O.next=F,ve.lanes|=k,ia|=k;F=D.action,Fa&&s(f,F),f=D.hasEagerState?D.eagerState:s(f,F)}else k={lane:F,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},O===null?(_=O=k,y=f):O=O.next=k,ve.lanes|=F,ia|=F;D=D.next}while(D!==null&&D!==n);if(O===null?y=f:O.next=_,!Lt(f,t.memoizedState)&&(nt=!0,H&&(s=zs,s!==null)))throw s;t.memoizedState=f,t.baseState=y,t.baseQueue=O,l.lastRenderedState=f}return u===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Xu(t){var n=Je(),s=n.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var l=s.dispatch,u=s.pending,f=n.memoizedState;if(u!==null){s.pending=null;var y=u=u.next;do f=t(f,y.action),y=y.next;while(y!==u);Lt(f,n.memoizedState)||(nt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,l]}function am(t,n,s){var l=ve,u=Je(),f=Oe;if(f){if(s===void 0)throw Error(r(407));s=s()}else s=n();var y=!Lt((De||u).memoizedState,s);if(y&&(u.memoizedState=s,nt=!0),u=u.queue,Wu(rm.bind(null,l,u,t),[t]),u.getSnapshot!==n||y||tt!==null&&tt.memoizedState.tag&1){if(l.flags|=2048,Ds(9,{destroy:void 0},im.bind(null,l,u,s,n),null),Ue===null)throw Error(r(349));f||(zn&127)!==0||sm(l,n,s)}return s}function sm(t,n,s){t.flags|=16384,t={getSnapshot:n,value:s},n=ve.updateQueue,n===null?(n=ll(),ve.updateQueue=n,n.stores=[t]):(s=n.stores,s===null?n.stores=[t]:s.push(t))}function im(t,n,s,l){n.value=s,n.getSnapshot=l,lm(n)&&om(t)}function rm(t,n,s){return s(function(){lm(n)&&om(t)})}function lm(t){var n=t.getSnapshot;t=t.value;try{var s=n();return!Lt(t,s)}catch{return!0}}function om(t){var n=Za(t,2);n!==null&&Tt(n,t,2)}function Ju(t){var n=bt();if(typeof t=="function"){var s=t;if(t=s(),Fa){Kn(!0);try{s()}finally{Kn(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:t},n}function um(t,n,s,l){return t.baseState=s,Pu(t,De,typeof l=="function"?l:Tn)}function Fx(t,n,s,l,u){if(dl(t))throw Error(r(485));if(t=n.action,t!==null){var f={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};U.T!==null?s(!0):f.isTransition=!1,l(f),s=n.pending,s===null?(f.next=n.pending=f,cm(n,f)):(f.next=s.next,n.pending=s.next=f)}}function cm(t,n){var s=n.action,l=n.payload,u=t.state;if(n.isTransition){var f=U.T,y={};U.T=y;try{var _=s(u,l),O=U.S;O!==null&&O(y,_),fm(t,n,_)}catch(D){Iu(t,n,D)}finally{f!==null&&y.types!==null&&(f.types=y.types),U.T=f}}else try{f=s(u,l),fm(t,n,f)}catch(D){Iu(t,n,D)}}function fm(t,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){dm(t,n,l)},function(l){return Iu(t,n,l)}):dm(t,n,s)}function dm(t,n,s){n.status="fulfilled",n.value=s,hm(n),t.state=s,n=t.pending,n!==null&&(s=n.next,s===n?t.pending=null:(s=s.next,n.next=s,cm(t,s)))}function Iu(t,n,s){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=s,hm(n),n=n.next;while(n!==l)}t.action=null}function hm(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function mm(t,n){return n}function pm(t,n){if(Oe){var s=Ue.formState;if(s!==null){e:{var l=ve;if(Oe){if(Be){t:{for(var u=Be,f=Jt;u.nodeType!==8;){if(!f){u=null;break t}if(u=Wt(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Be=Wt(u.nextSibling),l=u.data==="F!";break e}}Xn(l)}l=!1}l&&(n=s[0])}}return s=bt(),s.memoizedState=s.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mm,lastRenderedState:n},s.queue=l,s=Dm.bind(null,ve,l),l.dispatch=s,l=Ju(!1),f=sc.bind(null,ve,!1,l.queue),l=bt(),u={state:n,dispatch:null,action:t,pending:null},l.queue=u,s=Fx.bind(null,ve,u,f,s),u.dispatch=s,l.memoizedState=t,[n,s,!1]}function gm(t){var n=Je();return ym(n,De,t)}function ym(t,n,s){if(n=Pu(t,n,mm)[0],t=ul(Tn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Ui(n)}catch(y){throw y===Ts?Wr:y}else l=n;n=Je();var u=n.queue,f=u.dispatch;return s!==n.memoizedState&&(ve.flags|=2048,Ds(9,{destroy:void 0},Vx.bind(null,u,s),null)),[l,f,t]}function Vx(t,n){t.action=n}function vm(t){var n=Je(),s=De;if(s!==null)return ym(n,s,t);Je(),n=n.memoizedState,s=Je();var l=s.queue.dispatch;return s.memoizedState=t,[n,l,!1]}function Ds(t,n,s,l){return t={tag:t,create:s,deps:l,inst:n,next:null},n=ve.updateQueue,n===null&&(n=ll(),ve.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=t.next=t:(l=s.next,s.next=t,t.next=l,n.lastEffect=t),t}function bm(){return Je().memoizedState}function cl(t,n,s,l){var u=bt();ve.flags|=t,u.memoizedState=Ds(1|n,{destroy:void 0},s,l===void 0?null:l)}function fl(t,n,s,l){var u=Je();l=l===void 0?null:l;var f=u.memoizedState.inst;De!==null&&l!==null&&Qu(l,De.memoizedState.deps)?u.memoizedState=Ds(n,f,s,l):(ve.flags|=t,u.memoizedState=Ds(1|n,f,s,l))}function xm(t,n){cl(8390656,8,t,n)}function Wu(t,n){fl(2048,8,t,n)}function Px(t){ve.flags|=4;var n=ve.updateQueue;if(n===null)n=ll(),ve.updateQueue=n,n.events=[t];else{var s=n.events;s===null?n.events=[t]:s.push(t)}}function Sm(t){var n=Je().memoizedState;return Px({ref:n,nextImpl:t}),function(){if((Te&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function _m(t,n){return fl(4,2,t,n)}function wm(t,n){return fl(4,4,t,n)}function jm(t,n){if(typeof n=="function"){t=t();var s=n(t);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Om(t,n,s){s=s!=null?s.concat([t]):null,fl(4,4,jm.bind(null,n,t),s)}function ec(){}function Em(t,n){var s=Je();n=n===void 0?null:n;var l=s.memoizedState;return n!==null&&Qu(n,l[1])?l[0]:(s.memoizedState=[t,n],t)}function Nm(t,n){var s=Je();n=n===void 0?null:n;var l=s.memoizedState;if(n!==null&&Qu(n,l[1]))return l[0];if(l=t(),Fa){Kn(!0);try{t()}finally{Kn(!1)}}return s.memoizedState=[l,n],l}function tc(t,n,s){return s===void 0||(zn&1073741824)!==0&&(we&261930)===0?t.memoizedState=n:(t.memoizedState=s,t=zp(),ve.lanes|=t,ia|=t,s)}function zm(t,n,s,l){return Lt(s,n)?s:Rs.current!==null?(t=tc(t,s,l),Lt(t,n)||(nt=!0),t):(zn&42)===0||(zn&1073741824)!==0&&(we&261930)===0?(nt=!0,t.memoizedState=s):(t=zp(),ve.lanes|=t,ia|=t,n)}function Tm(t,n,s,l,u){var f=C.p;C.p=f!==0&&8>f?f:8;var y=U.T,_={};U.T=_,sc(t,!1,n,s);try{var O=u(),D=U.S;if(D!==null&&D(_,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var H=Gx(O,l);Zi(t,n,H,Ht(t))}else Zi(t,n,l,Ht(t))}catch(F){Zi(t,n,{then:function(){},status:"rejected",reason:F},Ht())}finally{C.p=f,y!==null&&_.types!==null&&(y.types=_.types),U.T=y}}function Xx(){}function nc(t,n,s,l){if(t.tag!==5)throw Error(r(476));var u=Am(t).queue;Tm(t,u,n,q,s===null?Xx:function(){return Rm(t),s(l)})}function Am(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:q},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:s},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Rm(t){var n=Am(t);n.next===null&&(n=t.alternate.memoizedState),Zi(t,n.next.queue,{},Ht())}function ac(){return mt(tr)}function Cm(){return Je().memoizedState}function Mm(){return Je().memoizedState}function Jx(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var s=Ht();t=Wn(s);var l=ea(n,t,s);l!==null&&(Tt(l,n,s),Mi(l,n,s)),n={cache:Cu()},t.payload=n;return}n=n.return}}function Ix(t,n,s){var l=Ht();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},dl(t)?km(n,s):(s=Su(t,n,s,l),s!==null&&(Tt(s,t,l),Lm(s,n,l)))}function Dm(t,n,s){var l=Ht();Zi(t,n,s,l)}function Zi(t,n,s,l){var u={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(dl(t))km(n,u);else{var f=t.alternate;if(t.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,_=f(y,s);if(u.hasEagerState=!0,u.eagerState=_,Lt(_,y))return Yr(t,n,u,0),Ue===null&&Kr(),!1}catch{}if(s=Su(t,n,u,l),s!==null)return Tt(s,t,l),Lm(s,n,l),!0}return!1}function sc(t,n,s,l){if(l={lane:2,revertLane:Lc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},dl(t)){if(n)throw Error(r(479))}else n=Su(t,s,l,2),n!==null&&Tt(n,t,2)}function dl(t){var n=t.alternate;return t===ve||n!==null&&n===ve}function km(t,n){Cs=il=!0;var s=t.pending;s===null?n.next=n:(n.next=s.next,s.next=n),t.pending=n}function Lm(t,n,s){if((s&4194048)!==0){var l=n.lanes;l&=t.pendingLanes,s|=l,n.lanes=s,$d(t,s)}}var qi={readContext:mt,use:ol,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve};qi.useEffectEvent=Ve;var Um={readContext:mt,use:ol,useCallback:function(t,n){return bt().memoizedState=[t,n===void 0?null:n],t},useContext:mt,useEffect:xm,useImperativeHandle:function(t,n,s){s=s!=null?s.concat([t]):null,cl(4194308,4,jm.bind(null,n,t),s)},useLayoutEffect:function(t,n){return cl(4194308,4,t,n)},useInsertionEffect:function(t,n){cl(4,2,t,n)},useMemo:function(t,n){var s=bt();n=n===void 0?null:n;var l=t();if(Fa){Kn(!0);try{t()}finally{Kn(!1)}}return s.memoizedState=[l,n],l},useReducer:function(t,n,s){var l=bt();if(s!==void 0){var u=s(n);if(Fa){Kn(!0);try{s(n)}finally{Kn(!1)}}}else u=n;return l.memoizedState=l.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},l.queue=t,t=t.dispatch=Ix.bind(null,ve,t),[l.memoizedState,t]},useRef:function(t){var n=bt();return t={current:t},n.memoizedState=t},useState:function(t){t=Ju(t);var n=t.queue,s=Dm.bind(null,ve,n);return n.dispatch=s,[t.memoizedState,s]},useDebugValue:ec,useDeferredValue:function(t,n){var s=bt();return tc(s,t,n)},useTransition:function(){var t=Ju(!1);return t=Tm.bind(null,ve,t.queue,!0,!1),bt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,s){var l=ve,u=bt();if(Oe){if(s===void 0)throw Error(r(407));s=s()}else{if(s=n(),Ue===null)throw Error(r(349));(we&127)!==0||sm(l,n,s)}u.memoizedState=s;var f={value:s,getSnapshot:n};return u.queue=f,xm(rm.bind(null,l,f,t),[t]),l.flags|=2048,Ds(9,{destroy:void 0},im.bind(null,l,f,s,n),null),s},useId:function(){var t=bt(),n=Ue.identifierPrefix;if(Oe){var s=hn,l=dn;s=(l&~(1<<32-kt(l)-1)).toString(32)+s,n="_"+n+"R_"+s,s=rl++,0<s&&(n+="H"+s.toString(32)),n+="_"}else s=Kx++,n="_"+n+"r_"+s.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:ac,useFormState:pm,useActionState:pm,useOptimistic:function(t){var n=bt();n.memoizedState=n.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=sc.bind(null,ve,!0,s),s.dispatch=n,[t,n]},useMemoCache:Vu,useCacheRefresh:function(){return bt().memoizedState=Jx.bind(null,ve)},useEffectEvent:function(t){var n=bt(),s={impl:t};return n.memoizedState=s,function(){if((Te&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},ic={readContext:mt,use:ol,useCallback:Em,useContext:mt,useEffect:Wu,useImperativeHandle:Om,useInsertionEffect:_m,useLayoutEffect:wm,useMemo:Nm,useReducer:ul,useRef:bm,useState:function(){return ul(Tn)},useDebugValue:ec,useDeferredValue:function(t,n){var s=Je();return zm(s,De.memoizedState,t,n)},useTransition:function(){var t=ul(Tn)[0],n=Je().memoizedState;return[typeof t=="boolean"?t:Ui(t),n]},useSyncExternalStore:am,useId:Cm,useHostTransitionStatus:ac,useFormState:gm,useActionState:gm,useOptimistic:function(t,n){var s=Je();return um(s,De,t,n)},useMemoCache:Vu,useCacheRefresh:Mm};ic.useEffectEvent=Sm;var Zm={readContext:mt,use:ol,useCallback:Em,useContext:mt,useEffect:Wu,useImperativeHandle:Om,useInsertionEffect:_m,useLayoutEffect:wm,useMemo:Nm,useReducer:Xu,useRef:bm,useState:function(){return Xu(Tn)},useDebugValue:ec,useDeferredValue:function(t,n){var s=Je();return De===null?tc(s,t,n):zm(s,De.memoizedState,t,n)},useTransition:function(){var t=Xu(Tn)[0],n=Je().memoizedState;return[typeof t=="boolean"?t:Ui(t),n]},useSyncExternalStore:am,useId:Cm,useHostTransitionStatus:ac,useFormState:vm,useActionState:vm,useOptimistic:function(t,n){var s=Je();return De!==null?um(s,De,t,n):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:Vu,useCacheRefresh:Mm};Zm.useEffectEvent=Sm;function rc(t,n,s,l){n=t.memoizedState,s=s(l,n),s=s==null?n:v({},n,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var lc={enqueueSetState:function(t,n,s){t=t._reactInternals;var l=Ht(),u=Wn(l);u.payload=n,s!=null&&(u.callback=s),n=ea(t,u,l),n!==null&&(Tt(n,t,l),Mi(n,t,l))},enqueueReplaceState:function(t,n,s){t=t._reactInternals;var l=Ht(),u=Wn(l);u.tag=1,u.payload=n,s!=null&&(u.callback=s),n=ea(t,u,l),n!==null&&(Tt(n,t,l),Mi(n,t,l))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var s=Ht(),l=Wn(s);l.tag=2,n!=null&&(l.callback=n),n=ea(t,l,s),n!==null&&(Tt(n,t,s),Mi(n,t,s))}};function qm(t,n,s,l,u,f,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,f,y):n.prototype&&n.prototype.isPureReactComponent?!Oi(s,l)||!Oi(u,f):!0}function Bm(t,n,s,l){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,l),n.state!==t&&lc.enqueueReplaceState(n,n.state,null)}function Va(t,n){var s=n;if("ref"in n){s={};for(var l in n)l!=="ref"&&(s[l]=n[l])}if(t=t.defaultProps){s===n&&(s=v({},s));for(var u in t)s[u]===void 0&&(s[u]=t[u])}return s}function $m(t){Gr(t)}function Hm(t){console.error(t)}function Qm(t){Gr(t)}function hl(t,n){try{var s=t.onUncaughtError;s(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Gm(t,n,s){try{var l=t.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function oc(t,n,s){return s=Wn(s),s.tag=3,s.payload={element:null},s.callback=function(){hl(t,n)},s}function Km(t){return t=Wn(t),t.tag=3,t}function Ym(t,n,s,l){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var f=l.value;t.payload=function(){return u(f)},t.callback=function(){Gm(n,s,l)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){Gm(n,s,l),typeof u!="function"&&(ra===null?ra=new Set([this]):ra.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function Wx(t,n,s,l,u){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=s.alternate,n!==null&&Es(n,s,u,!0),s=Zt.current,s!==null){switch(s.tag){case 31:case 13:return It===null?Ol():s.alternate===null&&Pe===0&&(Pe=3),s.flags&=-257,s.flags|=65536,s.lanes=u,l===el?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([l]):n.add(l),Mc(t,l,u)),!1;case 22:return s.flags|=65536,l===el?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([l]):s.add(l)),Mc(t,l,u)),!1}throw Error(r(435,s.tag))}return Mc(t,l,u),Ol(),!1}if(Oe)return n=Zt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==Nu&&(t=Error(r(422),{cause:l}),zi(Vt(t,s)))):(l!==Nu&&(n=Error(r(423),{cause:l}),zi(Vt(n,s))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,l=Vt(l,s),u=oc(t.stateNode,l,u),Zu(t,u),Pe!==4&&(Pe=2)),!1;var f=Error(r(520),{cause:l});if(f=Vt(f,s),Fi===null?Fi=[f]:Fi.push(f),Pe!==4&&(Pe=2),n===null)return!0;l=Vt(l,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,t=u&-u,s.lanes|=t,t=oc(s.stateNode,l,t),Zu(s,t),!1;case 1:if(n=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ra===null||!ra.has(f))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Km(u),Ym(u,t,s,l),Zu(s,u),!1}s=s.return}while(s!==null);return!1}var uc=Error(r(461)),nt=!1;function pt(t,n,s,l){n.child=t===null?Xh(n,null,s,l):Ya(n,t.child,s,l)}function Fm(t,n,s,l,u){s=s.render;var f=n.ref;if("ref"in l){var y={};for(var _ in l)_!=="ref"&&(y[_]=l[_])}else y=l;return Ha(n),l=Gu(t,n,s,y,f,u),_=Ku(),t!==null&&!nt?(Yu(t,n,u),An(t,n,u)):(Oe&&_&&Ou(n),n.flags|=1,pt(t,n,l,u),n.child)}function Vm(t,n,s,l,u){if(t===null){var f=s.type;return typeof f=="function"&&!_u(f)&&f.defaultProps===void 0&&s.compare===null?(n.tag=15,n.type=f,Pm(t,n,f,l,u)):(t=Vr(s.type,null,l,n,n.mode,u),t.ref=n.ref,t.return=n,n.child=t)}if(f=t.child,!yc(t,u)){var y=f.memoizedProps;if(s=s.compare,s=s!==null?s:Oi,s(y,l)&&t.ref===n.ref)return An(t,n,u)}return n.flags|=1,t=jn(f,l),t.ref=n.ref,t.return=n,n.child=t}function Pm(t,n,s,l,u){if(t!==null){var f=t.memoizedProps;if(Oi(f,l)&&t.ref===n.ref)if(nt=!1,n.pendingProps=l=f,yc(t,u))(t.flags&131072)!==0&&(nt=!0);else return n.lanes=t.lanes,An(t,n,u)}return cc(t,n,s,l,u)}function Xm(t,n,s,l){var u=l.children,f=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,t!==null){for(l=n.child=t.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~f}else l=0,n.child=null;return Jm(t,n,f,s,l)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ir(n,f!==null?f.cachePool:null),f!==null?Wh(n,f):Bu(),em(n);else return l=n.lanes=536870912,Jm(t,n,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(Ir(n,f.cachePool),Wh(n,f),na(),n.memoizedState=null):(t!==null&&Ir(n,null),Bu(),na());return pt(t,n,u,s),n.child}function Bi(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jm(t,n,s,l,u){var f=Du();return f=f===null?null:{parent:et._currentValue,pool:f},n.memoizedState={baseLanes:s,cachePool:f},t!==null&&Ir(n,null),Bu(),em(n),t!==null&&Es(t,n,l,!0),n.childLanes=u,null}function ml(t,n){return n=gl({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Im(t,n,s){return Ya(n,t.child,null,s),t=ml(n,n.pendingProps),t.flags|=2,qt(n),n.memoizedState=null,t}function eS(t,n,s){var l=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(Oe){if(l.mode==="hidden")return t=ml(n,l),n.lanes=536870912,Bi(null,t);if(Hu(n),(t=Be)?(t=cg(t,Jt),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Vn!==null?{id:dn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},s=kh(t),s.return=n,n.child=s,ht=n,Be=null)):t=null,t===null)throw Xn(n);return n.lanes=536870912,null}return ml(n,l)}var f=t.memoizedState;if(f!==null){var y=f.dehydrated;if(Hu(n),u)if(n.flags&256)n.flags&=-257,n=Im(t,n,s);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(r(558));else if(nt||Es(t,n,s,!1),u=(s&t.childLanes)!==0,nt||u){if(l=Ue,l!==null&&(y=Hd(l,s),y!==0&&y!==f.retryLane))throw f.retryLane=y,Za(t,y),Tt(l,t,y),uc;Ol(),n=Im(t,n,s)}else t=f.treeContext,Be=Wt(y.nextSibling),ht=n,Oe=!0,Pn=null,Jt=!1,t!==null&&Zh(n,t),n=ml(n,l),n.flags|=4096;return n}return t=jn(t.child,{mode:l.mode,children:l.children}),t.ref=n.ref,n.child=t,t.return=n,t}function pl(t,n){var s=n.ref;if(s===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(t===null||t.ref!==s)&&(n.flags|=4194816)}}function cc(t,n,s,l,u){return Ha(n),s=Gu(t,n,s,l,void 0,u),l=Ku(),t!==null&&!nt?(Yu(t,n,u),An(t,n,u)):(Oe&&l&&Ou(n),n.flags|=1,pt(t,n,s,u),n.child)}function Wm(t,n,s,l,u,f){return Ha(n),n.updateQueue=null,s=nm(n,l,s,u),tm(t),l=Ku(),t!==null&&!nt?(Yu(t,n,f),An(t,n,f)):(Oe&&l&&Ou(n),n.flags|=1,pt(t,n,s,f),n.child)}function ep(t,n,s,l,u){if(Ha(n),n.stateNode===null){var f=_s,y=s.contextType;typeof y=="object"&&y!==null&&(f=mt(y)),f=new s(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=lc,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},Lu(n),y=s.contextType,f.context=typeof y=="object"&&y!==null?mt(y):_s,f.state=n.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(rc(n,s,y,l),f.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&lc.enqueueReplaceState(f,f.state,null),ki(n,l,f,u),Di(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(t===null){f=n.stateNode;var _=n.memoizedProps,O=Va(s,_);f.props=O;var D=f.context,H=s.contextType;y=_s,typeof H=="object"&&H!==null&&(y=mt(H));var F=s.getDerivedStateFromProps;H=typeof F=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||D!==y)&&Bm(n,f,l,y),In=!1;var k=n.memoizedState;f.state=k,ki(n,l,f,u),Di(),D=n.memoizedState,_||k!==D||In?(typeof F=="function"&&(rc(n,s,F,l),D=n.memoizedState),(O=In||qm(n,s,O,l,k,D,y))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=D),f.props=l,f.state=D,f.context=y,l=O):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,Uu(t,n),y=n.memoizedProps,H=Va(s,y),f.props=H,F=n.pendingProps,k=f.context,D=s.contextType,O=_s,typeof D=="object"&&D!==null&&(O=mt(D)),_=s.getDerivedStateFromProps,(D=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==F||k!==O)&&Bm(n,f,l,O),In=!1,k=n.memoizedState,f.state=k,ki(n,l,f,u),Di();var B=n.memoizedState;y!==F||k!==B||In||t!==null&&t.dependencies!==null&&Xr(t.dependencies)?(typeof _=="function"&&(rc(n,s,_,l),B=n.memoizedState),(H=In||qm(n,s,H,l,k,B,O)||t!==null&&t.dependencies!==null&&Xr(t.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,B,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,B,O)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===t.memoizedProps&&k===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&k===t.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=B),f.props=l,f.state=B,f.context=O,l=H):(typeof f.componentDidUpdate!="function"||y===t.memoizedProps&&k===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&k===t.memoizedState||(n.flags|=1024),l=!1)}return f=l,pl(t,n),l=(n.flags&128)!==0,f||l?(f=n.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,t!==null&&l?(n.child=Ya(n,t.child,null,u),n.child=Ya(n,null,s,u)):pt(t,n,s,u),n.memoizedState=f.state,t=n.child):t=An(t,n,u),t}function tp(t,n,s,l){return Ba(),n.flags|=256,pt(t,n,s,l),n.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(t){return{baseLanes:t,cachePool:Gh()}}function hc(t,n,s){return t=t!==null?t.childLanes&~s:0,n&&(t|=$t),t}function np(t,n,s){var l=n.pendingProps,u=!1,f=(n.flags&128)!==0,y;if((y=f)||(y=t!==null&&t.memoizedState===null?!1:(Xe.current&2)!==0),y&&(u=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,t===null){if(Oe){if(u?ta(n):na(),(t=Be)?(t=cg(t,Jt),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Vn!==null?{id:dn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},s=kh(t),s.return=n,n.child=s,ht=n,Be=null)):t=null,t===null)throw Xn(n);return Pc(t)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,u?(na(),u=n.mode,_=gl({mode:"hidden",children:_},u),l=qa(l,u,s,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=dc(s),l.childLanes=hc(t,y,s),n.memoizedState=fc,Bi(null,l)):(ta(n),mc(n,_))}var O=t.memoizedState;if(O!==null&&(_=O.dehydrated,_!==null)){if(f)n.flags&256?(ta(n),n.flags&=-257,n=pc(t,n,s)):n.memoizedState!==null?(na(),n.child=t.child,n.flags|=128,n=null):(na(),_=l.fallback,u=n.mode,l=gl({mode:"visible",children:l.children},u),_=qa(_,u,s,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Ya(n,t.child,null,s),l=n.child,l.memoizedState=dc(s),l.childLanes=hc(t,y,s),n.memoizedState=fc,n=Bi(null,l));else if(ta(n),Pc(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var D=y.dgst;y=D,l=Error(r(419)),l.stack="",l.digest=y,zi({value:l,source:null,stack:null}),n=pc(t,n,s)}else if(nt||Es(t,n,s,!1),y=(s&t.childLanes)!==0,nt||y){if(y=Ue,y!==null&&(l=Hd(y,s),l!==0&&l!==O.retryLane))throw O.retryLane=l,Za(t,l),Tt(y,t,l),uc;Vc(_)||Ol(),n=pc(t,n,s)}else Vc(_)?(n.flags|=192,n.child=t.child,n=null):(t=O.treeContext,Be=Wt(_.nextSibling),ht=n,Oe=!0,Pn=null,Jt=!1,t!==null&&Zh(n,t),n=mc(n,l.children),n.flags|=4096);return n}return u?(na(),_=l.fallback,u=n.mode,O=t.child,D=O.sibling,l=jn(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,D!==null?_=jn(D,_):(_=qa(_,u,s,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,Bi(null,l),l=n.child,_=t.child.memoizedState,_===null?_=dc(s):(u=_.cachePool,u!==null?(O=et._currentValue,u=u.parent!==O?{parent:O,pool:O}:u):u=Gh(),_={baseLanes:_.baseLanes|s,cachePool:u}),l.memoizedState=_,l.childLanes=hc(t,y,s),n.memoizedState=fc,Bi(t.child,l)):(ta(n),s=t.child,t=s.sibling,s=jn(s,{mode:"visible",children:l.children}),s.return=n,s.sibling=null,t!==null&&(y=n.deletions,y===null?(n.deletions=[t],n.flags|=16):y.push(t)),n.child=s,n.memoizedState=null,s)}function mc(t,n){return n=gl({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function gl(t,n){return t=Ut(22,t,null,n),t.lanes=0,t}function pc(t,n,s){return Ya(n,t.child,null,s),t=mc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function ap(t,n,s){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n),Au(t.return,n,s)}function gc(t,n,s,l,u,f){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:u,treeForkCount:f}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=s,y.tailMode=u,y.treeForkCount=f)}function sp(t,n,s){var l=n.pendingProps,u=l.revealOrder,f=l.tail;l=l.children;var y=Xe.current,_=(y&2)!==0;if(_?(y=y&1|2,n.flags|=128):y&=1,X(Xe,y),pt(t,n,l,s),l=Oe?Ni:0,!_&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ap(t,s,n);else if(t.tag===19)ap(t,s,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(s=n.child,u=null;s!==null;)t=s.alternate,t!==null&&sl(t)===null&&(u=s),s=s.sibling;s=u,s===null?(u=n.child,n.child=null):(u=s.sibling,s.sibling=null),gc(n,!1,u,s,f,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,u=n.child,n.child=null;u!==null;){if(t=u.alternate,t!==null&&sl(t)===null){n.child=u;break}t=u.sibling,u.sibling=s,s=u,u=t}gc(n,!0,s,null,f,l);break;case"together":gc(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function An(t,n,s){if(t!==null&&(n.dependencies=t.dependencies),ia|=n.lanes,(s&n.childLanes)===0)if(t!==null){if(Es(t,n,s,!1),(s&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(r(153));if(n.child!==null){for(t=n.child,s=jn(t,t.pendingProps),n.child=s,s.return=n;t.sibling!==null;)t=t.sibling,s=s.sibling=jn(t,t.pendingProps),s.return=n;s.sibling=null}return n.child}function yc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Xr(t)))}function tS(t,n,s){switch(n.tag){case 3:Ze(n,n.stateNode.containerInfo),Jn(n,et,t.memoizedState.cache),Ba();break;case 27:case 5:fn(n);break;case 4:Ze(n,n.stateNode.containerInfo);break;case 10:Jn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Hu(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(ta(n),n.flags|=128,null):(s&n.child.childLanes)!==0?np(t,n,s):(ta(n),t=An(t,n,s),t!==null?t.sibling:null);ta(n);break;case 19:var u=(t.flags&128)!==0;if(l=(s&n.childLanes)!==0,l||(Es(t,n,s,!1),l=(s&n.childLanes)!==0),u){if(l)return sp(t,n,s);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),X(Xe,Xe.current),l)break;return null;case 22:return n.lanes=0,Xm(t,n,s,n.pendingProps);case 24:Jn(n,et,t.memoizedState.cache)}return An(t,n,s)}function ip(t,n,s){if(t!==null)if(t.memoizedProps!==n.pendingProps)nt=!0;else{if(!yc(t,s)&&(n.flags&128)===0)return nt=!1,tS(t,n,s);nt=(t.flags&131072)!==0}else nt=!1,Oe&&(n.flags&1048576)!==0&&Uh(n,Ni,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(t=Ga(n.elementType),n.type=t,typeof t=="function")_u(t)?(l=Va(t,l),n.tag=1,n=ep(null,n,t,l,s)):(n.tag=0,n=cc(null,n,t,l,s));else{if(t!=null){var u=t.$$typeof;if(u===V){n.tag=11,n=Fm(null,n,t,l,s);break e}else if(u===R){n.tag=14,n=Vm(null,n,t,l,s);break e}}throw n=ye(t)||t,Error(r(306,n,""))}}return n;case 0:return cc(t,n,n.type,n.pendingProps,s);case 1:return l=n.type,u=Va(l,n.pendingProps),ep(t,n,l,u,s);case 3:e:{if(Ze(n,n.stateNode.containerInfo),t===null)throw Error(r(387));l=n.pendingProps;var f=n.memoizedState;u=f.element,Uu(t,n),ki(n,l,null,s);var y=n.memoizedState;if(l=y.cache,Jn(n,et,l),l!==f.cache&&Ru(n,[et],s,!0),Di(),l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=tp(t,n,l,s);break e}else if(l!==u){u=Vt(Error(r(424)),n),zi(u),n=tp(t,n,l,s);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Be=Wt(t.firstChild),ht=n,Oe=!0,Pn=null,Jt=!0,s=Xh(n,null,l,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ba(),l===u){n=An(t,n,s);break e}pt(t,n,l,s)}n=n.child}return n;case 26:return pl(t,n),t===null?(s=gg(n.type,null,n.pendingProps,null))?n.memoizedState=s:Oe||(s=n.type,t=n.pendingProps,l=Cl(xe.current).createElement(s),l[dt]=n,l[wt]=t,gt(l,s,t),ot(l),n.stateNode=l):n.memoizedState=gg(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return fn(n),t===null&&Oe&&(l=n.stateNode=hg(n.type,n.pendingProps,xe.current),ht=n,Jt=!0,u=Be,ca(n.type)?(Xc=u,Be=Wt(l.firstChild)):Be=u),pt(t,n,n.pendingProps.children,s),pl(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Oe&&((u=l=Be)&&(l=RS(l,n.type,n.pendingProps,Jt),l!==null?(n.stateNode=l,ht=n,Be=Wt(l.firstChild),Jt=!1,u=!0):u=!1),u||Xn(n)),fn(n),u=n.type,f=n.pendingProps,y=t!==null?t.memoizedProps:null,l=f.children,Kc(u,f)?l=null:y!==null&&Kc(u,y)&&(n.flags|=32),n.memoizedState!==null&&(u=Gu(t,n,Yx,null,null,s),tr._currentValue=u),pl(t,n),pt(t,n,l,s),n.child;case 6:return t===null&&Oe&&((t=s=Be)&&(s=CS(s,n.pendingProps,Jt),s!==null?(n.stateNode=s,ht=n,Be=null,t=!0):t=!1),t||Xn(n)),null;case 13:return np(t,n,s);case 4:return Ze(n,n.stateNode.containerInfo),l=n.pendingProps,t===null?n.child=Ya(n,null,l,s):pt(t,n,l,s),n.child;case 11:return Fm(t,n,n.type,n.pendingProps,s);case 7:return pt(t,n,n.pendingProps,s),n.child;case 8:return pt(t,n,n.pendingProps.children,s),n.child;case 12:return pt(t,n,n.pendingProps.children,s),n.child;case 10:return l=n.pendingProps,Jn(n,n.type,l.value),pt(t,n,l.children,s),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,Ha(n),u=mt(u),l=l(u),n.flags|=1,pt(t,n,l,s),n.child;case 14:return Vm(t,n,n.type,n.pendingProps,s);case 15:return Pm(t,n,n.type,n.pendingProps,s);case 19:return sp(t,n,s);case 31:return eS(t,n,s);case 22:return Xm(t,n,s,n.pendingProps);case 24:return Ha(n),l=mt(et),t===null?(u=Du(),u===null&&(u=Ue,f=Cu(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=s),u=f),n.memoizedState={parent:l,cache:u},Lu(n),Jn(n,et,u)):((t.lanes&s)!==0&&(Uu(t,n),ki(n,null,null,s),Di()),u=t.memoizedState,f=n.memoizedState,u.parent!==l?(u={parent:l,cache:l},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),Jn(n,et,l)):(l=f.cache,Jn(n,et,l),l!==u.cache&&Ru(n,[et],s,!0))),pt(t,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Rn(t){t.flags|=4}function vc(t,n,s,l,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(Cp())t.flags|=8192;else throw Ka=el,ku}else t.flags&=-16777217}function rp(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Sg(n))if(Cp())t.flags|=8192;else throw Ka=el,ku}function yl(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?qd():536870912,t.lanes|=n,Zs|=n)}function $i(t,n){if(!Oe)switch(t.tailMode){case"hidden":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function $e(t){var n=t.alternate!==null&&t.alternate.child===t.child,s=0,l=0;if(n)for(var u=t.child;u!==null;)s|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)s|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=l,t.childLanes=s,n}function nS(t,n,s){var l=n.pendingProps;switch(Eu(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 s=n.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Nn(et),He(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(Os(n)?Rn(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,zu())),$e(n),null;case 26:var u=n.type,f=n.memoizedState;return t===null?(Rn(n),f!==null?($e(n),rp(n,f)):($e(n),vc(n,u,null,l,s))):f?f!==t.memoizedState?(Rn(n),$e(n),rp(n,f)):($e(n),n.flags&=-16777217):(t=t.memoizedProps,t!==l&&Rn(n),$e(n),vc(n,u,t,l,s)),null;case 27:if(Ra(n),s=xe.current,u=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&Rn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return $e(n),null}t=ne.current,Os(n)?qh(n):(t=hg(u,l,s),n.stateNode=t,Rn(n))}return $e(n),null;case 5:if(Ra(n),u=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&Rn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return $e(n),null}if(f=ne.current,Os(n))qh(n);else{var y=Cl(xe.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?y.createElement(u,{is:l.is}):y.createElement(u)}}f[dt]=n,f[wt]=l;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=f;e:switch(gt(f,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Rn(n)}}return $e(n),vc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,s),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==l&&Rn(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(r(166));if(t=xe.current,Os(n)){if(t=n.stateNode,s=n.memoizedProps,l=null,u=ht,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}t[dt]=n,t=!!(t.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||ng(t.nodeValue,s)),t||Xn(n,!0)}else t=Cl(t).createTextNode(l),t[dt]=n,n.stateNode=t}return $e(n),null;case 31:if(s=n.memoizedState,t===null||t.memoizedState!==null){if(l=Os(n),s!==null){if(t===null){if(!l)throw Error(r(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[dt]=n}else Ba(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),t=!1}else s=zu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return n.flags&256?(qt(n),n):(qt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $e(n),null;case 13:if(l=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=Os(n),l!==null&&l.dehydrated!==null){if(t===null){if(!u)throw Error(r(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[dt]=n}else Ba(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),u=!1}else u=zu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(qt(n),n):(qt(n),null)}return qt(n),(n.flags&128)!==0?(n.lanes=s,n):(s=l!==null,t=t!==null&&t.memoizedState!==null,s&&(l=n.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==u&&(l.flags|=2048)),s!==t&&s&&(n.child.flags|=8192),yl(n,n.updateQueue),$e(n),null);case 4:return He(),t===null&&Bc(n.stateNode.containerInfo),$e(n),null;case 10:return Nn(n.type),$e(n),null;case 19:if(Z(Xe),l=n.memoizedState,l===null)return $e(n),null;if(u=(n.flags&128)!==0,f=l.rendering,f===null)if(u)$i(l,!1);else{if(Pe!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(f=sl(t),f!==null){for(n.flags|=128,$i(l,!1),t=f.updateQueue,n.updateQueue=t,yl(n,t),n.subtreeFlags=0,t=s,s=n.child;s!==null;)Dh(s,t),s=s.sibling;return X(Xe,Xe.current&1|2),Oe&&On(n,l.treeForkCount),n.child}t=t.sibling}l.tail!==null&&Mt()>_l&&(n.flags|=128,u=!0,$i(l,!1),n.lanes=4194304)}else{if(!u)if(t=sl(f),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,yl(n,t),$i(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Oe)return $e(n),null}else 2*Mt()-l.renderingStartTime>_l&&s!==536870912&&(n.flags|=128,u=!0,$i(l,!1),n.lanes=4194304);l.isBackwards?(f.sibling=n.child,n.child=f):(t=l.last,t!==null?t.sibling=f:n.child=f,l.last=f)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Mt(),t.sibling=null,s=Xe.current,X(Xe,u?s&1|2:s&1),Oe&&On(n,l.treeForkCount),t):($e(n),null);case 22:case 23:return qt(n),$u(),l=n.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(s&536870912)!==0&&(n.flags&128)===0&&($e(n),n.subtreeFlags&6&&(n.flags|=8192)):$e(n),s=n.updateQueue,s!==null&&yl(n,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==s&&(n.flags|=2048),t!==null&&Z(Qa),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),Nn(et),$e(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function aS(t,n){switch(Eu(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Nn(et),He(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Ra(n),null;case 31:if(n.memoizedState!==null){if(qt(n),n.alternate===null)throw Error(r(340));Ba()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(qt(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Ba()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Z(Xe),null;case 4:return He(),null;case 10:return Nn(n.type),null;case 22:case 23:return qt(n),$u(),t!==null&&Z(Qa),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Nn(et),null;case 25:return null;default:return null}}function lp(t,n){switch(Eu(n),n.tag){case 3:Nn(et),He();break;case 26:case 27:case 5:Ra(n);break;case 4:He();break;case 31:n.memoizedState!==null&&qt(n);break;case 13:qt(n);break;case 19:Z(Xe);break;case 10:Nn(n.type);break;case 22:case 23:qt(n),$u(),t!==null&&Z(Qa);break;case 24:Nn(et)}}function Hi(t,n){try{var s=n.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var u=l.next;s=u;do{if((s.tag&t)===t){l=void 0;var f=s.create,y=s.inst;l=f(),y.destroy=l}s=s.next}while(s!==u)}}catch(_){Me(n,n.return,_)}}function aa(t,n,s){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var f=u.next;l=f;do{if((l.tag&t)===t){var y=l.inst,_=y.destroy;if(_!==void 0){y.destroy=void 0,u=n;var O=s,D=_;try{D()}catch(H){Me(u,O,H)}}}l=l.next}while(l!==f)}}catch(H){Me(n,n.return,H)}}function op(t){var n=t.updateQueue;if(n!==null){var s=t.stateNode;try{Ih(n,s)}catch(l){Me(t,t.return,l)}}}function up(t,n,s){s.props=Va(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(l){Me(t,n,l)}}function Qi(t,n){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof s=="function"?t.refCleanup=s(l):s.current=l}}catch(u){Me(t,n,u)}}function mn(t,n){var s=t.ref,l=t.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(u){Me(t,n,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(u){Me(t,n,u)}else s.current=null}function cp(t){var n=t.type,s=t.memoizedProps,l=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(u){Me(t,t.return,u)}}function bc(t,n,s){try{var l=t.stateNode;OS(l,t.type,s,n),l[wt]=n}catch(u){Me(t,t.return,u)}}function fp(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ca(t.type)||t.tag===4}function xc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||fp(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&&ca(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 Sc(t,n,s){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(t),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=_n));else if(l!==4&&(l===27&&ca(t.type)&&(s=t.stateNode,n=null),t=t.child,t!==null))for(Sc(t,n,s),t=t.sibling;t!==null;)Sc(t,n,s),t=t.sibling}function vl(t,n,s){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?s.insertBefore(t,n):s.appendChild(t);else if(l!==4&&(l===27&&ca(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(vl(t,n,s),t=t.sibling;t!==null;)vl(t,n,s),t=t.sibling}function dp(t){var n=t.stateNode,s=t.memoizedProps;try{for(var l=t.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);gt(n,l,s),n[dt]=t,n[wt]=s}catch(f){Me(t,t.return,f)}}var Cn=!1,at=!1,_c=!1,hp=typeof WeakSet=="function"?WeakSet:Set,ut=null;function sS(t,n){if(t=t.containerInfo,Qc=ql,t=Oh(t),pu(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var u=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var y=0,_=-1,O=-1,D=0,H=0,F=t,k=null;t:for(;;){for(var B;F!==s||u!==0&&F.nodeType!==3||(_=y+u),F!==f||l!==0&&F.nodeType!==3||(O=y+l),F.nodeType===3&&(y+=F.nodeValue.length),(B=F.firstChild)!==null;)k=F,F=B;for(;;){if(F===t)break t;if(k===s&&++D===u&&(_=y),k===f&&++H===l&&(O=y),(B=F.nextSibling)!==null)break;F=k,k=F.parentNode}F=B}s=_===-1||O===-1?null:{start:_,end:O}}else s=null}s=s||{start:0,end:0}}else s=null;for(Gc={focusedElem:t,selectionRange:s},ql=!1,ut=n;ut!==null;)if(n=ut,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,ut=t;else for(;ut!==null;){switch(n=ut,f=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(s=0;s<t.length;s++)u=t[s],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&f!==null){t=void 0,s=n,u=f.memoizedProps,f=f.memoizedState,l=s.stateNode;try{var se=Va(s.type,u);t=l.getSnapshotBeforeUpdate(se,f),l.__reactInternalSnapshotBeforeUpdate=t}catch(de){Me(s,s.return,de)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,s=t.nodeType,s===9)Fc(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Fc(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(r(163))}if(t=n.sibling,t!==null){t.return=n.return,ut=t;break}ut=n.return}}function mp(t,n,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:Dn(t,s),l&4&&Hi(5,s);break;case 1:if(Dn(t,s),l&4)if(t=s.stateNode,n===null)try{t.componentDidMount()}catch(y){Me(s,s.return,y)}else{var u=Va(s.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(u,n,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Me(s,s.return,y)}}l&64&&op(s),l&512&&Qi(s,s.return);break;case 3:if(Dn(t,s),l&64&&(t=s.updateQueue,t!==null)){if(n=null,s.child!==null)switch(s.child.tag){case 27:case 5:n=s.child.stateNode;break;case 1:n=s.child.stateNode}try{Ih(t,n)}catch(y){Me(s,s.return,y)}}break;case 27:n===null&&l&4&&dp(s);case 26:case 5:Dn(t,s),n===null&&l&4&&cp(s),l&512&&Qi(s,s.return);break;case 12:Dn(t,s);break;case 31:Dn(t,s),l&4&&yp(t,s);break;case 13:Dn(t,s),l&4&&vp(t,s),l&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=hS.bind(null,s),MS(t,s))));break;case 22:if(l=s.memoizedState!==null||Cn,!l){n=n!==null&&n.memoizedState!==null||at,u=Cn;var f=at;Cn=l,(at=n)&&!f?kn(t,s,(s.subtreeFlags&8772)!==0):Dn(t,s),Cn=u,at=f}break;case 30:break;default:Dn(t,s)}}function pp(t){var n=t.alternate;n!==null&&(t.alternate=null,pp(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Io(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 Qe=null,Ot=!1;function Mn(t,n,s){for(s=s.child;s!==null;)gp(t,n,s),s=s.sibling}function gp(t,n,s){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(hi,s)}catch{}switch(s.tag){case 26:at||mn(s,n),Mn(t,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:at||mn(s,n);var l=Qe,u=Ot;ca(s.type)&&(Qe=s.stateNode,Ot=!1),Mn(t,n,s),Ii(s.stateNode),Qe=l,Ot=u;break;case 5:at||mn(s,n);case 6:if(l=Qe,u=Ot,Qe=null,Mn(t,n,s),Qe=l,Ot=u,Qe!==null)if(Ot)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(s.stateNode)}catch(f){Me(s,n,f)}else try{Qe.removeChild(s.stateNode)}catch(f){Me(s,n,f)}break;case 18:Qe!==null&&(Ot?(t=Qe,og(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Ys(t)):og(Qe,s.stateNode));break;case 4:l=Qe,u=Ot,Qe=s.stateNode.containerInfo,Ot=!0,Mn(t,n,s),Qe=l,Ot=u;break;case 0:case 11:case 14:case 15:aa(2,s,n),at||aa(4,s,n),Mn(t,n,s);break;case 1:at||(mn(s,n),l=s.stateNode,typeof l.componentWillUnmount=="function"&&up(s,n,l)),Mn(t,n,s);break;case 21:Mn(t,n,s);break;case 22:at=(l=at)||s.memoizedState!==null,Mn(t,n,s),at=l;break;default:Mn(t,n,s)}}function yp(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ys(t)}catch(s){Me(n,n.return,s)}}}function vp(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ys(t)}catch(s){Me(n,n.return,s)}}function iS(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new hp),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new hp),n;default:throw Error(r(435,t.tag))}}function bl(t,n){var s=iS(t);n.forEach(function(l){if(!s.has(l)){s.add(l);var u=mS.bind(null,t,l);l.then(u,u)}})}function Et(t,n){var s=n.deletions;if(s!==null)for(var l=0;l<s.length;l++){var u=s[l],f=t,y=n,_=y;e:for(;_!==null;){switch(_.tag){case 27:if(ca(_.type)){Qe=_.stateNode,Ot=!1;break e}break;case 5:Qe=_.stateNode,Ot=!1;break e;case 3:case 4:Qe=_.stateNode.containerInfo,Ot=!0;break e}_=_.return}if(Qe===null)throw Error(r(160));gp(f,y,u),Qe=null,Ot=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)bp(n,t),n=n.sibling}var sn=null;function bp(t,n){var s=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Et(n,t),Nt(t),l&4&&(aa(3,t,t.return),Hi(3,t),aa(5,t,t.return));break;case 1:Et(n,t),Nt(t),l&512&&(at||s===null||mn(s,s.return)),l&64&&Cn&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var u=sn;if(Et(n,t),Nt(t),l&512&&(at||s===null||mn(s,s.return)),l&4){var f=s!==null?s.memoizedState:null;if(l=t.memoizedState,s===null)if(l===null)if(t.stateNode===null){e:{l=t.type,s=t.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":f=u.getElementsByTagName("title")[0],(!f||f[gi]||f[dt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(l),u.head.insertBefore(f,u.querySelector("head > title"))),gt(f,l,s),f[dt]=t,ot(f),l=f;break e;case"link":var y=bg("link","href",u).get(l+(s.href||""));if(y){for(var _=0;_<y.length;_++)if(f=y[_],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(_,1);break t}}f=u.createElement(l),gt(f,l,s),u.head.appendChild(f);break;case"meta":if(y=bg("meta","content",u).get(l+(s.content||""))){for(_=0;_<y.length;_++)if(f=y[_],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(_,1);break t}}f=u.createElement(l),gt(f,l,s),u.head.appendChild(f);break;default:throw Error(r(468,l))}f[dt]=t,ot(f),l=f}t.stateNode=l}else xg(u,t.type,t.stateNode);else t.stateNode=vg(u,l,t.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?xg(u,t.type,t.stateNode):vg(u,l,t.memoizedProps)):l===null&&t.stateNode!==null&&bc(t,t.memoizedProps,s.memoizedProps)}break;case 27:Et(n,t),Nt(t),l&512&&(at||s===null||mn(s,s.return)),s!==null&&l&4&&bc(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Et(n,t),Nt(t),l&512&&(at||s===null||mn(s,s.return)),t.flags&32){u=t.stateNode;try{ps(u,"")}catch(se){Me(t,t.return,se)}}l&4&&t.stateNode!=null&&(u=t.memoizedProps,bc(t,u,s!==null?s.memoizedProps:u)),l&1024&&(_c=!0);break;case 6:if(Et(n,t),Nt(t),l&4){if(t.stateNode===null)throw Error(r(162));l=t.memoizedProps,s=t.stateNode;try{s.nodeValue=l}catch(se){Me(t,t.return,se)}}break;case 3:if(kl=null,u=sn,sn=Ml(n.containerInfo),Et(n,t),sn=u,Nt(t),l&4&&s!==null&&s.memoizedState.isDehydrated)try{Ys(n.containerInfo)}catch(se){Me(t,t.return,se)}_c&&(_c=!1,xp(t));break;case 4:l=sn,sn=Ml(t.stateNode.containerInfo),Et(n,t),Nt(t),sn=l;break;case 12:Et(n,t),Nt(t);break;case 31:Et(n,t),Nt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bl(t,l)));break;case 13:Et(n,t),Nt(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Sl=Mt()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bl(t,l)));break;case 22:u=t.memoizedState!==null;var O=s!==null&&s.memoizedState!==null,D=Cn,H=at;if(Cn=D||u,at=H||O,Et(n,t),at=H,Cn=D,Nt(t),l&8192)e:for(n=t.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(s===null||O||Cn||at||Pa(t)),s=null,n=t;;){if(n.tag===5||n.tag===26){if(s===null){O=s=n;try{if(f=O.stateNode,u)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{_=O.stateNode;var F=O.memoizedProps.style,k=F!=null&&F.hasOwnProperty("display")?F.display:null;_.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(se){Me(O,O.return,se)}}}else if(n.tag===6){if(s===null){O=n;try{O.stateNode.nodeValue=u?"":O.memoizedProps}catch(se){Me(O,O.return,se)}}}else if(n.tag===18){if(s===null){O=n;try{var B=O.stateNode;u?ug(B,!0):ug(O.stateNode,!1)}catch(se){Me(O,O.return,se)}}}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;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=t.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,bl(t,s))));break;case 19:Et(n,t),Nt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bl(t,l)));break;case 30:break;case 21:break;default:Et(n,t),Nt(t)}}function Nt(t){var n=t.flags;if(n&2){try{for(var s,l=t.return;l!==null;){if(fp(l)){s=l;break}l=l.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var u=s.stateNode,f=xc(t);vl(t,f,u);break;case 5:var y=s.stateNode;s.flags&32&&(ps(y,""),s.flags&=-33);var _=xc(t);vl(t,_,y);break;case 3:case 4:var O=s.stateNode.containerInfo,D=xc(t);Sc(t,D,O);break;default:throw Error(r(161))}}catch(H){Me(t,t.return,H)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function xp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;xp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Dn(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)mp(t,n.alternate,n),n=n.sibling}function Pa(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:aa(4,n,n.return),Pa(n);break;case 1:mn(n,n.return);var s=n.stateNode;typeof s.componentWillUnmount=="function"&&up(n,n.return,s),Pa(n);break;case 27:Ii(n.stateNode);case 26:case 5:mn(n,n.return),Pa(n);break;case 22:n.memoizedState===null&&Pa(n);break;case 30:Pa(n);break;default:Pa(n)}t=t.sibling}}function kn(t,n,s){for(s=s&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,u=t,f=n,y=f.flags;switch(f.tag){case 0:case 11:case 15:kn(u,f,s),Hi(4,f);break;case 1:if(kn(u,f,s),l=f,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(D){Me(l,l.return,D)}if(l=f,u=l.updateQueue,u!==null){var _=l.stateNode;try{var O=u.shared.hiddenCallbacks;if(O!==null)for(u.shared.hiddenCallbacks=null,u=0;u<O.length;u++)Jh(O[u],_)}catch(D){Me(l,l.return,D)}}s&&y&64&&op(f),Qi(f,f.return);break;case 27:dp(f);case 26:case 5:kn(u,f,s),s&&l===null&&y&4&&cp(f),Qi(f,f.return);break;case 12:kn(u,f,s);break;case 31:kn(u,f,s),s&&y&4&&yp(u,f);break;case 13:kn(u,f,s),s&&y&4&&vp(u,f);break;case 22:f.memoizedState===null&&kn(u,f,s),Qi(f,f.return);break;case 30:break;default:kn(u,f,s)}n=n.sibling}}function wc(t,n){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&Ti(s))}function jc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ti(t))}function rn(t,n,s,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Sp(t,n,s,l),n=n.sibling}function Sp(t,n,s,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:rn(t,n,s,l),u&2048&&Hi(9,n);break;case 1:rn(t,n,s,l);break;case 3:rn(t,n,s,l),u&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ti(t)));break;case 12:if(u&2048){rn(t,n,s,l),t=n.stateNode;try{var f=n.memoizedProps,y=f.id,_=f.onPostCommit;typeof _=="function"&&_(y,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(O){Me(n,n.return,O)}}else rn(t,n,s,l);break;case 31:rn(t,n,s,l);break;case 13:rn(t,n,s,l);break;case 23:break;case 22:f=n.stateNode,y=n.alternate,n.memoizedState!==null?f._visibility&2?rn(t,n,s,l):Gi(t,n):f._visibility&2?rn(t,n,s,l):(f._visibility|=2,ks(t,n,s,l,(n.subtreeFlags&10256)!==0||!1)),u&2048&&wc(y,n);break;case 24:rn(t,n,s,l),u&2048&&jc(n.alternate,n);break;default:rn(t,n,s,l)}}function ks(t,n,s,l,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=t,y=n,_=s,O=l,D=y.flags;switch(y.tag){case 0:case 11:case 15:ks(f,y,_,O,u),Hi(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?ks(f,y,_,O,u):Gi(f,y):(H._visibility|=2,ks(f,y,_,O,u)),u&&D&2048&&wc(y.alternate,y);break;case 24:ks(f,y,_,O,u),u&&D&2048&&jc(y.alternate,y);break;default:ks(f,y,_,O,u)}n=n.sibling}}function Gi(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=t,l=n,u=l.flags;switch(l.tag){case 22:Gi(s,l),u&2048&&wc(l.alternate,l);break;case 24:Gi(s,l),u&2048&&jc(l.alternate,l);break;default:Gi(s,l)}n=n.sibling}}var Ki=8192;function Ls(t,n,s){if(t.subtreeFlags&Ki)for(t=t.child;t!==null;)_p(t,n,s),t=t.sibling}function _p(t,n,s){switch(t.tag){case 26:Ls(t,n,s),t.flags&Ki&&t.memoizedState!==null&&KS(s,sn,t.memoizedState,t.memoizedProps);break;case 5:Ls(t,n,s);break;case 3:case 4:var l=sn;sn=Ml(t.stateNode.containerInfo),Ls(t,n,s),sn=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=Ki,Ki=16777216,Ls(t,n,s),Ki=l):Ls(t,n,s));break;default:Ls(t,n,s)}}function wp(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 Yi(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var l=n[s];ut=l,Op(l,t)}wp(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jp(t),t=t.sibling}function jp(t){switch(t.tag){case 0:case 11:case 15:Yi(t),t.flags&2048&&aa(9,t,t.return);break;case 3:Yi(t);break;case 12:Yi(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,xl(t)):Yi(t);break;default:Yi(t)}}function xl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var l=n[s];ut=l,Op(l,t)}wp(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:aa(8,n,n.return),xl(n);break;case 22:s=n.stateNode,s._visibility&2&&(s._visibility&=-3,xl(n));break;default:xl(n)}t=t.sibling}}function Op(t,n){for(;ut!==null;){var s=ut;switch(s.tag){case 0:case 11:case 15:aa(8,s,n);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ti(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,ut=l;else e:for(s=t;ut!==null;){l=ut;var u=l.sibling,f=l.return;if(pp(l),l===s){ut=null;break e}if(u!==null){u.return=f,ut=u;break e}ut=f}}}var rS={getCacheForType:function(t){var n=mt(et),s=n.data.get(t);return s===void 0&&(s=t(),n.data.set(t,s)),s},cacheSignal:function(){return mt(et).controller.signal}},lS=typeof WeakMap=="function"?WeakMap:Map,Te=0,Ue=null,Se=null,we=0,Ce=0,Bt=null,sa=!1,Us=!1,Oc=!1,Ln=0,Pe=0,ia=0,Xa=0,Ec=0,$t=0,Zs=0,Fi=null,zt=null,Nc=!1,Sl=0,Ep=0,_l=1/0,wl=null,ra=null,it=0,la=null,qs=null,Un=0,zc=0,Tc=null,Np=null,Vi=0,Ac=null;function Ht(){return(Te&2)!==0&&we!==0?we&-we:U.T!==null?Lc():Qd()}function zp(){if($t===0)if((we&536870912)===0||Oe){var t=Rr;Rr<<=1,(Rr&3932160)===0&&(Rr=262144),$t=t}else $t=536870912;return t=Zt.current,t!==null&&(t.flags|=32),$t}function Tt(t,n,s){(t===Ue&&(Ce===2||Ce===9)||t.cancelPendingCommit!==null)&&(Bs(t,0),oa(t,we,$t,!1)),pi(t,s),((Te&2)===0||t!==Ue)&&(t===Ue&&((Te&2)===0&&(Xa|=s),Pe===4&&oa(t,we,$t,!1)),pn(t))}function Tp(t,n,s){if((Te&6)!==0)throw Error(r(327));var l=!s&&(n&127)===0&&(n&t.expiredLanes)===0||mi(t,n),u=l?cS(t,n):Cc(t,n,!0),f=l;do{if(u===0){Us&&!l&&oa(t,n,0,!1);break}else{if(s=t.current.alternate,f&&!oS(s)){u=Cc(t,n,!1),f=!1;continue}if(u===2){if(f=n,t.errorRecoveryDisabledLanes&f)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;e:{var _=t;u=Fi;var O=_.current.memoizedState.isDehydrated;if(O&&(Bs(_,y).flags|=256),y=Cc(_,y,!1),y!==2){if(Oc&&!O){_.errorRecoveryDisabledLanes|=f,Xa|=f,u=4;break e}f=zt,zt=u,f!==null&&(zt===null?zt=f:zt.push.apply(zt,f))}u=y}if(f=!1,u!==2)continue}}if(u===1){Bs(t,0),oa(t,n,0,!0);break}e:{switch(l=t,f=u,f){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:oa(l,n,$t,!sa);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(u=Sl+300-Mt(),10<u)){if(oa(l,n,$t,!sa),Mr(l,0,!0)!==0)break e;Un=n,l.timeoutHandle=rg(Ap.bind(null,l,s,zt,wl,Nc,n,$t,Xa,Zs,sa,f,"Throttled",-0,0),u);break e}Ap(l,s,zt,wl,Nc,n,$t,Xa,Zs,sa,f,null,-0,0)}}break}while(!0);pn(t)}function Ap(t,n,s,l,u,f,y,_,O,D,H,F,k,B){if(t.timeoutHandle=-1,F=n.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},_p(n,f,F);var se=(f&62914560)===f?Sl-Mt():(f&4194048)===f?Ep-Mt():0;if(se=YS(F,se),se!==null){Un=f,t.cancelPendingCommit=se(Zp.bind(null,t,n,f,s,l,u,y,_,O,H,F,null,k,B)),oa(t,f,y,!D);return}}Zp(t,n,f,s,l,u,y,_,O)}function oS(t){for(var n=t;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var u=s[l],f=u.getSnapshot;u=u.value;try{if(!Lt(f(),u))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;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 oa(t,n,s,l){n&=~Ec,n&=~Xa,t.suspendedLanes|=n,t.pingedLanes&=~n,l&&(t.warmLanes|=n),l=t.expirationTimes;for(var u=n;0<u;){var f=31-kt(u),y=1<<f;l[f]=-1,u&=~y}s!==0&&Bd(t,s,n)}function jl(){return(Te&6)===0?(Pi(0),!1):!0}function Rc(){if(Se!==null){if(Ce===0)var t=Se.return;else t=Se,En=$a=null,Fu(t),As=null,Ri=0,t=Se;for(;t!==null;)lp(t.alternate,t),t=t.return;Se=null}}function Bs(t,n){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,zS(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),Un=0,Rc(),Ue=t,Se=s=jn(t.current,null),we=n,Ce=0,Bt=null,sa=!1,Us=mi(t,n),Oc=!1,Zs=$t=Ec=Xa=ia=Pe=0,zt=Fi=null,Nc=!1,(n&8)!==0&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var u=31-kt(l),f=1<<u;n|=t[u],l&=~f}return Ln=n,Kr(),s}function Rp(t,n){ve=null,U.H=qi,n===Ts||n===Wr?(n=Fh(),Ce=3):n===ku?(n=Fh(),Ce=4):Ce=n===uc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Bt=n,Se===null&&(Pe=1,hl(t,Vt(n,t.current)))}function Cp(){var t=Zt.current;return t===null?!0:(we&4194048)===we?It===null:(we&62914560)===we||(we&536870912)!==0?t===It:!1}function Mp(){var t=U.H;return U.H=qi,t===null?qi:t}function Dp(){var t=U.A;return U.A=rS,t}function Ol(){Pe=4,sa||(we&4194048)!==we&&Zt.current!==null||(Us=!0),(ia&134217727)===0&&(Xa&134217727)===0||Ue===null||oa(Ue,we,$t,!1)}function Cc(t,n,s){var l=Te;Te|=2;var u=Mp(),f=Dp();(Ue!==t||we!==n)&&(wl=null,Bs(t,n)),n=!1;var y=Pe;e:do try{if(Ce!==0&&Se!==null){var _=Se,O=Bt;switch(Ce){case 8:Rc(),y=6;break e;case 3:case 2:case 9:case 6:Zt.current===null&&(n=!0);var D=Ce;if(Ce=0,Bt=null,$s(t,_,O,D),s&&Us){y=0;break e}break;default:D=Ce,Ce=0,Bt=null,$s(t,_,O,D)}}uS(),y=Pe;break}catch(H){Rp(t,H)}while(!0);return n&&t.shellSuspendCounter++,En=$a=null,Te=l,U.H=u,U.A=f,Se===null&&(Ue=null,we=0,Kr()),y}function uS(){for(;Se!==null;)kp(Se)}function cS(t,n){var s=Te;Te|=2;var l=Mp(),u=Dp();Ue!==t||we!==n?(wl=null,_l=Mt()+500,Bs(t,n)):Us=mi(t,n);e:do try{if(Ce!==0&&Se!==null){n=Se;var f=Bt;t:switch(Ce){case 1:Ce=0,Bt=null,$s(t,n,f,1);break;case 2:case 9:if(Kh(f)){Ce=0,Bt=null,Lp(n);break}n=function(){Ce!==2&&Ce!==9||Ue!==t||(Ce=7),pn(t)},f.then(n,n);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Kh(f)?(Ce=0,Bt=null,Lp(n)):(Ce=0,Bt=null,$s(t,n,f,7));break;case 5:var y=null;switch(Se.tag){case 26:y=Se.memoizedState;case 5:case 27:var _=Se;if(y?Sg(y):_.stateNode.complete){Ce=0,Bt=null;var O=_.sibling;if(O!==null)Se=O;else{var D=_.return;D!==null?(Se=D,El(D)):Se=null}break t}}Ce=0,Bt=null,$s(t,n,f,5);break;case 6:Ce=0,Bt=null,$s(t,n,f,6);break;case 8:Rc(),Pe=6;break e;default:throw Error(r(462))}}fS();break}catch(H){Rp(t,H)}while(!0);return En=$a=null,U.H=l,U.A=u,Te=s,Se!==null?0:(Ue=null,we=0,Kr(),Pe)}function fS(){for(;Se!==null&&!D0();)kp(Se)}function kp(t){var n=ip(t.alternate,t,Ln);t.memoizedProps=t.pendingProps,n===null?El(t):Se=n}function Lp(t){var n=t,s=n.alternate;switch(n.tag){case 15:case 0:n=Wm(s,n,n.pendingProps,n.type,void 0,we);break;case 11:n=Wm(s,n,n.pendingProps,n.type.render,n.ref,we);break;case 5:Fu(n);default:lp(s,n),n=Se=Dh(n,Ln),n=ip(s,n,Ln)}t.memoizedProps=t.pendingProps,n===null?El(t):Se=n}function $s(t,n,s,l){En=$a=null,Fu(n),As=null,Ri=0;var u=n.return;try{if(Wx(t,u,n,s,we)){Pe=1,hl(t,Vt(s,t.current)),Se=null;return}}catch(f){if(u!==null)throw Se=u,f;Pe=1,hl(t,Vt(s,t.current)),Se=null;return}n.flags&32768?(Oe||l===1?t=!0:Us||(we&536870912)!==0?t=!1:(sa=t=!0,(l===2||l===9||l===3||l===6)&&(l=Zt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Up(n,t)):El(n)}function El(t){var n=t;do{if((n.flags&32768)!==0){Up(n,sa);return}t=n.return;var s=nS(n.alternate,n,Ln);if(s!==null){Se=s;return}if(n=n.sibling,n!==null){Se=n;return}Se=n=t}while(n!==null);Pe===0&&(Pe=5)}function Up(t,n){do{var s=aS(t.alternate,t);if(s!==null){s.flags&=32767,Se=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(t=t.sibling,t!==null)){Se=t;return}Se=t=s}while(t!==null);Pe=6,Se=null}function Zp(t,n,s,l,u,f,y,_,O){t.cancelPendingCommit=null;do Nl();while(it!==0);if((Te&6)!==0)throw Error(r(327));if(n!==null){if(n===t.current)throw Error(r(177));if(f=n.lanes|n.childLanes,f|=xu,G0(t,s,f,y,_,O),t===Ue&&(Se=Ue=null,we=0),qs=n,la=t,Un=s,zc=f,Tc=u,Np=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,pS(Tr,function(){return Qp(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,u=C.p,C.p=2,y=Te,Te|=4;try{sS(t,n,s)}finally{Te=y,C.p=u,U.T=l}}it=1,qp(),Bp(),$p()}}function qp(){if(it===1){it=0;var t=la,n=qs,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=U.T,U.T=null;var l=C.p;C.p=2;var u=Te;Te|=4;try{bp(n,t);var f=Gc,y=Oh(t.containerInfo),_=f.focusedElem,O=f.selectionRange;if(y!==_&&_&&_.ownerDocument&&jh(_.ownerDocument.documentElement,_)){if(O!==null&&pu(_)){var D=O.start,H=O.end;if(H===void 0&&(H=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(H,_.value.length);else{var F=_.ownerDocument||document,k=F&&F.defaultView||window;if(k.getSelection){var B=k.getSelection(),se=_.textContent.length,de=Math.min(O.start,se),Le=O.end===void 0?de:Math.min(O.end,se);!B.extend&&de>Le&&(y=Le,Le=de,de=y);var A=wh(_,de),N=wh(_,Le);if(A&&N&&(B.rangeCount!==1||B.anchorNode!==A.node||B.anchorOffset!==A.offset||B.focusNode!==N.node||B.focusOffset!==N.offset)){var M=F.createRange();M.setStart(A.node,A.offset),B.removeAllRanges(),de>Le?(B.addRange(M),B.extend(N.node,N.offset)):(M.setEnd(N.node,N.offset),B.addRange(M))}}}}for(F=[],B=_;B=B.parentNode;)B.nodeType===1&&F.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<F.length;_++){var K=F[_];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}ql=!!Qc,Gc=Qc=null}finally{Te=u,C.p=l,U.T=s}}t.current=n,it=2}}function Bp(){if(it===2){it=0;var t=la,n=qs,s=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||s){s=U.T,U.T=null;var l=C.p;C.p=2;var u=Te;Te|=4;try{mp(t,n.alternate,n)}finally{Te=u,C.p=l,U.T=s}}it=3}}function $p(){if(it===4||it===3){it=0,k0();var t=la,n=qs,s=Un,l=Np;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?it=5:(it=0,qs=la=null,Hp(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(ra=null),Xo(s),n=n.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(hi,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=U.T,u=C.p,C.p=2,U.T=null;try{for(var f=t.onRecoverableError,y=0;y<l.length;y++){var _=l[y];f(_.value,{componentStack:_.stack})}}finally{U.T=n,C.p=u}}(Un&3)!==0&&Nl(),pn(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===Ac?Vi++:(Vi=0,Ac=t):Vi=0,Pi(0)}}function Hp(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ti(n)))}function Nl(){return qp(),Bp(),$p(),Qp()}function Qp(){if(it!==5)return!1;var t=la,n=zc;zc=0;var s=Xo(Un),l=U.T,u=C.p;try{C.p=32>s?32:s,U.T=null,s=Tc,Tc=null;var f=la,y=Un;if(it=0,qs=la=null,Un=0,(Te&6)!==0)throw Error(r(331));var _=Te;if(Te|=4,jp(f.current),Sp(f,f.current,y,s),Te=_,Pi(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(hi,f)}catch{}return!0}finally{C.p=u,U.T=l,Hp(t,n)}}function Gp(t,n,s){n=Vt(s,n),n=oc(t.stateNode,n,2),t=ea(t,n,2),t!==null&&(pi(t,2),pn(t))}function Me(t,n,s){if(t.tag===3)Gp(t,t,s);else for(;n!==null;){if(n.tag===3){Gp(n,t,s);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ra===null||!ra.has(l))){t=Vt(s,t),s=Km(2),l=ea(n,s,2),l!==null&&(Ym(s,l,n,t),pi(l,2),pn(l));break}}n=n.return}}function Mc(t,n,s){var l=t.pingCache;if(l===null){l=t.pingCache=new lS;var u=new Set;l.set(n,u)}else u=l.get(n),u===void 0&&(u=new Set,l.set(n,u));u.has(s)||(Oc=!0,u.add(s),t=dS.bind(null,t,n,s),n.then(t,t))}function dS(t,n,s){var l=t.pingCache;l!==null&&l.delete(n),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,Ue===t&&(we&s)===s&&(Pe===4||Pe===3&&(we&62914560)===we&&300>Mt()-Sl?(Te&2)===0&&Bs(t,0):Ec|=s,Zs===we&&(Zs=0)),pn(t)}function Kp(t,n){n===0&&(n=qd()),t=Za(t,n),t!==null&&(pi(t,n),pn(t))}function hS(t){var n=t.memoizedState,s=0;n!==null&&(s=n.retryLane),Kp(t,s)}function mS(t,n){var s=0;switch(t.tag){case 31:case 13:var l=t.stateNode,u=t.memoizedState;u!==null&&(s=u.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(n),Kp(t,s)}function pS(t,n){return Yo(t,n)}var zl=null,Hs=null,Dc=!1,Tl=!1,kc=!1,ua=0;function pn(t){t!==Hs&&t.next===null&&(Hs===null?zl=Hs=t:Hs=Hs.next=t),Tl=!0,Dc||(Dc=!0,yS())}function Pi(t,n){if(!kc&&Tl){kc=!0;do for(var s=!1,l=zl;l!==null;){if(t!==0){var u=l.pendingLanes;if(u===0)var f=0;else{var y=l.suspendedLanes,_=l.pingedLanes;f=(1<<31-kt(42|t)+1)-1,f&=u&~(y&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,Pp(l,f))}else f=we,f=Mr(l,l===Ue?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||mi(l,f)||(s=!0,Pp(l,f));l=l.next}while(s);kc=!1}}function gS(){Yp()}function Yp(){Tl=Dc=!1;var t=0;ua!==0&&NS()&&(t=ua);for(var n=Mt(),s=null,l=zl;l!==null;){var u=l.next,f=Fp(l,n);f===0?(l.next=null,s===null?zl=u:s.next=u,u===null&&(Hs=s)):(s=l,(t!==0||(f&3)!==0)&&(Tl=!0)),l=u}it!==0&&it!==5||Pi(t),ua!==0&&(ua=0)}function Fp(t,n){for(var s=t.suspendedLanes,l=t.pingedLanes,u=t.expirationTimes,f=t.pendingLanes&-62914561;0<f;){var y=31-kt(f),_=1<<y,O=u[y];O===-1?((_&s)===0||(_&l)!==0)&&(u[y]=Q0(_,n)):O<=n&&(t.expiredLanes|=_),f&=~_}if(n=Ue,s=we,s=Mr(t,t===n?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,s===0||t===n&&(Ce===2||Ce===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&Fo(l),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||mi(t,s)){if(n=s&-s,n===t.callbackPriority)return n;switch(l!==null&&Fo(l),Xo(s)){case 2:case 8:s=Ud;break;case 32:s=Tr;break;case 268435456:s=Zd;break;default:s=Tr}return l=Vp.bind(null,t),s=Yo(s,l),t.callbackPriority=n,t.callbackNode=s,n}return l!==null&&l!==null&&Fo(l),t.callbackPriority=2,t.callbackNode=null,2}function Vp(t,n){if(it!==0&&it!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(Nl()&&t.callbackNode!==s)return null;var l=we;return l=Mr(t,t===Ue?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(Tp(t,l,n),Fp(t,Mt()),t.callbackNode!=null&&t.callbackNode===s?Vp.bind(null,t):null)}function Pp(t,n){if(Nl())return null;Tp(t,n,!0)}function yS(){TS(function(){(Te&6)!==0?Yo(Ld,gS):Yp()})}function Lc(){if(ua===0){var t=Ns;t===0&&(t=Ar,Ar<<=1,(Ar&261888)===0&&(Ar=256)),ua=t}return ua}function Xp(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ur(""+t)}function Jp(t,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,t.id&&s.setAttribute("form",t.id),n.parentNode.insertBefore(s,n),t=new FormData(t),s.parentNode.removeChild(s),t}function vS(t,n,s,l,u){if(n==="submit"&&s&&s.stateNode===u){var f=Xp((u[wt]||null).action),y=l.submitter;y&&(n=(n=y[wt]||null)?Xp(n.formAction):y.getAttribute("formAction"),n!==null&&(f=n,y=null));var _=new $r("action","action",null,l,u);t.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ua!==0){var O=y?Jp(u,y):new FormData(u);nc(s,{pending:!0,data:O,method:u.method,action:f},null,O)}}else typeof f=="function"&&(_.preventDefault(),O=y?Jp(u,y):new FormData(u),nc(s,{pending:!0,data:O,method:u.method,action:f},f,O))},currentTarget:u}]})}}for(var Uc=0;Uc<bu.length;Uc++){var Zc=bu[Uc],bS=Zc.toLowerCase(),xS=Zc[0].toUpperCase()+Zc.slice(1);an(bS,"on"+xS)}an(zh,"onAnimationEnd"),an(Th,"onAnimationIteration"),an(Ah,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(Lx,"onTransitionRun"),an(Ux,"onTransitionStart"),an(Zx,"onTransitionCancel"),an(Rh,"onTransitionEnd"),hs("onMouseEnter",["mouseout","mouseover"]),hs("onMouseLeave",["mouseout","mouseover"]),hs("onPointerEnter",["pointerout","pointerover"]),hs("onPointerLeave",["pointerout","pointerover"]),Da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Da("onBeforeInput",["compositionend","keypress","textInput","paste"]),Da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xi="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(" "),SS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xi));function Ip(t,n){n=(n&4)!==0;for(var s=0;s<t.length;s++){var l=t[s],u=l.event;l=l.listeners;e:{var f=void 0;if(n)for(var y=l.length-1;0<=y;y--){var _=l[y],O=_.instance,D=_.currentTarget;if(_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(H){Gr(H)}u.currentTarget=null,f=O}else for(y=0;y<l.length;y++){if(_=l[y],O=_.instance,D=_.currentTarget,_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(H){Gr(H)}u.currentTarget=null,f=O}}}}function _e(t,n){var s=n[Jo];s===void 0&&(s=n[Jo]=new Set);var l=t+"__bubble";s.has(l)||(Wp(n,t,2,!1),s.add(l))}function qc(t,n,s){var l=0;n&&(l|=4),Wp(s,t,l,n)}var Al="_reactListening"+Math.random().toString(36).slice(2);function Bc(t){if(!t[Al]){t[Al]=!0,Yd.forEach(function(s){s!=="selectionchange"&&(SS.has(s)||qc(s,!1,t),qc(s,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Al]||(n[Al]=!0,qc("selectionchange",!1,n))}}function Wp(t,n,s,l){switch(zg(n)){case 2:var u=PS;break;case 8:u=XS;break;default:u=tf}s=u.bind(null,n,s,t),u=void 0,!ru||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?t.addEventListener(n,s,{capture:!0,passive:u}):t.addEventListener(n,s,!0):u!==void 0?t.addEventListener(n,s,{passive:u}):t.addEventListener(n,s,!1)}function $c(t,n,s,l,u){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var _=l.stateNode.containerInfo;if(_===u)break;if(y===4)for(y=l.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;_!==null;){if(y=cs(_),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){l=f=y;continue e}_=_.parentNode}}l=l.return}sh(function(){var D=f,H=su(s),F=[];e:{var k=Ch.get(t);if(k!==void 0){var B=$r,se=t;switch(t){case"keypress":if(qr(s)===0)break e;case"keydown":case"keyup":B=mx;break;case"focusin":se="focus",B=cu;break;case"focusout":se="blur",B=cu;break;case"beforeblur":case"afterblur":B=cu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=lh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=nx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=yx;break;case zh:case Th:case Ah:B=ix;break;case Rh:B=bx;break;case"scroll":case"scrollend":B=ex;break;case"wheel":B=Sx;break;case"copy":case"cut":case"paste":B=lx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=uh;break;case"toggle":case"beforetoggle":B=wx}var de=(n&4)!==0,Le=!de&&(t==="scroll"||t==="scrollend"),A=de?k!==null?k+"Capture":null:k;de=[];for(var N=D,M;N!==null;){var K=N;if(M=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||M===null||A===null||(K=vi(N,A),K!=null&&de.push(Ji(N,K,M))),Le)break;N=N.return}0<de.length&&(k=new B(k,se,null,s,H),F.push({event:k,listeners:de}))}}if((n&7)===0){e:{if(k=t==="mouseover"||t==="pointerover",B=t==="mouseout"||t==="pointerout",k&&s!==au&&(se=s.relatedTarget||s.fromElement)&&(cs(se)||se[us]))break e;if((B||k)&&(k=H.window===H?H:(k=H.ownerDocument)?k.defaultView||k.parentWindow:window,B?(se=s.relatedTarget||s.toElement,B=D,se=se?cs(se):null,se!==null&&(Le=c(se),de=se.tag,se!==Le||de!==5&&de!==27&&de!==6)&&(se=null)):(B=null,se=D),B!==se)){if(de=lh,K="onMouseLeave",A="onMouseEnter",N="mouse",(t==="pointerout"||t==="pointerover")&&(de=uh,K="onPointerLeave",A="onPointerEnter",N="pointer"),Le=B==null?k:yi(B),M=se==null?k:yi(se),k=new de(K,N+"leave",B,s,H),k.target=Le,k.relatedTarget=M,K=null,cs(H)===D&&(de=new de(A,N+"enter",se,s,H),de.target=M,de.relatedTarget=Le,K=de),Le=K,B&&se)t:{for(de=_S,A=B,N=se,M=0,K=A;K;K=de(K))M++;K=0;for(var ce=N;ce;ce=de(ce))K++;for(;0<M-K;)A=de(A),M--;for(;0<K-M;)N=de(N),K--;for(;M--;){if(A===N||N!==null&&A===N.alternate){de=A;break t}A=de(A),N=de(N)}de=null}else de=null;B!==null&&eg(F,k,B,de,!1),se!==null&&Le!==null&&eg(F,Le,se,de,!0)}}e:{if(k=D?yi(D):window,B=k.nodeName&&k.nodeName.toLowerCase(),B==="select"||B==="input"&&k.type==="file")var Ne=yh;else if(ph(k))if(vh)Ne=Mx;else{Ne=Rx;var le=Ax}else B=k.nodeName,!B||B.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&nu(D.elementType)&&(Ne=yh):Ne=Cx;if(Ne&&(Ne=Ne(t,D))){gh(F,Ne,s,H);break e}le&&le(t,k,D),t==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&tu(k,"number",k.value)}switch(le=D?yi(D):window,t){case"focusin":(ph(le)||le.contentEditable==="true")&&(bs=le,gu=D,Ei=null);break;case"focusout":Ei=gu=bs=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,Eh(F,s,H);break;case"selectionchange":if(kx)break;case"keydown":case"keyup":Eh(F,s,H)}var be;if(du)e:{switch(t){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else vs?hh(t,s)&&(je="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(je="onCompositionStart");je&&(ch&&s.locale!=="ko"&&(vs||je!=="onCompositionStart"?je==="onCompositionEnd"&&vs&&(be=ih()):(Fn=H,lu="value"in Fn?Fn.value:Fn.textContent,vs=!0)),le=Rl(D,je),0<le.length&&(je=new oh(je,t,null,s,H),F.push({event:je,listeners:le}),be?je.data=be:(be=mh(s),be!==null&&(je.data=be)))),(be=Ox?Ex(t,s):Nx(t,s))&&(je=Rl(D,"onBeforeInput"),0<je.length&&(le=new oh("onBeforeInput","beforeinput",null,s,H),F.push({event:le,listeners:je}),le.data=be)),vS(F,t,D,s,H)}Ip(F,n)})}function Ji(t,n,s){return{instance:t,listener:n,currentTarget:s}}function Rl(t,n){for(var s=n+"Capture",l=[];t!==null;){var u=t,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=vi(t,s),u!=null&&l.unshift(Ji(t,u,f)),u=vi(t,n),u!=null&&l.push(Ji(t,u,f))),t.tag===3)return l;t=t.return}return[]}function _S(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function eg(t,n,s,l,u){for(var f=n._reactName,y=[];s!==null&&s!==l;){var _=s,O=_.alternate,D=_.stateNode;if(_=_.tag,O!==null&&O===l)break;_!==5&&_!==26&&_!==27||D===null||(O=D,u?(D=vi(s,f),D!=null&&y.unshift(Ji(s,D,O))):u||(D=vi(s,f),D!=null&&y.push(Ji(s,D,O)))),s=s.return}y.length!==0&&t.push({event:n,listeners:y})}var wS=/\r\n?/g,jS=/\u0000|\uFFFD/g;function tg(t){return(typeof t=="string"?t:""+t).replace(wS,`
9
+ `).replace(jS,"")}function ng(t,n){return n=tg(n),tg(t)===n}function ke(t,n,s,l,u,f){switch(s){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||ps(t,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&ps(t,""+l);break;case"className":kr(t,"class",l);break;case"tabIndex":kr(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":kr(t,s,l);break;case"style":nh(t,l,f);break;case"data":if(n!=="object"){kr(t,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||s!=="href")){t.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(s);break}l=Ur(""+l),t.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(n!=="input"&&ke(t,n,"name",u.name,u,null),ke(t,n,"formEncType",u.formEncType,u,null),ke(t,n,"formMethod",u.formMethod,u,null),ke(t,n,"formTarget",u.formTarget,u,null)):(ke(t,n,"encType",u.encType,u,null),ke(t,n,"method",u.method,u,null),ke(t,n,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(s);break}l=Ur(""+l),t.setAttribute(s,l);break;case"onClick":l!=null&&(t.onclick=_n);break;case"onScroll":l!=null&&_e("scroll",t);break;case"onScrollEnd":l!=null&&_e("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(s=l.__html,s!=null){if(u.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}s=Ur(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(s,""+l):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":l===!0?t.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(s,l):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(s,l):t.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(s):t.setAttribute(s,l);break;case"popover":_e("beforetoggle",t),_e("toggle",t),Dr(t,"popover",l);break;case"xlinkActuate":Sn(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Sn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Sn(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Sn(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Sn(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Sn(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Dr(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=I0.get(s)||s,Dr(t,s,l))}}function Hc(t,n,s,l,u,f){switch(s){case"style":nh(t,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(s=l.__html,s!=null){if(u.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"children":typeof l=="string"?ps(t,l):(typeof l=="number"||typeof l=="bigint")&&ps(t,""+l);break;case"onScroll":l!=null&&_e("scroll",t);break;case"onScrollEnd":l!=null&&_e("scrollend",t);break;case"onClick":l!=null&&(t.onclick=_n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fd.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),n=s.slice(2,u?s.length-7:void 0),f=t[wt]||null,f=f!=null?f[s]:null,typeof f=="function"&&t.removeEventListener(n,f,u),typeof l=="function")){typeof f!="function"&&f!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(n,l,u);break e}s in t?t[s]=l:l===!0?t.setAttribute(s,""):Dr(t,s,l)}}}function gt(t,n,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",t),_e("load",t);var l=!1,u=!1,f;for(f in s)if(s.hasOwnProperty(f)){var y=s[f];if(y!=null)switch(f){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ke(t,n,f,y,s,null)}}u&&ke(t,n,"srcSet",s.srcSet,s,null),l&&ke(t,n,"src",s.src,s,null);return;case"input":_e("invalid",t);var _=f=y=u=null,O=null,D=null;for(l in s)if(s.hasOwnProperty(l)){var H=s[l];if(H!=null)switch(l){case"name":u=H;break;case"type":y=H;break;case"checked":O=H;break;case"defaultChecked":D=H;break;case"value":f=H;break;case"defaultValue":_=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,n));break;default:ke(t,n,l,H,s,null)}}Id(t,f,_,O,D,y,u,!1);return;case"select":_e("invalid",t),l=y=f=null;for(u in s)if(s.hasOwnProperty(u)&&(_=s[u],_!=null))switch(u){case"value":f=_;break;case"defaultValue":y=_;break;case"multiple":l=_;default:ke(t,n,u,_,s,null)}n=f,s=y,t.multiple=!!l,n!=null?ms(t,!!l,n,!1):s!=null&&ms(t,!!l,s,!0);return;case"textarea":_e("invalid",t),f=u=l=null;for(y in s)if(s.hasOwnProperty(y)&&(_=s[y],_!=null))switch(y){case"value":l=_;break;case"defaultValue":u=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:ke(t,n,y,_,s,null)}eh(t,l,u,f);return;case"option":for(O in s)s.hasOwnProperty(O)&&(l=s[O],l!=null)&&(O==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":ke(t,n,O,l,s,null));return;case"dialog":_e("beforetoggle",t),_e("toggle",t),_e("cancel",t),_e("close",t);break;case"iframe":case"object":_e("load",t);break;case"video":case"audio":for(l=0;l<Xi.length;l++)_e(Xi[l],t);break;case"image":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"embed":case"source":case"link":_e("error",t),_e("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(D in s)if(s.hasOwnProperty(D)&&(l=s[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ke(t,n,D,l,s,null)}return;default:if(nu(n)){for(H in s)s.hasOwnProperty(H)&&(l=s[H],l!==void 0&&Hc(t,n,H,l,s,void 0));return}}for(_ in s)s.hasOwnProperty(_)&&(l=s[_],l!=null&&ke(t,n,_,l,s,null))}function OS(t,n,s,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,y=null,_=null,O=null,D=null,H=null;for(B in s){var F=s[B];if(s.hasOwnProperty(B)&&F!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":O=F;default:l.hasOwnProperty(B)||ke(t,n,B,null,l,F)}}for(var k in l){var B=l[k];if(F=s[k],l.hasOwnProperty(k)&&(B!=null||F!=null))switch(k){case"type":f=B;break;case"name":u=B;break;case"checked":D=B;break;case"defaultChecked":H=B;break;case"value":y=B;break;case"defaultValue":_=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,n));break;default:B!==F&&ke(t,n,k,B,l,F)}}eu(t,y,_,O,D,H,f,u);return;case"select":B=y=_=k=null;for(f in s)if(O=s[f],s.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":B=O;default:l.hasOwnProperty(f)||ke(t,n,f,null,l,O)}for(u in l)if(f=l[u],O=s[u],l.hasOwnProperty(u)&&(f!=null||O!=null))switch(u){case"value":k=f;break;case"defaultValue":_=f;break;case"multiple":y=f;default:f!==O&&ke(t,n,u,f,l,O)}n=_,s=y,l=B,k!=null?ms(t,!!s,k,!1):!!l!=!!s&&(n!=null?ms(t,!!s,n,!0):ms(t,!!s,s?[]:"",!1));return;case"textarea":B=k=null;for(_ in s)if(u=s[_],s.hasOwnProperty(_)&&u!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ke(t,n,_,null,l,u)}for(y in l)if(u=l[y],f=s[y],l.hasOwnProperty(y)&&(u!=null||f!=null))switch(y){case"value":k=u;break;case"defaultValue":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&ke(t,n,y,u,l,f)}Wd(t,k,B);return;case"option":for(var se in s)k=s[se],s.hasOwnProperty(se)&&k!=null&&!l.hasOwnProperty(se)&&(se==="selected"?t.selected=!1:ke(t,n,se,null,l,k));for(O in l)k=l[O],B=s[O],l.hasOwnProperty(O)&&k!==B&&(k!=null||B!=null)&&(O==="selected"?t.selected=k&&typeof k!="function"&&typeof k!="symbol":ke(t,n,O,k,l,B));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 de in s)k=s[de],s.hasOwnProperty(de)&&k!=null&&!l.hasOwnProperty(de)&&ke(t,n,de,null,l,k);for(D in l)if(k=l[D],B=s[D],l.hasOwnProperty(D)&&k!==B&&(k!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,n));break;default:ke(t,n,D,k,l,B)}return;default:if(nu(n)){for(var Le in s)k=s[Le],s.hasOwnProperty(Le)&&k!==void 0&&!l.hasOwnProperty(Le)&&Hc(t,n,Le,void 0,l,k);for(H in l)k=l[H],B=s[H],!l.hasOwnProperty(H)||k===B||k===void 0&&B===void 0||Hc(t,n,H,k,l,B);return}}for(var A in s)k=s[A],s.hasOwnProperty(A)&&k!=null&&!l.hasOwnProperty(A)&&ke(t,n,A,null,l,k);for(F in l)k=l[F],B=s[F],!l.hasOwnProperty(F)||k===B||k==null&&B==null||ke(t,n,F,k,l,B)}function ag(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ES(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var u=s[l],f=u.transferSize,y=u.initiatorType,_=u.duration;if(f&&_&&ag(y)){for(y=0,_=u.responseEnd,l+=1;l<s.length;l++){var O=s[l],D=O.startTime;if(D>_)break;var H=O.transferSize,F=O.initiatorType;H&&ag(F)&&(O=O.responseEnd,y+=H*(O<_?1:(_-D)/(O-D)))}if(--l,n+=8*(f+y)/(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 Qc=null,Gc=null;function Cl(t){return t.nodeType===9?t:t.ownerDocument}function sg(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 ig(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 Kc(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 Yc=null;function NS(){var t=window.event;return t&&t.type==="popstate"?t===Yc?!1:(Yc=t,!0):(Yc=null,!1)}var rg=typeof setTimeout=="function"?setTimeout:void 0,zS=typeof clearTimeout=="function"?clearTimeout:void 0,lg=typeof Promise=="function"?Promise:void 0,TS=typeof queueMicrotask=="function"?queueMicrotask:typeof lg<"u"?function(t){return lg.resolve(null).then(t).catch(AS)}:rg;function AS(t){setTimeout(function(){throw t})}function ca(t){return t==="head"}function og(t,n){var s=n,l=0;do{var u=s.nextSibling;if(t.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"||s==="/&"){if(l===0){t.removeChild(u),Ys(n);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Ii(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Ii(s);for(var f=s.firstChild;f;){var y=f.nextSibling,_=f.nodeName;f[gi]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=y}}else s==="body"&&Ii(t.ownerDocument.body);s=u}while(s);Ys(n)}function ug(t,n){var s=t;t=0;do{var l=s.nextSibling;if(s.nodeType===1?n?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(n?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=l}while(s)}function Fc(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Fc(s),Io(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function RS(t,n,s,l){for(;t.nodeType===1;){var u=s;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[gi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(f=t.getAttribute("rel"),f==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(f!==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(f=t.getAttribute("src"),(f!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===f)return t}else return t;if(t=Wt(t.nextSibling),t===null)break}return null}function CS(t,n,s){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Wt(t.nextSibling),t===null))return null;return t}function cg(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Wt(t.nextSibling),t===null))return null;return t}function Vc(t){return t.data==="$?"||t.data==="$~"}function Pc(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function MS(t,n){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||s.readyState!=="loading")n();else{var l=function(){n(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Wt(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 Xc=null;function fg(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(n===0)return Wt(t.nextSibling);n--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||n++}t=t.nextSibling}return null}function dg(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(n===0)return t;n--}else s!=="/$"&&s!=="/&"||n++}t=t.previousSibling}return null}function hg(t,n,s){switch(n=Cl(s),t){case"html":if(t=n.documentElement,!t)throw Error(r(452));return t;case"head":if(t=n.head,!t)throw Error(r(453));return t;case"body":if(t=n.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Ii(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Io(t)}var en=new Map,mg=new Set;function Ml(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Zn=C.d;C.d={f:DS,r:kS,D:LS,C:US,L:ZS,m:qS,X:$S,S:BS,M:HS};function DS(){var t=Zn.f(),n=jl();return t||n}function kS(t){var n=fs(t);n!==null&&n.tag===5&&n.type==="form"?Rm(n):Zn.r(t)}var Qs=typeof document>"u"?null:document;function pg(t,n,s){var l=Qs;if(l&&typeof n=="string"&&n){var u=Yt(n);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),mg.has(u)||(mg.add(u),t={rel:t,crossOrigin:s,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),gt(n,"link",t),ot(n),l.head.appendChild(n)))}}function LS(t){Zn.D(t),pg("dns-prefetch",t,null)}function US(t,n){Zn.C(t,n),pg("preconnect",t,n)}function ZS(t,n,s){Zn.L(t,n,s);var l=Qs;if(l&&t&&n){var u='link[rel="preload"][as="'+Yt(n)+'"]';n==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+Yt(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+Yt(s.imageSizes)+'"]')):u+='[href="'+Yt(t)+'"]';var f=u;switch(n){case"style":f=Gs(t);break;case"script":f=Ks(t)}en.has(f)||(t=v({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:t,as:n},s),en.set(f,t),l.querySelector(u)!==null||n==="style"&&l.querySelector(Wi(f))||n==="script"&&l.querySelector(er(f))||(n=l.createElement("link"),gt(n,"link",t),ot(n),l.head.appendChild(n)))}}function qS(t,n){Zn.m(t,n);var s=Qs;if(s&&t){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Yt(l)+'"][href="'+Yt(t)+'"]',f=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ks(t)}if(!en.has(f)&&(t=v({rel:"modulepreload",href:t},n),en.set(f,t),s.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(er(f)))return}l=s.createElement("link"),gt(l,"link",t),ot(l),s.head.appendChild(l)}}}function BS(t,n,s){Zn.S(t,n,s);var l=Qs;if(l&&t){var u=ds(l).hoistableStyles,f=Gs(t);n=n||"default";var y=u.get(f);if(!y){var _={loading:0,preload:null};if(y=l.querySelector(Wi(f)))_.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":n},s),(s=en.get(f))&&Jc(t,s);var O=y=l.createElement("link");ot(O),gt(O,"link",t),O._p=new Promise(function(D,H){O.onload=D,O.onerror=H}),O.addEventListener("load",function(){_.loading|=1}),O.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Dl(y,n,l)}y={type:"stylesheet",instance:y,count:1,state:_},u.set(f,y)}}}function $S(t,n){Zn.X(t,n);var s=Qs;if(s&&t){var l=ds(s).hoistableScripts,u=Ks(t),f=l.get(u);f||(f=s.querySelector(er(u)),f||(t=v({src:t,async:!0},n),(n=en.get(u))&&Ic(t,n),f=s.createElement("script"),ot(f),gt(f,"link",t),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function HS(t,n){Zn.M(t,n);var s=Qs;if(s&&t){var l=ds(s).hoistableScripts,u=Ks(t),f=l.get(u);f||(f=s.querySelector(er(u)),f||(t=v({src:t,async:!0,type:"module"},n),(n=en.get(u))&&Ic(t,n),f=s.createElement("script"),ot(f),gt(f,"link",t),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function gg(t,n,s,l){var u=(u=xe.current)?Ml(u):null;if(!u)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(n=Gs(s.href),s=ds(u).hoistableStyles,l=s.get(n),l||(l={type:"style",instance:null,count:0,state:null},s.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=Gs(s.href);var f=ds(u).hoistableStyles,y=f.get(t);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(t,y),(f=u.querySelector(Wi(t)))&&!f._p&&(y.instance=f,y.state.loading=5),en.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},en.set(t,s),f||QS(u,t,s,y.state))),n&&l===null)throw Error(r(528,""));return y}if(n&&l!==null)throw Error(r(529,""));return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ks(s),s=ds(u).hoistableScripts,l=s.get(n),l||(l={type:"script",instance:null,count:0,state:null},s.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Gs(t){return'href="'+Yt(t)+'"'}function Wi(t){return'link[rel="stylesheet"]['+t+"]"}function yg(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function QS(t,n,s,l){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=t.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),gt(n,"link",s),ot(n),t.head.appendChild(n))}function Ks(t){return'[src="'+Yt(t)+'"]'}function er(t){return"script[async]"+t}function vg(t,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var l=t.querySelector('style[data-href~="'+Yt(s.href)+'"]');if(l)return n.instance=l,ot(l),l;var u=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),ot(l),gt(l,"style",u),Dl(l,s.precedence,t),n.instance=l;case"stylesheet":u=Gs(s.href);var f=t.querySelector(Wi(u));if(f)return n.state.loading|=4,n.instance=f,ot(f),f;l=yg(s),(u=en.get(u))&&Jc(l,u),f=(t.ownerDocument||t).createElement("link"),ot(f);var y=f;return y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),gt(f,"link",l),n.state.loading|=4,Dl(f,s.precedence,t),n.instance=f;case"script":return f=Ks(s.src),(u=t.querySelector(er(f)))?(n.instance=u,ot(u),u):(l=s,(u=en.get(f))&&(l=v({},s),Ic(l,u)),t=t.ownerDocument||t,u=t.createElement("script"),ot(u),gt(u,"link",l),t.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,Dl(l,s.precedence,t));return n.instance}function Dl(t,n,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,f=u,y=0;y<l.length;y++){var _=l[y];if(_.dataset.precedence===n)f=_;else if(f!==u)break}f?f.parentNode.insertBefore(t,f.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(t,n.firstChild))}function Jc(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Ic(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var kl=null;function bg(t,n,s){if(kl===null){var l=new Map,u=kl=new Map;u.set(s,l)}else u=kl,l=u.get(s),l||(l=new Map,u.set(s,l));if(l.has(t))return l;for(l.set(t,null),s=s.getElementsByTagName(t),u=0;u<s.length;u++){var f=s[u];if(!(f[gi]||f[dt]||t==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(n)||"";y=t+y;var _=l.get(y);_?_.push(f):l.set(y,[f])}}return l}function xg(t,n,s){t=t.ownerDocument||t,t.head.insertBefore(s,n==="title"?t.querySelector("head > title"):null)}function GS(t,n,s){if(s===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 Sg(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function KS(t,n,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var u=Gs(l.href),f=n.querySelector(Wi(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Ll.bind(t),n.then(t,t)),s.state.loading|=4,s.instance=f,ot(f);return}f=n.ownerDocument||n,l=yg(l),(u=en.get(u))&&Jc(l,u),f=f.createElement("link"),ot(f);var y=f;y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),gt(f,"link",l),s.instance=f}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Ll.bind(t),n.addEventListener("load",s),n.addEventListener("error",s))}}var Wc=0;function YS(t,n){return t.stylesheets&&t.count===0&&Zl(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var l=setTimeout(function(){if(t.stylesheets&&Zl(t,t.stylesheets),t.unsuspend){var f=t.unsuspend;t.unsuspend=null,f()}},6e4+n);0<t.imgBytes&&Wc===0&&(Wc=62500*ES());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Zl(t,t.stylesheets),t.unsuspend)){var f=t.unsuspend;t.unsuspend=null,f()}},(t.imgBytes>Wc?50:800)+n);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function Ll(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zl(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ul=null;function Zl(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ul=new Map,n.forEach(FS,t),Ul=null,Ll.call(t))}function FS(t,n){if(!(n.state.loading&4)){var s=Ul.get(t);if(s)var l=s.get(null);else{s=new Map,Ul.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var y=u[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),l=y)}l&&s.set(null,l)}u=n.instance,y=u.getAttribute("data-precedence"),f=s.get(y)||l,f===l&&s.set(null,u),s.set(y,u),this.count++,l=Ll.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),f?f.parentNode.insertBefore(u,f.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),n.state.loading|=4}}var tr={$$typeof:G,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function VS(t,n,s,l,u,f,y,_,O){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=Vo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vo(0),this.hiddenUpdates=Vo(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function _g(t,n,s,l,u,f,y,_,O,D,H,F){return t=new VS(t,n,s,y,O,D,H,F,_),n=1,f===!0&&(n|=24),f=Ut(3,null,null,n),t.current=f,f.stateNode=t,n=Cu(),n.refCount++,t.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:n},Lu(f),t}function wg(t){return t?(t=_s,t):_s}function jg(t,n,s,l,u,f){u=wg(u),l.context===null?l.context=u:l.pendingContext=u,l=Wn(n),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=ea(t,l,n),s!==null&&(Tt(s,t,n),Mi(s,t,n))}function Og(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<n?s:n}}function ef(t,n){Og(t,n),(t=t.alternate)&&Og(t,n)}function Eg(t){if(t.tag===13||t.tag===31){var n=Za(t,67108864);n!==null&&Tt(n,t,67108864),ef(t,67108864)}}function Ng(t){if(t.tag===13||t.tag===31){var n=Ht();n=Po(n);var s=Za(t,n);s!==null&&Tt(s,t,n),ef(t,n)}}var ql=!0;function PS(t,n,s,l){var u=U.T;U.T=null;var f=C.p;try{C.p=2,tf(t,n,s,l)}finally{C.p=f,U.T=u}}function XS(t,n,s,l){var u=U.T;U.T=null;var f=C.p;try{C.p=8,tf(t,n,s,l)}finally{C.p=f,U.T=u}}function tf(t,n,s,l){if(ql){var u=nf(l);if(u===null)$c(t,n,l,Bl,s),Tg(t,l);else if(IS(u,t,n,s,l))l.stopPropagation();else if(Tg(t,l),n&4&&-1<JS.indexOf(t)){for(;u!==null;){var f=fs(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=Ma(f.pendingLanes);if(y!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var O=1<<31-kt(y);_.entanglements[1]|=O,y&=~O}pn(f),(Te&6)===0&&(_l=Mt()+500,Pi(0))}}break;case 31:case 13:_=Za(f,2),_!==null&&Tt(_,f,2),jl(),ef(f,2)}if(f=nf(l),f===null&&$c(t,n,l,Bl,s),f===u)break;u=f}u!==null&&l.stopPropagation()}else $c(t,n,l,null,s)}}function nf(t){return t=su(t),af(t)}var Bl=null;function af(t){if(Bl=null,t=cs(t),t!==null){var n=c(t);if(n===null)t=null;else{var s=n.tag;if(s===13){if(t=d(n),t!==null)return t;t=null}else if(s===31){if(t=h(n),t!==null)return t;t=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Bl=t,null}function zg(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(L0()){case Ld:return 2;case Ud:return 8;case Tr:case U0:return 32;case Zd:return 268435456;default:return 32}default:return 32}}var sf=!1,fa=null,da=null,ha=null,nr=new Map,ar=new Map,ma=[],JS="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 Tg(t,n){switch(t){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":da=null;break;case"mouseover":case"mouseout":ha=null;break;case"pointerover":case"pointerout":nr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ar.delete(n.pointerId)}}function sr(t,n,s,l,u,f){return t===null||t.nativeEvent!==f?(t={blockedOn:n,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[u]},n!==null&&(n=fs(n),n!==null&&Eg(n)),t):(t.eventSystemFlags|=l,n=t.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),t)}function IS(t,n,s,l,u){switch(n){case"focusin":return fa=sr(fa,t,n,s,l,u),!0;case"dragenter":return da=sr(da,t,n,s,l,u),!0;case"mouseover":return ha=sr(ha,t,n,s,l,u),!0;case"pointerover":var f=u.pointerId;return nr.set(f,sr(nr.get(f)||null,t,n,s,l,u)),!0;case"gotpointercapture":return f=u.pointerId,ar.set(f,sr(ar.get(f)||null,t,n,s,l,u)),!0}return!1}function Ag(t){var n=cs(t.target);if(n!==null){var s=c(n);if(s!==null){if(n=s.tag,n===13){if(n=d(s),n!==null){t.blockedOn=n,Gd(t.priority,function(){Ng(s)});return}}else if(n===31){if(n=h(s),n!==null){t.blockedOn=n,Gd(t.priority,function(){Ng(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function $l(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var s=nf(t.nativeEvent);if(s===null){s=t.nativeEvent;var l=new s.constructor(s.type,s);au=l,s.target.dispatchEvent(l),au=null}else return n=fs(s),n!==null&&Eg(n),t.blockedOn=s,!1;n.shift()}return!0}function Rg(t,n,s){$l(t)&&s.delete(n)}function WS(){sf=!1,fa!==null&&$l(fa)&&(fa=null),da!==null&&$l(da)&&(da=null),ha!==null&&$l(ha)&&(ha=null),nr.forEach(Rg),ar.forEach(Rg)}function Hl(t,n){t.blockedOn===n&&(t.blockedOn=null,sf||(sf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,WS)))}var Ql=null;function Cg(t){Ql!==t&&(Ql=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ql===t&&(Ql=null);for(var n=0;n<t.length;n+=3){var s=t[n],l=t[n+1],u=t[n+2];if(typeof l!="function"){if(af(l||s)===null)continue;break}var f=fs(s);f!==null&&(t.splice(n,3),n-=3,nc(f,{pending:!0,data:u,method:s.method,action:l},l,u))}}))}function Ys(t){function n(O){return Hl(O,t)}fa!==null&&Hl(fa,t),da!==null&&Hl(da,t),ha!==null&&Hl(ha,t),nr.forEach(n),ar.forEach(n);for(var s=0;s<ma.length;s++){var l=ma[s];l.blockedOn===t&&(l.blockedOn=null)}for(;0<ma.length&&(s=ma[0],s.blockedOn===null);)Ag(s),s.blockedOn===null&&ma.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var u=s[l],f=s[l+1],y=u[wt]||null;if(typeof f=="function")y||Cg(s);else if(y){var _=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[wt]||null)_=y.formAction;else if(af(u)!==null)continue}else _=y.action;typeof _=="function"?s[l+1]=_:(s.splice(l,3),l-=3),Cg(s)}}}function Mg(){function t(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function rf(t){this._internalRoot=t}Gl.prototype.render=rf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));var s=n.current,l=Ht();jg(s,l,t,n,null,null)},Gl.prototype.unmount=rf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;jg(t.current,2,null,t,null,null),jl(),n[us]=null}};function Gl(t){this._internalRoot=t}Gl.prototype.unstable_scheduleHydration=function(t){if(t){var n=Qd();t={blockedOn:null,target:t,priority:n};for(var s=0;s<ma.length&&n!==0&&n<ma[s].priority;s++);ma.splice(s,0,t),s===0&&Ag(t)}};var Dg=a.version;if(Dg!=="19.2.8")throw Error(r(527,Dg,"19.2.8"));C.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=m(n),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var e_={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kl.isDisabled&&Kl.supportsFiber)try{hi=Kl.inject(e_),Dt=Kl}catch{}}return rr.createRoot=function(t,n){if(!o(t))throw Error(r(299));var s=!1,l="",u=$m,f=Hm,y=Qm;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=_g(t,1,!1,null,null,s,l,null,u,f,y,Mg),t[us]=n.current,Bc(t),new rf(n)},rr.hydrateRoot=function(t,n,s){if(!o(t))throw Error(r(299));var l=!1,u="",f=$m,y=Hm,_=Qm,O=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError),s.formState!==void 0&&(O=s.formState)),n=_g(t,1,!0,n,s??null,l,u,O,f,y,_,Mg),n.context=wg(null),s=n.current,l=Ht(),l=Po(l),u=Wn(l),u.callback=null,ea(s,u,l),s=l,n.current.lanes=s,pi(n,s),pn(n),t[us]=n.current,Bc(t),new Gl(n)},rr.version="19.2.8",rr}var Gg;function c_(){if(Gg)return uf.exports;Gg=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(),uf.exports=u_(),uf.exports}var f_=c_();const Ev=ee.createContext(void 0),as=e=>{const a=ee.useContext(Ev);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},d_=({client:e,children:a})=>(ee.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(Ev.Provider,{value:e,children:a})),h_={setTimeout:(e,a)=>setTimeout(e,a),clearTimeout:e=>clearTimeout(e),setInterval:(e,a)=>setInterval(e,a),clearInterval:e=>clearInterval(e)};var m_=class{#e=h_;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,a){return this.#e.setTimeout(e,a)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,a){return this.#e.setInterval(e,a)}clearInterval(e){this.#e.clearInterval(e)}};const Ja=new m_;function p_(e){setTimeout(e,0)}const g_=typeof window>"u"||"Deno"in globalThis;function St(){}function y_(e,a){return typeof e=="function"?e(a):e}function Mf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Nv(e,a){return Math.max(e+(a||0)-Date.now(),0)}function $n(e,a){return typeof e=="function"?e(a):e}function Qt(e,a){return typeof e=="function"?e(a):e}function Kg(e,a){const{type:i="all",exact:r,fetchStatus:o,predicate:c,queryKey:d,stale:h}=e;if(d){if(r){if(a.queryHash!==ad(d,a.options))return!1}else if(!ti(a.queryKey,d))return!1}if(i!=="all"){const p=a.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||o&&o!==a.state.fetchStatus||c&&!c(a))}function Yg(e,a){const{exact:i,status:r,predicate:o,mutationKey:c}=e;if(c){if(!a.options.mutationKey)return!1;if(i){if(ts(a.options.mutationKey)!==ts(c))return!1}else if(!ti(a.options.mutationKey,c))return!1}return!(r&&a.state.status!==r||o&&!o(a))}function ad(e,a){return(a?.queryKeyHashFn||ts)(e)}function ts(e){return JSON.stringify(e,(a,i)=>Df(i)?Object.keys(i).sort().reduce((r,o)=>(r[o]=i[o],r),{}):i)}function ti(e,a){if(e===a)return!0;if(typeof e!=typeof a)return!1;if(e&&a&&typeof e=="object"&&typeof a=="object"){if(Array.isArray(e)&&Array.isArray(a)){for(let r=0;r<a.length;r++)if(!ti(e[r],a[r]))return!1;return!0}const i=Object.keys(a);for(const r of i)if(!ti(e[r],a[r]))return!1;return!0}return!1}const v_=Object.prototype.hasOwnProperty;function zv(e,a,i=0){if(e===a)return e;if(i>500)return a;const r=Fg(e)&&Fg(a);if(!r&&!(Df(e)&&Df(a)))return a;const o=(r?e:Object.keys(e)).length,c=r?a:Object.keys(a),d=c.length,h=r?new Array(d):{};let p=0;for(let m=0;m<d;m++){const b=r?m:c[m],v=e[b],x=a[b];if(v===x){h[b]=v,(r?m<o:v_.call(e,b))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[b]=x;continue}const S=zv(v,x,i+1);h[b]=S,S===v&&p++}return o===d&&p===o?e:h}function po(e,a){if(!a||Object.keys(e).length!==Object.keys(a).length)return!1;for(const i in e)if(e[i]!==a[i])return!1;return!0}function Fg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Df(e){if(!Vg(e))return!1;const a=e.constructor;if(a===void 0)return!0;const i=a.prototype;return!(!Vg(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vg(e){return Object.prototype.toString.call(e)==="[object Object]"}function b_(e){return new Promise(a=>{Ja.setTimeout(a,e)})}function kf(e,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,a):i.structuralSharing!==!1?zv(e,a):a}function x_(e,a,i=0){const r=[...e,a];return i&&r.length>i?r.slice(1):r}function S_(e,a,i=0){const r=[a,...e];return i&&r.length>i?r.slice(0,-1):r}const sd=Symbol();function Tv(e,a){return!e.queryFn&&a?.initialPromise?()=>a.initialPromise:!e.queryFn||e.queryFn===sd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function id(e,a){return typeof e=="function"?e(...a):!!e}function __(e,a,i){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=a(),r||(r=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),e}const go=(()=>{let e=()=>g_;return{isServer(){return e()},setIsServer(a){e=a}}})();var oi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},w_=class extends oi{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const a=()=>e();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(a=>{a(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const rd=new w_,j_=p_;function O_(){let e=[],a=0,i=h=>{h()},r=h=>{h()},o=j_;const c=h=>{a?e.push(h):o(()=>{i(h)})},d=()=>{const h=e;e=[],h.length&&o(()=>{r(()=>{h.forEach(p=>{i(p)})})})};return{batch:h=>{let p;a++;try{p=h()}finally{a--,a||d()}return p},batchCalls:h=>(...p)=>{c(()=>{h(...p)})},schedule:c,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{o=h}}}const rt=O_();var E_=class extends oi{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const a=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(a=>{a(e)}))}isOnline(){return this.#e}};const yo=new E_;function N_(e){return Math.min(1e3*2**e,3e4)}function Av(e){return(e??"online")==="online"?yo.isOnline():!0}var Lf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Rv(e){let a=!1,i=0,r,o="pending",c,d;const h=new Promise((L,G)=>{c=L,d=G});h.catch(St);const p=()=>o!=="pending",m=L=>{if(!p()){const G=new Lf(L);j(G),e.onCancel?.(G)}},b=()=>{a=!0},v=()=>{a=!1},x=()=>rd.isFocused()&&(e.networkMode==="always"||yo.isOnline())&&e.canRun(),S=()=>Av(e.networkMode)&&e.canRun(),w=L=>{p()||(r?.(),o="resolved",c(L))},j=L=>{p()||(r?.(),o="rejected",d(L))},z=()=>new Promise(L=>{r=G=>{(p()||x())&&L(G)},e.onPause?.()}).then(()=>{r=void 0,p()||e.onContinue?.()}),T=()=>{if(p())return;let L;const G=i===0?e.initialPromise:void 0;try{L=G??e.fn()}catch(V){L=Promise.reject(V)}Promise.resolve(L).then(w).catch(V=>{if(p())return;const W=e.retry??(go.isServer()?0:3),$=e.retryDelay??N_,R=typeof $=="function"?$(i,V):$,J=W===!0||typeof W=="number"&&i<W||typeof W=="function"&&W(i,V);if(a||!J){j(V);return}i++,e.onFail?.(i,V),b_(R).then(()=>x()?void 0:z()).then(()=>{a?j(V):T()})})};return{promise:h,status:()=>o,cancel:m,continue:()=>(r?.(),h),cancelRetry:b,continueRetry:v,canStart:S,start:()=>(S()?T():z().then(T),h)}}var Cv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mf(this.gcTime)&&(this.#e=Ja.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(go.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Ja.clearTimeout(this.#e),this.#e=void 0)}};function z_(e){return{onFetch:(a,i)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,c=a.state.data?.pages||[],d=a.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let b=!1;const v=w=>{__(w,()=>a.signal,()=>b=!0)},x=Tv(a.options,a.fetchOptions),S=async(w,j,z)=>{if(b)return Promise.reject(a.signal.reason);if(j==null&&w.pages.length)return Promise.resolve(w);const L=(()=>{const $={client:a.client,queryKey:a.queryKey,pageParam:j,direction:z?"backward":"forward",meta:a.options.meta};return v($),$})(),G=await x(L),{maxPages:V}=a.options,W=z?S_:x_;return{pages:W(w.pages,G,V),pageParams:W(w.pageParams,j,V)}};if(o&&c.length){const w=o==="backward",j=w?T_:Pg,z={pages:c,pageParams:d};h=await S(z,j(r,z),w)}else{const w=e??c.length;do{const j=p===0?d[0]??r.initialPageParam:Pg(r,h);if(p>0&&j==null)break;h=await S(h,j),p++}while(p<w)}return h};a.options.persister?a.fetchFn=()=>a.options.persister?.(m,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i):a.fetchFn=m}}}function Pg(e,{pages:a,pageParams:i}){const r=a.length-1;return a.length>0?e.getNextPageParam(a[r],a,i[r],i):void 0}function T_(e,{pages:a,pageParams:i}){return a.length>0?e.getPreviousPageParam?.(a[0],a,i[0],i):void 0}var A_=class extends Cv{#e;#t;#n;#a;#i;#s;#r;#o;constructor(e){super(),this.#o=!1,this.#r=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#a=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Jg(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#r,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Jg(this.options);a.data!==void 0&&(this.setState(Xg(a.data,a.dataUpdatedAt)),this.#t=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(e,a){const i=kf(this.state.data,e,this.options);return this.#l({data:i,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),i}setState(e){this.#l({type:"setState",state:e})}cancel(e){const a=this.#s?.promise;return this.#s?.cancel(e),a?a.then(St).catch(St):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Qt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>$n(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Nv(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const a=this.observers.indexOf(e);a!==-1&&(this.observers.splice(a,1),this.observers.length||(this.#s&&(this.#o||this.#u()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,a){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(m=>m.options.queryFn);p&&this.setOptions(p.options)}const i=new AbortController,r=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#o=!0,i.signal)})},o=()=>{const p=Tv(this.options,a),b=(()=>{const v={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(v),v})();return this.#o=!1,this.options.persister?this.options.persister(p,b,this):p(b)},d=(()=>{const p={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(p),p})();(this.#e==="infinite"?z_(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta});const h=this.#s=Rv({initialPromise:a?.initialPromise,fn:d.fetchFn,onCancel:p=>{p instanceof Lf&&p.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(p,m)=>{this.#l({type:"failed",failureCount:p,error:m})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const p=await h.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#a.config.onSuccess?.(p,this),this.#a.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof Lf){if(p.silent)return this.#s.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#l({type:"error",error:p}),this.#a.config.onError?.(p,this),this.#a.config.onSettled?.(this.state.data,p,this),p}finally{this.#s===h&&(this.#s=void 0),this.scheduleGc()}}#l(e){const a=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Mv(i.data,this.options),fetchMeta:e.meta??null};case"success":const r={...i,...Xg(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const o=e.error;return{...i,error:o,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=a(this.state),rt.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function Mv(e,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Av(a.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Xg(e,a){return{data:e,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Jg(e){const a=typeof e.initialData=="function"?e.initialData():e.initialData,i=a!==void 0,r=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var R_=class extends oi{#e;#t=void 0;#n=void 0;#a=void 0;#i;#s;#r;#o;#u;#l;#f;#d;#c;#m=new Set;constructor(e,a){super(),this.options=a,this.#e=e,this.#r=null,this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ig(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Uf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Uf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){const a=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),a._defaulted&&!po(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Wg(this.#t,i,this.options,a)&&this.#h(),this.updateResult(),r&&(this.#t!==i||Qt(this.options.enabled,this.#t)!==Qt(a.enabled,this.#t)||$n(this.options.staleTime,this.#t)!==$n(a.staleTime,this.#t))&&this.#p();const o=this.#g();r&&(this.#t!==i||Qt(this.options.enabled,this.#t)!==Qt(a.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const a=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(a,e);return M_(this,i)&&(this.#a=i,this.#s=this.options,this.#i=this.#t.state),i}getCurrentResult(){return this.#a}trackResult(e,a){return new Proxy(e,{get:(i,r)=>(this.trackProp(r),a?.(r),Reflect.get(i,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const a=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCache().build(this.#e,a);let r=()=>{},o;const c=new Promise(d=>{o=d,r=this.#e.getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===i.queryHash&&i.state.data!==void 0&&(r(),d(this.createResult(i,a)))})});return Promise.race([i.fetch().then(()=>{const d=this.createResult(i,a);return o?.(d),d}).finally(()=>{r()}),c])}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#h(e){this.#S();let a=this.#t.fetch(this.options,e);return e?.throwOnError||(a=a.catch(St)),a}#p(){this.#b();const e=$n(this.options.staleTime,this.#t);if(go.isServer()||this.#a.isStale||!Mf(e))return;const a=Nv(this.#a.dataUpdatedAt,e)+1;this.#f=Ja.setTimeout(()=>{this.#a.isStale||this.updateResult()},a)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#x(),this.#c=e,!(go.isServer()||Qt(this.options.enabled,this.#t)===!1||!Mf(this.#c)||this.#c===0)&&(this.#d=Ja.setInterval(()=>{(this.options.refetchIntervalInBackground||rd.isFocused())&&this.#h()},this.#c))}#v(){this.#p(),this.#y(this.#g())}#b(){this.#f!==void 0&&(Ja.clearTimeout(this.#f),this.#f=void 0)}#x(){this.#d!==void 0&&(Ja.clearInterval(this.#d),this.#d=void 0)}createResult(e,a){const i=this.#t,r=this.options,o=this.#a,c=this.#i,d=this.#s,h=e!==i?e.state:this.#n,{state:p}=e;let m={...p},b=!1,v;if(a._optimisticResults){const W=this.hasListeners(),$=!W&&Ig(e,a),R=W&&Wg(e,i,a,r);($||R)&&(m={...m,...Mv(p.data,e.options)}),a._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=m;v=m.data;let j=!1;if(a.placeholderData!==void 0&&v===void 0&&w==="pending"){let W;o?.isPlaceholderData&&a.placeholderData===d?.placeholderData?(W=o.data,j=!0):W=typeof a.placeholderData=="function"?a.placeholderData(this.#l?.state.data,this.#l):a.placeholderData,W!==void 0&&(w="success",v=kf(o?.data,W,a),b=!0)}if(a.select&&v!==void 0&&!j)if(o&&v===c?.data&&a.select===this.#o)v=this.#u;else try{this.#o=a.select,v=a.select(v),v=kf(o?.data,v,a),this.#u=v,this.#r=null}catch(W){this.#r=W}else v===void 0&&(this.#r=null);this.#r&&(x=this.#r,v=this.#u,S=Date.now(),w="error",b=!1);const z=m.fetchStatus==="fetching",T=w==="pending",L=w==="error",G=T&&z,V=v!==void 0;return{status:w,fetchStatus:m.fetchStatus,isPending:T,isSuccess:w==="success",isError:L,isInitialLoading:G,isLoading:G,data:v,dataUpdatedAt:m.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:z,isRefetching:z&&!T,isLoadingError:L&&!V,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:L&&V,isStale:ld(e,a),refetch:this.refetch,isEnabled:Qt(a.enabled,e)!==!1}}updateResult(){const e=this.#a,a=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#s=this.options,this.#i.data!==void 0&&(this.#l=this.#t),po(a,e))return;this.#a=a;const i=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const c=new Set(o??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#a).some(d=>{const h=d;return this.#a[h]!==e[h]&&c.has(h)})};this.#_({listeners:i()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const a=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(a?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#_(e){rt.batch(()=>{e.listeners&&this.listeners.forEach(a=>{a(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function C_(e,a){return Qt(a.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Qt(a.retryOnMount,e)===!1)}function Ig(e,a){return C_(e,a)||e.state.data!==void 0&&Uf(e,a,a.refetchOnMount)}function Uf(e,a,i){if(Qt(a.enabled,e)!==!1&&$n(a.staleTime,e)!=="static"){const r=typeof i=="function"?i(e):i;return r==="always"||r!==!1&&ld(e,a)}return!1}function Wg(e,a,i,r){return(e!==a||Qt(r.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&ld(e,i)}function ld(e,a){return Qt(a.enabled,e)!==!1&&e.isStaleByTime($n(a.staleTime,e))}function M_(e,a){return!po(e.getCurrentResult(),a)}var D_=class extends Cv{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Dv(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(a=>a!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const a=()=>{this.#i({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#a=Rv({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#i({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#i({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",c=!r.canStart();try{if(o)a();else{this.#i({type:"pending",variables:e,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);const h=await this.options.onMutate?.(e,i);h!==this.state.context&&this.#i({type:"pending",context:h,variables:e,isPaused:c})}const d=await r.start();return await this.#n.config.onSuccess?.(d,e,this.state.context,this,i),await this.options.onSuccess?.(d,e,this.state.context,i),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(d,null,e,this.state.context,i),this.#i({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,e,this.state.context,this,i)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,e,this.state.context,i)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,i)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,e,this.state.context,i)}catch(h){Promise.reject(h)}throw this.#i({type:"error",error:d}),d}finally{this.#a===r&&(this.#a=void 0),this.#n.runNext(this)}}#i(e){const a=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=a(this.state),rt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Dv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var k_=class extends oi{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,a,i){const r=new D_({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(a),state:i});return this.add(r),r}add(e){this.#e.add(e);const a=Yl(e);if(typeof a=="string"){const i=this.#t.get(a);i?i.push(e):this.#t.set(a,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const a=Yl(e);if(typeof a=="string"){const i=this.#t.get(a);if(i)if(i.length>1){const r=i.indexOf(e);r!==-1&&i.splice(r,1)}else i[0]===e&&this.#t.delete(a)}}this.notify({type:"removed",mutation:e})}canRun(e){const a=Yl(e);if(typeof a=="string"){const i=this.#t.get(a)?.find(r=>r.state.status==="pending");return!i||i===e}else return!0}runNext(e){const a=Yl(e);return typeof a=="string"?this.#t.get(a)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const a={exact:!0,...e};return this.getAll().find(i=>Yg(a,i))}findAll(e={}){return this.getAll().filter(a=>Yg(e,a))}notify(e){rt.batch(()=>{this.listeners.forEach(a=>{a(e)})})}resumePausedMutations(){const e=this.getAll().filter(a=>a.state.isPaused);return rt.batch(()=>Promise.all(e.map(a=>a.continue().catch(St))))}};function Yl(e){return e.options.scope?.id}var L_=class extends oi{#e;#t=void 0;#n;#a;constructor(a,i){super(),this.#e=a,this.setOptions(i),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){const i=this.options;this.options=this.#e.defaultMutationOptions(a),po(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&ts(i.mutationKey)!==ts(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(a){this.#i(),this.#s(a)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#s()}mutate(a,i){return this.#a=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(a)}#i(){const a=this.#n?.state??Dv();this.#t={...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset}}#s(a){rt.batch(()=>{if(this.#a&&this.hasListeners()){const i=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(a?.type==="success"){try{this.#a.onSuccess?.(a.data,i,r,o)}catch(c){Promise.reject(c)}try{this.#a.onSettled?.(a.data,null,i,r,o)}catch(c){Promise.reject(c)}}else if(a?.type==="error"){try{this.#a.onError?.(a.error,i,r,o)}catch(c){Promise.reject(c)}try{this.#a.onSettled?.(void 0,a.error,i,r,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(i=>{i(this.#t)})})}},U_=class extends oi{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,a,i){const r=a.queryKey,o=a.queryHash??ad(r,a);let c=this.get(o);return c||(c=new A_({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(a),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const a=this.#e.get(e.queryHash);a&&(e.destroy(),a===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){rt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const a={exact:!0,...e};return this.getAll().find(i=>Kg(a,i))}findAll(e={}){const a=this.getAll();return Object.keys(e).length>0?a.filter(i=>Kg(e,i)):a}notify(e){rt.batch(()=>{this.listeners.forEach(a=>{a(e)})})}onFocus(){rt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){rt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Z_=class{#e;#t;#n;#a;#i;#s;#r;#o;constructor(e={}){this.#e=e.queryCache||new U_,this.#t=e.mutationCache||new k_,this.#n=e.defaultOptions||{},this.#a=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#r=rd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=yo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#r?.(),this.#r=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const a=this.defaultQueryOptions({queryKey:e});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(e){const a=this.defaultQueryOptions(e),i=this.#e.build(this,a),r=i.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime($n(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:a,state:i})=>[a,i.data])}setQueryData(e,a,i){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,c=y_(a,o);if(c!==void 0)return this.#e.build(this,r).setData(c,{...i,manual:!0})}setQueriesData(e,a,i){return rt.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,a,i)]))}getQueryState(e){const a=this.defaultQueryOptions({queryKey:e});return this.#e.get(a.queryHash)?.state}removeQueries(e){const a=this.#e;rt.batch(()=>{a.findAll(e).forEach(i=>{a.remove(i)})})}resetQueries(e,a){const i=this.#e;return rt.batch(()=>{const r=i.findAll(e),o=new Set(r);return r.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},a)})}cancelQueries(e,a={}){const i={revert:!0,...a},r=rt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(i)));return Promise.all(r).then(St).catch(St)}invalidateQueries(e,a={}){return rt.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},a)))}refetchQueries(e,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},r=rt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,i);return i.throwOnError||(c=c.catch(St)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(St)}async query(e){const a=this.defaultQueryOptions(e);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a),r=i.isStaleByTime($n(a.staleTime,i))?await i.fetch(a):i.state.data,o=a.select;return o?o(r):r}fetchQuery(e){const a=this.defaultQueryOptions(e);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a);return i.isStaleByTime($n(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(St).catch(St)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(St).catch(St)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return yo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,a){this.#a.set(ts(e),{queryKey:e,defaultOptions:a})}getQueryDefaults(e){const a=[...this.#a.values()],i={};return a.forEach(r=>{ti(e,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(e,a){this.#i.set(ts(e),{mutationKey:e,defaultOptions:a})}getMutationDefaults(e){const a=[...this.#i.values()],i={};return a.forEach(r=>{ti(e,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const a={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return a.queryHash||(a.queryHash=ad(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===sd&&(a.enabled=!1),a}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const kv=ee.createContext(!1),q_=()=>ee.useContext(kv);kv.Provider;function B_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const $_=ee.createContext(B_()),H_=()=>ee.useContext($_),Q_=(e,a,i)=>{const r=i?.state.error&&typeof e.throwOnError=="function"?id(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||r)&&(a.isReset()||(e.retryOnMount=!1))},G_=e=>{ee.useEffect(()=>{e.clearReset()},[e])},K_=({result:e,errorResetBoundary:a,throwOnError:i,query:r,suspense:o})=>e.isError&&!a.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||id(i,[e.error,r])),Y_=e=>{if(e.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>i(r(...o)):i(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},F_=(e,a)=>e?.suspense&&a.isPending,V_=(e,a,i)=>a.fetchOptimistic(e).catch(()=>{i.clearReset()});function P_(e,a,i){const r=q_(),o=H_(),c=as(),d=c.defaultQueryOptions(e),h=c.getQueryCache().get(d.queryHash),p=e.subscribed!==!1;d._optimisticResults=r?"isRestoring":p?"optimistic":void 0,Y_(d),Q_(d,o,h),G_(o);const[m]=ee.useState(()=>new a(c,d)),b=m.getOptimisticResult(d),v=!r&&p;if(ee.useSyncExternalStore(ee.useCallback(x=>{const S=v?m.subscribe(rt.batchCalls(x)):St;return m.updateResult(),S},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),ee.useEffect(()=>{m.setOptions(d)},[d,m]),F_(d,b))throw V_(d,m,o);if(K_({result:b,errorResetBoundary:o,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw b.error;return d.notifyOnChangeProps?b:m.trackResult(b)}function Rt(e,a){return P_(e,R_)}function ui(e,a){const i=as(),[r]=ee.useState(()=>new L_(i,e));ee.useEffect(()=>{r.setOptions(e)},[r,e]);const o=ee.useSyncExternalStore(ee.useCallback(d=>r.subscribe(rt.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=ee.useCallback((...d)=>{r.mutate(d[0],d[1]).catch(St)},[r]);if(o.error&&id(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}const ey=!1;var Lv=ee.useLayoutEffect;function _a(e){return e[e.length-1]}function Uv(e,a){return typeof e=="function"?e(a):e}const od=Object.prototype.hasOwnProperty;function Zv(e){for(const a in e)if(od.call(e,a))return!0;return!1}const lo=()=>Object.create(null),Fs=(e,a)=>xa(e,a,!0);function xa(e,a,i,r=0){if(e===a)return e;if(r++>500)return a;const o=Array.isArray(e)&&Array.isArray(a);if(!o&&!(vo(e)&&vo(a)))return a;const c=Object.keys(e),d=c.length,h=Object.keys(a),p=h.length;if(o?d!==e.length||p!==a.length||d&&_a(c)!==`${d-1}`||p&&_a(h)!==`${p-1}`:d!==Object.getOwnPropertyNames(e).length||p!==Object.getOwnPropertyNames(a).length||Object.getOwnPropertySymbols(a).length)return a;let m=0,b,v,x;if(o){for(;m<p&&(x=m,v=e[x],b=a[x],b=v===b?v:typeof v=="object"?xa(v,b,i,r):b,b===v);m++);if(m===p&&d===p)return e}else{let w=d===p,j=!0;for(;m<p;m++){x=h[m],v=e[x];const z=a[x];b=v===z?v:typeof v=="object"?xa(v,z,i,r):z,w&&=b===v&&(c[m]===x||od.call(e,x)),j&&=Object.is(b,z),c[m]=b}if(w)return Object.getOwnPropertySymbols(e).length?a:e;if(j)return a}const S=o?h.fill(0):i?lo():{};for(let w=0;w<p;w++)x=o?w:h[w],o?(v=e[x],w>m&&(b=a[x],b=v===b?v:typeof v=="object"?xa(v,b,i,r):b),S[x]=w<m?v:b):S[x]=c[w];return S}function vo(e){return!e||typeof e!="object"?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function Hn(e,a,i,r){if(e===a)return!0;if(Array.isArray(e)&&Array.isArray(a)){if(e.length!==a.length)return!1;for(let o=0,c=e.length;o<c;o++){const d=e[o],h=a[o];if(d!==h&&!Hn(d,h,i,r))return!1}return!0}if(vo(e)&&vo(a)){if(i){for(const c in a)if((r||a[c]!==void 0)&&!Hn(e[c],a[c],i,r))return!1;return!0}let o=0;if(r)o=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&o++;for(const c in a)if((r||a[c]!==void 0)&&(o--===0||!Hn(e[c],a[c],i,r)))return!1;return o===0}return!1}const X_=/[\x00-\x1f\x7f"<>`{}]/g;function J_(e){return e.replace(X_,a=>"%"+a.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ty(e){let a;try{a=decodeURI(e)}catch{a=e.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return J_(a)}const I_=["http:","https:","mailto:","tel:"];function vr(e){if(e[0]!=="/"&&e.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const qv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Bv(e,a){if(!e)return!1;if(qv.test(e))return!0;const i=vr(e);return i?!a.has(i):!1}function lr(e){if(!e)return e;let a=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){const i=/%25|%5C/gi;let r=0,o;for(a="";(o=i.exec(e))!==null;)a+=ty(e.slice(r,o.index))+o[0],r=i.lastIndex;a+=ty(r?e.slice(r):e)}return a}function W_(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function e1(e,a){if(e===a)return!0;if(e.length!==a.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==a[i])return!1;return!0}function ud(){throw new Error("Invariant failed")}function Js(e){return e.replace(/\/{2,}/g,"/")}function $v(e){return e==="/"?e:e.replace(/^\/+/,"")}function yn(e){const a=e.length;return a>1&&e[a-1]==="/"?e.replace(/\/+$/,""):e}function Hv(e){return yn($v(e))}function ny(e,a){return e?.endsWith("/")&&e!=="/"&&e!==`${a}/`?e.slice(0,-1):e}function ay(e,a,i="never",r){if(a.includes("//")&&(a=Js(a)),a.startsWith("/"))return a.length===1||i==="preserve"?a:i==="always"?a.endsWith("/")?a:`${a}/`:a.endsWith("/")?a.slice(0,-1):a;const o=a===".";let c;if(r){c=o?e:e+"\0"+a;const m=r.get(c);if(m)return m}let d;if(o)d=e.split("/");else{for(e.includes("//")&&(e=Js(e)),d=e.split("/");d.length>1&&_a(d)==="";)d.pop();const m=a.split("/");for(let b=0,v=m.length;b<v;b++){const x=m[b];x===""?b?b===v-1&&d.push(x):d=[x]:x===".."?d.length>1?d.pop():d=[""]:x==="."||d.push(x)}}d.length>1&&(_a(d)===""?i==="never"&&d.pop():i==="always"&&d.push(""));const h=d.join("/"),p=(o?Js(h):h)||"/";return c&&r&&r.set(c,p),p}function t1(e){const a=new Map(e.map(r=>[encodeURIComponent(r),r])),i=new RegExp([...a.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(i,o=>a.get(o)??o)}function n1(e){return e==null||e===""}function a1(e,a,i){if(typeof a!="string")return""+(a??void 0);const r=e==="_splat";if(r&&(!a||/^[a-zA-Z0-9\-._~!/]*$/.test(a)))return a;let o=encodeURIComponent(a);return r&&(o=o.replaceAll("%2F","/")),i?i(o):o}function sy(e,a,i,r,o){const c=e.endsWith("/")?"/":"";let d="";for(const h of a){if(typeof h=="string"){d+=h;continue}const[p,m,b,v]=h,x=p===2,S=x&&v!==void 0?v+c:v;let w=i[m];if(!(p===3&&w==null)){if(o&&(o[m]=w,x&&(o["*"]=w)),x&&n1(w)){if(b==="/"&&!S)continue;w=""}d+=b+a1(m,w,r)+(S||"")}}return d+c||"/"}function ni(e){return e?.isNotFound===!0}function s1(){try{return sessionStorage}catch{return}}const i1="tsr-scroll-restoration-v1_3",Qv=s1();function r1(){try{return JSON.parse(Qv?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Vs=r1(),iy="data-scroll-restoration-id",l1=e=>e.state.__TSR_key||e.href;function o1(e){const a=e.getAttribute(iy);if(a)return`[${iy}="${a}"]`;let i="",r=e,o;for(;o=r.parentNode;){let c=1,d=r;for(;d=d.previousElementSibling;)c++;const h=`${r.localName}:nth-child(${c})`;i=i?`${h} > ${i}`:h,r=o}return i}let Fl=!1;const oo="window";function Zf(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function ry(e){const a=new Set;for(const i of e){if(i===oo)continue;const r=Zf(i);r&&a.add(r)}return a}function u1(e,a){const i=e.options.scrollRestoration,r=e._scroll;i&&(r.e=!0);const o=e.options.getScrollRestorationKey||l1,c=new Set,d=h=>{const p=Vs[h]||={};for(const m of c)m===document?p[oo]={scrollX,scrollY}:m.isConnected&&(p[o1(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};i&&!r.s&&(r.s=!0,Fl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{Fl||c.add(h.target)},!0),e.subscribe("onBeforeLoad",h=>{h.fromLocation&&d(o(h.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",d(o(e.stores.resolvedLocation.get()??e.stores.location.get()));try{Qv?.setItem(i1,JSON.stringify(Vs))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!r.r&&(r.r=!0,e.subscribe("onRendered",h=>{const p=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors,b=r.n,v=r.h;let x;if(c.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const S=o(h.toLocation),w=h.fromLocation&&o(h.fromLocation);if(r.e&&w&&w!==S){const j=Vs[w];if(j){let z=Vs[S];for(const T in j){if(T===oo){if(b)continue}else{const L=Zf(T);if(!L||b&&m&&(x??=ry(m),x.has(L)))continue}z||(z=Vs[S]={}),z[T]??=j[T]}}}Fl=!0;try{const j=h.toLocation.hash,z=h.toLocation.state.__hashScrollIntoViewOptions??!0;let T=!1;if(b){!j&&m&&(x??=ry(m));const L=j&&z&&v,G=r.e?Vs[S]:void 0;if(G)for(const V in G){const{scrollX:W,scrollY:$}=G[V];if(V===oo){if(L)continue;scrollTo({top:$,left:W,behavior:p}),T=!0}else{const R=Zf(V);R&&(R.scrollLeft=W,R.scrollTop=$,x?.delete(R))}}if(!j){const V={top:0,left:0,behavior:p};if(T||scrollTo(V),x)for(const W of x)W.scrollTo(V)}}!T&&j&&z&&document.getElementById(j)?.scrollIntoView(z)}finally{Fl=!1}}))}function c1(e,a=String){let i;for(const r in e){const o=e[r];o!==void 0&&(i||=new URLSearchParams).set(r,a(o))}return i?i.toString():""}function hf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function f1(e){const a=new URLSearchParams(e),i=Object.create(null);for(const[r,o]of a.entries()){const c=i[r];c==null?i[r]=hf(o):Array.isArray(c)?c.push(hf(o)):i[r]=[c,hf(o)]}return i}const Gv=/^(?:\s|["[{\d-]|fa|nu|tr)/,d1=m1(JSON.parse),h1=p1(JSON.stringify,JSON.parse);function m1(e){const a=e===JSON.parse;return i=>{i[0]==="?"&&(i=i.slice(1));const r=f1(i);for(const o in r){const c=r[o];if(typeof c=="string"){if(a&&!Gv.test(c))continue;try{r[o]=e(c)}catch{}}}return r}}function p1(e,a){const i=a===JSON.parse;function r(o){if(o&&typeof o=="object")try{return e(o)}catch{}else if(a&&typeof o=="string"){if(i&&!Gv.test(o))return o;try{return a(o),e(o)}catch{}}return o}return o=>{const c=c1(o,r);return c?`?${c}`:""}}const Is="__root__";function g1(e){e.statusCode=e.statusCode||e.code||307;const a=new Headers(e.headers);e.href&&a.get("Location")===null&&a.set("Location",e.href);const i=new Response(null,{status:e.statusCode,headers:a});if(i.options=e,e.throw)throw i;return i}function Kv(e){return e instanceof Response&&!!e.options}function bo(e){const a=new Map;let i,r;return{get(o){const c=a.get(o);if(c)return c.visited=!0,c.value},set(o,c){const d=a.get(o);if(d){d.value=c;return}if(a.size>=e){let p=i?.next().value;for(;!p||p.visited;)p?p.visited=!1:i=a.values(),p=i.next().value;p===r&&(i=void 0),a.delete(p.key)}const h={key:o,value:c,visited:!1};r=h,a.set(o,h)},clear(){a.clear(),i=void 0,r=void 0}}}const ba=4,Yv=5;function y1(e){const a=e.names;if(a)return a;const i=[];for(const r of e)typeof r!="string"&&i.push(r[1]);return e.names=i}function v1(e,a,i){const r=e.slice(a,i);if(r.charCodeAt(0)===36)return r.length===1?[2,"_splat","",void 0]:[1,r.slice(1),"",""];const o=r.indexOf("{");if(o>=0){const c=r.indexOf("}",o),d=r.charCodeAt(o+1)===45,h=o+(d?3:2);if(c>=0&&r.charCodeAt(h-1)===36&&(!d||h<c)){const p=r.slice(h,c);return[d?3:p?1:2,p||"_splat",r.slice(0,o),e.slice(a+c+1,p?i:e.length)]}}return r}function br(e,a,i,r,o,c){let d=i;const h=a.fullPath??a.from,p=a.options,m=h.length,b=h.endsWith("/")?m-1:m,v=p?.caseSensitive??e,x=p?.params?.parse??p?.parseParams;let S,w=c?i-1:0;if(!r||h.includes("$")){S=c?.slice()??[];const T=_a(S);T&&typeof T!="string"&&T[0]===2&&(S[S.length-1]=[T[0],T[1],T[2],T[3]===void 0?void 0:T[3]+h.substring(i-(h[i-2]==="/"?2:1),b)],w=m)}for(;d<m;){const T=d,L=h.indexOf("/",T);let G=L===-1?m:L;const V=v1(h,T,G);d=G+1;let W;if(typeof V=="string"){if(!r)continue;let $=V,R;v?R=r.static??=new Map:($=V.toLowerCase(),R=r.staticInsensitive??=new Map);const J=R.get($);if(J)W=J;else{const ie=Ia(r);W=ie,R.set($,ie)}}else{const $=V[0];let R=V[2],J=V[3]??"";if($===2&&(G=m,d=G+1),S&&w<G&&(w<T-1&&S.push(h.slice(w,T-1)),V[2]="/"+R,$===2&&V[3]!==void 0&&b<m&&(V[3]=J.slice(0,-1)),S.push(V),w=G),!r)continue;const ie=v&&!!(R||J);v||(R=R.toLowerCase(),J=J.toLowerCase());const re=$===1?r.dynamic??=[]:$===3?r.optional??=[]:r.wildcard??=[],P=$!==2&&!x&&re.find(I=>!I.parse&&I.caseSensitive===ie&&I.prefix===R&&I.suffix===J);if(P)W=P;else{const I=Ia(r,$,ie,R,J);W=I,re.push(I),re.length===2&&o?.push(re)}}r=W}S&&w<b&&S.push(h.slice(w,b));const j=S?.slice();if(!r)return j;if(x&&a.children&&!a.isRoot&&a.id&&a.id.charCodeAt(a.id.lastIndexOf("/")+1)===95){const T=Ia(r,Yv);(r.pathless??=[]).push(T),r=T}const z=(a.path||!a.children)&&!a.isRoot;if(z&&b<m){const T=Ia(r,ba);r.index=T,r=T}return r.parse=x??null,r.priority=p?.params?.priority??0,r.route||(r.data=j,z&&(r.route=a)),[r,d,j]}function Fv(e,a){if(e.parse&&!a.parse)return-1;if(!e.parse&&a.parse)return 1;if(e.parse&&a.parse&&(e.priority||a.priority))return a.priority-e.priority;if(e.prefix&&a.prefix&&e.prefix!==a.prefix){if(e.prefix.startsWith(a.prefix))return-1;if(a.prefix.startsWith(e.prefix))return 1}if(e.suffix&&a.suffix&&e.suffix!==a.suffix){if(e.suffix.endsWith(a.suffix))return-1;if(a.suffix.endsWith(e.suffix))return 1}return e.prefix&&!a.prefix?-1:!e.prefix&&a.prefix?1:e.suffix&&!a.suffix?-1:!e.suffix&&a.suffix?1:e.caseSensitive&&!a.caseSensitive?-1:!e.caseSensitive&&a.caseSensitive?1:0}function Ia(e,a=0,i,r,o){return{kind:a,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:i,prefix:r,suffix:o}}function b1(e,a){const i=Ia(),r=[];function o(c,d,h,p){const[m,b,v]=br(!1,c,d,h,r,p);if(c.children)for(const x of c.children)o(x,b,m,v)}for(const c of e)o(c,1,i);for(const c of r)c.sort(Fv);a.masksTree=i,a.flatCache=bo(1e3)}function x1(e,a){e||="/";const i=a.flatCache.get(e);if(i!==void 0)return i;const r=cd(e,a.masksTree);return a.flatCache.set(e,r),r}function S1(e,a,i,r,o){e||="/",r||="/";const c=a?`case\0${e}`:e;let d=o.singleCache.get(c);return d||(d=Ia(),br(a,{from:e},1,d),o.singleCache.set(c,d)),cd(r,d,i)}function _1(e,a,i=!1){const r=i?e:`nofuzz\0${e}`,o=a.matchCache.get(r);if(o!==void 0)return o;e||="/";let c;try{c=cd(e,a.segmentTree,i)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=Pv(c.route)),a.matchCache.set(r,c),c}function w1(e,a=!1){const i=Ia(),r=[],o={},c={};let d=0;function h(p,m,b,v){if(p.init(d),p.id in o&&ud(),o[p.id]=p,d!==0&&p.path){const j=yn(p.fullPath);(!c[j]||p.fullPath.endsWith("/"))&&(c[j]=p)}d++;const[x,S,w]=br(a,p,m,b,r,v);if(p._interpolation=w,p.children)for(const j of p.children)h(j,S,x,w)}h(e,1,i);for(const p of r)p.sort(Fv);return{processedTree:{segmentTree:i,singleCache:bo(1e3),matchCache:bo(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function cd(e,a,i=!1){const r=e.split("/"),o=O1(e,r,a,i);if(!o)return null;const[c]=Vv(e,r,o);return{route:o.node.route,rawParams:c}}function Vv(e,a,i){const r=j1(i.node),o=i.node.data&&y1(i.node.data),c=Object.create(null);let d=i.extract?.part??0,h=i.extract?.node??0,p=i.extract?.path??0,m=i.extract?.param??0;for(;h<r.length;d++,h++,p++){const b=r[h];if(b.kind===ba)break;if(b.kind===Yv){d--,p--;continue}const v=a[d],x=p;if(v&&(p+=v.length),b.kind===1||b.kind===3){const S=o[m++];if(b.kind===3&&i.skipped&1<<h){d--,p=x-1;continue}const w=b.suffix||b.prefix?v.substring(b.prefix.length,v.length-b.suffix.length):v;(w||b.kind===1)&&(c[S]=decodeURIComponent(w))}else if(b.kind===2){const S=b,w=e.substring(x+S.prefix.length,e.length-S.suffix.length),j=decodeURIComponent(w);c["*"]=j,c._splat=j;break}}return i.rawParams&&Object.assign(c,i.rawParams),[c,{part:d,node:h,path:p,param:m}]}function Pv(e){const a=[e];for(;e.parentRoute;)e=e.parentRoute,a.push(e);return a.reverse(),a}function j1(e){const a=Array(e.depth+1);do a[e.depth]=e,e=e.parent;while(e);return a}function O1(e,a,i,r){if(e==="/"&&i.index)return{node:i.index,skipped:0};const o=!_a(a),c=o&&e!=="/",d=a.length-(o?1:0),h=[{node:i,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const b=h.pop(),{node:v,index:x,skipped:S,statics:w,dynamics:j,optionals:z}=b;let{extract:T,rawParams:L}=b;if(v.kind===2&&v.route&&!Pl(m,b))continue;if(v.parse){if(!ly(e,a,b))continue;L=b.rawParams,T=b.extract}r&&v.route&&v.kind!==ba&&Pl(p,b)&&(p=b);const G=x===d;if(G&&(v.route&&(!c||v.kind===ba||v.kind===2)&&Pl(m,b)&&(m=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const V=G?void 0:a[x];let W;if(G&&v.index){const $={node:v.index,index:x,skipped:S,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L};let R=!0;if(v.index.parse&&(ly(e,a,$)||(R=!1)),R){if(!j&&!z&&!S&&E1(w,d))return $;Pl(m,$)&&(m=$)}}if(v.wildcard)for(let $=v.wildcard.length-1;$>=0;$--){const R=v.wildcard[$],{prefix:J,suffix:ie}=R;if(!(J&&(G||!(R.caseSensitive?V:W??=V.toLowerCase()).startsWith(J)))){if(ie){if(G)continue;const re=a.slice(x).join("/"),P=re.slice(-ie.length);if((R.caseSensitive?P:P.toLowerCase())!==ie||re.length-ie.length<J.length)continue}h.push({node:R,index:d,skipped:S,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L})}}if(v.optional){const $=S|1<<v.depth+1;for(let R=v.optional.length-1;R>=0;R--){const J=v.optional[R];h.push({node:J,index:x,skipped:$,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L})}if(!G)for(let R=v.optional.length-1;R>=0;R--){const J=v.optional[R],{prefix:ie,suffix:re}=J;if(ie||re){const P=J.caseSensitive?V:W??=V.toLowerCase();if(ie&&!P.startsWith(ie)||re&&P.indexOf(re,P.length-re.length)<ie.length)continue}h.push({node:J,index:x+1,skipped:S,statics:w,dynamics:j,optionals:z+Vl(d,x),extract:T,rawParams:L})}}if(!G&&v.dynamic&&V)for(let $=v.dynamic.length-1;$>=0;$--){const R=v.dynamic[$],{prefix:J,suffix:ie}=R;if(J||ie){const re=R.caseSensitive?V:W??=V.toLowerCase();if(J&&!re.startsWith(J)||ie&&re.indexOf(ie,re.length-ie.length)<J.length)continue}h.push({node:R,index:x+1,skipped:S,statics:w,dynamics:j+Vl(d,x),optionals:z,extract:T,rawParams:L})}if(!G&&v.staticInsensitive){const $=v.staticInsensitive.get(W??=V.toLowerCase());$&&h.push({node:$,index:x+1,skipped:S,statics:w+Vl(d,x),dynamics:j,optionals:z,extract:T,rawParams:L})}if(!G&&v.static){const $=v.static.get(V);$&&h.push({node:$,index:x+1,skipped:S,statics:w+Vl(d,x),dynamics:j,optionals:z,extract:T,rawParams:L})}if(v.pathless)for(let $=v.pathless.length-1;$>=0;$--){const R=v.pathless[$];h.push({node:R,index:x,skipped:S,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L})}}if(m)return m;if(r&&p){let b=p.index;for(let x=0;x<p.index;x++)b+=a[x].length;const v=b===e.length?"/":e.slice(b);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(v),p}return null}function Vl(e,a){return 2**(e-a-1)}function E1(e,a){return e===2**(a-1)-1}function ly(e,a,i){let r,o;try{[r,o]=Vv(e,a,i)}catch{return null}if(i.rawParams=r,i.extract=o,!i.node.parse)return!0;try{if(i.node.parse(r)===!1)return null}catch{}return!0}function Pl(e,a){return e?a.statics>e.statics||a.statics===e.statics&&(a.dynamics>e.dynamics||a.dynamics===e.dynamics&&(a.optionals>e.optionals||a.optionals===e.optionals&&((a.node.kind===ba)>(e.node.kind===ba)||a.node.kind===ba==(e.node.kind===ba)&&a.node.depth>e.node.depth))):!0}function N1(e,a,i){const r=Hv(e),o=`/${r}`,c=a?o:o.toLowerCase(),d=`${c}/`,h={input:({url:p})=>{const m=a?p.pathname:p.pathname.toLowerCase();return m===c?p.pathname="/":m.startsWith(d)&&(p.pathname=p.pathname.slice(o.length)),p},output:({url:p})=>(p.pathname=Js(`/${r}${p.pathname}`),p)};return i?{input:({url:p})=>qf(i,h.input({url:p})),output:({url:p})=>h.output({url:Xv(i,p)})}:h}function qf(e,a){const i=e?.input?.({url:a});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return a}function Xv(e,a){const i=e?.output?.({url:a});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return a}function z1(e,a){const{createMutableStore:i,createReadonlyStore:r,batch:o}=a,c=new Map,d=i("idle"),h=i(e),p=i(void 0),m=i([]),b=r(()=>m.get().map(j=>c.get(j).get())),v=r(()=>({status:d.get(),isLoading:d.get()==="pending",matches:b.get(),location:h.get(),resolvedLocation:p.get()}));function x(j){let z=c.get(j);return z||(z=i(void 0),c.set(j,z)),z}const S={status:d,location:h,resolvedLocation:p,ids:m,matches:b,byRoute:c,__store:v,getMatchStore:x,setMatches:w};function w(j){const z=m.get(),T=j.map(L=>L.routeId);o(()=>{e1(z,T)||m.set(T);for(const L of z)T.includes(L)||c.get(L).set(()=>{});for(const L of j){const G=x(L.routeId);G.get()!==L&&G.set(L)}})}return S}var Sa="__TSR_index",oy="popstate",uy="beforeunload",T1=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function uo(e){const a=T1.exec(e);return a?"/"+e.slice(a[0].length):e}function Jv(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,a=>`
10
+ \r`.includes(a)?"":encodeURIComponent(a))),uo(e)}function A1(e){let a=e.getLocation();const i=new Set,r=d=>{a=e.getLocation(),i.forEach(h=>h({location:a,action:d}))},o=d=>{e.notifyOnIndexChange??!0?r(d):a=e.getLocation()},c=async d=>{const h=d.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<"u"&&h?.length&&(d.type==="PUSH"||d.type==="REPLACE"))for(const p of h){const m=xo(d.path,d.state);if(await p.blockerFn({currentLocation:a,nextLocation:m,action:d.type})){e.onBlocked?.();return}}d.task()};return{get location(){return a},get length(){return e.getLength()},subscribers:i,subscribe:d=>(i.add(d),()=>{i.delete(d)}),push:(d,h,p)=>{const m=a.state[Sa];h=cy(m+1,h),c({task:()=>{e.pushState(d,h),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:d,state:h})},replace:(d,h,p)=>{const m=a.state[Sa];h=cy(m,h),c({task:()=>{e.replaceState(d,h),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:d,state:h})},go:(d,h)=>{c({task:()=>{e.go(d,h?.ignoreBlocker??!1),o({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{c({task:()=>{e.back(d?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{c({task:()=>{e.forward(d?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>a.state[Sa]!==0,createHref:d=>e.createHref(d),block:d=>{if(!e.setBlockers)return()=>{};const h=e.getBlockers?.()??[];return e.setBlockers([...h,d]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(m=>m!==d))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function cy(e,a){const i=fd();return{...a,key:i,__TSR_key:i,[Sa]:e}}function R1(e){const a=typeof document<"u"?window:void 0,i=a.history.pushState,r=a.history.replaceState;let o=[];const c=()=>o,d=R=>o=R,h=R=>Jv(R),p=(()=>xo(`${a.location.pathname}${a.location.search}${a.location.hash}`,a.history.state));if(!a.history.state?.__TSR_key&&!a.history.state?.key){const R=fd();a.history.replaceState({[Sa]:0,key:R,__TSR_key:R},"")}let m=p(),b,v=!1,x=!1,S=!1,w=!1;const j=()=>m;let z;const T=()=>{z&&($._ignoreSubscribers=!0,(z[2]?a.history.pushState:a.history.replaceState)(z[1],"",z[0]),$._ignoreSubscribers=!1,z=void 0,b=void 0)},L=(R,J,ie)=>{const re=!!z;re||(b=m),m=xo(J,ie),z=[m.href,ie,z?.[2]||R],re||queueMicrotask(()=>T())},G=R=>{m=p(),$.notify({type:R})},V=async()=>{if(w=!1,x){x=!1;return}const R=p(),J=R.state[Sa]-m.state[Sa],ie=J===1,re=J===-1,P=!ie&&!re||v;v=!1;const I=P?"GO":re?"BACK":"FORWARD",fe=P?{type:"GO",index:J}:{type:re?"BACK":"FORWARD"};if(S)S=!1;else{const ye=c();if(typeof document<"u"&&ye.length){for(const pe of ye)if(await pe.blockerFn({currentLocation:m,nextLocation:R,action:I})){x=!0,a.history.go(-J),$.notify(fe);return}}}m=p(),$.notify(fe)},W=R=>{if(w){w=!1;return}let J=!1;const ie=c();if(typeof document<"u"&&ie.length)for(const re of ie){const P=re.enableBeforeUnload??!0;if(P===!0){J=!0;break}if(typeof P=="function"&&P()===!0){J=!0;break}}if(J)return R.preventDefault(),R.returnValue=""},$=A1({getLocation:j,getLength:()=>a.history.length,pushState:(R,J)=>L(!0,R,J),replaceState:(R,J)=>L(!1,R,J),back:R=>(R&&(S=!0,w=!0),a.history.back()),forward:R=>{R&&(S=!0,w=!0),a.history.forward()},go:(R,J)=>{v=!0,J&&(S=!0,w=!0),a.history.go(R)},createHref:h,flush:T,destroy:()=>{a.history.pushState=i,a.history.replaceState=r,a.removeEventListener(uy,W,{capture:!0}),a.removeEventListener(oy,V)},onBlocked:()=>{b&&m!==b&&(m=b)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return $._ignoreNextBeforeUnload=R=>{w=!1;try{R=new URL(R,a.document.baseURI).href,w=/^https?:/.test(R)&&(!R.includes("#")||R.split("#")[0]!==a.location.href.split("#")[0])}catch{}},a.addEventListener(uy,W,{capture:!0}),a.addEventListener(oy,V),a.history.pushState=function(...R){const J=i.apply(a.history,R);return $._ignoreSubscribers||G("PUSH"),J},a.history.replaceState=function(...R){const J=r.apply(a.history,R);return $._ignoreSubscribers||G("REPLACE"),J},$}function xo(e,a){const i=Jv(e),r=i.indexOf("#"),o=i.indexOf("?");if(!a){const c=fd();a={[Sa]:0,key:c,__TSR_key:c}}return{href:i,pathname:i.slice(0,r>-1?o>-1?Math.min(r,o):r:o>-1?o:i.length),hash:r>-1?i.slice(r):"",search:o>-1?i.slice(o,r===-1?void 0:r):"",state:a}}function fd(){return(Math.random()+1).toString(36).slice(7)}function mf(e,a){return e.protocol!=="http:"&&e.protocol!=="https:"||e.origin!==a||!!e.username||!!e.password}function pf(e){return e.pathname+e.search+e.hash}function fy(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Co(e,a){return{fromLocation:a,toLocation:e,pathChanged:a?.pathname!==e.pathname,hrefChanged:a?.href!==e.href,hashChanged:a?.hash!==e.hash}}function dy({key:e,__TSR_key:a,__TSR_index:i,__hashScrollIntoViewOptions:r,...o}){return o}function C1(e){return e.findIndex(a=>a.status==="error"||a.status==="notFound"||a._notFound)+1}function M1(e,a,i,r,o,c){r&&(a=a.slice(0,r)),o&&(i=i.slice(0,o));for(const d of a){if(c&&e._tx!==c)return;i.some(h=>h.routeId===d.routeId)||e.routesById[d.routeId].options.onLeave?.(d)}for(const d of i){if(c&&e._tx!==c)return;e.routesById[d.routeId].options[a.some(h=>h.routeId===d.routeId)?"onStay":"onEnter"]?.(d)}}var D1=class{constructor(e,a){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async i=>(i(),!1),this.update=i=>{const r=this.options;this.options={...r,...i},this.isServer=this.options.isServer??ey??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=R1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const o=this.options.basepath??"/",c=this.options.rewrite,d=this.basepath!==o||r?.rewrite!==c||r?.caseSensitive!==this.options.caseSensitive;if(d&&(this.basepath=o,this.rewrite=o!=="/"&&Hv(o)?N1(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||ey){this.routeTree=this.options.routeTree;let h;h=this.buildRouteTree(),this.setRoutes(h)}if(this.stores)d&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=z1(this.latestLocation,h),u1(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=w1(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&b1(this.options.routeMasks,i.processedTree),{...i,resolvePathCache:bo(1e3)}},this.subscribe=(i,r)=>{const o={eventType:i,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=i=>{for(const r of this.subscribers)if(r.eventType===i.type)try{r.fn(i)}catch(o){console.error(o)}},this.parseLocation=(i,r)=>{const o=({pathname:p,search:m,hash:b,href:v},x)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const z=this.options.parseSearch(m),T=this.options.stringifySearch(z);return{href:p+T+b,publicHref:p+T+b,pathname:lr(p),external:!1,searchStr:T,search:Fs(r?.search,z),hash:lr(b.slice(1)),state:xa(r?.state,x)}}const S=qf(this.rewrite,new URL(v,this.origin)),w=this.options.parseSearch(S.search),j=this.options.stringifySearch(w);return S.search=j,{href:S.href.replace(S.origin,""),publicHref:v,pathname:lr(uo(S.pathname)),external:!!this.rewrite&&mf(S,this.origin),searchStr:j,search:Fs(r?.search,w),hash:lr(S.hash.slice(1)),state:xa(r?.state,x)}},c=o(i,i.state),{__tempLocation:d,__tempKey:h}=c.state;if(d&&(!h||h===this.tempLocationKey)){const p=o(d,{...d.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return p.maskedLocation=c,p}return c},this.matchRoutes=(i,r,o)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},o):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>{const r=Object.create(null),o=_1(yn(i),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=i=>{{const d=this.staticLocations.get(i);if(d)return d}let r=!1;const o=(d={})=>{if(d.href){const ye=xo(d.href,{});d={...d,to:qf(this.rewrite,new URL(ye.pathname,this.origin)).pathname,search:this.options.parseSearch(ye.search),hash:ye.hash.slice(1)}}const h=i._fromLocation||this._pendingLocation||this.latestLocation;let p;const m=()=>(r=!0,h),b=()=>p??=this.matchRoutesLightweight(m()),v=d.to?`${d.to}`:".",x=ay(v[0]==="/"?"":d.unsafeRelative==="path"?m().pathname:d.from??b()[1],v,this.options.trailingSlash,this.resolvePathCache),S=this.routesByPath[yn(x)],w=x.includes("$");let j;if(S)j=S._branch??=Pv(S);else if(w)j=[];else{const[ye,pe,U]=this.getMatchedRoutes(x);j=ye,this.options.notFoundRoute&&(!U||U.path!=="/"&&pe["**"])&&(j=[...j,this.options.notFoundRoute])}const z=w?S?._interpolation??br(!1,{fullPath:x},0):void 0;let T;for(const ye of j){const pe=ye.options.params?.stringify??ye.options.stringifyParams;if(pe){const U=b()[3];if(T??=gf(d.params,U),!Zv(T))break;T===U&&(T=Object.assign(lo(),T));try{Object.assign(T,pe(T))}catch{}}}T??=gf(d.params,L1(d.params,z)?b()[3]:yf);const L=i.leaveParams?x:uo(lr(z?sy(x,z,T,this.pathParamsDecoder):x)),G=U1(j,i._includeValidateSearch),V=()=>{let ye=b()[2];if(i._includeValidateSearch&&this.options.search?.strict){const pe={};j.forEach(U=>{if(U.options.validateSearch)try{Object.assign(pe,co(U.options.validateSearch,{...pe,...ye}))}catch{}}),ye=pe}return ye},W=G.length?Z1(G,V(),d):d.search===!0?V():typeof d.search=="function"?d.search(V()):d.search||yf,$=this.options.stringifySearch(W),R=d.hash===!0?m().hash:typeof d.hash=="function"?d.hash(m().hash):d.hash||void 0,J=R?`#${R}`:"",ie=d.state?d.state===!0?m().state:typeof d.state=="function"?d.state(m().state):d.state:yf,re=`${L}${$}${J}`;let P,I,fe=!1;if(this.rewrite){const ye=new URL(re,this.origin),pe=ye.origin,U=Xv(this.rewrite,ye);P=pf(ye),mf(U,pe)?(I=U.href,fe=!0):I=uo(pf(U))}else P=W_(re),I=P;return{publicHref:I,href:P,pathname:L,search:W,searchStr:$,state:ie,hash:R??"",external:fe,unmaskOnReload:d.unmaskOnReload}},c=o(i);if(i.mask)c.maskedLocation=o({from:i.from,...i.mask});else if(this.options.routeMasks){const d=x1(c.pathname,this.processedTree);if(d){const h=Object.assign(lo(),d.rawParams),{from:p,params:m,...b}=d.route,v=gf(m,h);c.maskedLocation=o({from:i.from,...b,params:v})}}return!r&&i._fromLocation&&this.staticLocations.set(i,c),c},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...o})=>{const c=o.maskedLocation??o;if(c.external)return hy(this,c.publicHref,{replace:o.replace,ignoreBlocker:r});let d;const h=yn(this.latestLocation.href)===yn(o.href)&&Hn(dy(o.state),dy(this.latestLocation.state)),p=this._commitPromise;let m;const b=new Promise(v=>{m=v});if(b.resolve=()=>{m(),p?.resolve()},this._commitPromise=b,h)this.load();else{let{maskedLocation:v,hashScrollIntoView:x,...S}=o;v&&(S={...v,state:{...v.state,__tempKey:void 0,__tempLocation:{...S,search:S.searchStr,state:{...S.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(S.unmaskOnReload??this.options.unmaskOnReload??!1)&&(S.state.__tempKey=this.tempLocationKey)),S.state={...S.state,__hashScrollIntoViewOptions:x??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=i,d=o.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](S.publicHref,S.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:d}})}return this._scroll.n=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:d,...h}={})=>{const p=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=p;const m=this.commitLocation({...p,viewTransition:c,replace:i,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),m},this.navigate=async({to:i,reloadDocument:r,href:o,publicHref:c,...d})=>{const h=o?vr(o):void 0;if(h||r){if(i!==void 0||!o){const m=this.buildLocation({to:i,...d}),b=m.maskedLocation??m;o??=b.publicHref,c??=b.publicHref}return hy(this,!h&&c?c:o,d)}return this.buildAndCommitLocation({...d,href:o,to:i,_isNavigate:!0})},this.load=async i=>{this.updateLatestLocation(),i?.action&&(this._scroll.h=i.action.type==="PUSH"||i.action.type==="REPLACE"),await V1(this,i)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,d=this.stores.resolvedLocation.get(),h=typeof r.types=="function"?r.types(Co(c,d)):r.types;if(h===!1)return i();o={update:i,types:h}}else o=i;return document.startViewTransition(o).updateCallbackDone}return i()},this.invalidate=i=>{const r=this._committed,o=i?.filter,c=this._preloads,d=new Set,h=b=>{(!o||o(b))&&d.add(b.id)};r.forEach(h),this._cache.forEach(h),c?.forEach(b=>b.forEach(h)),this._tx?.[3].forEach(h);const p=[];for(const[b,v]of c??[])v.some(x=>d.has(x.id))&&(c.delete(b),p.push(b));const m=b=>{if(d.has(b.id)){const v=this.routesById[b.routeId],x={...b,invalid:!0,...(i?.forcePending||b.status==="error"||b.status==="notFound")&&fy(v)?{status:"pending",error:void 0}:void 0};return b._flight=void 0,x}return b};this._committed=r.map(m);for(const[b,v]of this._cache)d.has(b)&&(v.invalid=!0,i?.forcePending&&(v.status="pending"));for(const b of d){const v=this._flights?.get(b);this._flights?.delete(b),v&&!v[2]&&p.push(v[1])}for(const b of p)b.abort();return this.shouldViewTransition=!1,this.load({sync:i?.sync})},this.resolveRedirect=i=>{const r=i.options;let o=i.headers.get("Location")||r.href;if(!o){const d=this.buildLocation(r);o=(d.maskedLocation??d).publicHref||"/"}let c;if(qv.test(o)||(c=vr(o))&&!this.protocolAllowlist.has(c))throw new Error("Redirect blocked: unsafe protocol");if(c==="http:"||c==="https:"){const d=new URL(o);d.pathname.startsWith("//")?o=d.href:mf(d,this.origin)||(o=pf(d),c=void 0)}return c&&(r.reloadDocument=!0),r.href=o,i.headers.set("Location",o),i},this.clearCache=i=>{const r=this._cache,o=this._preloads,c=i?.filter,d=[],h=[];for(const[m,b]of r)(!c||c(b))&&(h.push(m),d.push(b));const p=[];for(const[m,b]of o??[])(!c||b.some(c))&&(p.push(m),d.push(...b));for(const m of h)r.delete(m);for(const m of p)o.delete(m);for(const m of d){const b=m._flight;m._flight=void 0,b&&!--b[2]&&(this._flights?.get(m.id)===b&&this._flights.delete(m.id),p.push(b[1]))}for(const m of p)m.abort()},this.loadRouteChunk=Ws,this.preloadRoute=i=>P1(this,i),this.matchRoute=(i,r)=>{const o={...i,to:i.to?ay(i.from||"",i.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:i.params||{},leaveParams:!0},c=this.buildLocation(o),d=this.stores.status.get()==="pending";if(r?.pending&&!d)return!1;const h=r?.pending??!d?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=S1(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,h.pathname,this.processedTree);return!p||i.params&&!Hn(p.rawParams,i.params,!0)?!1:r?.includeSearch??!0?Hn(h.search,c.search,!0)?p.rawParams:!1:p.rawParams},this.getStoreConfig=a,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=t1(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??h1,parseSearch:e.parseSearch??d1,protocolAllowlist:e.protocolAllowlist??I_}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const a=this.options.notFoundRoute;a&&(a.init(99999999999),this.routesById[a.id]!==a&&(a._interpolation=br(!1,a,0)),this.routesById[a.id]=a)}matchRoutesInternal(e,a){const[i,r,o]=this.getMatchedRoutes(e.pathname);let c=i,d=!1;(o?o.path!=="/"&&r["**"]:yn(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const h=d?q1(this.options.notFoundMode,c):void 0,p=new Array(c.length),m=this._committed,b=(x,S)=>{const w=m[S];return w?.routeId===x.id?w:x===this.options.notFoundRoute?m.find(j=>j.routeId===x.id):void 0};let v;for(let x=0;x<c.length;x++){const S=c[x],w=p[x-1];let j,z,T;{const fe=w?.search??e.search,ye=w?._strictSearch??void 0;try{const pe=co(S.options.validateSearch,{...fe})??void 0;j={...fe,...pe},z={...ye,...pe}}catch(pe){let U=pe;if(pe instanceof So||(U=new So(pe.message,{cause:pe})),a?.throwOnError)throw U;j=fe,z={},T=U}}let L="",G="";try{L=S.options.loaderDeps?.({search:j})??"",G=L&&JSON.stringify(L)||""}catch(fe){if(a?.throwOnError)throw fe;T??=fe}const V=lo(),W=S._interpolation?sy(S.fullPath,S._interpolation,r,this.pathParamsDecoder,V):S.fullPath,$=S.id+W+G,R=b(S,x),J=this._cache.get($)??(R?.id===$?R:void 0);v=J?._strictParams??Object.assign(V,v);let ie;if(!J)try{my(S,v)}catch(fe){if(ni(fe)||Kv(fe)?ie=fe:ie=new k1(fe.message,{cause:fe}),a?.throwOnError)throw ie}const re=R?"stay":"enter";let P;if(J)P={...J,cause:re,search:Fs(R?R.search:J.search,j),_strictSearch:z,searchError:T};else{const fe=fy(S)?"pending":"success";P={id:$,ssr:S.options.ssr,index:x,routeId:S.id,params:R?.params??v,_strictParams:v,pathname:W,updatedAt:Date.now(),search:R?Fs(R.search,j):j,_strictSearch:z,searchError:T,status:fe,isFetching:!1,error:void 0,paramsError:ie,context:{},abortController:a?._controller??new AbortController,cause:re,loaderDeps:R?xa(R.loaderDeps,L):L,invalid:!1,preload:!1,staticData:S.options.staticData||{},fullPath:S.fullPath}}const I=h===S.id;P._notFound&&!I&&(P.error=void 0),P._notFound=I,p[x]=P}for(let x=0;x<p.length;x++){const S=p[x];S.params=S.cause==="stay"?Fs(S.params,v):v,a?._controller&&(S.context={})}return p}matchRoutesLightweight(e){const a=_a(this.stores.ids.get()),i=a?this.stores.byRoute.get(a).get():void 0,r=i?.id,o=this.lightweightCache.get(e);if(o&&o[0]===r)return o[1];const[c,d]=this.getMatchedRoutes(e.pathname),h=_a(c),p={...e.search};for(const x of c)try{Object.assign(p,co(x.options.validateSearch,p))}catch{}const m=i&&i.routeId===h.id&&i.pathname===e.pathname;let b;if(m)b=i.params;else{const x=d;for(const S of c)try{my(S,x)}catch{}b=x}const v=[c,h.fullPath,p,b];return this.lightweightCache.set(e,[r,v]),v}};async function hy(e,a,{replace:i,ignoreBlocker:r}){if(!Bv(a,e.protocolAllowlist)){if(!r){const o=e.history._getBlockers();for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:i?"REPLACE":"PUSH"}))return}e.history._ignoreNextBeforeUnload?.(a),i?window.location.replace(a):window.location.href=a}}var So=class extends Error{},k1=class extends Error{};function co(e,a){if(e==null)return{};if("~standard"in e){const i=e["~standard"].validate(a);if(i instanceof Promise)throw new So("Async validation not supported");if(i.issues)throw new So(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in e?e.parse(a):typeof e=="function"?e(a):{}}function gf(e,a){if(e===void 0||e===!0)return a;const i=Object.create(null);return e===!1||e===null?i:typeof e=="function"?(Object.assign(i,a),Object.assign(i,e(i))):Object.assign(i,a,e)}function L1(e,a){return typeof e=="function"?!0:!a||e===!1||e===null?!1:e===void 0||e===!0||a.some(i=>typeof i!="string"&&!od.call(e,i[1]))}const yf=Object.freeze({});function U1(e,a){const i=[];for(let r=0;r<e.length;r++){const o=e[r].options;if("search"in o)o.search?.middlewares&&i.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const d=({search:h,next:p})=>{const m=p(o.preSearchFilters?o.preSearchFilters.reduce((b,v)=>v(b),h):h);return o.postSearchFilters?o.postSearchFilters.reduce((b,v)=>v(b),m):m};i.push(d)}const c=o.validateSearch;if(a&&c){const d=({search:h,next:p,meta:m})=>{const b=p(h);try{const v=co(c,b);if(m&&v)for(const x in v)x in b||(m.defaulted||=new Map).set(x,v[x]);return{...b,...v}}catch{}return b};i.push(d)}}return i}function Z1(e,a,i){const r=(o,c,d)=>{if(o>=e.length){if(!i.search)return{};if(i.search===!0)return c;const p=Uv(i.search,c);return d&&(d.explicit=p),p}const h=(p,m)=>{if(m){const b=d||{};return{search:r(o+1,p,b),meta:b}}return r(o+1,p,d)};return e[o]({search:c,next:h,meta:d})};return r(0,a)}function q1(e,a){if(e!=="root"){let i;for(let r=a.length-1;r>=0;r--){const o=a[r];if(o.options.notFoundComponent)return o.id;i||=o.children&&o.id}if(i)return i}return Is}function my(e,a){const i=e.options.params?.parse??e.options.parseParams;i&&Object.assign(a,i(a))}function Bf(e,a){return e.options[a]?.preload?.()}function B1(e,a){const i=Bf(e,"component");let r=Bf(e,"pendingComponent");return a&&(r?r=r.then(a):a()),i&&r?Promise.all([i,r]).then(()=>{}):i??r}function Ws(e,a,i){const r=()=>a===!1?void 0:a?Bf(e,a):B1(e,i),o=e._lazy;if(o)return o===!0?r():o.then(r);if(!e.lazyFn)return r();const c=e.lazyFn().then(d=>{{const{id:h,...p}=d.options;Object.assign(e.options,p),e._lazy=!0}},d=>{throw e._lazy=void 0,d});return e._lazy=c,c.then(r)}function dd(e){const a=e.findIndex(i=>i.status!=="success"||i._notFound)+1;return a&&a<e.length?e.slice(0,a):e}function $1(e,a,i){const r=e._tx;return a&&r?.[2]===i&&!r[3].some(o=>o.routeId===a)}const vn=0,Qn=1,Mo=2,_t=3,wa=[4];function xr(e){return typeof e[0]=="number"}function ss(e,a){return a.aborted?Promise.race([Promise.reject(a),e]):new Promise((i,r)=>{const o=()=>r(a);a.addEventListener("abort",o,{once:!0}),Promise.resolve(e).then(i,r).then(()=>a.removeEventListener("abort",o))})}function is(e,a){return e.routesById[a.routeId]}function Sr(e,a,i){return Kv(e)?[_t,e]:ni(e)?(e.routeId||=i,[Mo,e]):a?(typeof e?.then=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Qn,e]):[vn,e]}function hd(e,a){let i=Sr(a,!0,e.id);if(i[0]!==Qn)return i;try{e.options.onError?.(i[1])}catch(r){i=Sr(r,!0,e.id)}return i}function pr(e,a,i,r,o){return o[0].signal.aborted?wa:gd(e,a,i,hd(i,r),o)}async function H1(e,a,i,r,o,c){const[d,h]=a,p=i[0].signal,m=!!i[3];for(let b=i[6]??0;b<r;b++){const v=h[b],x=is(e,v);v.abortController=i[0];const S=h[b-1]?.context??e.options.context??{},w={params:v.params,location:d,navigate:L=>e.navigate({...L,_fromLocation:d}),buildLocation:e.buildLocation,cause:m?"preload":v.cause,abortController:i[0],preload:m,matches:h,routeId:x.id};try{const L=v._ctx||=x.options.context?x.options.context({...w,deps:v.loaderDeps,context:S})||{}:void 0;v.context={...S,...L}}catch(L){return qn(e,v),[b,pr(e,a,x,L,i)]}if(p.aborted)return[b,wa];const j=v.paramsError??v.searchError;if(j!==void 0)return qn(e,v),[b,pr(e,a,x,j,i)];const z=x.options.beforeLoad;if(!z)continue;const T=v.status;b>=c&&(v.status="pending",i[7]?.());try{_r(e,v,"beforeLoad",i[0]);const L=z({...w,search:v.search,context:v.context,...e.options.additionalContext}),G=await(typeof L?.then=="function"?ss(L,p):L);if(p.aborted)return[b,wa];const V=gd(e,a,x,Sr(G,!1,x.id),i);if(V[0]!==vn)return qn(e,v),[b,V];v.context={...v.context,...G}}catch(L){return qn(e,v),[b,pr(e,a,x,L,i)]}finally{v.status=T,_r(e,v,!1,i[0])}}o()}function md(e,a,i){if(!(!i||--i[2])){if(e._flights?.get(a.id)===i){const r=e._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(a)&&r[3].some(o=>o.id===a.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;e._flights.delete(a.id)}return i[1]}}function qn(e,a){const i=a._flight;a._flight=void 0,md(e,a,i)?.abort()}function At(e,a,i,r){const o=[];for(const c of a)if(!i?.includes(c)){const d=c._flight;if(c._flight=void 0,r&&d?.[2]===1&&e._flights?.get(c.id)===d&&i?.some(h=>h.id===c.id))d[2]=0;else{const h=md(e,c,d);h&&o.push(h)}}for(const c of o)c.abort()}function pd(e){for(const a of e){const i=a._flight;i&&i[2]++}}function _r(e,a,i,r){if(a.isFetching=i,r&&e._tx?.[0]!==r)return;const o=e.stores.byRoute.get(a.routeId),c=o?.get();c?.id===a.id&&o.set({...c,isFetching:i})}function Iv(e,a,i,r,o,c,d){const h=a[0];return{params:i.params,location:h,navigate:p=>e.navigate({...p,_fromLocation:h}),cause:d?"preload":i.cause,abortController:o,preload:d,deps:i.loaderDeps,parentMatchPromise:c,context:i.context,route:r,...e.options.additionalContext}}async function py(e,a,i,r,o,c,d){const h=d[0],p=h.signal;if(p.aborted)return wa;if(!o)return[vn,void 0];let m=i._flight;_r(e,i,"loader",h);try{if(!m){const b=new AbortController;m=[Promise.resolve().then(()=>o(Iv(e,a,i,r,b,c,!!d[3]))).then(v=>Sr(v,!1,r.id),v=>Sr(v,!0,r.id)).then(v=>(v[0]!==vn&&e._flights?.get(i.id)===m&&(e._flights.delete(i.id),m[2]||b.abort()),v[0]===Qn&&m[2]?hd(r,v[1]):v)),b,1],(e._flights??=new Map).set(i.id,m)}return i._flight=m,i.abortController=m[1],gd(e,a,r,await ss(m[0],p),d)}catch(b){if(b!==p||!p.aborted)throw b;return qn(e,i),wa}finally{_r(e,i,!1,h)}}function gy(e,a,i){a[0]!==_t&&(e.status="success",e.error=void 0,a[0]===vn?(e.loaderData=a[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=i):e.invalid=!0)}function Q1(e,a,i){const r=e._cache.get(a.id);if(r!==i||e._committed.some(c=>c.id===a.id&&c._flight===a._flight))return;const o={...a,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,e._cache.set(a.id,o),r&&qn(e,r)}function yy(e,a){return a[0]===Qn||a[0]===Mo?{...e,status:a[0]===Qn?"error":"notFound",error:a[1],_flight:void 0}:e}function G1(e,a,i,r,o,c,d){const h=a[1][i],p=is(e,h),m=!!c[3],b=e._cache.get(h.id);let v,x=!1,S;try{if(h.status==="success"&&(v=p.options.shouldReload,typeof v=="function"&&(v=v(Iv(e,a,h,p,c[0],o,m))),c[0].signal.aborted&&(S=wa)),!S)if(h.status!=="success")x=!0;else{const I=m||h.preload?p.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:p.options.staleTime??e.options.defaultStaleTime??0;x=!!(h.invalid||v||v===void 0&&Date.now()-h.updatedAt>=I&&(c[5]||h.cause==="enter"||c[2].some(fe=>fe.routeId===h.routeId&&fe.id!==h.id)))}}catch(I){h.invalid=!0,qn(e,h),S=pr(e,a,p,I,c)}const w=p.options.loader,j=typeof w=="function",z=j?w:w?.handler,T=!m||p.options.preload!==!1;let L=T&&w?e._flights?.get(h.id):void 0;L===h._flight||S?L=void 0:L&&!x&&!m&&v===void 0?x=!0:x||(L=void 0);const G=!!(w&&x&&h.status==="success"&&!m&&!c[4]&&((j?void 0:w.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),V=x&&T,W=V&&!G&&(h.status!=="success"||!!w),$=i>=d?c[7]:void 0,R=p.lazyFn&&p._lazy!==!0?$:void 0;if(V&&!w&&(h.invalid=!1,h.updatedAt=Date.now()),L&&L[2]++,W){const I=h._flight;h._flight=L,md(e,h,I)?.abort(),i>=d&&(h.status="pending"),$?.()}V||(h.isFetching=!1);const J=!S&&W?py(e,a,h,p,z,o,c).then(I=>(gy(h,I,m),I[0]===vn&&(w&&!c[0].signal.aborted&&Q1(e,h,b),i>=d&&(h.status="pending")),I)):Promise.resolve(S??[vn,h.loaderData]),ie=(async()=>{try{const fe=Ws(p,void 0,R);fe&&await ss(fe,c[0].signal)}catch(fe){if(!a[1].some((ye,pe)=>pe<=i&&(ye.status==="error"||ye.status==="notFound"||ye._notFound)))return[i,pr(e,a,p,fe,c)]}const I=await J;W&&I[0]===vn&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",$?.())})();if(r.push([i,J,ie]),!G)return J.then(I=>yy(h,I));const re={...h,status:"pending",preload:!1,_flight:L};h.invalid=!1,h.isFetching="loader";const P=py(e,a,re,p,z,o,c).then(I=>(h.isFetching=!1,gy(re,I,!1),I));return(a[2]??=[]).push([i,P,ie,re]),P.then(I=>yy(re,I))}async function $f(e,a,i,r,o=0){const c=i?.[1][1];let d=c?.routeId?a.findIndex(h=>h.routeId===c.routeId):i?.[0]??a.length-1;d<0&&(d=0);for(let h=d;h>=0;h--){const p=is(e,a[h]);try{const m=Ws(p,!1);m&&await ss(m,r)}catch(m){if(m===r&&r.aborted)throw m}if(p.options.notFoundComponent)return h}return c?.routeId?d:o}function Wa(e,a){a[2]&&(At(e,a[2].map(i=>i[3])),a[2]=void 0)}async function vy(e,a,i,r){let o;try{await Promise.all(e.map(c=>c[1].then(async d=>{const h=c[0];if(!(r&&h>=await r)){if(d[0]>=_t)throw[h,d];!o&&d[0]!==vn&&(o=[h,d],await Promise.all((i??[]).map(p=>{if(!(p[0]<=h))return p[1].then(m=>{if(m[0]===_t)throw[p[0],m]})})))}})))}catch(c){return c}return a??o}function gd(e,a,i,r,o,c){for(;r[0]===_t;){const d=r[1],h=d.options;try{if((h.href||d.headers.has("Location"))&&(e.resolveRedirect(d),h.reloadDocument)||(h.reloadDocument?o[3]:o[1]>=20))return r;const p=e.buildLocation({...h,_fromLocation:a[0],_includeValidateSearch:!0}),m=p.maskedLocation??p;if(m.external){const b=d.clone();return b.options={...h},b.headers.set("Location",m.publicHref),e.resolveRedirect(b),o[3]?[_t,b]:[_t,b,m]}return[_t,d,p]}catch(p){r=c?[Qn,p]:hd(i,p),c=!0}}return r}async function Wv(e,a,i,r,o,c){const d=a[1];let h=await o,p=!1;const m=d.findIndex(S=>S._notFound),b=S=>S[1][0]===Mo?$f(e,d,S,r.signal):S[0];let v=m<0?d.length:m;if((h?.[1][0]??0)>=_t)v=0;else if(h){v=h[2]??=await b(h);for(const S of i){if(S[0]>=v)break;const w=await S[1];if(w[0]!==vn&&w[0]<_t&&!("loaderData"in d[S[0]])){h=[S[0],w],v=h[2]=await b(h);break}}}for(const S of i){if(S[0]>=v)break;const w=await S[2];if(w){h=w;break}}if((h?.[1][0]??0)>=_t){const S=h[1];if(S[0]!==_t||S[1].options.reloadDocument||S[2])return Wa(e,a),S;p=!0,h=[0,[Qn,new Error("Too many redirects")]]}const x=h?h[2]??await b(h):m;if(x>=0){const S=h?.[1],w=S?.[0],j=d[x],z=S?.[1],T=()=>{S&&(j._notFound=void 0,w===Qn?j.status="error":(z.routeId=j.routeId,j.routeId===e.routeTree.id?(j.status="success",j._notFound=!0):j.status="notFound"),j.error=z,j.isFetching=!1)};T(),S||c?.();const L=is(e,j);try{await ss(S?Promise.resolve().then(()=>Ws(L,w===Qn?"errorComponent":"notFoundComponent")):Promise.all([Ws(L),Ws(L,"notFoundComponent")]),r.signal)}catch(G){if(G===r.signal&&r.signal.aborted)return Wa(e,a),wa}S?p&&(r.abort(),await Promise.all([...i.map(G=>G[1]),...i.map(G=>G[2]),...(a[2]??[]).map(G=>G[1])]),Wa(e,a),At(e,d),T()):j.status="success"}return a}async function eb(e,a,i,r=0,o=a[1].length){const c=a[1];for(let d=r;d<o;d++){const h=c[d],p=is(e,h).options;if(p.head||p.scripts)try{const m={ssr:e.options.ssr,matches:c,match:h,params:h.params,loaderData:h.loaderData},[b,v]=await ss(Promise.all([p.head?.(m),p.scripts?.(m)]),i);h.meta=b?.meta,h.links=b?.links,h.headScripts=b?.scripts,h.styles=b?.styles,h.scripts=v}catch(m){if(m===i&&i.aborted)break;console.error(m)}if(h.status!=="success"||h._notFound)break}return a}async function tb(e,a,i,r){const o=[a,i],c=r[0].signal;let d;try{const h=e.stores.matches.get();let p=i.findIndex(T=>T._notFound);if(e.options.notFoundMode!=="root"&&p>=0){const T=await $f(e,i,void 0,c,p);i[p]._notFound=void 0,i[T]._notFound=!0,p=T}let m=p<0?i.length:p+1,b=0;for(;b<m&&b!==p;){const T=i[b],L=r[2][b],G=h[b];if(L?.id!==T.id||L.status!=="success"||T.preload||G?.id!==T.id||G.status!=="success"||(b++,L._notFound||G._notFound))break}const v=[],x=r[6]??0;let S=x?Promise.resolve(i[x-1]):void 0;const w=()=>{for(let T=x;T<m&&!c.aborted;T++)S=G1(e,o,T,v,S,r,b)},j=await H1(e,o,r,m,w,b);if(j){if(r[4]=!0,m=j[0],j[1][0]===Mo){const T=await $f(e,i,j,c);j[2]=T,m=Math.min(m,T+1)}else j[1][0]>=_t&&(m=0);w()}if(!c.aborted&&!r[3]){const T=[];for(const[L,G]of e._flights??[])G[2]||(e._flights.delete(L),T.push(G[1]));for(const L of T)L.abort()}const z=Wv(e,o,v,r[0],vy(v,j,o[2]),r[7]);o[2]?.length&&(o[3]=vy(o[2],void 0,void 0,z.then(T=>xr(T)?0:dd(i).length,()=>0))),d=await z}catch(h){if(Wa(e,o),h===c&&c.aborted)return wa;throw h}return xr(d)?d:eb(e,d,c,r[6]===i.length?r[6]:0)}function Hf(e,a){if(e._tx!==a)return;const i=a[3],r=e.stores.matches.get();let o=e._pending;for(let c=0;c<i.length;c++){const d=i[c],h=d.status==="success"&&!d._notFound,p=r[c]?.id===d.id&&r[c]?.status==="pending";if(h&&!p)continue;const m=is(e,d),b=h||d.invalid?0:m.options.pendingMs??e.options.defaultPendingMs,v=m.options.pendingComponent??e.options.defaultPendingComponent;if(!v||typeof b!="number"||b===1/0){o&&(o[0]=a,o[2]=0,o[4]=!0);return}const x=m.options.pendingMinMs??e.options.defaultPendingMinMs??0;let S=!1;if(o?.[1]===d.id?(S=o[0]!==a,o[0]=a):(clearTimeout(o?.[3]),e._pending=o=void 0),o||(e._pending=o=[a,d.id,p?Date.now()+x:a[4]+b,void 0,p||void 0,v]),o[4]&&!S&&o[5]===v)return;if(o[5]=v,!o[4]){clearTimeout(o[3]);const z=o[2]-Date.now();if(z>0){o[3]=setTimeout(()=>Hf(e,a),z);return}o[2]=0}const w=i.map(z=>({...z,_flight:void 0}));w[c].status="pending";const j=o[4]=e.startTransition(()=>e.stores.setMatches(w),w).then(z=>(z&&e._pending===o&&o[4]===j&&!o[2]&&(o[2]=Date.now()+x),z));return}}function or(e,a){const i=e._pending;(e._tx===a||!e._tx?.[3].some(r=>r.id===i?.[1]))&&(clearTimeout(i?.[3]),e._pending=void 0)}async function by(e,a){const i=e._pending;if(!i)return;clearTimeout(i[3]);const r=i[2]-Date.now();if(!i[4]||r<=0||!dd(a[3]).some(c=>c.id===i[1]))return;let o;try{await ss(new Promise(c=>{o=setTimeout(c,r)}),a[0].signal)}catch{}clearTimeout(o)}function nb(e,a){e._committed=a,e.stores.setMatches(a)}function K1(e,a,i,r){const o=e._committed,c=e._lifecycleEnd,d=e._cache;for(const b of i)b.preload=!1,r&&(b._assetEnd=void 0);const h=dd(i).length,p=new Map;{const b=Date.now(),v=new Set;for(let x=0;x<i.length;x++){const S=i[x];(x<h||S.status==="success")&&v.add(S.id)}for(const x of[...o,...d.values()]){if(x.status!=="success"||v.has(x.id))continue;const S=is(e,x);!S.options.loader||b-x.updatedAt>=(x.preload?S.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:S.options.gcTime??e.options.defaultGcTime??3e5)||p.set(x.id,d.get(x.id)===x?x:{...x,_flight:void 0,isFetching:!1,context:{}})}}a[3]=[],e._cache=p;const m=e._lifecycleEnd=C1(i);nb(e,i),At(e,[...d.values(),...o].filter(b=>b._flight&&p.get(b.id)!==b),i),M1(e,o,i,c,m,a)}async function Xl(e,a){let i=e._tx;for(;i&&i!==a;)a=i,await i[5],i=e._tx}function ab(e,a,i){const r=i[1].options,o=i[2];if(!o)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=a[1]+1,e._pendingLocation=o;const c=e.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===o&&(e._pendingLocation=void 0)}),c}async function Y1(e,a,i,r,o){const c=i.map(p=>({...p}));pd(c);for(const p of r)qn(e,c[p[0]]),c[p[0]]=p[3];const d=[a[2],c];let h;try{h=await Wv(e,d,r,a[0],o)}catch(p){throw At(e,c),p}if(xr(h)){At(e,c),h[0]===_t&&e._tx===a&&e._committed===i&&await ab(e,a,h);return}if(await eb(e,h,a[0].signal),e._tx!==a||e._committed!==i){At(e,c);return}for(const p of c){const m=e._cache.get(p.id);m?._flight&&m._flight===p._flight&&(e._cache.delete(p.id),qn(e,m))}nb(e,c),At(e,i,c)}async function F1(e,a,i,r,o,c){const d=await tb(e,a[2],a[3],[a[0],a[1],e._committed,void 0,o,i,c,r]);if(xr(d)){const v=d[0]===_t&&e._tx===a;if((!v||d[1].options.reloadDocument)&&or(e,a),At(e,a[3]),a[3]=[],!v)return;if(e._tx!==a){or(e,a);return}await ab(e,a,d);return}const h=d[1];if(e._tx===a&&await by(e,a),e._tx!==a){or(e,a),At(e,h),Wa(e,d);return}const p=a[2],m=Co(p,e.stores.resolvedLocation.get()),b=d[2];await e.startViewTransition(async()=>{if(e._tx===a&&await by(e,a),e._tx!==a){or(e,a),At(e,h),Wa(e,d);return}const v=()=>{or(e,a),K1(e,a,h,c),e._tx===a&&(e.emit({type:"onLoad",...m}),e._tx===a&&e.emit({type:"onBeforeRouteMount",...m}))},x=await e.startTransition(v,h);if(e._tx!==a){Wa(e,d);return}b?.length&&Y1(e,a,h,b,d[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(p),e.stores.status.set("idle"),e._tx===a&&e.emit({type:"onResolved",...m}),x&&e._tx===a&&e.emit({type:"onRendered",...m})}),e._tx===a&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function V1(e,a){const i=e._tx,r=e.stores.resolvedLocation.get(),o=r??e.stores.location.get(),c=e.latestLocation,d=e._pendingLocation,h=d?.href===c.href?d._redirects??0:0,p=e._handoff,m=p?.[0](),b=new AbortController,v=e._preflight;if(e._preflight=b,m||p?.[1](),v?.abort(),!b.signal.aborted){const V=Co(c,r);e.emit({type:"onBeforeNavigate",...V}),b.signal.aborted||e.emit({type:"onBeforeLoad",...V})}if(b.signal.aborted){await Xl(e,i);return}const x=o.href===c.href;let S=b;const w=e.matchRoutes(c,{_controller:b});pd(w);const j=m?p[1](w):void 0;if(j?S=m:m?.abort(),b.signal.aborted){At(e,w),await Xl(e,i);return}e._preflight=void 0;let z;const T=()=>F1(e,G,x,()=>Hf(e,G),a?.sync,j),L=a?.sync?new Promise(V=>z=V):Promise.resolve().then(T),G=[S,h,c,w,Date.now(),L.then(()=>Xl(e,G))];if(e._tx=G,i){for(const V of e.stores.matches.get()){if(e._tx!==G)break;V.isFetching&&_r(e,V,!1)}i[0].abort(),At(e,i[3],G[3],!0)}if(e._tx!==G){At(e,G[3]),G[3]=[],z?.(),await Xl(e,G);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(c)}),(j||!e._committed.length&&w[0]?.status!=="success"&&!w.some(V=>V._notFound))&&Hf(e,G),z?.(T()),await G[5]}async function P1(e,a){let i=e.buildLocation(a);for(let r=0;;r++){const o=e._committed,c=new AbortController;let d,h,p;try{try{d=e.matchRoutes(i,{_controller:c}),pd(d),h=(e._preloads??=new Map).set(c,d),p=await tb(e,i,d,[c,r,o,!0])}finally{h&&(h=h.delete(c),At(e,d)),c.abort()}if(!xr(p))return p[1];if(!h||p.length<3)return;i=p[2]}catch(m){ni(m)||console.error(m);return}}}const X1="Error preloading route! ☝️";var sb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=a=>{this.originalIndex=a,this._branch=void 0;const i=this.options,r=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Is:this.parentRoute||ud();let o=r?Is:i?.path;o&&o!=="/"&&(o=$v(o));const c=i?.id||o,d=r?Is:Js((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const h=d==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Js(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=d,this._fullPath=h,this._to=yn(h)},this.addChildren=a=>this._addFileChildren(a),this._addFileChildren=a=>(Array.isArray(a)&&(this.children=a),typeof a=="object"&&a!==null&&(this.children=Object.values(a)),this),this._addFileTypes=()=>this,this.updateLoader=a=>(Object.assign(this.options,a),this),this.update=a=>(Object.assign(this.options,a),this),this.lazy=a=>(this.lazyFn=a,this),this.redirect=a=>g1({from:this.fullPath,...a}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},J1=class extends sb{constructor(e){super(e)}},yd=class extends ee.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,a){const i=e.getResetKey();return a.error&&a.resetKey!==i?{resetKey:i,error:0}:{resetKey:i}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,a){this.props.onCatch?.(e,a)}render(){const e=this.state.error;return e?ee.createElement(this.props.errorComponent??I1,{error:e[0],reset:this.reset}):this.props.children}};function I1({error:e}){const[a,i]=ee.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:a?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),a?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e?.message?g.jsx("code",{children:e.message}):null})}):null]})}var xy=()=>!0,W1=()=>!1;function ew({children:e,fallback:a=null}){return g.jsx(Ro.Fragment,{children:tw()?e:a})}function tw(e=!0){return Ro.useSyncExternalStore(nw,xy,e?W1:xy)}function nw(){return()=>{}}var ib=ee.createContext(null);function cn(e){return ee.useContext(ib)}function aw(e,a){const i=e.stores.location,r=new Set;let o,c;const d=h=>{$1(e,a,h)||(o=h,r.forEach(p=>p()))};return[()=>o??i.get(),h=>(r.size||(o=i.get(),c=i.subscribe(d).unsubscribe),r.add(h),()=>{r.delete(h),r.size||(c(),o=void 0)})]}var wr=ee.createContext(void 0),sw=ee.createContext(void 0);function iw({update:e,notify:a,unwatched:i}){return{link:r,unlink:o,propagate:c,checkDirty:d,shallowPropagate:h};function r(m,b,v){const x=b.depsTail;if(x!==void 0&&x.dep===m)return;const S=x!==void 0?x.nextDep:b.deps;if(S!==void 0&&S.dep===m){S.version=v,b.depsTail=S;return}const w=m.subsTail;if(w!==void 0&&w.version===v&&w.sub===b)return;const j=b.depsTail=m.subsTail={version:v,dep:m,sub:b,prevDep:x,nextDep:S,prevSub:w,nextSub:void 0};S!==void 0&&(S.prevDep=j),x!==void 0?x.nextDep=j:b.deps=j,w!==void 0?w.nextSub=j:m.subs=j}function o(m,b=m.sub){const v=m.dep,x=m.prevDep,S=m.nextDep,w=m.nextSub,j=m.prevSub;return S!==void 0?S.prevDep=x:b.depsTail=x,x!==void 0?x.nextDep=S:b.deps=S,w!==void 0?w.prevSub=j:v.subsTail=j,j!==void 0?j.nextSub=w:(v.subs=w)===void 0&&i(v),S}function c(m){let b=m.nextSub,v;e:do{const x=m.sub;let S=x.flags;if(S&60?S&12?S&4?!(S&48)&&p(m,x)?(x.flags=S|40,S&=1):S=0:x.flags=S&-9|32:S=0:x.flags=S|32,S&2&&a(x),S&1){const w=x.subs;if(w!==void 0){const j=(m=w).nextSub;j!==void 0&&(v={value:b,prev:v},b=j);continue}}if((m=b)!==void 0){b=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){b=m.nextSub;continue e}break}while(!0)}function d(m,b){let v,x=0,S=!1;e:do{const w=m.dep,j=w.flags;if(b.flags&16)S=!0;else if((j&17)===17){if(e(w)){const z=w.subs;z.nextSub!==void 0&&h(z),S=!0}}else if((j&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=w.deps,b=w,++x;continue}if(!S){const z=m.nextDep;if(z!==void 0){m=z;continue}}for(;x--;){const z=b.subs,T=z.nextSub!==void 0;if(T?(m=v.value,v=v.prev):m=z,S){if(e(b)){T&&h(z),b=m.sub;continue}S=!1}else b.flags&=-33;b=m.sub;const L=m.nextDep;if(L!==void 0){m=L;continue e}}return S}while(!0)}function h(m){do{const b=m.sub,v=b.flags;(v&48)===32&&(b.flags=v|16,(v&6)===2&&a(b))}while((m=m.nextSub)!==void 0)}function p(m,b){let v=b.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function rw(e,a,i){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:a)?.bind(o),complete:(r?e.complete:i)?.bind(o)}}const Qf=[];let fo=0;const{link:Sy,unlink:lw,propagate:ow,checkDirty:rb,shallowPropagate:_y}=iw({update(e){return e._update()},notify(e){Qf[Gf++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,_o(e))}});let Jl=0,Gf=0,ln,Kf=0;function uw(e){try{++Kf,e()}finally{--Kf||lb()}}function _o(e){const a=e.depsTail;let i=a!==void 0?a.nextDep:e.deps;for(;i!==void 0;)i=lw(i,e)}function lb(){if(!(Kf>0)){for(;Jl<Gf;){const e=Qf[Jl];Qf[Jl++]=void 0,e.notify()}Jl=0,Gf=0}}function wy(e,a){const i=typeof e=="function",r=e,o={_snapshot:i?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?0:1,get(){return ln!==void 0&&Sy(o,ln,fo),o._snapshot},subscribe(c){const d=rw(c),h={current:!1},p=cw(()=>{o.get(),h.current?(ln=void 0,d.next?.(o._snapshot)):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const d=ln,h=a?.compare??Object.is;if(i)ln=o,++fo,o.depsTail=void 0;else if(c===void 0)return!1;i&&(o.flags=5);try{const p=o._snapshot,m=typeof c=="function"?c(p):c===void 0&&i?r(p):c;return p===void 0||!h(p,m)?(o._snapshot=m,!0):!1}finally{ln=d,i&&(o.flags&=-5),_o(o)}}};return i?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&rb(o.deps,o)){if(o._update()){const d=o.subs;d!==void 0&&_y(d)}}else c&32&&(o.flags=c&-33);return ln!==void 0&&Sy(o,ln,fo),o._snapshot}):o.set=function(c){if(o._update(c)){const d=o.subs;d!==void 0&&(ow(d),_y(d),lb())}},o}function cw(e){const a=()=>{const r=ln;ln=i,++fo,i.depsTail=void 0,i.flags=6;try{return e()}finally{ln=r,i.flags&=-5,_o(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&rb(this.deps,this)?a():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,_o(this)}};return a(),i}var vf={exports:{}},bf={},xf={exports:{}},Sf={};var jy;function fw(){if(jy)return Sf;jy=1;var e=Or();function a(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var i=typeof Object.is=="function"?Object.is:a,r=e.useState,o=e.useEffect,c=e.useLayoutEffect,d=e.useDebugValue;function h(v,x){var S=x(),w=r({inst:{value:S,getSnapshot:x}}),j=w[0].inst,z=w[1];return c(function(){j.value=S,j.getSnapshot=x,p(j)&&z({inst:j})},[v,S,x]),o(function(){return p(j)&&z({inst:j}),v(function(){p(j)&&z({inst:j})})},[v]),d(S),S}function p(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!i(v,S)}catch{return!0}}function m(v,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Sf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b,Sf}var Oy;function dw(){return Oy||(Oy=1,xf.exports=fw()),xf.exports}var Ey;function hw(){if(Ey)return bf;Ey=1;var e=Or(),a=dw();function i(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var r=typeof Object.is=="function"?Object.is:i,o=a.useSyncExternalStore,c=e.useRef,d=e.useEffect,h=e.useMemo,p=e.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,b,v,x,S){var w=c(null);if(w.current===null){var j={hasValue:!1,value:null};w.current=j}else j=w.current;w=h(function(){function T($){if(!L){if(L=!0,G=$,$=x($),S!==void 0&&j.hasValue){var R=j.value;if(S(R,$))return V=R}return V=$}if(R=V,r(G,$))return R;var J=x($);return S!==void 0&&S(R,J)?(G=$,R):(G=$,V=J)}var L=!1,G,V,W=v===void 0?null:v;return[function(){return T(b())},W===null?void 0:function(){return T(W())}]},[b,v,x,S]);var z=o(m,w[0],w[1]);return d(function(){j.hasValue=!0,j.value=z},[z]),p(z),z},bf}var Ny;function mw(){return Ny||(Ny=1,vf.exports=hw()),vf.exports}var pw=mw();function gw(e,a){return e===a}function ja(e,a=r=>r,i){const r=i?.compare??gw,o=ee.useCallback(d=>{const{unsubscribe:h}=e.subscribe(d);return h},[e]),c=ee.useCallback(()=>e.get(),[e]);return pw.useSyncExternalStoreWithSelector(o,c,c,a,r)}var zy={};function ob(e,a){const i=ee.useRef();return r=>{const o=e?.select?e.select(r):r;return e?.structuralSharing??a.options.defaultStructuralSharing?i.current=xa(i.current,o):o}}function rs(e){const a=cn(),i=ee.useContext(e.from?sw:wr),r=e.from??i,o=a.stores.getMatchStore(r),c=ob(e,a),d=ja(o,h=>h?c(h):zy);if(d!==zy)return d;(e.shouldThrow??!0)&&ud()}function ub(e){return rs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:a=>e.select?e.select(a.loaderData):a.loaderData})}function cb(e){const{select:a,...i}=e;return rs({...i,select:r=>a?a(r.loaderDeps):r.loaderDeps})}function fb(e){return rs({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:a=>{const i=e.strict===!1?a.params:a._strictParams;return e.select?e.select(i):i}})}function db(e){return rs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:a=>e.select?e.select(a.search):a.search})}function Er(e){const a=cn();return ee.useCallback(i=>a.navigate({...i,from:i.from??e?.from}),[e?.from,a])}function hb(e){return rs({...e,select:a=>e.select?e.select(a.context):a.context})}function yw(...e){const a=ee.useRef(e),i=a.current;return e.forEach((r,o)=>{Hn(i[o],r,!1,!0)||(i[o]=r)}),a.current}function Il(e,a){e.preloadRoute(a).catch(i=>{console.warn(i),console.warn(X1)})}function vw(e,a){const i=typeof e=="string"&&vr(e);if(i)return a.has(i)?e:null}function bw(e,a,i,r){const o=ny(e.pathname,r),c=ny(a.pathname,r);return(i?.exact?o!==c:!(o.startsWith(c)&&(o.length===c.length||o[c.length]==="/")))||(i?.includeSearch??!0)&&!Hn(e.search,a.search,!i?.exact,i?.explicitUndefined)?!1:!i?.includeHash||e.hash===a.hash}function xw(e,a,i){const r=cn(),o=ee.useRef(null),c=ee.useCallback(Z=>{if(o.current=Z,typeof a=="function")return a(Z);a&&(a.current=Z)},[a]),{activeOptions:d,to:h,preload:p,preloadDelay:m,disabled:b,target:v,onClick:x,onBlur:S,onFocus:w,onMouseEnter:j,onMouseLeave:z,onTouchStart:T}=e,[L,G,V]=yw(e.search,e.params,d),W=ee.useContext(wr),$=(r.stores._linkScopes??={})[W]??=aw(r,W),[R,J,ie]=ee.useMemo(()=>{const Z=vw(h,r.protocolAllowlist);if(Z!==void 0){const Ze=[Z??void 0];return[e,()=>Ze]}const X={...e};let ne,me,xe;const Ee=()=>{const Ze=$[0]();if(Ze!==ne){X._fromLocation=Ze;const He=r.buildLocation(X),fn=Ow(He,r,b),Ra=b||fn&&!vr(fn)?bw(Ze,He,V,r.basepath):void 0;(!me||me[0]!==fn||me[1]!==Ra)&&(me=[fn,Ra]),ne=Ze}return me};return[X,Ee,V?.includeHash&&(()=>{const Ze=Ee();return Ze[1]?xe??=[Ze[0],!1]:Ze})]},[r,$,e.from,e.hash,e.href,h,L,G,e.state,e.mask,e.unsafeRelative,V,b]),[re,P]=ee.useSyncExternalStore($[1],J,ie||J),I=P===void 0&&re,fe=b||re===void 0,ye=ee.useRef(!1),pe=e.reloadDocument||I||fe?!1:p??r.options.defaultPreload,U=m??r.options.defaultPreloadDelay??0,C=ee.useCallback(Z=>{const X=Z?.isIntersecting;if(!(X??pe==="intent")){X===!1&&Wl(o);return}if(!U){Il(r,R);return}o.t??=setTimeout(()=>{o.t=void 0,Il(r,R)},U)},[r,R,o,pe,U]);ee.useEffect(()=>{if(!pe)return;pe==="render"&&!ye.current&&(ye.current=!0,Il(r,R));let Z=!0,X;return pe==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(X=new IntersectionObserver(ne=>{Z&&C(ne.pop())},{rootMargin:"100px"}),X.observe(o.current)),()=>{Z=!1,X?.disconnect(),Wl(o)}},[r,R,pe,C,o]);const q=ww(e,i);if(q.ref=a?c:o,I)return q.href=I,q;const ae=Z=>{const X=v??Z.currentTarget.getAttribute("target");!fe&&!(Z.metaKey||Z.altKey||Z.ctrlKey||Z.shiftKey)&&!Z.defaultPrevented&&(!X||X==="_self")&&Z.button===0&&(Z.preventDefault(),Wl(o),r.navigate({...e,_fromLocation:R._fromLocation}))},ue=()=>{pe==="intent"&&Il(r,R)},E=()=>{pe==="intent"&&Wl(o)};return q.onClick=Ps(x,ae),q.onBlur=Ps(S,E),q.onFocus=Ps(w,C),q.onMouseEnter=Ps(j,C),q.onMouseLeave=Ps(z,E),q.onTouchStart=Ps(T,ue),jw(q,e,P,re,fe,i)}var Sw={},_w={className:"active"},mb=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function ww(e,a){const i={};for(const r in e)mb.has(r)||r==="type"&&a!==void 0||r==="disabled"&&a==="a"||(i[r]=e[r]);return i}function jw(e,a,i,r,o,c){const{activeProps:d,inactiveProps:h,className:p,style:m,target:b}=a,v=Uv(i?d:h,{})??(i?_w:Sw);Object.assign(e,v),e.href=r,c!=="a"&&(e.disabled=o),e.target=b;const x=v.style;(m||x)&&(e.style=m&&x?{...m,...x}:m||x);const S=v.className;return(p||S)&&(e.className=p?S?`${p} ${S}`:p:S),o&&(e.role="link",e["aria-disabled"]=!0),i&&(e["data-status"]="active",e["aria-current"]="page"),e}var Wl=e=>{clearTimeout(e.t),e.t=void 0},Ps=(e,a)=>e?i=>i.defaultPrevented||(e(i),i.defaultPrevented||a(i)):a;function Ow(e,a,i){if(i)return;const r=e.maskedLocation??e,o=r.external?r.publicHref:a.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Bv(o,a.protocolAllowlist)))return o}var ls=ee.memo(ee.forwardRef((e,a)=>{const i=e._asChild||"a",r=xw(e,a,i),o=typeof e.children=="function"?e.children({isActive:r["data-status"]==="active"}):e.children;return ee.createElement(i,r,o)}),Ew);function Ew(e,a){let i=0;for(const r in a)if(i++,e[r]!==a[r]&&(!mb.has(r)||!Hn(e[r],a[r],!1,!0)))return!1;for(const r in e)i--;return i===0}var Nw=class extends sb{constructor(e){super(e),this.useMatch=a=>rs({...a,from:this.id}),this.useRouteContext=a=>hb({...a,from:this.id}),this.useSearch=a=>db({...a,from:this.id}),this.useParams=a=>fb({...a,from:this.id}),this.useLoaderDeps=a=>cb({...a,from:this.id}),this.useLoaderData=a=>ub({...a,from:this.id}),this.useNavigate=()=>Er({from:this.fullPath}),this.Link=Ro.forwardRef((a,i)=>g.jsx(ls,{ref:i,from:this.fullPath,...a}))}};function os(e){return new Nw(e)}var zw=class extends J1{constructor(e){super(e),this.useMatch=a=>rs({...a,from:this.id}),this.useRouteContext=a=>hb({...a,from:this.id}),this.useSearch=a=>db({...a,from:this.id}),this.useParams=a=>fb({...a,from:this.id}),this.useLoaderDeps=a=>cb({...a,from:this.id}),this.useLoaderData=a=>ub({...a,from:this.id}),this.useNavigate=()=>Er({from:this.fullPath}),this.Link=Ro.forwardRef((a,i)=>g.jsx(ls,{ref:i,from:this.fullPath,...a}))}};function Tw(e){return new zw(e)}function Aw(e){const a=cn(),i=`not-found-${ja(a.stores.location,r=>r.pathname)}-${ja(a.stores.status)}`;return g.jsx(yd,{getResetKey:()=>i,onCatch:(r,o)=>{if(ni(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(ni(r))return e.fallback?.(r);throw r},children:e.children})}function Rw(){return g.jsx("p",{children:"Not Found"})}function pb(e,a,i){return a.options.notFoundComponent?g.jsx(a.options.notFoundComponent,{...i}):e.options.defaultNotFoundComponent?g.jsx(e.options.defaultNotFoundComponent,{...i}):g.jsx(Rw,{})}function Do(e,a){const i=a?.options.pendingComponent??e.options.defaultPendingComponent;return i?g.jsx(i,{}):null}var Cw=(e,a)=>e[0]===a[0]&&e[1]===a[1],gb=(e,a,i)=>!a.isRoot||a.options.shellComponent||a.options.wrapInSuspense||i===!1||i==="data-only"||!e.ssr,yb=ee.memo(function({routeId:a}){const i=cn(),r=i.stores.getMatchStore(a);return Mw(i,ja(r))});function Mw(e,a){const i=e.routesById[a.routeId],r=Do(e,i),o=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,d=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,h=a.ssr===!1||a.ssr==="data-only",p=gb(e,i,a.ssr)&&(i.options.wrapInSuspense??r??(i.options.errorComponent?.preload||h));let m=g.jsx(Dw,{match:a});h&&(m=g.jsx(ew,{fallback:r,children:m})),d&&(m=g.jsx(Aw,{fallback:x=>{if(x.routeId??=a.routeId,x.routeId!==a.routeId)throw x;return ee.createElement(d,x)},children:m})),o&&(m=g.jsx(yd,{getResetKey:()=>a,errorComponent:o,onCatch:(x,S)=>{if(ni(x))throw x.routeId??=a.routeId,x;c?.(x,S)},children:m})),p&&(m=g.jsx(ee.Suspense,{fallback:r,children:m}));const b=null,v=i.isRoot&&i.options.shellComponent;return v?g.jsx(wr.Provider,{value:a.routeId,children:g.jsxs(v,{children:[m,b]})}):g.jsxs(wr.Provider,{value:a.routeId,children:[m,b]})}var Dw=ee.memo(function({match:a}){const i=cn(),r=a.routeId,o=i.routesById[r],c=ee.useMemo(()=>{const h=(o.options.remountDeps??i.options.defaultRemountDeps)?.({routeId:r,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return h?JSON.stringify(h):void 0},[r,a.loaderDeps,a._strictParams,a._strictSearch,o.options.remountDeps,i.options.defaultRemountDeps]),d=ee.useMemo(()=>{const h=o.options.component??i.options.defaultComponent;return h?g.jsx(h,{},c):g.jsx(vb,{})},[c,o.options.component,i.options.defaultComponent]);if(a.status==="pending"){if(i.ssr&&!gb(i,o,a.ssr))return d;if(i._tx)throw i._tx[5];return Do(i,o)}if(a.status==="notFound")return pb(i,o,a.error);if(a.status==="error")throw a.error;return d}),vb=ee.memo(function(){const a=cn(),i=ee.useContext(wr);let r,o,c;{const h=a.stores.getMatchStore(i);[r,o]=ja(h,p=>[!!p._notFound,p.error],{compare:Cw}),c=ja(a.stores.ids,p=>p[p.indexOf(i)+1])}if(r)return pb(a,a.routesById[i],o);if(!c)return null;const d=g.jsx(yb,{routeId:c});return i===Is?g.jsx(ee.Suspense,{fallback:Do(a),children:d}):d});function bb(e,a){const i=e[1];e.length=0,i?.(a)}function kw({t:e}){const a=cn(),i=a._rendered??=[];return a.startTransition=(r,o)=>new Promise(c=>{bb(i,!1),i.push(o,c),e(a),ee.startTransition(r)}),Lv(()=>{const r=a.history.subscribe(a.load);a.updateLatestLocation();const o=a.latestLocation,c=a.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(yn(o.publicHref)!==yn(c.publicHref))return a.commitLocation({...c,replace:!0,ignoreBlocker:!0}),r;const d=a.stores.resolvedLocation.get();return d?.href===o.href&&d.state.__TSR_key===o.state.__TSR_key?i.push(a.stores.matches.get(),h=>{h&&a.emit({type:"onRendered",...Co(d,d)})}):a._tx||a.load({sync:!0}).catch(console.error),r},[a,a.history]),null}function Lw(){const e=cn(),a=e.routesById[Is],i=Do(e,a),r=g.jsxs(g.Fragment,{children:[g.jsx(kw,{t:ee.useState()[1]}),e.ssr?g.jsx(Ty,{}):g.jsx(ee.Suspense,{fallback:i,children:g.jsx(Ty,{})})]});return e.options.InnerWrap?g.jsx(e.options.InnerWrap,{children:r}):r}function Ty(){const e=cn(),a=e._rendered,i=ja(e.stores.matches,d=>a[0]??d),r=i[0],o=r?.routeId;Lv(()=>{a[0]===i&&bb(a,!0)},[a,i]);const c=o?g.jsx(yb,{routeId:o}):null;return e.options.disableGlobalCatchBoundary?c:g.jsx(yd,{getResetKey:()=>r,onCatch:void 0,children:c})}var Uw=e=>({createMutableStore:wy,createReadonlyStore:wy,batch:uw}),Zw=e=>new qw(e),qw=class extends D1{constructor(e){super(e,Uw)}};function Bw({router:e,children:a,...i}){Zv(i)&&e.update({...e.options,...i,context:{...e.options.context,...i.context}});const r=g.jsx(ib.Provider,{value:e,children:a});return e.options.Wrap?g.jsx(e.options.Wrap,{children:r}):r}function $w({router:e,...a}){return g.jsx(Bw,{router:e,...a,children:g.jsx(Lw,{})})}function Hw(e){const a=cn();return ja(a.stores.location,ob(e,a))}function Yf(e){const a=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>a.indexOf(+r)===-1).map(([r,o])=>o)}function Ay(e,a="|"){return e.map(i=>Ob(i)).join(a)}function Ff(e,a){return typeof a=="bigint"?a.toString():a}class Qw{constructor(a){this._getter=a,this._value=void 0}get value(){const a=this._getter;return a!==void 0&&(this._value=a(),this._getter=void 0),this._value}}function vd(e){return new Qw(e)}function Gw(e){return e==null}function bd(e){const a=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(a,i)}function Kw(e,a){const i=e/a,r=Math.round(i),o=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-r)<o?0:i-r}function za(e,a,i){Object.defineProperty(e,a,{value:i,writable:!0,enumerable:!0,configurable:!0})}function xb(e){const a=Object.getOwnPropertyDescriptor(e,"shape");return a?.get?a.get.raw:a?.value}function Gn(e){return xb(e._zod.def)??e._zod.def.shape}function Sb(e,a,i){Object.defineProperty(e,a,{get(){const r=i();return za(this,a,r),r},enumerable:!0,configurable:!0})}function _b(e,a,i){a in e?za(e,a,i):e[a]=i}function ns(e,a,i,r){const o=Gn(a);for(const c of i){const d=Object.getOwnPropertyDescriptor(o,c);d.enumerable&&(d.get?Sb(e,c,()=>{const h=a._zod.def.shape[c];return r?r(h,c):h}):_b(e,c,r?r(d.value,c):d.value))}}function Yw(e,a){for(const i of Reflect.ownKeys(a)){const r=Object.getOwnPropertyDescriptor(a,i);r.enumerable&&(r.get?Sb(e,i,()=>a[i]):_b(e,i,r.value))}}function Gt(...e){const a={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(a,r)}return Object.defineProperties({},a)}function Fw(e){return JSON.stringify(e)}function Vw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const wb="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Pw=vd(()=>{if(un.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ai(e){if(wo(e)===!1)return!1;const a=e.constructor;if(a===void 0||typeof a!="function")return!0;const i=a.prototype;return!(wo(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function jb(e){return ai(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Xw=new Set(["string","number","symbol"]);function si(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ta(e,a,i){const r=new e._zod.constr(a??e._zod.def);return(!a||i?.parent)&&(r._zod.parent=e),r}function oe(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 Ob(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Jw(e){return Object.keys(e).filter(a=>e[a]._zod.optin!==void 0&&e[a]._zod.optout==="optional")}const Eb={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]},Iw={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ww(e,a){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return ns(c,e,ko(e,a)),Ta(e,Gt(i,{shape:c,checks:[]}))}function ko(e,a){const i=Gn(e),r=[];for(const o of Reflect.ownKeys(a)){if(!Object.getOwnPropertyDescriptor(i,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);a[o]&&r.push(o)}return r}function e2(e,a){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(ko(e,a)),d={};return ns(d,e,Reflect.ownKeys(Gn(e)).filter(h=>!c.has(h))),Ta(e,Gt(i,{shape:d,checks:[]}))}function t2(e,a){if(!ai(a))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const o=Gn(e);for(const c of Reflect.ownKeys(a))if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ta(e,Gt(e._zod.def,{shape:Nb(e,a)}))}function Nb(e,a){const i={};return ns(i,e,Reflect.ownKeys(Gn(e))),Yw(i,a),i}function n2(e,a){if(!ai(a))throw new Error("Invalid input to safeExtend: expected a plain object");return Ta(e,Gt(e._zod.def,{shape:Nb(e,a)}))}function a2(e,a){if(!a?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const i={};ns(i,e,Reflect.ownKeys(Gn(e))),ns(i,a,Reflect.ownKeys(Gn(a)));const r=Gt(e._zod.def,{shape:i,get catchall(){return a._zod.def.catchall},checks:a._zod.def.checks??[]});return Ta(e,r)}function Ry(e,a,i,r="partial"){const c=a._zod.def.checks;if(c&&c.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const h=i?new Set(ko(a,i)):void 0,p={};return ns(p,a,Reflect.ownKeys(Gn(a)),e&&((m,b)=>h&&!h.has(b)?m:new e({type:"optional",innerType:m}))),Ta(a,Gt(a._zod.def,{shape:p,checks:[]}))}function s2(e,a,i){const r=i?new Set(ko(a,i)):void 0,o={};return ns(o,a,Reflect.ownKeys(Gn(a)),(c,d)=>r&&!r.has(d)?c:new e({type:"nonoptional",innerType:c})),Ta(a,Gt(a._zod.def,{shape:o}))}function Bn(e,a=0){if(e.aborted===!0)return!0;for(let i=a;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function i2(e,a=0){if(e.aborted===!0)return!0;for(let i=a;i<e.issues.length;i++)if(e.issues[i]?.continue===!1)return!0;return!1}function Xs(e,a){return a.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function ur(e){return typeof e=="string"?e:e?.message}function Cy(e){const a=[];for(const i of e??[]){const r=i._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&a.push([o,i])}return a}function Vf(e,a,i){var r;for(let o=a;o<e.length;o++)(r=e[o]).schema??(r.schema=i)}function Oa(e,a,i){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const c=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,d=e.message?e.message:ur(e.inst?._zod.def?.error?.(e))??ur(c?.(e))??ur(a?.error?.(e))??ur(i.customError?.(e))??ur(i.localeError?.(e))??"Invalid input",h={};for(const p of Object.keys(e))p==="inst"||p==="schema"||p==="continue"||p==="input"||p==="__proto__"||(h[p]=e[p]);return h.path??(h.path=[]),h.message=d,a?.reportInput&&(h.input=e.input),h}const r2=/[\uD800-\uDBFF]/;function xd(e){const a=e.length;if(!r2.test(e))return a;let i=a;for(let r=0;r<a-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(i--,r++);return i}function Sd(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function l2(e){const a=typeof e;switch(a){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return a}function jr(...e){const[a,i,r]=e;return typeof a=="string"?{message:a,code:"custom",input:i,inst:r}:{...a}}function o2(e,a){for(const i in a){const r=Object.getOwnPropertyDescriptor(a,i);r.get?Object.defineProperty(e,i,{...r,enumerable:!1}):u2(e,i,r.value)}}function Ea(e,a,i,r=!0){return Object.defineProperty(e,a,{configurable:!0,writable:!0,enumerable:r,value:i}),i}function zb(e,a,i){return Ea(e,a,i,!1)}function Tb(e,a){for(const i in e){const r=e[i];Object.defineProperty(a,i,{configurable:!0,enumerable:!0,get(){return Ea(this,i,r(this))},set(o){Ea(this,i,o)}})}return a}function u2(e,a,i){Object.defineProperty(e,a,{configurable:!0,get(){return this==null?i:Ea(this,a,i.bind(this))},set(r){Ea(this,a,r)}})}function c2(e,a){const i=Object.getPrototypeOf(e);return a in i?void 0:i}let _f,ya=!1;const f2={configurable:!0,get(){ya=!0}};function Re(e,a,i){const r=Object.getPrototypeOf(e._zod);if(a in r&&_f!==e._zod){_f=void 0;return}_f=e._zod,Object.defineProperty(r,a,{configurable:!0,get(){Object.defineProperty(this,a,f2);const o=ya;ya=!1;try{const c=i(this);return ya?delete this[a]:Object.defineProperty(this,a,{configurable:!0,writable:!0,value:c}),ya=ya||o,c}catch(c){throw delete this[a],ya=ya||o,c}},set(o){Object.defineProperty(this,a,{configurable:!0,writable:!0,value:o})}})}function d2(e,a,i,r){const o=c2(e,a);o&&Object.defineProperty(o,a,{configurable:!0,get(){const c={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,a,c),c.value=i(this),Object.defineProperty(this,a,c),c.value},set(c){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:r,value:c})}})}const h2="~constantCatch";function m2(e){const a=()=>e;return a[h2]=!0,a}var My;const wf={value:void 0,enumerable:!1};let Dy="captureStackTrace"in Error?Error:null;function p2(e){const a=Dy;if(a){const i=a.stackTraceLimit;if(typeof i=="number"){try{a.stackTraceLimit=0}catch{return Dy=null,new e}try{return new e}finally{a.stackTraceLimit=i}}}return new e}function Y(e,a,i,r){const o={};function c(x){this.def=x,this.constr=v,this.traits=new Set}c.prototype=o;const d=i,h=d&&new WeakSet;function p(x,S){if(x._zod){if(x._zod.traits.has(e))return}else{wf.value=new c(S);try{Object.defineProperty(x,"_zod",wf)}finally{wf.value=void 0}}if(x._zod.traits.add(e),a(x,S),h){const j=Object.getPrototypeOf(x),z=x._zod.constr.prototype;let T=j;for(;T&&T!==z;)T=Object.getPrototypeOf(T);const L=T??j;h.has(L)||(h.add(L),o2(L,d))}const w=v.prototype;for(const j in w)Object.prototype.hasOwnProperty.call(w,j)&&(j in x||(x[j]=w[j].bind(x)))}const m=r?.Parent??Object;class b extends m{}Object.defineProperty(b,"name",{value:e});function v(x){const S=r?.Parent?p2(b):this;p(S,x);const w=S._zod.deferred;if(w){for(const z of w)z();S._zod.deferred=void 0}const j=globalThis.__zod_globalConfig?.postProcessor;return j&&j(S),S}return Object.defineProperty(v,"init",{value:p}),Object.defineProperty(v,Symbol.hasInstance,{value:x=>r?.Parent&&x instanceof r.Parent?!0:x?._zod?.traits?.has(e)}),Object.defineProperty(v,"name",{value:e}),v}class es extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ab extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}(My=globalThis).__zod_globalConfig??(My.__zod_globalConfig={});const un=globalThis.__zod_globalConfig;function xn(e){return e&&Object.assign(un,e),un}function g2(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ff,2)),e.message}function y2(e){this._zod.message=e}const v2={get:g2,set:y2,enumerable:!0,configurable:!0},jf={value:void 0,enumerable:!1},ky=new WeakSet([Object.prototype,Error.prototype]),b2=(e,a)=>{e.name="$ZodError",jf.value=a,Object.defineProperty(e,"issues",jf),jf.value=void 0,Object.defineProperty(e,"message",v2);const i=Object.getPrototypeOf(e);ky.has(i)||(ky.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},x2=Y("$ZodError",b2);function S2(e,a,i){return Object.prototype.hasOwnProperty.call(e,a)||(a==="__proto__"?Object.defineProperty(e,a,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[a]=i()),e[a]}function _2(e,a=i=>i.message){const i={},r=[];for(const o of e.issues)o.path.length>0?S2(i,o.path[0],()=>[]).push(a(o)):r.push(a(o));return{formErrors:r,fieldErrors:i}}function w2(e,a=i=>i.message){const i={_errors:[]},r=(o,c=[])=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h},[...c,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...c,...d.path]);else{const h=[...c,...d.path];if(h.length===0)i._errors.push(a(d));else{let p=i,m=0;for(;m<h.length;){const b=h[m],v=m===h.length-1;if(b==="_errors"){v&&p._errors.push(a(d)),m++;continue}Object.prototype.hasOwnProperty.call(p,b)||Object.defineProperty(p,b,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const x=p[b];v&&x._errors.push(a(d)),p=x,m++}}}};return r(e),i}function Lo(e,a){return{callee:a?.callee??e,Err:a?.Err}}const _d=e=>{const a=(i,r,o,c)=>{const d=o?{...o,async:!1}:{async:!1},h=i._zod.run({value:r,issues:[]},d);if(h instanceof Promise)throw new es;if(h.issues.length){const p=new(c?.Err??e)(h.issues.map(m=>Oa(m,d,xn())));throw wb(p,c?.callee??a),p}return h.value};return a},wd=e=>{const a=async(i,r,o,c)=>{const d=o?{...o,async:!0}:{async:!0};let h=i._zod.run({value:r,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const p=new(c?.Err??e)(h.issues.map(m=>Oa(m,d,xn())));throw wb(p,c?.callee??a),p}return h.value};return a},jd=e=>(a,i,r)=>{const o=r?{...r,async:!1}:{async:!1},c=a._zod.run({value:i,issues:[]},o);if(c instanceof Promise)throw new es;return c.issues.length?Rb(e,c.issues,o):{success:!0,data:c.value}};function Rb(e,a,i){let r;return{success:!1,get error(){return r||(r=new e(a.map(o=>Oa(o,i,xn()))),a=void 0,i=void 0),r},set error(o){r=o,a=void 0,i=void 0}}}const Od=e=>async(a,i,r)=>{const o=r?{...r,async:!0}:{async:!0};let c=a._zod.run({value:i,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?Rb(e,c.issues,o):{success:!0,data:c.value}},j2=Symbol.for("zod.compile.invalid"),O2=Symbol.for("zod.compile.fallback"),E2=((e,a,i)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(a)!==j2)return!0;if(r.definite===!0&&i===void 0)return!1}return N2(e,a,i)});function N2(e,a,i){const r=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let c;if(o?(r[O2]=!0,c=o({value:a,issues:[]},r)):c=e._zod.run({value:a,issues:[]},r),c instanceof Promise)throw new es;return c.issues.length===0}const z2=async(e,a,i)=>{const r=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:a,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},T2=e=>{const a=_d(e),i=(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return a(r,o,h,Lo(i,d))};return i},A2=e=>{const a=_d(e),i=(r,o,c,d)=>a(r,o,c,Lo(i,d));return i},R2=e=>{const a=wd(e),i=async(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return await a(r,o,h,Lo(i,d))};return i},C2=e=>{const a=wd(e),i=async(r,o,c,d)=>await a(r,o,c,Lo(i,d));return i},M2=e=>(a,i,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return jd(e)(a,i,o)},D2=e=>(a,i,r)=>jd(e)(a,i,r),k2=e=>async(a,i,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Od(e)(a,i,o)},L2=e=>async(a,i,r)=>Od(e)(a,i,r),U2=/^[cC][0-9a-z]{6,}$/,Z2=/^[0-9a-z]+$/,q2=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,B2=/^[0-9a-vA-V]{20}$/,$2=/^[A-Za-z0-9]{27}$/,H2=/^[a-zA-Z0-9_-]{21}$/;function Q2(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const G2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,K2=/^([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})$/,Ly=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)$/,Y2=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,F2="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function V2(){return new RegExp(F2,"u")}const P2=/^(?:(?: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])$/,X2=/^(([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}|:))$/,J2=/^((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])$/,I2=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,W2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ej=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,tj=/^https?$/,nj=/^\+[1-9]\d{6,14}$/,Cb="(?:(?:\\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])))";function aj(e){return new RegExp(`^${e}$`)}const sj=aj(Cb);function Pf(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}}`:e.seconds?`${a}:[0-5]\\d(?:\\.\\d+)?`:`${a}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ij(e){return new RegExp(`^${Pf(e)}$`)}function rj(e){const a=["Z"];e.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${Pf({precision:e.precision,seconds:!0})}(?:${a.join("|")})`,r=e.local?`${i}|${Pf({precision:e.precision})}`:i;return new RegExp(`^${Cb}T(?:${r})$`)}const lj=/^[\s\S]{0,}$/,oj=/^-?\d+$/,Ed=/^-?\d+(?:\.\d+)?$/,uj=/^(?:true|false)$/i,cj=/^[^A-Z]*$/,fj=/^[^a-z]*$/,Ct=Y("$ZodCheck",(e,a)=>{var i;e._zod??(e._zod={}),e._zod.def=a,(i=e._zod).onattach??(i.onattach=[])}),Nd=e=>{const a=e.value;return!Gw(a)&&a.length!==void 0},jo={number:"number",bigint:"bigint",object:"date"},Mb=Y("$ZodCheckLessThan",(e,a)=>{Ct.init(e,a);const i=jo[typeof a.value];e._zod.check=r=>{(a.inclusive?r.value<=a.value:r.value<a.value)||r.issues.push({origin:jo[typeof r.value]??i,code:"too_big",maximum:typeof a.value=="object"?a.value.getTime():a.value,input:r.value,inclusive:a.inclusive,inst:e,continue:!a.abort})}}),Db=Y("$ZodCheckGreaterThan",(e,a)=>{Ct.init(e,a);const i=jo[typeof a.value];e._zod.check=r=>{(a.inclusive?r.value>=a.value:r.value>a.value)||r.issues.push({origin:jo[typeof r.value]??i,code:"too_small",minimum:typeof a.value=="object"?a.value.getTime():a.value,input:r.value,inclusive:a.inclusive,inst:e,continue:!a.abort})}}),dj=Y("$ZodCheckMultipleOf",(e,a)=>{Ct.init(e,a),e._zod.check=i=>{if(typeof i.value!=typeof a.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?a.value!==BigInt(0)&&i.value%a.value===BigInt(0):Kw(i.value,a.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:a.value,input:i.value,inst:e,continue:!a.abort})}}),hj=Y("$ZodCheckNumberFormat",(e,a)=>{Ct.init(e,a),a.format=a.format||"float64";const i=a.format?.includes("int"),r=i?"int":"number",[o,c]=Eb[a.format];e._zod.check=d=>{const h=d.value;if(i){if(!Number.isInteger(h)){d.issues.push({expected:r,format:a.format,code:"invalid_type",continue:!1,input:h,inst:e});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!a.abort}):d.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!a.abort});return}}h<o&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!a.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!a.abort})}}),mj=Y("$ZodCheckMaxLength",(e,a)=>{var i;Ct.init(e,a),(i=e._zod.def).when??(i.when=Nd),e._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>a.maximum?xd(o):c)<=a.maximum)return;const h=Sd(o);r.issues.push({origin:h,code:"too_big",maximum:a.maximum,inclusive:!0,input:o,inst:e,continue:!a.abort})}}),pj=Y("$ZodCheckMinLength",(e,a)=>{var i;Ct.init(e,a),(i=e._zod.def).when??(i.when=Nd),e._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>=a.minimum&&c<a.minimum*2?xd(o):c)>=a.minimum)return;const h=Sd(o);r.issues.push({origin:h,code:"too_small",minimum:a.minimum,inclusive:!0,input:o,inst:e,continue:!a.abort})}}),gj=Y("$ZodCheckLengthEquals",(e,a)=>{var i;Ct.init(e,a),(i=e._zod.def).when??(i.when=Nd),e._zod.check=r=>{const o=r.value,c=o.length,d=typeof o=="string"&&c>=a.length&&c<=a.length*2?xd(o):c;if(d===a.length)return;const h=Sd(o),p=d>a.length;r.issues.push({origin:h,...p?{code:"too_big",maximum:a.length}:{code:"too_small",minimum:a.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!a.abort})}}),Uo=Y("$ZodCheckStringFormat",(e,a)=>{var i,r;Ct.init(e,a),a.pattern?(i=e._zod).check??(i.check=o=>{a.pattern.lastIndex=0,!a.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:a.format,input:o.value,...a.pattern?{pattern:a.pattern.toString()}:{},inst:e,continue:!a.abort})}):(r=e._zod).check??(r.check=()=>{})}),yj=Y("$ZodCheckRegex",(e,a)=>{Uo.init(e,a),e._zod.check=i=>{a.pattern.lastIndex=0,!a.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:a.pattern.toString(),inst:e,continue:!a.abort})}}),vj=Y("$ZodCheckLowerCase",(e,a)=>{a.pattern??(a.pattern=cj),Uo.init(e,a)}),bj=Y("$ZodCheckUpperCase",(e,a)=>{a.pattern??(a.pattern=fj),Uo.init(e,a)}),xj=Y("$ZodCheckIncludes",(e,a)=>{Ct.init(e,a);const i=si(a.includes),r=new RegExp(typeof a.position=="number"?`^.{${a.position},}${i}`:i);a.pattern=r,e._zod.check=o=>{o.value.includes(a.includes,a.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:a.includes,input:o.value,inst:e,continue:!a.abort})}}),Sj=Y("$ZodCheckStartsWith",(e,a)=>{Ct.init(e,a);const i=new RegExp(`^${si(a.prefix)}.*`);a.pattern??(a.pattern=i),e._zod.check=r=>{r.value.startsWith(a.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:a.prefix,input:r.value,inst:e,continue:!a.abort})}}),_j=Y("$ZodCheckEndsWith",(e,a)=>{Ct.init(e,a);const i=new RegExp(`.*${si(a.suffix)}$`);a.pattern??(a.pattern=i),e._zod.check=r=>{r.value.endsWith(a.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:a.suffix,input:r.value,inst:e,continue:!a.abort})}}),wj=Y("$ZodCheckOverwrite",(e,a)=>{Ct.init(e,a),e._zod.check=i=>{i.value=a.tx(i.value)}});class jj{constructor(a=[],i={}){this.content=[],this.indent=0,this.args=a,this.closed=i}indented(a){this.indent+=1;try{a(this)}finally{this.indent-=1}}write(a){if(typeof a=="function"){a(this,{execution:"sync"}),a(this,{execution:"async"});return}const r=a.split(`
11
+ `).filter(d=>d),o=Math.min(...r.map(d=>d.length-d.trimStart().length)),c=r.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(const d of c)this.content.push(d)}compile(){const a=Function,i=this?.content??[""];return new a(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
12
+ ${i.join(`
13
+ `)}
14
+ };`)(...Object.values(this.closed))}}const Oj={major:4,minor:6,patch:7},Ke=Y("$ZodType",(e,a)=>{var i;e??(e={}),e._zod.def=a,e._zod.bag=e._zod.bag||{},e._zod.version=Oj;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const c of o)for(const d of c._zod.onattach)d(e);if(o.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const c=(h,p,m)=>{if(h.memo)return h;let b=Bn(h),v;for(const x of p){if(x._zod.def.when){if(i2(h)||!x._zod.def.when(h))continue}else if(b)continue;const S=h.issues.length,w=x._zod.check(h);if(w instanceof Promise&&m?.async===!1)throw new es;if(v||w instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await w,h.issues.length!==S&&(Vf(h.issues,S,e),b||(b=Bn(h,S)))});else{if(h.issues.length===S)continue;Vf(h.issues,S,e),b||(b=Bn(h,S))}}return v?v.then(()=>h):h},d=(h,p,m)=>{if(Bn(h))return h.aborted=!0,h;const b=c(p,o,m);if(b instanceof Promise){if(m.async===!1)throw new es;return b.then(v=>e._zod.parse(v,m))}return e._zod.parse(b,m)};e._zod.run=(h,p)=>{if(p.skipChecks)return e._zod.parse(h,p);if(p.direction==="backward"){const b=e._zod.parse({value:h.value,issues:[]},{...p,skipChecks:!0});return b instanceof Promise?b.then(v=>d(v,h,p)):d(b,h,p)}const m=e._zod.parse(h,p);if(m instanceof Promise){if(p.async===!1)throw new es;return m.then(b=>c(b,o,p))}return c(m,o,p)}}},{get"~standard"(){return zb(this,"~standard",Lb(this))},set"~standard"(e){Ea(this,"~standard",e)}}),kb=(e,a)=>e.issues.length?{issues:e.issues.map(i=>Oa(i,a,xn()))}:{value:e.value};async function Ej(e,a){const i={async:!0};return kb(await e._zod.run({value:a,issues:[]},i),i)}function Lb(e){return{validate:a=>{const i={async:!1};try{const r=e._zod.run({value:a,issues:[]},i);if(!(r instanceof Promise))return kb(r,i)}catch{}return Ej(e,a)},vendor:"zod",version:1}}const zd=Y("$ZodString",(e,a)=>{Ke.init(e,a),e._zod.pattern=a.pattern??lj,e._zod.parse=(i,r)=>{if(a.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),Ge=Y("$ZodStringFormat",(e,a)=>{Uo.init(e,a),zd.init(e,a)}),Nj=Y("$ZodGUID",(e,a)=>{a.pattern??(a.pattern=K2),Ge.init(e,a)}),zj=Y("$ZodUUID",(e,a)=>{if(a.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[a.version];if(r===void 0)throw new Error(`Invalid UUID version: "${a.version}"`);a.pattern??(a.pattern=Ly(r))}else a.pattern??(a.pattern=Ly());Ge.init(e,a)}),Tj=Y("$ZodEmail",(e,a)=>{a.pattern??(a.pattern=Y2),Ge.init(e,a)}),Ub=1,Oo=2;function Zb(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Aj(e,a){return!("normalize"in a)&&!("hostname"in a)&&!("protocol"in a)?Zb(e)||Oo:Rj(e,a)}function Rj(e,a){if(!a.normalize&&a.protocol?.source===tj.source&&!/^https?:\/\//i.test(e))return Ub;try{if(typeof URL<"u"){const i=URL;if(typeof i.parse=="function")return i.parse(e)??Oo}return new URL(e)}catch{return Oo}}const Cj=/[\t\n\r]/g;function Uy(e){return e.replace(Cj,"")}function Mj(e,a){return a.lastIndex=0,a.test(e.hostname)}function Dj(e,a){return a.lastIndex=0,a.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const kj=Y("$ZodURL",(e,a)=>{Ge.init(e,a),e._zod.check=i=>{try{const r=i.value.trim(),o=Aj(r,a);if(o===Ub){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!a.abort});return}if(o===Oo){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!a.abort});return}if(o===!0){i.value=Uy(r);return}a.hostname&&!Mj(o,a.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:a.hostname.source,input:i.value,inst:e,continue:!a.abort}),a.protocol&&!Dj(o,a.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:a.protocol.source,input:i.value,inst:e,continue:!a.abort}),i.value=a.normalize?o.href:Uy(r);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!a.abort})}}}),Lj=Y("$ZodEmoji",(e,a)=>{a.pattern??(a.pattern=V2()),Ge.init(e,a)}),Uj=Y("$ZodNanoID",(e,a)=>{if(a.length!==void 0&&(!Number.isInteger(a.length)||a.length<1))throw new Error(`Invalid nanoid length: ${a.length}`);a.pattern??(a.pattern=a.length===void 0?H2:Q2(a.length)),Ge.init(e,a)}),Zj=Y("$ZodCUID",(e,a)=>{a.pattern??(a.pattern=U2),Ge.init(e,a)}),qj=Y("$ZodCUID2",(e,a)=>{a.pattern??(a.pattern=Z2),Ge.init(e,a)}),Bj=Y("$ZodULID",(e,a)=>{a.pattern??(a.pattern=q2),Ge.init(e,a)}),$j=Y("$ZodXID",(e,a)=>{a.pattern??(a.pattern=B2),Ge.init(e,a)}),Hj=Y("$ZodKSUID",(e,a)=>{a.pattern??(a.pattern=$2),Ge.init(e,a)}),Qj=Y("$ZodISODateTime",(e,a)=>{a.pattern??(a.pattern=rj(a)),Ge.init(e,a)}),Gj=Y("$ZodISODate",(e,a)=>{a.pattern??(a.pattern=sj),Ge.init(e,a)}),Kj=Y("$ZodISOTime",(e,a)=>{a.pattern??(a.pattern=ij(a)),Ge.init(e,a)}),Yj=Y("$ZodISODuration",(e,a)=>{a.pattern??(a.pattern=G2),Ge.init(e,a)}),Fj=Y("$ZodIPv4",(e,a)=>{a.pattern??(a.pattern=P2),Ge.init(e,a)}),Vj=/^[0-9a-fA-F:.]+$/;function qb(e){return Vj.test(e)?Zb(`http://[${e}]`):!1}const Pj=Y("$ZodIPv6",(e,a)=>{a.pattern??(a.pattern=X2),Ge.init(e,a),e._zod.check=i=>{qb(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!a.abort})}}),Xj=Y("$ZodCIDRv4",(e,a)=>{a.pattern??(a.pattern=J2),Ge.init(e,a)});function Jj(e){const a=e.split("/");if(a.length!==2)return!1;const[i,r]=a;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:qb(i)}const Ij=Y("$ZodCIDRv6",(e,a)=>{a.pattern??(a.pattern=I2),Ge.init(e,a),e._zod.check=i=>{Jj(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!a.abort})}});function Bb(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const $b=/^[0-9a-zA-Z+/]*={0,2}$/,Wj=Y("$ZodBase64",(e,a)=>{a.pattern??(a.pattern=$b),Ge.init(e,a),e._zod.check=i=>{Bb(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!a.abort})}}),Td=/^[A-Za-z0-9_-]*$/;function eO(e){if(!Td.test(e))return!1;const a=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=a.padEnd(Math.ceil(a.length/4)*4,"=");return Bb(i)}const tO=Y("$ZodBase64URL",(e,a)=>{a.pattern??(a.pattern=Td),Ge.init(e,a),e._zod.check=i=>{eO(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!a.abort})}}),nO=Y("$ZodE164",(e,a)=>{a.pattern??(a.pattern=nj),Ge.init(e,a)});function aO(e,a=null){try{const i=e.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||a&&(!("alg"in o)||o.alg!==a))}catch{return!1}}const sO=Y("$ZodJWT",(e,a)=>{Ge.init(e,a),e._zod.check=i=>{aO(i.value,a.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!a.abort})}}),Hb=Y("$ZodNumber",(e,a)=>{Ke.init(e,a),e._zod.pattern=Ed,e._zod.parse=(i,r)=>{if(a.coerce)try{i.value=Number(i.value)}catch{}const o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...c?{received:c}:{}}),i}}),iO=Y("$ZodNumberFormat",(e,a)=>{hj.init(e,a),Hb.init(e,a)}),rO=Y("$ZodBoolean",(e,a)=>{Ke.init(e,a),e._zod.pattern=uj,e._zod.parse=(i,r)=>{if(a.coerce)try{i.value=!!i.value}catch{}const o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),i}}),lO=Y("$ZodUnknown",(e,a)=>{Ke.init(e,a),e._zod.parse=i=>i}),oO=Y("$ZodNever",(e,a)=>{Ke.init(e,a),e._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function uO(e,a){const i=Cy(e._zod.def.checks);if(!i.length)return;const r=Math.min(...i.map(c=>c[0])),o=e._zod.parse;e._zod.parse=(c,d)=>{const h=a(c.value);if(h>r&&!d?.skipChecks&&d?.direction!=="backward"){for(const[p,m]of Cy(e._zod.def.checks))if(h>p&&m._zod.def.when(c)){const b=c.issues.length;return m._zod.check(c),c.issues[b].continue=!1,Vf(c.issues,b,e),c}}return o(c,d)}}const cO=e=>Array.isArray(e)?e.length:-1;function Zy(e,a,i){e.issues.length&&a.issues.push(...Xs(i,e.issues)),a.value[i]=e.value}const fO=Y("$ZodArray",(e,a)=>{Ke.init(e,a);const i=un.memoizer;i?.attach(e),e._zod.parse=(r,o)=>{const c=r.value;if(!Array.isArray(c))return r.issues.push({expected:"array",code:"invalid_type",input:c,inst:e}),r;r.value=i?i.alloc(e,r,Array(c.length),o):Array(c.length);const d=[],h=o?.abortEarly;for(let p=0;p<c.length;p++){const m=c[p],b=a.element._zod.run({value:m,issues:[]},o);if(b instanceof Promise)d.push(b.then(v=>Zy(v,r,p)));else if(Zy(b,r,p),h&&b.issues.length!==0&&Bn(b))break}return d.length?Promise.all(d).then(()=>r):r},uO(e,cO)});function Eo(e,a,i,r,o,c){const d=i in r,h=c==="optional";if(!(!d&&h&&o==="optional")){if(e.issues.length){if(o!==void 0&&h&&!d)return;a.issues.push(...Xs(i,e.issues))}if(!d&&o===void 0){e.issues.length||a.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?(d||o==="defaulted"&&!h)&&(a.value[i]=void 0):a.value[i]=e.value}}const dO=[];function Qb(e){const a=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),r=i.length?i:dO,o=r.length?[...a,...r]:a;for(const d of o)if(!e.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const c=Jw(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(a),numKeys:a.length,optionalKeys:new Set(c)}}function Gb(e,a,i,r,o,c,d){const h=[],p=o.keySet,m=o.catchall._zod,b=m.def.type,v=m.optin,x=m.optout;let S=0;for(const w in a){if(d&&i.issues.length!==S){if(Bn(i,S))break;S=i.issues.length}if(p.has(w))continue;if(w==="__proto__"){b==="never"&&h.push(w);continue}if(b==="never"){h.push(w);continue}const j=m.run({value:a[w],issues:[]},r);j instanceof Promise?e.push(j.then(z=>Eo(z,i,w,a,v,x))):Eo(j,i,w,a,v,x)}return h.length&&i.issues.push({code:"unrecognized_keys",keys:h,input:a,inst:c,continue:!0}),e.length?Promise.all(e).then(()=>i):i}const hO=Y("$ZodObject",(e,a)=>{Ke.init(e,a);const i=Object.getOwnPropertyDescriptor(a,"shape"),r=i?.get?i.get.raw:a.shape??{};if(r){const m=()=>{const b={...r};return Object.defineProperty(a,"shape",{value:b}),m.raw=b,b};m.raw=r,Object.defineProperty(a,"shape",{get:m})}const o=vd(()=>Qb(a));Re(e,"propValues",m=>{const b=m.def.shape,v={};for(const x in b){const S=b[x]._zod;if(S.values){Object.prototype.hasOwnProperty.call(v,x)||za(v,x,new Set);for(const w of S.values)v[x].add(w);S.optin!==void 0&&v[x].add(void 0)}}return v});const c=wo,d=a.catchall;let h;const p=un.memoizer;p?.attach(e),e._zod.parse=(m,b)=>{h??(h=o.value);const v=m.value;if(!c(v))return m.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),m;m.value=p?p.alloc(e,m,{},b):{};const x=[],S=h.shape,w=b?.abortEarly;let j=m.issues.length;for(const z of h.allKeys){if(w&&m.issues.length!==j){if(Bn(m,j))break;j=m.issues.length}if(z==="__proto__")continue;const T=S[z],L=T._zod.optin,G=T._zod.optout,V=T._zod.run({value:v[z],issues:[]},b);V instanceof Promise?x.push(V.then(W=>Eo(W,m,z,v,L,G))):Eo(V,m,z,v,L,G)}return d?Gb(x,v,m,b,o.value,e,w===!0):x.length?Promise.all(x).then(()=>m):m}}),mO=Y("$ZodObjectJIT",(e,a)=>{hO.init(e,a);const i=e._zod.parse,r=vd(()=>Qb(a)),o=un.memoizer,c=S=>{const w=r.value,j=w.symbolKeys,z=new jj(["payload","ctx"],{shape:S,inst:e,memo:o,syms:j}),T=W=>`shape[${W}]._zod.run({ value: input[${W}], issues: [] }, ctx)`,L=(W,$)=>`
15
+ let ${W}_ab = false;
16
+ for (let i = 0; i < ${W}.issues.length; i++) {
17
+ const iss = ${W}.issues[i];
18
+ iss.path = iss.path ? [${$}, ...iss.path] : [${$}];
19
+ payload.issues.push(iss);
20
+ if (iss.continue !== true) ${W}_ab = true;
21
+ }
22
+ if (${W}_ab && ctx && ctx.abortEarly) {
23
+ payload.value = newResult;
24
+ return payload;
25
+ }`;z.write("const input = payload.value;");const G=Object.create(null);let V=0;for(const W of w.allKeys)G[W]=`key_${V++}`;z.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const W of w.allKeys){if(W==="__proto__")continue;const $=G[W],R=typeof W=="symbol"?`syms[${j.indexOf(W)}]`:Fw(W),J=`${R} in input`,ie=S[W],re=ie?._zod?.optin,P=re!==void 0,I=ie?._zod?.optout==="optional";if(z.write(`const ${$} = ${T(R)};`),P&&I){const fe=re==="optional"?`${$}_present`:`${$}.value !== undefined || ${$}_present`;z.write(`
26
+ const ${$}_present = ${J};
27
+ if (!${$}.issues.length || ${$}_present) {
28
+ if (${$}.issues.length) {${L($,R)}
29
+ }
30
+
31
+ if (${fe}) {
32
+ newResult[${R}] = ${$}.value;
33
+ }
34
+ }
35
+
36
+ `)}else P?(z.write(`
37
+ if (${$}.issues.length) {${L($,R)}
38
+ }
39
+ `),re==="defaulted"?z.write(`newResult[${R}] = ${$}.value;`):z.write(`
40
+ if (${$}.value !== undefined || ${J}) {
41
+ newResult[${R}] = ${$}.value;
42
+ }
43
+ `)):z.write(`
44
+ const ${$}_present = ${J};
45
+ if (${$}.issues.length) {${L($,R)}
46
+ }
47
+ if (!${$}_present && !${$}.issues.length) {
48
+ payload.issues.push({
49
+ code: "invalid_type",
50
+ expected: "nonoptional",
51
+ input: undefined,
52
+ path: [${R}]
53
+ });
54
+ if (ctx && ctx.abortEarly) {
55
+ payload.value = newResult;
56
+ return payload;
57
+ }
58
+ }
59
+
60
+ if (${$}_present) {
61
+ newResult[${R}] = ${$}.value;
62
+ }
63
+
64
+ `)}return z.write("payload.value = newResult;"),z.write("return payload;"),z.compile()};let d;const h=wo,p=!un.jitless,b=p&&Pw.value,v=a.catchall;let x;e._zod.parse=(S,w)=>{x??(x=r.value);const j=S.value;return h(j)?p&&b&&w?.async===!1&&w.jitless!==!0?(d||(d=c(a.shape)),S=d(S,w),v?Gb([],j,S,w,x,e,w?.abortEarly===!0):S):i(S,w):(S.issues.push({expected:"object",code:"invalid_type",input:j,inst:e}),S)}});function qy(e,a,i,r){for(const c of e)if(c.issues.length===0)return a.value=c.value,a;const o=e.filter(c=>!Bn(c));return o.length===1?(a.value=o[0].value,o[0]):(a.issues.push({code:"invalid_union",input:a.value,inst:i,errors:e.map(c=>c.issues.map(d=>Oa(d,r,xn())))}),a)}const pO=Y("$ZodUnion",(e,a)=>{Ke.init(e,a),Re(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Re(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Re(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),Re(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(c=>c._zod.pattern);return new RegExp(`^(${o.map(c=>bd(c.source)).join("|")})$`)}});const i=a.options.length===1?a.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(i)return i(r,o);let c=!1;const d=[];for(const h of a.options){const p=h._zod.run({value:r.value,issues:[]},o);if(p instanceof Promise)d.push(p),c=!0;else{if(p.issues.length===0)return p;d.push(p)}}return c?Promise.all(d).then(h=>qy(h,r,e,o)):qy(d,r,e,o)}}),gO=Y("$ZodIntersection",(e,a)=>{Ke.init(e,a),e._zod.parse=(i,r)=>{const o=i.value,c=a.left._zod.run({value:o,issues:[]},r),d=a.right._zod.run({value:o,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([p,m])=>By(i,p,m)):By(i,c,d)}});function Xf(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(ai(e)&&ai(a)){const i=Object.keys(a),r=Object.keys(e).filter(c=>i.indexOf(c)!==-1),o={...e,...a};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const c of r){if(c==="__proto__")continue;const d=Xf(e[c],a[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};o[c]=d.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(a)){if(e.length!==a.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let r=0;r<e.length;r++){const o=e[r],c=a[r],d=Xf(o,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function By(e,a,i){const r=new Map;let o;const c=new Map,d=(m,b)=>{let v;if(m.code==="unrecognized_keys"&&!m.path?.length)o??(o=m),v=m.keys;else if(m.code==="invalid_key"&&m.origin==="record"&&m.path?.length===1){const x=String(m.path[0]);c.has(x)||c.set(x,m),v=[x]}else return!1;for(const x of v)r.has(x)||r.set(x,{}),r.get(x)[b]=!0;return!0};for(const m of a.issues)d(m,"l")||e.issues.push(m);for(const m of i.issues)d(m,"r")||e.issues.push(m);const h=[...r].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(h.length){const m=o?h.filter(b=>o.keys.includes(b)):[];m.length&&e.issues.push({...o,keys:m});for(const b of h)!m.includes(b)&&c.has(b)&&e.issues.push(c.get(b))}const p=Xf(a.value,i.value);if(!p.valid){if(Bn(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(p.mergeErrorPath)}`)}return e.value=p.data,e}const yO=Y("$ZodRecord",(e,a)=>{Ke.init(e,a);const i=un.memoizer;i?.attach(e),e._zod.parse=(r,o)=>{const c=r.value;if(!ai(c))return r.issues.push({expected:"record",code:"invalid_type",input:c,inst:e}),r;const d=[],h=a.keyType._zod.values;if(h&&!a.partial){r.value=i?i.alloc(e,r,{},o):{};const p=new Set;for(const b of h)if(typeof b=="string"||typeof b=="number"||typeof b=="symbol"){if(p.add(typeof b=="number"?b.toString():b),b==="__proto__")continue;const v=a.keyType._zod.run({value:b,issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(v.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(w=>Oa(w,o,xn())),input:b,path:[b],inst:e});continue}const x=v.value;if(x==="__proto__")continue;const S=a.valueType._zod.run({value:c[b],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Xs(b,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Xs(b,S.issues)),r.value[x]=S.value)}let m;for(const b in c)if(!p.has(b))if(a.mode==="loose"){if(b==="__proto__")continue;r.value[b]=c[b]}else m=m??[],m.push(b);m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:m,continue:!0})}else{r.value=i?i.alloc(e,r,{},o):{};let p;for(const m of Reflect.ownKeys(c)){if(m==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,m))continue;let b=a.keyType._zod.run({value:m,issues:[]},o);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&Ed.test(m)&&b.issues.length){const w=a.keyType._zod.run({value:Number(m),issues:[]},o);if(w instanceof Promise)throw new Error("Async schemas not supported in object keys currently");w.issues.length===0&&(b=w)}if(b.issues.length){a.mode==="loose"?r.value[m]=c[m]:h?(p=p??[],p.push(m)):r.issues.push({code:"invalid_key",origin:"record",issues:b.issues.map(w=>Oa(w,o,xn())),input:m,path:[m],inst:e});continue}const x=b.value;if(x==="__proto__")continue;const S=a.valueType._zod.run({value:c[m],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Xs(m,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Xs(m,S.issues)),r.value[x]=S.value)}p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:p,continue:!0})}return d.length?Promise.all(d).then(()=>r):r}}),vO=Y("$ZodEnum",(e,a)=>{Ke.init(e,a);const i=Yf(a.entries),r=new Set(i);e._zod.values=r,Re(e,"pattern",o=>{const c=Yf(o.def.entries).filter(d=>Xw.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>si(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,c)=>{const d=o.value;return r.has(d)||o.issues.push({code:"invalid_value",values:i,input:d,inst:e}),o}}),bO=Y("$ZodLiteral",(e,a)=>{Ke.init(e,a);const i=new Set(a.values);e._zod.values=i,Re(e,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(c=>typeof c=="string"?si(c):c?si(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,o)=>{const c=r.value;return i.has(c)||r.issues.push({code:"invalid_value",values:a.values,input:c,inst:e}),r}}),xO=Y("$ZodTransform",(e,a)=>{Ke.init(e,a),e._zod.optin="optional",un.memoizer?.guard(e),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Ab(e.constructor.name);const o=a.transform(i.value,i);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(i.value=d,i));if(o instanceof Promise)throw new es;return i.value=o,i}});function $y(e,a){return e.value=a.issues.length?void 0:a.value,e}const Kb=Y("$ZodOptional",(e,a)=>{Ke.init(e,a),Re(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Re(e,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Re(e,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${bd(r.source)})?$`):void 0}),e._zod.parse=(i,r)=>{if(i.value===void 0){if(a.innerType._zod.optin!=="defaulted")return i;const o=a.innerType._zod.run({value:i.value,issues:[]},r);return o instanceof Promise?o.then(c=>$y(i,c)):$y(i,o)}return a.innerType._zod.run(i,r)}}),SO=Y("$ZodExactOptional",(e,a)=>{Kb.init(e,a),Re(e,"values",i=>i.def.innerType._zod.values),Re(e,"pattern",i=>i.def.innerType._zod.pattern),e._zod.parse=(i,r)=>a.innerType._zod.run(i,r)}),_O=Y("$ZodNullable",(e,a)=>{Ke.init(e,a),Re(e,"optin",i=>i.def.innerType._zod.optin),Re(e,"optout",i=>i.def.innerType._zod.optout),Re(e,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${bd(r.source)}|null)$`):void 0}),Re(e,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),e._zod.parse=(i,r)=>i.value===null?i:a.innerType._zod.run(i,r)}),wO=Y("$ZodDefault",(e,a)=>{Ke.init(e,a),e._zod.optin="defaulted",Re(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return a.innerType._zod.run(i,r);if(i.value===void 0)return i.value=a.defaultValue,i;const o=a.innerType._zod.run(i,r);return o instanceof Promise?o.then(c=>Hy(c,a)):Hy(o,a)}});function Hy(e,a){return e.value===void 0&&(e.value=a.defaultValue),e}const jO=Y("$ZodPrefault",(e,a)=>{Ke.init(e,a),e._zod.optin="defaulted",Re(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,r)=>(r.direction==="backward"||i.value===void 0&&(i.value=a.defaultValue),a.innerType._zod.run(i,r))}),OO=Y("$ZodNonOptional",(e,a)=>{Ke.init(e,a),Re(e,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(i,r)=>{const o=a.innerType._zod.run(i,r);return o instanceof Promise?o.then(c=>Qy(c,e)):Qy(o,e)}});function Qy(e,a){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:a}),e}function Gy(e,a,i,r){return a.issues.length?(e.value=i.catchValue({...a,value:e.value,error:{issues:a.issues.map(o=>Oa(o,r,xn()))},input:e.value}),e):(e.value=a.value,a.memo&&(e.memo=!0),e)}const EO=Y("$ZodCatch",(e,a)=>{Ke.init(e,a),Re(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Re(e,"optout",i=>i.def.innerType._zod.optout),Re(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return a.innerType._zod.run(i,r);const o=a.innerType._zod.run({value:i.value,issues:[]},r);return o instanceof Promise?o.then(c=>Gy(i,c,a,r)):Gy(i,o,a,r)}}),NO=Y("$ZodPipe",(e,a)=>{Ke.init(e,a),Re(e,"values",i=>i.def.in._zod.values),Re(e,"optin",i=>i.def.in._zod.optin),Re(e,"optout",i=>i.def.out._zod.optout),Re(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,r)=>{if(r.direction==="backward"){const c=a.out._zod.run(i,r);return c instanceof Promise?c.then(d=>eo(d,a.in,r)):eo(c,a.in,r)}const o=a.in._zod.run(i,r);return o instanceof Promise?o.then(c=>eo(c,a.out,r)):eo(o,a.out,r)}});function eo(e,a,i){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):a._zod.run({value:e.value,issues:e.issues},i)}const zO=Y("$ZodReadonly",(e,a)=>{Ke.init(e,a),Re(e,"propValues",i=>i.def.innerType._zod.propValues),Re(e,"values",i=>i.def.innerType._zod.values),Re(e,"optin",i=>i.def.innerType?._zod?.optin),Re(e,"optout",i=>i.def.innerType?._zod?.optout),e._zod.parse=(i,r)=>{if(r.direction==="backward")return a.innerType._zod.run(i,r);const o=a.innerType._zod.run(i,r);return o instanceof Promise?o.then(Ky):Ky(o)}});function Ky(e){return e.memo||(e.value=Object.freeze(e.value)),e}const TO=Y("$ZodCustom",(e,a)=>{Ct.init(e,a),Ke.init(e,a),e._zod.parse=(i,r)=>i,e._zod.check=i=>{const r=i.value,o=a.fn(r);if(o instanceof Promise)return o.then(c=>Yy(c,i,r,e));Yy(o,i,r,e)}});function Yy(e,a,i,r){if(!e){const o={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),a.issues.push(jr(o))}}class AO extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Jf="~memo",Fy=[];function Yb(e){return e!==null&&typeof e=="object"}function Of(e){return e.map(a=>a.path?{...a,path:a.path.slice()}:{...a})}const Fb=new WeakMap,hr=0,ho=1,gr=2;function mo(e,a,i){const r=Fb.get(e);if(r!==void 0)return r?gr:hr;if(a.has(e))return gr;a.add(e);let o=hr;const c=b=>{if(o!==gr&&b?._zod){const v=mo(b,a);v>o&&(o=v)}},d=(b,v)=>{let x=hr;for(const S of Reflect.ownKeys(b)){const w=Object.getOwnPropertyDescriptor(b,S);if(!w.enumerable)continue;const j=w.get?ho:w.value?._zod?mo(w.value,a):hr;j>x&&(x=j)}return x},h=b=>{b>o&&(o=b)},p=e._zod.def;switch(p.type){case"object":{const b=xb(p);h(b?d(b):ho),c(p.catchall);break}case"array":c(p.element);break;case"tuple":for(const b of p.items)c(b);c(p.rest);break;case"record":case"map":c(p.keyType),c(p.valueType);break;case"set":c(p.valueType);break;case"union":for(const b of p.options)c(b);break;case"intersection":c(p.left),c(p.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(p.innerType);break;case"pipe":c(p.in),c(p.out);break;case"function":c(p.input),c(p.output);break;case"lazy":{const b=p._cachedInner??void 0;h(b?mo(b,a):ho);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const b in p){const v=Object.getOwnPropertyDescriptor(p,b);if(!v||v.get)continue;const x=v.value;if(!(!x||typeof x!="object")){if(x._zod)c(x);else if(Array.isArray(x))for(const S of x)c(S)}}}return a.delete(e),RO(e,o)}function RO(e,a){return a!==ho&&Fb.set(e,a===gr),a}function CO(e,a){let i=e.buckets.get(a);return i||(i=new WeakMap,e.buckets.set(a,i)),i}let to;const no=[],MO={alloc(e,a,i){const r=to;if(!r)return i;to=void 0;const o={value:i,issues:null};return r.set(a.value,o),no.push(o),i},guard(e){var a;(a=e._zod).deferred??(a.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,r=(o,c)=>{if(c.direction!=="backward"&&kO(c,o.value))throw new AO;return i(o,c)};e._zod.parse=r,e._zod.run===i&&(e._zod.run=r)})},attach(e){var a;let i,r=!1,o,c;(a=e._zod).deferred??(a.deferred=[]),e._zod.deferred.push(()=>{const d=e._zod.parse,h=(p,m)=>{if(i===void 0){const T=mo(e,new Set);if(T===hr)return e._zod.parse=d,e._zod.run===h&&(e._zod.run=d),d(p,m);T===gr||r?i=!0:r=!0}const b=p.value;if(!Yb(b))return d(p,m);let v=m[Jf];v||(v={buckets:new WeakMap,backEdges:void 0},m[Jf]=v);let x;o===m?x=c:(x=CO(v,e),o=m,c=x);const S=x.get(b);if(S)return p.value=S.value,S.issues?S.issues.length&&p.issues.push(...Of(S.issues)):(p.memo=!0,v.backEdges??(v.backEdges=new WeakSet),v.backEdges.add(S.value)),p;to=x;const w=no.length,j=d(p,m);to=void 0;const z=no.length>w?no.pop():void 0;return j instanceof Promise?j.then(T=>(z&&(z.issues=T.issues.length?Of(T.issues):Fy),T)):(z&&(z.issues=j.issues.length?Of(j.issues):Fy),j)};e._zod.parse=h,e._zod.run===d&&(e._zod.run=h)})}};function DO(){return MO}function kO(e,a){const i=e[Jf]?.backEdges;return i!==void 0&&Yb(a)&&i.has(a)}const LO=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function a(c){return e[c]??null}const i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(c,d){return c==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):r[c]??c}return c=>{switch(c.code){case"invalid_type":{const d=o(c.expected),h=l2(c.input),p=o(h,c.input);return`Invalid input: expected ${d}, received ${p}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${Ob(c.values[0])}`:`Invalid option: expected one of ${Ay(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",h=a(c.origin);return h?`Too big: expected ${c.origin??"value"} to have ${d}${c.maximum.toString()} ${h.unit??"elements"}`:`Too big: expected ${c.origin??"value"} to be ${d}${c.maximum.toString()}`}case"too_small":{const d=c.exact?"exactly ":c.inclusive?">=":">",h=a(c.origin);return h?`Too small: expected ${c.origin} to have ${d}${c.minimum.toString()} ${h.unit}`:`Too small: expected ${c.origin} to be ${d}${c.minimum.toString()}`}case"invalid_format":{const d=c;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${i[d.format]??c.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${c.divisor}`;case"unrecognized_keys":return`Unrecognized key${c.keys.length>1?"s":""}: ${Ay(c.keys,", ")}`;case"invalid_key":return`Invalid key in ${c.origin}`;case"invalid_union":return c.options&&Array.isArray(c.options)&&c.options.length>0?`Invalid discriminator value. Expected ${c.options.map(h=>`'${h}'`).join(" | ")}`:c.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${c.origin}`;default:return"Invalid input"}}};function UO(){return{localeError:LO()}}var Vy;class ZO{constructor(){this._map=new WeakMap,this._idmap=new Map}add(a,...i){const r=i[0];return this._map.set(a,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,a),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(a){const i=this._map.get(a);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(a),this}get(a){const i=a._zod.parent;if(i){const r={...this.get(i)??{}};delete r.id;const o={...r,...this._map.get(a)};return Object.keys(o).length?o:void 0}return this._map.get(a)}has(a){return this._map.has(a)}}function qO(){return new ZO}(Vy=globalThis).__zod_globalRegistry??(Vy.__zod_globalRegistry=qO());const mr=globalThis.__zod_globalRegistry;function Vb(e){return e.checks&&(e.checks=[...e.checks]),e}function BO(e,a){return new e(Vb({type:"string",...oe(a)}))}function $O(e,a){return new e({type:"string",format:"email",check:"string_format",abort:!1,...oe(a)})}function HO(e,a){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...oe(a)})}function QO(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...oe(a)})}function GO(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...oe(a)})}function KO(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...oe(a)})}function YO(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...oe(a)})}function FO(e,a){return new e({type:"string",format:"url",check:"string_format",abort:!1,...oe(a)})}function VO(e,a){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...oe(a)})}function PO(e,a){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...oe(a)})}function XO(e,a){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...oe(a)})}function JO(e,a){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...oe(a)})}function IO(e,a){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...oe(a)})}function WO(e,a){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...oe(a)})}function eE(e,a){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...oe(a)})}function tE(e,a){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...oe(a)})}function nE(e,a){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...oe(a)})}function aE(e,a){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...oe(a)})}function sE(e,a){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...oe(a)})}function iE(e,a){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...oe(a)})}function rE(e,a){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...oe(a)})}function lE(e,a){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...oe(a)})}function oE(e,a){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...oe(a)})}function Pb(e,a){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...oe(a)})}function uE(e,a){return new e({type:"string",format:"date",check:"string_format",...oe(a)})}function cE(e,a){return new e({type:"string",format:"time",check:"string_format",precision:null,...oe(a)})}function fE(e,a){return new e({type:"string",format:"duration",check:"string_format",...oe(a)})}function dE(e,a){return new e(Vb({type:"number",checks:[],...oe(a)}))}function hE(e,a){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...oe(a)})}function mE(e,a){return new e({type:"boolean",...oe(a)})}function pE(e){return new e({type:"unknown"})}function gE(e,a){return new e({type:"never",...oe(a)})}function Py(e,a){return new Mb({check:"less_than",...oe(a),value:e,inclusive:!1})}function Ef(e,a){return new Mb({check:"less_than",...oe(a),value:e,inclusive:!0})}function Xy(e,a){return new Db({check:"greater_than",...oe(a),value:e,inclusive:!1})}function Nf(e,a){return new Db({check:"greater_than",...oe(a),value:e,inclusive:!0})}function Jy(e,a){return new dj({check:"multiple_of",...oe(a),value:e})}function Xb(e,a){return new mj({check:"max_length",...oe(a),maximum:e})}function No(e,a){return new pj({check:"min_length",...oe(a),minimum:e})}function Jb(e,a){return new gj({check:"length_equals",...oe(a),length:e})}function yE(e,a){return new yj({check:"string_format",format:"regex",...oe(a),pattern:e})}function vE(e){return new vj({check:"string_format",format:"lowercase",...oe(e)})}function bE(e){return new bj({check:"string_format",format:"uppercase",...oe(e)})}function xE(e,a){return new xj({check:"string_format",format:"includes",...oe(a),includes:e})}function SE(e,a){return new Sj({check:"string_format",format:"starts_with",...oe(a),prefix:e})}function _E(e,a){return new _j({check:"string_format",format:"ends_with",...oe(a),suffix:e})}function ci(e){return new wj({check:"overwrite",tx:e})}function wE(e){return ci(a=>a.normalize(e))}function jE(){return ci(e=>e.trim())}function OE(){return ci(e=>e.toLowerCase())}function EE(){return ci(e=>e.toUpperCase())}function NE(){return ci(e=>Vw(e))}function zE(e,a,i){return new e({type:"array",element:a,...oe(i)})}function TE(e,a,i){return new e({type:"custom",check:"custom",fn:a,...oe(i)})}function AE(e,a){const i=RE(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(jr(o,r.value,i._zod.def));else{const c=o;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=r.value),c.inst??(c.inst=i),c.continue??(c.continue=!i._zod.def.abort),r.issues.push(jr(c))}},e(r.value,r)),a);return i}function RE(e,a){const i=new Ct({check:"custom",...oe(a)});return i._zod.check=e,i}function yr(e,...a){for(const i of a)for(const r of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,r)&&za(e,r,i[r]);return e}function Ib(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??mr,target:a,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Na(e,a,i,r,o){const c=typeof a.unrepresentable=="function"?a.unrepresentable({zodSchema:e,path:r.path,message:o}):a.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(o);return Object.assign(i,c),!0}function st(e,a,i={path:[],schemaPath:[]}){var r;const o=e._zod.def,c=a.seen.get(e);if(c)return c.count++,i.schemaPath.includes(e)&&(c.cycle=i.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};a.seen.set(e,d),a.sharedDefsExtractedFor=void 0,a.sharedEmitDoneFor=void 0;const h=e._zod.toJSONSchema?.();if(h)d.schema=h;else{const b={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(a,d.schema,b);else{const x=d.schema,S=a.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(e,a,x,b)}const v=e._zod.parent;v&&(d.ref||(d.ref=v),st(v,a,b),a.seen.get(v).isParent=!0)}const p=a.metadataRegistry.get(e);return p&&yr(d.schema,p),a.io==="input"&&xt(e)&&(delete d.schema.examples,delete d.schema.default),a.io==="input"&&"_prefault"in d.schema&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,a.seen.get(e).schema}function Iy(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Wb(e,a){const i=e.seen.get(a);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const d of e.seen.entries()){const h=e.metadataRegistry.get(d[0])?.id;if(h){const p=r.get(h);if(p&&p!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const o=d=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=e.external.registry.get(d[0])?.id,x=e.external.uri??(w=>w);if(v)return{ref:x(v)};const S=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=S,{defId:S,ref:`${x("__shared")}#/${h}/${Iy(S)}`}}const p="#",m=`${p}/${h}/`;if(d[1]===i&&!d[1].schema.id)return{ref:p};const b=d[1].schema.id??`__schema${e.counter++}`;return{defId:b,ref:m+Iy(b)}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:p,defId:m}=o(d);h.def={...h.schema},m&&(h.defId=m);const b=h.schema;for(const v in b)delete b[v];b.$ref=p};if(e.cycles==="throw")for(const d of e.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
65
+
66
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const h=d[1];if(a===d[0]){c(d);continue}if(e.external){const m=e.external.registry.get(d[0])?.id;if(a!==d[0]&&m){c(d);continue}}if(e.metadataRegistry.get(d[0])?.id){c(d);continue}if(h.cycle){c(d);continue}h.count>1&&e.reused==="ref"&&c(d)}e.external&&(e.sharedDefsExtractedFor=e.external)}function e0(e){const a=e.anyOf;if(!Array.isArray(a)||a.length===0||e.type!==void 0)return;const i=[];for(const r of a){if(!r||typeof r!="object")return;e0(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const c=r.type;for(const d of Array.isArray(c)?c:[c]){if(typeof d!="string")return;i.includes(d)||i.push(d)}}delete e.anyOf,e.type=i.length===1?i[0]:i}const t0=new Set(["type","properties","required","additionalProperties"]),Wy=["oneOf","anyOf"];function ev(e){const a=e.additionalProperties;return a===void 0||a===!1||typeof a!="object"||a===null?null:Object.keys(a).length?a:null}function If(e){const a=[];for(const c of e){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!t0.has(d))return null;a.push(c)}const i={},r=new Set;for(const c of a){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(i,d))continue;const h=[];for(const m of a){const b=m.properties?.[d]??ev(m);b!=null&&(h.some(v=>JSON.stringify(v)===JSON.stringify(b))||h.push(b))}const p=h.length===1?h[0]:If(h)??{allOf:h};za(i,d,p)}for(const d of c.required??[])r.add(d)}const o={type:"object",properties:i};if(r.size&&(o.required=[...r]),a.every(c=>c.additionalProperties===!1))o.additionalProperties=!1;else{const c=[];for(const d of a){const h=ev(d);h&&!c.some(p=>JSON.stringify(p)===JSON.stringify(h))&&c.push(h)}c.length===1?o.additionalProperties=c[0]:c.length>1&&(o.additionalProperties={allOf:c})}return o}function CE(e){const a=e.allOf;if(!Array.isArray(a)||a.length<2)return;for(const o of t0)if(o in e)return;const i=a.filter(o=>Wy.some(c=>Array.isArray(o[c])));let r=null;if(!i.length)r=If(a);else{const o=i[0],c=Wy.find(p=>Array.isArray(o[p]));if(Object.keys(o).length!==1)return;const d=a.filter(p=>p!==o),h=o[c].map(p=>If([...d,p]));if(h.some(p=>!p))return;r={[c]:h}}r&&(delete e.allOf,yr(e,r))}function n0(e,a){const i=e.seen.get(a);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const p=e.seen.get(h);if(p.ref===null)return;const m=p.def??p.schema,b={...m},v=p.ref;if(p.ref=null,v){r(v);const S=e.seen.get(v),w=S.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(w)):yr(m,w),yr(m,b),h._zod.parent===v)for(const z in m)z==="$ref"||z==="allOf"||z in b||delete m[z];if(w.$ref&&S.def)for(const z in m)z==="$ref"||z==="allOf"||z in S.def&&JSON.stringify(m[z])===JSON.stringify(S.def[z])&&delete m[z]}const x=h._zod.parent;if(x&&x!==v){r(x);const S=e.seen.get(x);if(S?.schema.$ref&&(m.$ref=S.schema.$ref,S.def))for(const w in m)w==="$ref"||w==="allOf"||w in S.def&&JSON.stringify(m[w])===JSON.stringify(S.def[w])&&delete m[w]}e.override({zodSchema:h,jsonSchema:m,path:p.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const h of[...e.seen.entries()].reverse())r(h[0]);if(e.target!=="openapi-3.0")for(const h of e.seen.entries())e0(h[1].def??h[1].schema);for(const h of e.deferred)h();if(e.intersections.length){const h=new Map;for(const p of e.seen.values())for(const m of[p.schema,p.def]){const b=m?.allOf;if(!Array.isArray(b))continue;const v=h.get(b);v?v.push(m):h.set(b,[m])}for(const p of e.intersections)for(const m of h.get(p)??[])CE(m)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const h=e.external.registry.get(a)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(h)}yr(o,i.defId?i.schema:i.def??i.schema);const c=e.metadataRegistry.get(a)?.id;c!==void 0&&o.id===c&&delete o.id;const d=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const h of e.seen.entries()){const p=h[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,za(d,p.defId,p.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...a["~standard"],jsonSchema:{input:zo(a,"input",e.processors),output:zo(a,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function xt(e,a){const i=a??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return xt(r.element,i);if(r.type==="set")return xt(r.valueType,i);if(r.type==="lazy")return xt(r.getter(),i);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return xt(r.innerType,i);if(r.type==="intersection")return xt(r.left,i)||xt(r.right,i);if(r.type==="record"||r.type==="map")return xt(r.keyType,i)||xt(r.valueType,i);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:xt(r.in,i)||xt(r.out,i);if(r.type==="object"){for(const o in r.shape)if(xt(r.shape[o],i))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(xt(o,i))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(xt(o,i))return!0;return!!(r.rest&&xt(r.rest,i))}return!1}const ME=(e,a={})=>i=>{const r=Ib({...i,processors:a});return st(e,r),Wb(r,e),n0(r,e)},zo=(e,a,i={})=>r=>{const{libraryOptions:o,target:c}=r??{},d=Ib({...o??{},target:c,io:a,processors:i});return st(e,d),Wb(d,e),n0(d,e)},ii=(e,a,i)=>{(e[a]===void 0||i>e[a])&&(e[a]=i)},ri=(e,a,i)=>{(e[a]===void 0||i<e[a])&&(e[a]=i)},tv=(e,a)=>{ii(e,"minimum",a),ri(e,"maximum",a)},a0=(e,a)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(a)||e.multipleOf.push(a)},s0=(e,a)=>{e.patterns??(e.patterns=new Set),e.patterns.add(a)},i0=(e,a)=>{e.mime=e.mime?e.mime.filter(i=>a.includes(i)):[...a]},r0=(e,a)=>{e.format=a,a.includes("int")&&(e.isInt=!0)},nv=(e,a)=>ii(e,"minimum",a.minimum),av=(e,a)=>ri(e,"maximum",a.maximum),sv=e=>(a,i)=>{r0(a,i.format);const[r,o]=e[i.format];ii(a,"minimum",r),ri(a,"maximum",o)},DE={greater_than:(e,a)=>ii(e,a.inclusive?"minimum":"exclusiveMinimum",a.value),less_than:(e,a)=>ri(e,a.inclusive?"maximum":"exclusiveMaximum",a.value),multiple_of:(e,a)=>a0(e,a.value),number_format:sv(Eb),bigint_format:sv(Iw),min_length:nv,max_length:av,length_equals:(e,a)=>tv(e,a.length),min_size:nv,max_size:av,size_equals:(e,a)=>tv(e,a.size),string_format:(e,a)=>{r0(e,a.format),a.pattern&&s0(e,a.pattern),(a.format==="base64"||a.format==="base64url")&&(e.contentEncoding=a.format),(a.local||a.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,a)=>i0(e,a.mime)};function on(e){const a={},i=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...i.checks??[]]:i.checks??[];for(const c of r)DE[c._zod.def.check]?.(a,c._zod.def);const o=e._zod.bag;o.minimum!==void 0&&ii(a,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&ii(a,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&ri(a,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&ri(a,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&a0(a,o.multipleOf),o.format!==void 0&&(a.format??(a.format=o.format),o.format.includes("int")&&(a.isInt=!0)),o.mime&&i0(a,o.mime);for(const c of o.patterns??[])s0(a,c);return a}const kE={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},LE=new Map([[$b,W2],[Td,ej]]),l0=e=>LE.get(e)??e,UE=(e,a,i,r)=>{const o=i;o.type="string";const{minimum:c,maximum:d,format:h,patterns:p,contentEncoding:m,laxFormat:b}=on(e);if(typeof c=="number"&&(o.minLength=c),typeof d=="number"&&(o.maxLength=d),h&&(o.format=kE[h]??h,o.format===""&&delete o.format,(h==="time"||b)&&delete o.format),m&&(o.contentEncoding=m),p&&p.size>0){const v=[...p].map(l0);v.length===1?o.pattern=v[0].source:v.length>1&&(o.allOf=[...v.map(x=>({...a.target==="draft-07"||a.target==="draft-04"||a.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},ZE=(e,a,i,r)=>{const o=i,{minimum:c,maximum:d,multipleOf:h,exclusiveMaximum:p,exclusiveMinimum:m,isInt:b}=on(e);o.type=b?"integer":"number";const v=typeof m=="number"&&m>=(c??Number.NEGATIVE_INFINITY),x=typeof p=="number"&&p<=(d??Number.POSITIVE_INFINITY),S=a.target==="draft-04"||a.target==="openapi-3.0";if(v?S?(o.minimum=m,o.exclusiveMinimum=!0):o.exclusiveMinimum=m:typeof c=="number"&&(o.minimum=c),x?S?(o.maximum=p,o.exclusiveMaximum=!0):o.exclusiveMaximum=p:typeof d=="number"&&(o.maximum=d),h){const w=new Set;for(const T of h)Number.isFinite(T)&&T!==0?w.add(Math.abs(T)):Na(e,a,o,r,`A multipleOf divisor of ${T} cannot be represented in JSON Schema`);const[j,...z]=w;j!==void 0&&(o.multipleOf=j),z.length&&(o.allOf=[...o.allOf??[],...z.map(T=>({multipleOf:T}))])}},qE=(e,a,i,r)=>{i.type="boolean"},BE=(e,a,i,r)=>{i.not={}},$E=(e,a,i,r)=>{},HE=(e,a,i,r)=>{const o=e._zod.def,c=Yf(o.entries);if(c.length===0){i.not={};return}c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},QE=(e,a,i,r)=>{const o=e._zod.def;if(o.values.length===0){i.not={};return}const c=[];for(const d of o.values)if(d===void 0){if(Na(e,a,i,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(Na(e,a,i,r,"BigInt literals cannot be represented in JSON Schema"))return;c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];i.type=d===null?"null":typeof d,a.target==="draft-04"||a.target==="openapi-3.0"?i.enum=[d]:i.const=d}else c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),c.every(d=>typeof d=="boolean")&&(i.type="boolean"),c.every(d=>d===null)&&(i.type="null"),i.enum=c},GE=(e,a,i,r)=>{Na(e,a,i,r,"Custom types cannot be represented in JSON Schema")},KE=(e,a,i,r)=>{Na(e,a,i,r,"Transforms cannot be represented in JSON Schema")},YE=(e,a,i,r)=>{const o=i,c=e._zod.def,{minimum:d,maximum:h}=on(e);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=st(c.element,a,{...r,path:[...r.path,"items"]})};function To(e){const a=e._zod.def;return a.type==="pipe"&&a.in._zod.traits.has("$ZodTransform")?To(a.out):a.type==="catch"?To(a.innerType):e._zod.optin}const FE=(e,a,i,r)=>{const o=i,c=e._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&Na(e,a,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const m in d)za(o.properties,m,st(d[m],a,{...r,path:[...r.path,"properties",m]}));const p=[];for(const m of Object.keys(d)){const b=c.shape[m];(a.io==="input"?To(b)===void 0:b._zod.optout===void 0)&&p.push(m)}p.length>0&&(o.required=p),c.catchall?._zod.def.type==="never"?o.additionalProperties=!1:c.catchall?c.catchall&&(o.additionalProperties=st(c.catchall,a,{...r,path:[...r.path,"additionalProperties"]})):a.io==="output"&&(o.additionalProperties=!1)},VE=(e,a,i,r)=>{const o=e._zod.def,c=o.inclusive===!1,d=o.options.map((h,p)=>st(h,a,{...r,path:[...r.path,c?"oneOf":"anyOf",p]}));c?i.oneOf=d:i.anyOf=d},PE=(e,a,i,r)=>{const o=e._zod.def,c=st(o.left,a,{...r,path:[...r.path,"allOf",0]}),d=st(o.right,a,{...r,path:[...r.path,"allOf",1]}),h=m=>"allOf"in m&&Object.keys(m).length===1,p=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];i.allOf=p,a.intersections.push(p)};function Wf(e,a,i){if(a.$ref){if(i.has(a))return a;i.add(a);const w=e.get(a)?.def;if(!w)return a;const j=Wf(e,w,i);return j===w?a:j}for(const w of["anyOf","oneOf"]){const j=a[w];if(!Array.isArray(j))continue;const z=j.map(T=>Wf(e,T,i));z.some((T,L)=>T!==j[L])&&(a={...a,[w]:z})}const r=Array.isArray(a.type)?a.type:[a.type],o=!r.includes("string")&&r.some(w=>w==="number"||w==="integer"),c=a.enum??(a.const!==void 0?[a.const]:void 0);if(!o&&!c?.some(w=>typeof w=="number"))return a;const{minimum:d,maximum:h,exclusiveMinimum:p,exclusiveMaximum:m,multipleOf:b,format:v,id:x,...S}=a;return S.enum?S.enum=S.enum.map(w=>typeof w=="number"?String(w):w):typeof S.const=="number"&&(S.const=String(S.const)),o&&(S.type="string",c||(S.pattern=(r.includes("number")?Ed:oj).source)),S}const ed=new WeakMap;function XE(e){const a=new Map;for(const r of e.seen.values())r.def&&!a.has(r.schema)&&a.set(r.schema,r);const i=new Map;for(const r of ed.get(e)??[]){const o=e.seen.get(r),c=(o?.def??o?.schema)?.propertyNames;if(!c||c===!0||i.has(c))continue;const d=Wf(a,c,new Set);d!==c&&i.set(c,d)}if(i.size)for(const r of e.seen.values())for(const o of[r.schema,r.def]){const c=o&&i.get(o.propertyNames);c&&(o.propertyNames=c)}}const JE=(e,a,i,r)=>{const o=i,c=e._zod.def;o.type="object";const d=c.keyType,h=on(d).patterns;if(c.mode==="loose"&&h&&h.size>0){const b=st(c.valueType,a,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const v of h)za(o.patternProperties,l0(v).source,b)}else{if(a.target==="draft-07"||a.target==="draft-2020-12"){o.propertyNames=st(c.keyType,a,{...r,path:[...r.path,"propertyNames"]});let b=ed.get(a);b||(b=[],ed.set(a,b),a.deferred.push(()=>XE(a))),b.push(e)}o.additionalProperties=st(c.valueType,a,{...r,path:[...r.path,"additionalProperties"]})}const p=d._zod.values,m=a.io==="input"&&To(c.valueType)!==void 0;if(p&&!c.partial&&!m){const b=[...p].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b.map(String))}},IE=(e,a,i,r)=>{const o=e._zod.def,c=st(o.innerType,a,r),d=a.seen.get(e);a.target==="openapi-3.0"?(d.ref=o.innerType,i.nullable=!0):i.anyOf=[c,{type:"null"}]},WE=(e,a,i,r)=>{const o=e._zod.def;st(o.innerType,a,r);const c=a.seen.get(e);c.ref=o.innerType},Ad=Symbol();function o0(e,a,i,r,o){let c=!1;const d=JSON.stringify(e,(h,p)=>typeof p!="bigint"?p:(c=!0,null));return c?(Na(a,i,r,o,"BigInt defaults cannot be represented in JSON Schema"),Ad):JSON.parse(d)}const eN=(e,a,i,r)=>{const o=e._zod.def;st(o.innerType,a,r);const c=a.seen.get(e);c.ref=o.innerType;const d=o0(o.defaultValue,e,a,i,r);d!==Ad&&(i.default=d)},tN=(e,a,i,r)=>{const o=e._zod.def;st(o.innerType,a,r);const c=a.seen.get(e);if(c.ref=o.innerType,a.io!=="input")return;const d=o0(o.defaultValue,e,a,i,r);d!==Ad&&(i._prefault=d)},nN=(e,a,i,r)=>{const o=e._zod.def;st(o.innerType,a,r);const c=a.seen.get(e);c.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{Na(e,a,i,r,"Dynamic catch values are not supported in JSON Schema");return}i.default=d},aN=(e,a,i,r)=>{const o=e._zod.def,c=o.in._zod.traits.has("$ZodTransform"),d=a.io==="input"?c?o.out:o.in:o.out;st(d,a,r);const h=a.seen.get(e);h.ref=d},sN=(e,a,i,r)=>{const o=e._zod.def;st(o.innerType,a,r);const c=a.seen.get(e);c.ref=o.innerType,i.readOnly=!0},u0=(e,a,i,r)=>{const o=e._zod.def;st(o.innerType,a,r);const c=a.seen.get(e);c.ref=o.innerType},iv=new WeakSet([Object.prototype,Error.prototype]);function ao(e,a,i){Object.defineProperty(e,a,{configurable:!0,enumerable:!1,get(){const r=i(this);return Object.defineProperty(this,a,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,a,{value:r,configurable:!0,writable:!0})}})}const iN=(e,a)=>{x2.init(e,a),e.name="ZodError";const i=Object.getPrototypeOf(e);iv.has(i)||(iv.add(i),ao(i,"format",r=>o=>w2(r,o)),ao(i,"flatten",r=>o=>_2(r,o)),ao(i,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Ff,2)}),ao(i,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Ff,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},nn=Y("ZodError",iN,void 0,{Parent:Error}),rN=_d(nn),lN=wd(nn),oN=jd(nn),uN=Od(nn),cN=T2(nn),fN=A2(nn),dN=R2(nn),hN=C2(nn),mN=M2(nn),pN=D2(nn),gN=k2(nn),yN=L2(nn);function vN(){un.localeError||xn(UO())}function Zo(){un.memoizer||xn({memoizer:DO()})}const Ye=Y("ZodType",(e,a)=>(vN(),Ke.init(e,a),e.def=a,e.type=a.type,e),{check(...e){const a=this.def;return this.clone(Gt(a,{checks:[...a.checks??[],...e.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,a){return Ta(this,e,a)},brand(){return this},register(e,a){return e.add(this,a),this},refine(e,a){return this.check(fz(e,a))},superRefine(e,a){return this.check(dz(e,a))},overwrite(e){return this.check(ci(e))},optional(){return ov(this)},exactOptional(){return WN(this)},nullable(){return uv(this)},nullish(){return ov(uv(this))},nonoptional(e){return sz(this,e)},array(){return he(this)},or(e){return qo([this,e])},and(e){return VN(this,e)},transform(e){return cv(this,IN(e))},default(e){return tz(this,e)},prefault(e){return az(this,e)},catch(e){return rz(this,e)},pipe(e){return cv(this,e)},readonly(){return uz(this)},describe(e){const a=this.clone();return mr.add(a,{description:e}),a},meta(...e){if(e.length===0)return mr.get(this);const a=this.clone();return mr.add(a,e[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...a){return a.length===0?e(this):e(this,...a)},get"~standard"(){return zb(this,"~standard",{...Lb(this),jsonSchema:{input:zo(this,"input"),output:zo(this,"output")}})},set"~standard"(e){Ea(this,"~standard",e)},parse:function e(a,i){return rN(this,a,i,{callee:e})},parseAsync:async function e(a,i){return await lN(this,a,i,{callee:e})},safeParse(e,a){return oN(this,e,a)},async safeParseAsync(e,a){return uN(this,e,a)},get spa(){return this?.safeParseAsync},set spa(e){Ea(this,"spa",e)},validate(e,a){return E2(this,e,a)},validateAsync(e,a){return z2(this,e,a)},encode:function e(a,i){return cN(this,a,i,{callee:e})},decode:function e(a,i){return fN(this,a,i,{callee:e})},encodeAsync:async function e(a,i){return await dN(this,a,i,{callee:e})},decodeAsync:async function e(a,i){return await hN(this,a,i,{callee:e})},safeEncode(e,a){return mN(this,e,a)},safeDecode(e,a){return pN(this,e,a)},async safeEncodeAsync(e,a){return gN(this,e,a)},async safeDecodeAsync(e,a){return yN(this,e,a)},toJSONSchema(e){return ME(this,{})(e)},get description(){return mr.get(this)?.description},get _def(){return this._zod.def}}),c0=Y("_ZodString",(e,a)=>{zd.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>UE(e,i,r)},Tb({format:e=>on(e).format??null,minLength:e=>on(e).minimum??null,maxLength:e=>on(e).maximum??null},{regex(...e){return this.check(yE(...e))},includes(...e){return this.check(xE(...e))},startsWith(...e){return this.check(SE(...e))},endsWith(...e){return this.check(_E(...e))},min(...e){return this.check(No(...e))},max(...e){return this.check(Xb(...e))},length(...e){return this.check(Jb(...e))},nonempty(...e){return this.check(No(1,...e))},lowercase(e){return this.check(vE(e))},uppercase(e){return this.check(bE(e))},trim(){return this.check(jE())},normalize(...e){return this.check(wE(...e))},toLowerCase(){return this.check(OE())},toUpperCase(){return this.check(EE())},slugify(){return this.check(NE())}})),f0=Y("ZodString",(e,a)=>{zd.init(e,a),c0.init(e,a)},{email(e){return this.check($O(_N,e))},url(e){return this.check(FO(jN,e))},jwt(e){return this.check(oE(qN,e))},emoji(e){return this.check(VO(ON,e))},guid(e){return this.check(HO(wN,e))},uuid(e){return this.check(QO(so,e))},uuidv4(e){return this.check(GO(so,e))},uuidv6(e){return this.check(KO(so,e))},uuidv7(e){return this.check(YO(so,e))},nanoid(e){return this.check(PO(EN,e))},cuid(e){return this.check(XO(NN,e))},cuid2(e){return this.check(JO(zN,e))},ulid(e){return this.check(IO(TN,e))},base64(e){return this.check(iE(LN,e))},base64url(e){return this.check(rE(UN,e))},xid(e){return this.check(WO(AN,e))},ksuid(e){return this.check(eE(RN,e))},ipv4(e){return this.check(tE(CN,e))},ipv6(e){return this.check(nE(MN,e))},cidrv4(e){return this.check(aE(DN,e))},cidrv6(e){return this.check(sE(kN,e))},e164(e){return this.check(lE(ZN,e))},datetime(e){return this.check(Pb(d0,e))},date(e){return this.check(uE(bN,e))},time(e){return this.check(cE(xN,e))},duration(e){return this.check(fE(SN,e))}});function Q(e){return BO(f0,e)}const Fe=Y("ZodStringFormat",(e,a)=>{Ge.init(e,a),c0.init(e,a)}),d0=Y("ZodISODateTime",(e,a)=>{Qj.init(e,a),Fe.init(e,a)}),bN=Y("ZodISODate",(e,a)=>{Gj.init(e,a),Fe.init(e,a)}),xN=Y("ZodISOTime",(e,a)=>{Kj.init(e,a),Fe.init(e,a)}),SN=Y("ZodISODuration",(e,a)=>{Yj.init(e,a),Fe.init(e,a)}),_N=Y("ZodEmail",(e,a)=>{Tj.init(e,a),Fe.init(e,a)}),wN=Y("ZodGUID",(e,a)=>{Nj.init(e,a),Fe.init(e,a)}),so=Y("ZodUUID",(e,a)=>{zj.init(e,a),Fe.init(e,a)}),jN=Y("ZodURL",(e,a)=>{kj.init(e,a),Fe.init(e,a)}),ON=Y("ZodEmoji",(e,a)=>{Lj.init(e,a),Fe.init(e,a)}),EN=Y("ZodNanoID",(e,a)=>{Uj.init(e,a),Fe.init(e,a)}),NN=Y("ZodCUID",(e,a)=>{Zj.init(e,a),Fe.init(e,a)}),zN=Y("ZodCUID2",(e,a)=>{qj.init(e,a),Fe.init(e,a)}),TN=Y("ZodULID",(e,a)=>{Bj.init(e,a),Fe.init(e,a)}),AN=Y("ZodXID",(e,a)=>{$j.init(e,a),Fe.init(e,a)}),RN=Y("ZodKSUID",(e,a)=>{Hj.init(e,a),Fe.init(e,a)}),CN=Y("ZodIPv4",(e,a)=>{Fj.init(e,a),Fe.init(e,a)}),MN=Y("ZodIPv6",(e,a)=>{Pj.init(e,a),Fe.init(e,a)}),DN=Y("ZodCIDRv4",(e,a)=>{Xj.init(e,a),Fe.init(e,a)}),kN=Y("ZodCIDRv6",(e,a)=>{Ij.init(e,a),Fe.init(e,a)}),LN=Y("ZodBase64",(e,a)=>{Wj.init(e,a),Fe.init(e,a)}),UN=Y("ZodBase64URL",(e,a)=>{tO.init(e,a),Fe.init(e,a)}),ZN=Y("ZodE164",(e,a)=>{nO.init(e,a),Fe.init(e,a)}),qN=Y("ZodJWT",(e,a)=>{sO.init(e,a),Fe.init(e,a)}),h0=Y("ZodNumber",(e,a)=>{Hb.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>ZE(e,i,r,o),e.isFinite=!0},Tb({minValue:e=>{const{minimum:a,exclusiveMinimum:i}=on(e);return Math.max(a??Number.NEGATIVE_INFINITY,i??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:a,exclusiveMaximum:i}=on(e);return Math.min(a??Number.POSITIVE_INFINITY,i??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:a,multipleOf:i}=on(e);return!!a||!!i?.some(Number.isSafeInteger)},format:e=>on(e).format??null},{gt(e,a){return this.check(Xy(e,a))},gte(e,a){return this.check(Nf(e,a))},min(e,a){return this.check(Nf(e,a))},lt(e,a){return this.check(Py(e,a))},lte(e,a){return this.check(Ef(e,a))},max(e,a){return this.check(Ef(e,a))},int(e){return this.check(rv(e))},safe(e){return this.check(rv(e))},positive(e){return this.check(Xy(0,e))},nonnegative(e){return this.check(Nf(0,e))},negative(e){return this.check(Py(0,e))},nonpositive(e){return this.check(Ef(0,e))},multipleOf(e,a){return this.check(Jy(e,a))},step(e,a){return this.check(Jy(e,a))},finite(){return this}}));function Ae(e){return dE(h0,e)}const BN=Y("ZodNumberFormat",(e,a)=>{iO.init(e,a),h0.init(e,a)});function rv(e){return hE(BN,e)}const $N=Y("ZodBoolean",(e,a)=>{rO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>qE(e,i,r)});function lt(e){return mE($N,e)}const HN=Y("ZodUnknown",(e,a)=>{lO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>$E()});function td(){return pE(HN)}const QN=Y("ZodNever",(e,a)=>{oO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>BE(e,i,r)});function GN(e){return gE(QN,e)}const m0=Y("ZodArray",(e,a)=>{Zo(),fO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>YE(e,i,r,o),e.element=a.element},{min(e,a){return this.check(No(e,a))},nonempty(e){return this.check(No(1,e))},max(e,a){return this.check(Xb(e,a))},length(e,a){return this.check(Jb(e,a))},unwrap(){return this.element}});function he(e,a){return zE(m0,e,a)}const KN=Y("ZodObject",(e,a)=>{Zo(),mO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>FE(e,i,r,o),d2(e,"shape",i=>i._zod.def.shape,!1)},{keyof(){return yt(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Gt(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Gt(this._zod.def,{catchall:td()}))},loose(){return this.clone(Gt(this._zod.def,{catchall:td()}))},strict(){return this.clone(Gt(this._zod.def,{catchall:GN()}))},strip(){return this.clone(Gt(this._zod.def,{catchall:void 0}))},extend(e){return t2(this,e)},safeExtend(e){return n2(this,e)},merge(e){return a2(this,e)},pick(e){return Ww(this,e)},omit(e){return e2(this,e)},partial(...e){return Ry(p0,this,e[0])},exactPartial(...e){return Ry(g0,this,e[0],"exactPartial")},required(...e){return s2(v0,this,e[0])}});function te(e,a){const i={type:"object",shape:e??{},...oe(a)};return new KN(i)}const YN=Y("ZodUnion",(e,a)=>{pO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>VE(e,i,r,o),e.options=a.options});function qo(e,a){return new YN({type:"union",options:e,...oe(a)})}const FN=Y("ZodIntersection",(e,a)=>{gO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>PE(e,i,r,o)});function VN(e,a){return new FN({type:"intersection",left:e,right:a})}const lv=Y("ZodRecord",(e,a)=>{Zo(),yO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>JE(e,i,r,o),e.keyType=a.keyType,e.valueType=a.valueType});function PN(e,a,i){return!a||!a._zod?new lv({type:"record",keyType:Q(),valueType:e,...oe(a)}):new lv({type:"record",keyType:e,valueType:a,...oe(i)})}const Ao=Y("ZodEnum",(e,a)=>{vO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(r,o,c)=>HE(e,r,o),e.enum=a.entries,e.options=[...e._zod.values];const i=new Set(Object.keys(a.entries));e.extract=(r,o)=>{const c={};for(const d of r)if(i.has(d))c[d]=a.entries[d];else throw new Error(`Key ${d} not found in enum`);return new Ao({...a,checks:[],...oe(o),entries:c})},e.exclude=(r,o)=>{const c={...a.entries};for(const d of r)if(i.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new Ao({...a,checks:[],...oe(o),entries:c})}});function yt(e,a){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ao({type:"enum",entries:i,...oe(a)})}const XN=Y("ZodLiteral",(e,a)=>{bO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>QE(e,i,r,o),e.values=new Set(a.values),Object.defineProperty(e,"value",{get(){if(a.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return a.values[0]}})});function va(e,a){return new XN({type:"literal",values:Array.isArray(e)?e:[e],...oe(a)})}const JN=Y("ZodTransform",(e,a)=>{Zo(),xO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>KE(e,i,r,o),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Ab(e.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(jr(c,i.value,a));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=i.value),d.inst??(d.inst=e),i.issues.push(jr(d))}};const o=a.transform(i.value,i);return o instanceof Promise?o.then(c=>(i.value=c,i)):(i.value=o,i)}});function IN(e){return new JN({type:"transform",transform:e})}const p0=Y("ZodOptional",(e,a)=>{Kb.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>u0(e,i,r,o),e.unwrap=()=>e._zod.def.innerType});function ov(e){return new p0({type:"optional",innerType:e})}const g0=Y("ZodExactOptional",(e,a)=>{SO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>u0(e,i,r,o),e.unwrap=()=>e._zod.def.innerType});function WN(e){return new g0({type:"optional",innerType:e})}const ez=Y("ZodNullable",(e,a)=>{_O.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>IE(e,i,r,o),e.unwrap=()=>e._zod.def.innerType});function uv(e){return new ez({type:"nullable",innerType:e})}const y0=Y("ZodDefault",(e,a)=>{wO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>eN(e,i,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tz(e,a){return new y0({type:"default",innerType:e,get defaultValue(){return typeof a=="function"?a():jb(a)}})}const nz=Y("ZodPrefault",(e,a)=>{jO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>tN(e,i,r,o),e.unwrap=()=>e._zod.def.innerType});function az(e,a){return new nz({type:"prefault",innerType:e,get defaultValue(){return typeof a=="function"?a():jb(a)}})}const v0=Y("ZodNonOptional",(e,a)=>{OO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>WE(e,i,r,o),e.unwrap=()=>e._zod.def.innerType});function sz(e,a){return new v0({type:"nonoptional",innerType:e,...oe(a)})}const iz=Y("ZodCatch",(e,a)=>{EO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>nN(e,i,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rz(e,a){return new iz({type:"catch",innerType:e,catchValue:typeof a=="function"?a:m2(a)})}const lz=Y("ZodPipe",(e,a)=>{NO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>aN(e,i,r,o),e.in=a.in,e.out=a.out});function cv(e,a){return new lz({type:"pipe",in:e,out:a})}const oz=Y("ZodReadonly",(e,a)=>{zO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>sN(e,i,r,o),e.unwrap=()=>e._zod.def.innerType});function uz(e){return new oz({type:"readonly",innerType:e})}const cz=Y("ZodCustom",(e,a)=>{TO.init(e,a),Ye.init(e,a),e._zod.processJSONSchema=(i,r,o)=>GE(e,i,r,o)});function fz(e,a={}){return TE(cz,e,a)}function dz(e,a){return AE(e,a)}function hz(e){return Pb(d0,e)}const Bo=te({ogygie:va(!0).describe("Marker: lets an agent tell our errors from noise"),code:Q().regex(/^[A-Z][A-Z0-9_]+$/,"SCREAMING_SNAKE_CASE, stable over time"),message:Q().min(10).describe("Human-readable sentence (technical English)"),file:Q().nullable().describe("Relative path of the file involved, null when not localizable"),cause:Q().describe("The precise datum or condition that triggered the error"),suggestedFix:Q().describe("Concrete action to fix — never empty"),details:PN(Q(),td()).default({}),timestamp:hz()});class Nr extends Error{payload;constructor(a){super(a.message),this.name="StudioApiError",this.payload=a}}async function We(e,a,i){const r=await fetch(e,i),o=await r.json();if(!r.ok){const c=Bo.safeParse(o);throw c.success?new Nr(c.data):new Error(`HTTP ${r.status} on ${e} (non-OgygieError payload)`)}return a.parse(o)}function zr(e){return{headers:{"content-type":"application/json"},body:JSON.stringify(e)}}const mz={sm:20,md:32,lg:48},pz=[{kind:"circle",cx:48,cy:48,r:10},{kind:"path",d:"M52.00 74.70 A27 27 0 1 0 44.00 74.70 L44.00 68.62 A21 21 0 1 1 52.00 68.62 Z"},{kind:"path",d:"M52.00 90.81 A43 43 0 1 0 44.00 90.81 L44.00 84.78 A37 37 0 1 1 52.00 84.78 Z"}];function b0({size:e="md",label:a,className:i=""}){const r=mz[e];return g.jsx("svg",{"data-pattern":"OgygieMark",viewBox:"0 0 96 96",width:r,height:r,fill:"currentColor",className:`shrink-0 ${i}`,...a===void 0?{"aria-hidden":!0}:{role:"img","aria-label":a},children:pz.map(o=>o.kind==="circle"?g.jsx("circle",{cx:o.cx,cy:o.cy,r:o.r},"citadel"):g.jsx("path",{d:o.d},o.d))})}const gz=e=>1-(1-e)**3;function yz(e,a){return e.toLocaleString("fr-FR",{minimumFractionDigits:a,maximumFractionDigits:a})}function vz(){if(typeof window>"u"||typeof getComputedStyle!="function")return 800;const e=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--duration-count"));return Number.isFinite(e)&&e>0?e:800}function fv(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function bz(e){const[a,i]=ee.useState(()=>typeof window>"u"||typeof window.requestAnimationFrame!="function"||fv()?e:0),r=ee.useRef(!1);return ee.useEffect(()=>{if(r.current||typeof window.requestAnimationFrame!="function"||fv()){r.current=!0,i(e);return}r.current=!0;const o=vz();let c=null,d=0;const h=p=>{c===null&&(c=p);const m=Math.min(1,(p-c)/o);i(e*gz(m)),m<1&&(d=window.requestAnimationFrame(h))};return d=window.requestAnimationFrame(h),()=>window.cancelAnimationFrame(d)},[e]),a}function bn({value:e,format:a,decimals:i=0,className:r=""}){const o=bz(e),c=a===void 0?yz(o,i):a(o);return g.jsx("span",{"data-pattern":"Counter","data-value":e,className:`tabular-nums ${r}`,children:c})}const Ie=Q().regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"kebab-case required"),x0=Q().regex(/^package:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"expected package:<kebab-case-name>"),xz=te({method:yt(["GET","POST","PUT","PATCH","DELETE"]),path:Q().startsWith("/api/"),description:Q().min(10),schemaInput:Q().describe("Exported name of the input Zod schema, e.g. CreateOrderInputSchema"),schemaOutput:Q().describe("Exported name of the output Zod schema"),invalidates:he(Q()).optional().describe("Cache roots this mutation stales BEYOND its own path root (cross-feature dependency, read by the manifest-derived client — never guessed in a screen). Each value must be an existing feature name or route root")}),Sz=yt(["reference","ownerless"]),_z=qo([Q(),te({name:Q(),shared:va(!0),sharedKind:Sz.optional()})]),wz=te({name:Ie,intent:Q().min(20).max(300).describe("The feature's 'why' in 1-3 sentences"),app:Q().optional().describe("Name of the owning app (apps[].name); defaults to the api app"),folder:Q().describe("Path relative to the app root, e.g. src/features/orders"),spec:Q().nullable().describe("Path to the spec, e.g. specs/orders.spec.md, null for technical features"),routes:he(xz),dbTables:he(_z).describe("Drizzle tables owned by this feature (one table = one owner). String = tenant-scoped; { name, shared: true } = shared referential"),dependsOn:he(qo([Ie,x0])).describe("Features imported through their index.ts, and product packages as package:<name> — nothing else"),status:yt(["skeleton","in-progress","delivered"])}),jz=Q().regex(/^\d+\.\d+\.\d+$/,"expected a plain x.y.z version"),Oz=te({packages:he(te({name:Q().describe("Published npm name, e.g. @ogygie/core"),path:Q().describe("Folder relative to the repo root"),intent:Q().min(20),spec:Q().nullable(),status:yt(["skeleton","in-progress","delivered"])})),templates:te({project:Q().describe("Folder copied by `ogygie init`"),feature:Q().describe("Reserved for `ogygie generate feature` (not wired yet)")}),governedFiles:Q().describe("Module declaring the exhaustive list of files `upgrade` may overwrite (D3)")}),Ez=te({canonical:Q().regex(/^[a-z][a-zA-Z0-9]*$/,"camelCase English term required").describe("The one machine term for this concept, e.g. gadget"),forbiddenAliases:he(Q().min(2).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"lowercase root (kebab-case allowed) required")).min(1).describe("Roots the code may never carry for this concept, e.g. widget"),reference:Q().optional().describe("Anchor into AGENTS.product.md where the concept is explained")}),Nz=te({entries:he(Ez)}),zz=te({name:Ie,path:Q().describe("Folder relative to the repo root, e.g. packages/solver"),intent:Q().min(20).max(300).describe("The package's 'why' in 1-3 sentences"),spec:Q().nullable(),dependsOn:he(x0).describe("Other PRODUCT packages, as package:<name> — never a feature: a package that depended on one would live under an app, and would be a feature"),status:yt(["skeleton","in-progress","delivered"])}),Tz=te({column:Q().min(1).describe("SQL name of the tenant column, e.g. workspace_id — the one AGENTS.product.md announces"),rawDbAllowed:he(Ie).default([]).describe("Features allowed to reach the raw database: the tenancy socle, which BUILDS the contexts and therefore predates them. Every other feature goes through tenantDb")}),Az=te({version:va(1),product:te({name:Q(),description:Q().min(20)}),ogygieVersion:jz.optional(),framework:Oz.optional(),apps:he(te({name:Q(),path:Q(),type:yt(["api","front","gateway"]),entryPoint:Q(),vendored:va(!0).optional()})),features:he(wz),tenancy:Tz.optional().describe("Product values the framework gates need — absent, the tenancy checks do not run"),packages:he(zz).optional().describe("Product code living outside every app — libraries, engines. Absent = the project has none"),vocabulary:Nz.optional().describe("The product's closed vocabulary — declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"),conventions:te({agentsMd:va("AGENTS.md"),failuresMd:va("FAILURES.md"),specsFolder:va("specs/")})}).superRefine((e,a)=>{const i=new Set(e.features.map(v=>v.name)),r=new Set;(e.packages??[]).forEach((v,x)=>{i.has(v.name)&&a.addIssue({code:"custom",path:["packages",x,"name"],message:`"${v.name}" is already the name of a feature — one name designates one thing`}),r.has(v.name)&&a.addIssue({code:"custom",path:["packages",x,"name"],message:`package "${v.name}" is declared twice`}),r.add(v.name)});const o=v=>(v.split("/").pop()??v).replace(/\.spec\.md$/,""),c=new Set([...e.features.map(v=>v.name),...r]);(e.framework?.packages??[]).forEach((v,x)=>{if(v.spec===null)return;const S=o(v.spec);c.has(S)&&a.addIssue({code:"custom",path:["framework","packages",x,"spec"],message:`spec "${S}" is already owned by a feature or a product package — one spec, one owner`})});const d=(v,x)=>{v.forEach((S,w)=>{if(!S.startsWith("package:"))return;const j=S.slice(8);r.has(j)||a.addIssue({code:"custom",path:[...x,w],message:`dependency "${S}" matches no declared package`})})};e.features.forEach((v,x)=>{d(v.dependsOn,["features",x,"dependsOn"])}),(e.packages??[]).forEach((v,x)=>{d(v.dependsOn,["packages",x,"dependsOn"])}),(e.tenancy?.rawDbAllowed??[]).forEach((v,x)=>{i.has(v)||a.addIssue({code:"custom",path:["tenancy","rawDbAllowed",x],message:`"${v}" matches no declared feature`})});const h=new Map,p=new Map;(e.vocabulary?.entries??[]).forEach((v,x)=>{const S=v.canonical.toLowerCase(),w=h.get(S);w!==void 0?a.addIssue({code:"custom",path:["vocabulary","entries",x,"canonical"],message:`canonical "${v.canonical}" is already declared by entry ${w}`}):h.set(S,x)}),(e.vocabulary?.entries??[]).forEach((v,x)=>{v.forbiddenAliases.forEach((S,w)=>{const j=["vocabulary","entries",x,"forbiddenAliases",w],z=h.get(S);if(z!==void 0){a.addIssue({code:"custom",path:j,message:`alias "${S}" is the canonical term of entry ${z} — a term cannot be both`});return}const T=p.get(S);if(T!==void 0){a.addIssue({code:"custom",path:j,message:`alias "${S}" is already forbidden by entry ${T} — one alias belongs to one concept`});return}p.set(S,x)})});const m=new Map(e.apps.map(v=>[v.name,v])),b=new Set(e.features.map(v=>v.name));for(const v of e.features)for(const x of v.routes){const S=x.path.split("/")[2];S!==void 0&&b.add(S)}e.features.forEach((v,x)=>{v.routes.forEach((S,w)=>{for(const j of S.invalidates??[])b.has(j)||a.addIssue({code:"custom",path:["features",x,"routes",w,"invalidates"],message:`invalidates target "${j}" matches no feature name and no route root`})})}),e.features.forEach((v,x)=>{if(v.app===void 0)return;const S=m.get(v.app);if(S===void 0){a.addIssue({code:"custom",path:["features",x,"app"],message:`app "${v.app}" is not declared in apps[]`});return}S.type!=="api"&&(v.routes.length>0||v.dbTables.length>0)&&a.addIssue({code:"custom",path:["features",x],message:"a non-api feature owns no HTTP routes and no DB tables — declare them on the api feature"})})}),Rz=Q().regex(/^.+ blockedBy:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,'Expected "<behavior> blockedBy:<feature-name>" (feature name in kebab-case)'),fi=te({id:Ie.describe("Identical to the feature name in the manifest"),status:yt(["draft","validated","implemented"]),depends_on:he(Ie),priority:yt(["P0","P1","P2"]),refs:he(Q()).default([]).describe("References to the domain model, e.g. 'modele-gally §4.2'"),deferred:he(Rz).default([]).describe("Behaviors deferred to a later feature, blocked by name")}),ei=["# @intent","# Comportements","# Contrats de données","# États UI","# Non-objectifs","# Budget"],Cz="Hypothèses";function Mz(e){const a=new RegExp(`^# ${Cz}\\s*$`,"mu").exec(e);if(a===null)return[];const i=e.slice(a.index+a[0].length),r=/^# /mu.exec(i);return(r===null?i:i.slice(0,r.index)).split(`
67
+ `).map(c=>c.trim()).filter(c=>/^[-*]\s+\S/u.test(c)).map(c=>c.replace(/^[-*]\s+/u,"").trim())}function Dz(e,a){const i=Date.parse(e);if(Number.isNaN(i))return"";const r=Math.max(0,Math.round((a-i)/1e3));if(r<60)return"à l'instant";const o=Math.round(r/60);if(o<60)return`il y a ${o} min`;const c=Math.round(o/60);if(c<24)return`il y a ${c} h`;const d=Math.round(c/24);if(d<30)return`il y a ${d} j`;const h=Math.round(d/30);if(h<12)return`il y a ${h} mois`;const p=Math.round(d/365);return`il y a ${p} an${p>1?"s":""}`}function kz(e,a){const i=e.updatedAt===null?null:Date.parse(e.updatedAt),r=a.updatedAt===null?null:Date.parse(a.updatedAt);return i!==null&&r!==null&&i!==r?r-i:i===null&&r!==null?1:i!==null&&r===null||e.id<a.id?-1:e.id>a.id?1:0}const nd=yt(["feature","package","framework-package"]),Lz=te({scannedFolders:he(Q()),coveredKinds:he(nd),outOfReach:he(Q())}),Uz=te({target:te({name:Q(),kind:nd,folder:Q()}),dependents:he(te({name:Q(),kind:nd,importedSymbols:he(Q()),viaIndexOnly:lt()})),routes:he(te({method:Q(),path:Q(),description:Q()})),ownedTables:he(Q()),tableReadersOutsideOwner:he(te({table:Q(),feature:Q(),file:Q()})),findings:he(Bo),testCommand:Q(),scope:Lz}),Zz=fi.shape.status,Rd=te({id:Ie,status:Zz,priority:fi.shape.priority,depends_on:he(Ie),filePath:Q(),presentSections:he(Q()),intent:Q().default(""),updatedAt:Q().nullable().default(null)}),qz=te({id:Q(),filePath:Q(),error:Bo}),Bz=qo([Rd,qz]),$z=te({specs:he(Bz)});te({specId:Ie});const Hz=te({frontmatter:fi,body:Q(),presentSections:he(Q()),generatedProduct:lt().default(!1)});te({frontmatter:fi,body:Q().max(2e5).optional()});const Qz=te({spec:Rd});te({id:Ie.max(80)});const Gz=te({spec:Rd}),Kz=te({manifest:Az}),Yz=te({name:Q().min(1).max(200),contentBase64:Q().min(1).max(57e5)}),Fz=te({questionId:Ie,answer:Q().min(1).max(2e3)});te({brief:Q().min(50).max(2e4),specId:Ie.optional(),attachments:he(Yz).max(5).default([]),answers:he(Fz).max(15).default([]),round:Ae().int().min(1).max(4).default(1),skipQuestions:lt().default(!1)});const Vz=te({id:Ie,text:Q().min(1),options:he(Q().min(1)).min(2).max(4)}),Pz=te({specId:Ie,attempts:Ae().int().min(1).max(4),problemsFixed:he(Q()),isNewFeature:lt(),isAmendment:lt(),compositions:he(Q()).default([]),generation:te({derivable:Ae().int().nonnegative(),hole:Ae().int().nonnegative()}).nullable().default(null),assumptions:he(Q()).default([]),usage:he(te({model:Q(),inputTokens:Ae().int().nonnegative(),outputTokens:Ae().int().nonnegative()}))}),Xz=te({jobId:Q()}),Jz=yt(["questions","drafting","judging","compositions","writing","done","failed"]),Iz=te({jobId:Q(),stage:Jz,round:Ae().int().min(1).max(3).optional(),attempt:Ae().int().min(1).max(4).optional(),composition:te({done:Ae().int().nonnegative(),total:Ae().int().nonnegative()}).optional(),elapsedMs:Ae().int().nonnegative(),budgetMs:Ae().int().positive(),questions:he(Vz).min(3).max(5).optional(),result:Pz.optional(),error:Bo.optional()}),Wz=te({specId:Ie,ref:Q(),onMap:lt(),report:Uz.nullable()}),S0=yt(["green","red","pending","none"]),eT=te({specId:Ie,branch:Q(),pullRequest:te({number:Ae().int().positive(),url:Q(),headSha:Q(),title:Q()}).nullable(),specStatus:yt(["draft","validated","implemented","unreadable","absent"]),checks:S0,checkRuns:he(te({name:Q(),conclusion:Q().nullable()})),mergeable:lt().nullable(),requiredRole:yt(["approver","operator"]),canMerge:lt(),blockers:he(Q()),labels:he(Q()).default([]),needsOperator:lt().default(!1)}),tT=te({pullRequests:he(te({specId:Ie,number:Ae().int().positive(),url:Q(),checks:S0,needsOperator:lt().default(!1)}))}),nT=te({specId:Ie,pullRequestNumber:Ae().int().positive(),mergeSha:Q(),mergedBy:Q(),mergedAt:Q()}),Cd=yt(["development","staging","production"]),_0=yt(["staging","production"]);te({environment:_0});const w0=te({environments:he(te({name:Cd,ref:Q(),sha:Q().nullable(),deployment:te({id:Ae().int(),state:Q().nullable(),createdAt:Q()}).nullable()})),releases:he(Q())});te({environment:Cd});const aT=yt(["deployed","forward","backward","unreachable"]),sT=te({sha:Q(),title:Q(),specId:Ie.nullable(),author:Q(),authoredAt:Q(),releaseTag:Q().nullable(),reach:aT,why:Q()}),iT=te({environment:Cd,ref:Q(),deployedSha:Q().nullable(),commits:he(sT).max(30)});te({sha:Q().regex(/^[0-9a-f]{40}$/),rollback:lt().optional(),reason:Q().min(10).max(2e3).optional()});const rT=te({environment:_0,fromSha:Q().nullable(),toSha:Q(),actor:Q(),at:Q(),deploymentId:Ae().int(),releaseTag:Q().nullable(),includedPullRequests:he(te({number:Ae().int(),specId:Q().nullable(),message:Q(),authoredAt:Q()})),destructiveMigration:lt(),rollback:lt()});te({month:Q().regex(/^\d{4}-\d{2}$/).optional()});const lT=te({month:Q(),specs:he(te({specId:Q(),pullRequestNumber:Ae().int(),runs:Ae().int(),inputTokens:Ae().int(),outputTokens:Ae().int(),estimatedUsd:Ae(),uncostedModels:he(Q())})),totals:te({runs:Ae().int(),inputTokens:Ae().int(),outputTokens:Ae().int(),estimatedUsd:Ae()}),budgetUsd:Ae().nullable(),budgetRatio:Ae().nullable(),warning:lt()}),dv=te({state:Q(),path:Q(),sizeBytes:Ae().int().nonnegative()}),oT=te({specId:Ie,previews:he(dv),composition:Q().nullable().default(null),compositions:he(te({name:Q(),selected:lt(),previews:he(dv)})).default([])}),uT=te({specId:Ie,composition:Q(),alreadySelected:lt()});function Md(){return Rt({queryKey:["specs"],queryFn:()=>We("/api/specs",$z)})}function cT(e){return Rt({queryKey:["specs",e],queryFn:()=>We(`/api/specs/${e}`,Hz)})}function fT(){return Rt({queryKey:["manifest"],queryFn:()=>We("/api/manifest",Kz)})}function dT(e){const a=as();return ui({mutationFn:i=>We(`/api/specs/${e}`,Qz,{method:"PUT",...zr(i)}),onSuccess:async()=>{await a.invalidateQueries({queryKey:["specs"]})}})}function hT(){const e=as();return ui({mutationFn:a=>We("/api/specs",Gz,{method:"POST",...zr(a)}),onSuccess:async()=>{await e.invalidateQueries({queryKey:["specs"]})}})}const mT=te({email:Q(),displayName:Q(),role:Q(),host:te({environments:lt(),mergePolicy:Q()}).optional()});function pT(e){return e===void 0||e.pullRequest===null?!1:e.checks==="pending"||e.checks==="none"||e.mergeable===null?1e4:!1}function gT(e,a){const i=e?.environments.find(r=>r.name==="development");return i!==void 0&&i.sha===a&&i.deployment?.state==="success"?!1:1e4}function di(){return Rt({queryKey:["me"],queryFn:()=>We("/api/auth/me",mT),retry:!1})}function yT(){return ui({mutationFn:e=>We("/api/briefs",Xz,{method:"POST",...zr(e)})})}function vT(e){return e===void 0?1e3:e.stage==="done"||e.stage==="failed"||e.stage==="questions"?!1:1e3}function bT(e){return Rt({queryKey:["briefs",e],queryFn:()=>We(`/api/briefs/${e??""}`,Iz),enabled:e!==null,retry:!1,refetchInterval:a=>vT(a.state.data)})}function xT(e){return Rt({queryKey:["specs",e,"impact"],queryFn:()=>We(`/api/specs/${e}/impact`,Wz),retry:!1})}function ST(e){return Rt({queryKey:["specs",e,"pull-request"],queryFn:()=>We(`/api/specs/${e}/pull-request`,eT),retry:!1,refetchInterval:a=>pT(a.state.data)})}function _T(e){return Rt({queryKey:["pull-requests"],queryFn:()=>We("/api/pull-requests",tT),enabled:e,retry:!1})}function wT(e){const a=as();return ui({mutationFn:()=>We(`/api/specs/${e}/merge`,nT,{method:"POST"}),onSuccess:async()=>{await a.invalidateQueries({queryKey:["specs"]})}})}function jT(e,a){if(a===null)return!1;const i=e?.environments.find(r=>r.name===a.environment);return i!==void 0&&i.sha===a.sha&&i.deployment?.state==="success"?!1:1e4}function OT(e=!0,a=null){return Rt({queryKey:["environments"],queryFn:()=>We("/api/environments",w0),retry:!1,enabled:e,refetchInterval:i=>jT(i.state.data,a)})}function hv(e,a=!0){return Rt({queryKey:["environments",e,"commits"],queryFn:()=>We(`/api/environments/${e??""}/commits`,iT),retry:!1,enabled:a&&e!==null})}function ET(e,a){return Rt({queryKey:["environments"],queryFn:()=>We("/api/environments",w0),retry:!1,enabled:a,refetchInterval:i=>gT(i.state.data,e)})}function NT(){const e=as();return ui({mutationFn:a=>{const{environment:i,...r}=a;return We(`/api/environments/${i}/promotions`,rT,{method:"POST",...zr(r)})},onSuccess:async()=>{await e.invalidateQueries({queryKey:["environments"]})}})}function zT(e){return Rt({queryKey:["consumption",e],queryFn:()=>We(`/api/consumption?month=${e}`,lT),retry:!1})}function TT(e){return Rt({queryKey:["specs",e,"previews"],queryFn:()=>We(`/api/specs/${e}/previews`,oT),retry:!1})}function AT(e){const a=as();return ui({mutationFn:i=>We(`/api/specs/${e}/compositions/${i}/select`,uT,{method:"POST"}),onSuccess:async()=>{await a.invalidateQueries({queryKey:["specs"]})}})}const RT={primary:"bg-accent text-accent-contrast hover:bg-accent-strong shadow-raised",secondary:"border border-border bg-surface-raised text-text hover:border-border-strong hover:bg-surface-sunken",danger:"bg-danger-soft text-danger border border-danger/40 hover:border-danger",ghost:"text-text-muted hover:text-text hover:bg-surface-sunken"};function ct({voice:e="secondary",size:a="md",className:i="",type:r="button",children:o,...c}){const d=a==="sm"?"px-2.5 py-1 text-xs":"px-3.5 py-2 text-sm";return g.jsx("button",{type:r,className:`inline-flex items-center justify-center gap-2 rounded-md font-medium transition-[background-color,border-color,color,transform] duration-(--duration-fast) ease-swell active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 ${d} ${RT[e]} ${i}`,...c,children:o})}const CT={neutral:"bg-surface-sunken text-text-muted border-border",accent:"bg-accent-soft text-accent border-accent/30",positive:"bg-positive-soft text-positive border-positive/30",warning:"bg-warning-soft text-warning border-warning/30",danger:"bg-danger-soft text-danger border-danger/30",orichalcum:"bg-surface-sunken text-orichalcum border-orichalcum/40"};function qe({tone:e="neutral",mono:a=!1,children:i,title:r}){return g.jsx("span",{title:r,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium leading-tight ${a?"font-mono":""} ${CT[e]}`,children:i})}function j0({status:e}){const a=e==="validated"?"accent":e==="implemented"?"positive":"neutral";return g.jsx(qe,{tone:a,children:e})}function O0({title:e,hint:a,action:i}){return g.jsxs("div",{className:"studio-rise flex flex-col items-center gap-3 rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 px-6 py-12 text-center",children:[g.jsx("p",{className:"font-display text-xl font-semibold text-text",children:e}),a!==void 0&&g.jsx("p",{className:"max-w-md text-sm text-text-muted",children:a}),i]})}function MT(e){return e instanceof Nr?e.payload:null}function ft({error:e}){const a=MT(e);if(a===null){const i=e instanceof Error?e.message:String(e);return g.jsx("div",{role:"alert",className:"rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:i})}return g.jsx($o,{error:a})}function $o({error:e}){return g.jsxs("div",{role:"alert",className:"studio-rise rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:[g.jsx("p",{className:"font-mono text-xs font-bold uppercase tracking-wide text-danger",children:e.code}),g.jsx("p",{className:"mt-1 font-medium",children:e.message}),g.jsxs("dl",{className:"mt-2 space-y-1 text-xs text-text-muted",children:[e.file!=null&&g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Fichier"}),g.jsx("dd",{className:"font-mono",children:e.file})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Cause"}),g.jsx("dd",{className:"font-mono break-all",children:e.cause})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Correction suggérée"}),g.jsx("dd",{children:e.suggestedFix})]})]})]})}var DT=Ov();function E0({open:e,title:a,children:i,onClose:r}){return ee.useEffect(()=>{if(!e)return;const o=c=>{c.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,r]),e?DT.createPortal(g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-surface-sunken/70 p-4 backdrop-blur-sm",children:g.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":a,className:"studio-rise w-full max-w-md rounded-lg border border-border bg-surface-raised p-5 shadow-overlay",children:[g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:a}),g.jsx("button",{type:"button",onClick:r,className:"rounded p-1 text-text-faint transition-colors hover:bg-surface-sunken hover:text-text","aria-label":"Fermer",children:"✕"})]}),g.jsx("div",{className:"mt-3 text-sm text-text-muted",children:i})]})}),document.body):null}function li({eyebrow:e,title:a,explanation:i,actions:r}){return g.jsxs("header",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[g.jsxs("div",{className:"min-w-0",children:[e!==void 0&&g.jsx("p",{className:"mb-1 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:e}),g.jsx("h1",{className:"font-display text-2xl font-semibold leading-tight text-text",children:a}),i!==void 0&&g.jsx("p",{className:"mt-1 max-w-2xl text-sm text-text-muted",children:i})]}),r!==void 0&&g.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:r})]})}function tn({children:e,className:a="",...i}){return g.jsx("section",{className:`rounded-lg border border-border bg-surface-raised p-4 shadow-raised ${a}`,...i,children:e})}const kT=[{status:"draft",title:"Draft",explanation:"en écriture",accent:"border-t-border-strong"},{status:"validated",title:"Validated",explanation:"signées, à implémenter",accent:"border-t-accent"},{status:"implemented",title:"Implemented",explanation:"livrées",accent:"border-t-positive"}],LT={P0:"danger",P1:"accent",P2:"neutral"},UT={green:"positive",red:"danger",pending:"warning",none:"neutral"},ZT={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"};function mv(e){return!("error"in e)}function qT(e){return e instanceof HTMLElement&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"||e.isContentEditable)}function BT(){const{data:e,isPending:a,error:i}=Md(),r=di(),o=_T(r.data!==void 0),[c,d]=ee.useState(""),[h,p]=ee.useState(!1),m=ee.useRef(null);if(ee.useEffect(()=>{const j=z=>{z.metaKey||z.ctrlKey||z.altKey||qT(z.target)||(z.key==="/"?(z.preventDefault(),m.current?.focus()):z.key==="n"&&(z.preventDefault(),p(!0)))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[]),i)return g.jsx(ft,{error:i});if(a)return g.jsx(QT,{});const b=e.specs.filter(mv),v=e.specs.filter(j=>!mv(j));if(e.specs.length===0)return g.jsx(O0,{title:"Aucune spec dans ce repo",hint:"Créez la première depuis le template canonique — elle naîtra en draft.",action:g.jsx(pv,{open:h,onOpen:()=>p(!0),onClose:()=>p(!1)})});const x=c.trim().toLowerCase(),S=j=>x===""||j.id.includes(x)||j.depends_on.some(z=>z.includes(x)),w=new Map((o.data?.pullRequests??[]).map(j=>[j.specId,j]));return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Specs",title:"Board",explanation:`${b.length} spec${b.length>1?"s":""} lisible${b.length>1?"s":""} · le repo est l'état, le board n'est qu'une vue.`,actions:g.jsxs(g.Fragment,{children:[g.jsx("input",{ref:m,type:"search",value:c,onChange:j=>d(j.target.value),placeholder:"Filtrer ( / )","aria-label":"Filtrer les specs",className:"w-44 rounded-md border border-border bg-surface-raised px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),g.jsx(pv,{open:h,onOpen:()=>p(!0),onClose:()=>p(!1)})]})}),v.length>0&&g.jsx("section",{"aria-label":"Specs illisibles",className:"space-y-2",children:v.map(j=>g.jsx($o,{error:j.error},j.filePath))}),g.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:kT.map(j=>g.jsx($T,{column:j,specs:b.filter(z=>z.status===j.status&&S(z)).sort(kz),pullsBySpec:w},j.status))})]})}function $T({column:e,specs:a,pullsBySpec:i}){return g.jsxs("section",{"aria-label":`Colonne ${e.title}`,className:`flex flex-col rounded-lg border border-border border-t-2 bg-surface-sunken/50 p-3 ${e.accent}`,children:[g.jsxs("h2",{className:"mb-3 flex items-baseline justify-between px-1",children:[g.jsxs("span",{className:"font-display text-lg font-semibold text-text",children:[e.title," ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:e.explanation})]}),g.jsx(bn,{value:a.length,className:"font-mono text-xs text-text-faint"})]}),a.length===0?g.jsx("p",{className:"rounded-md border border-dashed border-border px-3 py-6 text-center text-xs text-text-faint",children:"Aucune spec ici"}):g.jsx("ul",{className:"space-y-2",children:a.map((r,o)=>g.jsx("li",{className:"studio-reveal",style:{"--i":o},children:g.jsx(HT,{summary:r,pull:i.get(r.id)})},r.id))})]})}function HT({summary:e,pull:a}){const i=new Set(e.presentSections);return g.jsxs(ls,{to:"/specs/$specId",params:{specId:e.id},className:"group block rounded-md border border-border bg-surface-raised p-3 shadow-raised transition-[border-color,transform,box-shadow] duration-(--duration-base) ease-swell hover:-translate-y-0.5 hover:border-accent/60 hover:shadow-overlay",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("p",{className:"min-w-0 truncate font-mono text-sm font-medium text-text group-hover:text-accent",children:e.id}),g.jsx(qe,{tone:LT[e.priority]??"neutral",children:e.priority})]}),g.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[g.jsx("ul",{"aria-label":`${i.size} sections sur ${ei.length}`,className:"flex flex-1 gap-0.5",children:ei.map(r=>g.jsx("li",{title:r,className:`h-1 flex-1 rounded-full ${i.has(r)?"bg-accent":"bg-border"}`},r))}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[i.size,"/",ei.length]}),e.updatedAt!==null&&g.jsxs("time",{dateTime:e.updatedAt,title:new Date(e.updatedAt).toLocaleString("fr-FR"),className:"font-mono text-xs text-text-faint",children:["· ",Dz(e.updatedAt,Date.now())]})]}),(e.depends_on.length>0||a!==void 0)&&g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[a!==void 0&&g.jsxs(qe,{tone:a.needsOperator?"orichalcum":UT[a.checks]??"neutral",mono:!0,title:a.needsOperator?"en attente de l'opérateur (needs-operator)":ZT[a.checks]??a.checks,children:["#",a.number,a.needsOperator&&g.jsx("span",{"aria-hidden":"true",children:" ⚑"})]}),e.depends_on.map(r=>g.jsxs(qe,{mono:!0,title:`dépend de ${r}`,children:["← ",r]},r))]})]})}function QT(){return g.jsx("div",{"aria-label":"Chargement du board",className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[0,1,2].map(e=>g.jsx("div",{className:"studio-breathe h-64 rounded-lg border border-border"},e))})}function pv({open:e,onOpen:a,onClose:i}){const[r,o]=ee.useState(""),c=Er(),d=hT(),h=()=>{d.mutate({id:r},{onSuccess:async p=>{i(),await c({to:"/specs/$specId",params:{specId:p.spec.id}})}})};return g.jsxs(g.Fragment,{children:[g.jsx(ct,{voice:"primary",onClick:()=>{d.reset(),o(""),a()},children:"Nouvelle spec"}),g.jsx(E0,{open:e,title:"Nouvelle spec depuis le template",onClose:i,children:g.jsxs("form",{onSubmit:p=>{p.preventDefault(),h()},className:"space-y-3",children:[g.jsxs("label",{className:"block text-sm text-text-muted",children:["Identifiant (kebab-case, il nomme le fichier specs/<id>.spec.md)",g.jsx("input",{value:r,onChange:p=>o(p.target.value),placeholder:"ma-nouvelle-feature",autoFocus:!0,className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 font-mono text-sm text-text focus:border-accent"})]}),d.error instanceof Nr&&g.jsx(ft,{error:d.error}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(ct,{voice:"ghost",onClick:i,children:"Annuler"}),g.jsx(ct,{voice:"primary",type:"submit",disabled:d.isPending||r==="",children:"Créer en draft"})]})]})})]})}function GT(e){const a=`
68
+ ${e}`,i=[];let r=0;for(const o of ei){const c=a.indexOf(`
69
+ ${o}`,r);c!==-1&&(i.push(o),r=c+o.length)}return i}const gv={feature:"feature",package:"paquet","framework-package":"paquet du framework"};function KT({specId:e}){const a=xT(e);if(a.error)return g.jsx(ft,{error:a.error});if(a.isPending)return g.jsx("div",{"aria-label":"Chargement de l'impact",className:"h-24 studio-breathe rounded-lg border border-border bg-surface-sunken/60"});const i=a.data;if(!i.onMap||i.report===null)return g.jsxs("section",{"aria-label":"Impact de la spec",className:"rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 p-4 text-sm text-text-muted",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Impact"}),g.jsxs("p",{className:"mt-1",children:["Cette rubrique n'est pas encore sur la carte de ",g.jsx("code",{className:"font-mono text-text",children:i.ref})," : son entrée vient avec la spéculation, l'impact se lira ensuite."]})]});const r=i.report,o=[{label:"dépendants",value:r.dependents.length},{label:"routes exposées",value:r.routes.length},{label:"tables possédées",value:r.ownedTables.length},{label:"lecteurs hors propriétaire",value:r.tableReadersOutsideOwner.length}];return g.jsxs(tn,{"aria-label":"Impact de la spec",className:"text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Impact"}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[r.target.name," · ",gv[r.target.kind]??r.target.kind," · lu sur ",i.ref]})]}),g.jsx("dl",{className:"mt-3 grid grid-cols-2 gap-3 md:grid-cols-4",children:o.map(c=>g.jsxs("div",{className:"rounded-md border border-border bg-surface-sunken/60 px-3 py-2",children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:c.label}),g.jsx("dd",{className:"font-mono text-2xl text-text",children:g.jsx(bn,{value:c.value})})]},c.label))}),r.dependents.length>0&&g.jsx("ul",{"aria-label":"Dépendants",className:"mt-3 space-y-1",children:r.dependents.map(c=>g.jsxs("li",{className:"flex flex-wrap items-center gap-2 text-text-muted",children:[g.jsx("span",{className:"font-mono text-text",children:c.name}),g.jsx(qe,{tone:"neutral",children:gv[c.kind]??c.kind}),g.jsx("span",{children:c.importedSymbols.length>0?`importe ${c.importedSymbols.join(", ")}`:"n'importe aucun symbole"}),g.jsx(qe,{tone:c.viaIndexOnly?"positive":"warning",children:c.viaIndexOnly?"via index.ts":"contourne index.ts"})]},c.name))}),r.routes.length>0&&g.jsx("ul",{"aria-label":"Routes exposées",className:"mt-3 flex flex-wrap gap-2",children:r.routes.map(c=>g.jsx("li",{children:g.jsxs(qe,{tone:"accent",mono:!0,children:[c.method," ",c.path]})},`${c.method} ${c.path}`))}),r.tableReadersOutsideOwner.length>0&&g.jsx("ul",{"aria-label":"Lecteurs hors propriétaire",className:"mt-3 space-y-1 text-text-muted",children:r.tableReadersOutsideOwner.map(c=>g.jsxs("li",{children:[g.jsx("span",{className:"text-warning",children:"⚠"})," ",g.jsx("code",{className:"font-mono text-text",children:c.table})," lue par ",c.feature," (",c.file,")"]},`${c.table}:${c.file}`))}),g.jsxs("p",{className:"mt-3 font-mono text-xs text-text-faint",children:["tests à rejouer : ",r.testCommand]}),g.jsxs("p",{className:"mt-1 text-xs text-text-faint",children:["Regardé : ",r.scope.scannedFolders.join(", ")||"rien"," · natures : ",r.scope.coveredKinds.join(", "),r.scope.outOfReach.length>0?` · hors de portée : ${r.scope.outOfReach.join(" ; ")}`:""]}),r.findings.length>0&&g.jsx("div",{className:"mt-3 space-y-2",children:r.findings.map((c,d)=>g.jsx($o,{error:c},`${c.code}-${d}`))})]})}const YT={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"},FT={green:"positive",red:"danger",pending:"warning",none:"neutral"},VT=new Set(["pending","queued","in_progress","expected","waiting","requested"]),PT=new Set(["success","neutral"]);function XT(e){return e===null||VT.has(e)?{label:"en cours",tone:"warning",live:!0}:PT.has(e)?{label:"vert",tone:"positive",live:!1}:e==="skipped"?{label:"sauté",tone:"neutral",live:!1}:{label:"rouge",tone:"danger",live:!1}}function JT(e){const a=new Set;return e.filter(i=>a.has(i.name)?!1:(a.add(i.name),!0))}function N0({label:e}){return g.jsx("span",{role:"status","aria-label":e,className:"inline-flex items-center",children:g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"})})}function IT({pullRequestNumber:e,mergeSha:a,environmentsConfigured:i}){const r=ET(a,i),o=r.data?.environments.find(v=>v.name==="development"),c=o!==void 0&&o.sha===a,d=c&&o.deployment?.state==="success",h=c&&o.deployment!==null&&o.deployment!==void 0&&["failure","error"].includes(o.deployment.state??""),p=i&&!d&&!h&&r.error==null,m=i?r.error!=null?"Le suivi des environnements n'a pas répondu ; la fusion est faite.":d?`Déployée en development (${a.slice(0,7)}).`:h?`Le déploiement development a échoué sur ${a.slice(0,7)} : voir le workflow du produit.`:c?o.deployment===null||o.deployment===void 0?`La branche par défaut est sur ${a.slice(0,7)} ; en attente du déploiement development que le produit rapporte…`:`Déploiement development en cours (${o.deployment.state??"en attente"})…`:"Le développement suit : la branche par défaut reçoit le commit…":"Cet hôte ne suit pas de déploiement : pas de bloc environments.",b=d?"border-positive/40 bg-positive-soft":h?"border-danger/40 bg-danger-soft":"border-accent/30 bg-surface-raised";return g.jsx("section",{role:"status","aria-label":"Fusion et développement",className:`studio-rise rounded-lg border p-4 text-sm text-text ${b}`,children:g.jsxs("p",{className:"flex flex-wrap items-center gap-2",children:[p&&g.jsx(N0,{label:"développement en cours"}),g.jsxs("span",{className:"font-medium",children:["Pull request #",e," fusionnée."]}),g.jsx("span",{className:"text-text-muted",children:m})]})})}function WT({specId:e,role:a}){const i=ST(e),r=wT(e),o=di();if(i.error)return g.jsx(ft,{error:i.error});if(i.isPending)return g.jsx("div",{"aria-label":"Chargement de la pull request",className:"h-20 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const c=i.data;if(r.isSuccess)return g.jsx(IT,{pullRequestNumber:r.data.pullRequestNumber,mergeSha:r.data.mergeSha,environmentsConfigured:o.data?.host?.environments!==!1});const d=c.canMerge&&vv(a,c.requiredRole),h=c.pullRequest!==null&&(c.checks==="pending"||c.checks==="none"||c.mergeable===null);return g.jsxs(tn,{"aria-label":"Pull request de la spec",className:"text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Pull request"}),c.pullRequest!==null&&g.jsxs(g.Fragment,{children:[g.jsxs("a",{className:"font-mono text-accent underline-offset-4 hover:underline",href:c.pullRequest.url,target:"_blank",rel:"noreferrer",children:["#",c.pullRequest.number]}),g.jsx(qe,{tone:FT[c.checks]??"neutral",children:YT[c.checks]??c.checks}),h&&g.jsx(N0,{label:"la CI tourne, relue toutes les dix secondes"}),g.jsx(j0,{status:c.specStatus}),c.needsOperator&&g.jsx(qe,{tone:"orichalcum",children:"en attente de l'opérateur"})]})]}),g.jsx(ct,{voice:"primary",size:"sm",disabled:!d||r.isPending,onClick:()=>r.mutate(),children:r.isPending?"Fusion…":"Fusionner"})]}),c.pullRequest===null?g.jsxs("p",{className:"mt-2 text-text-muted",children:["Aucune pull request ouverte : la prochaine sauvegarde en ouvre une sur ",g.jsx("code",{className:"font-mono text-text",children:c.branch}),"."]}):g.jsxs("p",{className:"mt-2 text-text-muted",children:[g.jsx("span",{className:"text-text",children:c.pullRequest.title})," · branche ",g.jsx("code",{className:"font-mono",children:c.branch})]}),c.pullRequest!==null&&c.checkRuns.length>0&&g.jsx("ul",{"aria-label":"Checks de la branche",className:"mt-3 flex flex-wrap gap-2",children:JT(c.checkRuns).map(p=>{const m=XT(p.conclusion);return g.jsxs("li",{className:"flex items-center gap-1.5 rounded-md border border-border bg-surface-raised px-2 py-1 font-mono text-xs",children:[g.jsx("span",{className:"text-text",children:p.name}),g.jsx(qe,{tone:m.tone,children:m.label})]},p.name)})}),c.blockers.length>0&&g.jsx("ul",{className:"mt-3 space-y-1 text-text-muted",children:c.blockers.map(p=>g.jsxs("li",{className:"flex gap-2",children:[g.jsx("span",{"aria-hidden":"true",className:"text-warning",children:"●"}),p]},p))}),c.pullRequest!==null&&!vv(a,c.requiredRole)&&g.jsxs("p",{className:"mt-3 text-text-muted",children:["La fusion exige le rôle ",c.requiredRole,"."]}),r.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:r.error})})]})}const yv={reader:0,author:1,approver:2,operator:3};function vv(e,a){return(yv[e]??-1)>=(yv[a]??99)}const eA={empty:"Vide",loading:"Chargement",nominal:"Nominal",error:"Erreur"};function tA({specId:e}){const a=TT(e),i=AT(e),[r,o]=ee.useState(null),[c,d]=ee.useState(null);if(a.error)return g.jsx(ft,{error:a.error});if(a.isPending)return g.jsx("div",{"aria-label":"Chargement des aperçus",className:"h-24 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const h=a.data.compositions,p=a.data.composition,m=h.length>0?h.find(S=>S.name===c)??h.find(S=>S.selected)??h[0]??null:null,b=m===null?a.data.previews:m.previews;if(b.length===0&&m===null)return g.jsxs("section",{"aria-label":"Aperçus de l'écran",className:"rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 p-4 text-sm text-text-muted",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Aperçus"}),g.jsx("p",{className:"mt-1",children:"Aucun aperçu sur la branche : la spéculation n'a pas encore rendu d'écran, ou cette spec n'en décrit pas."})]});const v=b.some(S=>S.state===r)?r??"":b[0]?.state??"",x=m===null?`/api/specs/${e}/previews/${v}`:`/api/specs/${e}/previews/${m.name}/${v}`;return g.jsxs(tn,{"aria-label":"Aperçus de l'écran",className:"text-sm",children:[h.length>1&&g.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 border-b border-border pb-3",children:[g.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Compositions"}),g.jsx("div",{role:"radiogroup","aria-label":"Compositions proposées",className:"flex flex-wrap gap-1.5",children:h.map(S=>g.jsx("button",{type:"button",role:"radio","aria-checked":m?.name===S.name,onClick:()=>d(S.name),className:`rounded-full border px-3 py-1 font-mono text-xs transition-colors ${m?.name===S.name?"border-accent bg-accent-soft text-accent":"border-border text-text-muted hover:text-text"}`,children:S.name},S.name))}),m!==null&&m.name===p&&g.jsx(qe,{tone:"positive",children:"retenue"}),m!==null&&m.name!==p&&g.jsx(ct,{voice:"primary",size:"sm",disabled:i.isPending,onClick:()=>i.mutate(m.name),children:i.isPending?"Sélection…":"Retenir cette composition"})]}),i.error!=null&&g.jsx("div",{className:"mb-3",children:g.jsx(ft,{error:i.error})}),g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("h2",{className:"font-display text-lg font-semibold text-text",children:["Aperçus ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"l'écran tel qu'il sera"})]}),g.jsx("div",{role:"tablist",className:"inline-flex rounded-md border border-border bg-surface-sunken p-0.5",children:b.map(S=>g.jsx("button",{role:"tab",type:"button","aria-selected":S.state===v,onClick:()=>o(S.state),className:`rounded px-3 py-1 text-xs font-medium transition-colors duration-(--duration-fast) ease-swell ${S.state===v?"bg-accent text-accent-contrast shadow-raised":"text-text-muted hover:text-text"}`,children:eA[S.state]??S.state},S.state))})]}),g.jsx("iframe",{title:`Aperçu ${v}`,sandbox:"",src:x,className:"mt-3 h-[480px] w-full rounded-md border border-border bg-surface-raised"})]})}function z0(e){return e instanceof y0?z0(e.def.innerType):e}function nA(){const e=fi.shape;return Object.keys(e).map(a=>{const i=z0(e[a]);if(i instanceof Ao)return{name:a,kind:"enum",options:i.options.map(r=>String(r)),readOnly:!1};if(i instanceof m0)return{name:a,kind:"string-array",readOnly:!1};if(i instanceof f0)return{name:a,kind:"text",readOnly:a==="id"};throw new Error(`deriveFrontmatterFields: unsupported schema for "${String(a)}" — extend the derivation, never hand-describe the form`)})}function bv(e){return{id:e.id,status:e.status,depends_on:e.depends_on.join(`
70
+ `),priority:e.priority,refs:e.refs.join(`
71
+ `),deferred:e.deferred.join(`
72
+ `)}}function zf(e){return e.split(`
73
+ `).map(a=>a.trim()).filter(a=>a!=="")}function aA(e){return{id:e.id,status:e.status,depends_on:zf(e.depends_on),priority:e.priority,refs:zf(e.refs),deferred:zf(e.deferred)}}function sA(e){const a=[],i=e.split(`
74
+ `);let r=0;for(;r<i.length;){const c=(i[r]??"").trim();if(c===""){r+=1;continue}const d=/^(#{1,6})\s+(.*)$/.exec(c);if(d!==null){a.push({kind:"heading",level:(d[1]??"#").length,text:d[2]??""}),r+=1;continue}if(c.startsWith("```")){const p=[];for(r+=1;r<i.length&&!(i[r]??"").trim().startsWith("```");)p.push(i[r]??""),r+=1;r+=1,a.push({kind:"code",text:p.join(`
75
+ `)});continue}if(c.startsWith("- ")){const p=[];for(;r<i.length;){const m=(i[r]??"").trim();if(m.startsWith("- "))p.push(m.slice(2)),r+=1;else if(m!==""&&!m.startsWith("#"))p[p.length-1]=`${p[p.length-1]??""} ${m}`,r+=1;else break}a.push({kind:"bullet",items:p});continue}const h=[];for(;r<i.length;){const p=(i[r]??"").trim();if(p===""||p.startsWith("#")||p.startsWith("- ")||p.startsWith("```"))break;h.push(p),r+=1}a.push({kind:"paragraph",text:h.join(" ")})}return a}const iA=6,rA={1:"font-display text-xl font-semibold text-text mt-6 first:mt-0 border-b border-border pb-1",2:"font-display text-lg font-semibold text-text mt-4"};function lA({markdown:e}){const a=sA(e);return a.length===0?g.jsx("p",{className:"text-sm text-text-faint",children:"Rien à prévisualiser encore."}):g.jsx("div",{className:"space-y-2",children:a.map((i,r)=>{if(i.kind==="heading")return g.jsx("p",{className:rA[Math.min(i.level,2)],children:i.text},r);if(i.kind==="bullet")return g.jsx("ul",{className:"list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-accent",children:i.items.map((o,c)=>g.jsx("li",{children:o},c))},r);if(i.kind==="code"){const o=i.text.split(`
76
+ `),c=g.jsx("pre",{className:"overflow-x-auto rounded-md border border-border bg-surface-sunken p-3 font-mono text-xs text-text",children:i.text});return o.length<iA?g.jsx("div",{children:c},r):g.jsxs("details",{className:"group rounded-md border border-border bg-surface-sunken/60",children:[g.jsxs("summary",{className:"cursor-pointer select-none px-3 py-2 font-mono text-xs text-text-muted transition-colors hover:text-text",children:[g.jsx("span",{className:"text-text",children:o[0]}),g.jsxs("span",{className:"ml-2 text-text-faint",children:["… ",o.length," lignes — déplier"]})]}),g.jsx("div",{className:"px-2 pb-2",children:c})]},r)}return g.jsx("p",{className:"text-sm text-text-muted",children:i.text},r)})})}const io="mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent";function oA({specId:e}){const{data:a,isPending:i,error:r}=cT(e);return r?g.jsxs("div",{className:"space-y-3",children:[g.jsx(T0,{}),g.jsx(ft,{error:r})]}):i?g.jsx("div",{"aria-label":"Chargement de la spec",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):g.jsx(uA,{specId:e,initialFrontmatter:a.frontmatter,initialBody:a.body,generatedProduct:a.generatedProduct},e)}function T0(){return g.jsx(ls,{to:"/",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-accent",children:"← Retour au board"})}function uA({specId:e,initialFrontmatter:a,initialBody:i,generatedProduct:r}){const o=nA(),[c,d]=ee.useState(()=>bv(a)),[h,p]=ee.useState(()=>({form:bv(a),body:i})),[m,b]=ee.useState(i),[v,x]=ee.useState(null),[S,w]=ee.useState(!1),[j,z]=ee.useState(!1),T=dT(e),L=di(),G=m!==h.body||JSON.stringify(c)!==JSON.stringify(h.form),V=new Set(GT(m)),W=(P,I)=>{d(fe=>({...fe,[P]:I}))},$=()=>{const P=fi.safeParse(aA(c));return P.success?(x(null),P.data):(x(P.error.issues.map(I=>`${I.path.join(".")}: ${I.message}`).join(" ; ")),null)},R=()=>{const P=$();P!==null&&T.mutate({frontmatter:P,body:m},{onSuccess:()=>p({form:c,body:m})})},J=()=>{const P=$();if(P===null){w(!1);return}const I={...c,status:"validated"};T.mutate({frontmatter:{...P,status:"validated"},body:m},{onSuccess:()=>{d(I),p({form:I,body:m})},onSettled:()=>w(!1)})};ee.useEffect(()=>{const P=I=>{(I.metaKey||I.ctrlKey)&&I.key.toLowerCase()==="s"&&(I.preventDefault(),R())};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)});const ie=Mz(m),re=r&&!/^# Génération\s*$/mu.test(m);return g.jsxs("div",{className:"space-y-5",children:[g.jsxs("div",{className:"sticky top-0 z-10 -mx-8 -mt-8 border-b border-border bg-surface/85 px-8 py-4 backdrop-blur",children:[g.jsx(T0,{}),g.jsxs("div",{className:"mt-1 flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.jsx("h1",{className:"truncate font-display text-2xl font-semibold leading-tight text-text",children:e}),g.jsx(j0,{status:c.status}),G&&g.jsx(qe,{tone:"orichalcum",children:"Modifications non enregistrées"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ct,{onClick:R,disabled:T.isPending,title:"⌘S / Ctrl+S",children:"Enregistrer"}),c.status==="draft"&&g.jsx(ct,{voice:"primary",onClick:()=>w(!0),disabled:T.isPending,children:"Valider"})]})]})]}),re&&g.jsxs("section",{"aria-label":"Spec sans génération",className:"studio-reveal rounded-lg border border-dashed border-warning/50 bg-warning-soft/40 p-4 text-sm text-text",style:{"--i":0},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Sans génération"}),g.jsxs("p",{className:"mt-1 text-text-muted",children:["Ce produit est généré, mais cette spec n'a pas de section ",g.jsx("code",{className:"font-mono text-text",children:"# Génération"})," : rien ne se dérive d'elle, elle s'implémente à la main (D58). Pour un écran ou des routes dérivés, redemandez-la par un brief sans « sans génération »."]})]}),ie.length>0&&g.jsxs(tn,{"aria-label":"Hypothèses du modèle",className:"studio-reveal border-orichalcum/40",style:{"--i":0},children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Hypothèses"}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"ce que le modèle a tranché sans que le brief le dise (D57)"})]}),g.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-orichalcum",children:ie.map(P=>g.jsx("li",{children:P},P))}),g.jsx("p",{className:"mt-2 text-xs text-text-faint",children:"Validée, la section fait partie du contrat : amendez la spec si une hypothèse ne vous va pas."})]}),L.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":0},children:g.jsx(tA,{specId:e})}),L.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":1},children:g.jsx(WT,{specId:e,role:L.data.role})}),L.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":2},children:g.jsx(KT,{specId:e})}),v!==null&&g.jsxs("div",{role:"alert",className:"rounded-md border border-warning/40 bg-warning-soft p-3 text-sm text-text",children:["Frontmatter invalide : ",v]}),T.error!=null&&g.jsx(ft,{error:T.error}),T.isSuccess&&T.error==null&&!G&&g.jsxs("p",{role:"status",className:"studio-rise rounded-md border border-positive/40 bg-positive-soft p-3 text-sm text-text",children:["Spec enregistrée — statut : ",T.data.spec.status,"."]}),g.jsxs("ol",{"aria-label":"Sections canoniques",className:"studio-reveal flex flex-wrap gap-2",style:{"--i":3},children:[ei.map((P,I)=>{const fe=P.replace(/^# /u,"");return g.jsx("li",{children:g.jsx(qe,{tone:V.has(P)?"accent":"neutral",title:V.has(P)?"section présente":"section absente ou hors ordre",children:`${I+1} · ${fe}`})},P)}),g.jsxs("li",{className:"self-center font-mono text-xs text-text-faint",children:[g.jsx(bn,{value:V.size}),"/",ei.length," présentes, dans l'ordre du gate"]})]}),g.jsxs(tn,{"aria-label":"Frontmatter",className:"studio-reveal",style:{"--i":4},children:[g.jsxs("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:["Frontmatter ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"formulaire dérivé de SpecFrontmatterSchema"})]}),g.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:o.map(P=>g.jsxs("label",{className:"block text-sm text-text-muted",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:P.name}),P.kind==="enum"?g.jsx("select",{value:c[P.name],onChange:I=>W(P.name,I.target.value),className:io,children:(P.options??[]).map(I=>g.jsx("option",{value:I,children:I},I))}):P.kind==="string-array"?g.jsx("textarea",{value:c[P.name],onChange:I=>W(P.name,I.target.value),rows:2,placeholder:"un élément par ligne",className:`${io} font-mono text-xs`}):g.jsx("input",{value:c[P.name],readOnly:P.readOnly,onChange:I=>W(P.name,I.target.value),className:`${io} font-mono ${P.readOnly?"bg-surface-sunken text-text-faint":""}`})]},P.name))})]}),g.jsxs("section",{"aria-label":"Sections markdown",className:`studio-reveal grid grid-cols-1 gap-4 ${j?"lg:grid-cols-2":""}`,style:{"--i":5},children:[j?g.jsxs("label",{className:"block text-sm text-text-muted",children:[g.jsxs("span",{className:"flex items-center justify-between font-mono text-xs text-text-faint",children:["sections (markdown)",g.jsx(ct,{voice:"ghost",size:"sm",onClick:()=>z(!1),children:"Replier l'éditeur"})]}),g.jsx("textarea",{"aria-label":"sections (markdown)",value:m,onChange:P=>b(P.target.value),rows:28,spellCheck:!1,className:`${io} resize-y p-3 font-mono text-xs leading-relaxed`}),g.jsxs("span",{className:"mt-1 block text-right font-mono text-xs text-text-faint",children:[g.jsx(bn,{value:m.split(`
77
+ `).length})," lignes · ",g.jsx(bn,{value:m.trim()===""?0:m.trim().split(/\s+/u).length})," mots"]})]}):g.jsxs("button",{type:"button",onClick:()=>z(!0),className:"flex w-full items-center justify-between rounded-md border border-dashed border-border-strong/60 bg-surface-raised/60 px-4 py-3 text-left text-sm text-text-muted transition-colors hover:border-accent hover:text-text",children:[g.jsxs("span",{children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"sections (markdown)"}),g.jsx("span",{className:"ml-3",children:"Éditer les sections"})]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-faint",children:[m.split(`
78
+ `).length," lignes · ",m.trim()===""?0:m.trim().split(/\s+/u).length," mots"]})]}),g.jsxs("div",{className:"text-sm",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"preview"}),g.jsx("div",{className:"mt-1 h-full rounded-md border border-border bg-surface-raised p-5 shadow-raised",children:g.jsx(lA,{markdown:m})})]})]}),g.jsxs(E0,{open:S,title:`Valider ${e} ?`,onClose:()=>w(!1),children:[g.jsxs("p",{children:["Une spec validée est un contrat d'implémentation : status passera à « validated » et le fichier sera réécrit (message « spec: validate ",e," »)."]}),g.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[g.jsx(ct,{voice:"ghost",onClick:()=>w(!1),children:"Annuler"}),g.jsx(ct,{voice:"primary",onClick:J,disabled:T.isPending,children:"Confirmer la validation"})]})]})]})}const cA={skeleton:"neutral","in-progress":"warning",delivered:"positive"},fA={GET:"accent",POST:"positive",PUT:"warning",PATCH:"warning",DELETE:"danger"};function dA(){const{data:e,isPending:a,error:i}=fT();if(i)return g.jsx(ft,{error:i});if(a)return g.jsx("div",{"aria-label":"Chargement du manifeste",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const{manifest:r}=e,o=r.features.reduce((d,h)=>d+h.routes.length,0),c=r.features.filter(d=>d.status==="delivered").length;return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Manifeste · lecture seule",title:r.product.name,explanation:r.product.description}),g.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"apps",value:r.apps.length},{label:"features",value:r.features.length},{label:"livrées",value:c},{label:"routes",value:o}].map((d,h)=>g.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":h},children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:d.label}),g.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:g.jsx(bn,{value:d.value})})]},d.label))}),g.jsxs(tn,{"aria-label":"Apps",children:[g.jsx("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:"Apps"}),g.jsx("ul",{className:"divide-y divide-border text-sm",children:r.apps.map(d=>g.jsxs("li",{className:"flex flex-wrap items-center gap-3 py-2",children:[g.jsx("span",{className:"font-mono font-medium text-text",children:d.name}),g.jsx(qe,{children:d.type}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:d.path})]},d.name))})]}),g.jsxs("section",{"aria-label":"Features",className:"space-y-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Features"}),r.features.map(d=>g.jsxs(tn,{children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("h3",{className:"font-mono text-sm font-semibold text-text",children:d.name}),g.jsx(qe,{tone:cA[d.status]??"neutral",children:d.status})]}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:d.intent}),d.dependsOn.length>0&&g.jsxs("p",{className:"mt-3 flex flex-wrap items-center gap-1.5 text-xs text-text-faint",children:["Dépend de :"," ",d.dependsOn.map(h=>g.jsx(qe,{mono:!0,children:h},h))]}),d.routes.length>0&&g.jsx("ul",{className:"mt-3 space-y-1 text-xs",children:d.routes.map(h=>g.jsxs("li",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-16 shrink-0",children:g.jsx(qe,{tone:fA[h.method]??"neutral",mono:!0,children:h.method})}),g.jsx("span",{className:"font-mono text-text-muted",children:h.path})]},`${h.method} ${h.path}`))})]},d.name))]})]})}const hA=te({accepted:va(!0)});function xv({children:e}){return g.jsxs("div",{className:"mx-auto max-w-md pt-12",children:[g.jsxs("p",{className:"mb-6 flex flex-col items-center text-center",children:[g.jsx(b0,{size:"lg",label:"Ogygie",className:"mb-3 text-accent"}),g.jsx("span",{className:"font-display text-4xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),g.jsx("span",{className:"mt-2 block font-mono text-xs uppercase tracking-[0.3em] text-accent",children:"Studio hébergé"})]}),g.jsx("div",{className:"studio-rise rounded-lg border border-border bg-surface-raised p-6 shadow-overlay",children:e})]})}const mA=te({magicLink:lt(),entra:lt()});function pA(){return Rt({queryKey:["auth-options"],queryFn:()=>We("/api/auth/options",mA),retry:!1})}function gA(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get("error")}function yA(){const[e,a]=ee.useState(""),[i,r]=ee.useState({kind:"idle"}),o=pA(),c=gA();async function d(m){m.preventDefault(),r({kind:"sending"});try{await We("/api/auth/magic-link",hA,{method:"POST",...zr({email:e})}),r({kind:"sent"})}catch(b){r({kind:"error",error:b})}}if(i.kind==="sent")return g.jsx(xv,{children:g.jsxs("section",{className:"studio-reveal",children:[g.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Vérifiez votre boîte mail"}),g.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"Si ce compte existe, un lien de connexion a été envoyé. Il est valable quinze minutes et ne sert qu'une fois."})]})});const h=o.data?.entra??!1,p=o.data?.magicLink??!1;return g.jsx(xv,{children:g.jsxs("div",{className:"studio-reveal",children:[g.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Connexion"}),c==="HOST_ACCESS_DENIED"&&g.jsxs("section",{role:"alert",className:"studio-rise mt-3 rounded-md border border-warning/40 bg-warning-soft p-3 text-sm text-text",children:[g.jsx("p",{className:"font-medium",children:"Votre compte est authentifié, mais cet hôte ne vous a pas invité."}),g.jsx("p",{className:"mt-1 text-text-muted",children:"Demandez à l'opérateur de vous ajouter au groupe de l'annuaire qui ouvre ce studio."})]}),c!==null&&c!=="HOST_ACCESS_DENIED"&&g.jsxs("section",{role:"alert",className:"studio-rise mt-3 rounded-md border border-danger/40 bg-danger-soft p-3 text-sm text-text",children:["La connexion Microsoft n'a pas abouti (",c,"). Réessayez ; si cela persiste, prévenez l'opérateur."]}),o.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:o.error})}),h&&g.jsxs("a",{href:"/api/auth/entra/start",className:"mt-5 flex w-full items-center justify-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-accent-contrast transition-[transform,filter] duration-(--duration-fast) hover:-translate-y-px hover:brightness-110 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent",children:[g.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 21 21",className:"h-4 w-4",fill:"currentColor",children:[g.jsx("rect",{x:"1",y:"1",width:"9",height:"9"}),g.jsx("rect",{x:"11",y:"1",width:"9",height:"9",opacity:"0.8"}),g.jsx("rect",{x:"1",y:"11",width:"9",height:"9",opacity:"0.8"}),g.jsx("rect",{x:"11",y:"11",width:"9",height:"9",opacity:"0.6"})]}),"Se connecter avec Microsoft"]}),h&&p&&g.jsx("p",{className:"mt-5 text-center font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"ou"}),p&&g.jsxs("form",{onSubmit:d,className:h?"mt-3":"mt-1",children:[g.jsx("p",{className:"text-sm text-text-muted",children:"Un lien de connexion vous sera envoyé par courriel."}),g.jsx("label",{className:"mt-4 block text-sm font-medium text-text",htmlFor:"login-email",children:"Adresse e-mail"}),g.jsx("input",{id:"login-email",type:"email",required:!0,autoComplete:"email",autoFocus:!h,value:e,onChange:m=>a(m.target.value),className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),i.kind==="error"&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:i.error})}),g.jsx(ct,{voice:h?"secondary":"primary",type:"submit",disabled:i.kind==="sending",className:"mt-5 w-full",children:i.kind==="sending"?"Envoi…":"Recevoir un lien"})]}),o.isPending&&g.jsx("div",{"aria-label":"Chargement des options de connexion",className:"mt-5 h-10 studio-breathe rounded-md border border-border bg-surface-sunken/60"}),o.isSuccess&&!h&&!p&&g.jsx("p",{className:"mt-5 text-sm text-text-muted",children:"Cet hôte n'offre aucune connexion : sa configuration ne déclare ni utilisateur ni identité."})]})})}const ro=50,vA=["Je veux une rubrique qui liste les commandes du mois avec leur statut, et un bouton pour marquer une commande livrée.","Les clients doivent pouvoir noter une intervention de 1 à 5 ; une note sous 3 déclenche une alerte au responsable."],bA=[{title:"Décrivez",detail:"le besoin, en français, comme à un collègue"},{title:"Le modèle rédige",detail:"la spec dans le format du repo ; les gates la jugent avant tout affichage"},{title:"Vous relisez",detail:"les comportements d'abord, puis vous validez — rien ne se code avant"}],Tf="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",Af=3,xA=6,Sv=e=>`${Math.floor(e/1e3)} s`;function SA(e){switch(e.stage){case"drafting":return`Le modèle écrit${e.attempt!==void 0&&e.attempt>1?` (tentative ${e.attempt})`:""}…`;case"judging":return`Les gates jugent${e.attempt!==void 0&&e.attempt>1?` (tentative ${e.attempt})`:""}…`;case"compositions":return`Les compositions, ${e.composition?.done??0} sur ${e.composition?.total??0}…`;case"writing":return"La pull request s'ouvre…";default:return""}}function _v({job:e}){const a=Math.min(1,e.elapsedMs/e.budgetMs);return g.jsxs("section",{role:"status","aria-label":"Brief en cours",className:"studio-rise rounded-lg border border-accent/30 bg-surface-raised p-4 text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("span",{className:"flex items-center gap-2 text-text",children:[g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"}),SA(e)]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-muted",children:[Sv(e.elapsedMs)," / ",Sv(e.budgetMs)]})]}),g.jsx("div",{"aria-hidden":"true",className:"mt-3 h-1 overflow-hidden rounded-full bg-surface-sunken",children:g.jsx("div",{className:`h-full rounded-full ${a>=1?"bg-warning":"bg-accent"} transition-[width] duration-(--duration-base)`,style:{width:`${Math.round(a*100)}%`}})}),a>=1&&g.jsx("p",{className:"mt-2 text-xs text-text-muted",children:"Au-delà du budget de 90 s : l'instance continue, le travail finira ou dira pourquoi."})]})}const Rf=[".md",".markdown",".txt",".csv",".json",".html",".htm",".xlsx",".pdf"],_A=5,wA=4*1024*1024,wv=e=>e<1024?`${e} o`:e<1024*1024?`${Math.round(e/1024)} Ko`:`${(e/(1024*1024)).toFixed(1)} Mo`;async function jA(e){const a=new Uint8Array(await e.arrayBuffer());let i="";for(let r=0;r<a.length;r+=32768)i+=String.fromCharCode(...a.subarray(r,r+32768));return btoa(i)}function OA(){const[e,a]=ee.useState(""),[i,r]=ee.useState(""),[o,c]=ee.useState(!1),[d,h]=ee.useState([]),[p,m]=ee.useState(null),[b,v]=ee.useState(null),[x,S]=ee.useState([]),[w,j]=ee.useState({}),z=Er(),T=yT(),L=bT(b),G=Md(),V=e.trim().length,W=L.data?.stage==="done"?L.data.result?.specId:void 0;ee.useEffect(()=>{W!==void 0&&z({to:"/specs/$specId",params:{specId:W}})},[W,z]);const $=L.data?.stage==="questions"?L.data:null,R=L.data!==void 0&&L.data.stage!=="done"&&L.data.stage!=="failed"&&L.data.stage!=="questions",J=T.isPending||R||b!==null&&L.isPending,ie=L.error instanceof Nr&&L.error.payload.code==="BRIEF_JOB_LOST",re=x.flatMap(q=>Object.entries(q.answers).map(([ae,ue])=>({questionId:ae,answer:ue}))),P=i.trim().toLowerCase(),I=P===""||!o?[]:(G.data?.specs??[]).filter(q=>"status"in q).filter(q=>q.id!==P&&(q.id.includes(P)||q.intent.toLowerCase().includes(P))).slice(0,xA);function fe(q){T.mutate({brief:e,...i.trim()===""?{}:{specId:i.trim()},...d.length===0?{}:{attachments:d.map(ae=>({name:ae.name,contentBase64:ae.contentBase64}))},...q.answers.length===0?{}:{answers:q.answers},...q.round===1?{}:{round:q.round},...q.skipQuestions?{skipQuestions:!0}:{}},{onSuccess:ae=>v(ae.jobId)})}function ye(){if($===null)return;const q=$.round??x.length+1,ae=[...x,{round:q,questions:$.questions??[],answers:w}];S(ae),j({}),v(null),fe({answers:ae.flatMap(ue=>Object.entries(ue.answers).map(([E,Z])=>({questionId:E,answer:Z}))),round:Math.min(q+1,Af+1),skipQuestions:!1})}function pe(){const q=$?.round??x.length+1;v(null),fe({answers:re,round:q,skipQuestions:!0})}async function U(q){const ae=Array.from(q.target.files??[]);q.target.value="",m(null);const ue=[...d];for(const E of ae){const Z=E.name.toLowerCase();if(!Rf.some(X=>Z.endsWith(X))){m(`« ${E.name} » : format non retenu — ${Rf.join(", ")}.`);continue}if(E.size>wA){m(`« ${E.name} » : ${wv(E.size)}, au-delà de 4 Mo par pièce.`);continue}if(ue.length>=_A){m(`Cinq pièces au plus : « ${E.name} » n'est pas jointe.`);break}ue.some(X=>X.name===E.name)||ue.push({name:E.name,size:E.size,contentBase64:await jA(E)})}h(ue)}function C(q){q.preventDefault(),S([]),j({}),v(null),fe({answers:[],round:1,skipQuestions:!1})}return g.jsxs("form",{onSubmit:C,className:"space-y-6",children:[g.jsx(li,{eyebrow:"Hébergé",title:"Décrire une rubrique",explanation:"Écrivez le besoin en français. Le modèle rédige la spec, les gates du repo la jugent, puis vous la relisez avant de la valider."}),g.jsx("ol",{className:"grid gap-3 md:grid-cols-3",children:bA.map((q,ae)=>g.jsxs("li",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":ae},children:[g.jsxs("p",{className:"font-mono text-xs text-accent",children:["0",ae+1]}),g.jsx("p",{className:"mt-1 font-display text-lg font-semibold text-text",children:q.title}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:q.detail})]},q.title))}),g.jsxs(tn,{className:"studio-reveal",style:{"--i":3},children:[g.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[g.jsx("label",{className:"block text-sm font-medium text-text",htmlFor:"brief-text",children:"Brief"}),g.jsxs("span",{className:`font-mono text-xs ${V<ro?"text-text-faint":"text-positive"}`,children:[V," / ",ro," caractères minimum"]})]}),g.jsx("textarea",{id:"brief-text",required:!0,minLength:ro,rows:10,value:e,onChange:q=>a(q.target.value),placeholder:"Je veux une rubrique qui…",className:`${Tf} mt-2 font-sans leading-relaxed`}),g.jsx("p",{className:"mt-3 text-xs text-text-faint",children:"Pour voir le ton attendu :"}),g.jsx("ul",{className:"mt-1 flex flex-wrap gap-2",children:vA.map(q=>g.jsx("li",{children:g.jsxs(ct,{voice:"ghost",size:"sm",onClick:()=>a(q),className:"max-w-md text-left whitespace-normal",children:["« ",q," »"]})},q))}),g.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-spec-id",children:["Spec visée ",g.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel, pour amender une spec existante)"})]}),g.jsxs("div",{className:"relative",children:[g.jsx("input",{id:"brief-spec-id",value:i,onChange:q=>r(q.target.value),onFocus:()=>c(!0),onBlur:()=>window.setTimeout(()=>c(!1),150),placeholder:"ex. suivi-des-commandes — tapez quelques lettres",autoComplete:"off","aria-autocomplete":"list","aria-controls":"brief-spec-suggestions","aria-expanded":I.length>0,className:`${Tf} mt-1 font-mono`}),I.length>0&&g.jsx("ul",{id:"brief-spec-suggestions",role:"listbox","aria-label":"Specs du repo",className:"absolute z-10 mt-1 w-full overflow-hidden rounded-md border border-border bg-surface-raised shadow-overlay",children:I.map(q=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":!1,onMouseDown:ae=>ae.preventDefault(),onClick:()=>{r(q.id),c(!1)},className:"flex w-full items-baseline gap-3 px-3 py-2 text-left text-sm transition-colors hover:bg-surface-sunken",children:[g.jsx("span",{className:"font-mono text-text",children:q.id}),g.jsx("span",{className:"truncate text-xs text-text-muted",children:q.intent})]})},q.id))})]}),g.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-attachments",children:["Pièces jointes ",g.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel : une maquette HTML, un classeur, un document)"})]}),g.jsx("input",{id:"brief-attachments",type:"file",multiple:!0,accept:Rf.join(","),onChange:q=>{U(q)},className:"mt-1 block w-full text-sm text-text-muted file:mr-3 file:rounded-md file:border file:border-border file:bg-surface file:px-3 file:py-1.5 file:text-sm file:text-text"}),g.jsx("p",{className:"mt-1 text-xs text-text-faint",children:"Cinq pièces au plus, 4 Mo chacune : md, txt, csv, json, html, xlsx, pdf. Le modèle les lit comme votre matériau ; rien n'est conservé."}),p!==null&&g.jsx("p",{role:"alert",className:"mt-2 text-xs text-danger",children:p}),d.length>0&&g.jsx("ul",{"aria-label":"Pièces jointes au brief",className:"mt-2 space-y-1",children:d.map(q=>g.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border px-3 py-1.5 text-sm",children:[g.jsx("span",{className:"truncate font-mono text-text",children:q.name}),g.jsxs("span",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:wv(q.size)}),g.jsx(ct,{voice:"ghost",size:"sm",onClick:()=>h(d.filter(ae=>ae.name!==q.name)),"aria-label":`Retirer ${q.name}`,children:"Retirer"})]})]},q.name))})]}),x.map(q=>g.jsxs("details",{className:"rounded-lg border border-border bg-surface-raised/60 px-4 py-3 text-sm",children:[g.jsxs("summary",{className:"cursor-pointer font-medium text-text",children:["Tournée ",q.round," sur ",Af," — répondue"]}),g.jsx("dl",{className:"mt-2 space-y-1 text-text-muted",children:q.questions.map(ae=>g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("dt",{children:ae.text}),g.jsx("dd",{className:"text-text",children:q.answers[ae.id]??"(sans réponse)"})]},ae.id))})]},q.round)),$!==null&&g.jsxs(tn,{"aria-label":"Questions du modèle",className:"studio-rise text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Le modèle a des questions"}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:["tournée ",$.round??x.length+1," sur ",Af]})]}),g.jsx("p",{className:"mt-1 text-text-muted",children:"Une réponse change la spec ; sans réponse, le modèle tranche et l'écrit dans les hypothèses."}),g.jsx("ol",{className:"mt-4 space-y-4",children:($.questions??[]).map((q,ae)=>g.jsx("li",{children:g.jsxs("fieldset",{children:[g.jsxs("legend",{className:"font-medium text-text",children:[ae+1,". ",q.text]}),g.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:q.options.map(ue=>g.jsxs("label",{className:`cursor-pointer rounded-md border px-3 py-1.5 transition-colors ${w[q.id]===ue?"border-accent bg-accent-soft text-text":"border-border text-text-muted hover:border-border-strong"}`,children:[g.jsx("input",{type:"radio",name:`question-${q.id}`,value:ue,checked:w[q.id]===ue,onChange:()=>j({...w,[q.id]:ue}),className:"sr-only"}),ue]},ue))}),g.jsx("input",{"aria-label":`Autre réponse — ${q.text}`,placeholder:"ou une réponse libre",value:q.options.includes(w[q.id]??"")?"":w[q.id]??"",onChange:ue=>j({...w,[q.id]:ue.target.value}),className:`${Tf} mt-2`})]})},q.id))}),g.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[g.jsx(ct,{voice:"primary",onClick:ye,disabled:T.isPending||Object.values(w).every(q=>q.trim()===""),children:"Répondre"}),g.jsx(ct,{voice:"ghost",onClick:pe,disabled:T.isPending,children:"Passer les questions"})]})]}),R&&L.data!==void 0&&g.jsx(_v,{job:L.data}),T.isPending&&b===null&&g.jsx(_v,{job:{jobId:"",stage:"drafting",attempt:1,elapsedMs:0,budgetMs:9e4}}),ie&&g.jsx("section",{role:"alert",className:"studio-rise rounded-lg border border-warning/40 bg-warning-soft p-4 text-sm text-text",children:"Le travail s'est perdu : l'instance a redémarré pendant le brief. Votre texte est conservé, renvoyez-le."}),!ie&&L.error!=null&&g.jsx(ft,{error:L.error}),L.data?.stage==="failed"&&L.data.error!==void 0&&g.jsx($o,{error:L.data.error}),T.error!=null&&g.jsx(ft,{error:T.error}),g.jsx(ct,{voice:"primary",type:"submit",disabled:J||$!==null||V<ro,children:x.length>0||$!==null?"Recommencer le brief":"Rédiger la spec"})]})}const EA=["development","staging","production"],gn={development:"Développement",staging:"Préproduction",production:"Production"},NA={staging:"development",production:"staging"},zA={success:"positive",failure:"danger",error:"danger",in_progress:"warning",pending:"warning",queued:"warning"},cr={deployed:"border-accent bg-accent shadow-[0_0_0_4px_var(--theme-accent-glow)]",forward:"border-accent bg-surface-sunken",backward:"border-orichalcum bg-surface-sunken",unreachable:"border-border bg-transparent"},TA="mt-2 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",AA=10,Cf=e=>e.slice(0,10);function RA({label:e}){return g.jsx("span",{role:"status","aria-label":e,className:"inline-flex items-center",children:g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"})})}function CA(){const e=di(),a=e.data?.host?.environments!==!1,[i,r]=ee.useState("staging"),[o,c]=ee.useState(null),[d,h]=ee.useState(""),[p,m]=ee.useState(null),b=OT(a,p),v=hv("development",a),x=hv(i,a),S=Md(),w=NT(),j=e.data?.role==="operator";if(!a)return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Hébergé",title:"Promotions",explanation:"La production ne reçoit que ce que la préproduction a reçu, au commit près."}),g.jsxs(tn,{"aria-label":"Environnements non configurés",className:"studio-reveal text-sm text-text-muted",style:{"--i":0},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Cet hôte ne déclare pas d'environnements"}),g.jsxs("p",{className:"mt-2",children:["Les promotions supposent les refs ",g.jsx("code",{className:"font-mono text-text",children:"env/staging"})," et ",g.jsx("code",{className:"font-mono text-text",children:"env/production"}),", déclarées dans le bloc"," ",g.jsx("code",{className:"font-mono text-text",children:"environments"})," de la configuration de l'hôte (runbook docs/HOSTED-STUDIO.md, § 6 ter). Sans elles, la fusion d'une spec met le développement à jour, et rien d'autre ne bouge."]})]})]});if(b.error)return g.jsx(ft,{error:b.error});if(b.isPending)return g.jsx("div",{"aria-label":"Chargement des environnements",className:"h-40 studio-breathe rounded-lg border border-border bg-surface-sunken/60"});const z=b.data,T=new Map,L=new Set;for(const C of S.data?.specs??[])L.add(C.id),"intent"in C&&C.intent!==""&&T.set(C.id,C.intent);const G=C=>C.specId!==null&&T.get(C.specId)||C.title,V=C=>C.specId!==null&&L.has(C.specId)?g.jsx(ls,{to:"/specs/$specId",params:{specId:C.specId},className:"font-mono text-xs text-accent underline-offset-4 hover:underline","aria-label":`Ouvrir la spec ${C.specId}`,children:C.specId}):null,W=v.data?.commits??[],$=C=>C===null?-1:W.findIndex(q=>q.sha===C),R=C=>z.environments.find(q=>q.name===C)?.sha??null,J=x.data?.commits??[],ie=J.findIndex(C=>C.reach==="deployed"),re=o===null?-1:J.findIndex(C=>C.sha===o),P=re===-1?null:J[re]??null,I=P?.reach==="forward",fe=P===null||ie===-1?J.slice(0,Math.max(re,0)):I?J.slice(re,ie):J.slice(ie,re),ye=P!==null&&i!=="development"&&(I||j&&d.trim().length>=AA)&&!w.isPending;function pe(C){r(C),c(null),h("")}function U(){if(P===null||i==="development")return;const C=i,q=P.sha;w.mutate(I?{environment:C,sha:q}:{environment:C,sha:q,rollback:!0,reason:d.trim()},{onSuccess:()=>{c(null),h(""),m({environment:C,sha:q}),x.refetch(),v.refetch()}})}return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Hébergé",title:"Promotions",explanation:"Trois environnements, une ligne de commits par environnement. Le commit déployé porte l'anneau ; cliquer un autre commit de la ligne le déploie. La production ne reçoit que ce que la préproduction a reçu, au commit près."}),w.error!=null&&g.jsx(ft,{error:w.error}),g.jsx("ol",{"aria-label":"Environnements",className:"grid gap-3 md:grid-cols-[1fr_auto_1fr_auto_1fr] md:items-stretch",children:z.environments.map((C,q)=>{const ae=C.name,ue=NA[ae],E=$(C.sha),Z=ue===void 0||E===-1?null:Math.max(0,E-Math.max($(R(ue)),0)),X=E===-1?null:W[E]??null,ne=p!==null&&p.environment===ae&&!(C.sha===p.sha&&C.deployment?.state==="success");return g.jsxs("li",{className:"contents",children:[q>0&&g.jsx("span",{"aria-hidden":"true",className:"hidden self-center font-display text-2xl text-text-faint md:block",children:"→"}),g.jsxs("button",{type:"button","aria-label":gn[ae],"aria-pressed":i===ae,onClick:()=>pe(ae),className:`studio-reveal flex flex-col rounded-lg border bg-surface-raised p-4 text-left shadow-raised transition-[transform,box-shadow,border-color] duration-(--duration-fast) hover:-translate-y-0.5 hover:shadow-overlay focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent ${i===ae?"border-accent shadow-glow":"border-border"}`,style:{"--i":q},children:[g.jsxs("div",{className:"flex w-full items-start justify-between gap-2",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:gn[ae]}),g.jsx("p",{className:"font-mono text-xs text-text-faint",children:C.ref})]}),ne?g.jsxs(qe,{tone:"accent",children:[g.jsx(RA,{label:`déploiement de ${gn[ae].toLowerCase()} en cours`})," déploiement"]}):ue===void 0?g.jsxs(qe,{tone:"accent",children:["tête de ",C.ref]}):Z===0?g.jsx(qe,{tone:"positive",children:"à jour"}):Z!==null?g.jsx(qe,{tone:"warning",children:"en retard"}):null]}),g.jsx("p",{className:"mt-3 font-display text-xl font-semibold leading-tight text-text text-balance",children:C.sha===null?"Aucun commit":X===null?"Commit hors de la ligne lue":G(X)}),g.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-x-2 font-mono text-xs text-text-faint",children:[g.jsx("span",{children:C.sha===null?"—":C.sha.slice(0,7)}),X!==null&&g.jsxs(g.Fragment,{children:[g.jsx("span",{children:"·"}),g.jsx("span",{children:X.author}),g.jsx("span",{children:"·"}),g.jsx("span",{children:Cf(X.authoredAt)})]}),X?.releaseTag!=null&&g.jsx(qe,{tone:"orichalcum",children:X.releaseTag})]}),C.deployment!==null&&g.jsxs("p",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[g.jsx(qe,{tone:zA[C.deployment.state??"pending"]??"neutral",children:C.deployment.state??"en attente"}),"déployé le ",Cf(C.deployment.createdAt)]}),g.jsxs("p",{className:"mt-auto flex items-baseline gap-2 pt-4",children:[g.jsx("span",{className:"font-mono text-2xl text-accent",children:ue===void 0?g.jsx(bn,{value:W.length}):Z===null?"—":g.jsx(bn,{value:Z})}),g.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:ue===void 0?"commits lus":`commit${Z!==null&&Z>1?"s":""} d'avance en ${gn[ue].toLowerCase()}`})]})]})]},ae)})}),g.jsxs(tn,{"aria-label":`Ligne de ${gn[i].toLowerCase()}`,className:"studio-reveal text-sm",style:{"--i":3},children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:gn[i]}),g.jsxs("span",{className:"font-mono text-xs text-text-muted",children:[x.data?.ref??""," · ",J.length," commits lus sur ",v.data?.ref??"la branche par défaut"]})]}),g.jsxs("p",{className:"mt-1 flex flex-wrap gap-4 text-xs text-text-faint",children:[g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${cr.deployed}`})," déployé"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${cr.forward}`})," promouvable"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${cr.backward}`})," retour arrière (opérateur)"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${cr.unreachable}`})," hors d'atteinte"]})]}),x.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:x.error})}),x.isPending&&g.jsx("div",{"aria-label":"Chargement de la ligne",className:"mt-4 h-24 studio-breathe rounded-md border border-border bg-surface-sunken/60"}),J.length>0&&g.jsx("ol",{"aria-label":"Commits de la ligne",className:"relative mt-4 space-y-1 before:absolute before:bottom-2 before:left-[0.8rem] before:top-2 before:w-0.5 before:bg-border",children:J.map((C,q)=>{const ae=C.reach==="unreachable"||C.reach==="deployed"||C.reach==="backward"&&!j||i==="development",ue=EA.filter(E=>R(E)===C.sha);return g.jsxs("li",{className:`studio-reveal grid grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-md border px-1 ${C.reach==="deployed"?"border-accent/35 bg-accent-soft":o===C.sha?"border-accent bg-surface-sunken":"border-transparent"}`,style:{"--i":q},children:[g.jsxs("button",{type:"button",disabled:ae,title:C.why,"aria-current":C.reach==="deployed",onClick:()=>c(o===C.sha?null:C.sha),className:`grid min-w-0 grid-cols-[1.6rem_minmax(0,1fr)] items-center gap-3 rounded-md px-1 py-2 text-left transition-[background,transform] duration-(--duration-fast) ${ae?"cursor-not-allowed opacity-55":"hover:translate-x-0.5 hover:bg-surface-sunken"}`,children:[g.jsx("i",{"aria-hidden":"true",className:`relative z-10 inline-block h-2.5 w-2.5 justify-self-center rounded-full border-2 ${cr[C.reach]}`}),g.jsxs("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[g.jsx("span",{className:"font-medium text-text",children:G(C)}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.sha.slice(0,7)}),g.jsxs("span",{className:"text-xs text-text-faint",children:[C.author," · ",Cf(C.authoredAt)]})]})]}),g.jsxs("span",{className:"flex items-center gap-1.5 pr-1",children:[V(C)??(C.specId!==null?g.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.specId}):null),ue.map(E=>g.jsx(qe,{tone:E===i?"accent":"neutral",children:gn[E].toLowerCase()},E)),C.releaseTag!==null&&g.jsx(qe,{tone:"orichalcum",children:C.releaseTag})]})]},C.sha)})}),P!==null&&i!=="development"&&g.jsxs("section",{"aria-label":I?"Promouvoir":"Retour arrière",className:"studio-rise mt-4 rounded-lg border border-accent/35 bg-surface p-4 shadow-overlay",children:[g.jsxs("h3",{className:"font-display text-lg font-semibold text-text",children:[I?"Promouvoir":"Revenir"," ",gn[i].toLowerCase()," ",I?"vers":"sur"," ",g.jsx("code",{className:"font-mono text-base",children:P.sha.slice(0,7)})]}),g.jsxs("p",{className:"mt-1 text-text-muted",children:[gn[i]," ",I?"recevrait":"perdrait"," ",g.jsx(bn,{value:fe.length,className:"font-medium text-text"})," commit",fe.length>1?"s":"",I?" :":" — un retour arrière s'enregistre avec son motif :"]}),g.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-text-muted marker:text-accent",children:fe.map(C=>g.jsxs("li",{children:[g.jsx("span",{className:"text-text",children:G(C)})," ",V(C)," ",g.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.sha.slice(0,7)})," — ",C.author]},C.sha))}),!I&&g.jsxs("label",{className:"block text-xs text-text-faint",children:["Motif du retour (dix caractères au moins, journalisé)",g.jsx("textarea",{"aria-label":"Motif du retour arrière",rows:2,value:d,onChange:C=>h(C.target.value),className:TA})]}),g.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[g.jsx(ct,{voice:I?"primary":"danger",size:"sm",disabled:!ye,onClick:U,children:w.isPending?"Promotion…":I?"Promouvoir":"Revenir, avec ce motif"}),g.jsx(ct,{voice:"ghost",size:"sm",onClick:()=>c(null),children:"Annuler"}),g.jsx("span",{className:"text-xs text-text-faint",children:P.why})]})]}),w.isSuccess&&p!==null&&g.jsxs("p",{role:"status",className:"studio-rise mt-4 rounded-md border border-positive/40 bg-positive-soft p-3 text-text",children:[gn[w.data.environment]," est à ",w.data.toSha.slice(0,7),w.data.releaseTag===null?"":` — release ${w.data.releaseTag}`,"."," ",MA(z,p)?"Le produit n'a pas encore rapporté le déploiement.":"Déployé."]})]}),g.jsxs(tn,{className:"studio-reveal",style:{"--i":4},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Releases"}),z.releases.length===0?g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Aucune mise en production étiquetée."}):g.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:z.releases.map(C=>g.jsx("li",{children:g.jsx(qe,{tone:"orichalcum",mono:!0,children:C})},C))})]})]})}function MA(e,a){const i=e.environments.find(r=>r.name===a.environment);return!(i!==void 0&&i.sha===a.sha&&i.deployment?.state==="success")}function DA(e){const a=[],i=new Date;for(let r=0;r<e;r+=1){const o=new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth()-r,1));a.push(o.toISOString().slice(0,7))}return a}const fr=e=>`${e.toFixed(2)} $`,jv=e=>new Intl.NumberFormat("fr-FR",{notation:"compact",maximumFractionDigits:1}).format(e),ga="px-3 py-2 text-right font-mono tabular-nums";function kA(){const e=DA(6),[a,i]=ee.useState(e[0]??""),r=zT(a);return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Hébergé",title:"Consommation",explanation:"Estimation à partir des jetons rapportés ; la facture vient de l'espace de travail du client.",actions:g.jsxs("label",{className:"text-sm text-text-muted",children:["Mois",g.jsx("select",{value:a,onChange:o=>i(o.target.value),className:"ml-2 rounded-md border border-border bg-surface-raised px-3 py-2 font-mono text-sm text-text",children:e.map(o=>g.jsx("option",{value:o,children:o},o))})]})}),r.error?g.jsx(ft,{error:r.error}):null,r.isPending?g.jsx("div",{"aria-label":"Chargement de la consommation",className:"h-40 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):null,r.data!==void 0&&g.jsxs(g.Fragment,{children:[g.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"appels",value:r.data.totals.runs,format:String},{label:"jetons entrés",value:r.data.totals.inputTokens,format:jv},{label:"jetons sortis",value:r.data.totals.outputTokens,format:jv},{label:"estimation",value:r.data.totals.estimatedUsd,format:fr}].map((o,c)=>g.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":c},children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:o.label}),g.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:g.jsx(bn,{value:o.value,format:o.format})})]},o.label))}),r.data.budgetUsd!==null&&g.jsxs("section",{"aria-label":"Plafond du mois",className:`rounded-lg border p-4 text-sm shadow-raised ${r.data.warning?"border-warning/50 bg-warning-soft text-text":"border-border bg-surface-raised text-text-muted"}`,children:[g.jsxs("p",{children:[fr(r.data.totals.estimatedUsd)," sur un plafond de ",fr(r.data.budgetUsd),r.data.budgetRatio!==null?` (${Math.round(r.data.budgetRatio*100)} %)`:""]}),g.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-surface-sunken",role:"presentation",children:g.jsx("div",{className:`h-full rounded-full transition-[width] duration-(--duration-slow) ease-swell ${r.data.warning?"bg-warning":"bg-accent"}`,style:{width:`${Math.min(100,Math.round((r.data.budgetRatio??0)*100))}%`}})}),r.data.warning&&g.jsx("p",{className:"mt-2 font-medium",children:"Plus de 80 % du plafond : au-delà, le modèle refusera jusqu'au mois prochain."})]}),r.data.specs.length===0?g.jsx(O0,{title:"Aucun appel de modèle ce mois-ci",hint:"Les briefs et les spéculations à venir apparaîtront ici, par spec."}):g.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-surface-raised shadow-raised",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-surface-sunken/60 text-left font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:g.jsxs("tr",{children:[g.jsx("th",{className:"px-3 py-2 font-normal",children:"Spec"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Runs"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Entrée"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Sortie"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Estimation"})]})}),g.jsxs("tbody",{children:[r.data.specs.map(o=>g.jsxs("tr",{className:"border-t border-border transition-colors hover:bg-surface-sunken/40",children:[g.jsxs("td",{className:"px-3 py-2 font-mono text-text",children:[o.specId," ",g.jsxs("span",{className:"text-xs text-text-faint",children:["#",o.pullRequestNumber]})]}),g.jsx("td",{className:ga,children:o.runs}),g.jsx("td",{className:ga,children:o.inputTokens}),g.jsx("td",{className:ga,children:o.outputTokens}),g.jsxs("td",{className:ga,children:[fr(o.estimatedUsd),o.uncostedModels.length>0&&g.jsxs("span",{className:"ml-1 font-sans text-xs text-text-faint",children:["(+ ",o.uncostedModels.join(", ")," sans coût connu)"]})]})]},o.specId)),g.jsxs("tr",{className:"border-t-2 border-border-strong font-semibold text-text",children:[g.jsx("td",{className:"px-3 py-2",children:"Total"}),g.jsx("td",{className:ga,children:r.data.totals.runs}),g.jsx("td",{className:ga,children:r.data.totals.inputTokens}),g.jsx("td",{className:ga,children:r.data.totals.outputTokens}),g.jsx("td",{className:ga,children:fr(r.data.totals.estimatedUsd)})]})]})]})})]})]})}const A0="ogygie-studio-theme";function LA(){try{const e=window.localStorage.getItem(A0);return e==="dark"||e==="light"?e:null}catch{return null}}const UA="dark";function ZA(){const[e,a]=ee.useState(()=>LA()??UA);ee.useEffect(()=>{document.documentElement.setAttribute("data-theme",e)},[e]);const i=ee.useCallback(()=>{a(r=>{const o=r==="dark"?"light":"dark";try{window.localStorage.setItem(A0,o)}catch{}return o})},[]);return{theme:e,toggle:i}}const qA="flex items-center gap-3 rounded-md px-3 py-2 text-sm text-text-muted transition-colors hover:bg-surface-sunken hover:text-text [&.active]:bg-accent-soft [&.active]:text-accent [&.active]:font-medium";function dr({to:e,glyph:a,children:i}){return g.jsxs(ls,{to:e,className:qA,activeOptions:{exact:e==="/"},children:[g.jsx("span",{"aria-hidden":"true",className:"w-4 text-center font-mono text-xs text-text-faint",children:a}),i]})}function BA(){const e=di(),{theme:a,toggle:i}=ZA();return g.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-surface-sunken/60 px-3 py-5",children:[g.jsxs(ls,{to:"/",className:"mb-6 flex items-center gap-3 px-3",children:[g.jsx(b0,{size:"md",className:"text-accent"}),g.jsxs("span",{className:"flex flex-col",children:[g.jsx("span",{className:"font-display text-2xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),g.jsx("span",{className:"mt-1 block font-mono text-xs uppercase tracking-[0.22em] text-accent",children:"Studio"})]})]}),g.jsxs("nav",{"aria-label":"Navigation du studio",className:"flex flex-col gap-1",children:[g.jsx(dr,{to:"/",glyph:"▦",children:"Board"}),g.jsx(dr,{to:"/manifest",glyph:"◫",children:"Manifeste"}),e.data!==void 0&&g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"mt-4 mb-1 px-3 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Hébergé"}),g.jsx(dr,{to:"/brief",glyph:"✎",children:"Brief"}),e.data.host?.environments!==!1&&g.jsx(dr,{to:"/promotions",glyph:"⇥",children:"Promotions"}),g.jsx(dr,{to:"/consumption",glyph:"◔",children:"Consommation"})]})]}),g.jsxs("div",{className:"mt-auto space-y-3 px-3 pt-6",children:[e.data!==void 0&&g.jsxs("div",{className:"rounded-md border border-border bg-surface-raised px-3 py-2 text-xs",children:[g.jsx("p",{className:"truncate font-medium text-text",children:e.data.displayName}),g.jsx("p",{className:"font-mono text-text-faint",children:e.data.role})]}),g.jsxs("button",{type:"button",onClick:i,"aria-label":a==="dark"?"Passer au thème clair":"Passer au thème sombre",className:"flex w-full items-center justify-between rounded-md border border-border px-3 py-2 text-xs text-text-muted transition-colors hover:border-border-strong hover:text-text",children:[g.jsx("span",{children:a==="dark"?"Abysse":"Marbre"}),g.jsx("span",{"aria-hidden":"true",className:"font-mono",children:a==="dark"?"☾":"☀"})]})]})]})}function $A(){const e=di(),a=Hw(),i=Er(),r=e.error instanceof Nr&&e.error.payload.code==="HOST_UNAUTHENTICATED";return ee.useEffect(()=>{r&&a.pathname!=="/login"&&i({to:"/login"})},[r,a.pathname,i]),g.jsxs("div",{className:"flex min-h-screen bg-surface text-text",children:[g.jsx(BA,{}),g.jsx("main",{className:"min-w-0 flex-1",children:g.jsx("div",{className:"studio-rise mx-auto max-w-6xl px-8 py-8",children:g.jsx(vb,{})})})]})}const Aa=Tw({component:$A}),HA=os({getParentRoute:()=>Aa,path:"/",component:BT}),R0=os({getParentRoute:()=>Aa,path:"/specs/$specId",component:function(){const{specId:a}=R0.useParams();return g.jsx(oA,{specId:a})}}),QA=os({getParentRoute:()=>Aa,path:"/manifest",component:dA}),GA=os({getParentRoute:()=>Aa,path:"/login",component:yA}),KA=os({getParentRoute:()=>Aa,path:"/brief",component:OA}),YA=os({getParentRoute:()=>Aa,path:"/promotions",component:CA}),FA=os({getParentRoute:()=>Aa,path:"/consumption",component:kA}),VA=Aa.addChildren([HA,R0,QA,GA,KA,YA,FA]);function PA(e){return Zw({routeTree:VA})}const XA=new Z_,JA=PA(),C0=document.getElementById("root");if(C0===null)throw new Error("Studio UI: #root element missing from index.html");f_.createRoot(C0).render(g.jsx(ee.StrictMode,{children:g.jsx(d_,{client:XA,children:g.jsx($w,{router:JA})})}));