PageSourceSearch

https://zdravi-bez-leku.macaly.app/assets/index-CdBje7Uw.js

js zdravi-bez-leku.macaly.app collected 2026-10-03 04:59:17 UTC 531,547 bytes, 234 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chat-BjwuQsu2.js","assets/DiscountConfirmationBanner-BR6SyPqF.js","assets/index-g_kMCqhT.js"])))=>i.map(i=>d[i]);
2var U7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function c2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function B7(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var r=function o(){var l=!1;try{l=this instanceof o}catch{}return l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,l.get?l:{enumerable:!0,get:function(){return e[o]}})}),r}var _f={exports:{}},vo={};var Hg;function f2(){if(Hg)return vo;Hg=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,l,u){var f=null;if(u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),"key"in l){u={};for(var h in l)h!=="key"&&(u[h]=l[h])}else u=l;return l=u.ref,{$$typeof:e,type:o,key:f,ref:l!==void 0?l:null,props:u}}return vo.Fragment=n,vo.jsx=r,vo.jsxs=r,vo}var Pg;
vendor: 16,550 bytes, line 2
2function d2(){return Pg||(Pg=1,_f.exports=f2()),_f.exports}var X=d2(),Ef={exports:{}},me={};var $g;function h2(){if($g)return me;$g=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),w=Symbol.iterator;function b(E){return E===null||typeof E!="object"?null:(E=w&&E[w]||E["@@iterator"],typeof E=="function"?E:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,R={};function z(E,L,Q){this.props=E,this.context=L,this.refs=R,this.updater=Q||C}z.prototype.isReactComponent={},z.prototype.setState=function(E,L){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,L,"setState")},z.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function H(){}H.prototype=z.prototype;function $(E,L,Q){this.props=E,this.context=L,this.refs=R,this.updater=Q||C}var B=$.prototype=new H;B.constructor=$,O(B,z.prototype),B.isPureReactComponent=!0;var W=Array.isArray;function te(){}var V={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function ne(E,L,Q){var ee=Q.ref;return{$$typeof:e,type:E,key:L,ref:ee!==void 0?ee:null,props:Q}}function fe(E,L){return ne(E.type,L,E.props)}function se(E){return typeof E=="object"&&E!==null&&E.$$typeof===e}function le(E){var L={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(Q){return L[Q]})}var $e=/\/+/g;function xe(E,L){return typeof E=="object"&&E!==null&&E.key!=null?le(""+E.key):L.toString(36)}function ue(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(te,te):(E.status="pending",E.then(function(L){E.status==="pending"&&(E.status="fulfilled",E.value=L)},function(L){E.status==="pending"&&(E.status="rejected",E.reason=L)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function U(E,L,Q,ee,J){var ae=typeof E;(ae==="undefined"||ae==="boolean")&&(E=null);var ve=!1;if(E===null)ve=!0;else switch(ae){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(E.$$typeof){case e:case n:ve=!0;break;case v:return ve=E._init,U(ve(E._payload),L,Q,ee,J)}}if(ve)return J=J(E),ve=ee===""?"."+xe(E,0):ee,W(J)?(Q="",ve!=null&&(Q=ve.replace($e,"$&/")+"/"),U(J,L,Q,"",function(An){return An})):J!=null&&(se(J)&&(J=fe(J,Q+(J.key==null||E&&E.key===J.key?"":(""+J.key).replace($e,"$&/")+"/")+ve)),L.push(J)),1;ve=0;var je=ee===""?".":ee+":";if(W(E))for(var De=0;De<E.length;De++)ee=E[De],ae=je+xe(ee,De),ve+=U(ee,L,Q,ae,J);else if(De=b(E),typeof De=="function")for(E=De.call(E),De=0;!(ee=E.next()).done;)ee=ee.value,ae=je+xe(ee,De++),ve+=U(ee,L,Q,ae,J);else if(ae==="object"){if(typeof E.then=="function")return U(ue(E),L,Q,ee,J);throw L=String(E),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ve}function Z(E,L,Q){if(E==null)return E;var ee=[],J=0;return U(E,ee,"","",function(ae){return L.call(Q,ae,J++)}),ee}function re(E){if(E._status===-1){var L=E._result;L=L(),L.then(function(Q){(E._status===0||E._status===-1)&&(E._status=1,E._result=Q)},function(Q){(E._status===0||E._status===-1)&&(E._status=2,E._result=Q)}),E._status===-1&&(E._status=0,E._result=L)}if(E._status===1)return E._result.default;throw E._result}var he=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},x={map:Z,forEach:function(E,L,Q){Z(E,function(){L.apply(this,arguments)},Q)},count:function(E){var L=0;return Z(E,function(){L++}),L},toArray:function(E){return Z(E,function(L){return L})||[]},only:function(E){if(!se(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return me.Activity=y,me.Children=x,me.Component=z,me.Fragment=r,me.Profiler=l,me.PureComponent=$,me.StrictMode=o,me.Suspense=p,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,me.__COMPILER_RUNTIME={__proto__:null,c:function(E){return V.H.useMemoCache(E)}},me.cache=function(E){return function(){return E.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(E,L,Q){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ee=O({},E.props),J=E.key;if(L!=null)for(ae in L.key!==void 0&&(J=""+L.key),L)!F.call(L,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&L.ref===void 0||(ee[ae]=L[ae]);var ae=arguments.length-2;if(ae===1)ee.children=Q;else if(1<ae){for(var ve=Array(ae),je=0;je<ae;je++)ve[je]=arguments[je+2];ee.children=ve}return ne(E.type,J,ee)},me.createContext=function(E){return E={$$typeof:f,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:u,_context:E},E},me.createElement=function(E,L,Q){var ee,J={},ae=null;if(L!=null)for(ee in L.key!==void 0&&(ae=""+L.key),L)F.call(L,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(J[ee]=L[ee]);var ve=arguments.length-2;if(ve===1)J.children=Q;else if(1<ve){for(var je=Array(ve),De=0;De<ve;De++)je[De]=arguments[De+2];J.children=je}if(E&&E.defaultProps)for(ee in ve=E.defaultProps,ve)J[ee]===void 0&&(J[ee]=ve[ee]);return ne(E,ae,J)},me.createRef=function(){return{current:null}},me.forwardRef=function(E){return{$$typeof:h,render:E}},me.isValidElement=se,me.lazy=function(E){return{$$typeof:v,_payload:{_status:-1,_result:E},_init:re}},me.memo=function(E,L){return{$$typeof:m,type:E,compare:L===void 0?null:L}},me.startTransition=function(E){var L=V.T,Q={};V.T=Q;try{var ee=E(),J=V.S;J!==null&&J(Q,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(te,he)}catch(ae){he(ae)}finally{L!==null&&Q.types!==null&&(L.types=Q.types),V.T=L}},me.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},me.use=function(E){return V.H.use(E)},me.useActionState=function(E,L,Q){return V.H.useActionState(E,L,Q)},me.useCallback=function(E,L){return V.H.useCallback(E,L)},me.useContext=function(E){return V.H.useContext(E)},me.useDebugValue=function(){},me.useDeferredValue=function(E,L){return V.H.useDeferredValue(E,L)},me.useEffect=function(E,L){return V.H.useEffect(E,L)},me.useEffectEvent=function(E){return V.H.useEffectEvent(E)},me.useId=function(){return V.H.useId()},me.useImperativeHandle=function(E,L,Q){return V.H.useImperativeHandle(E,L,Q)},me.useInsertionEffect=function(E,L){return V.H.useInsertionEffect(E,L)},me.useLayoutEffect=function(E,L){return V.H.useLayoutEffect(E,L)},me.useMemo=function(E,L){return V.H.useMemo(E,L)},me.useOptimistic=function(E,L){return V.H.useOptimistic(E,L)},me.useReducer=function(E,L,Q){return V.H.useReducer(E,L,Q)},me.useRef=function(E){return V.H.useRef(E)},me.useState=function(E){return V.H.useState(E)},me.useSyncExternalStore=function(E,L,Q){return V.H.useSyncExternalStore(E,L,Q)},me.useTransition=function(){return V.H.useTransition()},me.version="19.2.4",me}var Vg;function Go(){return Vg||(Vg=1,Ef.exports=h2()),Ef.exports}var P=Go();const Xt=c2(P);var Cf={exports:{}},bo={},Tf={exports:{}},Rf={};var Zg;function p2(){return Zg||(Zg=1,(function(e){function n(U,Z){var re=U.length;U.push(Z);e:for(;0<re;){var he=re-1>>>1,x=U[he];if(0<l(x,Z))U[he]=Z,U[re]=x,re=he;else break e}}function r(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var Z=U[0],re=U.pop();if(re!==Z){U[0]=re;e:for(var he=0,x=U.length,E=x>>>1;he<E;){var L=2*(he+1)-1,Q=U[L],ee=L+1,J=U[ee];if(0>l(Q,re))ee<x&&0>l(J,Q)?(U[he]=J,U[ee]=re,he=ee):(U[he]=Q,U[L]=re,he=L);else if(ee<x&&0>l(J,re))U[he]=J,U[ee]=re,he=ee;else break e}}return Z}function l(U,Z){var re=U.sortIndex-Z.sortIndex;return re!==0?re:U.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();e.unstable_now=function(){return f.now()-h}}var p=[],m=[],v=1,y=null,w=3,b=!1,C=!1,O=!1,R=!1,z=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function B(U){for(var Z=r(m);Z!==null;){if(Z.callback===null)o(m);else if(Z.startTime<=U)o(m),Z.sortIndex=Z.expirationTime,n(p,Z);else break;Z=r(m)}}function W(U){if(O=!1,B(U),!C)if(r(p)!==null)C=!0,te||(te=!0,le());else{var Z=r(m);Z!==null&&ue(W,Z.startTime-U)}}var te=!1,V=-1,F=5,ne=-1;function fe(){return R?!0:!(e.unstable_now()-ne<F)}function se(){if(R=!1,te){var U=e.unstable_now();ne=U;var Z=!0;try{e:{C=!1,O&&(O=!1,H(V),V=-1),b=!0;var re=w;try{t:{for(B(U),y=r(p);y!==null&&!(y.expirationTime>U&&fe());){var he=y.callback;if(typeof he=="function"){y.callback=null,w=y.priorityLevel;var x=he(y.expirationTime<=U);if(U=e.unstable_now(),typeof x=="function"){y.callback=x,B(U),Z=!0;break t}y===r(p)&&o(p),B(U)}else o(p);y=r(p)}if(y!==null)Z=!0;else{var E=r(m);E!==null&&ue(W,E.startTime-U),Z=!1}}break e}finally{y=null,w=re,b=!1}Z=void 0}}finally{Z?le():te=!1}}}var le;if(typeof $=="function")le=function(){$(se)};else if(typeof MessageChannel<"u"){var $e=new MessageChannel,xe=$e.port2;$e.port1.onmessage=se,le=function(){xe.postMessage(null)}}else le=function(){z(se,0)};function ue(U,Z){V=z(function(){U(e.unstable_now())},Z)}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"):F=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(U){switch(w){case 1:case 2:case 3:var Z=3;break;default:Z=w}var re=w;w=Z;try{return U()}finally{w=re}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var re=w;w=U;try{return Z()}finally{w=re}},e.unstable_scheduleCallback=function(U,Z,re){var he=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?he+re:he):re=he,U){case 1:var x=-1;break;case 2:x=250;break;case 5:x=1073741823;break;case 4:x=1e4;break;default:x=5e3}return x=re+x,U={id:v++,callback:Z,priorityLevel:U,startTime:re,expirationTime:x,sortIndex:-1},re>he?(U.sortIndex=re,n(m,U),r(p)===null&&U===r(m)&&(O?(H(V),V=-1):O=!0,ue(W,re-he))):(U.sortIndex=x,n(p,U),C||b||(C=!0,te||(te=!0,le()))),U},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(U){var Z=w;return function(){var re=w;w=Z;try{return U.apply(this,arguments)}finally{w=re}}}})(Rf)),Rf}var Ig;function m2(){return Ig||(Ig=1,Tf.exports=p2()),Tf.exports}var Af={exports:{}},_t={};var Qg;function g2(){if(Qg)return _t;Qg=1;var e=Go();function n(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}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 r(){}var o={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,m,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:p,containerInfo:m,implementation:v}}var f=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 _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,_t.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(n(299));return u(p,m,null,v)},_t.flushSync=function(p){var m=f.T,v=o.p;try{if(f.T=null,o.p=2,p)return p()}finally{f.T=m,o.p=v,o.d.f()}},_t.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(p,m))},_t.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},_t.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,y=h(v,m.crossOrigin),w=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?o.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:w,fetchPriority:b}):v==="script"&&o.d.X(p,{crossOrigin:y,integrity:w,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},_t.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=h(m.as,m.crossOrigin);o.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(p)},_t.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,y=h(v,m.crossOrigin);o.d.L(p,v,{crossOrigin:y,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})}},_t.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=h(m.as,m.crossOrigin);o.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(p)},_t.requestFormReset=function(p){o.d.r(p)},_t.unstable_batchedUpdates=function(p,m){return p(m)},_t.useFormState=function(p,m,v){return f.H.useFormState(p,m,v)},_t.useFormStatus=function(){return f.H.useHostTransitionStatus()},_t.version="19.2.4",_t}var Gg;function x1(){if(Gg)return Af.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(n){console.error(n)}}return e(),Af.exports=g2(),Af.exports}var Yg;function y2(){if(Yg)return bo;Yg=1;var e=m2(),n=Go(),r=x1();function o(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)a+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var a=t,i=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(i=a.return),t=a.return;while(t)}return a.tag===3?i:null}function f(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function h(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(o(188))}function m(t){var a=t.alternate;if(!a){if(a=u(t),a===null)throw Error(o(188));return a!==t?null:t}for(var i=t,s=a;;){var c=i.return;if(c===null)break;var d=c.alternate;if(d===null){if(s=c.return,s!==null){i=s;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===i)return p(c),t;
vendor: 10,112 bytes, lines 2-9
2if(d===s)return p(c),a;d=d.sibling}throw Error(o(188))}if(i.return!==s.return)i=c,s=d;else{for(var g=!1,S=c.child;S;){if(S===i){g=!0,i=c,s=d;break}if(S===s){g=!0,s=c,i=d;break}S=S.sibling}if(!g){for(S=d.child;S;){if(S===i){g=!0,i=d,s=c;break}if(S===s){g=!0,s=d,i=c;break}S=S.sibling}if(!g)throw Error(o(189))}}if(i.alternate!==s)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:a}function v(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=v(t),a!==null)return a;t=t.sibling}return null}var y=Object.assign,w=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),$=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function le(t){return t===null||typeof t!="object"?null:(t=se&&t[se]||t["@@iterator"],typeof t=="function"?t:null)}var $e=Symbol.for("react.client.reference");function xe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===$e?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case z:return"Profiler";case R:return"StrictMode";case W:return"Suspense";case te:return"SuspenseList";case ne:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case C:return"Portal";case $:return t.displayName||"Context";case H:return(t._context.displayName||"Context")+".Consumer";case B:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return a=t.displayName||null,a!==null?a:xe(t.type)||"Memo";case F:a=t._payload,t=t._init;try{return xe(t(a))}catch{}}return null}var ue=Array.isArray,U=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},he=[],x=-1;function E(t){return{current:t}}function L(t){0>x||(t.current=he[x],he[x]=null,x--)}function Q(t,a){x++,he[x]=t.current,t.current=a}var ee=E(null),J=E(null),ae=E(null),ve=E(null);function je(t,a){switch(Q(ae,a),Q(J,t),Q(ee,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?ug(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=ug(a),t=cg(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}L(ee),Q(ee,t)}function De(){L(ee),L(J),L(ae)}function An(t){t.memoizedState!==null&&Q(ve,t);var a=ee.current,i=cg(a,t.type);a!==i&&(Q(J,t),Q(ee,i))}function xn(t){J.current===t&&(L(ee),L(J)),ve.current===t&&(L(ve),po._currentValue=re)}var ta,_i;function mn(t){if(ta===void 0)try{throw Error()}catch(i){var a=i.stack.trim().match(/\n( *(at )?)/);ta=a&&a[1]||"",_i=-1<i.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+ta+t+_i}var Ei=!1;function wr(t,a){if(!t||Ei)return"";Ei=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(a){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(q){var j=q}Reflect.construct(t,[],Y)}else{try{Y.call()}catch(q){j=q}t.call(Y.prototype)}}else{try{throw Error()}catch(q){j=q}(Y=t())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(q){if(q&&j&&typeof q.stack=="string")return[q.stack,j.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),g=d[0],S=d[1];if(g&&S){var A=g.split(`
5`),D=S.split(`
6`);for(c=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;if(s===A.length||c===D.length)for(s=A.length-1,c=D.length-1;1<=s&&0<=c&&A[s]!==D[c];)c--;for(;1<=s&&0<=c;s--,c--)if(A[s]!==D[c]){if(s!==1||c!==1)do if(s--,c--,0>c||A[s]!==D[c]){var I=`
7`+A[s].replace(" at new "," at ");return t.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",t.displayName)),I}while(1<=s&&0<=c);break}}}finally{Ei=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?mn(i):""}function Ko(t,a){switch(t.tag){case 26:case 27:case 5:return mn(t.type);case 16:return mn("Lazy");case 13:return t.child!==a&&a!==null?mn("Suspense Fallback"):mn("Suspense");case 19:return mn("SuspenseList");case 0:case 15:return wr(t.type,!1);case 11:return wr(t.type.render,!1);case 1:return wr(t.type,!0);case 31:return mn("Activity");default:return""}}function On(t){try{var a="",i=null;do a+=Ko(t,i),i=t,t=t.return;while(t);return a}catch(s){return`
8Error generating stack: `+s.message+`
9`+s.stack}}var qa=Object.prototype.hasOwnProperty,cn=e.unstable_scheduleCallback,Ci=e.unstable_cancelCallback,Fo=e.unstable_shouldYield,lu=e.unstable_requestPaint,wt=e.unstable_now,qe=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,gn=e.unstable_UserBlockingPriority,_r=e.unstable_NormalPriority,I0=e.unstable_LowPriority,Vd=e.unstable_IdlePriority,Q0=e.log,G0=e.unstable_setDisableYieldValue,Ti=null,qt=null;function na(t){if(typeof Q0=="function"&&G0(t),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(Ti,t)}catch{}}var Ht=Math.clz32?Math.clz32:K0,Y0=Math.log,X0=Math.LN2;function K0(t){return t>>>=0,t===0?32:31-(Y0(t)/X0|0)|0}var Jo=256,Wo=262144,es=4194304;function Ha(t){var a=t&42;if(a!==0)return a;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 ts(t,a,i){var s=t.pendingLanes;if(s===0)return 0;var c=0,d=t.suspendedLanes,g=t.pingedLanes;t=t.warmLanes;var S=s&134217727;return S!==0?(s=S&~d,s!==0?c=Ha(s):(g&=S,g!==0?c=Ha(g):i||(i=S&~t,i!==0&&(c=Ha(i))))):(S=s&~d,S!==0?c=Ha(S):g!==0?c=Ha(g):i||(i=s&~t,i!==0&&(c=Ha(i)))),c===0?0:a!==0&&a!==c&&(a&d)===0&&(d=c&-c,i=a&-a,d>=i||d===32&&(i&4194048)!==0)?a:c}function Ri(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function F0(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zd(){var t=es;return es<<=1,(es&62914560)===0&&(es=4194304),t}function uu(t){for(var a=[],i=0;31>i;i++)a.push(t);return a}function Ai(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function J0(t,a,i,s,c,d){var g=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var S=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(i=g&~i;0<i;){var I=31-Ht(i),Y=1<<I;S[I]=0,A[I]=-1;var j=D[I];if(j!==null)for(D[I]=null,I=0;I<j.length;I++){var q=j[I];q!==null&&(q.lane&=-536870913)}i&=~Y}s!==0&&Id(t,s,0),d!==0&&c===0&&t.tag!==0&&(t.suspendedLanes|=d&~(g&~a))}function Id(t,a,i){t.pendingLanes|=a,t.suspendedLanes&=~a;var s=31-Ht(a);t.entangledLanes|=a,t.entanglements[s]=t.entanglements[s]|1073741824|i&261930}function Qd(t,a){var i=t.entangledLanes|=a;for(t=t.entanglements;i;){var s=31-Ht(i),c=1<<s;c&a|t[s]&a&&(t[s]|=a),i&=~c}}function Gd(t,a){var i=a&-a;return i=(i&42)!==0?1:cu(i),(i&(t.suspendedLanes|a))!==0?0:i}function cu(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 fu(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Yd(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:Lg(t.type))}function Xd(t,a){var i=Z.p;try{return Z.p=t,a()}finally{Z.p=i}}var aa=Math.random().toString(36).slice(2),pt="__reactFiber$"+aa,Rt="__reactProps$"+aa,Er="__reactContainer$"+aa,du="__reactEvents$"+aa,W0="__reactListeners$"+aa,eb="__reactHandles$"+aa,Kd="__reactResources$"+aa,xi="__reactMarker$"+aa;function hu(t){delete t[pt],delete t[Rt],delete t[du],delete t[W0],delete t[eb]}function Cr(t){var a=t[pt];if(a)return a;for(var i=t.parentNode;i;){if(a=i[Er]||i[pt]){if(i=a.alternate,a.child!==null||i!==null&&i.child!==null)for(t=yg(t);t!==null;){if(i=t[pt])return i;t=yg(t)}return a}t=i,i=t.parentNode}return null}function Tr(t){if(t=t[pt]||t[Er]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function Oi(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(o(33))}function Rr(t){var a=t[Kd];return a||(a=t[Kd]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function ct(t){t[xi]=!0}var Fd=new Set,Jd={};function Pa(t,a){Ar(t,a),Ar(t+"Capture",a)}function Ar(t,a){for(Jd[t]=a,t=0;t<a.length;t++)Fd.add(a[t])}var tb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
9037D\\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]*$"),Wd={},eh={};function nb(t){return qa.call(eh,t)?!0:qa.call(Wd,t)?!1:tb.test(t)?eh[t]=!0:(Wd[t]=!0,!1)}function ns(t,a,i){if(nb(a))if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var s=a.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+i)}}function as(t,a,i){if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+i)}}function Mn(t,a,i,s){if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(a,i,""+s)}}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 th(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function ab(t,a,i){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,d=s.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return c.call(this)},set:function(g){i=""+g,d.call(this,g)}}),Object.defineProperty(t,a,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function pu(t){if(!t._valueTracker){var a=th(t)?"checked":"value";t._valueTracker=ab(t,a,""+t[a])}}function nh(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var i=a.getValue(),s="";return t&&(s=th(t)?t.checked?"true":"false":t.value),t=s,t!==i?(a.setValue(t),!0):!1}function rs(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 rb=/[\n"\\]/g;function Ft(t){return t.replace(rb,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function mu(t,a,i,s,c,d,g,S){t.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.type=g:t.removeAttribute("type"),a!=null?g==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+Kt(a)):t.value!==""+Kt(a)&&(t.value=""+Kt(a)):g!=="submit"&&g!=="reset"||t.removeAttribute("value"),a!=null?gu(t,g,Kt(a)):i!=null?gu(t,g,Kt(i)):s!=null&&t.removeAttribute("value"),c==null&&d!=null&&(t.defaultChecked=!!d),c!=null&&(t.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+Kt(S):t.removeAttribute("name")}function ah(t,a,i,s,c,d,g,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.type=d),a!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||a!=null)){pu(t);return}i=i!=null?""+Kt(i):"",a=a!=null?""+Kt(a):i,S||a===t.value||(t.value=a),t.defaultValue=a}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=S?t.checked:!!s,t.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.name=g),pu(t)}function gu(t,a,i){a==="number"&&rs(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function xr(t,a,i,s){if(t=t.options,a){a={};for(var c=0;c<i.length;c++)a["$"+i[c]]=!0;for(i=0;i<t.length;i++)c=a.hasOwnProperty("$"+t[i].value),t[i].selected!==c&&(t[i].selected=c),c&&s&&(t[i].defaultSelected=!0)}else{for(i=""+Kt(i),a=null,c=0;c<t.length;c++){if(t[c].value===i){t[c].selected=!0,s&&(t[c].defaultSelected=!0);return}a!==null||t[c].disabled||(a=t[c])}a!==null&&(a.selected=!0)}}function rh(t,a,i){if(a!=null&&(a=""+Kt(a),a!==t.value&&(t.value=a),i==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=i!=null?""+Kt(i):""}function ih(t,a,i,s){if(a==null){if(s!=null){if(i!=null)throw Error(o(92));
vendor: 4,340 bytes, line 9
9if(ue(s)){if(1<s.length)throw Error(o(93));s=s[0]}i=s}i==null&&(i=""),a=i}i=Kt(a),t.defaultValue=i,s=t.textContent,s===i&&s!==""&&s!==null&&(t.value=s),pu(t)}function Or(t,a){if(a){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=a;return}}t.textContent=a}var ib=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 oh(t,a,i){var s=a.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":s?t.setProperty(a,i):typeof i!="number"||i===0||ib.has(a)?a==="float"?t.cssFloat=i:t[a]=(""+i).trim():t[a]=i+"px"}function sh(t,a,i){if(a!=null&&typeof a!="object")throw Error(o(62));if(t=t.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||a!=null&&a.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var c in a)s=a[c],a.hasOwnProperty(c)&&i[c]!==s&&oh(t,c,s)}else for(var d in a)a.hasOwnProperty(d)&&oh(t,d,a[d])}function yu(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 ob=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
9-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"]]),sb=/^[\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 is(t){return sb.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function zn(){}var vu=null;function bu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Mr=null,zr=null;function lh(t){var a=Tr(t);if(a&&(t=a.stateNode)){var i=t[Rt]||null;e:switch(t=a.stateNode,a.type){case"input":if(mu(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),a=i.name,i.type==="radio"&&a!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ft(""+a)+'"][type="radio"]'),a=0;a<i.length;a++){var s=i[a];if(s!==t&&s.form===t.form){var c=s[Rt]||null;if(!c)throw Error(o(90));mu(s,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(a=0;a<i.length;a++)s=i[a],s.form===t.form&&nh(s)}break e;case"textarea":rh(t,i.value,i.defaultValue);break e;case"select":a=i.value,a!=null&&xr(t,!!i.multiple,a,!1)}}}var Su=!1;function uh(t,a,i){if(Su)return t(a,i);Su=!0;try{var s=t(a);return s}finally{if(Su=!1,(Mr!==null||zr!==null)&&(Qs(),Mr&&(a=Mr,t=zr,zr=Mr=null,lh(a),t)))for(a=0;a<t.length;a++)lh(t[a])}}function Mi(t,a){var i=t.stateNode;if(i===null)return null;var s=i[Rt]||null;if(s===null)return null;i=s[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,a,typeof i));return i}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wu=!1;if(kn)try{var zi={};Object.defineProperty(zi,"passive",{get:function(){wu=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{wu=!1}var ra=null,_u=null,os=null;function ch(){if(os)return os;var t,a=_u,i=a.length,s,c="value"in ra?ra.value:ra.textContent,d=c.length;for(t=0;t<i&&a[t]===c[t];t++);var g=i-t;for(s=1;s<=g&&a[i-s]===c[d-s];s++);return os=c.slice(t,1<s?1-s:void 0)}function ss(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function ls(){return!0}function fh(){return!1}function At(t){function a(i,s,c,d,g){this._reactName=i,this._targetInst=c,this.type=s,this.nativeEvent=d,this.target=g,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(i=t[S],this[S]=i?i(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?ls:fh,this.isPropagationStopped=fh,this}return y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ls)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),a}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},us=At($a),ki=y({},$a,{view:0,detail:0}),lb=At(ki),Eu,Cu,Li,cs=y({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ru,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!==Li&&(Li&&t.type==="mousemove"?(Eu=t.screenX-Li.screenX,Cu=t.screenY-Li.screenY):Cu=Eu=0,Li=t),Eu)},movementY:function(t){return"movementY"in t?t.movementY:Cu}}),dh=At(cs),ub=y({},cs,{dataTransfer:0}),cb=At(ub),fb=y({},ki,{relatedTarget:0}),Tu=At(fb),db=y({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),hb=At(db),pb=y({},$a,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),mb=At(pb),gb=y({},$a,{data:0}),hh=At(gb),yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vb={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"},bb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sb(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=bb[t])?!!a[t]:!1}function Ru(){return Sb}var wb=y({},ki,{key:function(t){if(t.key){var a=yb[t.key]||t.key;if(a!=="Unidentified")return a}
vendor: 5,186 bytes, line 9
9return t.type==="keypress"?(t=ss(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?vb[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ru,charCode:function(t){return t.type==="keypress"?ss(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ss(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),_b=At(wb),Eb=y({},cs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ph=At(Eb),Cb=y({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ru}),Tb=At(Cb),Rb=y({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ab=At(Rb),xb=y({},cs,{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}),Ob=At(xb),Mb=y({},$a,{newState:0,oldState:0}),zb=At(Mb),kb=[9,13,27,32],Au=kn&&"CompositionEvent"in window,Ni=null;kn&&"documentMode"in document&&(Ni=document.documentMode);var Lb=kn&&"TextEvent"in window&&!Ni,mh=kn&&(!Au||Ni&&8<Ni&&11>=Ni),gh=" ",yh=!1;function vh(t,a){switch(t){case"keyup":return kb.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var kr=!1;function Nb(t,a){switch(t){case"compositionend":return bh(a);case"keypress":return a.which!==32?null:(yh=!0,gh);case"textInput":return t=a.data,t===gh&&yh?null:t;default:return null}}function Db(t,a){if(kr)return t==="compositionend"||!Au&&vh(t,a)?(t=ch(),os=_u=ra=null,kr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return mh&&a.locale!=="ko"?null:a.data;default:return null}}var Ub={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 Sh(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!Ub[t.type]:a==="textarea"}function wh(t,a,i,s){Mr?zr?zr.push(s):zr=[s]:Mr=s,a=Ws(a,"onChange"),0<a.length&&(i=new us("onChange","change",null,i,s),t.push({event:i,listeners:a}))}var Di=null,Ui=null;function Bb(t){ag(t,0)}function fs(t){var a=Oi(t);if(nh(a))return t}function _h(t,a){if(t==="change")return a}var Eh=!1;if(kn){var xu;if(kn){var Ou="oninput"in document;if(!Ou){var Ch=document.createElement("div");Ch.setAttribute("oninput","return;"),Ou=typeof Ch.oninput=="function"}xu=Ou}else xu=!1;Eh=xu&&(!document.documentMode||9<document.documentMode)}function Th(){Di&&(Di.detachEvent("onpropertychange",Rh),Ui=Di=null)}function Rh(t){if(t.propertyName==="value"&&fs(Ui)){var a=[];wh(a,Ui,t,bu(t)),uh(Bb,a)}}function jb(t,a,i){t==="focusin"?(Th(),Di=a,Ui=i,Di.attachEvent("onpropertychange",Rh)):t==="focusout"&&Th()}function qb(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return fs(Ui)}function Hb(t,a){if(t==="click")return fs(a)}function Pb(t,a){if(t==="input"||t==="change")return fs(a)}function $b(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var Pt=typeof Object.is=="function"?Object.is:$b;function Bi(t,a){if(Pt(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var i=Object.keys(t),s=Object.keys(a);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var c=i[s];if(!qa.call(a,c)||!Pt(t[c],a[c]))return!1}return!0}function Ah(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function xh(t,a){var i=Ah(t);t=0;for(var s;i;){if(i.nodeType===3){if(s=t+i.textContent.length,t<=a&&s>=a)return{node:i,offset:a-t};t=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ah(i)}}function Oh(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Oh(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Mh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=rs(t.document);a instanceof t.HTMLIFrameElement;){try{var i=typeof a.contentWindow.location.href=="string"}catch{i=!1}if(i)t=a.contentWindow;else break;a=rs(t.document)}return a}function Mu(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var Vb=kn&&"documentMode"in document&&11>=document.documentMode,Lr=null,zu=null,ji=null,ku=!1;function zh(t,a,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ku||Lr==null||Lr!==rs(s)||(s=Lr,"selectionStart"in s&&Mu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focu
vendor: 20,020 bytes, line 9
9sNode:s.focusNode,focusOffset:s.focusOffset}),ji&&Bi(ji,s)||(ji=s,s=Ws(zu,"onSelect"),0<s.length&&(a=new us("onSelect","select",null,a,i),t.push({event:a,listeners:s}),a.target=Lr)))}function Va(t,a){var i={};return i[t.toLowerCase()]=a.toLowerCase(),i["Webkit"+t]="webkit"+a,i["Moz"+t]="moz"+a,i}var Nr={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},Lu={},kh={};kn&&(kh=document.createElement("div").style,"AnimationEvent"in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),"TransitionEvent"in window||delete Nr.transitionend.transition);function Za(t){if(Lu[t])return Lu[t];if(!Nr[t])return t;var a=Nr[t],i;for(i in a)if(a.hasOwnProperty(i)&&i in kh)return Lu[t]=a[i];return t}var Lh=Za("animationend"),Nh=Za("animationiteration"),Dh=Za("animationstart"),Zb=Za("transitionrun"),Ib=Za("transitionstart"),Qb=Za("transitioncancel"),Uh=Za("transitionend"),Bh=new Map,Nu="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(" ");Nu.push("scrollEnd");function fn(t,a){Bh.set(t,a),Pa(a,[t])}var ds=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Jt=[],Dr=0,Du=0;function hs(){for(var t=Dr,a=Du=Dr=0;a<t;){var i=Jt[a];Jt[a++]=null;var s=Jt[a];Jt[a++]=null;var c=Jt[a];Jt[a++]=null;var d=Jt[a];if(Jt[a++]=null,s!==null&&c!==null){var g=s.pending;g===null?c.next=c:(c.next=g.next,g.next=c),s.pending=c}d!==0&&jh(i,c,d)}}function ps(t,a,i,s){Jt[Dr++]=t,Jt[Dr++]=a,Jt[Dr++]=i,Jt[Dr++]=s,Du|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Uu(t,a,i,s){return ps(t,a,i,s),ms(t)}function Ia(t,a){return ps(t,null,null,a),ms(t)}function jh(t,a,i){t.lanes|=i;var s=t.alternate;s!==null&&(s.lanes|=i);for(var c=!1,d=t.return;d!==null;)d.childLanes|=i,s=d.alternate,s!==null&&(s.childLanes|=i),d.tag===22&&(t=d.stateNode,t===null||t._visibility&1||(c=!0)),t=d,d=d.return;return t.tag===3?(d=t.stateNode,c&&a!==null&&(c=31-Ht(i),t=d.hiddenUpdates,s=t[c],s===null?t[c]=[a]:s.push(a),a.lane=i|536870912),d):null}function ms(t){if(50<oo)throw oo=0,Ic=null,Error(o(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var Ur={};function Gb(t,a,i,s){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(t,a,i,s){return new Gb(t,a,i,s)}function Bu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ln(t,a){var i=t.alternate;return i===null?(i=$t(t.tag,a,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=a,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,a=t.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function qh(t,a){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,a=i.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function gs(t,a,i,s,c,d){var g=0;if(s=t,typeof t=="function")Bu(t)&&(g=1);else if(typeof t=="string")g=JS(t,i,ee.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ne:return t=$t(31,i,a,c),t.elementType=ne,t.lanes=d,t;case O:return Qa(i.children,c,d,a);case R:g=8,c|=24;break;case z:return t=$t(12,i,a,c|2),t.elementType=z,t.lanes=d,t;case W:return t=$t(13,i,a,c),t.elementType=W,t.lanes=d,t;case te:return t=$t(19,i,a,c),t.elementType=te,t.lanes=d,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case $:g=10;break e;case H:g=9;break e;case B:g=11;break e;case V:g=14;break e;case F:g=16,s=null;break e}g=29,i=Error(o(130,t===null?"null":typeof t,"")),s=null}return a=$t(g,i,a,c),a.elementType=t,a.type=s,a.lanes=d,a}function Qa(t,a,i,s){return t=$t(7,t,s,a),t.lanes=i,t}function ju(t,a,i){return t=$t(6,t,null,a),t.lanes=i,t}function Hh(t){var a=$t(18,null,null,0);return a.stateNode=t,a}function qu(t,a,i){return a=$t(4,t.children!==null?t.children:[],t.key,a),a.lanes=i,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var Ph=new WeakMap;function Wt(t,a){if(typeof t=="object"&&t!==null){var i=Ph.get(t);return i!==void 0?i:(a={value:t,source:a,stack:On(a)},Ph.set(t,a),a)}return{value:t,source:a,stack:On(a)}}var Br=[],jr=0,ys=null,qi=0,en=[],tn=0,ia=null,yn=1,vn="";function Nn(t,a){Br[jr++]=qi,Br[jr++]=ys,ys=t,qi=a}function $h(t,a,i){en[tn++]=yn,en[tn++]=vn,en[tn++]=ia,ia=t;var s=yn;t=vn;var c=32-Ht(s)-1;s&=~(1<<c),i+=1;var d=32-Ht(a)+c;if(30<d){var g=c-c%5;d=(s&(1<<g)-1).toString(32),s>>=g,c-=g,yn=1<<32-Ht(a)+c|i<<c|s,vn=d+t}else yn=1<<d|i<<c|s,vn=t}function Hu(t){t.return!==null&&(Nn(t,1),$h(t,1,0))}function Pu(t){for(;t===ys;)ys=Br[--jr],Br[jr]=null,qi=Br[--jr],Br[jr]=null;for(;t===ia;)ia=en[--tn],en[tn]=null,vn=en[--tn],en[tn]=null,yn=en[--tn],en[tn]=null}function Vh(t,a){en[tn++]=yn,en[tn++]=vn,en[tn++]=ia,yn=a.id,vn=a.overflow,ia=t}var mt=null,He=null,Ee=!1,oa=null,nn=!1,$u=Error(o(519));function sa(t){var a=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hi(Wt(a,t)),$u}function Zh(t){var a=t.stateNode,i=t.type,s=t.memoizedProps;switch(a[pt]=t,a[Rt]=s,i){case"dialog":Se("cancel",a),Se("close",a);break;case"iframe":case"object":case"embed":Se("load",a);break;case"video":case"audio":for(i=0;i<lo.length;i++)Se(lo[i],a);break;case"source":Se("error",a);break;case"img":case"image":case"link":Se("error",a),Se("load",a);break;case"details":Se("toggle",a);break;case"input":Se("invalid",a),ah(a,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Se("invalid",a);break;case"textarea":Se("invalid",a),ih(a,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||a.textContent===""+i||s.suppressHydrationWarning===!0||sg(a.textContent,i)?(s.popover!=null&&(Se("beforetoggle",a),Se("toggle",a)),s.onScroll!=null&&Se("scroll",a),s.onScrollEnd!=null&&Se("scrollend",a),s.onClick!=null&&(a.onclick=zn),a=!0):a=!1,a||sa(t,!0)}function Ih(t){for(mt=t.return;mt;)switch(mt.tag){case 5:case 31:case 13:nn=!1;return;case 27:case 3:nn=!0;return;default:mt=mt.return}}function qr(t){if(t!==mt)return!1;if(!Ee)return Ih(t),Ee=!0,!1;var a=t.tag,i;if((i=a!==3&&a!==27)&&((i=a===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||sf(t.type,t.memoizedProps)),i=!i),i&&He&&sa(t),Ih(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));He=gg(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));He=gg(t)}else a===27?(a=He,wa(t.type)?(t=df,df=null,He=t):He=a):He=mt?rn(t.stateNode.nextSibling):null;return!0}function Ga(){He=mt=null,Ee=!1}function Vu(){var t=oa;return t!==null&&(zt===null?zt=t:zt.push.apply(zt,t),oa=null),t}function Hi(t){oa===null?oa=[t]:oa.push(t)}var Zu=E(null),Ya=null,Dn=null;function la(t,a,i){Q(Zu,a._currentValue),a._currentValue=i}function Un(t){t._currentValue=Zu.current,L(Zu)}function Iu(t,a,i){for(;t!==null;){var s=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,s!==null&&(s.childLanes|=a)):s!==null&&(s.childLanes&a)!==a&&(s.childLanes|=a),t===i)break;t=t.return}}function Qu(t,a,i,s){var c=t.child;for(c!==null&&(c.return=t);c!==null;){var d=c.dependencies;if(d!==null){var g=c.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=c;for(var A=0;A<a.length;A++)if(S.context===a[A]){d.lanes|=i,S=d.alternate,S!==null&&(S.lanes|=i),Iu(d.return,i,t),s||(g=null);break e}d=S.next}}else if(c.tag===18){if(g=c.return,g===null)throw Error(o(341));g.lanes|=i,d=g.alternate,d!==null&&(d.lanes|=i),Iu(g,i,t),g=null}else g=c.child;if(g!==null)g.return=c;else for(g=c;g!==null;){if(g===t){g=null;break}if(c=g.sibling,c!==null){c.return=g.return,g=c;break}g=g.return}c=g}}function Hr(t,a,i,s){t=null;for(var c=a,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var g=c.alternate;if(g===null)throw Error(o(387));if(g=g.memoizedProps,g!==null){var S=c.type;Pt(c.pendingProps.value,g.value)||(t!==null?t.push(S):t=[S])}}else if(c===ve.current){if(g=c.alternate,g===null)throw Error(o(387));g.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(t!==null?t.push(po):t=[po])}c=c.return}t!==null&&Qu(a,t,i,s),a.flags|=262144}function vs(t){for(t=t.firstContext;t!==null;){if(!Pt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Xa(t){Ya=t,Dn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function gt(t){return Qh(Ya,t)}function bs(t,a){return Ya===null&&Xa(t),Qh(t,a)}function Qh(t,a){var i=a._currentValue;if(a={context:a,memoizedValue:i,next:null},Dn===null){if(t===null)throw Error(o(308));Dn=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Dn=Dn.next=a;return i}var Yb=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(i,s){t.push(s)}};this.abort=function(){a.aborted=!0,t.forEach(function(i){return i()})}},Xb=e.unstable_scheduleCallback,Kb=e.unstable_NormalPriority,Fe={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gu(){return{controller:new Yb,data:new Map,refCount:0}}function Pi(t){t.refCount--,t.refCount===0&&Xb(Kb,function(){t.controller.abort()})}var $i=null,Yu=0,Pr=0,$r=null;function Fb(t,a){if($i===null){var i=$i=[];Yu=0,Pr=Fc(),$r={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Yu++,a.then(Gh,Gh),a}function Gh(){if(--Yu===0&&$i!==null){$r!==null&&($r.status="fulfilled");var t=$i;$i=null,Pr=0,$r=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function Jb(t,a){var i=[],s={status:"pending",value:null,reason:null,then:function(c){i.push(c)}};return t.then(function(){s.status="fulfilled",s.value=a;for(var c=0;c<i.length;c++)(0,i[c])(a)},function(c){for(s.status="rejected",s.reason=c,c=0;c<i.length;c++)(0,i[c])(void 0)}),s}var Yh=U.S;U.S=function(t,a){zm=wt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Fb(t,a),Yh!==null&&Yh(t,a)};var Ka=E(null);function Xu(){var t=Ka.current;return t!==null?t:Ue.pooledCache}function Ss(t,a){a===null?Q(Ka,Ka.current):Q(Ka,a.pool)}function Xh(){var t=Xu();return t===null?null:{parent:Fe._currentValue,pool:t}}var Vr=Error(o(460)),Ku=Error(o(474)),ws=Error(o(542)),_s={then:function(){}};function Kh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Fh(t,a,i){switch(i=t[i],i===void 0?t.push(a):i!==a&&(a.then(zn,zn),a=i),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Wh(t),t;default:if(typeof a.status=="string")a.then(zn,zn);else{if(t=Ue,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=a,t.status="pending",t.then(function(s){if(a.status==="pending"){var c=a;c.status="fulfilled",c.value=s}},function(s){if(a.status==="pending"){var c=a;c.status="rejected",c.reason=s}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Wh(t),t}throw Ja=a,Vr}}function Fa(t){try{var a=t._init;return a(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ja=i,Vr):i}}var Ja=null;function Jh(){if(Ja===null)throw Error(o(459));var t=Ja;return Ja=null,t}function Wh(t){if(t===Vr||t===ws)throw Error(o(483))}var Zr=null,Vi=0;function Es(t){var a=Vi;return Vi+=1,Zr===null&&(Zr=[]),Fh(Zr,t,a)}function Zi(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Cs(t,a){throw a.$$typeof===w?Error(o(525)):(t=Object.prototype.toString.call(a),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function ep(t){function a(k,M){if(t){var N=k.deletions;N===null?(k.deletions=[M],k.flags|=16):N.push(M)}}function i(k,M){if(!t)return null;for(;M!==null;)a(k,M),M=M.sibling;return null}function s(k){for(var M=new Map;k!==null;)k.key!==null?M.set(k.key,k):M.set(k.index,k),k=k.sibling;return M}function c(k,M){return k=Ln(k,M),k.index=0,k.sibling=null,k}function d(k,M,N){return k.index=N,t?(N=k.alternate,N!==null?(N=N.index,N<M?(k.flags|=67108866,M):N):(k.flags|=67108866,M)):(k.flags|=1048576,M)}function g(k){return t&&k.alternate===null&&(k.flags|=67108866),k}function S(k,M,N,G){return M===null||M.tag!==6?(M=ju(N,k.mode,G),M.return=k,M):(M=c(M,N),M.return=k,M)}function A(k,M,N,G){var ce=N.type;return ce===O?I(k,M,N.props.children,G,N.key):M!==null&&(M.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===F&&Fa(ce)===M.type)?(M=c(M,N.props),Zi(M,N),M.return=k,M):(M=gs(N.type,N.key,N.props,null,k.mode,G),Zi(M,N),M.return=k,M)}function D(k,M,N,G){return M===null||M.tag!==4||M.stateNode.containerInfo!==N.containerInfo||M.stateNode.implementation!==N.implementation?(M=qu(N,k.mode,G),M.return=k,M):(M=c(M,N.children||[]),M.return=k,M)}function I(k,M,N,G,ce){return M===null||M.tag!==7?(M=Qa(N,k.mode,G,ce),M.return=k,M):(M=c(M,N),M.return=k,M)}function Y(k,M,N){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ju(""+M,k.mode,N),M.return=k,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return N=gs(M.type,M.key,M.props,null,k.mode,N),Zi(N,M),N.return=k,N;case C:return M=qu(M,k.mode,N),M.return=k,M;case F:return M=Fa(M),Y(k,M,N)}if(ue(M)||le(M))return M=Qa(M,k.mode,N,null),M.return=k,M;if(typeof M.then=="function")return Y(k,Es(M),N);if(M.$$typeof===$)return Y(k,bs(k,M),N);Cs(k,M)}return null}function j(k,M,N,G){var ce=M!==null?M.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ce!==null?null:S(k,M,""+N,G);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case b:return N.key===ce?A(k,M,N,G):null;case C:return N.key===ce?D(k,M,N,G):null;case F:return N=Fa(N),j(k,M,N,G)}if(ue(N)||le(N))return ce!==null?null:I(k,M,N,G,null);if(typeof N.then=="function")return j(k,M,Es(N),G);if(N.$$typeof===$)return j(k,M,bs(k,N),G);Cs(k,N)}return null}function q(k,M,N,G,ce){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return k=k.get(N)||null,S(M,k,""+G,ce);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case b:return k=k.get(G.key===null?N:G.key)||null,A(M,k,G,ce);case C:return k=k.get(G.key===null?N:G.key)||null,D(M,k,G,ce);case F:return G=Fa(G),q(k,M,N,G,ce)}if(ue(G)||le(G))return k=k.get(N)||null,I(M,k,G,ce,null);if(typeof G.then=="function")return q(k,M,N,Es(G),ce);if(G.$$typeof===$)return q(k,M,N,bs(M,G),ce);Cs(M,G)}return null}function ie(k,M,N,G){for(var ce=null,Ce=null,oe=M,ye=M=0,_e=null;oe!==null&&ye<N.length;ye++){oe.index>ye?(_e=oe,oe=null):_e=oe.sibling;var Te=j(k,oe,N[ye],G);if(Te===null){oe===null&&(oe=_e);break}t&&oe&&Te.alternate===null&&a(k,oe),M=d(Te,M,ye),Ce===null?ce=Te:Ce.sibling=Te,Ce=Te,oe=_e}if(ye===N.length)return i(k,oe),Ee&&Nn(k,ye),ce;if(oe===null){for(;ye<N.length;ye++)oe=Y(k,N[ye],G),oe!==null&&(M=d(oe,M,ye),Ce===null?ce=oe:Ce.sibling=oe,Ce=oe);return Ee&&Nn(k,ye),ce}for(oe=s(oe);ye<N.length;ye++)_e=q(oe,k,ye,N[ye],G),_e!==null&&(t&&_e.alternate!==null&&oe.delete(_e.key===null?ye:_e.key),M=d(_e,M,ye),Ce===null?ce=_e:Ce.sibling=_e,Ce=_e);return t&&oe.forEach(function(Ra){return a(k,Ra)}),Ee&&Nn(k,ye),ce}function de(k,M,N,G){if(N==null)throw Error(o(151));for(var ce=null,Ce=null,oe=M,ye=M=0,_e=null,Te=N.next();oe!==null&&!Te.done;ye++,Te=N.next()){oe.index>ye?(_e=oe,oe=null):_e=oe.sibling;var Ra=j(k,oe,Te.value,G);if(Ra===null){oe===null&&(oe=_e);break}t&&oe&&Ra.alternate===null&&a(k,oe),M=d(Ra,M,ye),Ce===null?ce=Ra:Ce.sibling=Ra,Ce=Ra,oe=_e}if(Te.done)return i(k,oe),Ee&&Nn(k,ye),ce;if(oe===null){for(;!Te.done;ye++,Te=N.next())Te=Y(k,Te.value,G),Te!==null&&(M=d(Te,M,ye),Ce===null?ce=Te:Ce.sibling=Te,Ce=Te);return Ee&&Nn(k,ye),ce}for(oe=s(oe);!Te.done;ye++,Te=N.next())Te=q(oe,k,ye,Te.value,G),Te!==null&&(t&&Te.alternate!==null&&oe.delete(Te.key===null?ye:Te.key),M=d(Te,M,ye),Ce===null?ce=Te:Ce.sibling=Te,Ce=Te);return t&&oe.forEach(function(u2){return a(k,u2)}),Ee&&Nn(k,ye),ce}function Ne(k,M,N,G){if(typeof N=="object"&&N!==null&&N.type===O&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case b:e:{for(var ce=N.key;M!==null;){if(M.key===ce){if(ce=N.type,ce===O){if(M.tag===7){i(k,M.sibling),G=c(M,N.props.children),G.return=k,k=G;break e}}else if(M.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===F&&Fa(ce)===M.type){i(k,M.sibling),G=c(M,N.props),Zi(G,N),G.return=k,k=G;break e}i(k,M);break}else a(k,M);M=M.sibling}N.type===O?(G=Qa(N.props.children,k.mode,G,N.key),G.return=k,k=G):(G=gs(N.type,N.key,N.props,null,k.mode,G),Zi(G,N),G.return=k,k=G)}return g(k);case C:e:{for(ce=N.key;M!==null;){if(M.key===ce)if(M.tag===4&&M.stateNode.containerInfo===N.containerInfo&&M.stateNode.implementation===N.implementation){i(k,M.sibling),G=c(M,N.children||[]),G.return=k,k=G;break e}else{i(k,M);break}else a(k,M);M=M.sibling}G=qu(N,k.mode,G),G.return=k,k=G}return g(k);case F:return N=Fa(N),Ne(k,M,N,G)}if(ue(N))return ie(k,M,N,G);if(le(N)){if(ce=le(N),typeof ce!="function")throw Error(o(150));return N=ce.call(N),de(k,M,N,G)}if(typeof N.then=="function")return Ne(k,M,Es(N),G);if(N.$$typeof===$)return Ne(k,M,bs(k,N),G);Cs(k,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,M!==null&&M.tag===6?(i(k,M.sibling),G=c(M,N),G.return=k,k=G):(i(k,M),G=ju(N,k.mode,G),G.return=k,k=G),g(k)):i(k,M)}return function(k,M,N,G){try{Vi=0;var ce=Ne(k,M,N,G);return Zr=null,ce}catch(oe){if(oe===Vr||oe===ws)throw oe;var Ce=$t(29,oe,null,k.mode);return Ce.lanes=G,Ce.return=k,Ce}finally{}}}var Wa=ep(!0),tp=ep(!1),ua=!1;function Fu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ju(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ca(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function fa(t,a,i){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Ae&2)!==0){var c=s.pending;return c===null?a.next=a:(a.next=c.next,c.next=a),s.pending=a,a=ms(t),jh(t,
vendor: 10,664 bytes, line 9
9null,i),a}return ps(t,s,a,i),ms(t)}function Ii(t,a,i){if(a=a.updateQueue,a!==null&&(a=a.shared,(i&4194048)!==0)){var s=a.lanes;s&=t.pendingLanes,i|=s,a.lanes=i,Qd(t,i)}}function Wu(t,a){var i=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var c=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var g={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?c=d=g:d=d.next=g,i=i.next}while(i!==null);d===null?c=d=a:d=d.next=a}else c=d=a;i={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=a:t.next=a,i.lastBaseUpdate=a}var ec=!1;function Qi(){if(ec){var t=$r;if(t!==null)throw t}}function Gi(t,a,i,s){ec=!1;var c=t.updateQueue;ua=!1;var d=c.firstBaseUpdate,g=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var A=S,D=A.next;A.next=null,g===null?d=D:g.next=D,g=A;var I=t.alternate;I!==null&&(I=I.updateQueue,S=I.lastBaseUpdate,S!==g&&(S===null?I.firstBaseUpdate=D:S.next=D,I.lastBaseUpdate=A))}if(d!==null){var Y=c.baseState;g=0,I=D=A=null,S=d;do{var j=S.lane&-536870913,q=j!==S.lane;if(q?(we&j)===j:(s&j)===j){j!==0&&j===Pr&&(ec=!0),I!==null&&(I=I.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ie=t,de=S;j=a;var Ne=i;switch(de.tag){case 1:if(ie=de.payload,typeof ie=="function"){Y=ie.call(Ne,Y,j);break e}Y=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=de.payload,j=typeof ie=="function"?ie.call(Ne,Y,j):ie,j==null)break e;Y=y({},Y,j);break e;case 2:ua=!0}}j=S.callback,j!==null&&(t.flags|=64,q&&(t.flags|=8192),q=c.callbacks,q===null?c.callbacks=[j]:q.push(j))}else q={lane:j,tag:S.tag,payload:S.payload,callback:S.callback,next:null},I===null?(D=I=q,A=Y):I=I.next=q,g|=j;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;q=S,S=q.next,q.next=null,c.lastBaseUpdate=q,c.shared.pending=null}}while(!0);I===null&&(A=Y),c.baseState=A,c.firstBaseUpdate=D,c.lastBaseUpdate=I,d===null&&(c.shared.lanes=0),ga|=g,t.lanes=g,t.memoizedState=Y}}function np(t,a){if(typeof t!="function")throw Error(o(191,t));t.call(a)}function ap(t,a){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)np(i[t],a)}var Ir=E(null),Ts=E(0);function rp(t,a){t=In,Q(Ts,t),Q(Ir,a),In=t|a.baseLanes}function tc(){Q(Ts,In),Q(Ir,Ir.current)}function nc(){In=Ts.current,L(Ir),L(Ts)}var Vt=E(null),an=null;function da(t){var a=t.alternate;Q(Xe,Xe.current&1),Q(Vt,t),an===null&&(a===null||Ir.current!==null||a.memoizedState!==null)&&(an=t)}function ac(t){Q(Xe,Xe.current),Q(Vt,t),an===null&&(an=t)}function ip(t){t.tag===22?(Q(Xe,Xe.current),Q(Vt,t),an===null&&(an=t)):ha()}function ha(){Q(Xe,Xe.current),Q(Vt,Vt.current)}function Zt(t){L(Vt),an===t&&(an=null),L(Xe)}var Xe=E(0);function Rs(t){for(var a=t;a!==null;){if(a.tag===13){var i=a.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||cf(i)||ff(i)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Bn=0,ge=null,ke=null,Je=null,As=!1,Qr=!1,er=!1,xs=0,Yi=0,Gr=null,Wb=0;function Ge(){throw Error(o(321))}function rc(t,a){if(a===null)return!1;for(var i=0;i<a.length&&i<t.length;i++)if(!Pt(t[i],a[i]))return!1;return!0}function ic(t,a,i,s,c,d){return Bn=d,ge=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,U.H=t===null||t.memoizedState===null?$p:Sc,er=!1,d=i(s,c),er=!1,Qr&&(d=sp(a,i,s,c)),op(t),d}function op(t){U.H=Fi;var a=ke!==null&&ke.next!==null;if(Bn=0,Je=ke=ge=null,As=!1,Yi=0,Gr=null,a)throw Error(o(300));t===null||We||(t=t.dependencies,t!==null&&vs(t)&&(We=!0))}function sp(t,a,i,s){ge=t;var c=0;do{if(Qr&&(Gr=null),Yi=0,Qr=!1,25<=c)throw Error(o(301));if(c+=1,Je=ke=null,t.updateQueue!=null){var d=t.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}U.H=Vp,d=a(i,s)}while(Qr);return d}function eS(){var t=U.H,a=t.useState()[0];return a=typeof a.then=="function"?Xi(a):a,t=t.useState()[0],(ke!==null?ke.memoizedState:null)!==t&&(ge.flags|=1024),a}function oc(){var t=xs!==0;return xs=0,t}function sc(t,a,i){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~i}function lc(t){if(As){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}As=!1}Bn=0,Je=ke=ge=null,Qr=!1,Yi=xs=0,Gr=null}function Ct(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?ge.memoizedState=Je=t:Je=Je.next=t,Je}function Ke(){if(ke===null){var t=ge.alternate;t=t!==null?t.memoizedState:null}else t=ke.next;var a=Je===null?ge.memoizedState:Je.next;if(a!==null)Je=a,ke=t;else{if(t===null)throw ge.alternate===null?Error(o(467)):Error(o(310));ke=t,t={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Je===null?ge.memoizedState=Je=t:Je=Je.next=t}return Je}function Os(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xi(t){var a=Yi;return Yi+=1,Gr===null&&(Gr=[]),t=Fh(Gr,t,a),a=ge,(Je===null?a.memoizedState:Je.next)===null&&(a=a.alternate,U.H=a===null||a.memoizedState===null?$p:Sc),t}function Ms(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xi(t);if(t.$$typeof===$)return gt(t)}throw Error(o(438,String(t)))}function uc(t){var a=null,i=ge.updateQueue;if(i!==null&&(a=i.memoCache),a==null){var s=ge.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(a={data:s.data.map(function(c){return c.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),i===null&&(i=Os(),ge.updateQueue=i),i.memoCache=a,i=a.data[a.index],i===void 0)for(i=a.data[a.index]=Array(t),s=0;s<t;s++)i[s]=fe;return a.index++,i}function jn(t,a){return typeof a=="function"?a(t):a}function zs(t){var a=Ke();return cc(a,ke,t)}function cc(t,a,i){var s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=i;var c=t.baseQueue,d=s.pending;if(d!==null){if(c!==null){var g=c.next;c.next=d.next,d.next=g}a.baseQueue=c=d,s.pending=null}if(d=t.baseState,c===null)t.memoizedState=d;else{a=c.next;var S=g=null,A=null,D=a,I=!1;do{var Y=D.lane&-536870913;if(Y!==D.lane?(we&Y)===Y:(Bn&Y)===Y){var j=D.revertLane;if(j===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Y===Pr&&(I=!0);else if((Bn&j)===j){D=D.next,j===Pr&&(I=!0);continue}else Y={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=Y,g=d):A=A.next=Y,ge.lanes|=j,ga|=j;Y=D.action,er&&i(d,Y),d=D.hasEagerState?D.eagerState:i(d,Y)}else j={lane:Y,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=j,g=d):A=A.next=j,ge.lanes|=Y,ga|=Y;D=D.next}while(D!==null&&D!==a);if(A===null?g=d:A.next=S,!Pt(d,t.memoizedState)&&(We=!0,I&&(i=$r,i!==null)))throw i;t.memoizedState=d,t.baseState=g,t.baseQueue=A,s.lastRenderedState=d}return c===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function fc(t){var a=Ke(),i=a.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var s=i.dispatch,c=i.pending,d=a.memoizedState;if(c!==null){i.pending=null;var g=c=c.next;do d=t(d,g.action),g=g.next;while(g!==c);Pt(d,a.memoizedState)||(We=!0),a.memoizedState=d,a.baseQueue===null&&(a.baseState=d),i.lastRenderedState=d}return[d,s]}function lp(t,a,i){var s=ge,c=Ke(),d=Ee;if(d){if(i===void 0)throw Error(o(407));i=i()}else i=a();var g=!Pt((ke||c).memoizedState,i);if(g&&(c.memoizedState=i,We=!0),c=c.queue,pc(fp.bind(null,s,c,t),[t]),c.getSnapshot!==a||g||Je!==null&&Je.memoizedState.tag&1){if(s.flags|=2048,Yr(9,{destroy:void 0},cp.bind(null,s,c,i,a),null),Ue===null)throw Error(o(349));d||(Bn&127)!==0||up(s,a,i)}return i}function up(t,a,i){t.flags|=16384,t={getSnapshot:a,value:i},a=ge.updateQueue,a===null?(a=Os(),ge.updateQueue=a,a.stores=[t]):(i=a.stores,i===null?a.stores=[t]:i.push(t))}function cp(t,a,i,s){a.value=i,a.getSnapshot=s,dp(a)&&hp(t)}function fp(t,a,i){return i(function(){dp(a)&&hp(t)})}function dp(t){var a=t.getSnapshot;t=t.value;try{var i=a();return!Pt(t,i)}catch{return!0}}function hp(t){var a=Ia(t,2);a!==null&&kt(a,t,2)}function dc(t){var a=Ct();if(typeof t=="function"){var i=t;if(t=i(),er){na(!0);try{i()}finally{na(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:t},a}function pp(t,a,i,s){return t.baseState=i,cc(t,ke,typeof s=="function"?s:jn)}function tS(t,a,i,s,c){if(Ns(t))throw Error(o(485));if(t=a.action,t!==null){var d={payload:c,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){d.listeners.push(g)}};U.T!==null?i(!0):d.isTransition=!1,s(d),i=a.pending,i===null?(d.next=a.pending=d,mp(a,d)):(d.next=i.next,a.pending=i.next=d)}}function mp(t,a){var i=a.action,s=a.payload,c=t.state;if(a.isTransition){var d=U.T,g={};U.T=g;try{var S=i(c,s),A=U.S;A!==null&&A(g,S),gp(t,a,S)}catch(D){hc(t,a,D)}finally{d!==null&&g.types!==null&&(d.types=g.types),U.T=d}}else try{d=i(c,s),gp(t,a,d)}catch(D){hc(t,a,D)}}function gp(t,a,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){yp(t,a,s)},function(s){return hc(t,a,s)}):yp(t,a,i)}function yp(t,a,i){a.status="fulfilled",a.value=i,vp(a),t.state=i,a=t.pending,a!==null&&(i=a.next,i===a?t.pending=null:(i=i.next,a.next=i,mp(t,i)))}function hc(t,a,i){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do a.status="rejected",a.reason=i,vp(a),a=a.next;while(a!==s)}t.action=null}function vp(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function bp(t,a){return a}function Sp(t,a){if(Ee){var i=Ue.formState;if(i!==null){e:{var s=ge;if(Ee){if(He){t:{for(var c=He,d=nn;c.nodeType!==8;){if(!d){c=null;break t}if(c=rn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){He=rn(c.nextSibling),s=c.data==="F!";break e}}sa(s)}s=!1}s&&(a=i[0])}}return i=Ct(),i.memoizedState=i.baseState=a,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bp,lastRenderedState:a},i.queue=s,i=qp.bind(null,ge,s),s.dispatch=i,s=dc(!1),d=bc.bind(null,ge,!1,s.queue),s=Ct(),c={state:a,dispatch:null,action:t,pending:null},s.queue=c,i=tS.bind(null,ge,c,d,i),c.dispatch=i,s.memoizedState=t,[a,i,!1]}function wp(t){var a=Ke();return _p(a,ke,t)}
vendor: 9,798 bytes, line 9
9function _p(t,a,i){if(a=cc(t,a,bp)[0],t=zs(jn)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var s=Xi(a)}catch(g){throw g===Vr?ws:g}else s=a;a=Ke();var c=a.queue,d=c.dispatch;return i!==a.memoizedState&&(ge.flags|=2048,Yr(9,{destroy:void 0},nS.bind(null,c,i),null)),[s,d,t]}function nS(t,a){t.action=a}function Ep(t){var a=Ke(),i=ke;if(i!==null)return _p(a,i,t);Ke(),a=a.memoizedState,i=Ke();var s=i.queue.dispatch;return i.memoizedState=t,[a,s,!1]}function Yr(t,a,i,s){return t={tag:t,create:i,deps:s,inst:a,next:null},a=ge.updateQueue,a===null&&(a=Os(),ge.updateQueue=a),i=a.lastEffect,i===null?a.lastEffect=t.next=t:(s=i.next,i.next=t,t.next=s,a.lastEffect=t),t}function Cp(){return Ke().memoizedState}function ks(t,a,i,s){var c=Ct();ge.flags|=t,c.memoizedState=Yr(1|a,{destroy:void 0},i,s===void 0?null:s)}function Ls(t,a,i,s){var c=Ke();s=s===void 0?null:s;var d=c.memoizedState.inst;ke!==null&&s!==null&&rc(s,ke.memoizedState.deps)?c.memoizedState=Yr(a,d,i,s):(ge.flags|=t,c.memoizedState=Yr(1|a,d,i,s))}function Tp(t,a){ks(8390656,8,t,a)}function pc(t,a){Ls(2048,8,t,a)}function aS(t){ge.flags|=4;var a=ge.updateQueue;if(a===null)a=Os(),ge.updateQueue=a,a.events=[t];else{var i=a.events;i===null?a.events=[t]:i.push(t)}}function Rp(t){var a=Ke().memoizedState;return aS({ref:a,nextImpl:t}),function(){if((Ae&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}function Ap(t,a){return Ls(4,2,t,a)}function xp(t,a){return Ls(4,4,t,a)}function Op(t,a){if(typeof a=="function"){t=t();var i=a(t);return function(){typeof i=="function"?i():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function Mp(t,a,i){i=i!=null?i.concat([t]):null,Ls(4,4,Op.bind(null,a,t),i)}function mc(){}function zp(t,a){var i=Ke();a=a===void 0?null:a;var s=i.memoizedState;return a!==null&&rc(a,s[1])?s[0]:(i.memoizedState=[t,a],t)}function kp(t,a){var i=Ke();a=a===void 0?null:a;var s=i.memoizedState;if(a!==null&&rc(a,s[1]))return s[0];if(s=t(),er){na(!0);try{t()}finally{na(!1)}}return i.memoizedState=[s,a],s}function gc(t,a,i){return i===void 0||(Bn&1073741824)!==0&&(we&261930)===0?t.memoizedState=a:(t.memoizedState=i,t=Lm(),ge.lanes|=t,ga|=t,i)}function Lp(t,a,i,s){return Pt(i,a)?i:Ir.current!==null?(t=gc(t,i,s),Pt(t,a)||(We=!0),t):(Bn&42)===0||(Bn&1073741824)!==0&&(we&261930)===0?(We=!0,t.memoizedState=i):(t=Lm(),ge.lanes|=t,ga|=t,a)}function Np(t,a,i,s,c){var d=Z.p;Z.p=d!==0&&8>d?d:8;var g=U.T,S={};U.T=S,bc(t,!1,a,i);try{var A=c(),D=U.S;if(D!==null&&D(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var I=Jb(A,s);Ki(t,a,I,Gt(t))}else Ki(t,a,s,Gt(t))}catch(Y){Ki(t,a,{then:function(){},status:"rejected",reason:Y},Gt())}finally{Z.p=d,g!==null&&S.types!==null&&(g.types=S.types),U.T=g}}function rS(){}function yc(t,a,i,s){if(t.tag!==5)throw Error(o(476));var c=Dp(t).queue;Np(t,c,a,re,i===null?rS:function(){return Up(t),i(s)})}function Dp(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:re},next:null};var i={};return a.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:i},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function Up(t){var a=Dp(t);a.next===null&&(a=t.alternate.memoizedState),Ki(t,a.next.queue,{},Gt())}function vc(){return gt(po)}function Bp(){return Ke().memoizedState}function jp(){return Ke().memoizedState}function iS(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var i=Gt();t=ca(i);var s=fa(a,t,i);s!==null&&(kt(s,a,i),Ii(s,a,i)),a={cache:Gu()},t.payload=a;return}a=a.return}}function oS(t,a,i){var s=Gt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ns(t)?Hp(a,i):(i=Uu(t,a,i,s),i!==null&&(kt(i,t,s),Pp(i,a,s)))}function qp(t,a,i){var s=Gt();Ki(t,a,i,s)}function Ki(t,a,i,s){var c={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ns(t))Hp(a,c);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=a.lastRenderedReducer,d!==null))try{var g=a.lastRenderedState,S=d(g,i);if(c.hasEagerState=!0,c.eagerState=S,Pt(S,g))return ps(t,a,c,0),Ue===null&&hs(),!1}catch{}finally{}if(i=Uu(t,a,c,s),i!==null)return kt(i,t,s),Pp(i,a,s),!0}return!1}function bc(t,a,i,s){if(s={lane:2,revertLane:Fc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ns(t)){if(a)throw Error(o(479))}else a=Uu(t,i,s,2),a!==null&&kt(a,t,2)}function Ns(t){var a=t.alternate;return t===ge||a!==null&&a===ge}function Hp(t,a){Qr=As=!0;var i=t.pending;i===null?a.next=a:(a.next=i.next,i.next=a),t.pending=a}function Pp(t,a,i){if((i&4194048)!==0){var s=a.lanes;s&=t.pendingLanes,i|=s,a.lanes=i,Qd(t,i)}}var Fi={readContext:gt,use:Ms,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Fi.useEffectEvent=Ge;var $p={readContext:gt,use:Ms,useCallback:function(t,a){return Ct().memoizedState=[t,a===void 0?null:a],t},useContext:gt,useEffect:Tp,useImperativeHandle:function(t,a,i){i=i!=null?i.concat([t]):null,ks(4194308,4,Op.bind(null,a,t),i)},useLayoutEffect:function(t,a){return ks(4194308,4,t,a)},useInsertionEffect:function(t,a){ks(4,2,t,a)},useMemo:function(t,a){var i=Ct();a=a===void 0?null:a;var s=t();if(er){na(!0);try{t()}finally{na(!1)}}return i.memoizedState=[s,a],s},useReducer:function(t,a,i){var s=Ct();if(i!==void 0){var c=i(a);if(er){na(!0);try{i(a)}finally{na(!1)}}}else c=a;return s.memoizedState=s.baseState=c,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:c},s.queue=t,t=t.dispatch=oS.bind(null,ge,t),[s.memoizedState,t]},useRef:function(t){var a=Ct();return t={current:t},a.memoizedState=t},useState:function(t){t=dc(t);var a=t.queue,i=qp.bind(null,ge,a);return a.dispatch=i,[t.memoizedState,i]},useDebugValue:mc,useDeferredValue:function(t,a){var i=Ct();return gc(i,t,a)},useTransition:function(){var t=dc(!1);return t=Np.bind(null,ge,t.queue,!0,!1),Ct().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,i){var s=ge,c=Ct();if(Ee){if(i===void 0)throw Error(o(407));i=i()}else{if(i=a(),Ue===null)throw Error(o(349));(we&127)!==0||up(s,a,i)}c.memoizedState=i;var d={value:i,getSnapshot:a};return c.queue=d,Tp(fp.bind(null,s,d,t),[t]),s.flags|=2048,Yr(9,{destroy:void 0},cp.bind(null,s,d,i,a),null),i},useId:function(){var t=Ct(),a=Ue.identifierPrefix;if(Ee){var i=vn,s=yn;i=(s&~(1<<32-Ht(s)-1)).toString(32)+i,a="_"+a+"R_"+i,i=xs++,0<i&&(a+="H"+i.toString(32)),a+="_"}else i=Wb++,a="_"+a+"r_"+i.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:vc,useFormState:Sp,useActionState:Sp,useOptimistic:function(t){var a=Ct();a.memoizedState=a.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=i,a=bc.bind(null,ge,!0,i),i.dispatch=a,[t,a]},useMemoCache:uc,useCacheRefresh:function(){return Ct().memoizedState=iS.bind(null,ge)},useEffectEvent:function(t){var a=Ct(),i={impl:t};return a.memoizedState=i,function(){if((Ae&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Sc={readContext:gt,use:Ms,useCallback:zp,useContext:gt,useEffect:pc,useImperativeHandle:Mp,useInsertionEffect:Ap,useLayoutEffect:xp,useMemo:kp,useReducer:zs,useRef:Cp,useState:function(){return zs(jn)},useDebugValue:mc,useDeferredValue:function(t,a){var i=Ke();return Lp(i,ke.memoizedState,t,a)},useTransition:function(){var t=zs(jn)[0],a=Ke().memoizedState;return[typeof t=="boolean"?t:Xi(t),a]},useSyncExternalStore:lp,useId:Bp,useHostTransitionStatus:vc,useFormState:wp,useActionState:wp,useOptimistic:function(t,a){var i=Ke();return pp(i,ke,t,a)},useMemoCache:uc,useCacheRefresh:jp};Sc.useEffectEvent=Rp;var Vp={readContext:gt,use:Ms,useCallback:zp,useContext:gt,useEffect:pc,useImperativeHandle:Mp,useInsertionEffect:Ap,useLayoutEffect:xp,useMemo:kp,useReducer:fc,useRef:Cp,useState:function(){return fc(jn)},useDebugValue:mc,useDeferredValue:function(t,a){var i=Ke();return ke===null?gc(i,t,a):Lp(i,ke.memoizedState,t,a)},useTransition:function(){var t=fc(jn)[0],a=Ke().memoizedState;return[typeof t=="boolean"?t:Xi(t),a]},useSyncExternalStore:lp,useId:Bp,useHostTransitionStatus:vc,useFormState:Ep,useActionState:Ep,useOptimistic:function(t,a){var i=Ke();return ke!==null?pp(i,ke,t,a):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:uc,useCacheRefresh:jp};Vp.useEffectEvent=Rp;function wc(t,a,i,s){a=t.memoizedState,i=i(s,a),i=i==null?a:y({},a,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var _c={enqueueSetState:function(t,a,i){t=t._reactInternals;var s=Gt(),c=ca(s);c.payload=a,i!=null&&(c.callback=i),a=fa(t,c,s),a!==null&&(kt(a,t,s),Ii(a,t,s))},enqueueReplaceState:function(t,a,i){t=t._reactInternals;var s=Gt(),c=ca(s);c.tag=1,c.payload=a,i!=null&&(c.callback=i),a=fa(t,c,s),a!==null&&(kt(a,t,s),Ii(a,t,s))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var i=Gt(),s=ca(i);s.tag=2,a!=null&&(s.callback=a),a=fa(t,s,i),a!==null&&(kt(a,t,i),Ii(a,t,i))}};function Zp(t,a,i,s,c,d,g){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,d,g):a.prototype&&a.prototype.isPureReactComponent?!Bi(i,s)||!Bi(c,d):!0}function Ip(t,a,i,s){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(i,s),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(i,s),a.state!==t&&_c.enqueueReplaceState(a,a.state,null)}function tr(t,a){var i=a;
vendor: 12,150 bytes, line 9
9if("ref"in a){i={};for(var s in a)s!=="ref"&&(i[s]=a[s])}if(t=t.defaultProps){i===a&&(i=y({},i));for(var c in t)i[c]===void 0&&(i[c]=t[c])}return i}function Qp(t){ds(t)}function Gp(t){console.error(t)}function Yp(t){ds(t)}function Ds(t,a){try{var i=t.onUncaughtError;i(a.value,{componentStack:a.stack})}catch(s){setTimeout(function(){throw s})}}function Xp(t,a,i){try{var s=t.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Ec(t,a,i){return i=ca(i),i.tag=3,i.payload={element:null},i.callback=function(){Ds(t,a)},i}function Kp(t){return t=ca(t),t.tag=3,t}function Fp(t,a,i,s){var c=i.type.getDerivedStateFromError;if(typeof c=="function"){var d=s.value;t.payload=function(){return c(d)},t.callback=function(){Xp(a,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(t.callback=function(){Xp(a,i,s),typeof c!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function sS(t,a,i,s,c){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(a=i.alternate,a!==null&&Hr(a,i,c,!0),i=Vt.current,i!==null){switch(i.tag){case 31:case 13:return an===null?Gs():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=c,s===_s?i.flags|=16384:(a=i.updateQueue,a===null?i.updateQueue=new Set([s]):a.add(s),Yc(t,s,c)),!1;case 22:return i.flags|=65536,s===_s?i.flags|=16384:(a=i.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=a):(i=a.retryQueue,i===null?a.retryQueue=new Set([s]):i.add(s)),Yc(t,s,c)),!1}throw Error(o(435,i.tag))}return Yc(t,s,c),Gs(),!1}if(Ee)return a=Vt.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=c,s!==$u&&(t=Error(o(422),{cause:s}),Hi(Wt(t,i)))):(s!==$u&&(a=Error(o(423),{cause:s}),Hi(Wt(a,i))),t=t.current.alternate,t.flags|=65536,c&=-c,t.lanes|=c,s=Wt(s,i),c=Ec(t.stateNode,s,c),Wu(t,c),Ye!==4&&(Ye=2)),!1;var d=Error(o(520),{cause:s});if(d=Wt(d,i),io===null?io=[d]:io.push(d),Ye!==4&&(Ye=2),a===null)return!0;s=Wt(s,i),i=a;do{switch(i.tag){case 3:return i.flags|=65536,t=c&-c,i.lanes|=t,t=Ec(i.stateNode,s,t),Wu(i,t),!1;case 1:if(a=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(ya===null||!ya.has(d))))return i.flags|=65536,c&=-c,i.lanes|=c,c=Kp(c),Fp(c,t,i,s),Wu(i,c),!1}i=i.return}while(i!==null);return!1}var Cc=Error(o(461)),We=!1;function yt(t,a,i,s){a.child=t===null?tp(a,null,i,s):Wa(a,t.child,i,s)}function Jp(t,a,i,s,c){i=i.render;var d=a.ref;if("ref"in s){var g={};for(var S in s)S!=="ref"&&(g[S]=s[S])}else g=s;return Xa(a),s=ic(t,a,i,g,d,c),S=oc(),t!==null&&!We?(sc(t,a,c),qn(t,a,c)):(Ee&&S&&Hu(a),a.flags|=1,yt(t,a,s,c),a.child)}function Wp(t,a,i,s,c){if(t===null){var d=i.type;return typeof d=="function"&&!Bu(d)&&d.defaultProps===void 0&&i.compare===null?(a.tag=15,a.type=d,em(t,a,d,s,c)):(t=gs(i.type,null,s,a,a.mode,c),t.ref=a.ref,t.return=a,a.child=t)}if(d=t.child,!kc(t,c)){var g=d.memoizedProps;if(i=i.compare,i=i!==null?i:Bi,i(g,s)&&t.ref===a.ref)return qn(t,a,c)}return a.flags|=1,t=Ln(d,s),t.ref=a.ref,t.return=a,a.child=t}function em(t,a,i,s,c){if(t!==null){var d=t.memoizedProps;if(Bi(d,s)&&t.ref===a.ref)if(We=!1,a.pendingProps=s=d,kc(t,c))(t.flags&131072)!==0&&(We=!0);else return a.lanes=t.lanes,qn(t,a,c)}return Tc(t,a,i,s,c)}function tm(t,a,i,s){var c=s.children,d=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((a.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,t!==null){for(s=a.child=t.child,c=0;s!==null;)c=c|s.lanes|s.childLanes,s=s.sibling;s=c&~d}else s=0,a.child=null;return nm(t,a,d,i,s)}if((i&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ss(a,d!==null?d.cachePool:null),d!==null?rp(a,d):tc(),ip(a);else return s=a.lanes=536870912,nm(t,a,d!==null?d.baseLanes|i:i,i,s)}else d!==null?(Ss(a,d.cachePool),rp(a,d),ha(),a.memoizedState=null):(t!==null&&Ss(a,null),tc(),ha());return yt(t,a,c,i),a.child}function Ji(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function nm(t,a,i,s,c){var d=Xu();return d=d===null?null:{parent:Fe._currentValue,pool:d},a.memoizedState={baseLanes:i,cachePool:d},t!==null&&Ss(a,null),tc(),ip(a),t!==null&&Hr(t,a,s,!0),a.childLanes=c,null}function Us(t,a){return a=js({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function am(t,a,i){return Wa(a,t.child,null,i),t=Us(a,a.pendingProps),t.flags|=2,Zt(a),a.memoizedState=null,t}function lS(t,a,i){var s=a.pendingProps,c=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Ee){if(s.mode==="hidden")return t=Us(a,s),a.lanes=536870912,Ji(null,t);if(ac(a),(t=He)?(t=mg(t,nn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ia!==null?{id:yn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},i=Hh(t),i.return=a,a.child=i,mt=a,He=null)):t=null,t===null)throw sa(a);return a.lanes=536870912,null}return Us(a,s)}var d=t.memoizedState;if(d!==null){var g=d.dehydrated;if(ac(a),c)if(a.flags&256)a.flags&=-257,a=am(t,a,i);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(o(558));else if(We||Hr(t,a,i,!1),c=(i&t.childLanes)!==0,We||c){if(s=Ue,s!==null&&(g=Gd(s,i),g!==0&&g!==d.retryLane))throw d.retryLane=g,Ia(t,g),kt(s,t,g),Cc;Gs(),a=am(t,a,i)}else t=d.treeContext,He=rn(g.nextSibling),mt=a,Ee=!0,oa=null,nn=!1,t!==null&&Vh(a,t),a=Us(a,s),a.flags|=4096;return a}return t=Ln(t.child,{mode:s.mode,children:s.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Bs(t,a){var i=a.ref;if(i===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(t===null||t.ref!==i)&&(a.flags|=4194816)}}function Tc(t,a,i,s,c){return Xa(a),i=ic(t,a,i,s,void 0,c),s=oc(),t!==null&&!We?(sc(t,a,c),qn(t,a,c)):(Ee&&s&&Hu(a),a.flags|=1,yt(t,a,i,c),a.child)}function rm(t,a,i,s,c,d){return Xa(a),a.updateQueue=null,i=sp(a,s,i,c),op(t),s=oc(),t!==null&&!We?(sc(t,a,d),qn(t,a,d)):(Ee&&s&&Hu(a),a.flags|=1,yt(t,a,i,d),a.child)}function im(t,a,i,s,c){if(Xa(a),a.stateNode===null){var d=Ur,g=i.contextType;typeof g=="object"&&g!==null&&(d=gt(g)),d=new i(s,d),a.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=_c,a.stateNode=d,d._reactInternals=a,d=a.stateNode,d.props=s,d.state=a.memoizedState,d.refs={},Fu(a),g=i.contextType,d.context=typeof g=="object"&&g!==null?gt(g):Ur,d.state=a.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(wc(a,i,g,s),d.state=a.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(g=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),g!==d.state&&_c.enqueueReplaceState(d,d.state,null),Gi(a,s,d,c),Qi(),d.state=a.memoizedState),typeof d.componentDidMount=="function"&&(a.flags|=4194308),s=!0}else if(t===null){d=a.stateNode;var S=a.memoizedProps,A=tr(i,S);d.props=A;var D=d.context,I=i.contextType;g=Ur,typeof I=="object"&&I!==null&&(g=gt(I));var Y=i.getDerivedStateFromProps;I=typeof Y=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=a.pendingProps!==S,I||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||D!==g)&&Ip(a,d,s,g),ua=!1;var j=a.memoizedState;d.state=j,Gi(a,s,d,c),Qi(),D=a.memoizedState,S||j!==D||ua?(typeof Y=="function"&&(wc(a,i,Y,s),D=a.memoizedState),(A=ua||Zp(a,i,A,s,j,D,g))?(I||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(a.flags|=4194308)):(typeof d.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=s,a.memoizedState=D),d.props=s,d.state=D,d.context=g,s=A):(typeof d.componentDidMount=="function"&&(a.flags|=4194308),s=!1)}else{d=a.stateNode,Ju(t,a),g=a.memoizedProps,I=tr(i,g),d.props=I,Y=a.pendingProps,j=d.context,D=i.contextType,A=Ur,typeof D=="object"&&D!==null&&(A=gt(D)),S=i.getDerivedStateFromProps,(D=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(g!==Y||j!==A)&&Ip(a,d,s,A),ua=!1,j=a.memoizedState,d.state=j,Gi(a,s,d,c),Qi();var q=a.memoizedState;g!==Y||j!==q||ua||t!==null&&t.dependencies!==null&&vs(t.dependencies)?(typeof S=="function"&&(wc(a,i,S,s),q=a.memoizedState),(I=ua||Zp(a,i,I,s,j,q,A)||t!==null&&t.dependencies!==null&&vs(t.dependencies))?(D||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,q,A),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,q,A)),typeof d.componentDidUpdate=="function"&&(a.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof d.componentDidUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(a.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(a.flags|=1024),a.memoizedProps=s,a.memoizedState=q),d.props=s,d.state=q,d.context=A,s=I):(typeof d.componentDidUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(a.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&j===t.memoizedState||(a.flags|=1024),s=!1)}return d=s,Bs(t,a),s=(a.flags&128)!==0,d||s?(d=a.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:d.render(),a.flags|=1,t!==null&&s?(a.child=Wa(a,t.child,null,c),a.child=Wa(a,null,i,c)):yt(t,a,i,c),a.memoizedState=d.state,t=a.child):t=qn(t,a,c),t}function om(t,a,i,s){return Ga(),a.flags|=256,yt(t,a,i,s),a.child}var Rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ac(t){return{baseLanes:t,cachePool:Xh()}}function xc(t,a,i){return t=t!==null?t.childLanes&~i:0,a&&(t|=Qt),t}function sm(t,a,i){var s=a.pendingProps,c=!1,d=(a.flags&128)!==0,g;if((g=d)||(g=t!==null&&t.memoizedState===null?!1:(Xe.current&2)!==0),g&&(c=!0,a.flags&=-129),g=(a.flags&32)!==0,a.flags&=-33,t===null){if(Ee){if(c?da(a):ha(),(t=He)?(t=mg(t,nn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ia!==null?{id:yn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},i=Hh(t),i.return=a,a.child=i,mt=a,He=null)):t=null,t===null)throw sa(a);return ff(t)?a.lanes=32:a.lanes=536870912,null}var S=s.children;return s=s.fallback,c?(ha(),c=a.mode,S=js({mode:"hidden",children:S},c),s=Qa(s,c,i,null),S.return=a,s.return=a,S.sibling=s,a.child=S,s=a.child,s.memoizedState=Ac(i),s.childLanes=xc(t,g,i),a.memoizedState=Rc,Ji(null,s)):(da(a),Oc(a,S))}var A=t.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(d)a.flags&256?(da(a),a.flags&=-257,a=Mc(t,a,i)):a.memoizedState!==null?(ha(),a.child=t.child,a.flags|=128,a=null):(ha(),S=s.fallback,c=a.mode,s=js({mode:"visible",children:s.children},c),S=Qa(S,c,i,null),S.flags|=2,s.return=a,S.return=a,s.sibling=S,a.child=s,Wa(a,t.child,null,i),s=a.child,s.memoizedState=Ac(i),s.childLanes=xc(t,g,i),a.memoizedState=Rc,a=Ji(null,s));else if(da(a),ff(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var D=g.dgst;g=D,s=Error(o(419)),s.stack="",s.digest=g,Hi({value:s,source:null,stack:null}),a=Mc(t,a,i)}else if(We||Hr(t,a,i,!1),g=(i&t.childLanes)!==0,We||g){if(g=Ue,g!==null&&(s=Gd(g,i),s!==0&&s!==A.retryLane))throw A.retryLane=s,Ia(t,s),kt(g,t,s),Cc;cf(S)||Gs(),a=Mc(t,a,i)}else cf(S)?(a.flags|=192,a.child=t.child,a=null):(t=A.treeContext,He=rn(S.nextSibling),mt=a,Ee=!0,oa=null,nn=!1,t!==null&&Vh(a,t),a=Oc(a,s.children),a.flags|=4096);return a}
vendor: 9,397 bytes, line 9
9return c?(ha(),S=s.fallback,c=a.mode,A=t.child,D=A.sibling,s=Ln(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,D!==null?S=Ln(D,S):(S=Qa(S,c,i,null),S.flags|=2),S.return=a,s.return=a,s.sibling=S,a.child=s,Ji(null,s),s=a.child,S=t.child.memoizedState,S===null?S=Ac(i):(c=S.cachePool,c!==null?(A=Fe._currentValue,c=c.parent!==A?{parent:A,pool:A}:c):c=Xh(),S={baseLanes:S.baseLanes|i,cachePool:c}),s.memoizedState=S,s.childLanes=xc(t,g,i),a.memoizedState=Rc,Ji(t.child,s)):(da(a),i=t.child,t=i.sibling,i=Ln(i,{mode:"visible",children:s.children}),i.return=a,i.sibling=null,t!==null&&(g=a.deletions,g===null?(a.deletions=[t],a.flags|=16):g.push(t)),a.child=i,a.memoizedState=null,i)}function Oc(t,a){return a=js({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function js(t,a){return t=$t(22,t,null,a),t.lanes=0,t}function Mc(t,a,i){return Wa(a,t.child,null,i),t=Oc(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function lm(t,a,i){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a),Iu(t.return,a,i)}function zc(t,a,i,s,c,d){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:c,treeForkCount:d}:(g.isBackwards=a,g.rendering=null,g.renderingStartTime=0,g.last=s,g.tail=i,g.tailMode=c,g.treeForkCount=d)}function um(t,a,i){var s=a.pendingProps,c=s.revealOrder,d=s.tail;s=s.children;var g=Xe.current,S=(g&2)!==0;if(S?(g=g&1|2,a.flags|=128):g&=1,Q(Xe,g),yt(t,a,s,i),s=Ee?qi:0,!S&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&lm(t,i,a);else if(t.tag===19)lm(t,i,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(c){case"forwards":for(i=a.child,c=null;i!==null;)t=i.alternate,t!==null&&Rs(t)===null&&(c=i),i=i.sibling;i=c,i===null?(c=a.child,a.child=null):(c=i.sibling,i.sibling=null),zc(a,!1,c,i,d,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,c=a.child,a.child=null;c!==null;){if(t=c.alternate,t!==null&&Rs(t)===null){a.child=c;break}t=c.sibling,c.sibling=i,i=c,c=t}zc(a,!0,i,null,d,s);break;case"together":zc(a,!1,null,null,void 0,s);break;default:a.memoizedState=null}return a.child}function qn(t,a,i){if(t!==null&&(a.dependencies=t.dependencies),ga|=a.lanes,(i&a.childLanes)===0)if(t!==null){if(Hr(t,a,i,!1),(i&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(o(153));if(a.child!==null){for(t=a.child,i=Ln(t,t.pendingProps),a.child=i,i.return=a;t.sibling!==null;)t=t.sibling,i=i.sibling=Ln(t,t.pendingProps),i.return=a;i.sibling=null}return a.child}function kc(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&vs(t)))}function uS(t,a,i){switch(a.tag){case 3:je(a,a.stateNode.containerInfo),la(a,Fe,t.memoizedState.cache),Ga();break;case 27:case 5:An(a);break;case 4:je(a,a.stateNode.containerInfo);break;case 10:la(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,ac(a),null;break;case 13:var s=a.memoizedState;if(s!==null)return s.dehydrated!==null?(da(a),a.flags|=128,null):(i&a.child.childLanes)!==0?sm(t,a,i):(da(a),t=qn(t,a,i),t!==null?t.sibling:null);da(a);break;case 19:var c=(t.flags&128)!==0;if(s=(i&a.childLanes)!==0,s||(Hr(t,a,i,!1),s=(i&a.childLanes)!==0),c){if(s)return um(t,a,i);a.flags|=128}if(c=a.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Q(Xe,Xe.current),s)break;return null;case 22:return a.lanes=0,tm(t,a,i,a.pendingProps);case 24:la(a,Fe,t.memoizedState.cache)}return qn(t,a,i)}function cm(t,a,i){if(t!==null)if(t.memoizedProps!==a.pendingProps)We=!0;else{if(!kc(t,i)&&(a.flags&128)===0)return We=!1,uS(t,a,i);We=(t.flags&131072)!==0}else We=!1,Ee&&(a.flags&1048576)!==0&&$h(a,qi,a.index);switch(a.lanes=0,a.tag){case 16:e:{var s=a.pendingProps;if(t=Fa(a.elementType),a.type=t,typeof t=="function")Bu(t)?(s=tr(t,s),a.tag=1,a=im(null,a,t,s,i)):(a.tag=0,a=Tc(null,a,t,s,i));else{if(t!=null){var c=t.$$typeof;if(c===B){a.tag=11,a=Jp(null,a,t,s,i);break e}else if(c===V){a.tag=14,a=Wp(null,a,t,s,i);break e}}throw a=xe(t)||t,Error(o(306,a,""))}}return a;case 0:return Tc(t,a,a.type,a.pendingProps,i);case 1:return s=a.type,c=tr(s,a.pendingProps),im(t,a,s,c,i);case 3:e:{if(je(a,a.stateNode.containerInfo),t===null)throw Error(o(387));s=a.pendingProps;var d=a.memoizedState;c=d.element,Ju(t,a),Gi(a,s,null,i);var g=a.memoizedState;if(s=g.cache,la(a,Fe,s),s!==d.cache&&Qu(a,[Fe],i,!0),Qi(),s=g.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:g.cache},a.updateQueue.baseState=d,a.memoizedState=d,a.flags&256){a=om(t,a,s,i);break e}else if(s!==c){c=Wt(Error(o(424)),a),Hi(c),a=om(t,a,s,i);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(He=rn(t.firstChild),mt=a,Ee=!0,oa=null,nn=!0,i=tp(a,null,s,i),a.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ga(),s===c){a=qn(t,a,i);break e}yt(t,a,s,i)}a=a.child}return a;case 26:return Bs(t,a),t===null?(i=wg(a.type,null,a.pendingProps,null))?a.memoizedState=i:Ee||(i=a.type,t=a.pendingProps,s=el(ae.current).createElement(i),s[pt]=a,s[Rt]=t,vt(s,i,t),ct(s),a.stateNode=s):a.memoizedState=wg(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return An(a),t===null&&Ee&&(s=a.stateNode=vg(a.type,a.pendingProps,ae.current),mt=a,nn=!0,c=He,wa(a.type)?(df=c,He=rn(s.firstChild)):He=c),yt(t,a,a.pendingProps.children,i),Bs(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Ee&&((c=s=He)&&(s=qS(s,a.type,a.pendingProps,nn),s!==null?(a.stateNode=s,mt=a,He=rn(s.firstChild),nn=!1,c=!0):c=!1),c||sa(a)),An(a),c=a.type,d=a.pendingProps,g=t!==null?t.memoizedProps:null,s=d.children,sf(c,d)?s=null:g!==null&&sf(c,g)&&(a.flags|=32),a.memoizedState!==null&&(c=ic(t,a,eS,null,null,i),po._currentValue=c),Bs(t,a),yt(t,a,s,i),a.child;case 6:return t===null&&Ee&&((t=i=He)&&(i=HS(i,a.pendingProps,nn),i!==null?(a.stateNode=i,mt=a,He=null,t=!0):t=!1),t||sa(a)),null;case 13:return sm(t,a,i);case 4:return je(a,a.stateNode.containerInfo),s=a.pendingProps,t===null?a.child=Wa(a,null,s,i):yt(t,a,s,i),a.child;case 11:return Jp(t,a,a.type,a.pendingProps,i);case 7:return yt(t,a,a.pendingProps,i),a.child;case 8:return yt(t,a,a.pendingProps.children,i),a.child;case 12:return yt(t,a,a.pendingProps.children,i),a.child;case 10:return s=a.pendingProps,la(a,a.type,s.value),yt(t,a,s.children,i),a.child;case 9:return c=a.type._context,s=a.pendingProps.children,Xa(a),c=gt(c),s=s(c),a.flags|=1,yt(t,a,s,i),a.child;case 14:return Wp(t,a,a.type,a.pendingProps,i);case 15:return em(t,a,a.type,a.pendingProps,i);case 19:return um(t,a,i);case 31:return lS(t,a,i);case 22:return tm(t,a,i,a.pendingProps);case 24:return Xa(a),s=gt(Fe),t===null?(c=Xu(),c===null&&(c=Ue,d=Gu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=i),c=d),a.memoizedState={parent:s,cache:c},Fu(a),la(a,Fe,c)):((t.lanes&i)!==0&&(Ju(t,a),Gi(a,null,null,i),Qi()),c=t.memoizedState,d=a.memoizedState,c.parent!==s?(c={parent:s,cache:s},a.memoizedState=c,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=c),la(a,Fe,s)):(s=d.cache,la(a,Fe,s),s!==c.cache&&Qu(a,[Fe],i,!0))),yt(t,a,a.pendingProps.children,i),a.child;case 29:throw a.pendingProps}throw Error(o(156,a.tag))}function Hn(t){t.flags|=4}function Lc(t,a,i,s,c){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(c&335544128)===c)if(t.stateNode.complete)t.flags|=8192;else if(Bm())t.flags|=8192;else throw Ja=_s,Ku}else t.flags&=-16777217}function fm(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Rg(a))if(Bm())t.flags|=8192;else throw Ja=_s,Ku}function qs(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?Zd():536870912,t.lanes|=a,Jr|=a)}function Wi(t,a){if(!Ee)switch(t.tailMode){case"hidden":a=t.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function Pe(t){var a=t.alternate!==null&&t.alternate.child===t.child,i=0,s=0;if(a)for(var c=t.child;c!==null;)i|=c.lanes|c.childLanes,s|=c.subtreeFlags&65011712,s|=c.flags&65011712,c.return=t,c=c.sibling;else for(c=t.child;c!==null;)i|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=t,c=c.sibling;return t.subtreeFlags|=s,t.childLanes=i,a}function cS(t,a,i){var s=a.pendingProps;switch(Pu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(a),null;case 1:return Pe(a),null;case 3:return i=a.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Un(Fe),De(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(qr(a)?Hn(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Vu())),Pe(a),null;case 26:var c=a.type,d=a.memoizedState;return t===null?(Hn(a),d!==null?(Pe(a),fm(a,d)):(Pe(a),Lc(a,c,null,s,i))):d?d!==t.memoizedState?(Hn(a),Pe(a),fm(a,d)):(Pe(a),a.flags&=-16777217):(t=t.memoizedProps,t!==s&&Hn(a),Pe(a),Lc(a,c,t,s,i)),null;case 27:if(xn(a),i=ae.current,c=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&Hn(a);
vendor: 5,299 bytes, line 9
9else{if(!s){if(a.stateNode===null)throw Error(o(166));return Pe(a),null}t=ee.current,qr(a)?Zh(a):(t=vg(c,s,i),a.stateNode=t,Hn(a))}return Pe(a),null;case 5:if(xn(a),c=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&Hn(a);else{if(!s){if(a.stateNode===null)throw Error(o(166));return Pe(a),null}if(d=ee.current,qr(a))Zh(a);else{var g=el(ae.current);switch(d){case 1:d=g.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=g.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=g.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?g.createElement(c,{is:s.is}):g.createElement(c)}}d[pt]=a,d[Rt]=s;e:for(g=a.child;g!==null;){if(g.tag===5||g.tag===6)d.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===a)break e;for(;g.sibling===null;){if(g.return===null||g.return===a)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}a.stateNode=d;e:switch(vt(d,c,s),c){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Hn(a)}}return Pe(a),Lc(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,i),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==s&&Hn(a);else{if(typeof s!="string"&&a.stateNode===null)throw Error(o(166));if(t=ae.current,qr(a)){if(t=a.stateNode,i=a.memoizedProps,s=null,c=mt,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}t[pt]=a,t=!!(t.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||sg(t.nodeValue,i)),t||sa(a,!0)}else t=el(t).createTextNode(s),t[pt]=a,a.stateNode=t}return Pe(a),null;case 31:if(i=a.memoizedState,t===null||t.memoizedState!==null){if(s=qr(a),i!==null){if(t===null){if(!s)throw Error(o(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[pt]=a}else Ga(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pe(a),t=!1}else i=Vu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return a.flags&256?(Zt(a),a):(Zt(a),null);if((a.flags&128)!==0)throw Error(o(558))}return Pe(a),null;case 13:if(s=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(c=qr(a),s!==null&&s.dehydrated!==null){if(t===null){if(!c)throw Error(o(318));if(c=a.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[pt]=a}else Ga(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pe(a),c=!1}else c=Vu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=c),c=!0;if(!c)return a.flags&256?(Zt(a),a):(Zt(a),null)}return Zt(a),(a.flags&128)!==0?(a.lanes=i,a):(i=s!==null,t=t!==null&&t.memoizedState!==null,i&&(s=a.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048)),i!==t&&i&&(a.child.flags|=8192),qs(a,a.updateQueue),Pe(a),null);case 4:return De(),t===null&&tf(a.stateNode.containerInfo),Pe(a),null;case 10:return Un(a.type),Pe(a),null;case 19:if(L(Xe),s=a.memoizedState,s===null)return Pe(a),null;if(c=(a.flags&128)!==0,d=s.rendering,d===null)if(c)Wi(s,!1);else{if(Ye!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(d=Rs(t),d!==null){for(a.flags|=128,Wi(s,!1),t=d.updateQueue,a.updateQueue=t,qs(a,t),a.subtreeFlags=0,t=i,i=a.child;i!==null;)qh(i,t),i=i.sibling;return Q(Xe,Xe.current&1|2),Ee&&Nn(a,s.treeForkCount),a.child}t=t.sibling}s.tail!==null&&wt()>Zs&&(a.flags|=128,c=!0,Wi(s,!1),a.lanes=4194304)}else{if(!c)if(t=Rs(d),t!==null){if(a.flags|=128,c=!0,t=t.updateQueue,a.updateQueue=t,qs(a,t),Wi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Ee)return Pe(a),null}else 2*wt()-s.renderingStartTime>Zs&&i!==536870912&&(a.flags|=128,c=!0,Wi(s,!1),a.lanes=4194304);s.isBackwards?(d.sibling=a.child,a.child=d):(t=s.last,t!==null?t.sibling=d:a.child=d,s.last=d)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=wt(),t.sibling=null,i=Xe.current,Q(Xe,c?i&1|2:i&1),Ee&&Nn(a,s.treeForkCount),t):(Pe(a),null);case 22:case 23:return Zt(a),nc(),s=a.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(a.flags|=8192):s&&(a.flags|=8192),s?(i&536870912)!==0&&(a.flags&128)===0&&(Pe(a),a.subtreeFlags&6&&(a.flags|=8192)):Pe(a),i=a.updateQueue,i!==null&&qs(a,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==i&&(a.flags|=2048),t!==null&&L(Ka),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),a.memoizedState.cache!==i&&(a.flags|=2048),Un(Fe),Pe(a),null;case 25:return null;case 30:return null}throw Error(o(156,a.tag))}function fS(t,a){switch(Pu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;
vendor: 20,170 bytes, line 9
9case 3:return Un(Fe),De(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return xn(a),null;case 31:if(a.memoizedState!==null){if(Zt(a),a.alternate===null)throw Error(o(340));Ga()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(Zt(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(o(340));Ga()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return L(Xe),null;case 4:return De(),null;case 10:return Un(a.type),null;case 22:case 23:return Zt(a),nc(),t!==null&&L(Ka),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return Un(Fe),null;case 25:return null;default:return null}}function dm(t,a){switch(Pu(a),a.tag){case 3:Un(Fe),De();break;case 26:case 27:case 5:xn(a);break;case 4:De();break;case 31:a.memoizedState!==null&&Zt(a);break;case 13:Zt(a);break;case 19:L(Xe);break;case 10:Un(a.type);break;case 22:case 23:Zt(a),nc(),t!==null&&L(Ka);break;case 24:Un(Fe)}}function eo(t,a){try{var i=a.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var c=s.next;i=c;do{if((i.tag&t)===t){s=void 0;var d=i.create,g=i.inst;s=d(),g.destroy=s}i=i.next}while(i!==c)}}catch(S){Me(a,a.return,S)}}function pa(t,a,i){try{var s=a.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var d=c.next;s=d;do{if((s.tag&t)===t){var g=s.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,c=a;var A=i,D=S;try{D()}catch(I){Me(c,A,I)}}}s=s.next}while(s!==d)}}catch(I){Me(a,a.return,I)}}function hm(t){var a=t.updateQueue;if(a!==null){var i=t.stateNode;try{ap(a,i)}catch(s){Me(t,t.return,s)}}}function pm(t,a,i){i.props=tr(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(s){Me(t,a,s)}}function to(t,a){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof i=="function"?t.refCleanup=i(s):i.current=s}}catch(c){Me(t,a,c)}}function bn(t,a){var i=t.ref,s=t.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(c){Me(t,a,c)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(c){Me(t,a,c)}else i.current=null}function mm(t){var a=t.type,i=t.memoizedProps,s=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(c){Me(t,t.return,c)}}function Nc(t,a,i){try{var s=t.stateNode;LS(s,t.type,i,a),s[Rt]=a}catch(c){Me(t,t.return,c)}}function gm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&wa(t.type)||t.tag===4}function Dc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||gm(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&&wa(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 Uc(t,a,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,a):(a=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,a.appendChild(t),i=i._reactRootContainer,i!=null||a.onclick!==null||(a.onclick=zn));else if(s!==4&&(s===27&&wa(t.type)&&(i=t.stateNode,a=null),t=t.child,t!==null))for(Uc(t,a,i),t=t.sibling;t!==null;)Uc(t,a,i),t=t.sibling}function Hs(t,a,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?i.insertBefore(t,a):i.appendChild(t);else if(s!==4&&(s===27&&wa(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Hs(t,a,i),t=t.sibling;t!==null;)Hs(t,a,i),t=t.sibling}function ym(t){var a=t.stateNode,i=t.memoizedProps;try{for(var s=t.type,c=a.attributes;c.length;)a.removeAttributeNode(c[0]);vt(a,s,i),a[pt]=t,a[Rt]=i}catch(d){Me(t,t.return,d)}}var Pn=!1,et=!1,Bc=!1,vm=typeof WeakSet=="function"?WeakSet:Set,ft=null;function dS(t,a){if(t=t.containerInfo,rf=sl,t=Mh(t),Mu(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var g=0,S=-1,A=-1,D=0,I=0,Y=t,j=null;t:for(;;){for(var q;Y!==i||c!==0&&Y.nodeType!==3||(S=g+c),Y!==d||s!==0&&Y.nodeType!==3||(A=g+s),Y.nodeType===3&&(g+=Y.nodeValue.length),(q=Y.firstChild)!==null;)j=Y,Y=q;for(;;){if(Y===t)break t;if(j===i&&++D===c&&(S=g),j===d&&++I===s&&(A=g),(q=Y.nextSibling)!==null)break;Y=j,j=Y.parentNode}Y=q}i=S===-1||A===-1?null:{start:S,end:A}}else i=null}i=i||{start:0,end:0}}else i=null;for(of={focusedElem:t,selectionRange:i},sl=!1,ft=a;ft!==null;)if(a=ft,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,ft=t;else for(;ft!==null;){switch(a=ft,d=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)c=t[i],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&d!==null){t=void 0,i=a,c=d.memoizedProps,d=d.memoizedState,s=i.stateNode;try{var ie=tr(i.type,c);t=s.getSnapshotBeforeUpdate(ie,d),s.__reactInternalSnapshotBeforeUpdate=t}catch(de){Me(i,i.return,de)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,i=t.nodeType,i===9)uf(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":uf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=a.sibling,t!==null){t.return=a.return,ft=t;break}ft=a.return}}function bm(t,a,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Vn(t,i),s&4&&eo(5,i);break;case 1:if(Vn(t,i),s&4)if(t=i.stateNode,a===null)try{t.componentDidMount()}catch(g){Me(i,i.return,g)}else{var c=tr(i.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(c,a,t.__reactInternalSnapshotBeforeUpdate)}catch(g){Me(i,i.return,g)}}s&64&&hm(i),s&512&&to(i,i.return);break;case 3:if(Vn(t,i),s&64&&(t=i.updateQueue,t!==null)){if(a=null,i.child!==null)switch(i.child.tag){case 27:case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}try{ap(t,a)}catch(g){Me(i,i.return,g)}}break;case 27:a===null&&s&4&&ym(i);case 26:case 5:Vn(t,i),a===null&&s&4&&mm(i),s&512&&to(i,i.return);break;case 12:Vn(t,i);break;case 31:Vn(t,i),s&4&&_m(t,i);break;case 13:Vn(t,i),s&4&&Em(t,i),s&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=wS.bind(null,i),PS(t,i))));break;case 22:if(s=i.memoizedState!==null||Pn,!s){a=a!==null&&a.memoizedState!==null||et,c=Pn;var d=et;Pn=s,(et=a)&&!d?Zn(t,i,(i.subtreeFlags&8772)!==0):Vn(t,i),Pn=c,et=d}break;case 30:break;default:Vn(t,i)}}function Sm(t){var a=t.alternate;a!==null&&(t.alternate=null,Sm(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&hu(a)),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 Ve=null,xt=!1;function $n(t,a,i){for(i=i.child;i!==null;)wm(t,a,i),i=i.sibling}function wm(t,a,i){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(Ti,i)}catch{}switch(i.tag){case 26:et||bn(i,a),$n(t,a,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:et||bn(i,a);var s=Ve,c=xt;wa(i.type)&&(Ve=i.stateNode,xt=!1),$n(t,a,i),co(i.stateNode),Ve=s,xt=c;break;case 5:et||bn(i,a);case 6:if(s=Ve,c=xt,Ve=null,$n(t,a,i),Ve=s,xt=c,Ve!==null)if(xt)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(i.stateNode)}catch(d){Me(i,a,d)}else try{Ve.removeChild(i.stateNode)}catch(d){Me(i,a,d)}break;case 18:Ve!==null&&(xt?(t=Ve,hg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),oi(t)):hg(Ve,i.stateNode));break;case 4:s=Ve,c=xt,Ve=i.stateNode.containerInfo,xt=!0,$n(t,a,i),Ve=s,xt=c;break;case 0:case 11:case 14:case 15:pa(2,i,a),et||pa(4,i,a),$n(t,a,i);break;case 1:et||(bn(i,a),s=i.stateNode,typeof s.componentWillUnmount=="function"&&pm(i,a,s)),$n(t,a,i);break;case 21:$n(t,a,i);break;case 22:et=(s=et)||i.memoizedState!==null,$n(t,a,i),et=s;break;default:$n(t,a,i)}}function _m(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{oi(t)}catch(i){Me(a,a.return,i)}}}function Em(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{oi(t)}catch(i){Me(a,a.return,i)}}function hS(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new vm),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new vm),a;default:throw Error(o(435,t.tag))}}function Ps(t,a){var i=hS(t);a.forEach(function(s){if(!i.has(s)){i.add(s);var c=_S.bind(null,t,s);s.then(c,c)}})}function Ot(t,a){var i=a.deletions;if(i!==null)for(var s=0;s<i.length;s++){var c=i[s],d=t,g=a,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(wa(S.type)){Ve=S.stateNode,xt=!1;break e}break;case 5:Ve=S.stateNode,xt=!1;break e;case 3:case 4:Ve=S.stateNode.containerInfo,xt=!0;break e}S=S.return}if(Ve===null)throw Error(o(160));wm(d,g,c),Ve=null,xt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Cm(a,t),a=a.sibling}var dn=null;function Cm(t,a){var i=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ot(a,t),Mt(t),s&4&&(pa(3,t,t.return),eo(3,t),pa(5,t,t.return));break;case 1:Ot(a,t),Mt(t),s&512&&(et||i===null||bn(i,i.return)),s&64&&Pn&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var c=dn;if(Ot(a,t),Mt(t),s&512&&(et||i===null||bn(i,i.return)),s&4){var d=i!==null?i.memoizedState:null;if(s=t.memoizedState,i===null)if(s===null)if(t.stateNode===null){e:{s=t.type,i=t.memoizedProps,c=c.ownerDocument||c;t:switch(s){case"title":d=c.getElementsByTagName("title")[0],(!d||d[xi]||d[pt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(s),c.head.insertBefore(d,c.querySelector("head > title"))),vt(d,s,i),d[pt]=t,ct(d),s=d;break e;case"link":var g=Cg("link","href",c).get(s+(i.href||""));if(g){for(var S=0;S<g.length;S++)if(d=g[S],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){g.splice(S,1);break t}}d=c.createElement(s),vt(d,s,i),c.head.appendChild(d);break;case"meta":if(g=Cg("meta","content",c).get(s+(i.content||""))){for(S=0;S<g.length;S++)if(d=g[S],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){g.splice(S,1);break t}}d=c.createElement(s),vt(d,s,i),c.head.appendChild(d);break;default:throw Error(o(468,s))}d[pt]=t,ct(d),s=d}t.stateNode=s}else Tg(c,t.type,t.stateNode);else t.stateNode=Eg(c,s,t.memoizedProps);else d!==s?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,s===null?Tg(c,t.type,t.stateNode):Eg(c,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Nc(t,t.memoizedProps,i.memoizedProps)}break;case 27:Ot(a,t),Mt(t),s&512&&(et||i===null||bn(i,i.return)),i!==null&&s&4&&Nc(t,t.memoizedProps,i.memoizedProps);break;case 5:if(Ot(a,t),Mt(t),s&512&&(et||i===null||bn(i,i.return)),t.flags&32){c=t.stateNode;try{Or(c,"")}catch(ie){Me(t,t.return,ie)}}s&4&&t.stateNode!=null&&(c=t.memoizedProps,Nc(t,c,i!==null?i.memoizedProps:c)),s&1024&&(Bc=!0);break;case 6:if(Ot(a,t),Mt(t),s&4){if(t.stateNode===null)throw Error(o(162));s=t.memoizedProps,i=t.stateNode;try{i.nodeValue=s}catch(ie){Me(t,t.return,ie)}}break;case 3:if(al=null,c=dn,dn=tl(a.containerInfo),Ot(a,t),dn=c,Mt(t),s&4&&i!==null&&i.memoizedState.isDehydrated)try{oi(a.containerInfo)}catch(ie){Me(t,t.return,ie)}Bc&&(Bc=!1,Tm(t));break;case 4:s=dn,dn=tl(t.stateNode.containerInfo),Ot(a,t),Mt(t),dn=s;break;case 12:Ot(a,t),Mt(t);break;case 31:Ot(a,t),Mt(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ps(t,s)));break;case 13:Ot(a,t),Mt(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Vs=wt()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ps(t,s)));break;case 22:c=t.memoizedState!==null;var A=i!==null&&i.memoizedState!==null,D=Pn,I=et;if(Pn=D||c,et=I||A,Ot(a,t),et=I,Pn=D,Mt(t),s&8192)e:for(a=t.stateNode,a._visibility=c?a._visibility&-2:a._visibility|1,c&&(i===null||A||Pn||et||nr(t)),i=null,a=t;;){if(a.tag===5||a.tag===26){if(i===null){A=i=a;try{if(d=A.stateNode,c)g=d.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=A.stateNode;var Y=A.memoizedProps.style,j=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;S.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(ie){Me(A,A.return,ie)}}}else if(a.tag===6){if(i===null){A=a;try{A.stateNode.nodeValue=c?"":A.memoizedProps}catch(ie){Me(A,A.return,ie)}}}else if(a.tag===18){if(i===null){A=a;try{var q=A.stateNode;c?pg(q,!0):pg(A.stateNode,!1)}catch(ie){Me(A,A.return,ie)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;i===a&&(i=null),a=a.return}i===a&&(i=null),a.sibling.return=a.return,a=a.sibling}s&4&&(s=t.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Ps(t,i))));break;case 19:Ot(a,t),Mt(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ps(t,s)));break;case 30:break;case 21:break;default:Ot(a,t),Mt(t)}}function Mt(t){var a=t.flags;if(a&2){try{for(var i,s=t.return;s!==null;){if(gm(s)){i=s;break}s=s.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var c=i.stateNode,d=Dc(t);Hs(t,d,c);break;case 5:var g=i.stateNode;i.flags&32&&(Or(g,""),i.flags&=-33);var S=Dc(t);Hs(t,S,g);break;case 3:case 4:var A=i.stateNode.containerInfo,D=Dc(t);Uc(t,D,A);break;default:throw Error(o(161))}}catch(I){Me(t,t.return,I)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Tm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Tm(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function Vn(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)bm(t,a.alternate,a),a=a.sibling}function nr(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:pa(4,a,a.return),nr(a);break;case 1:bn(a,a.return);var i=a.stateNode;typeof i.componentWillUnmount=="function"&&pm(a,a.return,i),nr(a);break;case 27:co(a.stateNode);case 26:case 5:bn(a,a.return),nr(a);break;case 22:a.memoizedState===null&&nr(a);break;case 30:nr(a);break;default:nr(a)}t=t.sibling}}function Zn(t,a,i){for(i=i&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var s=a.alternate,c=t,d=a,g=d.flags;switch(d.tag){case 0:case 11:case 15:Zn(c,d,i),eo(4,d);break;case 1:if(Zn(c,d,i),s=d,c=s.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(D){Me(s,s.return,D)}if(s=d,c=s.updateQueue,c!==null){var S=s.stateNode;try{var A=c.shared.hiddenCallbacks;if(A!==null)for(c.shared.hiddenCallbacks=null,c=0;c<A.length;c++)np(A[c],S)}catch(D){Me(s,s.return,D)}}i&&g&64&&hm(d),to(d,d.return);break;case 27:ym(d);case 26:case 5:Zn(c,d,i),i&&s===null&&g&4&&mm(d),to(d,d.return);break;case 12:Zn(c,d,i);break;case 31:Zn(c,d,i),i&&g&4&&_m(c,d);break;case 13:Zn(c,d,i),i&&g&4&&Em(c,d);break;case 22:d.memoizedState===null&&Zn(c,d,i),to(d,d.return);break;case 30:break;default:Zn(c,d,i)}a=a.sibling}}function jc(t,a){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&Pi(i))}function qc(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Pi(t))}function hn(t,a,i,s){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Rm(t,a,i,s),a=a.sibling}function Rm(t,a,i,s){var c=a.flags;switch(a.tag){case 0:case 11:case 15:hn(t,a,i,s),c&2048&&eo(9,a);break;case 1:hn(t,a,i,s);break;case 3:hn(t,a,i,s),c&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Pi(t)));break;case 12:if(c&2048){hn(t,a,i,s),t=a.stateNode;try{var d=a.memoizedProps,g=d.id,S=d.onPostCommit;typeof S=="function"&&S(g,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Me(a,a.return,A)}}else hn(t,a,i,s);break;case 31:hn(t,a,i,s);break;case 13:hn(t,a,i,s);break;case 23:break;case 22:d=a.stateNode,g=a.alternate,a.memoizedState!==null?d._visibility&2?hn(t,a,i,s):no(t,a):d._visibility&2?hn(t,a,i,s):(d._visibility|=2,Xr(t,a,i,s,(a.subtreeFlags&10256)!==0||!1)),c&2048&&jc(g,a);break;case 24:hn(t,a,i,s),c&2048&&qc(a.alternate,a);break;default:hn(t,a,i,s)}}function Xr(t,a,i,s,c){for(c=c&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var d=t,g=a,S=i,A=s,D=g.flags;switch(g.tag){case 0:case 11:case 15:Xr(d,g,S,A,c),eo(8,g);break;case 23:break;case 22:var I=g.stateNode;g.memoizedState!==null?I._visibility&2?Xr(d,g,S,A,c):no(d,g):(I._visibility|=2,Xr(d,g,S,A,c)),c&&D&2048&&jc(g.alternate,g);break;case 24:Xr(d,g,S,A,c),c&&D&2048&&qc(g.alternate,g);break;default:Xr(d,g,S,A,c)}a=a.sibling}}function no(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var i=t,s=a,c=s.flags;switch(s.tag){case 22:no(i,s),c&2048&&jc(s.alternate,s);break;case 24:no(i,s),c&2048&&qc(s.alternate,s);break;default:no(i,s)}a=a.sibling}}var ao=8192;function Kr(t,a,i){if(t.subtreeFlags&ao)for(t=t.child;t!==null;)Am(t,a,i),t=t.sibling}function Am(t,a,i){switch(t.tag){case 26:Kr(t,a,i),t.flags&ao&&t.memoizedState!==null&&WS(i,dn,t.memoizedState,t.memoizedProps);break;case 5:Kr(t,a,i);break;case 3:case 4:var s=dn;dn=tl(t.stateNode.containerInfo),Kr(t,a,i),dn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=ao,ao=16777216,Kr(t,a,i),ao=s):Kr(t,a,i));break;default:Kr(t,a,i)}}function xm(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function ro(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var s=a[i];ft=s,Mm(s,t)}xm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Om(t),t=t.sibling}function Om(t){switch(t.tag){case 0:case 11:case 15:ro(t),t.flags&2048&&pa(9,t,t.return);break;case 3:ro(t);break;case 12:ro(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,$s(t)):ro(t);break;default:ro(t)}}function $s(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var s=a[i];ft=s,Mm(s,t)}xm(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:pa(8,a,a.return),$s(a);break;case 22:i=a.stateNode,i._visibility&2&&(i._visibility&=-3,$s(a));break;default:$s(a)}t=t.sibling}}function Mm(t,a){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:pa(8,i,a);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Pi(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ft=s;else e:for(i=t;ft!==null;){s=ft;var c=s.sibling,d=s.return;if(Sm(s),s===i){ft=null;break e}if(c!==null){c.return=d,ft=c;break e}ft=d}}}var pS={getCacheForType:function(t){var a=gt(Fe),i=a.data.get(t);return i===void 0&&(i=t(),a.data.set(t,i)),i},cacheSignal:function(){return gt(Fe).controller.signal}},mS=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ue=null,be=null,we=0,Oe=0,It=null,ma=!1,Fr=!1,Hc=!1,In=0,Ye=0,ga=0,ar=0,Pc=0,Qt=0,Jr=0,io=null,zt=null,$c=!1,Vs=0,zm=0,Zs=1/0,Is=null,ya=null,it=0,va=null,Wr=null,Qn=0,Vc=0,Zc=null,km=null,oo=0,Ic=null;function Gt(){return(Ae&2)!==0&&we!==0?we&-we:U.T!==null?Fc():Yd()}
vendor: 5,022 bytes, line 9
9function Lm(){if(Qt===0)if((we&536870912)===0||Ee){var t=Wo;Wo<<=1,(Wo&3932160)===0&&(Wo=262144),Qt=t}else Qt=536870912;return t=Vt.current,t!==null&&(t.flags|=32),Qt}function kt(t,a,i){(t===Ue&&(Oe===2||Oe===9)||t.cancelPendingCommit!==null)&&(ei(t,0),ba(t,we,Qt,!1)),Ai(t,i),((Ae&2)===0||t!==Ue)&&(t===Ue&&((Ae&2)===0&&(ar|=i),Ye===4&&ba(t,we,Qt,!1)),Sn(t))}function Nm(t,a,i){if((Ae&6)!==0)throw Error(o(327));var s=!i&&(a&127)===0&&(a&t.expiredLanes)===0||Ri(t,a),c=s?vS(t,a):Gc(t,a,!0),d=s;do{if(c===0){Fr&&!s&&ba(t,a,0,!1);break}else{if(i=t.current.alternate,d&&!gS(i)){c=Gc(t,a,!1),d=!1;continue}if(c===2){if(d=a,t.errorRecoveryDisabledLanes&d)var g=0;else g=t.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){a=g;e:{var S=t;c=io;var A=S.current.memoizedState.isDehydrated;if(A&&(ei(S,g).flags|=256),g=Gc(S,g,!1),g!==2){if(Hc&&!A){S.errorRecoveryDisabledLanes|=d,ar|=d,c=4;break e}d=zt,zt=c,d!==null&&(zt===null?zt=d:zt.push.apply(zt,d))}c=g}if(d=!1,c!==2)continue}}if(c===1){ei(t,0),ba(t,a,0,!0);break}e:{switch(s=t,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((a&4194048)!==a)break;case 6:ba(s,a,Qt,!ma);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((a&62914560)===a&&(c=Vs+300-wt(),10<c)){if(ba(s,a,Qt,!ma),ts(s,0,!0)!==0)break e;Qn=a,s.timeoutHandle=fg(Dm.bind(null,s,i,zt,Is,$c,a,Qt,ar,Jr,ma,d,"Throttled",-0,0),c);break e}Dm(s,i,zt,Is,$c,a,Qt,ar,Jr,ma,d,null,-0,0)}}break}while(!0);Sn(t)}function Dm(t,a,i,s,c,d,g,S,A,D,I,Y,j,q){if(t.timeoutHandle=-1,Y=a.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zn},Am(a,d,Y);var ie=(d&62914560)===d?Vs-wt():(d&4194048)===d?zm-wt():0;if(ie=e2(Y,ie),ie!==null){Qn=d,t.cancelPendingCommit=ie(Vm.bind(null,t,a,d,i,s,c,g,S,A,I,Y,null,j,q)),ba(t,d,g,!D);return}}Vm(t,a,d,i,s,c,g,S,A)}function gS(t){for(var a=t;;){var i=a.tag;if((i===0||i===11||i===15)&&a.flags&16384&&(i=a.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var c=i[s],d=c.getSnapshot;c=c.value;try{if(!Pt(d(),c))return!1}catch{return!1}}if(i=a.child,a.subtreeFlags&16384&&i!==null)i.return=a,a=i;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ba(t,a,i,s){a&=~Pc,a&=~ar,t.suspendedLanes|=a,t.pingedLanes&=~a,s&&(t.warmLanes|=a),s=t.expirationTimes;for(var c=a;0<c;){var d=31-Ht(c),g=1<<d;s[d]=-1,c&=~g}i!==0&&Id(t,i,a)}function Qs(){return(Ae&6)===0?(so(0),!1):!0}function Qc(){if(be!==null){if(Oe===0)var t=be.return;else t=be,Dn=Ya=null,lc(t),Zr=null,Vi=0,t=be;for(;t!==null;)dm(t.alternate,t),t=t.return;be=null}}function ei(t,a){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,US(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),Qn=0,Qc(),Ue=t,be=i=Ln(t.current,null),we=a,Oe=0,It=null,ma=!1,Fr=Ri(t,a),Hc=!1,Jr=Qt=Pc=ar=ga=Ye=0,zt=io=null,$c=!1,(a&8)!==0&&(a|=a&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=a;0<s;){var c=31-Ht(s),d=1<<c;a|=t[c],s&=~d}return In=a,hs(),i}function Um(t,a){ge=null,U.H=Fi,a===Vr||a===ws?(a=Jh(),Oe=3):a===Ku?(a=Jh(),Oe=4):Oe=a===Cc?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,It=a,be===null&&(Ye=1,Ds(t,Wt(a,t.current)))}function Bm(){var t=Vt.current;return t===null?!0:(we&4194048)===we?an===null:(we&62914560)===we||(we&536870912)!==0?t===an:!1}function jm(){var t=U.H;return U.H=Fi,t===null?Fi:t}function qm(){var t=U.A;return U.A=pS,t}function Gs(){Ye=4,ma||(we&4194048)!==we&&Vt.current!==null||(Fr=!0),(ga&134217727)===0&&(ar&134217727)===0||Ue===null||ba(Ue,we,Qt,!1)}function Gc(t,a,i){var s=Ae;Ae|=2;var c=jm(),d=qm();(Ue!==t||we!==a)&&(Is=null,ei(t,a)),a=!1;var g=Ye;e:do try{if(Oe!==0&&be!==null){var S=be,A=It;switch(Oe){case 8:Qc(),g=6;break e;case 3:case 2:case 9:case 6:Vt.current===null&&(a=!0);var D=Oe;if(Oe=0,It=null,ti(t,S,A,D),i&&Fr){g=0;break e}break;default:D=Oe,Oe=0,It=null,ti(t,S,A,D)}}yS(),g=Ye;break}catch(I){Um(t,I)}while(!0);return a&&t.shellSuspendCounter++,Dn=Ya=null,Ae=s,U.H=c,U.A=d,be===null&&(Ue=null,we=0,hs()),g}function yS(){for(;be!==null;)Hm(be)}function vS(t,a){var i=Ae;Ae|=2;var s=jm(),c=qm();Ue!==t||we!==a?(Is=null,Zs=wt()+500,ei(t,a)):Fr=Ri(t,a);e:do try{if(Oe!==0&&be!==null){a=be;var d=It;t:switch(Oe){case 1:Oe=0,It=null,ti(t,a,d,1);break;case 2:case 9:if(Kh(d)){Oe=0,It=null,Pm(a);break}a=function(){Oe!==2&&Oe!==9||Ue!==t||(Oe=7),Sn(t)},d.then(a,a);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Kh(d)?(Oe=0,It=null,Pm(a)):(Oe=0,It=null,ti(t,a,d,7));break;case 5:var g=null;switch(be.tag){case 26:g=be.memoizedState;case 5:case 27:var S=be;if(g?Rg(g):S.stateNode.complete){Oe=0,It=null;var A=S.sibling;if(A!==null)be=A;else{var D=S.return;D!==null?(be=D,Ys(D)):be=null}break t}}Oe=0,It=null,ti(t,a,d,5);break;case 6:Oe=0,It=null,ti(t,a,d,6);break;case 8:Qc(),Ye=6;break e;default:throw Error(o(462))}}bS();break}catch(I){Um(t,I)}while(!0);
vendor: 2,788 bytes, line 9
9return Dn=Ya=null,U.H=s,U.A=c,Ae=i,be!==null?0:(Ue=null,we=0,hs(),Ye)}function bS(){for(;be!==null&&!Fo();)Hm(be)}function Hm(t){var a=cm(t.alternate,t,In);t.memoizedProps=t.pendingProps,a===null?Ys(t):be=a}function Pm(t){var a=t,i=a.alternate;switch(a.tag){case 15:case 0:a=rm(i,a,a.pendingProps,a.type,void 0,we);break;case 11:a=rm(i,a,a.pendingProps,a.type.render,a.ref,we);break;case 5:lc(a);default:dm(i,a),a=be=qh(a,In),a=cm(i,a,In)}t.memoizedProps=t.pendingProps,a===null?Ys(t):be=a}function ti(t,a,i,s){Dn=Ya=null,lc(a),Zr=null,Vi=0;var c=a.return;try{if(sS(t,c,a,i,we)){Ye=1,Ds(t,Wt(i,t.current)),be=null;return}}catch(d){if(c!==null)throw be=c,d;Ye=1,Ds(t,Wt(i,t.current)),be=null;return}a.flags&32768?(Ee||s===1?t=!0:Fr||(we&536870912)!==0?t=!1:(ma=t=!0,(s===2||s===9||s===3||s===6)&&(s=Vt.current,s!==null&&s.tag===13&&(s.flags|=16384))),$m(a,t)):Ys(a)}function Ys(t){var a=t;do{if((a.flags&32768)!==0){$m(a,ma);return}t=a.return;var i=cS(a.alternate,a,In);if(i!==null){be=i;return}if(a=a.sibling,a!==null){be=a;return}be=a=t}while(a!==null);Ye===0&&(Ye=5)}function $m(t,a){do{var i=fS(t.alternate,t);if(i!==null){i.flags&=32767,be=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!a&&(t=t.sibling,t!==null)){be=t;return}be=t=i}while(t!==null);Ye=6,be=null}function Vm(t,a,i,s,c,d,g,S,A){t.cancelPendingCommit=null;do Xs();while(it!==0);if((Ae&6)!==0)throw Error(o(327));if(a!==null){if(a===t.current)throw Error(o(177));if(d=a.lanes|a.childLanes,d|=Du,J0(t,i,d,g,S,A),t===Ue&&(be=Ue=null,we=0),Wr=a,va=t,Qn=i,Vc=d,Zc=c,km=s,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,ES(_r,function(){return Ym(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,c=Z.p,Z.p=2,g=Ae,Ae|=4;try{dS(t,a,i)}finally{Ae=g,Z.p=c,U.T=s}}it=1,Zm(),Im(),Qm()}}function Zm(){if(it===1){it=0;var t=va,a=Wr,i=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var s=Z.p;Z.p=2;var c=Ae;Ae|=4;try{Cm(a,t);var d=of,g=Mh(t.containerInfo),S=d.focusedElem,A=d.selectionRange;if(g!==S&&S&&S.ownerDocument&&Oh(S.ownerDocument.documentElement,S)){if(A!==null&&Mu(S)){var D=A.start,I=A.end;if(I===void 0&&(I=D),"selectionStart"in S)S.selectionStart=D,S.selectionEnd=Math.min(I,S.value.length);else{var Y=S.ownerDocument||document,j=Y&&Y.defaultView||window;if(j.getSelection){var q=j.getSelection(),ie=S.textContent.length,de=Math.min(A.start,ie),Ne=A.end===void 0?de:Math.min(A.end,ie);!q.extend&&de>Ne&&(g=Ne,Ne=de,de=g);var k=xh(S,de),M=xh(S,Ne);if(k&&M&&(q.rangeCount!==1||q.anchorNode!==k.node||q.anchorOffset!==k.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var N=Y.createRange();N.setStart(k.node,k.offset),q.removeAllRanges(),de>
vendor: 6,710 bytes, line 9
9Ne?(q.addRange(N),q.extend(M.node,M.offset)):(N.setEnd(M.node,M.offset),q.addRange(N))}}}}for(Y=[],q=S;q=q.parentNode;)q.nodeType===1&&Y.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Y.length;S++){var G=Y[S];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}sl=!!rf,of=rf=null}finally{Ae=c,Z.p=s,U.T=i}}t.current=a,it=2}}function Im(){if(it===2){it=0;var t=va,a=Wr,i=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var s=Z.p;Z.p=2;var c=Ae;Ae|=4;try{bm(t,a.alternate,a)}finally{Ae=c,Z.p=s,U.T=i}}it=3}}function Qm(){if(it===4||it===3){it=0,lu();var t=va,a=Wr,i=Qn,s=km;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?it=5:(it=0,Wr=va=null,Gm(t,t.pendingLanes));var c=t.pendingLanes;if(c===0&&(ya=null),fu(i),a=a.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(Ti,a,void 0,(a.current.flags&128)===128)}catch{}if(s!==null){a=U.T,c=Z.p,Z.p=2,U.T=null;try{for(var d=t.onRecoverableError,g=0;g<s.length;g++){var S=s[g];d(S.value,{componentStack:S.stack})}}finally{U.T=a,Z.p=c}}(Qn&3)!==0&&Xs(),Sn(t),c=t.pendingLanes,(i&261930)!==0&&(c&42)!==0?t===Ic?oo++:(oo=0,Ic=t):oo=0,so(0)}}function Gm(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,Pi(a)))}function Xs(){return Zm(),Im(),Qm(),Ym()}function Ym(){if(it!==5)return!1;var t=va,a=Vc;Vc=0;var i=fu(Qn),s=U.T,c=Z.p;try{Z.p=32>i?32:i,U.T=null,i=Zc,Zc=null;var d=va,g=Qn;if(it=0,Wr=va=null,Qn=0,(Ae&6)!==0)throw Error(o(331));var S=Ae;if(Ae|=4,Om(d.current),Rm(d,d.current,g,i),Ae=S,so(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(Ti,d)}catch{}return!0}finally{Z.p=c,U.T=s,Gm(t,a)}}function Xm(t,a,i){a=Wt(i,a),a=Ec(t.stateNode,a,2),t=fa(t,a,2),t!==null&&(Ai(t,2),Sn(t))}function Me(t,a,i){if(t.tag===3)Xm(t,t,i);else for(;a!==null;){if(a.tag===3){Xm(a,t,i);break}else if(a.tag===1){var s=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ya===null||!ya.has(s))){t=Wt(i,t),i=Kp(2),s=fa(a,i,2),s!==null&&(Fp(i,s,a,t),Ai(s,2),Sn(s));break}}a=a.return}}function Yc(t,a,i){var s=t.pingCache;if(s===null){s=t.pingCache=new mS;var c=new Set;s.set(a,c)}else c=s.get(a),c===void 0&&(c=new Set,s.set(a,c));c.has(i)||(Hc=!0,c.add(i),t=SS.bind(null,t,a,i),a.then(t,t))}function SS(t,a,i){var s=t.pingCache;s!==null&&s.delete(a),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Ue===t&&(we&i)===i&&(Ye===4||Ye===3&&(we&62914560)===we&&300>wt()-Vs?(Ae&2)===0&&ei(t,0):Pc|=i,Jr===we&&(Jr=0)),Sn(t)}function Km(t,a){a===0&&(a=Zd()),t=Ia(t,a),t!==null&&(Ai(t,a),Sn(t))}function wS(t){var a=t.memoizedState,i=0;a!==null&&(i=a.retryLane),Km(t,i)}function _S(t,a){var i=0;switch(t.tag){case 31:case 13:var s=t.stateNode,c=t.memoizedState;c!==null&&(i=c.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(a),Km(t,i)}function ES(t,a){return cn(t,a)}var Ks=null,ni=null,Xc=!1,Fs=!1,Kc=!1,Sa=0;function Sn(t){t!==ni&&t.next===null&&(ni===null?Ks=ni=t:ni=ni.next=t),Fs=!0,Xc||(Xc=!0,TS())}function so(t,a){if(!Kc&&Fs){Kc=!0;do for(var i=!1,s=Ks;s!==null;){if(t!==0){var c=s.pendingLanes;if(c===0)var d=0;else{var g=s.suspendedLanes,S=s.pingedLanes;d=(1<<31-Ht(42|t)+1)-1,d&=c&~(g&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,eg(s,d))}else d=we,d=ts(s,s===Ue?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||Ri(s,d)||(i=!0,eg(s,d));s=s.next}while(i);Kc=!1}}function CS(){Fm()}function Fm(){Fs=Xc=!1;var t=0;Sa!==0&&DS()&&(t=Sa);for(var a=wt(),i=null,s=Ks;s!==null;){var c=s.next,d=Jm(s,a);d===0?(s.next=null,i===null?Ks=c:i.next=c,c===null&&(ni=i)):(i=s,(t!==0||(d&3)!==0)&&(Fs=!0)),s=c}it!==0&&it!==5||so(t),Sa!==0&&(Sa=0)}function Jm(t,a){for(var i=t.suspendedLanes,s=t.pingedLanes,c=t.expirationTimes,d=t.pendingLanes&-62914561;0<d;){var g=31-Ht(d),S=1<<g,A=c[g];A===-1?((S&i)===0||(S&s)!==0)&&(c[g]=F0(S,a)):A<=a&&(t.expiredLanes|=S),d&=~S}if(a=Ue,i=we,i=ts(t,t===a?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,i===0||t===a&&(Oe===2||Oe===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Ci(s),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Ri(t,i)){if(a=i&-i,a===t.callbackPriority)return a;switch(s!==null&&Ci(s),fu(i)){case 2:case 8:i=gn;break;case 32:i=_r;break;case 268435456:i=Vd;break;default:i=_r}return s=Wm.bind(null,t),i=cn(i,s),t.callbackPriority=a,t.callbackNode=i,a}return s!==null&&s!==null&&Ci(s),t.callbackPriority=2,t.callbackNode=null,2}function Wm(t,a){if(it!==0&&it!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(Xs()&&t.callbackNode!==i)return null;var s=we;return s=ts(t,t===Ue?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Nm(t,s,a),Jm(t,wt()),t.callbackNode!=null&&t.callbackNode===i?Wm.bind(null,t):null)}function eg(t,a){if(Xs())return null;Nm(t,a,!0)}function TS(){BS(function(){(Ae&6)!==0?cn(ht,CS):Fm()})}function Fc(){if(Sa===0){var t=Pr;t===0&&(t=Jo,Jo<<=1,(Jo&261888)===0&&(Jo=256)),Sa=t}return Sa}function tg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:is(""+t)}function ng(t,a){var i=a.ownerDocument.createElement("input");return i.name=a.name,i.value=a.value,t.id&&i.setAttribute("form",t.id),a.parentNode.insertBefore(i,a),t=new FormData(t),i.parentNode.removeChild(i),t}function RS(t,a,i,s,c){if(a==="submit"&&i&&i.stateNode===c){var d=tg((c[Rt]||null).action),g=s.submitter;g&&(a=(a=g[Rt]||null)?tg(a.formAction):g.getAttribute("formAction"),a!==null&&(d=a,g=null));var S=new us("action","action",null,s,c);t.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Sa!==0){var A=g?ng(c,g):new FormData(c);yc(i,{pending:!0,data:A,method:c.method,action:d},null,A)}}else typeof d=="function"&&(S.preventDefault(),A=g?ng(c,g):new FormData(c),yc(i,{pending:!0,data:A,method:c.method,action:d},d,A))},currentTarget:c}]})}}for(var Jc=0;Jc<Nu.length;Jc++){var Wc=Nu[Jc],AS=Wc.toLowerCase(),xS=Wc[0].toUpperCase()+Wc.slice(1);fn(AS,"on"+xS)}fn(Lh,"onAnimationEnd"),fn(Nh,"onAnimationIteration"),fn(Dh,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(Zb,"onTransitionRun"),fn(Ib,"onTransitionStart"),fn(Qb,"onTransitionCancel"),fn(Uh,"onTransitionEnd"),Ar("onMouseEnter",["mouseout","mouseover"]),Ar("onMouseLeave",["mouseout","mouseover"]),Ar("onPointerEnter",["pointerout","pointerover"]),Ar("onPointerLeave",["pointerout","pointerover"]),Pa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pa("onSelect","focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange".split(" ")),Pa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lo="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(" "),OS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lo));function ag(t,a){a=(a&4)!==0;for(var i=0;i<t.length;i++){var s=t[i],c=s.event;s=s.listeners;e:{var d=void 0;if(a)for(var g=s.length-1;0<=g;g--){var S=s[g],A=S.instance,D=S.currentTarget;if(S=S.listener,A!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=D;try{d(c)}catch(I){ds(I)}c.currentTarget=null,d=A}else for(g=0;g<s.length;g++){if(S=s[g],A=S.instance,D=S.currentTarget,S=S.listener,A!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=D;try{d(c)}catch(I){ds(I)}c.currentTarget=null,d=A}}}}function Se(t,a){var i=a[du];i===void 0&&(i=a[du]=new Set);var s=t+"__bubble";i.has(s)||(rg(a,t,2,!1),i.add(s))}function ef(t,a,i){var s=0;a&&(s|=4),rg(i,t,s,a)}var Js="_reactListening"+Math.random().toString(36).slice(2);function tf(t){if(!t[Js]){t[Js]=!0,Fd.forEach(function(i){i!=="selectionchange"&&(OS.has(i)||ef(i,!1,t),ef(i,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[Js]||(a[Js]=!0,ef("selectionchange",!1,a))}}function rg(t,a,i,s){switch(Lg(a)){case 2:var c=a2;break;case 8:c=r2;break;default:c=yf}i=c.bind(null,a,i,t),c=void 0,!wu||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(c=!0),s?c!==void 0?t.addEventListener(a,i,{capture:!0,passive:c}):t.addEventListener(a,i,!0):c!==void 0?t.addEventListener(a,i,{passive:c}):t.addEventListener(a,i,!1)}function nf(t,a,i,s,c){var d=s;if((a&1)===0&&(a&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var S=s.stateNode.containerInfo;if(S===c)break;if(g===4)for(g=s.return;g!==null;){var A=g.tag;if((A===3||A===4)&&g.stateNode.containerInfo===c)return;g=g.return}for(;S!==null;){if(g=Cr(S),g===null)return;if(A=g.tag,A===5||A===6||A===26||A===27){s=d=g;continue e}S=S.parentNode}}s=s.return}uh(function(){var D=d,I=bu(i),Y=[];e:{var j=Bh.get(t);if(j!==void 0){var q=us,ie=t;switch(t){case"keypress":if(ss(i)===0)break e;case"keydown":case"keyup":q=_b;break;case"focusin":ie="focus",q=Tu;break;case"focusout":ie="blur",q=Tu;break;case"beforeblur":case"afterblur":q=Tu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=dh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=cb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Tb;break;case Lh:case Nh:case Dh:q=hb;break;case Uh:q=Ab;break;case"scroll":case"scrollend":q=lb;break;case"wheel":q=Ob;break;case"copy":case"cut":case"paste":q=mb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=ph;break;case"toggle":case"beforetoggle":q=zb}var de=(a&4)!==0,Ne=!de&&(t==="scroll"||t==="scrollend"),k=de?j!==null?j+"Capture":null:j;de=[];for(var M=D,N;M!==null;){var G=M;if(N=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||N===null||k===null||(G=Mi(M,k),G!=null&&de.push(uo(M,G,N))),Ne)break;M=M.return}0<de.length&&(j=new q(j,ie,null,i,I),Y.push({event:j,listeners:de}))}}if((a&7)===0){e:{if(j=t==="mouseover"||t==="pointerover",q=t==="mouseout"||t==="pointerout",j&&i!==vu&&(ie=i.relatedTarget||i.fromElement)&&(Cr(ie)||ie[Er]))break e;if((q||j)&&(j=I.window===I?I:(j=I.ownerDocument)?j.defaultView||j.parentWindow:window,q?(ie=i.relatedTarget||i.toElement,q=D,ie=ie?Cr(ie):null,ie!==null&&(Ne=u(ie),de=ie.tag,ie!==Ne||de!==5&&de!==27&&de!==6)&&(ie=null)):(q=null,ie=D),q!==ie)){if(de=dh,G="onMouseLeave",k="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(de=ph,G="onPointerLeave",k="onPointerEnter",M="pointer"),Ne=q==null?j:Oi(q),N=ie==null?j:Oi(ie),j=new de(G,M+"leave",q,i,I),j.target=Ne,j.relatedTarget=N,G=null,Cr(I)===D&&(de=new de(k,M+"enter",ie,i,I),de.target=N,de.relatedTarget=Ne,G=de),Ne=G,q&&ie)t:{for(de=MS,k=q,M=ie,N=0,G=k;G;G=de(G))N++;G=0;for(var ce=M;ce;ce=de(ce))G++;for(;0<N-G;)k=de(k),N--;for(;0<G-N;)M=de(M),G--;for(;N--;){if(k===M||M!==null&&k===M.alternate){de=k;break t}k=de(k),M=de(M)}de=null}else de=null;q!==null&&ig(Y,j,q,de,!1),ie!==null&&Ne!==null&&ig(Y,Ne,ie,de,!0)}}
vendor: 5,189 bytes, lines 9-10
9e:{if(j=D?Oi(D):window,q=j.nodeName&&j.nodeName.toLowerCase(),q==="select"||q==="input"&&j.type==="file")var Ce=_h;else if(Sh(j))if(Eh)Ce=Pb;else{Ce=qb;var oe=jb}else q=j.nodeName,!q||q.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?D&&yu(D.elementType)&&(Ce=_h):Ce=Hb;if(Ce&&(Ce=Ce(t,D))){wh(Y,Ce,i,I);break e}oe&&oe(t,j,D),t==="focusout"&&D&&j.type==="number"&&D.memoizedProps.value!=null&&gu(j,"number",j.value)}switch(oe=D?Oi(D):window,t){case"focusin":(Sh(oe)||oe.contentEditable==="true")&&(Lr=oe,zu=D,ji=null);break;case"focusout":ji=zu=Lr=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,zh(Y,i,I);break;case"selectionchange":if(Vb)break;case"keydown":case"keyup":zh(Y,i,I)}var ye;if(Au)e:{switch(t){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else kr?vh(t,i)&&(_e="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(_e="onCompositionStart");_e&&(mh&&i.locale!=="ko"&&(kr||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&kr&&(ye=ch()):(ra=I,_u="value"in ra?ra.value:ra.textContent,kr=!0)),oe=Ws(D,_e),0<oe.length&&(_e=new hh(_e,t,null,i,I),Y.push({event:_e,listeners:oe}),ye?_e.data=ye:(ye=bh(i),ye!==null&&(_e.data=ye)))),(ye=Lb?Nb(t,i):Db(t,i))&&(_e=Ws(D,"onBeforeInput"),0<_e.length&&(oe=new hh("onBeforeInput","beforeinput",null,i,I),Y.push({event:oe,listeners:_e}),oe.data=ye)),RS(Y,t,D,i,I)}ag(Y,a)})}function uo(t,a,i){return{instance:t,listener:a,currentTarget:i}}function Ws(t,a){for(var i=a+"Capture",s=[];t!==null;){var c=t,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Mi(t,i),c!=null&&s.unshift(uo(t,c,d)),c=Mi(t,a),c!=null&&s.push(uo(t,c,d))),t.tag===3)return s;t=t.return}return[]}function MS(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function ig(t,a,i,s,c){for(var d=a._reactName,g=[];i!==null&&i!==s;){var S=i,A=S.alternate,D=S.stateNode;if(S=S.tag,A!==null&&A===s)break;S!==5&&S!==26&&S!==27||D===null||(A=D,c?(D=Mi(i,d),D!=null&&g.unshift(uo(i,D,A))):c||(D=Mi(i,d),D!=null&&g.push(uo(i,D,A)))),i=i.return}g.length!==0&&t.push({event:a,listeners:g})}var zS=/\r\n?/g,kS=/\u0000|\uFFFD/g;function og(t){return(typeof t=="string"?t:""+t).replace(zS,`
10`).replace(kS,"")}function sg(t,a){return a=og(a),og(t)===a}function Le(t,a,i,s,c,d){switch(i){case"children":typeof s=="string"?a==="body"||a==="textarea"&&s===""||Or(t,s):(typeof s=="number"||typeof s=="bigint")&&a!=="body"&&Or(t,""+s);break;case"className":as(t,"class",s);break;case"tabIndex":as(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":as(t,i,s);break;case"style":sh(t,s,d);break;case"data":if(a!=="object"){as(t,"data",s);break}case"src":case"href":if(s===""&&(a!=="a"||i!=="href")){t.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=is(""+s),t.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(i==="formAction"?(a!=="input"&&Le(t,a,"name",c.name,c,null),Le(t,a,"formEncType",c.formEncType,c,null),Le(t,a,"formMethod",c.formMethod,c,null),Le(t,a,"formTarget",c.formTarget,c,null)):(Le(t,a,"encType",c.encType,c,null),Le(t,a,"method",c.method,c,null),Le(t,a,"target",c.target,c,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=is(""+s),t.setAttribute(i,s);break;case"onClick":s!=null&&(t.onclick=zn);break;case"onScroll":s!=null&&Se("scroll",t);break;case"onScrollEnd":s!=null&&Se("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(c.children!=null)throw Error(o(60));t.innerHTML=i}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}i=is(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,""+s):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":s===!0?t.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,s):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(i,s):t.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(i):t.setAttribute(i,s);break;case"popover":Se("beforetoggle",t),Se("toggle",t),ns(t,"popover",s);break;case"xlinkActuate":Mn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Mn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Mn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Mn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Mn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Mn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Mn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Mn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Mn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":ns(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=ob.get(i)||i,ns(t,i,s))}}function af(t,a,i,s,c,d){switch(i){case"style":sh(t,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(c.children!=null)throw Error(o(60));t.innerHTML=i}}break;case"children":typeof s=="string"?Or(t,s):(typeof s=="number"||typeof s=="bigint")&&Or(t,""+s);break;case"onScroll":s!=null&&Se("scroll",t);break;case"onScrollEnd":s!=null&&Se("scrollend",t);break;case"onClick":s!=null&&(t.onclick=zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Jd.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(c=i.endsWith("Capture"),a=i.slice(2,c?i.length-7:void 0),d=t[Rt]||null,d=d!=null?d[i]:null,typeof d=="function"&&t.removeEventListener(a,d,c),typeof s=="function")){typeof d!="function"&&d!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(a,s,c);break e}i in t?t[i]=s:s===!0?t.setAttribute(i,""):ns(t,i,s)}}}function vt(t,a,i){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",t),Se("load",t);var s=!1,c=!1,d;for(d in i)if(i.hasOwnProperty(d)){var g=i[d];if(g!=null)switch(d){case"src":s=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Le(t,a,d,g,i,null)}}c&&Le(t,a,"srcSet",i.srcSet,i,null),s&&Le(t,a,"src",i.src,i,null);return;case"input":Se("invalid",t);var S=d=g=c=null,A=null,D=null;for(s in i)if(i.hasOwnProperty(s)){var I=i[s];if(I!=null)switch(s){case"name":c=I;break;case"type":g=I;break;case"checked":A=I;break;case"defaultChecked":D=I;break;case"value":d=I;break;case"defaultValue":S=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,a));break;default:Le(t,a,s,I,i,null)}}ah(t,d,S,A,D,g,c,!1);return;case"select":Se("invalid",t),s=g=d=null;for(c in i)if(i.hasOwnProperty(c)&&(S=i[c],S!=null))switch(c){case"value":d=S;break;case"defaultValue":g=S;break;case"multiple":s=S;default:Le(t,a,c,S,i,null)}a=d,i=g,t.multiple=!!s,a!=null?xr(t,!!s,a,!1):i!=null&&xr(t,!!s,i,!0);return;case"textarea":Se("invalid",t),d=c=s=null;for(g in i)if(i.hasOwnProperty(g)&&(S=i[g],S!=null))switch(g){case"value":s=S;break;case"defaultValue":c=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(o(91));break;default:Le(t,a,g,S,i,null)}ih(t,s,c,d);return;case"option":for(A in i)if(i.hasOwnProperty(A)&&(s=i[A],s!=null))switch(A){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Le(t,a,A,s,i,null)}return;case"dialog":Se("beforetoggle",t),Se("toggle",t),Se("cancel",t),Se("close",t);break;case"iframe":case"object":Se("load",t);break;case"video":case"audio":for(s=0;s<lo.length;s++)Se(lo[s],t);break;case"image":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"embed":case"source":case"link":Se("error",t),Se("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 i)if(i.hasOwnProperty(D)&&(s=i[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Le(t,a,D,s,i,null)}return;default:if(yu(a)){for(I in i)i.hasOwnProperty(I)&&(s=i[I],s!==void 0&&af(t,a,I,s,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(s=i[S],s!=null&&Le(t,a,S,s,i,null))}function LS(t,a,i,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,g=null,S=null,A=null,D=null,I=null;for(q in i){var Y=i[q];if(i.hasOwnProperty(q)&&Y!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":A=Y;default:s.hasOwnProperty(q)||Le(t,a,q,null,s,Y)}}for(var j in s){var q=s[j];if(Y=i[j],s.hasOwnProperty(j)&&(q!=null||Y!=null))switch(j){case"type":d=q;break;case"name":c=q;break;case"checked":D=q;break;case"defaultChecked":I=q;break;case"value":g=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,a));break;default:q!==Y&&Le(t,a,j,q,s,Y)}}mu(t,g,S,A,D,I,d,c);return;case"select":q=g=S=j=null;for(d in i)if(A=i[d],i.hasOwnProperty(d)&&A!=null)switch(d){case"value":break;case"multiple":q=A;default:s.hasOwnProperty(d)||Le(t,a,d,null,s,A)}for(c in s)if(d=s[c],A=i[c],s.hasOwnProperty(c)&&(d!=null||A!=null))switch(c){case"value":j=d;break;case"defaultValue":S=d;break;case"multiple":g=d;default:d!==A&&Le(t,a,c,d,s,A)}a=S,i=g,s=q,j!=null?xr(t,!!i,j,!1):!!s!=!!i&&(a!=null?xr(t,!!i,a,!0):xr(t,!!i,i?[]:"",!1));return;case"textarea":q=j=null;for(S in i)if(c=i[S],i.hasOwnProperty(S)&&c!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Le(t,a,S,null,s,c)}for(g in s)if(c=s[g],d=i[g],s.hasOwnProperty(g)&&(c!=null||d!=null))switch(g){case"value":j=c;break;case"defaultValue":q=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&Le(t,a,g,c,s,d)}rh(t,j,q);return;case"option":for(var ie in i)if(j=i[ie],i.hasOwnProperty(ie)&&j!=null&&!s.hasOwnProperty(ie))switch(ie){case"selected":t.selected=!1;break;default:Le(t,a,ie,null,s,j)}for(A in s)if(j=s[A],q=i[A],s.hasOwnProperty(A)&&j!==q&&(j!=null||q!=null))switch(A){case"selected":t.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:Le(t,a,A,j,s,q)}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 i)j=i[de],i.hasOwnProperty(de)&&j!=null&&!s.hasOwnProperty(de)&&Le(t,a,de,null,s,j);for(D in s)if(j=s[D],q=i[D],s.hasOwnProperty(D)&&j!==q&&(j!=null||q!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(137,a));break;default:Le(t,a,D,j,s,q)}return;default:if(yu(a)){for(var Ne in i)j=i[Ne],i.hasOwnProperty(Ne)&&j!==void 0&&!s.hasOwnProperty(Ne)&&af(t,a,Ne,void 0,s,j);for(I in s)j=s[I],q=i[I],!s.hasOwnProperty(I)||j===q||j===void 0&&q===void 0||af(t,a,I,j,s,q);return}}for(var k in i)j=i[k],i.hasOwnProperty(k)&&j!=null&&!s.hasOwnProperty(k)&&Le(t,a,k,null,s,j);for(Y in s)j=s[Y],q=i[Y],!s.hasOwnProperty(Y)||j===q||j==null&&q==null||Le(t,a,Y,j,s,q)}function lg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function NS(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var c=i[s],d=c.transferSize,g=c.initiatorType,S=c.duration;if(d&&S&&lg(g)){for(g=0,S=c.responseEnd,s+=1;s<i.length;s++){var A=i[s],D=A.startTime;if(D>S)break;var I=A.transferSize,Y=A.initiatorType;I&&lg(Y)&&(A=A.responseEnd,g+=I*(A<S?1:(S-D)/(A-D)))}if(--s,a+=8*(d+g)/(c.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var rf=null,of=null;function el(t){return t.nodeType===9?t:t.ownerDocument}function ug(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 cg(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function sf(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var lf=null;function DS(){var t=window.event;return t&&t.type==="popstate"?t===lf?!1:(lf=t,!0):(lf=null,!1)}var fg=typeof setTimeout=="function"?setTimeout:void 0,US=typeof clearTimeout=="function"?clearTimeout:void 0,dg=typeof Promise=="function"?Promise:void 0,BS=typeof queueMicrotask=="function"?queueMicrotask:typeof dg<"u"?function(t){return dg.resolve(null).then(t).cat
vendor: 13,972 bytes, line 10
10ch(jS)}:fg;function jS(t){setTimeout(function(){throw t})}function wa(t){return t==="head"}function hg(t,a){var i=a,s=0;do{var c=i.nextSibling;if(t.removeChild(i),c&&c.nodeType===8)if(i=c.data,i==="/$"||i==="/&"){if(s===0){t.removeChild(c),oi(a);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")co(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,co(i);for(var d=i.firstChild;d;){var g=d.nextSibling,S=d.nodeName;d[xi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=g}}else i==="body"&&co(t.ownerDocument.body);i=c}while(i);oi(a)}function pg(t,a){var i=t;t=0;do{var s=i.nextSibling;if(i.nodeType===1?a?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(a?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=s}while(i)}function uf(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var i=a;switch(a=a.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":uf(i),hu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function qS(t,a,i,s){for(;t.nodeType===1;){var c=i;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[xi])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(d=t.getAttribute("rel"),d==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(d!==c.rel||t.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||t.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||t.getAttribute("title")!==(c.title==null?null:c.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(d=t.getAttribute("src"),(d!==(c.src==null?null:c.src)||t.getAttribute("type")!==(c.type==null?null:c.type)||t.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&t.getAttribute("name")===d)return t}else return t;if(t=rn(t.nextSibling),t===null)break}return null}function HS(t,a,i){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=rn(t.nextSibling),t===null))return null;return t}function mg(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=rn(t.nextSibling),t===null))return null;return t}function cf(t){return t.data==="$?"||t.data==="$~"}function ff(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function PS(t,a){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||i.readyState!=="loading")a();else{var s=function(){a(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function rn(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var df=null;function gg(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(a===0)return rn(t.nextSibling);a--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||a++}t=t.nextSibling}return null}function yg(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(a===0)return t;a--}else i!=="/$"&&i!=="/&"||a++}t=t.previousSibling}return null}function vg(t,a,i){switch(a=el(i),t){case"html":if(t=a.documentElement,!t)throw Error(o(452));return t;case"head":if(t=a.head,!t)throw Error(o(453));return t;case"body":if(t=a.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function co(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);hu(t)}var on=new Map,bg=new Set;function tl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Gn=Z.d;Z.d={f:$S,r:VS,D:ZS,C:IS,L:QS,m:GS,X:XS,S:YS,M:KS};function $S(){var t=Gn.f(),a=Qs();return t||a}function VS(t){var a=Tr(t);a!==null&&a.tag===5&&a.type==="form"?Up(a):Gn.r(t)}var ai=typeof document>"u"?null:document;function Sg(t,a,i){var s=ai;if(s&&typeof a=="string"&&a){var c=Ft(a);c='link[rel="'+t+'"][href="'+c+'"]',typeof i=="string"&&(c+='[crossorigin="'+i+'"]'),bg.has(c)||(bg.add(c),t={rel:t,crossOrigin:i,href:a},s.querySelector(c)===null&&(a=s.createElement("link"),vt(a,"link",t),ct(a),s.head.appendChild(a)))}}function ZS(t){Gn.D(t),Sg("dns-prefetch",t,null)}function IS(t,a){Gn.C(t,a),Sg("preconnect",t,a)}function QS(t,a,i){Gn.L(t,a,i);var s=ai;if(s&&t&&a){var c='link[rel="preload"][as="'+Ft(a)+'"]';a==="image"&&i&&i.imageSrcSet?(c+='[imagesrcset="'+Ft(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(c+='[imagesizes="'+Ft(i.imageSizes)+'"]')):c+='[href="'+Ft(t)+'"]';var d=c;switch(a){case"style":d=ri(t);break;case"script":d=ii(t)}on.has(d)||(t=y({rel:"preload",href:a==="image"&&i&&i.imageSrcSet?void 0:t,as:a},i),on.set(d,t),s.querySelector(c)!==null||a==="style"&&s.querySelector(fo(d))||a==="script"&&s.querySelector(ho(d))||(a=s.createElement("link"),vt(a,"link",t),ct(a),s.head.appendChild(a)))}}function GS(t,a){Gn.m(t,a);var i=ai;if(i&&t){var s=a&&typeof a.as=="string"?a.as:"script",c='link[rel="modulepreload"][as="'+Ft(s)+'"][href="'+Ft(t)+'"]',d=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ii(t)}if(!on.has(d)&&(t=y({rel:"modulepreload",href:t},a),on.set(d,t),i.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ho(d)))return}s=i.createElement("link"),vt(s,"link",t),ct(s),i.head.appendChild(s)}}}function YS(t,a,i){Gn.S(t,a,i);var s=ai;if(s&&t){var c=Rr(s).hoistableStyles,d=ri(t);a=a||"default";var g=c.get(d);if(!g){var S={loading:0,preload:null};if(g=s.querySelector(fo(d)))S.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":a},i),(i=on.get(d))&&hf(t,i);var A=g=s.createElement("link");ct(A),vt(A,"link",t),A._p=new Promise(function(D,I){A.onload=D,A.onerror=I}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,nl(g,a,s)}g={type:"stylesheet",instance:g,count:1,state:S},c.set(d,g)}}}function XS(t,a){Gn.X(t,a);var i=ai;if(i&&t){var s=Rr(i).hoistableScripts,c=ii(t),d=s.get(c);d||(d=i.querySelector(ho(c)),d||(t=y({src:t,async:!0},a),(a=on.get(c))&&pf(t,a),d=i.createElement("script"),ct(d),vt(d,"link",t),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function KS(t,a){Gn.M(t,a);var i=ai;if(i&&t){var s=Rr(i).hoistableScripts,c=ii(t),d=s.get(c);d||(d=i.querySelector(ho(c)),d||(t=y({src:t,async:!0,type:"module"},a),(a=on.get(c))&&pf(t,a),d=i.createElement("script"),ct(d),vt(d,"link",t),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function wg(t,a,i,s){var c=(c=ae.current)?tl(c):null;if(!c)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(a=ri(i.href),i=Rr(c).hoistableStyles,s=i.get(a),s||(s={type:"style",instance:null,count:0,state:null},i.set(a,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=ri(i.href);var d=Rr(c).hoistableStyles,g=d.get(t);if(g||(c=c.ownerDocument||c,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(t,g),(d=c.querySelector(fo(t)))&&!d._p&&(g.instance=d,g.state.loading=5),on.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},on.set(t,i),d||FS(c,t,i,g.state))),a&&s===null)throw Error(o(528,""));return g}if(a&&s!==null)throw Error(o(529,""));return null;case"script":return a=i.async,i=i.src,typeof i=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ii(i),i=Rr(c).hoistableScripts,s=i.get(a),s||(s={type:"script",instance:null,count:0,state:null},i.set(a,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function ri(t){return'href="'+Ft(t)+'"'}function fo(t){return'link[rel="stylesheet"]['+t+"]"}function _g(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function FS(t,a,i,s){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?s.loading=1:(a=t.createElement("link"),s.preload=a,a.addEventListener("load",function(){return s.loading|=1}),a.addEventListener("error",function(){return s.loading|=2}),vt(a,"link",i),ct(a),t.head.appendChild(a))}function ii(t){return'[src="'+Ft(t)+'"]'}function ho(t){return"script[async]"+t}function Eg(t,a,i){if(a.count++,a.instance===null)switch(a.type){case"style":var s=t.querySelector('style[data-href~="'+Ft(i.href)+'"]');if(s)return a.instance=s,ct(s),s;var c=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),ct(s),vt(s,"style",c),nl(s,i.precedence,t),a.instance=s;case"stylesheet":c=ri(i.href);var d=t.querySelector(fo(c));if(d)return a.state.loading|=4,a.instance=d,ct(d),d;s=_g(i),(c=on.get(c))&&hf(s,c),d=(t.ownerDocument||t).createElement("link"),ct(d);var g=d;return g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),vt(d,"link",s),a.state.loading|=4,nl(d,i.precedence,t),a.instance=d;case"script":return d=ii(i.src),(c=t.querySelector(ho(d)))?(a.instance=c,ct(c),c):(s=i,(c=on.get(d))&&(s=y({},i),pf(s,c)),t=t.ownerDocument||t,c=t.createElement("script"),ct(c),vt(c,"link",s),t.head.appendChild(c),a.instance=c);case"void":return null;default:throw Error(o(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(s=a.instance,a.state.loading|=4,nl(s,i.precedence,t));return a.instance}function nl(t,a,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,d=c,g=0;g<s.length;g++){var S=s[g];if(S.dataset.precedence===a)d=S;else if(d!==c)break}d?d.parentNode.insertBefore(t,d.nextSibling):(a=i.nodeType===9?i.head:i,a.insertBefore(t,a.firstChild))}function hf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function pf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var al=null;function Cg(t,a,i){if(al===null){var s=new Map,c=al=new Map;c.set(i,s)}else c=al,s=c.get(i),s||(s=new Map,c.set(i,s));if(s.has(t))return s;for(s.set(t,null),i=i.getElementsByTagName(t),c=0;c<i.length;c++){var d=i[c];if(!(d[xi]||d[pt]||t==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var g=d.getAttribute(a)||"";g=t+g;var S=s.get(g);S?S.push(d):s.set(g,[d])}}return s}function Tg(t,a,i){t=t.ownerDocument||t,t.head.insertBefore(i,a==="title"?t.querySelector("head > title"):null)}function JS(t,a,i){if(i===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Rg(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function WS(t,a,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var c=ri(s.href),d=a.querySelector(fo(c));if(d){a=d._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=rl.bind(t),a.then(t,t)),i.state.loading|=4,i.instance=d,ct(d);return}d=a.ownerDocument||a,s=_g(s),(c=on.get(c))&&hf(s,c),d=d.createElement("link"),ct(d);var g=d;g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),vt(d,"link",s),i.instance=d}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,a),(a=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=rl.bind(t),a.addEventListener("load",i),a.addEventListener("error",i))}}var mf=0;function e2(t,a){return t.stylesheets&&t.count===0&&ol(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var s=setTimeout(function(){if(t.stylesheets&&ol(t,t.stylesheets),t.unsuspend){var d=t.unsuspend;t.unsuspend=null,d()}},6e4+a);0<t.imgBytes&&mf===0&&(mf=62500*NS());var c=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ol(t,t.stylesheets),t.unsuspend)){var d=t.unsuspend;t.unsuspend=null,d()}},(t.imgBytes>mf?50:800)+a);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function rl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ol(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var il=null;function ol(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,il=new Map,a.forEach(t2,t),il=null,rl.call(t))}function t2(t,a){if(!(a.state.loading&4)){var i=il.get(t);if(i)var s=i.get(null);else{i=new Map,il.set(t,i);for(var c=t.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var g=c[d];
vendor: 4,633 bytes, line 10
10(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(i.set(g.dataset.precedence,g),s=g)}s&&i.set(null,s)}c=a.instance,g=c.getAttribute("data-precedence"),d=i.get(g)||s,d===s&&i.set(null,c),i.set(g,c),this.count++,s=rl.bind(this),c.addEventListener("load",s),c.addEventListener("error",s),d?d.parentNode.insertBefore(c,d.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(c,t.firstChild)),a.state.loading|=4}}var po={$$typeof:$,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function n2(t,a,i,s,c,d,g,S,A){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=uu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uu(0),this.hiddenUpdates=uu(null),this.identifierPrefix=s,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Ag(t,a,i,s,c,d,g,S,A,D,I,Y){return t=new n2(t,a,i,g,A,D,I,Y,S),a=1,d===!0&&(a|=24),d=$t(3,null,null,a),t.current=d,d.stateNode=t,a=Gu(),a.refCount++,t.pooledCache=a,a.refCount++,d.memoizedState={element:s,isDehydrated:i,cache:a},Fu(d),t}function xg(t){return t?(t=Ur,t):Ur}function Og(t,a,i,s,c,d){c=xg(c),s.context===null?s.context=c:s.pendingContext=c,s=ca(a),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=fa(t,s,a),i!==null&&(kt(i,t,a),Ii(i,t,a))}function Mg(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<a?i:a}}function gf(t,a){Mg(t,a),(t=t.alternate)&&Mg(t,a)}function zg(t){if(t.tag===13||t.tag===31){var a=Ia(t,67108864);a!==null&&kt(a,t,67108864),gf(t,67108864)}}function kg(t){if(t.tag===13||t.tag===31){var a=Gt();a=cu(a);var i=Ia(t,a);i!==null&&kt(i,t,a),gf(t,a)}}var sl=!0;function a2(t,a,i,s){var c=U.T;U.T=null;var d=Z.p;try{Z.p=2,yf(t,a,i,s)}finally{Z.p=d,U.T=c}}function r2(t,a,i,s){var c=U.T;U.T=null;var d=Z.p;try{Z.p=8,yf(t,a,i,s)}finally{Z.p=d,U.T=c}}function yf(t,a,i,s){if(sl){var c=vf(s);if(c===null)nf(t,a,s,ll,i),Ng(t,s);else if(o2(c,t,a,i,s))s.stopPropagation();else if(Ng(t,s),a&4&&-1<i2.indexOf(t)){for(;c!==null;){var d=Tr(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var g=Ha(d.pendingLanes);if(g!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var A=1<<31-Ht(g);S.entanglements[1]|=A,g&=~A}Sn(d),(Ae&6)===0&&(Zs=wt()+500,so(0))}}break;case 31:case 13:S=Ia(d,2),S!==null&&kt(S,d,2),Qs(),gf(d,2)}if(d=vf(s),d===null&&nf(t,a,s,ll,i),d===c)break;c=d}c!==null&&s.stopPropagation()}else nf(t,a,s,null,i)}}function vf(t){return t=bu(t),bf(t)}var ll=null;function bf(t){if(ll=null,t=Cr(t),t!==null){var a=u(t);if(a===null)t=null;else{var i=a.tag;if(i===13){if(t=f(a),t!==null)return t;t=null}else if(i===31){if(t=h(a),t!==null)return t;t=null}else if(i===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return ll=t,null}function Lg(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(qe()){case ht:return 2;case gn:return 8;case _r:case I0:return 32;case Vd:return 268435456;default:return 32}default:return 32}}var Sf=!1,_a=null,Ea=null,Ca=null,mo=new Map,go=new Map,Ta=[],i2="mou
10sedown 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 Ng(t,a){switch(t){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Ea=null;break;case"mouseover":case"mouseout":Ca=null;break;case"pointerover":case"pointerout":mo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":go.delete(a.pointerId)}}function yo(t,a,i,s,c,d){return t===null||t.nativeEvent!==d?(t={blockedOn:a,domEventName:i,eventSystemFlags:s,nativeEvent:d,targetContainers:[c]},a!==null&&(a=Tr(a),a!==null&&zg(a)),t):(t.eventSystemFlags|=s,a=t.targetContainers,c!==null&&a.indexOf(c)===-1&&a.push(c),t)}function o2(t,a,i,s,c){switch(a){case"focusin":return _a=yo(_a,t,a,i,s,c),!0;case"dragenter":return Ea=yo(Ea,t,a,i,s,c),!0;case"mouseover":return Ca=yo(Ca,t,a,i,s,c),!0;case"pointerover":var d=c.pointerId;return mo.set(d,yo(mo.get(d)||null,t,a,i,s,c)),!0;case"gotpointercapture":return d=c.pointerId,go.set(d,yo(go.get(d)||null,t,a,i,s,c)),!0}return!1}function Dg(t){var a=Cr(t.target);if(a!==null){var i=u(a);if(i!==null){if(a=i.tag,a===13){if(a=f(i),a!==null){t.blockedOn=a,Xd(t.priority,function(){kg(i)});return}}else if(a===31){if(a=h(i),a!==null){t.blockedOn=a,Xd(t.priority,function(){kg(i)});return}}else if(a===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ul(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var i=vf(t.nativeEvent);if(i===null){i=t.nativeEvent;var s=new i.constructor(i.type,i);vu=s,i.target.dispatchEvent(s),vu=null}else return a=Tr(i),a!==null&&zg(a),t.blockedOn=i,!1;a.shift()}return!0}function Ug(t,a,i){ul(t)&&i.delete(a)}function s2(){Sf=!1,_a!==null&&ul(_a)&&(_a=null),Ea!==null&&ul(Ea)&&(Ea=null),Ca!==null&&ul(Ca)&&(Ca=null),mo.forEach(Ug),go.forEach(Ug)}function cl(t,a){t.blockedOn===a&&(t.blockedOn=null,Sf||(Sf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,s2)))}var fl=null;function Bg(t){fl!==t&&(fl=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){fl===t&&(fl=null);for(var a=0;a<t.length;a+=3){var i=t[a],s=t[a+1],c=t[a+2];if(typeof s!="function"){if(bf(s||i)===null)continue;break}var d=Tr(i);d!==null&&(t.splice(a,3),a-=3,yc(d,{pending:!0,data:c,method:i.method,action:s},s,c))}}))}function oi(t){function a(A){return cl(A,t)}_a!==null&&cl(_a,t),Ea!==null&&cl(Ea,t),Ca!==null&&cl(Ca,t),mo.forEach(a),go.forEach(a);for(var i=0;i<Ta.length;i++){var s=Ta[i];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Ta.length&&(i=Ta[0],i.blockedOn===null);)Dg(i),i.blockedOn===null&&Ta.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var c=i[s],d=i[s+1],g=c[Rt]||null;if(typeof d=="function")g||Bg(i);else if(g){var S=null;if(d&&d.hasAttribute("formAction")){if(c=d,g=d[Rt]||null)S=g.formAction;else if(bf(c)!==null)continue}else S=g.action;typeof S=="function"?i[s+1]=S:(i.splice(s,3),s-=3),Bg(i)}}}function jg(){function t(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(g){return c=g})},focusReset:"manual",scroll:"manual"})}function a(){c!==null&&(c(),c=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,c=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),c!==null&&(c(),c=null)}}}function wf(t){this._internalRoot=t}dl.prototype.render=wf.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(o(409));var i=a.current,s=Gt();Og(i,s,t,a,null,null)},dl.prototype.unmount=wf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Og(t.current,2,null,t,null,null),Qs(),a[Er]=null}};function dl(t){this._internalRoot=t}dl.prototype.unstable_scheduleHydration=function(t){if(t){var a=Yd();t={blockedOn:null,target:t,priority:a};for(var i=0;i<Ta.length&&a!==0&&a<Ta[i].priority;i++);Ta.splice(i,0,t),i===0&&Dg(t)}};var qg=n.version;if(qg!=="19.2.4")throw Error(o(527,qg,"19.2.4"));Z.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=m(a),t=t!==null?v(t):null,t=t===null?null:t.stateNode,t};var l2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hl.isDisabled&&hl.supportsFiber)try{Ti=hl.inject(l2),qt=hl}catch{}}return bo.createRoot=function(t,a){if(!l(t))throw Error(o(299));var i=!1,s="",c=Qp,d=Gp,g=Yp;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(g=a.onRecoverableError)),a=Ag(t,1,!1,null,null,i,s,null,c,d,g,jg),t[Er]=a.current,tf(t),new wf(a)},bo.hydrateRoot=function(t,a,i){if(!l(t))throw Error(o(299));var s=!1,c="",d=Qp,g=Gp,S=Yp,A=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(A=i.formState)),a=Ag(t,1,!0,a,i??null,s,c,A,d,g,S,jg),a.context=xg(null),i=a.current,s=Gt(),s=cu(s),c=ca(s),c.callback=null,fa(i,c,s),i=s,a.current.lanes=i,Ai(a,i),Sn(a),t[Er]=a.current,tf(t),new dl(a)},bo.version="19.2.4",bo}var Xg;function v2(){if(Xg)return Cf.exports;Xg=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(n){console.error(n)}}return e(),Cf.exports=y2(),Cf.exports}var b2=v2(),S2="__TSS_CONTEXT",Wf=Symbol.for("TSS_SERVER_FUNCTION"),w2="application/x-tss-framed",Yn={JSON:0,CHUNK:1,END:2,ERROR:3},_2=/;\s*v=(\d+)/;function E2(e){const n=e.match(_2);return n?parseInt(n[1],10):void 0}function C2(e){const n=E2(e);if(n!==void 0&&n!==1)throw new Error(`Incompatible framed protocol version: server=${n}, client=1. Please ensure client and server are using compatible versions.`)}var O1=()=>window.__TSS_START_OPTIONS__;const M1=!1;function Uo(e){return e[e.length-1]}function T2(e){return typeof e=="function"}function Oa(e,n){return T2(e)?e(n):e}const z1=Object.prototype.hasOwnProperty,Kg=Object.prototype.propertyIsEnumerable;function k1(e){for(const n in e)if(z1.call(e,n))return!0;return!1}const R2=()=>Object.create(null),rr=(e,n)=>sr(e,n,R2);function sr(e,n,r=()=>({}),o=0){if(e===n)return e;if(o>500)return n;const l=n,u=Wg(e)&&Wg(l);if(!u&&!(bi(e)&&bi(l)))return l;const f=u?e:Fg(e);if(!f)return l;const h=u?l:Fg(l);if(!h)return l;const p=f.length,m=h.length,v=u?new Array(m):r();let y=0;for(let w=0;w<m;w++){const b=u?w:h[w],C=e[b],O=l[b];if(C===O){v[b]=C,(u?w<p:z1.call(e,b))&&y++;continue}if(C===null||O===null||typeof C!="object"||typeof O!="object"){v[b]=O;continue}const R=sr(C,O,r,o+1);v[b]=R,R===C&&y++}return p===m&&y===p?e:v}function Fg(e){const n=Object.getOwnPropertyNames(e);for(const l of n)if(!Kg.call(e,l))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return n;const o=n;for(const l of r){if(!Kg.call(e,l))return!1;o.push(l)}return o}function bi(e){if(!Jg(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const r=n.prototype;return!(!Jg(r)||!r.hasOwnProperty("isPrototypeOf"))}function Jg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Wg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ut(e,n,r){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let o=0,l=e.length;o<l;o++)if(!Ut(e[o],n[o],r))return!1;return!0}if(bi(e)&&bi(n)){const o=r?.ignoreUndefined??!0;if(r?.partial){for(const f in n)if((!o||n[f]!==void 0)&&!Ut(e[f],n[f],r))return!1;return!0}let l=0;if(!o)l=Object.keys(e).length;else for(const f in e)e[f]!==void 0&&l++;let u=0;for(const f in n)if((!o||n[f]!==void 0)&&(u++,u>l||!Ut(e[f],n[f],r)))return!1;return l===u}return!1}function pr(e){let n,r;const o=new Promise((l,u)=>{n=l,r=u});return o.status="pending",o.resolve=l=>{o.status="resolved",o.value=l,n(l),e?.(l)},o.reject=l=>{o.status="rejected",r(l)},o}function A2(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Bo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function x2(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function ey(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return x2(n)}const O2=["http:","https:","mailto:","tel:"];function Bl(e,n){if(!e)return!1;
10try{const r=new URL(e);return!n.has(r.protocol)}catch{return!1}}const M2={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},z2=/[&><\u2028\u2029]/g;function k2(e){return e.replace(z2,n=>M2[n])}function So(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let r=0,o="",l;for(;(l=n.exec(e))!==null;)o+=ey(e.slice(r,l.index))+l[0],r=n.lastIndex;o=o+ey(r?e.slice(r):e);let u=!1;return o.startsWith("//")&&(u=!0,o="/"+o.replace(/^\/+/,"")),{path:o,handledProtocolRelativeURL:u}}function L2(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function N2(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}function jt(){throw new Error("Invariant failed")}function jo(e){const n=new Map;let r,o;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,o&&(o.next=u,u.prev=o)):(u.next.prev=void 0,r=u.next,u.next=void 0,o&&(u.prev=o,o.next=u)),o=u)};return{get(u){const f=n.get(u);if(f)return l(f),f.value},set(u,f){if(n.size>=e&&r){const p=r;n.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===o&&(o=void 0)}const h=n.get(u);if(h)h.value=f,l(h);else{const p={key:u,value:f,prev:o};o&&(o.next=p),o=p,r||(r=p),n.set(u,p)}},clear(){n.clear(),r=void 0,o=void 0}}}const Ma=4,L1=5;function D2(e){const n=e.indexOf("{");if(n===-1)return null;const r=e.indexOf("}",n);return r===-1||n+1>=e.length?null:[n,r]}function N1(e,n,r=new Uint16Array(6)){const o=e.indexOf("/",n),l=o===-1?e.length:o,u=e.substring(n,l);if(!u||!u.includes("$"))return r[0]=0,r[1]=n,r[2]=n,r[3]=l,r[4]=l,r[5]=l,r;if(u==="$"){const h=e.length;return r[0]=2,r[1]=n,r[2]=n,r[3]=h,r[4]=h,r[5]=h,r}if(u.charCodeAt(0)===36)return r[0]=1,r[1]=n,r[2]=n+1,r[3]=l,r[4]=l,r[5]=l,r;const f=D2(u);if(f){const[h,p]=f,m=u.charCodeAt(h+1);if(m===45){if(h+2<u.length&&u.charCodeAt(h+2)===36){const v=h+3,y=p;if(v<y)return r[0]=3,r[1]=n+h,r[2]=n+v,r[3]=n+y,r[4]=n+p+1,r[5]=l,r}}else if(m===36){const v=h+1,y=h+2;return y===p?(r[0]=2,r[1]=n+h,r[2]=n+v,r[3]=n+y,r[4]=n+p+1,r[5]=e.length,r):(r[0]=1,r[1]=n+h,r[2]=n+y,r[3]=n+p,r[4]=n+p+1,r[5]=l,r)}}return r[0]=0,r[1]=n,r[2]=n,r[3]=l,r[4]=l,r[5]=l,r}function Xl(e,n,r,o,l,u,f){f?.(r);let h=o;{const p=r.fullPath??r.from,m=p.length,v=r.options?.caseSensitive??e,y=r.options?.params?.parse??r.options?.parseParams;for(;h<m;){const b=N1(p,h,n);let C;const O=h,R=b[5];switch(h=R+1,u++,b[0]){case 0:{const z=p.substring(b[2],b[3]);if(v){const H=l.static?.get(z);if(H)C=H;else{l.static??=new Map;const $=lr(r.fullPath??r.from);$.parent=l,$.depth=u,C=$,l.static.set(z,$)}}else{const H=z.toLowerCase(),$=l.staticInsensitive?.get(H);if($)C=$;else{l.staticInsensitive??=new Map;const B=lr(r.fullPath??r.from);B.parent=l,B.depth=u,C=B,l.staticInsensitive.set(H,B)}}break}case 1:{const z=p.substring(O,b[1]),H=p.substring(b[4],R),$=v&&!!(z||H),B=z?$?z:z.toLowerCase():void 0,W=H?$?H:H.toLowerCase():void 0,te=!y&&l.dynamic?.find(V=>!V.parse&&V.caseSensitive===$&&V.prefix===B&&V.suffix===W);if(te)C=te;else{const V=Of(1,r.fullPath??r.from,$,B,W);C=V,V.depth=u,V.parent=l,l.dynamic??=[],l.dynamic.push(V)}break}case 3:{const z=p.substring(O,b[1]),H=p.substring(b[4],R),$=v&&!!(z||H),B=z?$?z:z.toLowerCase():void 0,W=H?$?H:H.toLowerCase():void 0,te=!y&&l.optional?.find(V=>!V.parse&&V.caseSensitive===$&&V.prefix===B&&V.suffix===W);if(te)C=te;else{const V=Of(3,r.fullPath??r.from,$,B,W);C=V,V.parent=l,V.depth=u,l.optional??=[],l.optional.push(V)}break}case 2:{const z=p.substring(O,b[1]),H=p.substring(b[4],R),$=v&&!!(z||H),B=z?$?z:z.toLowerCase():void 0,W=H?$?H:H.toLowerCase():void 0,te=Of(2,r.fullPath??r.from,$,B,W);C=te,te.parent=l,te.depth=u,l.wildcard??=[],l.wildcard.push(te)}}l=C}if(y&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const b=lr(r.fullPath??r.from);b.kind=L1,b.parent=l,u++,b.depth=u,l.pathless??=[],l.pathless.push(b),l=b}const w=(r.path||!r.children)&&!r.isRoot;if(w&&p.endsWith("/")){const b=lr(r.fullPath??r.from);b.kind=Ma,b.parent=l,u++,b.depth=u,l.index=b,l=b}l.parse=y??null,w&&!l.route&&(l.route=r,l.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Xl(e,n,p,h,l,u,f)}function xf(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}
10if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function Aa(e){if(e.pathless)for(const n of e.pathless)Aa(n);if(e.static)for(const n of e.static.values())Aa(n);if(e.staticInsensitive)for(const n of e.staticInsensitive.values())Aa(n);if(e.dynamic?.length){e.dynamic.sort(xf);for(const n of e.dynamic)Aa(n)}if(e.optional?.length){e.optional.sort(xf);for(const n of e.optional)Aa(n)}if(e.wildcard?.length){e.wildcard.sort(xf);for(const n of e.wildcard)Aa(n)}}function lr(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function Of(e,n,r,o,l){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,caseSensitive:r,prefix:o,suffix:l}}function U2(e,n){const r=lr("/"),o=new Uint16Array(6);for(const l of e)Xl(!1,o,l,1,r,0);Aa(r),n.masksTree=r,n.flatCache=jo(1e3)}function B2(e,n){e||="/";const r=n.flatCache.get(e);if(r)return r;const o=yd(e,n.masksTree);return n.flatCache.set(e,o),o}function j2(e,n,r,o,l){e||="/",o||="/";const u=n?`case\0${e}`:e;let f=l.singleCache.get(u);return f||(f=lr("/"),Xl(n,new Uint16Array(6),{from:e},1,f,0),l.singleCache.set(u,f)),yd(o,f,r)}function q2(e,n,r=!1){const o=r?e:`nofuzz\0${e}`,l=n.matchCache.get(o);if(l!==void 0)return l;e||="/";let u;try{u=yd(e,n.segmentTree,r)}catch(f){if(f instanceof URIError)u=null;else throw f}return u&&(u.branch=U1(u.route)),n.matchCache.set(o,u),u}function H2(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function P2(e,n=!1,r){const o=lr(e.fullPath),l=new Uint16Array(6),u={},f={};let h=0;return Xl(n,l,e,1,o,0,p=>{if(r?.(p,h),p.id in u&&jt(),u[p.id]=p,h!==0&&p.path){const m=H2(p.fullPath);(!f[m]||p.fullPath.endsWith("/"))&&(f[m]=p)}h++}),Aa(o),{processedTree:{segmentTree:o,singleCache:jo(1e3),matchCache:jo(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:f}}function yd(e,n,r=!1){const o=e.split("/"),l=V2(e,o,n,r);if(!l)return null;const[u]=D1(e,o,l);return{route:l.node.route,rawParams:u}}function D1(e,n,r){const o=$2(r.node);let l=null;const u=Object.create(null);let f=r.extract?.part??0,h=r.extract?.node??0,p=r.extract?.path??0,m=r.extract?.segment??0;for(;h<o.length;f++,h++,p++,m++){const v=o[h];if(v.kind===Ma)break;if(v.kind===L1){m--,f--,p--;continue}const y=n[f],w=p;if(y&&(p+=y.length),v.kind===1){l??=r.node.fullPath.split("/");const b=l[m],C=v.prefix?.length??0;if(b.charCodeAt(C)===123){const O=v.suffix?.length??0,R=b.substring(C+2,b.length-O-1),z=y.substring(C,y.length-O);u[R]=decodeURIComponent(z)}else{const O=b.substring(1);u[O]=decodeURIComponent(y)}}else if(v.kind===3){if(r.skipped&1<<h){f--,p=w-1;continue}l??=r.node.fullPath.split("/");const b=l[m],C=v.prefix?.length??0,O=v.suffix?.length??0,R=b.substring(C+3,b.length-O-1),z=v.suffix||v.prefix?y.substring(C,y.length-O):y;z&&(u[R]=decodeURIComponent(z))}else if(v.kind===2){const b=v,C=e.substring(w+(b.prefix?.length??0),e.length-(b.suffix?.length??0)),O=decodeURIComponent(C);u["*"]=O,u._splat=O;break}}return r.rawParams&&Object.assign(u,r.rawParams),[u,{part:f,node:h,path:p,segment:m}]}function U1(e){const n=[e];for(;e.parentRoute;)e=e.parentRoute,n.push(e);return n.reverse(),n}function $2(e){const n=Array(e.depth+1);do n[e.depth]=e,e=e.parent;while(e);return n}function V2(e,n,r,o){if(e==="/"&&r.index)return{node:r.index,skipped:0};const l=!Uo(n),u=l&&e!=="/",f=n.length-(l?1:0),h=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const v=h.pop(),{node:y,index:w,skipped:b,depth:C,statics:O,dynamics:R,optionals:z}=v;let{extract:H,rawParams:$}=v;if(y.kind===2&&y.route&&!ml(m,v))continue;if(y.parse){if(!ty(e,n,v))continue;$=v.rawParams,H=v.extract}o&&y.route&&y.kind!==Ma&&ml(p,v)&&(p=v);const B=w===f;if(B&&(y.route&&(!u||y.kind===Ma||y.kind===2)&&ml(m,v)&&(m=v),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const W=B?void 0:n[w];let te;if(B&&y.index){const V={node:y.index,index:w,skipped:b,depth:C+1,statics:O,dynamics:R,optionals:z,extract:H,rawParams:$};let F=!0;if(y.index.parse&&(ty(e,n,V)||(F=!1)),F){if(!R&&!z&&!b&&Z2(O,f))return V;ml(m,V)&&(m=V)}}if(y.wildcard)for(let V=y.wildcard.length-1;V>=0;V--){const F=y.wildcard[V],{prefix:ne,suffix:fe}=F;if(!(ne&&(B||!(F.caseSensitive?W:te??=W.toLowerCase()).startsWith(ne)))){if(fe){if(B)continue;const se=n.slice(w).join("/").slice(-fe.length);if((F.caseSensitive?se:se.toLowerCase())!==fe)continue}h.push({node:F,index:f,skipped:b,depth:C+1,statics:O,dynamics:R,optionals:z,extract:H,rawParams:$})}}if(y.optional){const V=b|1<<C,F=C+1;for(let ne=y.optional.length-1;ne>=0;ne--){const fe=y.optional[ne];h.push({node:fe,index:w,skipped:V,depth:F,statics:O,dynamics:R,optionals:z,extract:H,rawParams:$})}if(!B)for(let ne=y.optional.length-1;ne>=0;ne--){const fe=y.optional[ne],{prefix:se,suffix:le}=fe;if(se||le){const $e=fe.caseSensitive?W:te??=W.toLowerCase();if(se&&!$e.startsWith(se)||le&&!$e.endsWith(le))continue}h.push({node:fe,index:w+1,skipped:b,depth:F,statics:O,dynamics:R,optionals:z+pl(f,w),extract:H,rawParams:$})}}if(!B&&y.dynamic&&W)for(let V=y.dynamic.length-1;V>=0;V--){const F=y.dynamic[V],{prefix:ne,suffix:fe}=F;if(ne||fe){const se=F.caseSensitive?W:te??=W.toLowerCase();if(ne&&!se.startsWith(ne)||fe&&!se.endsWith(fe))continue}h.push({node:F,index:w+1,skipped:b,depth:C+1,statics:O,dynamics:R+pl(f,w),optionals:z,extract:H,rawParams:$})}if(!B&&y.staticInsensitive){const V=y.staticInsensitive.get(te??=W.toLowerCase());V&&h.push({node:V,index:w+1,skipped:b,depth:C+1,statics:O+pl(f,w),dynamics:R,optionals:z,extract:H,rawParams:$})}if(!B&&y.static){const V=y.static.get(W);V&&h.push({node:V,index:w+1,skipped:b,depth:C+1,statics:O+pl(f,w),dynamics:R,optionals:z,extract:H,rawParams:$})}if(y.pathless){const V=C+1;for(let F=y.pathless.length-1;F>=0;F--){const ne=y.pathless[F];h.push({node:ne,index:w,skipped:b,depth:V,statics:O,dynamics:R,optionals:z,extract:H,rawParams:$})}}}if(m)return m;if(o&&p){let v=p.index;for(let w=0;w<p.index;w++)v+=n[w].length;const y=v===e.length?"/":e.slice(v);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(y),p}return null}function pl(e,n){return 2**(e-n-1)}function Z2(e,n){return e===2**(n-1)-1}function ty(e,n,r){let o,l;try{[o,l]=D1(e,n,r)}catch{return null}if(r.rawParams=o,r.extract=l,!r.node.parse)return!0;try{if(r.node.parse(o)===!1)return null}catch{}return!0}function ml(e,n){return e?n.statics>e.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===Ma)>(e.node.kind===Ma)||n.node.kind===Ma==(e.node.kind===Ma)&&n.depth>
10e.depth))):!0}function zl(e){return vd(e.filter(n=>n!==void 0).join("/"))}function vd(e){return e.replace(/\/{2,}/g,"/")}function B1(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Kn(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function j1(e){return Kn(B1(e))}function jl(e,n){return e?.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function I2(e,n,r){return jl(e,r)===jl(n,r)}function Q2({base:e,to:n,trailingSlash:r="never",cache:o}){const l=n.startsWith("/"),u=!l&&n===".";let f;if(o){f=l?n:u?e:e+"\0"+n;const m=o.get(f);if(m)return m}let h;if(u)h=e.split("/");else if(l)h=n.split("/");else{for(h=e.split("/");h.length>1&&Uo(h)==="";)h.pop();const m=n.split("/");for(let v=0,y=m.length;v<y;v++){const w=m[v];w===""?v?v===y-1&&h.push(w):h=[w]:w===".."?h.pop():w==="."||h.push(w)}}h.length>1&&(Uo(h)===""?r==="never"&&h.pop():r==="always"&&h.push(""));const p=vd(h.join("/"))||"/";return f&&o&&o.set(f,p),p}function G2(e){const n=new Map(e.map(l=>[encodeURIComponent(l),l])),r=Array.from(n.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),o=new RegExp(r,"g");return l=>l.replace(o,u=>n.get(u)??u)}function Mf(e,n,r){const o=n[e];return typeof o!="string"?o:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(o)?o:o.split("/").map(l=>ay(l,r)).join("/"):ay(o,r)}function ny({path:e,params:n,decoder:r,...o}){let l=!1;const u=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!e.includes("$"))return{interpolatedPath:e,usedParams:u,isMissingParams:l};const f=e.length;let h=0,p,m="";for(;h<f;){const v=h;p=N1(e,v,p);const y=p[5];if(h=y+1,v===y)continue;const w=p[0];if(w===0){m+="/"+e.substring(v,y);continue}if(w===2){const b=n._splat;u._splat=b,u["*"]=b;const C=e.substring(v,p[1]),O=e.substring(p[4],y);if(!b){l=!0,(C||O)&&(m+="/"+C+O);continue}const R=Mf("_splat",n,r);m+="/"+C+R+O;continue}if(w===1){const b=e.substring(p[2],p[3]);!l&&!(b in n)&&(l=!0),u[b]=n[b];const C=e.substring(v,p[1]),O=e.substring(p[4],y),R=Mf(b,n,r)??"undefined";m+="/"+C+R+O;continue}if(w===3){const b=e.substring(p[2],p[3]),C=n[b];if(C==null)continue;u[b]=C;const O=e.substring(v,p[1]),R=e.substring(p[4],y),z=Mf(b,n,r)??"";m+="/"+O+z+R;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:u,interpolatedPath:m||"/",isMissingParams:l}}function ay(e,n){const r=encodeURIComponent(e);return n?.(r)??r}function dt(e){return e?.isNotFound===!0}function Y2(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const X2="tsr-scroll-restoration-v1_3";function K2(){const e=Y2();if(!e)return null;let n={};try{const o=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");bi(o)&&(n=o)}catch{}return{get state(){return n},set:o=>{n=Oa(o,n)||n},persist:()=>{try{e.setItem(X2,JSON.stringify(n))}catch{}}}}const ry=K2(),F2=e=>e.state.__TSR_key||e.href;function J2(e){const n=[];let r;for(;r=e.parentNode;)n.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${n.reverse().join(" > ")}`.toLowerCase()}let gl=!1;const wo="window",iy="data-scroll-restoration-id";function W2(e,n){if(!ry)return;const r=ry;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,gl=!1;const o=e.options.getScrollRestorationKey||F2,l=new Map;window.history.scrollRestoration="manual";const u=h=>{if(!(gl||!e.isScrollRestoring))if(h.target===document||h.target===window)l.set(wo,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=h.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},f=h=>{if(!e.isScrollRestoring||!h||l.size===0||!r)return;const p=r.state[h]||={};for(const[m,v]of l){let y;if(m===wo)y=wo;else if(m.isConnected){const w=m.getAttribute(iy);y=w?`[${iy}="${w}"]`:J2(m)}y&&(p[y]=v)}};document.addEventListener("scroll",u,!0),e.subscribe("onBeforeLoad",h=>{f(h.fromLocation?o(h.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{f(o(e.stores.resolvedLocation.get()??e.stores.location.get())),r.persist()}),e.subscribe("onRendered",h=>{const p=o(h.toLocation),m=e.options.scrollRestorationBehavior,v=e.options.scrollToTopSelectors;if(l.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}
10if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){gl=!0;try{const y=e.isScrollRestoring?r.state[p]:void 0;let w=!1;if(y)for(const b in y){const C=y[b];if(!bi(C))continue;const{scrollX:O,scrollY:R}=C;if(!(!Number.isFinite(O)||!Number.isFinite(R))){if(b===wo)window.scrollTo({top:R,left:O,behavior:m}),w=!0;else if(b){let z;try{z=document.querySelector(b)}catch{continue}z&&(z.scrollLeft=O,z.scrollTop=R,w=!0)}}}if(!w){const b=e.history.location.hash.slice(1);if(b){const C=window.history.state?.__hashScrollIntoViewOptions??!0;if(C){const O=document.getElementById(b);O&&O.scrollIntoView(C)}}else{const C={top:0,left:0,behavior:m};if(window.scrollTo(C),v)for(const O of v){if(O===wo)continue;const R=typeof O=="function"?O():document.querySelector(O);R&&R.scrollTo(C)}}}}finally{gl=!1}e.isScrollRestoring&&r.set(y=>(y[p]||={},y))}})}function q1(e,n=String){const r=new URLSearchParams;for(const o in e){const l=e[o];l!==void 0&&r.set(o,n(l))}return r.toString()}function zf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function ew(e){const n=new URLSearchParams(e),r=Object.create(null);for(const[o,l]of n.entries()){const u=r[o];u==null?r[o]=zf(l):Array.isArray(u)?u.push(zf(l)):r[o]=[u,zf(l)]}return r}const tw=aw(JSON.parse),nw=rw(JSON.stringify,JSON.parse);function aw(e){return n=>{n[0]==="?"&&(n=n.substring(1));const r=ew(n);for(const o in r){const l=r[o];if(typeof l=="string")try{r[o]=e(l)}catch{}}return r}}function rw(e,n){const r=typeof n=="function";function o(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(r&&typeof l=="string")try{return n(l),e(l)}catch{}return l}return l=>{const u=q1(l,o);return u?`?${u}`:""}}const fr="__root__";function H1(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:n});if(r.options=e,e.throw)throw r;return r}function Bt(e){return e instanceof Response&&!!e.options}function iw(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return H1(e)}function ow(e){return{input:({url:n})=>{for(const r of e)n=ed(r,n);return n},output:({url:n})=>{for(let r=e.length-1;r>=0;r--)n=P1(e[r],n);return n}}}function sw(e){const n=j1(e.basepath),r=`/${n}`,o=`${r}/`,l=e.caseSensitive?r:r.toLowerCase(),u=e.caseSensitive?o:o.toLowerCase();return{input:({url:f})=>{const h=e.caseSensitive?f.pathname:f.pathname.toLowerCase();return h===l?f.pathname="/":h.startsWith(u)&&(f.pathname=f.pathname.slice(r.length)),f},output:({url:f})=>(f.pathname=zl(["/",n,f.pathname]),f)}}function ed(e,n){const r=e?.input?.({url:n});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return n}function P1(e,n){const r=e?.output?.({url:n});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return n}function lw(e,n){const{createMutableStore:r,createReadonlyStore:o,batch:l,init:u}=n,f=new Map,h=new Map,p=new Map,m=r(e.status),v=r(e.loadedAt),y=r(e.isLoading),w=r(e.isTransitioning),b=r(e.location),C=r(e.resolvedLocation),O=r(e.statusCode),R=r(e.redirect),z=r([]),H=r([]),$=r([]),B=o(()=>kf(f,z.get())),W=o(()=>kf(h,H.get())),te=o(()=>kf(p,$.get())),V=o(()=>z.get()[0]),F=o(()=>z.get().some(Z=>f.get(Z)?.get().status==="pending")),ne=o(()=>({locationHref:b.get().href,resolvedLocationHref:C.get()?.href,status:m.get()})),fe=o(()=>({status:m.get(),loadedAt:v.get(),isLoading:y.get(),isTransitioning:w.get(),matches:B.get(),location:b.get(),resolvedLocation:C.get(),statusCode:O.get(),redirect:R.get()})),se=jo(64);function le(Z){let re=se.get(Z);return re||(re=o(()=>{const he=z.get();for(const x of he){const E=f.get(x);if(E&&E.routeId===Z)return E.get()}}),se.set(Z,re)),re}const $e={status:m,loadedAt:v,isLoading:y,isTransitioning:w,location:b,resolvedLocation:C,statusCode:O,redirect:R,matchesId:z,pendingIds:H,cachedIds:$,matches:B,pendingMatches:W,cachedMatches:te,firstId:V,hasPending:F,matchRouteDeps:ne,matchStores:f,pendingMatchStores:h,cachedMatchStores:p,__store:fe,getRouteMatchStore:le,setMatches:xe,setPending:ue,setCac
10hed:U};xe(e.matches),u?.($e);function xe(Z){Lf(Z,f,z,r,l)}function ue(Z){Lf(Z,h,H,r,l)}function U(Z){Lf(Z,p,$,r,l)}return $e}function kf(e,n){const r=[];for(const o of n){const l=e.get(o);l&&r.push(l.get())}return r}function Lf(e,n,r,o,l){const u=e.map(h=>h.id),f=new Set(u);l(()=>{for(const h of n.keys())f.has(h)||n.delete(h);for(const h of e){const p=n.get(h.id);if(!p){const m=o(h);m.routeId=h.routeId,n.set(h.id,m);continue}p.routeId=h.routeId,p.get()!==h&&p.set(h)}N2(r.get(),u)||r.set(u)})}const td=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},uw=e=>e.stores.matchesId.get().some(n=>e.stores.matchStores.get(n)?.get()._forcePending),Kl=(e,n)=>!!(e.preload&&!e.router.stores.matchStores.has(n)),dr=(e,n,r=!0)=>{const o={...e.router.options.context??{}},l=r?n:n-1;for(let u=0;u<=l;u++){const f=e.matches[u];if(!f)continue;const h=e.router.getMatch(f.id);h&&Object.assign(o,h.__routeContext,h.__beforeLoadContext)}return o},oy=(e,n)=>{if(!e.matches.length)return;const r=n.routeId,o=e.matches.findIndex(f=>f.routeId===e.router.routeTree.id),l=o>=0?o:0;let u=r?e.matches.findIndex(f=>f.routeId===r):e.firstBadMatchIndex??e.matches.length-1;u<0&&(u=l);for(let f=u;f>=0;f--){const h=e.matches[f];if(e.router.looseRoutesById[h.routeId].options.notFoundComponent)return f}return r?u:l},za=(e,n,r)=>{if(!(!Bt(r)&&!dt(r)))throw Bt(r)&&r.redirectHandled&&!r.options.reloadDocument||(n&&(n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0,n._nonReactive.error=r,e.updateMatch(n.id,o=>({...o,status:Bt(r)?"redirected":dt(r)?"notFound":o.status==="pending"?"success":o.status,context:dr(e,n.index),isFetching:!1,error:r})),dt(r)&&!r.routeId&&(r.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()),Bt(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},$1=(e,n)=>{const r=e.router.getMatch(n);return!!(!r||r._nonReactive.dehydrated)},sy=(e,n,r)=>{const o=dr(e,r);e.updateMatch(n,l=>({...l,context:o}))},_o=(e,n,r,o)=>{const{id:l,routeId:u}=e.matches[n],f=e.router.looseRoutesById[u];if(r instanceof Promise)throw r;r.routerCode=o,e.firstBadMatchIndex??=n,za(e,e.router.getMatch(l),r);try{f.options.onError?.(r)}catch(h){r=h,za(e,e.router.getMatch(l),r)}e.updateMatch(l,h=>(h._nonReactive.beforeLoadPromise?.resolve(),h._nonReactive.beforeLoadPromise=void 0,h._nonReactive.loadPromise?.resolve(),{...h,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Bt(r)&&!dt(r)&&(e.serialError??=r)},V1=(e,n,r,o)=>{if(o._nonReactive.pendingTimeout!==void 0)return;const l=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Kl(e,n)&&(r.options.loader||r.options.beforeLoad||I1(r))&&typeof l=="number"&&l!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{td(e)},l);o._nonReactive.pendingTimeout=u}},cw=(e,n,r)=>{const o=e.router.getMatch(n);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;V1(e,n,r,o);const l=()=>{const u=e.router.getMatch(n);u.preload&&(u.status==="redirected"||u.status==="notFound")&&za(e,u,u.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(l):l()},fw=(e,n,r,o)=>{const l=e.router.getMatch(n);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=pr(()=>{u?.resolve(),u=void 0});const{paramsError:f,searchError:h}=l;f&&_o(e,r,f,"PARSE_PARAMS"),h&&_o(e,r,h,"VALIDATE_SEARCH"),V1(e,n,o,l);const p=new AbortController;let m=!1;const v=()=>{m||(m=!0,e.updateMatch(n,B=>({...B,isFetching:"beforeLoad",fetchCount:B.fetchCount+1,abortController:p})))},y=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(n,B=>({...B,isFetching:!1}))};if(!o.options.beforeLoad){e.router.batch(()=>{v(),y()});return}l._nonReactive.beforeLoadPromise=pr();const w={...dr(e,r,!1),...l.__routeContext},{search:b,params:C,cause:O}=l,R=Kl(e,n),z={search:b,abortController:p,params:C,preload:R,context:w,location:e.location,navigate:B=>e.router.navigate({...B,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:R?"preload":O,matches:e.matches,routeId:o.id,...e.router.options.additionalContext},H=B=>
10{if(B===void 0){e.router.batch(()=>{v(),y()});return}(Bt(B)||dt(B))&&(v(),_o(e,r,B,"BEFORE_LOAD")),e.router.batch(()=>{v(),e.updateMatch(n,W=>({...W,__beforeLoadContext:B})),y()})};let $;try{if($=o.options.beforeLoad(z),Bo($))return v(),$.catch(B=>{_o(e,r,B,"BEFORE_LOAD")}).then(H)}catch(B){v(),_o(e,r,B,"BEFORE_LOAD")}H($)},dw=(e,n)=>{const{id:r,routeId:o}=e.matches[n],l=e.router.looseRoutesById[o],u=()=>h(),f=()=>fw(e,r,n,l),h=()=>{if($1(e,r))return;const p=cw(e,r,l);return Bo(p)?p.then(f):f()};return u()},hw=(e,n,r)=>{const o=e.router.getMatch(n);if(!o||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:o,params:o.params,loaderData:o.loaderData};return Promise.all([r.options.head?.(l),r.options.scripts?.(l),r.options.headers?.(l)]).then(([u,f,h])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:h,scripts:f,styles:u?.styles}))},Z1=(e,n,r,o,l)=>{const u=n[o-1],{params:f,loaderDeps:h,abortController:p,cause:m}=e.router.getMatch(r),v=dr(e,o),y=Kl(e,r);return{params:f,deps:h,preload:!!y,parentMatchPromise:u,abortController:p,context:v,location:e.location,navigate:w=>e.router.navigate({...w,_fromLocation:e.location}),cause:y?"preload":m,route:l,...e.router.options.additionalContext}},ly=async(e,n,r,o,l)=>{try{const u=e.router.getMatch(r);try{(!(M1??e.router.isServer)||u.ssr===!0)&&qo(l);const f=l.options.loader,h=typeof f=="function"?f:f?.handler,p=h?.(Z1(e,n,r,o,l)),m=!!h&&Bo(p);if((m||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(r,y=>({...y,isFetching:"loader"})),h){const y=m?await p:p;za(e,e.router.getMatch(r),y),y!==void 0&&e.updateMatch(r,w=>({...w,loaderData:y}))}l._lazyPromise&&await l._lazyPromise;const v=u._nonReactive.minPendingPromise;v&&await v,l._componentsPromise&&await l._componentsPromise,e.updateMatch(r,y=>({...y,error:void 0,context:dr(e,o),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(f){let h=f;if(h?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:dr(e,o)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,dt(f)&&await l.options.notFoundComponent?.preload?.(),za(e,e.router.getMatch(r),f);try{l.options.onError?.(f)}catch(m){h=m,za(e,e.router.getMatch(r),m)}!Bt(h)&&!dt(h)&&await qo(l,["errorComponent"]),e.updateMatch(r,m=>({...m,error:h,context:dr(e,o),status:"error",isFetching:!1}))}}catch(u){const f=e.router.getMatch(r);f&&(f._nonReactive.loaderPromise=void 0),za(e,f,u)}},pw=async(e,n,r)=>{async function o(b,C,O,R,z){const H=Date.now()-C.updatedAt,$=b?z.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:z.options.staleTime??e.router.options.defaultStaleTime??0,B=z.options.shouldReload,W=typeof B=="function"?B(Z1(e,n,l,r,z)):B,{status:te,invalid:V}=R,F=H>=$&&(!!e.forceStaleReload||R.cause==="enter"||O!==void 0&&O!==R.id);f=te==="success"&&(V||(W??F)),b&&z.options.preload===!1||(f&&!e.sync&&v?(h=!0,(async()=>{try{await ly(e,n,l,r,z);const ne=e.router.getMatch(l);ne._nonReactive.loaderPromise?.resolve(),ne._nonReactive.loadPromise?.resolve(),ne._nonReactive.loaderPromise=void 0,ne._nonReactive.loadPromise=void 0}catch(ne){Bt(ne)&&await e.router.navigate(ne.options)}})()):te!=="success"||f?await ly(e,n,l,r,z):sy(e,l,r))}const{id:l,routeId:u}=e.matches[r];let f=!1,h=!1;const p=e.router.looseRoutesById[u],m=p.options.loader,v=((typeof m=="function"?void 0:m?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if($1(e,l)){if(!e.router.getMatch(l))return e.matches[r];sy(e,l,r)}else{const b=e.router.getMatch(l),C=e.router.stores.matchesId.get()[r],O=(C&&e.router.stores.matchStores.get(C)||null)?.routeId===u?C:e.router.stores.matches.get().find(z=>z.routeId===u)?.id,R=Kl(e,l);if(b._nonReactive.loaderPromise){if(b.status==="success"&&!e.sync&&!b.preload&&v)return b;await b._nonReactive.loaderPromise;const z=e.router.getMatch(l),H=z._nonReactive.error||z.error;H&&za(e,z,H),z.status==="pending"&&await o(R,b,O,z,p)}else{const z=R&&!e.router.stores.matchStores.has(l),H=e.router.getMatch(l);H._nonReactive.loaderPromise=pr(),z!==H.preload&&e.updateMatch(l,$=>({...$,preload:z})),await o(R,b,O,H,p)}}const y=e.router.getMatch(l);h||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pen
10dingTimeout),y._nonReactive.pendingTimeout=void 0,h||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const w=h?y.isFetching:!1;return w!==y.isFetching||y.invalid!==!1?(e.updateMatch(l,b=>({...b,isFetching:w,invalid:!1})),e.router.getMatch(l)):y};async function uy(e){const n=e,r=[];uw(n.router)&&td(n);let o;for(let w=0;w<n.matches.length;w++){try{const b=dw(n,w);Bo(b)&&await b}catch(b){if(Bt(b))throw b;if(dt(b))o=b;else if(!n.preload)throw b;break}if(n.serialError||n.firstBadMatchIndex!=null)break}const l=n.firstBadMatchIndex??n.matches.length,u=o&&!n.preload?oy(n,o):void 0,f=o&&n.preload?0:u!==void 0?Math.min(u+1,l):l;let h,p;for(let w=0;w<f;w++)r.push(pw(n,r,w));try{await Promise.all(r)}catch{const w=await Promise.allSettled(r);for(const b of w){if(b.status!=="rejected")continue;const C=b.reason;if(Bt(C))throw C;dt(C)?h??=C:p??=C}if(p!==void 0)throw p}const m=h??(o&&!n.preload?o:void 0);let v=n.firstBadMatchIndex!==void 0?n.firstBadMatchIndex:n.matches.length-1;if(!m&&o&&n.preload)return n.matches;if(m){const w=oy(n,m);w===void 0&&jt();const b=n.matches[w],C=n.router.looseRoutesById[b.routeId],O=n.router.options?.defaultNotFoundComponent;!C.options.notFoundComponent&&O&&(C.options.notFoundComponent=O),m.routeId=b.routeId;const R=b.routeId===n.router.routeTree.id;n.updateMatch(b.id,z=>({...z,...R?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),v=w,await qo(C,["notFoundComponent"])}else if(!n.preload){const w=n.matches[0];w.globalNotFound||n.router.getMatch(w.id)?.globalNotFound&&n.updateMatch(w.id,b=>({...b,globalNotFound:!1,error:void 0}))}if(n.serialError&&n.firstBadMatchIndex!==void 0){const w=n.router.looseRoutesById[n.matches[n.firstBadMatchIndex].routeId];await qo(w,["errorComponent"])}for(let w=0;w<=v;w++){const{id:b,routeId:C}=n.matches[w],O=n.router.looseRoutesById[C];try{const R=hw(n,b,O);if(R){const z=await R;n.updateMatch(b,H=>({...H,...z}))}}catch(R){console.error(`Error executing head for route ${C}:`,R)}}const y=td(n);if(Bo(y)&&await y,m)throw m;if(n.serialError&&!n.preload&&!n.onReady)throw n.serialError;return n.matches}function cy(e,n){const r=n.map(o=>e.options[o]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function qo(e,n=kl){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(o=>{const{id:l,...u}=o.options;Object.assign(e.options,u),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:n===kl?(()=>{if(e._componentsPromise===void 0){const o=cy(e,kl);o?e._componentsPromise=o.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():cy(e,n);return e._lazyPromise?e._lazyPromise.then(r):r()}function I1(e){for(const n of kl)if(e.options[n]?.preload)return!0;return!1}const kl=["component","errorComponent","pendingComponent","notFoundComponent"];var La="__TSR_index",fy="popstate",dy="beforeunload";function mw(e){let n=e.getLocation();const r=new Set,o=f=>{n=e.getLocation(),r.forEach(h=>h({location:n,action:f}))},l=f=>{e.notifyOnIndexChange??!0?o(f):n=e.getLocation()},u=async({task:f,navigateOpts:h,...p})=>{if(h?.ignoreBlocker??!1){f();return}const m=e.getBlockers?.()??[],v=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&v)for(const y of m){const w=ql(p.path,p.state);if(await y.blockerFn({currentLocation:n,nextLocation:w,action:p.type})){e.onBlocked?.();return}}f()};return{get location(){return n},get length(){return e.getLength()},subscribers:r,subscribe:f=>(r.add(f),()=>{r.delete(f)}),push:(f,h,p)=>{const m=n.state[La];h=hy(m+1,h),u({task:()=>{e.pushState(f,h),o({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:f,state:h})},replace:(f,h,p)=>{const m=n.state[La];h=hy(m,h),u({task:()=>{e.replaceState(f,h),o({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:f,state:h})},go:(f,h)=>{u({task:()=>{e.go(f),l({type:"GO",index:f})},navigateOpts:h,type:"GO"})},back:f=>{u({task:()=>{e.back(f?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:f,type:"BACK"})},forward:f=>{u({task:()=>{e.forward(f?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:f,type:"FORWARD"})},canGoBack:()=>n.state[La]!==0,createHref:f=>e.createHref(f),block:f=>{if(!e.setBlockers)return()=>{};const h=e.getBlockers?.()??[];return e.setBlockers([...h,f]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(m=>m!==f))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:o}}function hy(e,n){n||(n={});const r=bd();return{...n,key:r,__TSR_key:r,[La]:e}}function gw(e){const n=typeof document<"u"?window:void 0,r=n.history.pushState,o=n.history.replaceState;let l=[];const u=()=>l,f=F=>l=F,h=(F=>F),p=(()=>ql(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!n.history.state?.__TSR_key&&!n.history.state?.key){const F=bd();n.history.replaceState({[La]:0,key:F,__TSR_key:F},"")}let m=p(),v,y=!1,w=!1,b=!1,C=!1;const O=()=>m;let R,z;const H=()=>{R&&(V._ignoreSubscribers=!0,(R.isPush?n.history.pushState:n.history.replaceState)(R.state,"",R.href),V._ignoreSubscribers=!1,R=void 0,z=void 0,v=void 0)},$=(F,ne,fe)=>{const se=h(ne);z||(v=m),m=ql(ne,fe),R={href:se,state:fe,isPush:R?.isPush||F==="push"},z||(z=Promise.resolve().then(()=>H()))},B=F=>{m=p(),V.notify({type:F})},W=async()=>
10{if(w){w=!1;return}const F=p(),ne=F.state[La]-m.state[La],fe=ne===1,se=ne===-1,le=!fe&&!se||y;y=!1;const $e=le?"GO":se?"BACK":"FORWARD",xe=le?{type:"GO",index:ne}:{type:se?"BACK":"FORWARD"};if(b)b=!1;else{const ue=u();if(typeof document<"u"&&ue.length){for(const U of ue)if(await U.blockerFn({currentLocation:m,nextLocation:F,action:$e})){w=!0,n.history.go(1),V.notify(xe);return}}}m=p(),V.notify(xe)},te=F=>{if(C){C=!1;return}let ne=!1;const fe=u();if(typeof document<"u"&&fe.length)for(const se of fe){const le=se.enableBeforeUnload??!0;if(le===!0){ne=!0;break}if(typeof le=="function"&&le()===!0){ne=!0;break}}if(ne)return F.preventDefault(),F.returnValue=""},V=mw({getLocation:O,getLength:()=>n.history.length,pushState:(F,ne)=>$("push",F,ne),replaceState:(F,ne)=>$("replace",F,ne),back:F=>(F&&(b=!0),C=!0,n.history.back()),forward:F=>{F&&(b=!0),C=!0,n.history.forward()},go:F=>{y=!0,n.history.go(F)},createHref:F=>h(F),flush:H,destroy:()=>{n.history.pushState=r,n.history.replaceState=o,n.removeEventListener(dy,te,{capture:!0}),n.removeEventListener(fy,W)},onBlocked:()=>{v&&m!==v&&(m=v)},getBlockers:u,setBlockers:f,notifyOnIndexChange:!1});return n.addEventListener(dy,te,{capture:!0}),n.addEventListener(fy,W),n.history.pushState=function(...F){const ne=r.apply(n.history,F);return V._ignoreSubscribers||B("PUSH"),ne},n.history.replaceState=function(...F){const ne=o.apply(n.history,F);return V._ignoreSubscribers||B("REPLACE"),ne},V}function yw(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function ql(e,n){const r=yw(e),o=r.indexOf("#"),l=r.indexOf("?"),u=bd();return{href:r,pathname:r.substring(0,o>0?l>0?Math.min(o,l):o:l>0?l:r.length),hash:o>-1?r.substring(o):"",search:l>-1?r.slice(l,o===-1?void 0:o):"",state:n||{[La]:0,key:u,__TSR_key:u}}}function bd(){return(Math.random()+1).toString(36).substring(7)}function vw(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function mi(e,n){const r=n,o=e;return{fromLocation:r,toLocation:o,pathChanged:r?.pathname!==o.pathname,hrefChanged:r?.href!==o.href,hashChanged:r?.hash!==o.hash}}var bw=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=r=>r(),this.update=r=>{const o=this.options,l=this.basepath??o?.basepath??"/",u=this.basepath===void 0,f=o?.rewrite;if(this.options={...o,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=G2(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=gw()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=jo(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=lw(ww(this.latestLocation),v),W2(this)}let h=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(u||l!==p||f!==m){this.basepath=p;const v=[],y=j1(p);y&&y!=="/"&&v.push(sw({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:ow(v),this.history&&this.updateLatestLocation(),h=!0}h&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=P2(this.routeTree,this.options.caseSensitive,(o,l)=>{o.init({originalIndex:l})});return this.options.routeMasks&&U2(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,o)=>{const l={eventType:r,fn:o};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=r=>
10{this.subscribers.forEach(o=>{o.eventType===r.type&&o.fn(r)})},this.parseLocation=(r,o)=>{const l=({pathname:p,search:m,hash:v,href:y,state:w})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const z=this.options.parseSearch(m),H=this.options.stringifySearch(z);return{href:p+H+v,publicHref:p+H+v,pathname:So(p).path,external:!1,searchStr:H,search:rr(o?.search,z),hash:So(v.slice(1)).path,state:sr(o?.state,w)}}const b=new URL(y,this.origin),C=ed(this.rewrite,b),O=this.options.parseSearch(C.search),R=this.options.stringifySearch(O);return C.search=R,{href:C.href.replace(C.origin,""),publicHref:y,pathname:So(C.pathname).path,external:!!this.rewrite&&C.origin!==this.origin,searchStr:R,search:rr(o?.search,O),hash:So(C.hash.slice(1)).path,state:sr(o?.state,w)}},u=l(r),{__tempLocation:f,__tempKey:h}=u.state;if(f&&(!h||h===this.tempLocationKey)){const p=l(f);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(r,o)=>Q2({base:r,to:o.includes("//")?vd(o):o,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,o,l)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:o},l):this.matchRoutesInternal(r,o),this.getMatchedRoutes=r=>_w({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const o=this.getMatch(r);o&&(o.abortController.abort(),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const o=this.stores.matchStores.get(r)?.get();o&&(o.status==="pending"||o.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const o=(u={})=>{const f=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,h=this.matchRoutesLightweight(f);u.from;const p=u.unsafeRelative==="path"?f.pathname:u.from??h.fullPath,m=u.to?`${u.to}`:void 0,v=h.search,y=Object.assign(Object.create(null),h.params),w=m?.charCodeAt(0)===47?"/":this.resolvePathWithBase(p,"."),b=m?this.resolvePathWithBase(w,m):w,C=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?y:Object.assign(y,Oa(u.params,y)),O=this.routesByPath[Kn(b)];let R;if(O)R=this.getRouteBranch(O);else if(b.includes("$"))R=[];else{const se=this.getMatchedRoutes(b);R=se.matchedRoutes,this.options.notFoundRoute&&(!se.foundRoute||se.foundRoute.path!=="/"&&se.routeParams["**"])&&(R=[...R,this.options.notFoundRoute])}if(R.length&&k1(C))for(const se of R){const le=se.options.params?.stringify??se.options.stringifyParams;if(le)try{Object.assign(C,le(C))}catch{}}const z=r.leaveParams?b:So(ny({path:b,params:C,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let H=v;if(r._includeValidateSearch&&this.options.search?.strict){const se={};R.forEach(le=>{if(le.options.validateSearch)try{Object.assign(se,Ll(le.options.validateSearch,{...se,...H}))}catch{}}),H=se}H=Ew({search:H,dest:u,destRoutes:R,_includeValidateSearch:r._includeValidateSearch}),H=rr(v,H);const $=this.options.stringifySearch(H),B=u.hash===!0?f.hash:u.hash?Oa(u.hash,f.hash):void 0,W=B?`#${B}`:"";let te=u.state===!0?f.state:u.state?Oa(u.state,f.state):{};te=sr(f.state,te);const V=`${z}${$}${W}`;let F,ne,fe=!1;if(this.rewrite){const se=new URL(V,this.origin),le=P1(this.rewrite,se);F=se.href.replace(se.origin,""),le.origin!==this.origin?(ne=le.href,fe=!0):ne=le.pathname+le.search+le.hash}else F=L2(V),ne=F;return{publicHref:ne,href:F,pathname:z,search:H,searchStr:$,state:te,hash:B??"",external:fe,unmaskOnReload:u.unmaskOnReload}},l=(u={},f)=>{const h=o(u);let p=f?o(f):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const v=B2(h.pathname,this.processedTree);if(v){Object.assign(m,v.rawParams);const{from:y,params:w,...b}=v.route,C=w===!1||w===null?Object.create(null):(w??!0)===!0?m:Object.assign(m,Oa(w,m));f={from:r.from,...b,params:C},p=o(f)}}}return p&&(h.maskedLocation=p),h};return r.mask?l(r,{from:r.from,...r.mask}):l(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:o,...l})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(v=>{l.state[v]=this.latestLocation.state[v]});const m=Ut(l.state,this.latestLocation.state);return p.forEach(v=>{delete l.state[v]}),m},f=Kn(this.latestLocation.href)===Kn(l.href);let h=this.commitLocationPromise;if(this.commitLocationPromise=pr(()=>{h?.resolve(),h=void 0}),f&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...v}=l;p&&(v={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[l.replace?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:o})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:o,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:f,href:h,...p}={})=>
10{if(h){const y=this.history.location.state.__TSR_index,w=ql(h,{__TSR_index:r?y:y+1}),b=new URL(w.pathname,this.origin);p.to=ed(this.rewrite,b).pathname,p.search=this.options.parseSearch(w.search),p.hash=w.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const v=this.commitLocation({...m,viewTransition:u,replace:r,resetScroll:o,hashScrollIntoView:l,ignoreBlocker:f});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:r,reloadDocument:o,href:l,publicHref:u,...f})=>{let h=!1;if(l)try{new URL(`${l}`),h=!0}catch{}if(h&&!o&&(o=!0),o){if(r!==void 0||!l){const m=this.buildLocation({to:r,...f});l=l??m.publicHref,u=u??m.publicHref}const p=!h&&u?u:l;if(Bl(p,this.protocolAllowlist))return Promise.resolve();if(!f.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const v of m)if(v?.blockerFn&&await v.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return f.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...f,href:l,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),o=this.stores.cachedMatches.get().filter(l=>!r.some(u=>u.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(o)})},this.load=async r=>{let o,l,u;const f=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,v=mi(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...v}),this.emit({type:"onBeforeLoad",...v}),await uy({router:this,sync:r?.sync,forceStaleReload:f.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=null,w=null,b=null,C=null;this.batch(()=>{const O=this.stores.pendingMatches.get(),R=O.length,z=this.stores.matches.get();y=R?z.filter(B=>!this.stores.pendingMatchStores.has(B.id)):null;const H=new Set;for(const B of this.stores.pendingMatchStores.values())B.routeId&&H.add(B.routeId);const $=new Set;for(const B of this.stores.matchStores.values())B.routeId&&$.add(B.routeId);w=R?z.filter(B=>!H.has(B.routeId)):null,b=R?O.filter(B=>!$.has(B.routeId)):null,C=R?O.filter(B=>$.has(B.routeId)):z,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),R&&(this.stores.setMatches(O),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...y.filter(B=>B.status!=="error"&&B.status!=="notFound"&&B.status!=="redirected")]),this.clearExpiredCache())});for(const[O,R]of[[w,"onLeave"],[b,"onEnter"],[C,"onStay"]])if(O)for(const z of O)this.looseRoutesById[z.routeId].options[R]?.(z)})})}})}catch(m){Bt(m)?(o=m,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):dt(m)&&(l=m);const v=o?o.status:l?404:this.stores.matches.get().some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(v),this.stores.redirect.set(o)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let h;this.hasNotFoundMatch()?h=404:this.stores.matches.get().some(p=>p.status==="error")&&(h=500),h!==void 0&&this.stores.statusCode.set(h)},this.startViewTransition=r=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof o=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,f=this.stores.resolvedLocation.get(),h=typeof o.types=="function"?o.types(mi(u,f)):o.types;if(h===!1){r();return}l={update:r,types:h}}else l=r;document.startViewTransition(l)}else r()},this.updateMatch=(r,o)=>{this.startTransition(()=>
10{const l=this.stores.pendingMatchStores.get(r);if(l){l.set(o);return}const u=this.stores.matchStores.get(r);if(u){u.set(o);return}const f=this.stores.cachedMatchStores.get(r);if(f){const h=o(f.get());h.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==r)):f.set(h)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const o=l=>r?.filter?.(l)??!0?{...l,invalid:!0,...r?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(o)),this.stores.setCached(this.stores.cachedMatches.get().map(o)),this.stores.setPending(this.stores.pendingMatches.get().map(o))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const o=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const l=r.options._builtLocation??this.buildLocation(r.options),u=this.getParsedLocationHref(l);r.options.href=u,r.headers.set("Location",u)}else if(o)try{const l=new URL(o);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;r.options.href=u,r.headers.set("Location",u)}}catch{}if(r.options.href&&!r.options._builtLocation&&Bl(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const o=r?.filter;o!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!o(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),o=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const f=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:r-l.updatedAt>=f};this.clearCache({filter:o})},this.loadRouteChunk=qo,this.preloadRoute=async r=>{const o=r._builtLocation??this.buildLocation(r);let l=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:r});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),f=new Set([...u,...this.stores.cachedIds.get()]),h=l.filter(p=>!f.has(p.id));if(h.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...h])}try{return l=await uy({router:this,matches:l,location:o,preload:!0,updateMatch:(p,m)=>{u.has(p)?l=l.map(v=>v.id===p?m(v):v):this.updateMatch(p,m)}}),l}catch(p){if(Bt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:o});dt(p)||console.error(p);return}},this.matchRoute=(r,o)=>{const l={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},u=this.buildLocation(l);if(o?.pending&&this.stores.status.get()!=="pending")return!1;const f=(o?.pending===void 0?!this.stores.isLoading.get():o.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=j2(u.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,f.pathname,this.processedTree);return!h||r.params&&!Ut(h.rawParams,r.params,{partial:!0})?!1:o?.includeSearch??!0?Ut(f.search,u.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??nw,parseSearch:e.parseSearch??tw,protocolAllowlist:e.protocolAllowlist??O2}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:r}){this.routesById=e,this.routesByPath=n,this.processedTree=r;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=U1(e),this.routeBranchCache.set(e,n)),n}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,n){const r=this.getMatchedRoutes(e.pathname),{foundRoute:o,routeParam
10s:l}=r;let{matchedRoutes:u}=r,f=!1;(o?o.path!=="/"&&l["**"]:Kn(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:f=!0);const h=f?Tw(this.options.notFoundMode,u):void 0,p=new Array(u.length),m=new Map;for(const v of this.stores.matchStores.values())v.routeId&&m.set(v.routeId,v.get());for(let v=0;v<u.length;v++){const y=u[v],w=p[v-1];let b,C,O;{const le=w?.search??e.search,$e=w?._strictSearch??void 0;try{const xe=Ll(y.options.validateSearch,{...le})??void 0;b={...le,...xe},C={...$e,...xe},O=void 0}catch(xe){let ue=xe;if(xe instanceof Hl||(ue=new Hl(xe.message,{cause:xe})),n?.throwOnError)throw ue;b=le,C={},O=ue}}const R=y.options.loaderDeps?.({search:b})??"",z=R?JSON.stringify(R):"",{interpolatedPath:H,usedParams:$}=ny({path:y.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),B=y.id+H+z,W=this.getMatch(B),te=m.get(y.id),V=W?._strictParams??$;let F;if(!W)try{py(y,V)}catch(le){if(dt(le)||Bt(le)?F=le:F=new Sw(le.message,{cause:le}),n?.throwOnError)throw F}Object.assign(l,V);const ne=te?"stay":"enter";let fe;if(W)fe={...W,cause:ne,params:te?.params??l,_strictParams:V,search:rr(te?te.search:W.search,b),_strictSearch:C};else{const le=y.options.loader||y.options.beforeLoad||y.lazyFn||I1(y)?"pending":"success";fe={id:B,ssr:y.options.ssr,index:v,routeId:y.id,params:te?.params??l,_strictParams:V,pathname:H,updatedAt:Date.now(),search:te?rr(te.search,b):b,_strictSearch:C,searchError:void 0,status:le,isFetching:!1,error:void 0,paramsError:F,__routeC
10ontext:void 0,_nonReactive:{loadPromise:pr()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ne,loaderDeps:te?sr(te.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:y.options.staticData||{},fullPath:y.fullPath}}n?.preload||(fe.globalNotFound=h===y.id),fe.searchError=O;const se=this.getParentContext(w);fe.context={...se,...fe.__routeContext,...fe.__beforeLoadContext},p[v]=fe}for(let v=0;v<p.length;v++){const y=p[v],w=this.looseRoutesById[y.routeId],b=this.getMatch(y.id),C=m.get(y.routeId);if(y.params=C?rr(C.params,l):l,!b){const O=p[v-1],R=this.getParentContext(O);if(w.options.context){const z={deps:y.loaderDeps,params:y.params,context:R??{},location:e,navigate:H=>this.navigate({...H,_fromLocation:e}),buildLocation:this.buildLocation,cause:y.cause,abortController:y.abortController,preload:!!y.preload,matches:p,routeId:w.id};y.__routeContext=w.options.context(z)??void 0}y.context={...R,...y.__routeContext,...y.__beforeLoadContext}}}return p}matchRoutesLightweight(e){const{matchedRoutes:n,routeParams:r}=this.getMatchedRoutes(e.pathname),o=Uo(n),l={...e.search};for(const m of n)try{Object.assign(l,Ll(m.options.validateSearch,l))}catch{}const u=Uo(this.stores.matchesId.get()),f=u&&this.stores.matchStores.get(u)?.get(),h=f&&f.routeId===o.id&&f.pathname===e.pathname;let p;if(h)p=f.params;else{const m=Object.assign(Object.create(null),r);for(const v of n)try{py(v,m)}catch{}p=m}return{matchedRoutes:n,fullPath:o.fullPath,search:l,params:p}}},Hl=class extends Error{},Sw=class extends Error{};function ww(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ll(e,n){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(n);if(r instanceof Promise)throw new Hl("Async validation not supported");if(r.issues)throw new Hl(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(n):typeof e=="function"?e(n):{}}function _w({pathname:e,routesById:n,processedTree:r}){const o=Object.create(null),l=Kn(e);let u;const f=q2(l,r,!0);return f&&(u=f.route,Object.assign(o,f.rawParams)),{matchedRoutes:f?.branch||[n.__root__],routeParams:o,foundRoute:u}}function Ew({search:e,dest:n,destRoutes:r,_includeValidateSearch:o}){return Cw(r)(e,n,o??!1)}function Cw(e){const n={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)l.options.search?.middlewares&&n.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:f,next:h})=>{let p=f;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((v,y)=>y(v),f));const m=h(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((v,y)=>y(v),m):m};n.middlewares.push(u)}if(l.options.validateSearch){const u=({search:f,next:h})=>{const p=h(f);if(!n._includeValidateSearch)return p;try{return{...p,...Ll(l.options.validateSearch,p)??void 0}}catch{return p}};n.middlewares.push(u)}}const r=({search:l})=>{const u=n.dest;return u.search?u.search===!0?l:Oa(u.search,l):{}};n.middlewares.push(r);const o=(l,u,f)=>{if(l>=f.length)return u;const h=f[l];return h({search:u,next:m=>o(l+1,m,f)})};return function(u,f,h){return n.dest=f,n._includeValidateSearch=h,o(0,u,n.middlewares)}}function Tw(e,n){if(e!=="root")for(let r=n.length-1;r>=0;r--){const o=n[r];if(o.children)return o.id}return fr}function py(e,n){const r=e.options.params?.parse??e.options.parseParams;if(r){const o=r(n);if(o===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(n,o)}}const Cn=Symbol.for("TSR_DEFERRED_PROMISE");function Rw(e,n){const r=e;return r[Cn]||(r[Cn]={status:"pending"},r.then(o=>{r[Cn].status="success",r[Cn].data=o}).catch(o=>{r[Cn].status="error",r[Cn].error={data:vw(o),__isServerError:!0}})),r}const Aw="Error preloading route! ☝️";function my(e,n){if(e)return typeof e=="string"?e:e[n]}function xw(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Ow(e){if(e.tag!=="link")return;const n=e.attrs?.rel,r=e.attrs?.href;if(typeof r=="string"&&(typeof n=="string"?n.split(/\s+/):[]).includes("stylesheet"))return r}function Mw(e,n){const r=Ow(n);return!!r&&e?.inlineCss?.styles[r]!==void 0}var Q1=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=n=>{this.originalIndex=n.originalIndex;const r=this.options,o=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=fr:this.parentRoute||jt();let l=o?fr:r?.path;l&&l!=="/"&&(l=B1(l));const u=r?.id||l;let f=o?fr:zl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),f!=="__root__"&&(f=zl(["/",f]));const h=f==="__root__"?"/":zl([this.parentRoute.fullPath,l]);this._path=l,this._id=f,this._fullPath=h,this._to=Kn(h)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>H1({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},zw=class extends Q1{constructor(e){super(e)}};function kw(e){if(typeof document<"u"&&document.querySelector){const n=e.stores.location.get(),r=n.state.__hashScrollIntoViewOptions??!0;if(r&&n.hash!==""){const o=document.getElementById(n.hash);o&&o.scrollIntoView(r)}}}var Lw=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="Ob
10jectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(Lw||{}),Fn=Symbol.asyncIterator,G1=Symbol.hasInstance,gi=Symbol.isConcatSpreadable,Jn=Symbol.iterator,Y1=Symbol.match,X1=Symbol.matchAll,K1=Symbol.replace,F1=Symbol.search,J1=Symbol.species,W1=Symbol.split,ev=Symbol.toPrimitive,yi=Symbol.toStringTag,tv=Symbol.unscopables,nv={[Fn]:0,[G1]:1,[gi]:2,[Jn]:3,[Y1]:4,[X1]:5,[K1]:6,[F1]:7,[J1]:8,[W1]:9,[ev]:10,[yi]:11,[tv]:12},Nw={0:Fn,1:G1,2:gi,3:Jn,4:Y1,5:X1,6:K1,7:F1,8:J1,9:W1,10:ev,11:yi,12:tv},_=void 0,Dw={2:!0,3:!1,1:_,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},Uw={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},Bw={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Re(e,n,r,o,l,u,f,h,p,m,v,y){return{t:e,i:n,s:r,c:o,m:l,p:u,e:f,a:h,f:p,b:m,o:v,l:y}}function Na(e){return Re(2,_,e,_,_,_,_,_,_,_,_,_)}var av=Na(2),rv=Na(3),jw=Na(1),qw=Na(0),Hw=Na(4),Pw=Na(5),$w=Na(6),Vw=Na(7);function Zw(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return _}}function Da(e){let n="",r=0,o;for(let l=0,u=e.length;l<u;l++)o=Zw(e[l]),o&&(n+=e.slice(r,l)+o,r=l+1);return r===0?n=e:n+=e.slice(r),n}function Iw(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function Ua(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Iw)}var yl="__SEROVAL_REFS__",iv=new Map,di=new Map;function ov(e){return iv.has(e)}function Qw(e){return di.has(e)}function Gw(e){if(ov(e))return iv.get(e);throw new C_(e)}function Yw(e){if(Qw(e))return di.get(e);throw new T_(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,yl,{value:di,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,yl,{value:di,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,yl,{value:di,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,yl,{value:di,configurable:!0,writable:!1,enumerable:!1});function Sd(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function Xw(e){let n=Uw[Sd(e)];return e.name!==n?{name:e.name}:e.constructor.name!==n?{name:e.constructor.name}:{}}function sv(e,n){let r=Xw(e),o=Object.getOwnPropertyNames(e);for(let l=0,u=o.length,f;l<u;l++)f=o[l],f!=="name"&&f!=="message"&&(f==="stack"?n&4&&(r=r||{},r[f]=e[f]):(r=r||{},r[f]=e[f]));return r}function lv(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function Kw(e){switch(e){case Number.POSITIVE_INFINITY:return Pw;case Number.NEGATIVE_INFINITY:return $w}return e!==e?Vw:Object.is(e,-0)?Hw:Re(0,_,e,_,_,_,_,_,_,_,_,_)}function uv(e){return Re(1,_,Da(e),_,_,_,_,_,_,_,_,_)}function Fw(e){return Re(3,_,""+e,_,_,_,_,_,_,_,_,_)}function Jw(e){return Re(4,e,_,_,_,_,_,_,_,_,_,_)}function Ww(e,n){let r=n.valueOf();return Re(5,e,r!==r?"":n.toISOString(),_,_,_,_,_,_,_,_,_)}function e_(e,n){return Re(6,e,_,Da(n.source),n.flags,_,_,_,_,_,_,_)}function t_(e,n){return Re(17,e,nv[n],_,_,_,_,_,_,_,_,_)}function n_(e,n){return Re(18,e,Da(Gw(n)),_,_,_,_,_,_,_,_,_)}function a_(e,n,r){return Re(25,e,r,Da(n),_,_,_,_,_,_,_,_)}function r_(e,n,r){return Re(9,e,_,_,_,_,_,r,_,_,lv(n),_)}function i_(e,n){return Re(21,e,_,_,_,_,_,_,n,_,_,_)}function o_(e,n,r){return Re(15,e,_,n.constructor.name,_,_,_,_,r,n.byteOffset,_,n.length)}function s_(e,n,r){return Re(16,e,_,n.constructor.name,_,_,_,_,r,n.byteOffset,_,n.byteLength)}function l_(e,n,r){return Re(20,e,_,_,_,_,_,_,r,n.byteOffset,_,n.byteLength)}function u_(e,n,r){return Re(13,e,Sd(n),_,Da(n.message),r,_,_,_,_,_,_)}function c_(e,n,r){return Re(14,e,Sd(n),_,Da(n.message),r,_,_,_,_,_,_)}function f_(e,n){return Re(7,e,_,_,_,_,_,n,_,_,_,_)}function d_(e,n){return Re(28,_,_,_,_,_,_,[e,n],_,_,_,_)}function h_(e,n){return Re(30,_,_,_,_,_,_,[e,n],_,_,_,_)}function p_(e,n,r){return Re(31,e,_,_,_,_,_,r,n,_,_,_)}function m_(e,n){return Re(32,e,_,_,_,_,_,_,n,_,_,_)}function g_(e,n){return Re(33,e,_,_,_,_,_,_,n,_,_,_)}function y_(e,n){return Re(34,e,_,_,_,_,_,_,n,_,_,_)}function v_(e,n,r,o){return Re(35,e,r,_,_,_,_,n,_,_,_,o)}
12var b_={parsing:1,serialization:2,deserialization:3};function S_(e){return`Seroval Error (step: ${b_[e]})`}var w_=(e,n)=>S_(e),cv=class extends Error{constructor(e,n){super(w_(e)),this.cause=n}},gy=class extends cv{constructor(e){super("parsing",e)}},__=class extends cv{constructor(e){super("deserialization",e)}};function Wn(e){return`Seroval Error (specific: ${e})`}var Fl=class extends Error{constructor(n){super(Wn(1)),this.value=n}},fv=class extends Error{constructor(e){super(Wn(2))}},E_=class extends Error{constructor(e){super(Wn(3))}},Yo=class extends Error{constructor(e){super(Wn(4))}},C_=class extends Error{constructor(e){super(Wn(5)),this.value=e}},T_=class extends Error{constructor(e){super(Wn(6))}},R_=class extends Error{constructor(e){super(Wn(7))}},ea=class extends Error{constructor(e){super(Wn(8))}},A_=class extends Error{constructor(e){super(Wn(9))}},x_=class{constructor(e,n){this.value=e,this.replacement=n}},Jl=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((n,r)=>{e.s=n,e.f=r}),e},O_=(e,n)=>{e.s(n),e.p.s=1,e.p.v=n},M_=(e,n)=>{e.f(n),e.p.s=2,e.p.v=n};Jl.toString();O_.toString();M_.toString();var z_=()=>{let e=[],n=[],r=!0,o=!1,l=0,u=(p,m,v)=>{for(v=0;v<l;v++)n[v]&&n[v][m](p)},f=(p,m,v,y)=>{for(m=0,v=e.length;m<v;m++)y=e[m],!r&&m===v-1?p[o?"return":"throw"](y):p.next(y)},h=(p,m)=>(r&&(m=l++,n[m]=p),f(p),()=>{r&&(n[m]=n[l],n[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>h(p),next:p=>{r&&(e.push(p),u(p,"next"))},throw:p=>{r&&(e.push(p),u(p,"throw"),r=!1,o=!1,n.length=0)},return:p=>{r&&(e.push(p),u(p,"return"),r=!1,o=!0,n.length=0)}}},k_=e=>n=>()=>{let r=0,o={[e]:()=>o,next:()=>{if(r>n.d)return{done:!0,value:void 0};let l=r++,u=n.v[l];if(l===n.t)throw u;return{done:l===n.d,value:u}}};return o},L_=(e,n)=>r=>()=>{let o=0,l=-1,u=!1,f=[],h=[],p=(v=0,y=h.length)=>{for(;v<y;v++)h[v].s({done:!0,value:void 0})};r.on({next:v=>{let y=h.shift();y&&y.s({done:!1,value:v}),f.push(v)},throw:v=>{let y=h.shift();y&&y.f(v),p(),l=f.length,u=!0,f.push(v)},return:v=>{let y=h.shift();y&&y.s({done:!0,value:v}),p(),l=f.length,f.push(v)}});let m={[e]:()=>m,next:()=>{if(l===-1){let w=o++;if(w>=f.length){let b=n();return h.push(b),b.p}return{done:!1,value:f[w]}}if(o>l)return{done:!0,value:void 0};let v=o++,y=f[v];if(v!==l)return{done:!1,value:y};if(u)throw y;return{done:!0,value:y}}};return m},dv=e=>{let n=atob(e),r=n.length,o=new Uint8Array(r);for(let l=0;l<r;l++)o[l]=n.charCodeAt(l);return o.buffer};dv.toString();function N_(e){return"__SEROVAL_SEQUENCE__"in e}function hv(e,n,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t:n,d:r}}function D_(e){let n=[],r=-1,o=-1,l=e[Jn]();for(;;)try{let u=l.next();if(n.push(u.value),u.done){o=n.length-1;break}}catch(u){r=n.length,n.push(u)}return hv(n,r,o)}var U_=k_(Jn);function B_(e){return U_(e)}var j_={},q_={},H_={0:{},1:{},2:{},3:{},4:{},5:{}};function P_(e){return"__SEROVAL_STREAM__"in e}function vr(){return z_()}function $_(e){let n=vr(),r=e[Fn]();async function o(){try{let l=await r.next();l.done?n.return(l.value):(n.next(l.value),await o())}catch(l){n.throw(l)}}return o().catch(()=>{}),n}var V_=L_(Fn,Jl);function Z_(e){return V_(e)}async function I_(e){try{return[1,await e]}catch(n){return[0,n]}}function Q_(e,n){return{plugins:n.plugins,mode:e,marked:new Set,features:63^(n.disabledFeatures||0),refs:n.refs||new Map,depthLimit:n.depthLimit||1e3}}function Nl(e,n){e.marked.add(n)}function G_(e,n){let r=e.refs.size;return e.refs.set(n,r),r}function Wl(e,n){let r=e.refs.get(n);return r!=null?(Nl(e,r),{type:1,value:Jw(r)}):{type:0,value:G_(e,n)}}function wd(e,n){let r=Wl(e,n);return r.type===1?r:ov(n)?{type:2,value:n_(r.value,n)}:r}function ur(e,n){let r=wd(e,n);if(r.type!==0)return r.value;if(n in nv)return t_(r.value,n);throw new Fl(n)}function eu(e,n){let r=Wl(e,H_[n]);return r.type===1?r.value:Re(26,r.value,n,_,_,_,_,_,_,_,_,_)}function Y_(e){let n=Wl(e,j_);return n.type===1?n.value:Re(27,n.value,_,_,_,_,_,_,ur(e,Jn),_,_,_)}function X_(e){let n=Wl(e,q_);return n.type===1?n.value:Re(29,n.value,_,_,_,_,_,[eu(e,1),ur(e,Fn)],_,_,_,_)}function K_(e,n,r,o){return Re(r?11:10,e,_,_,_,o,_,_,_,_,lv(n),_)}function F_(e,n,r,o){return Re(8,n,_,_,_,_,{k:r,v:o},_,eu(e,0),_,_,_)}function J_(e,n,r){let o=new Uint8Array(r),l="";for(let u=0,f=o.length;u<f;u++)l+=String.fromCharCode(o[u]);return Re(19,n,Da(btoa(l)),_,_,_,_,_,eu(e,5),_,_,_)}function W_(e,n){return{base:Q_(e,n),child:void 0}}var e3=class{constructor(e,n){this._p=e,this.depth=n}parse(e){return ot(this._p,this.depth,e)}};async function t3(e,n,r){let o=[];for(let l=0,u=r.length;l<u;l++)l in r?o[l]=await ot(e,n,r[l]):o[l]=0;return o}async function n3(e,n,r,o){return r_(r,o,await t3(e,n,o))}async function _d(e,n,r){let o=Object.entries(r),l=[],u=[];for(let f=0,h=o.length;f<h;f++)l.push(Da(o[f][0])),u.push(await ot(e,n,o[f][1]));return Jn in r&&(l.push(ur(e.base,Jn)),u.push(d_(Y_(e.base),await ot(e,n,D_(r))))),Fn in r&&(l.push(ur(e.base,Fn)),u.push(h_(X_(e.base),await ot(e,n,$_(r))))),yi in r&&(l.push(ur(e.base,yi)),u.push(uv(r[yi]))),gi in r&&(l.push(ur(e.base,gi)),u.push(r[gi]?av:rv)),{k:l,v:u}}async function Nf(e,n,r,o,l){return K_(r,o,l,await _d(e,n,o))}async function a3(e,n,r,o){return i_(r,await ot(e,n,o.valueOf()))}async function r3(e,n,r,o){return o_(r,o,await ot(e,n,o.buffer))}async function i3(e,n,r,o){return s_(r,o,await ot(e,n,o.buffer))}async function o3(e,n,r,o){return l_(r,o,await ot(e,n,o.buffer))}async function yy(e,n,r,o){let l=sv(o,e.base.features);return u_(r,o,l?await _d(e,n,l):_)}async function s3(e,n,r,o){let l=sv(o,e.base.features);return c_(r,o,l?await _d(e,n,l):_)}async function l3(e,n,r,o){let l=[],u=[];for(let[f,h]of o.entries())l.push(await ot(e,n,f)),u.push(await ot(e,n,h));return F_(e.base,r,l,u)}async function u3(e,n,r,o){let l=[];for(let u of o.keys())l.push(await ot(e,n,u));return f_(r,l)}async function pv(e,n,r,o){let l=e.base.plugins;if(l)for(let u=0,f=l.length;u<f;u++){let h=l[u];if(h.parse.async&&h.test(o))return a_(r,h.tag,await h.parse.async(o,new e3(e,n),{id:r}))}return _}async function c3(e,n,r,o){let[l,u]=await I_(o);return Re(12,r,l,_,_,_,_,_,await ot(e,n,u),_,_,_)}function f3(e,n,r,o,l){let u=[],f=r.on({next:h=>{Nl(this.base,n),ot(this,e,h).then(p=>{u.push(m_(n,p))},p=>{l(p),f()})},throw:h=>{Nl(this.base,n),ot(this,e,h).then(p=>{u.push(g_(n,p)),o(u),f()},p=>{l(p),f()})},return:h=>{Nl(this.base,n),ot(this,e,h).then(p=>{u.push(y_(n,p)),o(u),f()},p=>{l(p),f()})}})}async function d3(e,n,r,o){return p_(r,eu(e.base,4),await new Promise(f3.bind(e,n,r,o)))}async function h3(e,n,r,o){let l=[];for(let u=0,f=o.v.length;u<f;u++)l[u]=await ot(e,n,o.v[u]);return v_(r,l,o.t,o.d)}async function p3(e,n,r,o){if(Array.isArray(o))return n3(e,n,r,o);if(P_(o))return d3(e,n,r,o);if(N_(o))return h3(e,n,r,o);let l=o.constructor;if(l===x_)return ot(e,n,o.replacement);let u=await pv(e,n,r,o);if(u)return u;switch(l){case Object:return Nf(e,n,r,o,!1);case _:return Nf(e,n,r,o,!0);case Date:return Ww(r,o);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return yy(e,n,r,o);case Number:case Boolean:case String:case BigInt:return a3(e,n,r,o);case ArrayBuffer:return J_(e.base,r,o);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return r3(e,n,r,o);case DataView:return o3(e,n,r,o);case Map:return l3(e,n,r,o);case Set:return u3(e,n,r,o)}
12if(l===Promise||o instanceof Promise)return c3(e,n,r,o);let f=e.base.features;if(f&32&&l===RegExp)return e_(r,o);if(f&16)switch(l){case BigInt64Array:case BigUint64Array:return i3(e,n,r,o)}if(f&1&&typeof AggregateError<"u"&&(l===AggregateError||o instanceof AggregateError))return s3(e,n,r,o);if(o instanceof Error)return yy(e,n,r,o);if(Jn in o||Fn in o)return Nf(e,n,r,o,!!l);throw new Fl(o)}async function m3(e,n,r){let o=wd(e.base,r);if(o.type!==0)return o.value;let l=await pv(e,n,o.value,r);if(l)return l;throw new Fl(r)}async function ot(e,n,r){switch(typeof r){case"boolean":return r?av:rv;case"undefined":return jw;case"string":return uv(r);case"number":return Kw(r);case"bigint":return Fw(r);case"object":{if(r){let o=wd(e.base,r);return o.type===0?await p3(e,n+1,o.value,r):o.value}return qw}case"symbol":return ur(e.base,r);case"function":return m3(e,n,r);default:throw new Fl(r)}}async function g3(e,n){try{return await ot(e,0,n)}catch(r){throw r instanceof gy?r:new gy(r)}}var y3=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(y3||{});function mv(e,n){for(let r=0,o=n.length;r<o;r++){let l=n[r];e.has(l)||(e.add(l),l.extends&&mv(e,l.extends))}}function gv(e){if(e){let n=new Set;return mv(n,e),[...n]}}function v3(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new R_(e)}}var b3=1e6,S3=1e4,w3=2e4;function yv(e,n){switch(n){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var _3=1e3;function E3(e,n){var r;let o=n.refs||new Map;return"types"in o||Object.assign(o,{types:new Map}),{mode:e,plugins:n.plugins,refs:o,features:(r=n.features)!=null?r:63^(n.disabledFeatures||0),depthLimit:n.depthLimit||_3}}function C3(e){return{mode:2,base:E3(2,e),child:_}}var T3=class{constructor(e,n){this._p=e,this.depth=n}deserialize(e){return Be(this._p,this.depth,e)}};function vv(e,n){if(n<0||!Number.isFinite(n)||!Number.isInteger(n))throw new ea({t:4,i:n});if(e.refs.has(n))throw new Error("Conflicted ref id: "+n)}function R3(e,n,r){return vv(e.base,n),e.state.marked.has(n)&&e.base.refs.set(n,r),r}function A3(e,n,r){return vv(e.base,n),e.base.refs.set(n,r),r}function st(e,n,r){return e.mode===1?R3(e,n,r):A3(e,n,r)}function nd(e,n,r){if(Object.hasOwn(n,r))return n[r];throw new ea(e)}function x3(e,n){return st(e,n.i,Yw(Ua(n.s)))}function O3(e,n,r){let o=r.a,l=o.length,u=st(e,r.i,new Array(l));for(let f=0,h;f<l;f++)h=o[f],h&&(u[f]=Be(e,n,h));return yv(u,r.o),u}function M3(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function z3(e){switch(e){case Fn:case gi:case yi:case Jn:return!0;default:return!1}}function vy(e,n,r){M3(n)?e[n]=r:Object.defineProperty(e,n,{value:r,configurable:!0,enumerable:!0,writable:!0})}function k3(e,n,r,o,l){if(typeof o=="string")vy(r,Ua(o),Be(e,n,l));else{let u=Be(e,n,o);switch(typeof u){case"string":vy(r,u,Be(e,n,l));break;case"symbol":z3(u)&&(r[u]=Be(e,n,l));break;default:throw new ea(o)}}}function bv(e,n,r){e.base.refs.types.set(n,r)}function Xo(e,n,r,o){if(e.base.refs.types.get(r)!==o)throw new ea(n)}function Sv(e,n,r,o){let l=r.k;if(l.length>0)for(let u=0,f=r.v,h=l.length;u<h;u++)k3(e,n,o,l[u],f[u]);return o}function L3(e,n,r){let o=st(e,r.i,r.t===10?{}:Object.create(null));return Sv(e,n,r.p,o),yv(o,r.o),o}function N3(e,n){return st(e,n.i,new Date(n.s))}function D3(e,n){if(e.base.features&32){let r=Ua(n.c);if(r.length>w3)throw new ea(n);return st(e,n.i,new RegExp(r,n.m))}throw new fv(n)}function U3(e,n,r){let o=st(e,r.i,new Set);for(let l=0,u=r.a,f=u.length;l<f;l++)o.add(Be(e,n,u[l]));return o}function B3(e,n,r){let o=st(e,r.i,new Map);for(let l=0,u=r.e.k,f=r.e.v,h=u.length;l<h;l++)o.set(Be(e,n,u[l]),Be(e,n,f[l]));return o}function j3(e,n){if(n.s.length>b3)throw new ea(n);return st(e,n.i,dv(Ua(n.s)))}function q3(e,n,r){var o;let l=v3(r.c),u=Be(e,n,r.f),f=(o=r.b)!=null?o:0;if(f<0||f>u.byteLength)throw new ea(r);return st(e,r.i,new l(u,f,r.l))}function H3(e,n,r){var o;let l=Be(e,n,r.f),u=(o=r.b)!=null?o:0;if(u<0||u>l.byteLength)throw new ea(r);return st(e,r.i,new DataView(l,u,r.l))}function wv(e,n,r,o){if(r.p){let l=Sv(e,n,r.p,{});
12Object.defineProperties(o,Object.getOwnPropertyDescriptors(l))}return o}function P3(e,n,r){let o=st(e,r.i,new AggregateError([],Ua(r.m)));return wv(e,n,r,o)}function $3(e,n,r){let o=nd(r,Bw,r.s),l=st(e,r.i,new o(Ua(r.m)));return wv(e,n,r,l)}function V3(e,n,r){let o=Jl(),l=st(e,r.i,o.p),u=Be(e,n,r.f);return r.s?o.s(u):o.f(u),l}function Z3(e,n,r){return st(e,r.i,Object(Be(e,n,r.f)))}function I3(e,n,r){let o=e.base.plugins;if(o){let l=Ua(r.c);for(let u=0,f=o.length;u<f;u++){let h=o[u];if(h.tag===l)return st(e,r.i,h.deserialize(r.s,new T3(e,n),{id:r.i}))}}throw new E_(r.c)}function Q3(e,n){let r=st(e,n.i,st(e,n.s,Jl()).p);return bv(e,n.s,22),r}function G3(e,n,r){let o=e.base.refs.get(r.i);if(o)return Xo(e,r,r.i,22),o.s(Be(e,n,r.a[1])),_;throw new Yo("Promise")}function Y3(e,n,r){let o=e.base.refs.get(r.i);if(o)return Xo(e,r,r.i,22),o.f(Be(e,n,r.a[1])),_;throw new Yo("Promise")}function X3(e,n,r){Be(e,n,r.a[0]);let o=Be(e,n,r.a[1]);return B_(o)}function K3(e,n,r){Be(e,n,r.a[0]);let o=Be(e,n,r.a[1]);return Z_(o)}function F3(e,n,r){let o=st(e,r.i,vr());bv(e,r.i,31);let l=r.a,u=l.length;if(u)for(let f=0;f<u;f++)Be(e,n,l[f]);return o}function J3(e,n,r){let o=e.base.refs.get(r.i);if(o)return Xo(e,r,r.i,31),o.next(Be(e,n,r.f)),_;throw new Yo("Stream")}function W3(e,n,r){let o=e.base.refs.get(r.i);if(o)return Xo(e,r,r.i,31),o.throw(Be(e,n,r.f)),_;throw new Yo("Stream")}function e4(e,n,r){let o=e.base.refs.get(r.i);if(o)return Xo(e,r,r.i,31),o.return(Be(e,n,r.f)),_;throw new Yo("Stream")}function t4(e,n,r){return Be(e,n,r.f),_}function n4(e,n,r){return Be(e,n,r.a[1]),_}function a4(e,n,r){let o=st(e,r.i,hv([],r.s,r.l));for(let l=0,u=r.a.length;l<u;l++)o.v[l]=Be(e,n,r.a[l]);return o}function Be(e,n,r){if(n>e.base.depthLimit)throw new A_(e.base.depthLimit);switch(n+=1,r.t){case 2:return nd(r,Dw,r.s);case 0:return Number(r.s);case 1:return Ua(String(r.s));case 3:if(String(r.s).length>S3)throw new ea(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return x3(e,r);case 9:return O3(e,n,r);case 10:case 11:return L3(e,n,r);case 5:return N3(e,r);case 6:return D3(e,r);case 7:return U3(e,n,r);case 8:return B3(e,n,r);case 19:return j3(e,r);case 16:case 15:return q3(e,n,r);case 20:return H3(e,n,r);case 14:return P3(e,n,r);case 13:return $3(e,n,r);case 12:return V3(e,n,r);case 17:return nd(r,Nw,r.s);case 21:return Z3(e,n,r);case 25:return I3(e,n,r);case 22:return Q3(e,r);case 23:return G3(e,n,r);case 24:return Y3(e,n,r);case 28:return X3(e,n,r);case 30:return K3(e,n,r);case 31:return F3(e,n,r);case 32:return J3(e,n,r);case 33:return W3(e,n,r);case 34:return e4(e,n,r);case 27:return t4(e,n,r);case 29:return n4(e,n,r);case 35:return a4(e,n,r);default:throw new fv(r)}}function r4(e,n){try{return Be(e,0,n)}catch(r){throw new __(r)}}var i4=()=>T;i4.toString();function by(e,n){let r=gv(n.plugins),o=C3({plugins:r,refs:n.refs,features:n.features,disabledFeatures:n.disabledFeatures,depthLimit:n.depthLimit});return r4(o,e)}async function o4(e,n={}){let r=gv(n.plugins),o=W_(1,{plugins:r,disabledFeatures:n.disabledFeatures});return{t:await g3(o,e),f:o.base.features,m:Array.from(o.base.marked)}}function s4(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(n,r,o){return{v:r.parse(e.toSerializable(n))}},async async(n,r,o){return{v:await r.parse(e.toSerializable(n))}},stream(n,r,o){return{v:r.parse(e.toSerializable(n))}}},serialize:void 0,deserialize(n,r,o){return e.fromSerializable(r.deserialize(n.v))}}}var l4=class{constructor(e,n){this.stream=e,this.hint=n?.hint??"binary"}};const Pl=globalThis.Buffer,_v=!!Pl&&typeof Pl.from=="function";function Ev(e){if(e.length===0)return"";if(_v)return Pl.from(e).toString("base64");const n=32768,r=[];for(let o=0;o<e.length;o+=n){const l=e.subarray(o,o+n);r.push(String.fromCharCode.apply(null,l))}return btoa(r.join(""))}function Cv(e){if(e.length===0)return new Uint8Array(0);if(_v){const o=Pl.from(e,"base64");return new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}const n=atob(e),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}const Eo=Object.create(null),Co=Object.create(null),u4=e=>new ReadableStream({start(n){e.on({next(r){try{n.enqueue(Cv(r))}catch{}},throw(r){n.error(r)},return(){try{n.close()}catch{}}})}}),c4=new TextEncoder,f4=e=>new ReadableStream({start(n){e.on({next(r){try{typeof r=="string"?n.enqueue(c4.encode(r)):n.enqueue(Cv(r.$b64))}catch{}},throw(r){n.error(r)},return(){try{n.close()}catch{}}})}}),d4="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",h4="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function Sy(e){const n=vr(),r=e.getReader();return(async()=>{try{for(;;){const{done:o,value:l}=await r.read();if(o){n.return(void 0);break}n.next(Ev(l))}}catch(o){n.throw(o)}finally{r.releaseLock()}})(),n}function wy(e){const n=vr(),r=e.getReader(),o=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await r.read();if(l){try{const f=o.decode();f.length>0&&n.next(f)}catch{}n.return(void 0);break}try{const f=o.decode(u,{stream:!0});f.length>0&&n.next(f)}catch{n.next({$b64:Ev(u)})}}}catch(l){n.throw(l)}finally{r.releaseLock()}})(),n}const p4={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===Eo},parse:{sync(e,n,r){return{}},async async(e,n,r){return{}},stream(e,n,r){return{}}},serialize(e,n,r){return d4},deserialize(e,n,r){return Eo}},{tag:"tss/RawStreamFactoryText",test(e){return e===Co},parse:{sync(e,n,r){return{}},async async(e,n,r){return{}},stream(e,n,r){return{}}},serialize(e,n,r){return h4},deserialize(e,n,r){return Co}}],test(e){return e instanceof l4},parse:{sync(e,n,r){const o=e.hint==="text"?Co:Eo;return{hint:n.parse(e.hint),factory:n.parse(o),stream:n.parse(vr())}},async async(e,n,r){const o=e.hint==="text"?Co:Eo,l=e.hint==="text"?wy(e.stream):Sy(e.stream);return{hint:await n.parse(e.hint),factory:await n.parse(o),stream:await n.parse(l)}},stream(e,n,r){const o=e.hint==="text"?Co:Eo,l=e.hint==="text"?wy(e.stream):Sy(e.stream);return{hint:n.parse(e.hint),factory:n.parse(o),stream:n.parse(l)}}},serialize(e,n,r){return"("+n.serialize(e.factory)+")("+n.serialize(e.stream)+")"},deserialize(e,n,r){const o=n.deserialize(e.stream);return n.deserialize(e.hint)==="text"?f4(o):u4(o)}};function m4(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(n,r,o){return e(typeof r?.deserialize=="function"?r.deserialize(n.streamId):n.streamId)}}}const g4={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,n){return{message:n.parse(e.message)}},async async(e,n){return{message:await n.parse(e.message)}},stream(e,n){return{message:n.parse(e.message)}}},serialize(e,n){return"new Error("+n.serialize(e.message)+")"},deserialize(e,n){return new Error(n.deserialize(e.message))}};var xa={},Tv=e=>new ReadableStream({start:n=>{e.on({next:r=>{try{n.enqueue(r)}catch{}},throw:r=>{n.error(r)},return:()=>{try{n.close()}catch{}}})}}),y4={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===xa},parse:{sync(){return xa},async async(){return await Promise.resolve(xa)},stream(){return xa}},serialize(){return Tv.toString()},deserialize(){return xa}};function _y(e){let n=vr(),r=e.getReader();async function o(){try{let l=await r.read();l.done?n.return(l.value):(n.next(l.value),await o())}catch(l){n.throw(l)}}return o().catch(()=>{}),n}var v4={tag:"seroval/plugins/web/ReadableStream",extends:[y4],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,n){return{factory:n.parse(xa),stream:n.parse(vr())}},async async(e,n){return{factory:await n.parse(xa),stream:await n.parse(_y(e))}},stream(e,n){return{factory:n.parse(xa),stream:n.parse(_y(e))}}},serialize(e,n){return"("+n.serialize(e.factory)+")("+n.serialize(e.stream)+")"},deserialize(e,n){let r=n.deserialize(e.stream);return Tv(r)}},b4=v4;const S4=[g4,p4,b4];function w4(){return[...O1()?.serializationAdapters?.map(s4)??[],...S4]}var Ey=new TextDecoder,_4=new Uint8Array(0),Cy=16*1024*1024,Ty=32*1024*1024,Ry=1024,Ay=1e5;function E4(e){const n=new Map,r=new Map,o=new Set;let l=!1,u=null,f=0,h;const p=new ReadableStream({start(y){h=y},cancel(){l=!0;try{u?.cancel()}catch{}n.forEach(y=>{try{y.error(new Error("Framed response cancelled"))}catch{}}),n.clear(),r.clear(),o.clear()}});function m(y){const w=r.get(y);if(w)return w;if(o.has(y))return new ReadableStream({start(C){C.close()}});if(r.size>
12=Ry)throw new Error(`Too many raw streams in framed response (max ${Ry})`);const b=new ReadableStream({start(C){n.set(y,C)},cancel(){o.add(y),n.delete(y),r.delete(y)}});return r.set(y,b),b}function v(y){return m(y),n.get(y)}return(async()=>{const y=e.getReader();u=y;const w=[];let b=0;function C(){if(b<9)return null;const R=w[0];if(R.length>=9)return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0};const z=new Uint8Array(9);let H=0,$=9;for(let B=0;B<w.length&&$>0;B++){const W=w[B],te=Math.min(W.length,$);z.set(W.subarray(0,te),H),H+=te,$-=te}return{type:z[0],streamId:(z[1]<<24|z[2]<<16|z[3]<<8|z[4])>>>0,length:(z[5]<<24|z[6]<<16|z[7]<<8|z[8])>>>0}}function O(R){if(R===0)return _4;const z=new Uint8Array(R);let H=0,$=R;for(;$>0&&w.length>0;){const B=w[0];if(!B)break;const W=Math.min(B.length,$);z.set(B.subarray(0,W),H),H+=W,$-=W,W===B.length?w.shift():w[0]=B.subarray(W)}return b-=R,z}try{for(;;){const{done:R,value:z}=await y.read();if(l||R)break;if(z){if(b+z.length>Ty)throw new Error(`Framed response buffer exceeded ${Ty} bytes`);for(w.push(z),b+=z.length;;){const H=C();if(!H)break;const{type:$,streamId:B,length:W}=H;if($!==Yn.JSON&&$!==Yn.CHUNK&&$!==Yn.END&&$!==Yn.ERROR)throw new Error(`Unknown frame type: ${$}`);if($===Yn.JSON){if(B!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(B===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(W>Cy)throw new Error(`Frame payload too large: ${W} bytes (max ${Cy})`);const te=9+W;if(b<te)break;if(++f>Ay)throw new Error(`Too many frames in framed response (max ${Ay})`);O(9);const V=O(W);switch($){case Yn.JSON:try{h.enqueue(Ey.decode(V))}catch{}break;case Yn.CHUNK:{const F=v(B);F&&F.enqueue(V);break}case Yn.END:{const F=v(B);if(o.add(B),F){try{F.close()}catch{}n.delete(B)}break}case Yn.ERROR:{const F=v(B);if(o.add(B),F){const ne=Ey.decode(V);F.error(new Error(ne)),n.delete(B)}break}}}}}if(b!==0)throw new Error("Incomplete frame at end of framed response");try{h.close()}catch{}n.forEach(R=>{try{R.close()}catch{}}),n.clear()}catch(R){try{h.error(R)}catch{}n.forEach(z=>{try{z.error(R)}catch{}}),n.clear()}finally{try{y.releaseLock()}catch{}u=null}})(),{getOrCreateStream:m,jsonChunks:p}}var Ho=null;async function ad(e){e.length>0&&await Promise.allSettled(e)}var C4=Object.prototype.hasOwnProperty;function Rv(e){for(const n in e)if(C4.call(e,n))return!0;return!1}async function T4(e,n,r){Ho||(Ho=w4());const o=n[0],l=o.fetch??r,u=o.data instanceof FormData?"formData":"payload",f=o.headers?new Headers(o.headers):new Headers;if(f.set("x-tsr-serverFn","true"),u==="payload"&&f.set("accept",`${w2}, application/x-ndjson, application/json`),o.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await Av(o);if(p!==void 0){const m=q1({payload:p});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let h;if(o.method==="POST"){const p=await R4(o);p?.contentType&&f.set("content-type",p.contentType),h=p?.body}return await A4(async()=>l(e,{method:o.method,headers:f,signal:o.signal,body:h}))}async function Av(e){let n=!1;const r={};if(e.data!==void 0&&(n=!0,r.data=e.data),e.context&&Rv(e.context)&&(n=!0,r.context=e.context),n)return xv(r)}async function xv(e){return JSON.stringify(await Promise.resolve(o4(e,{plugins:Ho})))}async function R4(e){if(e.data instanceof FormData){let r;return e.context&&Rv(e.context)&&(r=await xv(e.context)),r!==void 0&&e.data.set(S2,r),{body:e.data}}const n=await Av(e);if(n)return{body:n,contentType:"application/json"}}async function A4(e){let n;try{n=await e()}catch(o){if(o instanceof Response)n=o;else throw console.log(o),o}if(n.headers.get("x-tss-raw")==="true")return n;const r=n.headers.get("content-type");if(r||jt(),n.headers.get("x-tss-serialized")){let o;if(r.includes("application/x-tss-framed")){if(C2(r),!n.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=E4(n.body),f=[m4(l),...Ho||[]],h=new Map;o=await x4({jsonStream:u,onMessage:p=>by(p,{refs:h,plugins:f}),onError(p,m){console.error(p,m)}})}else if(r.includes("application/json")){const l=await n.json(),u=[];try{o=by(l,{plugins:Ho})}finally{}await ad(u)}if(o||jt(),o instanceof Error)throw o;return o}if(r.includes("application/json")){const o=await n.json(),l=iw(o);if(l)throw l;if(dt(o))throw o;return o}if(!n.ok)throw new Error(await n.text());return n}async function x4({jsonStream:e,onMessage:n,onError:r}){const o=e.getReader(),{value:l,done:u}=await o.read();if(u||!l)throw new Error("Stream ended before first object");const f=JSON.parse(l);let h=!1;const p=(async()=>{try{for(;;){const{value:y,done:w}=await o.read();if(w)break;if(y)try{const b=[];try{n(JSON.parse(y))}finally{}await ad(b)}catch(b){r?.(`Invalid JSON: ${y}`,b)}}}catch(y){h||r?.("Stream processing error:",y)}})();let m;const v=[];try{m=n(f)}catch(y){throw h=!0,o.cancel().catch(()=>{}),y}
12return await ad(v),Promise.resolve(m).catch(()=>{h=!0,o.cancel().catch(()=>{})}),p.finally(()=>{try{o.releaseLock()}catch{}}),m}function O4(e){const n="/_serverFn/"+e;return Object.assign((...l)=>{const u=O1()?.serverFns?.fetch;return T4(n,l,u??fetch)},{url:n,serverFnMeta:{id:e},[Wf]:!0})}var M4={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Wf in e)?!1:!!e[Wf],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>O4(e)};function xy(e){return e.replaceAll("\0","/").replaceAll("�","/")}function z4(e,n){e.id=n.i,e.__beforeLoadContext=n.b,e.loaderData=n.l,e.status=n.s,e.ssr=n.ssr,e.updatedAt=n.u,e.error=n.e,n.g!==void 0&&(e.globalNotFound=n.g)}async function k4(e){window.$_TSR||jt();const n=e.options.serializationAdapters;if(n?.length){const R=new Map;n.forEach(z=>{R.set(z.key,z.fromSerializable)}),window.$_TSR.t=R,window.$_TSR.buffer.forEach(z=>z())}window.$_TSR.initialized=!0,window.$_TSR.router||jt();const r=window.$_TSR.router;r.matches.forEach(R=>{R.i=xy(R.i)}),r.lastMatchId&&(r.lastMatchId=xy(r.lastMatchId));const{manifest:o,dehydratedData:l,lastMatchId:u}=r;e.ssr={manifest:o};const f=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:f};const h=e.matchRoutes(e.stores.location.get()),p=Promise.all(h.map(R=>e.loadRouteChunk(e.looseRoutesById[R.routeId])));function m(R){const z=e.looseRoutesById[R.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(z){const H=pr();R._nonReactive.minPendingPromise=H,R._forcePending=!0,setTimeout(()=>{H.resolve(),e.updateMatch(R.id,$=>($._nonReactive.minPendingPromise=void 0,{...$,_forcePending:void 0}))},z)}}function v(R){const z=e.looseRoutesById[R.routeId];z&&(z.options.ssr=R.ssr)}let y;h.forEach(R=>{const z=r.matches.find(H=>H.i===R.id);if(!z){R._nonReactive.dehydrated=!1,R.ssr=!1,v(R);return}z4(R,z),v(R),R._nonReactive.dehydrated=R.ssr!==!1,(R.ssr==="data-only"||R.ssr===!1)&&y===void 0&&(y=R.index,m(R))}),e.stores.setMatches(h),await e.options.hydrate?.(l);const w=e.stores.matches.get(),b=e.stores.location.get();await Promise.all(w.map(async R=>{try{const z=e.looseRoutesById[R.routeId],H=w[R.index-1]?.context??e.options.context;if(z.options.context){const te={deps:R.loaderDeps,params:R.params,context:H??{},location:b,navigate:V=>e.navigate({...V,_fromLocation:b}),buildLocation:e.buildLocation,cause:R.cause,abortController:R.abortController,preload:!1,matches:h,routeId:z.id};R.__routeContext=z.options.context(te)??void 0}R.context={...H,...R.__routeContext,...R.__beforeLoadContext};const $={ssr:e.options.ssr,matches:w,match:R,params:R.params,loaderData:R.loaderData},B=await z.options.head?.($),W=await z.options.scripts?.($);R.meta=B?.meta,R.links=B?.links,R.headScripts=B?.scripts,R.styles=B?.styles,R.scripts=W}catch(z){if(dt(z))R.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${R.routeId}`,z);else throw R.error=z,console.error(`Error during hydration for route ${R.routeId}:`,z),z}}));const C=h[h.length-1].id!==u;if(!h.some(R=>R.ssr===!1)&&!C)return h.forEach(R=>{R._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const O=Promise.resolve().then(()=>e.load()).catch(R=>{console.error("Error during router hydration:",R)});if(C){const R=h[1];R||jt(),m(R),R._displayPending=!0,R._nonReactive.displayPendingPromise=O,O.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(R.id,z=>({...z,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var $l=P.use,Ao=typeof window<"u"?P.useLayoutEffect:P.useEffect;function Df(e){const n=P.useRef({value:e,prev:null}),r=n.current.value;return e!==r&&(n.current={value:e,prev:r}),n.current.prev}function L4(e,n,r={},o={}){P.useEffect(()=>{if(!e.current||o.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{n(u)},r);return l.observe(e.current),()=>{l.disconnect()}},[n,r,o.disabled,e])}function N4(e){const n=P.useRef(null);return P.useImperativeHandle(e,()=>n.current,[]),n}function D4({promise:e}
12){if($l)return $l(e);const n=Rw(e);if(n[Cn].status==="pending")throw n;if(n[Cn].status==="error")throw n[Cn].error;return n[Cn].data}function U4(e){const n=X.jsx(B4,{...e});return e.fallback?X.jsx(P.Suspense,{fallback:e.fallback,children:n}):n}function B4(e){const n=D4(e);return e.children(n)}function Ed(e){const n=e.errorComponent??Cd;return X.jsx(j4,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:o})=>r?P.createElement(n,{error:r,reset:o}):e.children})}var j4=class extends P.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,n){const r=e.getResetKey();return n.error&&n.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,n){this.props.onCatch&&this.props.onCatch(e,n)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Cd({error:e}){const[n,r]=P.useState(!1);return X.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[X.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),X.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(o=>!o),children:n?"Hide Error":"Show Error"})]}),X.jsx("div",{style:{height:".25rem"}}),n?X.jsx("div",{children:X.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?X.jsx("code",{children:e.message}):null})}):null]})}function q4({children:e,fallback:n=null}){return Td()?X.jsx(Xt.Fragment,{children:e}):X.jsx(Xt.Fragment,{children:n})}function Td(){return Xt.useSyncExternalStore(H4,()=>!0,()=>!1)}function H4(){return()=>{}}var Ov=P.createContext(null);function St(e){return P.useContext(Ov)}var tu=P.createContext(void 0),P4=P.createContext(void 0),Ze=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ze||{});function $4({update:e,notify:n,unwatched:r}){return{link:o,unlink:l,propagate:u,checkDirty:f,shallowPropagate:h};function o(m,v,y){const w=v.depsTail;if(w!==void 0&&w.dep===m)return;const b=w!==void 0?w.nextDep:v.deps;if(b!==void 0&&b.dep===m){b.version=y,v.depsTail=b;return}const C=m.subsTail;if(C!==void 0&&C.version===y&&C.sub===v)return;const O=v.depsTail=m.subsTail={version:y,dep:m,sub:v,prevDep:w,nextDep:b,prevSub:C,nextSub:void 0};b!==void 0&&(b.prevDep=O),w!==void 0?w.nextDep=O:v.deps=O,C!==void 0?C.nextSub=O:m.subs=O}function l(m,v=m.sub){const y=m.dep,w=m.prevDep,b=m.nextDep,C=m.nextSub,O=m.prevSub;return b!==void 0?b.prevDep=w:v.depsTail=w,w!==void 0?w.nextDep=b:v.deps=b,C!==void 0?C.prevSub=O:y.subsTail=O,O!==void 0?O.nextSub=C:(y.subs=C)===void 0&&r(y),b}function u(m){let v=m.nextSub,y;e:do{const w=m.sub;let b=w.flags;if(b&60?b&12?b&4?!(b&48)&&p(m,w)?(w.flags=b|40,b&=1):b=0:w.flags=b&-9|32:b=0:w.flags=b|32,b&2&&n(w),b&1){const C=w.subs;if(C!==void 0){const O=(m=C).nextSub;O!==void 0&&(y={value:v,prev:y},v=O);continue}}if((m=v)!==void 0){v=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){v=m.nextSub;continue e}break}while(!0)}function f(m,v){let y,w=0,b=!1;e:do{const C=m.dep,O=C.flags;if(v.flags&16)b=!0;else if((O&17)===17){if(e(C)){const R=C.subs;R.nextSub!==void 0&&h(R),b=!0}}else if((O&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=C.deps,v=C,++w;continue}if(!b){const R=m.nextDep;if(R!==void 0){m=R;continue}}for(;w--;){const R=v.subs,z=R.nextSub!==void 0;if(z?(m=y.value,y=y.prev):m=R,b){if(e(v)){z&&h(R),v=m.sub;continue}b=!1}else v.flags&=-33;v=m.sub;const H=m.nextDep;if(H!==void 0){m=H;continue e}}return b}while(!0)}function h(m){do{const v=m.sub,y=v.flags;(y&48)===32&&(v.flags=y|16,(y&6)===2&&n(v))}while((m=m.nextSub)!==void 0)}function p(m,v){let y=v.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function V4(e,n,r){const o=typeof e=="object",l=o?e:void 0;return{next:(o?e.next:e)?.bind(l),error:(o?e.error:n)?.bind(l),complete:(o?e.complete:r)?.b
12ind(l)}}const rd=[];let Dl=0;const{link:Oy,unlink:Z4,propagate:I4,checkDirty:Mv,shallowPropagate:My}=$4({update(e){return e._update()},notify(e){rd[id++]=e,e.flags&=~Ze.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ze.Mutable|Ze.Dirty,Vl(e))}});let vl=0,id=0,En,od=0;function zv(e){try{++od,e()}finally{--od||kv()}}function Vl(e){const n=e.depsTail;let r=n!==void 0?n.nextDep:e.deps;for(;r!==void 0;)r=Z4(r,e)}function kv(){if(!(od>0)){for(;vl<id;){const e=rd[vl];rd[vl++]=void 0,e.notify()}vl=0,id=0}}function zy(e,n){const r=typeof e=="function",o=e,l={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Ze.None:Ze.Mutable,get(){return En!==void 0&&Oy(l,En,Dl),l._snapshot},subscribe(u){const f=V4(u),h={current:!1},p=Q4(()=>{l.get(),h.current?f.next?.(l._snapshot):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const f=En,h=n?.compare??Object.is;if(r)En=l,++Dl,l.depsTail=void 0;else if(u===void 0)return!1;r&&(l.flags=Ze.Mutable|Ze.RecursedCheck);try{const p=l._snapshot,m=typeof u=="function"?u(p):u===void 0&&r?o(p):u;return p===void 0||!h(p,m)?(l._snapshot=m,!0):!1}finally{En=f,r&&(l.flags&=~Ze.RecursedCheck),Vl(l)}}};return r?(l.flags=Ze.Mutable|Ze.Dirty,l.get=function(){const u=l.flags;if(u&Ze.Dirty||u&Ze.Pending&&Mv(l.deps,l)){if(l._update()){const f=l.subs;f!==void 0&&My(f)}}else u&Ze.Pending&&(l.flags=u&~Ze.Pending);return En!==void 0&&Oy(l,En,Dl),l._snapshot}):l.set=function(u){if(l._update(u)){const f=l.subs;f!==void 0&&(I4(f),My(f),kv())}},l}function Q4(e){const n=()=>{const o=En;En=r,++Dl,r.depsTail=void 0,r.flags=Ze.Watching|Ze.RecursedCheck;try{return e()}finally{En=o,r.flags&=~Ze.RecursedCheck,Vl(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ze.Watching|Ze.RecursedCheck,notify(){const o=this.flags;o&Ze.Dirty||o&Ze.Pending&&Mv(this.deps,this)?n():this.flags=Ze.Watching},stop(){this.flags=Ze.None,this.depsTail=void 0,Vl(this)}};return n(),r}var Uf={exports:{}},Bf={},jf={exports:{}},qf={};var ky;function G4(){if(ky)return qf;ky=1;var e=Go();function n(y,w){return y===w&&(y!==0||1/y===1/w)||y!==y&&w!==w}var r=typeof Object.is=="function"?Object.is:n,o=e.useState,l=e.useEffect,u=e.useLayoutEffect,f=e.useDebugValue;function h(y,w){var b=w(),C=o({inst:{value:b,getSnapshot:w}}),O=C[0].inst,R=C[1];return u(function(){O.value=b,O.getSnapshot=w,p(O)&&R({inst:O})},[y,b,w]),l(function(){return p(O)&&R({inst:O}),y(function(){p(O)&&R({inst:O})})},[y]),f(b),b}function p(y){var w=y.getSnapshot;y=y.value;try{var b=w();return!r(y,b)}catch{return!0}}function m(y,w){return w()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return qf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,qf}var Ly;function Y4(){return Ly||(Ly=1,jf.exports=G4()),jf.exports}var Ny;function X4(){if(Ny)return Bf;Ny=1;var e=Go(),n=Y4();function r(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var o=typeof Object.is=="function"?Object.is:r,l=n.useSyncExternalStore,u=e.useRef,f=e.useEffect,h=e.useMemo,p=e.useDebugValue;return Bf.useSyncExternalStoreWithSelector=function(m,v,y,w,b){var C=u(null);if(C.current===null){var O={hasValue:!1,value:null};C.current=O}else O=C.current;C=h(function(){function z(te){if(!H){if(H=!0,$=te,te=w(te),b!==void 0&&O.hasValue){var V=O.value;if(b(V,te))return B=V}return B=te}if(V=B,o($,te))return V;var F=w(te);return b!==void 0&&b(V,F)?($=te,V):($=te,B=F)}var H=!1,$,B,W=y===void 0?null:y;return[function(){return z(v())},W===null?void 0:function(){return z(W())}]},[v,y,w,b]);var R=l(m,C[0],C[1]);return f(function(){O.hasValue=!0,O.value=R},[R]),p(R),R},Bf}var Dy;function K4(){return Dy||(Dy=1,Uf.exports=X4()),Uf.exports}var F4=K4();function J4(e,n){return e===n}function at(e,n,r=J4){const o=P.useCallback(f=>{if(!e)return()=>{};const{unsubscribe:h}=e.subscribe(f);return h},[e]),l=P.useCallback(()=>e?.get(),[e]);return F4.useSyncExternalStoreWithSelector(o,l,l,n,r)}var W4={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function br(e){const n=St(),r=P.useContext(e.from?P4:tu),o=e.from??r,l=o?e.from?n.stores.getRouteMatchStore(o):n.stores.matchStores.get(o):void 0,u=P.useRef(void 0);return at(l??W4,f=>{if((e.shouldThrow??!0)&&!f&&jt(),f===void 0)return;const h=e.select?e.select(f):f;if(e.structuralSharing??n.options.defaultStructuralSharing){const p=sr(u.current,h);return u.current=p,p}return h})}function Lv(e){return br({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function Nv(e){const{select:n,...r}=e;return br({...r,select:o=>n?n(o.loaderDeps):o.loaderDeps})}function Dv(e){return br({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const r=e.strict===!1?n.params:n._strictParams;return e.select?e.select(r):r}})}function Uv(e){return br({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Bv(e){const n=St();return P.useCallback(r=>n.navigate({...r,from:r.from??e?.from}),[e?.from,n])}function jv(e){return br({...e,select:n=>e.select?e.select(n.context):n.context})}var eE=x1();function tE(e,n){const r=St(),o=N4(n),{activeProps:l,inactiveProps:u,activeOptions:f,to:h,preload:p,preloadDelay:m,preloadIntentProximity:v,hashScrollIntoView:y,replace:w,startTransition:b,resetScroll:C,viewTransition:O,children:R,target:z,disabled:H,style:$,className:B,onClick:W,onBlur:te,onFocus:V,onMouseEnter:F,onMouseLeave:ne,onTouchStart:fe,ignoreBlocker:se,params:le,search:$e,hash:xe,state:ue,mask:U,reloadDocument:Z,unsafeRelative:re,from:he,_fromLocation:x,...E}=e,L=Td(),Q=P.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ee=at(r.stores.location,qe=>qe,(qe,ht)=>qe.href===ht.href),J=P.useMemo(()=>{const qe={_fromLocation:ee,...Q};return r.buildLocation(qe)},[r,ee,Q]),ae=J.maskedLocation?J.maskedLocation.publicHref:J.publicHref,ve=J.maskedLocation?J.maskedLocation.external:J.external,je=P.useMemo(()=>sE(ae,ve,r.history,H),[H,ve,ae,r.history]),De=P.useMemo(()=>
12{if(je?.external)return Bl(je.href,r.protocolAllowlist)?void 0:je.href;if(!lE(h)&&!(typeof h!="string"||h.indexOf(":")===-1))try{return new URL(h),Bl(h,r.protocolAllowlist)?void 0:h}catch{}},[h,je,r.protocolAllowlist]),An=P.useMemo(()=>{if(De)return!1;if(f?.exact){if(!I2(ee.pathname,J.pathname,r.basepath))return!1}else{const qe=jl(ee.pathname,r.basepath),ht=jl(J.pathname,r.basepath);if(!(qe.startsWith(ht)&&(qe.length===ht.length||qe[ht.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ut(ee.search,J.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?L&&ee.hash===J.hash:!0},[f?.exact,f?.explicitUndefined,f?.includeHash,f?.includeSearch,ee,De,L,J.hash,J.pathname,J.search,r.basepath]),xn=An?Oa(l,{})??nE:Hf,ta=An?Hf:Oa(u,{})??Hf,_i=[B,xn.className,ta.className].filter(Boolean).join(" "),mn=($||xn.style||ta.style)&&{...$,...xn.style,...ta.style},[Ei,wr]=P.useState(!1),Ko=P.useRef(!1),On=e.reloadDocument||De?!1:p??r.options.defaultPreload,qa=m??r.options.defaultPreloadDelay??0,cn=P.useCallback(()=>{r.preloadRoute({...Q,_builtLocation:J}).catch(qe=>{console.warn(qe),console.warn(Aw)})},[r,Q,J]);L4(o,P.useCallback(qe=>{qe?.isIntersecting&&cn()},[cn]),oE,{disabled:!!H||On!=="viewport"}),P.useEffect(()=>{Ko.current||!H&&On==="render"&&(cn(),Ko.current=!0)},[H,cn,On]);const Ci=qe=>{const ht=qe.currentTarget.getAttribute("target"),gn=z!==void 0?z:ht;if(!H&&!uE(qe)&&!qe.defaultPrevented&&(!gn||gn==="_self")&&qe.button===0){qe.preventDefault(),eE.flushSync(()=>{wr(!0)});const _r=r.subscribe("onResolved",()=>{_r(),wr(!1)});r.navigate({...Q,replace:w,resetScroll:C,hashScrollIntoView:y,startTransition:b,viewTransition:O,ignoreBlocker:se})}};if(De)return{...E,ref:o,href:De,...R&&{children:R},...z&&{target:z},...H&&{disabled:H},...$&&{style:$},...B&&{className:B},...W&&{onClick:W},...te&&{onBlur:te},...V&&{onFocus:V},...F&&{onMouseEnter:F},...ne&&{onMouseLeave:ne},...fe&&{onTouchStart:fe}};const Fo=qe=>{if(H||On!=="intent")return;if(!qa){cn();return}const ht=qe.currentTarget;if(To.has(ht))return;const gn=setTimeout(()=>{To.delete(ht),cn()},qa);To.set(ht,gn)},lu=qe=>{H||On!=="intent"||cn()},wt=qe=>{if(H||!On||!qa)return;const ht=qe.currentTarget,gn=To.get(ht);gn&&(clearTimeout(gn),To.delete(ht))};return{...E,...xn,...ta,href:je?.href,ref:o,onClick:si([W,Ci]),onBlur:si([te,wt]),onFocus:si([V,Fo]),onMouseEnter:si([F,Fo]),onMouseLeave:si([ne,wt]),onTouchStart:si([fe,lu]),disabled:!!H,target:z,...mn&&{style:mn},..._i&&{className:_i},...H&&aE,...An&&rE,...L&&Ei&&iE}}var Hf={},nE={className:"active"},aE={role:"link","aria-disabled":!0},rE={"data-status":"active","aria-current":"page"},iE={"data-transitioning":"transitioning"},To=new WeakMap,oE={rootMargin:"100px"},si=e=>n=>{for(const r of e)if(r){if(n.defaultPrevented)return;r(n)}};function sE(e,n,r,o){if(!o)return n?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function lE(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Rd=P.forwardRef((e,n)=>{const{_asChild:r,...o}=e,{type:l,...u}=tE(o,n),f=typeof o.children=="function"?o.children({isActive:u["data-status"]==="active"}):o.children;if(!r){const{disabled:h,...p}=u;return P.createElement("a",p,f)}return P.createElement(r,u,f)});function uE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var cE=class extends Q1{constructor(n){super(n),this.useMatch=r=>br({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>jv({...r,from:this.id}),this.useSearch=r=>Uv({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Dv({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Nv({...r,from:this.id}),this.useLoaderData=r=>Lv({...r,from:this.id}),this.useNavigate=()=>Bv({from:this.fullPath}),this.Link=Xt.forwardRef((r,o)=>X.jsx(Rd,{ref:o,from:this.fullPath,...r}))}};function fE(e){return new cE(e)}var dE=class extends zw{constructor(e){super(e),this.useMatch=n=>br({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>jv({...n,from:this.id}),this.useSearch=n=>Uv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Dv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Nv({...n,from:this.id}),this.useLoaderData=n=>Lv({...n,from:this.id}),this.useNavigate=()=>Bv({from:this.fullPath}),this.Link=Xt.forwardRef((n,r)=>X.jsx(Rd,{ref:r,from:this.fullPath,...n}))}};function hE(e){return new dE(e)}function Ad(e){return new pE(e,{silent:!0}).createRoute}var pE=class{constructor(e,n){this.path=e,this.createRoute=r=>{const o=fE(r);return o.isRoot=!1,o},this.silent=n?.silent}};
12function xd(e,n){let r,o,l,u;const f=()=>(r||(r=e().then(p=>{r=void 0,o=p[n]}).catch(p=>{if(l=p,A2(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),u=!0)}})),r),h=function(m){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!o)if($l)$l(f());else throw f();return P.createElement(o,m)};return h.preload=f,h}function mE(e){const n=St(),r=`not-found-${at(n.stores.location,o=>o.pathname)}-${at(n.stores.status,o=>o)}`;return X.jsx(Ed,{getResetKey:()=>r,onCatch:(o,l)=>{if(dt(o))e.onCatch?.(o,l);else throw o},errorComponent:({error:o})=>{if(dt(o))return e.fallback?.(o);throw o},children:e.children})}function gE(){return X.jsx("p",{children:"Not Found"})}function ui(e){return X.jsx(X.Fragment,{children:e.children})}function qv(e,n,r){return n.options.notFoundComponent?X.jsx(n.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?X.jsx(e.options.defaultNotFoundComponent,{...r}):X.jsx(gE,{})}function yE(e){return null}function vE(){return yE(St()),null}var Hv=P.memo(function({matchId:n}){const r=St(),o=r.stores.matchStores.get(n);o||jt();const l=at(r.stores.loadedAt,f=>f),u=at(o,f=>f);return X.jsx(bE,{router:r,matchId:n,resetKey:l,matchState:P.useMemo(()=>{const f=u.routeId,h=r.routesById[f].parentRoute?.id;return{routeId:f,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:h}},[u._displayPending,u.routeId,u.ssr,r.routesById])})});function bE({router:e,matchId:n,resetKey:r,matchState:o}){const l=e.routesById[o.routeId],u=l.options.pendingComponent??e.options.defaultPendingComponent,f=u?X.jsx(u,{}):null,h=l.options.errorComponent??e.options.defaultErrorComponent,p=l.options.onCatch??e.options.defaultOnCatch,m=l.isRoot?l.options.notFoundComponent??e.options.notFoundRoute?.options.component:l.options.notFoundComponent,v=o.ssr===!1||o.ssr==="data-only",y=(!l.isRoot||l.options.wrapInSuspense||v)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||v))?P.Suspense:ui,w=h?Ed:ui,b=m?mE:ui;return X.jsxs(l.isRoot?l.options.shellComponent??ui:ui,{children:[X.jsx(tu.Provider,{value:n,children:X.jsx(y,{fallback:f,children:X.jsx(w,{getResetKey:()=>r,errorComponent:h||Cd,onCatch:(C,O)=>{if(dt(C))throw C.routeId??=o.routeId,C;p?.(C,O)},children:X.jsx(b,{fallback:C=>{if(C.routeId??=o.routeId,!m||C.routeId&&C.routeId!==o.routeId||!C.routeId&&!l.isRoot)throw C;return P.createElement(m,C)},children:v||o._displayPending?X.jsx(q4,{fallback:f,children:X.jsx(Uy,{matchId:n})}):X.jsx(Uy,{matchId:n})})})})}),o.parentRouteId===fr?X.jsxs(X.Fragment,{children:[X.jsx(SE,{resetKey:r}),e.options.scrollRestoration&&M1?X.jsx(vE,{}):null]}):null]})}function SE({resetKey:e}){const n=St(),r=P.useRef(void 0);return Ao(()=>{const o=n.latestLocation.href;(r.current===void 0||r.current!==o)&&(n.emit({type:"onRendered",...mi(n.stores.location.get(),n.stores.resolvedLocation.get())}),r.current=o)},[n.latestLocation.state.__TSR_key,e,n]),null}var Uy=P.memo(function({matchId:n}){const r=St(),o=(v,y)=>r.getMatch(v.id)?._nonReactive[y]??v._nonReactive[y],l=r.stores.matchStores.get(n);l||jt();const u=at(l,v=>v),f=u.routeId,h=r.routesById[f],p=P.useMemo(()=>{const v=(r.routesById[f].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:f,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return v?JSON.stringify(v):void 0},[f,u.loaderDeps,u._strictParams,u._strictSearch,r.options.defaultRemountDeps,r.routesById]),m=P.useMemo(()=>{const v=h.options.component??r.options.defaultComponent;return v?X.jsx(v,{},p):X.jsx(wE,{})},[p,h.options.component,r.options.defaultComponent]);if(u._displayPending)throw o(u,"displayPendingPromise");if(u._forcePending)throw o(u,"minPendingPromise");if(u.status==="pending"){const v=h.options.pendingMinMs??r.options.defaultPendingMinMs;if(v){const y=r.getMatch(u.id);if(y&&!y._nonReactive.minPendingPromise){const w=pr();y._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),y._nonReactive.minPendingPromise=void 0},v)}}throw o(u,"loadPromise")}if(u.status==="notFound")return dt(u.error)||jt(),qv(r,h,u.error);if(u.status==="redirected")throw Bt(u.error)||jt(),o(u,"loadPromise");if(u.status==="error")throw u.error;return m}),wE=P.memo(function(){const n=St(),r=P.useContext(tu);let o,l=!1,u;{const m=r?n.stores.matchStores.get(r):void 0;[o,l]=at(m,v=>[v?.routeId,v?.globalNotFound??!1]),u=at(n.stores.matchesId,v=>v[v.findIndex(y=>y===r)+1])}const f=o?n.routesById[o]:void 0,h=n.options.defaultPendingComponent?X.jsx(n.options.defaultPendingComponent,{}):null;if(l)return f||jt(),qv(n,f,void 0);if(!u)return null;const p=X.jsx(Hv,{matchId:u});return o===fr?X.jsx(P.Suspense,{fallback:h,children:p}):p});function _E(){const e=St(),n=P.useRef({router:e,mounted:!1}),[r,o]=P.useState(!1),l=at(e.stores.isLoading,y=>y),u=at(e.stores.hasPending,y=>y),f=Df(l),h=l||r||u,p=Df(h),m=l||u,v=Df(m);return e.startTransition=y=>{o(!0),P.startTransition(()=>{y(),o(!1)})},P.useEffect(()=>{const y=e.history.subscribe(e.load),w=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Kn(e.latestLocation.publicHref)!==Kn(w.publicHref)&&e.commitLocation({...w,replace:!0}),()=>{y()}},[e,e.history]),Ao(()=>
12{if(typeof window<"u"&&e.ssr||n.current.router===e&&n.current.mounted)return;n.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(w){console.error(w)}})()},[e]),Ao(()=>{f&&!l&&e.emit({type:"onLoad",...mi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,e,l]),Ao(()=>{v&&!m&&e.emit({type:"onBeforeRouteMount",...mi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,v,e]),Ao(()=>{if(p&&!h){const y=mi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...y}),zv(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),y.hrefChanged&&kw(e)}},[h,p,e]),null}function EE(){const e=St(),n=e.routesById[fr].options.pendingComponent??e.options.defaultPendingComponent,r=n?X.jsx(n,{}):null,o=X.jsxs(typeof document<"u"&&e.ssr?ui:P.Suspense,{fallback:r,children:[X.jsx(_E,{}),X.jsx(CE,{})]});return e.options.InnerWrap?X.jsx(e.options.InnerWrap,{children:o}):o}function CE(){const e=St(),n=at(e.stores.firstId,l=>l),r=at(e.stores.loadedAt,l=>l),o=n?X.jsx(Hv,{matchId:n}):null;return X.jsx(tu.Provider,{value:n,children:e.options.disableGlobalCatchBoundary?o:X.jsx(Ed,{getResetKey:()=>r,errorComponent:Cd,onCatch:void 0,children:o})})}var TE=e=>({createMutableStore:zy,createReadonlyStore:zy,batch:zv}),RE=e=>new AE(e),AE=class extends bw{constructor(e){super(e,TE)}};function xE({router:e,children:n,...r}){k1(r)&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const o=X.jsx(Ov.Provider,{value:e,children:n});return e.options.Wrap?X.jsx(e.options.Wrap,{children:o}):o}function OE({router:e,...n}){return X.jsx(xE,{router:e,...n,children:X.jsx(EE,{})})}function Pv(e){const{attrs:n,children:r,nonce:o}=e;switch(e.tag){case"title":return X.jsx("title",{...n,suppressHydrationWarning:!0,children:r});case"meta":return X.jsx("meta",{...n,suppressHydrationWarning:!0});case"link":return X.jsx("link",{...n,precedence:n?.precedence??(n?.rel==="stylesheet"?"default":void 0),nonce:o,suppressHydrationWarning:!0});case"style":return e.inlineCss,X.jsx("style",{...n,dangerouslySetInnerHTML:{__html:r},nonce:o});case"script":return X.jsx(ME,{attrs:n,children:r});default:return null}}function ME({attrs:e,children:n}){St();const r=Td(),o=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(P.useEffect(()=>{if(!o){if(e?.src){const l=(()=>{try{const f=document.baseURI||window.location.href;return new URL(e.src,f).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(f=>f.src===l))return;const u=document.createElement("script");for(const[f,h]of Object.entries(e))f!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&u.setAttribute(f,typeof h=="boolean"?"":String(h));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof n=="string"){const l=typeof e?.type=="string"?e.type:"text/javascript",u=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(h=>{if(!(h instanceof HTMLScriptElement))return!1;const p=h.getAttribute("type")??"text/javascript",m=h.getAttribute("nonce")??void 0;return h.textContent===n&&p===l&&m===u}))return;const f=document.createElement("script");if(f.textContent=n,e)for(const[h,p]of Object.entries(e))h!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&f.setAttribute(h,typeof p=="boolean"?"":String(p));return document.head.appendChild(f),()=>{f.parentNode&&f.parentNode.removeChild(f)}}}},[e,n,o]),o&&typeof n=="string")return X.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n}});if(!r){if(e?.src)return X.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof n=="string")return X.jsx("script",{...e,dangerouslySetInnerHTML:{__html:n},suppressHydrationWarning:!0})}return null}var zE=e=>{const n=St(),r=n.options.ssr?.nonce,o=at(n.stores.matches,m=>m.map(v=>v.meta).filter(Boolean),Ut),l=P.useMemo(()=>{const m=[],v={};let y;for(let w=o.length-1;w>=0;w--){const b=o[w];for(let C=b.length-1;C>=0;C--){const O=b[C];if(O)if(O.title)y||(y={tag:"title",children:O.title});else if("script:ld+json"in O)try{const R=JSON.stringify(O["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:k2(R)})}catch{}else{const R=O.name??O.property;if(R){if(v[R])continue;v[R]=!0}m.push({tag:"meta",attrs:{...O,nonce:r}})}}}return y&&m.push(y),r&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),m.reverse(),m},[o,r]),u=at(n.stores.matches,m=>{const v=m.map(b=>
12b.links).filter(Boolean).flat(1).map(b=>({tag:"link",attrs:{...b,nonce:r}})),y=n.ssr?.manifest,w=m.map(b=>y?.routes[b.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(b=>b.tag==="link"?Mw(y,b)?[]:[{tag:"link",attrs:{...b.attrs,crossOrigin:my(e,"stylesheet")??b.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}]:b.tag==="style"?[{tag:"style",attrs:{...b.attrs,nonce:r},children:b.children,...b.inlineCss?{inlineCss:!0}:{}}]:[]);return[...v,...w]},Ut),f=at(n.stores.matches,m=>{const v=[];return m.map(y=>n.looseRoutesById[y.routeId]).forEach(y=>n.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(w=>{const b=xw(w);v.push({tag:"link",attrs:{rel:"modulepreload",href:b.href,crossOrigin:my(e,"modulepreload")??b.crossOrigin,nonce:r}})})),v},Ut),h=at(n.stores.matches,m=>m.map(v=>v.styles).flat(1).filter(Boolean).map(({children:v,...y})=>({tag:"style",attrs:{...y,nonce:r},children:v})),Ut),p=at(n.stores.matches,m=>m.map(v=>v.headScripts).flat(1).filter(Boolean).map(({children:v,...y})=>({tag:"script",attrs:{...y,nonce:r},children:v})),Ut);return kE([...l,...f,...u,...h,...p],m=>JSON.stringify(m))};function kE(e,n){const r=new Set;return e.filter(o=>{const l=n(o);return r.has(l)?!1:(r.add(l),!0)})}function LE(e){const n=zE(e.assetCrossOrigin),r=St().options.ssr?.nonce;return X.jsx(X.Fragment,{children:n.map(o=>P.createElement(Pv,{...o,key:`tsr-meta-${JSON.stringify(o)}`,nonce:r}))})}var NE=()=>{const e=St(),n=e.options.ssr?.nonce,r=u=>{const f=[],h=e.ssr?.manifest;return h?(u.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>h.routes[p.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{f.push({tag:"script",attrs:{...m.attrs,nonce:n},children:m.children})})),f):[]},o=u=>u.map(f=>f.scripts).flat(1).filter(Boolean).map(({children:f,...h})=>({tag:"script",attrs:{...h,suppressHydrationWarning:!0,nonce:n},children:f})),l=at(e.stores.matches,r,Ut);return DE(e,at(e.stores.matches,o,Ut),l)};function DE(e,n,r){let o;e.serverSsr&&(o=e.serverSsr.takeBufferedScripts());const l=[...n,...r];return o&&l.unshift(o),X.jsx(X.Fragment,{children:l.map((u,f)=>P.createElement(Pv,{...u,key:`tsr-scripts-${u.tag}-${f}`}))})}var $v=e=>{window.history.pushState({},"",e),window.dispatchEvent(new PopStateEvent("popstate",{state:{}}))},UE=()=>{const[e,n]=P.useState(window?.location.pathname??"");return P.useEffect(()=>{if(!window)return;const r=()=>{n(window.location.pathname)};return window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)},[]),e},BE=()=>{const[e,n]=P.useState(window?new URLSearchParams(window.location.search):new URLSearchParams);return P.useEffect(()=>{if(!window)return;const r=()=>{n(new URLSearchParams(window.location.search))};return window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)},[]),e},jE=()=>{const e=UE(),n=BE();P.useEffect(()=>{if(window.parent!==window)return window.parent.postMessage({type:"PATHNAME_CONNECTED"},"*"),()=>{window.parent.postMessage({type:"PATHNAME_DISCONNECTED"},"*")}},[]),P.useEffect(()=>{if(window.parent!==window){const r=e+(n.toString()?`?${n.toString()}`:"");window.parent.postMessage({type:"PATHNAME_UPDATE",pathname:r},"*")}},[e,n])},qE=()=>{P.useEffect(()=>{if(window.parent!==window){const e=f=>{if(f.source===window.parent)switch(f.data.type){case"HISTORY_GO_BACK":window.history.back();break;case"HISTORY_GO_FORWARD":window.history.forward();break;case"PATHNAME_UPDATE":const h=f.data.pathname;h&&h!==window.location.pathname&&$v(h);break}};let n=[window.location.pathname],r=0;const o=()=>{const f=window.location.pathname;f!==n[r]&&(n=n.slice(0,r+1),n.push(f),r=n.length-1),window.parent.postMessage({type:"HISTORY_STATE_UPDATED",canGoBack:r>0,canGoForward:r<n.length-1,currentPath:f},"*")},l=window.history.pushState,u=window.history.replaceState;return window.history.pushState=function(...f){l.apply(this,f),o()},window.history.replaceState=function(...f){u.apply(this,f),o()},window.addEventListener("message",e),window.addEventListener("popstate",()=>{const f=window.location.pathname;r=n.indexOf(f),r===-1&&(r=n.length,n.push(f)),o()}),o(),()=>{window.removeEventListener("message",e),window.removeEventListener("popstate",o),window.history.pushState=l,window.history.replaceState=u}}},[])},bl=()=>window.location.pathname+window.location.search+window.location.hash,HE=()=>{P.useEffect(()=>{if(window.parent===window)return;let e=[bl()],n=0;const r=()=>{const p=bl();p!==e[n]&&(e=e.slice(0,n+1),e.push(p),n=e.length-1),window.parent.postMessage({type:"URL_UPDATE",url:p,canGoBack:n>0,canGoForward:n<e.length-1},"*")},o=window.history.pushState,l=window.history.replaceState;window.history.pushState=function(...p){o.apply(this,p),r()},window.history.replaceState=function(...p){l.apply(this,p),r()};const u=p=>{if(p.source===window.parent&&p.data.type==="URL_NAVIGATE"){const m=p.data.url;m&&m!==bl()&&$v(m)}},f=()=>{const p=bl();n=e.indexOf(p),n===-1&&(n=e.length,e.push(p)),r()},h=()=>{r()};return window.parent.postMessage({type:"URL_CONNECTED"},"*"),window.addEventListener("message",u),window.addEventListener("popstate",f),window.addEventListener("hashchange",h),r(),()=>{window.parent.postMessage({type:"URL_DISCONNECTED"},"*"),window.removeEventListener("message",u),window.removeEventListener("popstate",f),window.removeEventListener("hashchange",h),window.history.pushState=o,window.history.replaceState=l}},[])},PE=e=>e?e.split(`
13`).slice(2).map(r=>{const l=r.trim().split(" ")[1];return!l||!l.startsWith||l.startsWith("https://")?null:l}
13).filter(Boolean):[],ln=(e,n=new WeakSet)=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;if(n.has(e))return"[Circular Reference]";if(n.add(e),e instanceof Error)return{__type:"Error",name:e.name,message:e.message,stack:e.stack};if(e instanceof Response)return{__type:"Response",url:e.url,status:e.status,statusText:e.statusText,headers:Array.from(e.headers.entries())};if(e instanceof Request)return{__type:"Request",url:e.url,method:e.method};if(e instanceof HTMLElement)return{__type:"HTMLElement",tagName:e.tagName,id:e.id,className:e.className};if(typeof e=="function")return`[Function: ${e.name||"anonymous"}]`;if(e instanceof Date)return{__type:"Date",value:e.toISOString()};if(e instanceof RegExp)return{__type:"RegExp",value:e.toString()};if(e instanceof Map)return{__type:"Map",value:Array.from(e.entries()).map(([r,o])=>[ln(r,n),ln(o,n)])};if(e instanceof Set)return{__type:"Set",value:Array.from(e).map(r=>ln(r,n))};if(Array.isArray(e))return e.map(r=>ln(r,n));try{const r={};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o))try{r[o]=ln(e[o],n)}catch(l){r[o]=`[Failed to serialize: ${l.message}]`}return r}catch{return`[${e.constructor?.name||"Object"}: Unable to serialize]`}},$E=()=>{P.useEffect(()=>{if(window.parent!==window){const e=console.log,n=console.error,r=console.warn;return console.log=function(...o){e.apply(console,o);const l=o.map(u=>ln(u));try{window.parent.postMessage({type:"CONSOLE_LOG",content:l},"*")}catch(u){n("Error forwarding log to parent:",u)}
13},console.error=function(...o){n.apply(console,o);const l=new Error().stack,u=PE(l),f=o.map(h=>ln(h));try{window.parent.postMessage({type:"CONSOLE_ERROR",content:f,functionStack:u},"*")}catch(h){n("Error forwarding error to parent:",h)}},console.warn=function(...o){r.apply(console,o);const l=o.map(u=>ln(u));try{window.parent.postMessage({type:"CONSOLE_WARN",content:l},"*")}catch(u){n("Error forwarding warning to parent:",u)}},()=>{console.log=e,console.error=n,console.warn=r}}},[])},VE=()=>{P.useEffect(()=>{const e=r=>{if(r.preventDefault(),window.parent!==window){const o=ln(r.error??new Error(r.message));window.parent.postMessage({type:"UNCAUGHT_ERROR",content:o},"*")}};window.addEventListener("error",e);const n=r=>{if(r.preventDefault(),window.parent!==window&&r.reason){const o=ln(r.reason);window.parent.postMessage({type:"UNHANDLED_PROMISE_REJECTION",content:o},"*")}};return window.addEventListener("unhandledrejection",n),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",n)}},[])},ZE=class extends Xt.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,n){const r={__type:"Error",name:e.name,message:e.message,componentStack:n.componentStack?.split(`
14`).map(o=>o.trim().split(" ")[1]).filter(Boolean).filter(o=>!["MacalyErrorLogger","MacalyBridge","MacalyComponentEditMode"].includes(o))||[]};throw this.setState({errorInfo:n}),window.parent!==window&&window.parent.postMessage({type:"UNCAUGHT_ERROR",content:r},"*"),e}render(){return this.state.hasError?null:this.props.children}},IE=()=>{P.useEffect(()=>{if(window.parent!==window){if(!window.modernScreenshot&&!document.getElementById("modern-screenshot-script")){const n=document.createElement("script");n.id="modern-screenshot-script",n.type="module",n.textContent=`
15          import { domToPng } from 'https://unpkg.com/modern-screenshot?module';
16          window.modernScreenshot = { domToPng };
17        `,document.head.appendChild(n)}const e=n=>{n.data.type==="CAPTURE_SCREENSHOT"&&(window.modernScreenshot?.domToPng?window.modernScreenshot.domToPng(document.documentElement,{fetch:{requestInit:{cache:"no-cache"}}}).then(r=>{window.parent.postMessage({type:"SCREENSHOT_CAPTURED",dataUrl:r},"*")}).catch(r=>{window.parent.postMessage({type:"SCREENSHOT_ERROR",error:ln(r)},"*")}):setTimeout(()=>{window.modernScreenshot?.domToPng?window.modernScreenshot.domToPng(document.documentElement,{fetch:{requestInit:{cache:"no-cache"}}}).then(r=>{window.parent.postMessage({type:"SCREENSHOT_CAPTURED",dataUrl:r},"*")}).catch(r=>{window.parent.postMessage({type:"SCREENSHOT_ERROR",error:ln(r)},"*")}):window.parent.postMessage({type:"SCREENSHOT_ERROR",error:"modernScreenshot library not available"},"*")},1e3))};return window.addEventListener("message",e),window.parent.postMessage({type:"SCREENSHOT_CAPTURE_AVAILABLE"},"*"),()=>{window.removeEventListener("message",e),window.parent.postMessage({type:"SCREENSHOT_CAPTURE_UNAVAILABLE"},"*")}}},[])};function Od(e){if(e.id)return`#${e.id}`;const n=[];let r=e;for(;r&&r.nodeType===Node.ELEMENT_NODE;){let o=r.nodeName.toLowerCase();if(r.id){o=`#${r.id}`,n.unshift(o);break}else{const u=Array.from(r.parentNode?.children||[]).filter(f=>f.nodeName===r.nodeName).indexOf(r);
17o+=`:nth-child(${u+1})`,n.unshift(o),r=r.parentNode}}return n.join(" > ")}function xo(e){return Od(e)}var QE=e=>{const n=Object.keys(e).find(r=>r.startsWith("__reactFiber$")||r.startsWith("__reactInternalInstance$"));return n?e[n]:null};function GE(e){let n=e;for(;n;){if(typeof n.type=="object"&&(n.type===null||n.type?.$$type==="Symbol(react.provider)"||n.type?.$$type==="Symbol(react.context)"&&n.type.displayName==="LayoutRouterContext"))return{type:null,serverComponent:!0};if(typeof n.type=="function")return n._debugOwner?.name==="HydrateClient"||n.type.name==="InnerLayoutRouter"||n.type.name==="MacalyBridge"?{type:null,serverComponent:!0}:{type:n.type,serverComponent:!1};n=n.return}return{type:null,serverComponent:!1}}function YE(e){let n=e;for(;n;){const r=n._debugOwner?.name;if(r&&r!=="MacalyBridge")return n._debugOwner.name;n=n.return}return null}var XE=e=>{if(!e)return"UNKNOWN";const n=GE(e);return n.serverComponent?YE(e)||"SERVER":n.type?n.type.displayName||n.type.name||"ANONYMOUS":"UNKNOWN"},Vv=e=>{const n=QE(e);return n?XE(n):null},KE=()=>{const n=document.documentElement.classList;return n.contains("light")?"light":n.contains("dark")?"dark":null},FE=e=>{const n=document.documentElement;n.classList.remove("light","dark"),n.classList.add(e),n.style.colorScheme=e},Lt="v1",Lo=e=>{const n=[],r=o=>{const l=n[n.length-1];l&&l.type==="text"?l.value=l.value+o:n.push({type:"text",value:o})};return e.childNodes.forEach(o=>{if(o.nodeType===Node.TEXT_NODE)r(o.nodeValue||"");else if(o.nodeType===Node.ELEMENT_NODE){const l=o,u=l.getAttribute("data-macaly-name")||l.tagName.toLowerCase(),f=l.getAttribute("data-macaly-loc");n.push({type:"element",name:u,key:f??null})}}),n},JE=e=>{const n=e.getAttribute("data-macaly-loc")||"",r=e.getAttribute("data-macaly-name")||"";return{element:Od(e),tagName:e.tagName.toLowerCase(),className:typeof e.className=="string"?e.className:"",id:e.id,componentName:Vv(e),dataMacalyLoc:n,dataMacalyName:r}},WE=e=>{let n=e;for(;n;){const r=n.getAttribute("data-em-original-contenteditable")??n.getAttribute("contenteditable");if(r&&r!=="false")return!0;n=n.parentElement}return!1},sd=e=>{const n=e.getAttribute("data-macaly-loc"),r=e.getAttribute("data-macaly-name");return!n||!r||WE(e)||!Array.from(e.childNodes).some(l=>l.nodeType===Node.TEXT_NODE&&l.textContent?.trim())?!1:!["INPUT","TEXTAREA","SELECT","IMG","VIDEO","SCRIPT","STYLE"].includes(e.tagName)},Zv=(e,n)=>{if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],l=n[r];if(o.type!==l.type)return!1;if(o.type==="text"&&l.type==="text"){if(o.value!==l.value)return!1}else if(o.type==="element"&&l.type==="element"&&o.name!==l.name)return!1}return!0},e5=e=>(e=e.replace(/\s+contenteditable="(true|false)"/gi,""),e=e.replace(/\s+data-em-[^=]*="[^"]*"/gi,""),e=e.replace(/\s+style="[^"]*(?:box-shadow|border-radius|background-color|outline)[^"]*"/gi,n=>{const o=(n.match(/style="([^"]*)"/)?.[1]||"").split(";").filter(l=>{const u=l.trim();return u&&!u.startsWith("box-shadow:")&&!u.startsWith("border-radius:")&&!u.startsWith("background-color:")&&!u.startsWith("outline:")}).join(";");return o?` style="${o}"`:""}),e),t5=e=>{let n=e.parentElement;for(;n;){if(n.hasAttribute("data-em-was-modified")){const r=n.innerHTML||"",o=e5(r);n.setAttribute("data-em-last-committed-html",o)}n=n.parentElement}},n5=e=>{if(!e.hasAttribute("data-em-was-modified")){const n=e.innerHTML||"";e.setAttribute("data-em-original-html",n);const r=Lo(e);e.setAttribute("data-em-original-text-elements",JSON.stringify(r))}},By=e=>{if(!e.hasAttribute("data-em-original-contenteditable")){const n=e.getAttribute("contentEditable")||"";e.setAttribute("data-em-original-contenteditable",n)}},a5=e=>{By(e),e.contentEditable="true",e.querySelectorAll("*").forEach(r=>{const o=r;By(o),o.contentEditable="false"})},r5=e=>{e.focus()},i5=e=>{sd(e)&&(n5(e),a5(e),r5(e),m5(e),b5(e))},o5=e=>{const n=e.getAttribute("data-em-original-html")||"",o=e.getAttribute("data-em-last-committed-html")||""||n;e.innerHTML=o},Iv=(e,n,r)=>{const o=xo(e),l=JE(e),u=e.getAttribute("data-em-original-text-elements")||"[]",f=JSON.parse(u),h=Lo(e);!Zv(f,h)?(e.setAttribute("data-em-was-modified","true"),e.setAttribute("data-em-last-committed-html",r),t5(e),window.parent.postMessage({type:"TEXT_EDITED",ver
17sion:Lt,content:{key:o,originalText:f,newText:h,schemaVersion:1,componentInfo:l}},"*")):e.hasAttribute("data-em-was-modified")&&(window.parent.postMessage({type:"TEXT_RESET",version:Lt,content:{key:o,componentInfo:l,originalText:f}},"*"),e.removeAttribute("data-em-last-committed-html"),e.removeAttribute("data-em-was-modified"))},jy=e=>{const n=e.getAttribute("data-em-original-contenteditable");n!==null&&(n===""?e.removeAttribute("contentEditable"):e.contentEditable=n,e.removeAttribute("data-em-original-contenteditable"))},s5=e=>{jy(e),e.querySelectorAll("*").forEach(r=>{jy(r)})},l5=(e,n)=>n.endContainer===e||n.endContainer.parentNode===e&&n.endOffset===n.endContainer.textContent?.length?e.lastElementChild?.tagName==="BR":!1,u5=e=>{if(!e.collapsed)return!1;const{startContainer:n,startOffset:r}=e;return n.nodeType===Node.TEXT_NODE&&r===0?n.previousSibling?.nodeName==="BR":n.nodeType===Node.ELEMENT_NODE&&r>0?n.childNodes[r-1]?.nodeName==="BR":!1},c5=e=>{const{startContainer:n,startOffset:r}=e;let o=null;n.nodeType===Node.TEXT_NODE&&r===0&&(o=n.previousSibling),n.nodeType===Node.ELEMENT_NODE&&r>0&&(o=n.childNodes[r-1]),o&&o.nodeName==="BR"&&o.parentNode&&(console.log("Removing BR at cursor:",o),o.parentNode.removeChild(o))},f5=e=>{const n=e.lastElementChild,r=n?.previousElementSibling;if(n?.tagName==="BR"){const o=r?.previousElementSibling;r?.tagName==="BR"&&(!o||o.tagName!=="BR")&&e.removeChild(r),e.removeChild(n);const u=new Event("input",{bubbles:!0});e.dispatchEvent(u)}},d5=(e,n=!0)=>{const r=e.getAttribute("data-em-original-html")||"",o=e.innerHTML||"";s5(e),g5(e),S5(e),n?Iv(e,r,o):o5(e)},h5=(e,n,r)=>{if(n)switch(e.stopPropagation(),e.key){case"Enter":{e.preventDefault();try{document.execCommand("insertLineBreak")}catch{}break}case"Backspace":{const o=window.getSelection();if(o&&o.rangeCount>0){const l=o.getRangeAt(0);if(l.collapsed&&l5(n,l)){e.preventDefault(),f5(n);const u=document.createRange();u.selectNodeContents(n),u.collapse(!1),o.removeAllRanges(),o.addRange(u)}else l.collapsed&&u5(l)&&(e.preventDefault(),c5(l))}break}case"Escape":{e.preventDefault();break}case" ":e.preventDefault(),document.execCommand("insertText",!1," ");break}},p5=e=>e.getAttribute("data-em-original-html")||"",Qv=e=>{queueMicrotask(()=>{const n=p5(e),r=e.innerHTML||"";Iv(e,n,r)})},m5=e=>{const n=e;if(n._inspectorInputHandlerAttached)return;const r=()=>Qv(e);n._inspectorInputHandler=r,n._inspectorInputHandlerAttached=!0,e.addEventListener("input",r)},g5=e=>{const n=e,r=n._inspectorInputHandler;r&&e.removeEventListener("input",r),n._inspectorInputHandler=void 0,n._inspectorInputHandlerAttached=!1},qy=e=>e.every(n=>n.type==="text"||n.type==="element"&&n.name.toLowerCase()==="br"),Gv=e=>{const n=document.createElement("div");return n.textContent=e,n.innerHTML},y5=e=>e.map(n=>n.type==="text"?Gv(n.value):n.type==="element"&&n.name.toLowerCase()==="br"?"<br>":"").join(""),v5=e=>n=>{n.preventDefault(),n.stopPropagation();const r=n.clipboardData?.getData("text/plain")||"",l=Gv(r).replace(/\n/g,"<br>");if(l){const u=window.getSelection();if(u&&u.rangeCount>0){const f=u.getRangeAt(0);f.deleteContents();const h=document.createElement("template");h.innerHTML=l;const p=h.content,m=Array.from(p.childNodes);if(f.insertNode(p),m.length>0){const y=m[m.length-1];f.setStartAfter(y),f.setEndAfter(y)}u.removeAllRanges(),u.addRange(f);const v=new Event("input",{bubbles:!0});e.dispatchEvent(v)}else document.execCommand("insertHTML",!1,l)}},b5=e=>{const n=e;if(n._inspectorPasteHandlerAttached)return;const r=v5(e);n._inspectorPasteHandler=r,n._inspectorPasteHandlerAttached=!0,e.addEventListener("paste",r)},S5=e=>{const n=e,r=n._inspectorPasteHandler;r&&e.removeEventListener("paste",r),n._inspectorPasteHandler=void 0,n._inspectorPasteHandlerAttached=!1},Hy="https://cdn.tailwindcss.com",w5="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4",_5=e=>{if(document.getElementById("macaly-tailwind-cdn"))return;const n=parseInt(e?.match(/\d+/)?.[0]??"",10);let r;n===4?r=w5:(n===3||Number.isNaN(n)||console.warn(`[macaly] Unsupported Tailwind version "${e}", falling back to v3 CDN`),r=Hy);const o=document.createElement("script");o.id="macaly-tailwind-cdn",o.src=r,o.type="text/javascript",document.head.appendChild(o)},E5=()=>{const e=document.getElementById("macaly-tailwind-cdn");e&&e.parentNode&&document.head.removeChild(e)},C5=(e,n)=>{const r=new Set(e.split(/\s+/).filter(l=>l.trim()!=="")),o=new Set(n.split(/\s+/).filter(l=>l.trim()!==""));if(r.size!==o.size)return!0;for(const l of r)if(!o.has(l))return!0;return!1},Py=(e,n,r,o,l,u,f,h,p,m,v)=>{Yv();const w=e.getAttribute("data-macaly-name")||e.tagName.toLowerCase(),b=document.createElement("div");b.id="macaly-internal-info-badge";const C=document.createElement("span");C.textContent=w,C.className="macaly-badge-name";const O=document.createElement("button");O.className="macaly-badge-button",O.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"/></svg>',O.title="Select previous sibling",f||(O.disabled=!0),O.addEventListener("click",B=>{B.stopPropagation(),f&&l()});const R=document.createElement("button");R.className="macaly-badge-button",R.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>',R.title="Select next sibling",h||(R.disabled=!0),R.addEventListener("click",B=>{B.stopPropagation(),h&&u()});const z=document.createElement("button");z.className="macaly-badge-button",z.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 9 9 4 4 9"/><path d="M20 20h-7a4 4 0 0 1-4-4V4"/></svg>',z.title="Select parent element",o||(z.disabled=!0),z.addEventListener("click",B=>{B.stopPropagation(),o&&n()});const H=document.createElement("button");H.className="macaly-badge-button",H.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>',H.title="Delete element",H.addEventListener("click",B=>{B.stopPropagation(),r()});const $=document.createElement("button");return $.className="macaly-badge-button",$.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m18 16 4-4-4-4"/><path d="m6 8-4 4 4 4"/><path d="m14.5 4-5 16"/></svg>',m?$.title="Go to source code":($.disabled=!0,$.title=v||"Go to source code"),$.addEventListener("click",B=>{B.stopPropagation(),m&&p()}),b.appendChild(C),b.appendChild(z),b.appendChild(O),b.appendChild(R),b.appendChild($),b.appendChild(H
17),document.body.appendChild(b),b},Yv=()=>{const e=document.getElementById("macaly-internal-info-badge");e&&e.parentNode&&e.parentNode.removeChild(e)},$y=(e,n)=>{ld();const r=document.createElement("div");r.id="macaly-internal-ai-badge";const o=document.createElement("button");return o.className="macaly-badge-button",o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/><path d="M5 3v4"/><path d="M19 17v4"/><path d="M3 5h4"/><path d="M17 19h4"/></svg>',o.title="Ask AI",o.addEventListener("click",l=>{l.stopPropagation(),n()}),r.appendChild(o),document.body.appendChild(r),r},ld=()=>{const e=document.getElementById("macaly-internal-ai-badge");e&&e.parentNode&&e.parentNode.removeChild(e)},T5=e=>{if(e.length<=1)return e;const n=1,r=new Map;e.forEach(l=>{const u=Math.round(l.y);let f=!1;for(const[h,p]of r.entries())if(Math.abs(h-u)<n){p.push(l),f=!0;break}f||r.set(u,[l])});const o=[];return r.forEach(l=>{l.sort((f,h)=>f.x-h.x);let u=l[0];for(let f=1;f<l.length;f++){const h=l[f];if(u.x+u.width+2>=h.x){const m=Math.max(u.x+u.width,h.x+h.width);u=new DOMRect(u.x,u.y,m-u.x,Math.max(u.height,h.height))}else o.push(u),u=h}o.push(u)}),o},Xv=e=>{const n=e.getClientRects(),r=Array.from(n).filter(o=>o.width>0&&o.height>0);return T5(r)},R5=()=>{if(document.getElementById("macaly-inspector-selection-styles"))return;const e=document.createElement("style");e.id="macaly-inspector-selection-styles",e.textContent=`
18    /* Suppress native focus rings while inspector is active */
19    *:focus, *:focus-visible {
20      outline: none !important;
21      box-shadow: none !important;
22    }
23
24    /* Info Badge - Component name display with buttons */
25    #macaly-internal-info-badge {
26      position: fixed;
27      height: 24px;
28      background: #eaedff;
29      color: #2970ff;
30      border: 1px solid #c7d2fe;
31      border-radius: 4px;
32      font-size: 10px;
33      font-weight: 500;
34      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
35      z-index: 999999;
36      display: flex;
37      align-items: center;
38      gap: 6px;
39      box-shadow: 0 4px 12px rgba(41, 112, 255, 0.15), 0 2px 4px rgba(41, 112, 255, 0.08);
40      line-height: 1;
41      padding: 0 6px 0 8px;
42      backdrop-filter: blur(8px);
43      white-space: nowrap;
44      cursor: default;
45      user-select: none;
46    }
47
48    /* AI Badge - Separate badge for Ask AI button */
49    #macaly-internal-ai-badge {
50      position: fixed;
51      height: 24px;
52      background: #eaedff;
53      color: #2970ff;
54      border: 1px solid #c7d2fe;
55      border-radius: 4px;
56      font-size: 10px;
57      font-weight: 500;
58      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
59      z-index: 999999;
60      display: flex;
61      align-items: center;
62      gap: 6px;
63      box-shadow: 0 4px 12px rgba(41, 112, 255, 0.15), 0 2px 4px rgba(41, 112, 255, 0.08);
64      line-height: 1;
65      padding: 0 6px;
66      backdrop-filter: blur(8px);
67      white-space: nowrap;
68      cursor: default;
69      user-select: none;
70    }
71
72    .macaly-badge-name {
73      overflow: hidden;
74      text-overflow: ellipsis;
75      max-width: 150px;
76      pointer-events: none;
77    }
78
79    .macaly-badge-button {
80      display: flex;
81      align-items: center;
82      justify-content: center;
83      width: 18px;
84      height: 18px;
85      padding: 0;
86      border: none;
87      background: transparent;
88      color: #2970ff;
89      cursor: pointer;
90      border-radius: 2px;
91      transition: background-color 0.15s ease;
92      pointer-events: auto;
93      flex-shrink: 0;
94    }
95
96    .macaly-badge-button:hover:not(:disabled) {
97      background-color: rgba(41, 112, 255, 0.15);
98    }
99
100    .macaly-badge-button:active:not(:disabled) {
101      background-color: rgba(41, 112, 255, 0.25);
102    }
103
104    .macaly-badge-button:disabled {
105      opacity: 0.4;
106      cursor: not-allowed;
107    }
108
109    .macaly-badge-button svg {
110      display: block;
111    }
112
113    /* Selection Highlight - Solid outline */
114    .macaly-em-highlight {
115      position: absolute;
116      outline: 2px solid rgb(37, 99, 235);
117      outline-offset: 2px;
118      border-radius: 4px;
119      pointer-events: none;
120      z-index: 10000;
121    }
122
123    /* Hover Highlight - Dashed outline, no tint */
124    .macaly-em-hover-highlight {
125      position: absolute;
126      outline: 2px dashed rgb(37, 99, 235);
127      outline-offset: 2px;
128      border-radius: 4px;
129      pointer-events: none;
130      z-index: 9999;
131    }
132  `,document.head.appendChild(e)},A5=()=>{const e=document.getElementById("macaly-inspector-selection-styles");e&&e.parentNode&&document.head.removeChild(e)},Oo=e=>{Kv();const n=window.getComputedStyle(e).display,r=n==="inline"||n==="inline-block";let o;if(r)o=Xv(e);else{const l=e.getBoundingClientRect();o=l.width>0&&l.height>0?[l]:[]}o.forEach(l=>{const u=document.createElement("div");u.className="macaly-em-highlight",u.style.top=l.top+window.scrollY+"px",u.style.left=l.left+window.scrollX+"px",u.style.width=l.width+"px",u.style.height=l.height+"px",document.body.appendChild(u)})},Kv=()=>{document.querySelectorAll(".macaly-em-highlight").forEach(e=>e.remove())},x5=()=>{const e=document.querySelector("[data-em-selected]");e&&Oo(e)},O5=e=>{if(ci(),e.hasAttribute("data-em-selected"))return;const n=window.getComputedStyle(e).display,r=n==="inline"||n==="inline-block";let o;if(r)o=Xv(e);else{const l=e.getBoundingClientRect();o=l.width>0&&l.height>0?[l]:[]}o.forEach(l=>{const u=document.createElement("div");u.className="macaly-em-hover-highlight",u.style.top=l.top+window.scrollY+"px",u.style.left=l.left+window.scrollX+"px",u.style.width=l.width+"px",u.style.height=l.height+"px",document.body.appendChild(u)})},ci=()=>{document.querySelectorAll(".macaly-em-hover-highlight").forEach(e=>e.remove())},Fv=()=>{if(document.getElementById("macaly-edit-mode-styles"))return;const e=document.createElement("style");e.id="macaly-edit-mode-styles",e.textContent="",document.head.appendChild(e)},M5=(e,n)=>{let r=document.getElementById("macaly-edit-mode-styles");r||(Fv(),r=document.getElementById("macaly-edit-mode-styles")),r&&(r.textContent=e,n===null?r.removeAttribute("type"):n!==void 0&&r.setAttribute("type",n))},z5=()=>{const e=document.getElementById("macaly-edit-mode-styles");e&&e.parentNode&&document.head.removeChild(e)},Jv=()=>{if(document.getElementById("macaly-edit-mode-script"))return;const e=document.createElement("script");e.id="macaly-edit-mode-script",e.textContent="",document.head.appendChild(e)},k5=e=>{let n=document.getElementById("macaly-edit-mode-script");
132if(n||(Jv(),n=document.getElementById("macaly-edit-mode-script")),n){const r=document.createElement("script");r.id="macaly-edit-mode-script",r.textContent=e,n.replaceWith(r)}},L5=()=>{const e=document.getElementById("macaly-edit-mode-script");e&&e.parentNode&&document.head.removeChild(e)},Sl=e=>{const n=e.getBoundingClientRect(),r=24,o=8,l=document.getElementById("macaly-internal-info-badge");if(!l)return;const u=r+o,h=n.top>=u?n.top-r-o:n.bottom+o,p=l.offsetWidth||0;if(n.width<80){const y=n.left+n.width/2-p/2;l.style.left=`${y}px`,l.style.top=`${h}px`}else l.style.left=`${n.left}px`,l.style.top=`${h}px`},Pf=e=>{const n=document.getElementById("macaly-internal-ai-badge");if(!n)return;const r=8,o=4,l=document.getElementById("macaly-internal-info-badge");if(l){const C=l.getBoundingClientRect(),O=n.offsetWidth||0,R=C.top;let z=C.right+r;z+O>window.innerWidth-o&&(z=C.left-O-r);const H=window.innerWidth-O-o;z<o&&(z=o),z>H&&(z=H),n.style.left=`${z}px`,n.style.top=`${R}px`;return}const u=e.getBoundingClientRect(),f=24,h=8,p=f+h,v=u.top>=p?u.top-f-h:u.bottom+h,y=n.offsetWidth||0;let w=u.right-y;const b=window.innerWidth-y-o;w<o&&(w=o),w>b&&(w=b),n.style.left=`${w}px`,n.style.top=`${v}px`},N5=(e,n,r)=>{if(!e)return;const o=()=>{e&&(n(e),r&&r())};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}};function ir(e){const n=P.useRef(e);return P.useLayoutEffect(()=>{n.current=e},[e]),P.useCallback(((...r)=>n.current(...r)),[])}function D5(e){const n={};for(const r of Array.from(e.attributes)){const o=r.name==="class"?"className":r.name;n[o]=r.value}return n}var U5=()=>{const[e,n]=P.useState(!1),[r,o]=P.useState(null),[l,u]=P.useState(null),f=x=>x?{enabled:x.getAttribute("data-em-go-to-source-enabled")==="true",disabledReason:x.getAttribute("data-em-go-to-source-disabled-reason")}:{enabled:!1,disabledReason:null},h=(x,E,L)=>{x&&(x.setAttribute("data-em-go-to-source-enabled",String(E)),L?x.setAttribute("data-em-go-to-source-disabled-reason",L):x.removeAttribute("data-em-go-to-source-disabled-reason"))},p=x=>x?{enabled:x.getAttribute("data-em-ask-ai-enabled")==="true"}:{enabled:!1},m=(x,E)=>{x&&x.setAttribute("data-em-ask-ai-enabled",String(E))},[v,y]=P.useState({}),w=P.useCallback(x=>{v.mutation&&v.mutation.disconnect(),v.resize&&v.resize.disconnect(),v.clearPendingUpdate&&v.clearPendingUpdate();let E;const L=()=>{E!==void 0&&window.clearTimeout(E),E=window.setTimeout(()=>{Oo(x),Sl(x),E=void 0},16)},Q=new MutationObserver(L);Q.observe(x,{characterData:!0,childList:!0,subtree:!0});const ee=new ResizeObserver(L);ee.observe(x),y({mutation:Q,resize:ee,updateTimeout:E,clearPendingUpdate:()=>{E!==void 0&&(window.clearTimeout(E),E=void 0)}})},[v]),b=P.useCallback(()=>{v.mutation&&v.mutation.disconnect(),v.resize&&v.resize.disconnect(),v.clearPendingUpdate&&v.clearPendingUpdate(),y({})},[v]),C=x=>{i5(x),u(x),Oo(x)},O=(x,E=!0)=>{d5(x,E),u(null),Oo(x)},R=x=>({display:window.getComputedStyle(x).display,attributes:D5(x),element:Od(x),tagName:x.tagName.toLowerCase(),className:x.getAttribute("class"),id:x.getAttribute("id"),componentName:Vv(x),dataMacalyLoc:x.getAttribute("data-macaly-loc"),dataMacalyName:x.getAttribute("data-macaly-name"),src:x.getAttribute("src")||void 0}),z=x=>{Array.from(x.attributes).forEach(L=>{const Q=L.name.toLowerCase(),ee=`data-em-original-${Q}`;x.hasAttribute(ee)||Q==="contenteditable"||Q==="class"||Q.startsWith("data-macaly-")||Q.startsWith("data-em-")||x.setAttribute(ee,L.value)})},H=x=>{const E={text:!1,attributes:{}},L=x.getAttribute("data-em-original-text-elements");if(L)try{const J=JSON.parse(L),ae=Lo(x);E.text=!Zv(J,ae)}catch{E.text=!0}return Array.from(x.attributes).filter(J=>J.name.startsWith("data-em-original-")).forEach(J=>{const ae=J.name.replace("data-em-original-","");if(ae==="text-elements"||ae==="html"||ae==="contenteditable")return;const ve=J.value;let je;ae==="class"||ae==="classname"||ae==="className"?je=x.className||"":je=x.getAttribute(ae)||"",ae==="class"||ae==="classname"||ae==="className"?E.attributes.className=C5(ve,je):E.attributes[ae]=ve!==je}),E},$=x=>{const E={...x.attributes};return x.src!==void 0&&E.src===void 0&&(E.src=x.src),E},B=(x,E)=>
132{Object.entries(E).forEach(([L,Q])=>{x.getAttribute(L)!==Q&&!["className","class","contenteditable"].includes(L)&&(L in x||x.hasAttribute(L))&&x.setAttribute(L,Q)})},W=(x,E)=>{try{if(!x.hasAttribute("data-em-original-className")){const Q=x.className||"";x.setAttribute("data-em-original-className",Q)}x.className=E;const L=x.getAttribute("data-macaly-id");if(L){const Q=document.getElementById(`style-${L}`);Q&&document.head.removeChild(Q),x.removeAttribute("data-macaly-id")}}catch(L){console.warn("Failed to apply className changes:",L)}},te=P.useCallback(x=>{if(!r){V("No element is currently selected");return}if(xo(r)!==x.elementKey){V("Element key does not match selected element",x.elementKey);return}const L=Array.isArray(x.extractedElements);if(L){if(r.contentEditable!=="true"||r.getAttribute("data-em-original-contenteditable")==="true"){V("Selected element is not in inspector-controlled edit mode for text changes");return}const Q=Lo(r);if(!qy(Q)){V("Original element contains elements other than BR",x.elementKey);return}if(!qy(x.extractedElements)){V("New content contains elements other than BR",x.elementKey);return}}try{if(L){const ae=y5(x.extractedElements);r.innerHTML=ae,Qv(r)}const Q=x.attributes?.className??x.attributes?.class??x.className;Q!==void 0&&r.className!==Q&&W(r,Q);const ee=$(x);B(r,ee);const J=H(r);F(x.elementKey,J)}catch(Q){V(`Failed to apply changes: ${Q instanceof Error?Q.message:String(Q)}`,x.elementKey)}},[r]),V=(x,E)=>{const L={error:x};E&&(L.elementKey=E),window.parent.postMessage({type:"ELEMENT_CHANGE_ERROR",version:Lt,content:L},"*")},F=(x,E)=>{const L={elementKey:x,changes:E};window.parent.postMessage({type:"ELEMENT_CHANGE_SUCCESS",version:Lt,content:L},"*")},ne=x=>{x.contentEditable==="true"&&x.getAttribute("data-em-original-contenteditable")!==null&&O(x,!0);const E=x.hasAttribute("data-em-selected");if(x.removeAttribute("data-em-selected"),E){Yv(),ld(),Kv(),b();const L=R(x);window.parent.postMessage({type:"ELEMENT_DESELECTED",version:Lt,content:L},"*")}},fe=P.useCallback(()=>{r&&ne(r),document.querySelectorAll('[data-em-selected="true"]').forEach(E=>{ne(E)}),o(null)},[r,b]),se=P.useCallback(x=>{const E=R(x);x.setAttribute("data-em-selected","true"),r!==x&&(r&&ne(r),h(x,!1,null),m(x,!1)),z(x),o(x);let L={...E,isTextEditable:!1};if(sd(x)){const ve=Lo(x);L.extractedElements=ve,L.isTextEditable=!0,C(x)}const Q=x.parentElement!==null&&x.parentElement!==document.body&&x.parentElement!==document.documentElement,ee=le(x),J=f(x),ae=p(x);Py(x,ue,U,Q,$e,xe,ee.hasPrevious,ee.hasNext,Z,J.enabled,J.disabledReason),Sl(x),ae.enabled&&($y(x,re),Pf(x)),Oo(x),w(x),window.parent.postMessage({type:"ELEMENT_SELECTED",version:Lt,content:L},"*")},[r,C,w]),le=x=>{if(!x.parentElement)return{hasPrevious:!1,hasNext:!1};const E=Array.from(x.parentElement.children).filter(Q=>Q instanceof HTMLElement),L=E.indexOf(x);return{hasPrevious:L>0,hasNext:L<E.length-1}},$e=ir(()=>{if(!r||!r.parentElement)return;const x=Array.from(r.parentElement.children).filter(L=>L instanceof HTMLElement),E=x.indexOf(r);if(E>0){const L=x[E-1];se(L)}}),xe=ir(()=>{if(!r||!r.parentElement)return;const x=Array.from(r.parentElement.children).filter(L=>L instanceof HTMLElement),E=x.indexOf(r);if(E<x.length-1){const L=x[E+1];se(L)}}),ue=ir(()=>{if(!r||!r.parentElement)return;const x=r.parentElement;x&&se(x)}),U=ir(()=>{if(!r)return;const x=xo(r);window.parent.postMessage({type:"ELEMENT_DELETE_REQUEST",version:Lt,content:{elementKe
132y:x}},"*")}),Z=ir(()=>{if(!r)return;const x=xo(r),E=r.getAttribute("data-macaly-loc");window.parent.postMessage({type:"GO_TO_SOURCE_REQUEST",version:Lt,content:{elementKey:x,dataMacalyLoc:E}},"*")}),re=ir(()=>{if(!r)return;const x=xo(r),E=r.getAttribute("data-macaly-loc");window.parent.postMessage({type:"ASK_AI_REQUEST",version:Lt,content:{elementKey:x,dataMacalyLoc:E}},"*")}),he=ir(x=>{const E=["https://macaly.com","https://www.macaly.com","https://macaly.vercel.app","http://localhost:3000"];if(["INJECT_SCRIPT","OVERRIDE_STYLES","ELEMENT_CHANGE"].includes(x.data.type)){const Q=x.origin;if(!(E.some(J=>Q===J)||Q.endsWith(".macaly.com")||Q.startsWith("https://macaly-")&&Q.endsWith("-langtail.vercel.app"))){console.warn(`Blocked ${x.data.type} from unauthorized origin: ${x.origin}`);return}}if(x.data.type==="ENABLE_EDIT_MODE"){R5(),_5(x.data.tailwindVersion),Fv(),Jv(),n(!0);const Q=KE();window.parent.postMessage({type:"CURRENT_THEME",version:Lt,theme:Q},"*")}else if(x.data.type==="DISABLE_EDIT_MODE")n(!1),fe(),A5(),ci(),E5(),z5(),L5();else if(x.data.type==="DESELECT_ELEMENT")fe();else if(x.data.type==="RESET_EDIT_MODE")fe();else if(x.data.type==="SELECT_PARENT")ue();else if(x.data.type==="ELEMENT_CHANGE")te(x.data.content);else if(x.data.type==="OVERRIDE_STYLES")M5(x.data.css||"",x.data.styleType);else if(x.data.type==="INJECT_SCRIPT")k5(x.data.content||"");else if(x.data.type==="SET_THEME")(x.data.theme==="light"||x.data.theme==="dark")&&FE(x.data.theme);else if(x.data.type==="GO_TO_SOURCE_STATE"){if(r){h(r,x.data.enabled??!1,x.data.disabledReason??null);const Q=r.parentElement!==null&&r.parentElement!==document.body&&r.parentElement!==document.documentElement,ee=le(r),J=f(r);Py(r,ue,U,Q,$e,xe,ee.hasPrevious,ee.hasNext,Z,J.enabled,J.disabledReason),Sl(r)}}else x.data.type==="ASK_AI_STATE"&&r&&(m(r,x.data.enabled??!1),p(r).enabled?($y(r,re),Pf(r)):ld())});return P.useEffect(()=>(window.addEventListener("message",he),window.parent!==window&&(window.parent.postMessage({type:"EDIT_MODE_AVAILABLE",version:Lt},"*"),window.parent.postMessage({type:"EDIT_MODE_AVAILABLE",version:Lt},"*")),()=>{window.removeEventListener("message",he),window.parent!==window&&(window.parent.postMessage({type:"EDIT_MODE_UNAVAILABLE",version:Lt},"*"),window.parent.postMessage({type:"EDIT_MODE_UNAVAILABLE",version:Lt},"*"))}),[he]),P.useEffect(()=>{if(!e)return;const x=J=>{if(e){if(J.type==="mousedown"){const ae=J.target;if(ae&&sd(ae)&&l!==ae){C(ae);return}}l||(J.preventDefault(),J.stopPropagation())}},E=J=>{if(e){if(J.key==="Escape"){J.preventDefault(),J.stopPropagation(),fe();return}h5(J,l)}},L=J=>{if(!e)return;const ae=J.target;ae.closest("#macaly-internal-info-badge")||ae.closest("#macaly-internal-ai-badge")||(J.preventDefault(),J.stopPropagation(),Q(ae))},Q=J=>{se(J)},ee=J=>{if(!e)return;const ae=J.target;if(ae.closest("#macaly-internal-info-badge")||ae.closest("#macaly-internal-ai-badge")){ci();return}if(l&&ae===l){ci();return}ae&&ae!==document.body&&ae!==document.documentElement?O5(ae):ci()};return document.addEventListener("click",L,{capture:!0}),document.addEventListener("mousemove",ee,{capture:!0}),document.addEventListener("mousedown",x,{capture:!0}),document.addEventListener("mouseup",x,{capture:!0}),document.addEventListener("submit",x,{capture:!0}),document.addEventListener("keydown",E,{capture:!0}),document.addEventListener("keydown",x,{capture:!0}),document.addEventListener("keyup",x,{capture:!0}),document.addEventListener("keypress",x,{capture:!0}),()=>{document.removeEventListener("click",L,{capture:!0}),document.removeEventListener("mousemove",ee,{capture:!0}),document.removeEventListener("mousedown",x,{capture:!0}),document.removeEventListener("mouseup",x,{capture:!0}),document.removeEventListener("submit",x,{capture:!0}),document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("keyup",x,{capture:!0}),document.removeEventListener("keypress",x,{capture:!0}),ci()}},[e,r,l]),P.useEffect(()=>r?N5(r,E=>{Sl(E),document.getElementById("macaly-internal-ai-badge")&&Pf(E)},x5):void 0,[r]),{enabled:e,toggleEditMode:()=>n(!e),editingElement:l}};function B5({children:e}){return U5(),e}function Wv(e){return e==="localhost"||e==="127.0.0.1"||e==="[::1]"}function Vy(e){return!!(Wv(e)||e==="macaly.com"||e.endsWith(".macaly.com")||/^macaly(-[^.]+)?\.vercel\.app$/.test(e))}function j5(e){return!!(Wv(e)||e==="macaly.dev"||e.endsWith(".macaly.dev")||e==="macaly-user-data.dev"||e.endsWith(".macaly-user-data.dev"))}function Zy(e,n){if(e==="file://")return!0;
132try{const r=new URL(e);return n(r.hostname)}catch{return!1}}function q5(){return window.location.protocol==="file:"?!0:j5(window.location.hostname)}function H5(){const e=window.location.ancestorOrigins;return e&&e.length>0?Zy(e[0],Vy):document.referrer?Zy(document.referrer,Vy):!1}function P5(){return typeof window>"u"||window.parent===window||!q5()?!1:H5()}var $5=({children:e})=>{const[n,r]=P.useState(!1);return P.useEffect(()=>{P5()&&r(!0)},[]),n?X.jsx(V5,{children:e}):X.jsx(X.Fragment,{children:e})},V5=({children:e})=>(jE(),$E(),VE(),IE(),qE(),HE(),X.jsx(ZE,{children:X.jsx(B5,{children:e})}));const or="1.41.0";var Tn=[],sn=[],Z5=Uint8Array,$f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var li=0,I5=$f.length;li<I5;++li)Tn[li]=$f[li],sn[$f.charCodeAt(li)]=li;sn[45]=62;sn[95]=63;function Q5(e){var n=e.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=n);var o=r===n?0:4-r%4;return[r,o]}function G5(e,n,r){return(n+r)*3/4-r}function Po(e){var n,r=Q5(e),o=r[0],l=r[1],u=new Z5(G5(e,o,l)),f=0,h=l>0?o-4:o,p;for(p=0;p<h;p+=4)n=sn[e.charCodeAt(p)]<<18|sn[e.charCodeAt(p+1)]<<12|sn[e.charCodeAt(p+2)]<<6|sn[e.charCodeAt(p+3)],u[f++]=n>>16&255,u[f++]=n>>8&255,u[f++]=n&255;return l===2&&(n=sn[e.charCodeAt(p)]<<2|sn[e.charCodeAt(p+1)]>>4,u[f++]=n&255),l===1&&(n=sn[e.charCodeAt(p)]<<10|sn[e.charCodeAt(p+1)]<<4|sn[e.charCodeAt(p+2)]>>2,u[f++]=n>>8&255,u[f++]=n&255),u}function Y5(e){return Tn[e>>18&63]+Tn[e>>12&63]+Tn[e>>6&63]+Tn[e&63]}function X5(e,n,r){for(var o,l=[],u=n;u<r;u+=3)o=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(e[u+2]&255),l.push(Y5(o));return l.join("")}function $o(e){for(var n,r=e.length,o=r%3,l=[],u=16383,f=0,h=r-o;f<h;f+=u)l.push(X5(e,f,f+u>h?h:f+u));return o===1?(n=e[r-1],l.push(Tn[n>>2]+Tn[n<<4&63]+"==")):o===2&&(n=(e[r-2]<<8)+e[r-1],l.push(Tn[n>>10]+Tn[n>>4&63]+Tn[n<<2&63]+"=")),l.join("")}function Dt(e){if(e===void 0)return{};if(!e0(e))throw new Error(`The arguments to a Convex function must be an object. Received: ${e}`);return e}function Md(e){if(typeof e>"u")throw new Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");if(typeof e!="string")throw new Error(`Invalid deployment address: found ${e}".`);if(!(e.startsWith("http:")||e.startsWith("https:")))throw new Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);try{new URL(e)}catch{throw new Error(`Invalid deployment address: "${e}" is not a valid URL. If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}if(e.endsWith(".convex.site"))throw new Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}function e0(e){const n=typeof e=="object",r=Object.getPrototypeOf(e),o=r===null||r===Object.prototype||r?.constructor?.name==="Object";return n&&o}const t0=!0,Si=BigInt("-9223372036854775808"),zd=BigInt("9223372036854775807"),ud=BigInt("0"),K5=BigInt("8"),F5=BigInt("256");function n0(e){return Number.isNaN(e)||!Number.isFinite(e)||Object.is(e,-0)}function J5(e){e<ud&&(e-=Si+Si);let n=e.toString(16);n.length%2===1&&(n="0"+n);const r=new Uint8Array(new ArrayBuffer(8));let o=0;for(const l of n.match(/.{2}/g).reverse())r.set([parseInt(l,16)],o++),e>>=K5;return $o(r)}function W5(e){const n=Po(e);if(n.byteLength!==8)throw new Error(`Received ${n.byteLength} bytes, expected 8 for $integer`);let r=ud,o=ud;for(const l of n)r+=BigInt(l)*F5**o,o++;return r>zd&&(r+=Si+Si),r}function eC(e){if(e<Si||zd<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);const n=new ArrayBuffer(8);return new DataView(n).setBigInt64(0,e,!0),$o(new Uint8Array(n))}function tC(e){const n=Po(e);if(n.byteLength!==8)throw new Error(`Received ${n.byteLength} bytes, expected 8 for $integer`);return new DataView(n.buffer).getBigInt64(0,!0)}const nC=DataView.prototype.setBigInt64?eC:J5,aC=DataView.prototype.getBigInt64?tC:W5,Iy=1024;function a0(e){if(e.length>Iy)throw new Error(`Field name ${e} exceeds maximum field name length ${Iy}.`);if(e.startsWith("$"))throw new Error(`Field name ${e} starts with a '$', which is reserved.`);for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);if(r<32||r>=127)throw new Error(`Field name ${e}
132 has invalid character '${e[n]}': Field names can only contain non-control ASCII characters`)}}function pn(e){if(e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(Array.isArray(e))return e.map(o=>pn(o));if(typeof e!="object")throw new Error(`Unexpected type of ${e}`);const n=Object.entries(e);if(n.length===1){const o=n[0][0];if(o==="$bytes"){if(typeof e.$bytes!="string")throw new Error(`Malformed $bytes field on ${e}`);return Po(e.$bytes).buffer}if(o==="$integer"){if(typeof e.$integer!="string")throw new Error(`Malformed $integer field on ${e}`);return aC(e.$integer)}if(o==="$float"){if(typeof e.$float!="string")throw new Error(`Malformed $float field on ${e}`);const l=Po(e.$float);if(l.byteLength!==8)throw new Error(`Received ${l.byteLength} bytes, expected 8 for $float`);const f=new DataView(l.buffer).getFloat64(0,t0);if(!n0(f))throw new Error(`Float ${f} should be encoded as a number`);return f}if(o==="$set")throw new Error("Received a Set which is no longer supported as a Convex type.");if(o==="$map")throw new Error("Received a Map which is no longer supported as a Convex type.")}const r={};for(const[o,l]of Object.entries(e))a0(o),r[o]=pn(l);return r}const Qy=16384;function No(e){const n=JSON.stringify(e,(r,o)=>o===void 0?"undefined":typeof o=="bigint"?`${o.toString()}n`:o);if(n.length>Qy){const r="[...truncated]";let o=Qy-r.length;const l=n.codePointAt(o-1);return l!==void 0&&l>65535&&(o-=1),n.substring(0,o)+r}return n}function cd(e,n,r,o){if(e===void 0){const f=r&&` (present at path ${r} in original object ${No(n)})`;throw new Error(`undefined is not a valid Convex value${f}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(e===null)return e;if(typeof e=="bigint"){if(e<Si||zd<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);return{$integer:nC(e)}}if(typeof e=="number")if(n0(e)){const f=new ArrayBuffer(8);return new DataView(f).setFloat64(0,e,t0),{$float:$o(new Uint8Array(f))}}else return e;if(typeof e=="boolean"||typeof e=="string")return e;if(e instanceof ArrayBuffer)return{$bytes:$o(new Uint8Array(e))};if(Array.isArray(e))return e.map((f,h)=>cd(f,n,r+`[${h}]`));if(e instanceof Set)throw new Error(Vf(r,"Set",[...e],n));if(e instanceof Map)throw new Error(Vf(r,"Map",[...e],n));if(!e0(e)){const f=e?.constructor?.name,h=f?`${f} `:"";throw new Error(Vf(r,h,e,n))}const l={},u=Object.entries(e);u.sort(([f,h],[p,m])=>f===p?0:f<p?-1:1);for(const[f,h]of u)h!==void 0&&(a0(f),l[f]=cd(h,n,r+`.${f}`));return l}function Vf(e,n,r,o){return e?`${n}${No(r)} is not a supported Convex type (present at path ${e} in original object ${No(o)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${n}${No(r)} is not a supported Convex type.`}function Et(e){return cd(e,e,"")}var rC=Object.defineProperty,iC=(e,n,r)=>n in e?rC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Zf=(e,n,r)=>iC(e,typeof n!="symbol"?n+"":n,r),Gy,Yy;const oC=Symbol.for("ConvexError");class cr extends(Yy=Error,Gy=oC,Yy){constructor(n){super(typeof n=="string"?n:No(n)),Zf(this,"name","ConvexError"),Zf(this,"data"),Zf(this,Gy,!0),this.data=n}}const r0=()=>Array.from({length:4},()=>0);r0();r0();var sC=Object.defineProperty,lC=(e,n,r)=>n in e?sC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Xy=(e,n,r)=>lC(e,typeof n!="symbol"?n+"":n,r);const uC="color:rgb(0, 145, 255)";function i0(e){switch(e){case"query":return"Q";case"mutation":return"M";case"action":return"A";case"any":return"?"}}class o0{constructor(n){Xy(this,"_onLogLineFuncs"),Xy(this,"_verbose"),this._onLogLineFuncs={},this._verbose=n.verbose}addLogLineListener(n){let r=Math.random().toString(36).substring(2,15);for(let o=0;o<10&&this._onLogLineFuncs[r]!==void 0;o++)r=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[r]=n,()=>{delete this._onLogLineFuncs[r]}}logVerbose(...n){if(this._verbose)for(const r of Object.values(this._onLogLineFuncs))r("debug",`${new Date().toISOString()}`,...n)}log(...n){for(const r of Object.values(this._onLogLineFuncs))r("info",...n)}warn(...n){for(const r of Object.values(this._onLogLineFuncs))r("warn",...n)}error(...n){for(const r of Object.values(this._onLogLineFuncs))r("error",...n)}}function kd(e){const n=new o0(e);return n.addLogLineListener((r,...o)=>{switch(r){case"debug":console.debug(...o);break;case"info":console.log(...o);break;case"warn":console.warn(...o);break;case"error":console.error(...o);break;default:console.log(...o)}}),n}function Ld(e){return new o0(e)}function ka(e,n,r,o,l){const u=i0(r);if(typeof l=="object"&&(l=`ConvexError ${JSON.stringify(l.errorData,null,2)}`),n==="info"){const f=l.match(/^\[.*?\] /);if(f===null){e.error(`[CONVEX ${u}(${o})] Could not parse console.log`);return}const h=l.slice(1,f[0].length-2),p=l.slice(f[0].length);e.log(`%c[CONVEX ${u}(${o})] [${h}]`,uC,p)}else e.error(`[CONVEX ${u}(${o})] ${l}`)}function cC(e,n){const r=`[CONVEX FATAL ERROR] ${n}`;return e.error(r),new Error(r)}function hi(e,n,r){return`[CONVEX ${i0(e)}(${n})] ${r.errorMessage}
133  Called by client`}function fd(e,n){return n.data=e.errorData,n}function mr(e){const n=e.split(":");let r,o;return n.length===1?(r=n[0],o="default"):(r=n.slice(0,n.length-1).join(":"),o=n[n.length-1]),r.endsWith(".js")&&(r=r.slice(0,-3)),`${r}:${o}`}function hr(e,n){return JSON.stringify({udfPath:mr(e),args:Et(n)})}function Ky(e,n,r){const{initialNumItems:o,id:l}=r;return JSON.stringify({type:"paginated",udfPath:mr(e),args:Et(n),options:Et({initialNumItems:o,id:l})})}var fC=Object.defineProperty,dC=(e,n,r)=>n in e?fC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,wn=(e,n,r)=>dC(e,typeof n!="symbol"?n+"":n,r);class hC{constructor(){wn(this,"nextQueryId"),wn(this,"querySetVersion"),wn(this,"querySet"),wn(this,"queryIdToToken"),wn(this,"identityVersion"),wn(this,"auth"),wn(this,"outstandingQueriesOlderThanRestart"),wn(this,"outstandingAuthOlderThanRestart"),wn(this,"paused"),wn(this,"pendingQuerySetModifications"),this.nextQueryId=0,this.querySetVersion=0,this.identityVersion=0,this.querySet=new Map,this.queryIdToToken=new Map,this.outstandingQueriesOlderThanRestart=new Set,this.outstandingAuthOlderThanRestart=!1,this.paused=!1,this.pendingQuerySetModifications=new Map}hasSyncedPastLastReconnect(){return this.outstandingQueriesOlderThanRestart.size===0&&!this.outstandingAuthOlderThanRestart}markAuthCompletion(){this.outstandingAuthOlderThanRestart=!1}subscribe(n,r,o,l){const u=mr(n),f=hr(u,r),h=this.querySet.get(f);if(h!==void 0)return h.numSubscribers+=1,{queryToken:f,modification:null,unsubscribe:()=>this.removeSubscriber(f)};{const p=this.nextQueryId++,m={id:p,canonicalizedUdfPath:u,args:r,numSubscribers:1,journal:o,componentPath:l};this.querySet.set(f,m),this.queryIdToToken.set(p,f);const v=this.querySetVersion,y=this.querySetVersion+1,w={type:"Add",queryId:p,udfPath:u,args:[Et(r)],journal:o,componentPath:l};return this.paused?this.pendingQuerySetModifications.set(p,w):this.querySetVersion=y,{queryToken:f,modification:{type:"ModifyQuerySet",baseVersion:v,newVersion:y,modifications:[w]},unsubscribe:()=>this.removeSubscriber(f)}}}transition(n){for(const r of n.modifications)switch(r.type){case"QueryUpdated":case"QueryFailed":{this.outstandingQueriesOlderThanRestart.delete(r.queryId);const o=r.journal;if(o!==void 0){const l=this.queryIdToToken.get(r.queryId);l!==void 0&&(this.querySet.get(l).journal=o)}break}case"QueryRemoved":{this.outstandingQueriesOlderThanRestart.delete(r.queryId);break}default:throw new Error(`Invalid modification ${r.type}`)}}queryId(n,r){const o=mr(n),l=hr(o,r),u=this.querySet.get(l);
133return u!==void 0?u.id:null}isCurrentOrNewerAuthVersion(n){return n>=this.identityVersion}getAuth(){return this.auth}setAuth(n){this.auth={tokenType:"User",value:n};const r=this.identityVersion;return this.paused||(this.identityVersion=r+1),{type:"Authenticate",baseVersion:r,...this.auth}}setAdminAuth(n,r){const o={tokenType:"Admin",value:n,impersonating:r};this.auth=o;const l=this.identityVersion;return this.paused||(this.identityVersion=l+1),{type:"Authenticate",baseVersion:l,...o}}clearAuth(){this.auth=void 0,this.markAuthCompletion();const n=this.identityVersion;return this.paused||(this.identityVersion=n+1),{type:"Authenticate",tokenType:"None",baseVersion:n}}hasAuth(){return!!this.auth}isNewAuth(n){return this.auth?.value!==n}queryPath(n){const r=this.queryIdToToken.get(n);return r?this.querySet.get(r).canonicalizedUdfPath:null}queryArgs(n){const r=this.queryIdToToken.get(n);return r?this.querySet.get(r).args:null}queryToken(n){return this.queryIdToToken.get(n)??null}queryJournal(n){return this.querySet.get(n)?.journal}restart(){this.unpause(),this.outstandingQueriesOlderThanRestart.clear();const n=[];for(const l of this.querySet.values()){const u={type:"Add",queryId:l.id,udfPath:l.canonicalizedUdfPath,args:[Et(l.args)],journal:l.journal,componentPath:l.componentPath};n.push(u),this.outstandingQueriesOlderThanRestart.add(l.id)}this.querySetVersion=1;const r={type:"ModifyQuerySet",baseVersion:0,newVersion:1,modifications:n};if(!this.auth)return this.identityVersion=0,[r,void 0];this.outstandingAuthOlderThanRestart=!0;const o={type:"Authenticate",baseVersion:0,...this.auth};return this.identityVersion=1,[r,o]}pause(){this.paused=!0}resume(){const n=this.pendingQuerySetModifications.size>0?{type:"ModifyQuerySet",baseVersion:this.querySetVersion,newVersion:++this.querySetVersion,modifications:Array.from(this.pendingQuerySetModifications.values())}:void 0,r=this.auth!==void 0?{type:"Authenticate",baseVersion:this.identityVersion++,...this.auth}:void 0;return this.unpause(),[n,r]}unpause(){this.paused=!1,this.pendingQuerySetModifications.clear()}removeSubscriber(n){const r=this.querySet.get(n);if(r.numSubscribers>1)return r.numSubscribers-=1,null;{this.querySet.delete(n),this.queryIdToToken.delete(r.id),this.outstandingQueriesOlderThanRestart.delete(r.id);const o=this.querySetVersion,l=this.querySetVersion+1,u={type:"Remove",queryId:r.id};return this.paused?this.pendingQuerySetModifications.has(r.id)?this.pendingQuerySetModifications.delete(r.id):this.pendingQuerySetModifications.set(r.id,u):this.querySetVersion=l,{type:"ModifyQuerySet",baseVersion:o,newVersion:l,modifications:[u]}}}}var pC=Object.defineProperty,mC=(e,n,r)=>n in e?pC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,wl=(e,n,r)=>mC(e,typeof n!="symbol"?n+"":n,r);class gC{constructor(n,r){this.logger=n,this.markConnectionStateDirty=r,wl(this,"inflightRequests"),wl(this,"requestsOlderThanRestart"),wl(this,"inflightMutationsCount",0),wl(this,"inflightActionsCount",0),this.inflightRequests=new Map,this.requestsOlderThanRestart=new Set}request(n,r){const o=new Promise(l=>{const u=r?"Requested":"NotSent";this.inflightRequests.set(n.requestId,{message:n,status:{status:u,requestedAt:new Date,onResult:l}}),n.type==="Mutation"?this.inflightMutationsCount++:n.type==="Action"&&this.inflightActionsCount++});return this.markConnectionStateDirty(),o}onResponse(n){const r=this.inflightRequests.get(n.requestId);if(r===void 0||r.status.status==="Completed")return null;const o=r.message.type==="Mutation"?"mutation":"action",l=r.message.udfPath;for(const p of n.logLines)ka(this.logger,"info",o,l,p);const u=r.status;let f,h;if(n.success)f={success:!0,logLines:n.logLines,value:pn(n.result)},h=()=>u.onResult(f);else{const p=n.result,{errorData:m}=n;ka(this.logger,"error",o,l,p),f={success:!1,errorMessage:p,errorData:m!==void 0?pn(m):void 0,logLines:n.logLines},h=()=>u.onResult(f)}return n.type==="ActionResponse"||!n.success?(h(),this.inflightRequests.delete(n.requestId),this.requestsOlderThanRestart.delete(n.requestId),r.message.type==="Action"?this.inflightActionsCount--:r.message.type==="Mutation"&&this.inflightMutationsCount--,this.markConnectionStateDirty(),{requestId:n.requestId,result:f}
133):(r.status={status:"Completed",result:f,ts:n.ts,onResolve:h},null)}removeCompleted(n){const r=new Map;for(const[o,l]of this.inflightRequests.entries()){const u=l.status;u.status==="Completed"&&u.ts.lessThanOrEqual(n)&&(u.onResolve(),r.set(o,u.result),l.message.type==="Mutation"?this.inflightMutationsCount--:l.message.type==="Action"&&this.inflightActionsCount--,this.inflightRequests.delete(o),this.requestsOlderThanRestart.delete(o))}return r.size>0&&this.markConnectionStateDirty(),r}restart(){this.requestsOlderThanRestart=new Set(this.inflightRequests.keys());const n=[];for(const[r,o]of this.inflightRequests){if(o.status.status==="NotSent"){o.status.status="Requested",n.push(o.message);continue}if(o.message.type==="Mutation")n.push(o.message);else if(o.message.type==="Action"){if(this.inflightRequests.delete(r),this.requestsOlderThanRestart.delete(r),this.inflightActionsCount--,o.status.status==="Completed")throw new Error("Action should never be in 'Completed' state");o.status.onResult({success:!1,errorMessage:"Connection lost while action was in flight",logLines:[]})}}return this.markConnectionStateDirty(),n}resume(){const n=[];for(const[,r]of this.inflightRequests)if(r.status.status==="NotSent"){r.status.status="Requested",n.push(r.message);continue}return n}hasIncompleteRequests(){for(const n of this.inflightRequests.values())if(n.status.status==="Requested")return!0;return!1}hasInflightRequests(){return this.inflightRequests.size>0}hasSyncedPastLastReconnect(){return this.requestsOlderThanRestart.size===0}timeOfOldestInflightRequest(){if(this.inflightRequests.size===0)return null;let n=Date.now();for(const r of this.inflightRequests.values())r.status.status!=="Completed"&&r.status.requestedAt.getTime()<n&&(n=r.status.requestedAt.getTime());return new Date(n)}inflightMutations(){return this.inflightMutationsCount}inflightActions(){return this.inflightActionsCount}}const Vo=Symbol.for("functionName"),s0=Symbol.for("toReferencePath");function yC(e){return e[s0]??null}function vC(e){return e.startsWith("function://")}function bC(e){let n;if(typeof e=="string")vC(e)?n={functionHandle:e}:n={name:e};else if(e[Vo])n={name:e[Vo]};else{const r=yC(e);if(!r)throw new Error(`${e} is not a functionReference`);n={reference:r}}return n}function rt(e){const n=bC(e);if(n.name===void 0)throw n.functionHandle!==void 0?new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${n.functionHandle}`):n.reference!==void 0?new Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${n.reference}`):new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(n)}`);if(typeof e=="string")return e;const r=e[Vo];if(!r)throw new Error(`${e} is not a functionReference`);return r}function Nd(e){return{[Vo]:e}}function l0(e=[]){const n={get(r,o){if(typeof o=="string"){const l=[...e,o];return l0(l)}else if(o===Vo){if(e.length<2){const f=["api",...e].join(".");throw new Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${f}\``)}const l=e.slice(0,-1).join("/"),u=e[e.length-1];return u==="default"?l:l+":"+u}else return o===Symbol.toStringTag?"FunctionReference":void 0}};return new Proxy({},n)}const SC=l0();var wC=Object.defineProperty,_C=(e,n,r)=>n in e?wC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Zl=(e,n,r)=>_C(e,typeof n!="symbol"?n+"":n,r);class Zo{constructor(n){Zl(this,"queryResults"),Zl(this,"modifiedQueries"),this.queryResults=n,this.modifiedQueries=[]}getQuery(n,...r){const o=Dt(r[0]),l=rt(n),u=this.queryResults.get(hr(l,o));if(u!==void 0)return Zo.queryValue(u.result)}getAllQueries(n){const r=[],o=rt(n);for(const l of this.queryResults.values())l.udfPath===mr(o)&&r.push({args:l.args,value:Zo.queryValue(l.result)});return r}setQuery(n,r,o){const l=Dt(r),u=rt(n),f=hr(u,l);let h;o===void 0?h=void 0:h={success:!0,value:o,logLines:[]};const p={udfPath:u,args:l,result:h};this.queryResults.set(f,p),this.modifiedQueries.push(f)}static queryValue(n){if(n!==void 0)return n.success?n.value:void 0}}class EC{constructor(){Zl(this,"queryResults"),Zl(this,"optimisticUpdates"),this.queryResults=new Map,this.optimisticUpdates=[]}ingestQueryResultsFromServer(n,r){this.optimisticUpdates=this.optimisticUpdates.filter(f=>!r.has(f.mutationId));const o=this.queryResults;this.queryResults=new Map(n);const l=new Zo(this.queryResults);for(const f of this.optimisticUpdates)f.update(l);const u=[];for(const[f,h]of this.queryResults){const p=o.get(f);(p===void 0||p.result!==h.result)&&u.push(f)}return u}applyOptimisticUpdate(n,r){this.optimisticUpdates.push({update:n,mutationId:r});const o=new Zo(this.queryResults);return n(o),o.modifiedQueries}rawQueryResult(n){const r=this.queryResults.get(n);if(r!==void 0)return r.result}queryResult(n){const r=this.queryResults.get(n);if(r===void 0)return;const o=r.result;if(o!==void 0){if(o.success)return o.value;throw o.errorData!==void 0?fd(o,new cr(hi("query",r.udfPath,o))):new Error(hi("query",r.udfPath,o))}}hasQueryResult(n){return this.queryResults.get(n)!==void 0}queryLogs(n){return this.queryResults.get(n)?.result?.logLines}}var CC=Object.defineProperty,TC=(e,n,r)=>n in e?CC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,If=(e,n,r)=>TC(e,typeof n!="symbol"?n+"":n,r);class Nt{constructor(n,r){If(this,"low"),If(this,"high"),If(this,"__isUnsignedLong__"),this.low=n|0,this.high=r|0,this.__isUnsignedLong__=!0}static isLong(n){return(n&&n.__isUnsignedLong__)===!0}static fromBytesLE(n){return new Nt(n[0]|n[1]<<8|n[2]<<16|n[3]<<24,n[4]|n[5]<<8|n[6]<<16|n[7]<<24)}toBytesLE(){const n=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,n&255,n>>>8&255,n>>>16&255,n>>>24]}static fromNumber(n){return isNaN(n)||n<0?Fy:n>=RC?AC:new Nt(n%Do|0,n/Do|0)}toString(){return(BigInt(this.high)*BigInt(Do)+BigInt(this.low)).toString()}equals(n){return Nt.isLong(n)||(n=Nt.fromValue(n)),this.high>>>31===1&&n.high>>>31===1?!1:this.high===n.high&&this.low===n.low}notEquals(n){return!this.equals(n)}comp(n){return Nt.isLong(n)||(n=Nt.fromValue(n)),this.equals(n)?0:n.high>>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1}lessThanOrEqual(n){return this.comp(n)<=0}static fromValue(n){return typeof n=="number"?Nt.fromNumber(n):new Nt(n.low,n.high)}}const Fy=new Nt(0,0),Jy=65536,Do=Jy*Jy,RC=Do*Do,AC=new Nt(-1,-1);var xC=Object.defineProperty,OC=(e,n,r)=>n in e?xC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,_l=(e,n,r)=>OC(e,typeof n!="symbol"?n+"":n,r);class Wy{constructor(n,r){_l(this,"version"),_l(this,"remoteQuerySet"),_l(this,"queryPath"),_l(this,"logger"),this.version={querySet:0,ts:Nt.fromNumber(0),identity:0},this.remoteQuerySet=new Map,this.queryPath=n,this.logger=r}transition(n){const r=n.startVersion;if(this.version.querySet!==r.querySet||this.version.ts.notEquals(r.ts)||this.version.identity!==r.identity)throw new Error(`Invalid start version: ${r.ts.toString()}:${r.querySet}:${r.identity}, transitioning from ${this.version.ts.toString()}:${this.version.querySet}:${this.version.identity}`);for(const o of n.modifications)switch(o.type){case"QueryUpdated":{const l=this.queryPath(o.queryId);if(l)for(const f of o.logLines)ka(this.logger,"info","query",l,f);const u=pn(o.value??null);this.remoteQuerySet.set(o.queryId,{success:!0,value:u,logLines:o.logLines});break}case"QueryFailed":{const l=this.queryPath(o.queryId);if(l)for(const f of o.logLines)ka(this.logger,"info","query",l,f);const{errorData:u}=o;this.remoteQuerySet.set(o.queryId,{success:!1,errorMessage:o.errorMessage,errorData:u!==void 0?pn(u):void 0,logLines:o.logLines});break}case"QueryRemoved":{this.remoteQuerySet.delete(o.queryId);break}default:throw new Error(`Invalid modification ${o.type}`)}this.version=n.endVersion}remoteQueryResults(){return this.remoteQuerySet}timestamp(){return this.version.ts}}function Qf(e){const n=Po(e);return Nt.fromBytesLE(Array.from(n))}function MC(e){const n=new Uint8Array(e.toBytesLE());return $o(n)}function e1(e){switch(e.type){case"FatalError":case"AuthError":case"ActionResponse":case"TransitionChunk":case"Ping":return{...e};case"MutationResponse":return e.success?{...e,ts:Qf(e.ts)}:{...e};case"Transition":return{...e,startVersion:{...e.startVersion,ts:Qf(e.startVersion.ts)},endVersion:{...e.endVersion,ts:Qf(e.endVersion.ts)}}}}function zC(e){switch(e.type){case"Authenticate":case"ModifyQuerySet":case"Mutation":case"Action":case"Event":return{...e};case"Connect":return e.maxObservedTimestamp!==void 0?{...e,maxObservedTimestamp:MC(e.maxObservedTimestamp)}:{...e,maxObservedTimestamp:void 0}}}var kC=Object.defineProperty,LC=(e,n,r)=>n in e?kC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,tt=(e,n,r)=>LC(e,typeof n!="symbol"?n+"":n,r);const NC=1e3,DC=1001,UC=1005,BC=4040;let Ul;function fi(){return Ul===void 0&&(Ul=Date.now()),typeof performance>"u"||!performance.now?Date.now():Math.round(Ul+performance.now())}function t1(){return`t=${Math.round((fi()-Ul)/100)/10}s`}const u0={InternalServerError:{timeout:1e3},SubscriptionsWorkerFullError:{timeout:3e3},TooManyConcurrentRequests:{timeout:3e3},CommitterFullError:{timeout:3e3},AwsTooManyRequestsException:{timeout:3e3},ExecuteFullError:{timeout:3e3},SystemTimeoutError:{timeout:3e3},ExpiredInQueue:{timeout:3e3},VectorIndexesUnavailable:{timeout:1e3},SearchIndexesUnavailable:{timeout:1e3},TableSummariesUnavailable:{timeout:1e3},VectorIndexTooLarge:{timeout:3e3},SearchIndexTooLarge:{timeout:3e3},TooManyWritesInTimePeriod:{timeout:3e3}};function jC(e){if(e===void 0)return"Unknown";
133for(const n of Object.keys(u0))if(e.startsWith(n))return n;return"Unknown"}class qC{constructor(n,r,o,l,u,f){this.markConnectionStateDirty=u,this.debug=f,tt(this,"socket"),tt(this,"connectionCount"),tt(this,"_hasEverConnected",!1),tt(this,"lastCloseReason"),tt(this,"transitionChunkBuffer",null),tt(this,"defaultInitialBackoff"),tt(this,"maxBackoff"),tt(this,"retries"),tt(this,"serverInactivityThreshold"),tt(this,"reconnectDueToServerInactivityTimeout"),tt(this,"scheduledReconnect",null),tt(this,"networkOnlineHandler",null),tt(this,"pendingNetworkRecoveryInfo",null),tt(this,"uri"),tt(this,"onOpen"),tt(this,"onResume"),tt(this,"onMessage"),tt(this,"webSocketConstructor"),tt(this,"logger"),tt(this,"onServerDisconnectError"),this.webSocketConstructor=o,this.socket={state:"disconnected"},this.connectionCount=0,this.lastCloseReason="InitialConnect",this.defaultInitialBackoff=1e3,this.maxBackoff=16e3,this.retries=0,this.serverInactivityThreshold=6e4,this.reconnectDueToServerInactivityTimeout=null,this.uri=n,this.onOpen=r.onOpen,this.onResume=r.onResume,this.onMessage=r.onMessage,this.onServerDisconnectError=r.onServerDisconnectError,this.logger=l,this.setupNetworkListener(),this.connect()}setSocketState(n){this.socket=n,this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}`),this.markConnectionStateDirty()}setupNetworkListener(){typeof window>"u"||typeof window.addEventListener!="function"||this.networkOnlineHandler===null&&(this.networkOnlineHandler=()=>{this._logVerbose("network online event detected"),this.tryReconnectImmediately()},window.addEventListener("online",this.networkOnlineHandler),this._logVerbose("network online event listener registered"))}cleanupNetworkListener(){this.networkOnlineHandler&&typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("online",this.networkOnlineHandler),this.networkOnlineHandler=null,this._logVerbose("network online event listener removed"))}assembleTransition(n){if(n.partNumber<0||n.partNumber>=n.totalParts||n.totalParts===0||this.transitionChunkBuffer&&(this.transitionChunkBuffer.totalParts!==n.totalParts||this.transitionChunkBuffer.transitionId!==n.transitionId))throw this.transitionChunkBuffer=null,new Error("Invalid TransitionChunk");if(this.transitionChunkBuffer===null&&(this.transitionChunkBuffer={chunks:[],totalParts:n.totalParts,transitionId:n.transitionId}),n.partNumber!==this.transitionChunkBuffer.chunks.length){const r=this.transitionChunkBuffer.chunks.length;throw this.transitionChunkBuffer=null,new Error(`TransitionChunk received out of order: expected part ${r}, got ${n.partNumber}`)}if(this.transitionChunkBuffer.chunks.push(n.chunk),this.transitionChunkBuffer.chunks.length===n.totalParts){const r=this.transitionChunkBuffer.chunks.join("");this.transitionChunkBuffer=null;const o=e1(JSON.parse(r));if(o.type!=="Transition")throw new Error(`Expected Transition, got ${o.type} after assembling chunks`);return o}return null}connect(){if(this.socket.state==="terminated")return;if(this.socket.state!=="disconnected"&&this.socket.state!=="stopped")throw new Error("Didn't start connection from disconnected state: "+this.socket.state);const n=new this.webSocketConstructor(this.uri);this._logVerbose("constructed WebSocket"),this.setSocketState({state:"connecting",ws:n,paused:"no"}),this.resetServerInactivityTimeout(),n.onopen=()=>{if(this.logger.logVerbose("begin ws.onopen"),this.socket.state!=="connecting")throw new Error("onopen called with socket not in connecting state");if(this.setSocketState({state:"ready",ws:n,paused:this.socket.paused==="yes"?"uninitialized":"no"}),this.resetServerInactivityTimeout(),this.socket.paused==="no"&&(this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:fi()})),this.lastCloseReason!=="InitialConnect"&&(this.lastCloseReason?this.logger.log("WebSocket reconnected at",t1(),"after disconnect due to",this.lastCloseReason):this.logger.log("WebSocket reconnected at",t1())),this.connectionCount+=1,this.lastCloseReason=null,this.pendingNetworkRecoveryInfo!==null){const{timeSavedMs:r}=this.pendingNetworkRecoveryInfo;this.pendingNetworkRecoveryInfo=null,this.sendMessage({type:"Event",eventType:"NetworkRecoveryReconnect",event:{timeSavedMs:r}}),this.logger.log(`Network recovery reconnect saved ~${Math.round(r/1e3)}s of waiting`)}},n.onerror=r=>{this.transitionChunkBuffer=null;const o=r.message;o&&this.logger.log(`WebSocket error message: ${o}`)},n.onmessage=r=>{this.resetServerInactivityTimeout();const o=r.data.length;let l=e1(JSON.parse(r.data));if(this._logVerbose(`received ws message with type ${l.type}`),l.type==="Ping")return;if(l.type==="TransitionChunk"){const f=this.assembleTransition(l);if(!f)return;l=f,this._logVerbose(`assembled full ws message of type ${l.type}`)}this.transitionChunkBuffer!==null&&(this.transitionChunkBuffer=null,this.logger.log(`Received unexpected ${l.type} while buffering TransitionChunks`)),l.type==="Transition"&&this.reportLargeTransition({messageLength:o,transition:l}),this.onMessage(l).hasSyncedPastLastReconnect&&(this.retries=0,this.markConnectionStateDirty())}
133,n.onclose=r=>{if(this._logVerbose("begin ws.onclose"),this.transitionChunkBuffer=null,this.lastCloseReason===null&&(this.lastCloseReason=r.reason||`closed with code ${r.code}`),r.code!==NC&&r.code!==DC&&r.code!==UC&&r.code!==BC){let l=`WebSocket closed with code ${r.code}`;r.reason&&(l+=`: ${r.reason}`),this.logger.log(l),this.onServerDisconnectError&&r.reason&&this.onServerDisconnectError(l)}const o=jC(r.reason);this.scheduleReconnect(o)}}socketState(){return this.socket.state}sendMessage(n){const r={type:n.type,...n.type==="Authenticate"&&n.tokenType==="User"?{value:`...${n.value.slice(-7)}`}:{}};if(this.socket.state==="ready"&&this.socket.paused==="no"){const o=zC(n),l=JSON.stringify(o);let u=!1;try{this.socket.ws.send(l),u=!0}catch(f){this.logger.log(`Failed to send message on WebSocket, reconnecting: ${f}`),this.closeAndReconnect("FailedToSendMessage")}return this._logVerbose(`${u?"sent":"failed to send"} message with type ${n.type}: ${JSON.stringify(r)}`),!0}return this._logVerbose(`message not sent (socket state: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}): ${JSON.stringify(r)}`),!1}resetServerInactivityTimeout(){this.socket.state!=="terminated"&&(this.reconnectDueToServerInactivityTimeout!==null&&(clearTimeout(this.reconnectDueToServerInactivityTimeout),this.reconnectDueToServerInactivityTimeout=null),this.reconnectDueToServerInactivityTimeout=setTimeout(()=>{this.closeAndReconnect("InactiveServer")},this.serverInactivityThreshold))}scheduleReconnect(n){this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.socket={state:"disconnected"};const r=this.nextBackoff(n);this.markConnectionStateDirty(),this.logger.log(`Attempting reconnect in ${Math.round(r)}ms`);const o=fi(),l=setTimeout(()=>{this.scheduledReconnect?.timeout===l&&(this.scheduledReconnect=null,this.connect())},r);this.scheduledReconnect={timeout:l,scheduledAt:o,backoffMs:r}}closeAndReconnect(n){switch(this._logVerbose(`begin closeAndReconnect with reason ${n}`),this.socket.state){case"disconnected":case"terminated":case"stopped":return;case"connecting":case"ready":{this.lastCloseReason=n,this.close(),this.scheduleReconnect("client");return}default:this.socket}}close(){switch(this.transitionChunkBuffer=null,this.socket.state){case"disconnected":case"terminated":case"stopped":return Promise.resolve();case"connecting":{const n=this.socket.ws;return n.onmessage=r=>{this._logVerbose("Ignoring message received after close")},new Promise(r=>{n.onclose=()=>{this._logVerbose("Closed after connecting"),r()},n.onopen=()=>{this._logVerbose("Opened after connecting"),n.close()}})}case"ready":{this._logVerbose("ws.close called");const n=this.socket.ws;n.onmessage=o=>{this._logVerbose("Ignoring message received after close")};const r=new Promise(o=>{n.onclose=()=>{o()}});return n.close(),r}default:return this.socket,Promise.resolve()}}terminate(){switch(this.reconnectDueToServerInactivityTimeout&&clearTimeout(this.reconnectDueToServerInactivityTimeout),this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.cleanupNetworkListener(),this.socket.state){case"terminated":case"stopped":case"disconnected":case"connecting":case"ready":{const n=this.close();return this.setSocketState({state:"terminated"}),n}default:throw this.socket,new Error(`Invalid websocket state: ${this.socket.state}`)}}stop(){switch(this.socket.state){case"terminated":return Promise.resolve();case"connecting":case"stopped":case"disconnected":case"ready":{this.cleanupNetworkListener();const n=this.close();return this.socket={state:"stopped"},n}default:return this.socket,Promise.resolve()}}tryRestart(){switch(this.socket.state){case"stopped":break;case"terminated":case"connecting":case"ready":case"disconnected":this.logger.logVerbose("Restart called without stopping first");return;default:this.socket}this.setupNetworkListener(),this.connect()}pause(){switch(this.socket.state){case"disconnected":case"stopped":case"terminated":return;case"connecting":case"ready":{this.socket={...this.socket,paused:"yes"};return}default:{this.socket;return}}}tryReconnectImmediately(){if(this._logVerbose("tryReconnectImmediately called"),this.socket.state!=="disconnected"){this._logVerbose(`tryReconnectImmediately called but socket state is ${this.socket.state}, no action taken`);return}let n=null;if(this.scheduledReconnect){const r=fi()-this.scheduledReconnect.scheduledAt;n=Math.max(0,this.scheduledReconnect.backoffMs-r),this._logVerbose(`would have waited ${Math.round(n)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(r)}ms)`),clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null,this._logVerbose("canceled scheduled reconnect")}this.logger.log("Network recovery detected, reconnecting immediately"),this.pendingNetworkRecoveryInfo=n!==null?{timeSavedMs:n}:null,this.connect()}resume(){switch(this.socket.state){case"connecting":this.socket={...this.socket,paused:"no"};return;case"ready":this.socket.paused==="uninitialized"?(this.socket={...this.socket,paused:"no"},this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:fi()})):this.socket.paused==="yes"&&(this.socket={...this.socket,paused:"no"},this.onResume());return;case"terminated":case"stopped":case"disconnected":return;default:this.socket}this.connect()}connectionState(){return{isConnected:this.socket.state==="ready",hasEverConnected:this._hasEverConnected,connectionCount:this.connectionCount,connectionRetries:this.retries}}_logVerbose(n){this.logger.logVerbose(n)}nextBackoff(n){const o=(n==="client"?100:n==="Unknown"?this.defaultInitialBackoff:u0[n].timeout)*Math.pow(2,this.retries);this.retries+=1;const l=Math.min(o,this.maxBackoff),u=l*(Math.random()-.5);return l+u}reportLargeTransition({transition:n,messageLength:r}
133){if(n.clientClockSkew===void 0||n.serverTs===void 0)return;const o=fi()-n.clientClockSkew-n.serverTs/1e6,l=`${Math.round(o)}ms`,u=`${Math.round(r/1e4)/100}MB`,f=r/(o/1e3),h=`${Math.round(f/1e4)/100}MB per second`;this._logVerbose(`received ${u} transition in ${l} at ${h}`),r>2e7?this.logger.log(`received query results totaling more that 20MB (${u}) which will take a long time to download on slower connections`):o>2e4&&this.logger.log(`received query results totaling ${u} which took more than 20s to arrive (${l})`),this.debug&&this.sendMessage({type:"Event",eventType:"ClientReceivedTransition",event:{transitionTransitTime:o,messageLength:r}})}}function HC(){return PC()}function PC(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)})}class Mo extends Error{}Mo.prototype.name="InvalidTokenError";function $C(e){return decodeURIComponent(atob(e).replace(/(.)/g,(n,r)=>{let o=r.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function VC(e){let n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return $C(n)}catch{return atob(n)}}function c0(e,n){if(typeof e!="string")throw new Mo("Invalid token specified: must be a string");n||(n={});const r=n.header===!0?0:1,o=e.split(".")[r];if(typeof o!="string")throw new Mo(`Invalid token specified: missing part #${r+1}`);let l;try{l=VC(o)}catch(u){throw new Mo(`Invalid token specified: invalid base64 for part #${r+1} (${u.message})`)}try{return JSON.parse(l)}catch(u){throw new Mo(`Invalid token specified: invalid json for part #${r+1} (${u.message})`)}}var ZC=Object.defineProperty,IC=(e,n,r)=>n in e?ZC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Yt=(e,n,r)=>IC(e,typeof n!="symbol"?n+"":n,r);const QC=480*60*60*1e3,n1=2;class GC{constructor(n,r,o){Yt(this,"authState",{state:"noAuth"}),Yt(this,"configVersion",0),Yt(this,"syncState"),Yt(this,"authenticate"),Yt(this,"stopSocket"),Yt(this,"tryRestartSocket"),Yt(this,"pauseSocket"),Yt(this,"resumeSocket"),Yt(this,"clearAuth"),Yt(this,"logger"),Yt(this,"refreshTokenLeewaySeconds"),Yt(this,"lastRefreshChange"),Yt(this,"tokenConfirmationAttempts",0),this.syncState=n,this.authenticate=r.authenticate,this.stopSocket=r.stopSocket,this.tryRestartSocket=r.tryRestartSocket,this.pauseSocket=r.pauseSocket,this.resumeSocket=r.resumeSocket,this.clearAuth=r.clearAuth,this.logger=o.logger,this.refreshTokenLeewaySeconds=o.refreshTokenLeewaySeconds,this.lastRefreshChange=!1}notifyRefreshChange(n){this.authState.state!=="noAuth"&&this.authState.state!=="initialRefetch"&&this.authState.config.onRefreshChange&&this.lastRefreshChange!==n&&(this.lastRefreshChange=n,this.authState.config.onRefreshChange(n))}async setConfig(n,r,o){this.resetAuthState(),this._logVerbose("pausing WS for auth token fetch"),this.pauseSocket();const l=await this.fetchTokenAndGuardAgainstRace(n,{forceRefreshToken:!1});if(l.isFromOutdatedConfig)return;const u={fetchToken:n,onAuthChange:r,onRefreshChange:o};l.value?(this.setAuthState({state:"waitingForServerConfirmationOfCachedToken",config:u,hasRetried:!1}),this.authenticate(l.value)):(this.setAuthState({state:"initialRefetch",config:u}),await this.refetchToken()),this._logVerbose("resuming WS after auth token fetch"),this.resumeSocket()}onTransition(n){if(this.syncState.isCurrentOrNewerAuthVersion(n.endVersion.identity)&&!(n.endVersion.identity<=n.startVersion.identity)){if(this._logVerbose(`auth state is ${this.authState.state} when handling transition`),this.syncState.markAuthCompletion(),this.authState.state==="waitingForServerConfirmationOfCachedToken"){this._logVerbose("server confirmed auth token is valid"),this.refetchToken(),this.authState.config.onAuthChange(!0);return}this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this._logVerbose("server confirmed new auth token is valid"),this.notifyRefreshChange(!1),this.scheduleTokenRefetch(this.authState.token),this.tokenConfirmationAttempts=0,this.authState.hadAuth||this.authState.config.onAuthChange(!0))}}onAuthError(n){if(n.authUpdateAttempted===!1&&(this.authState.state==="waitingForServerConfirmationOfFreshToken"||this.authState.state==="waitingForServerConfirmationOfCachedToken")){this._logVerbose("ignoring non-auth token expired error");return}const{baseVersion:r}=n;if(!this.syncState.isCurrentOrNewerAuthVersion(r+1)){this._logVerbose("ignoring auth error for previous auth attempt");return}this.tryToReauthenticate(n)}async tryToReauthenticate(n){if(this._logVerbose(`attempting to reauthenticate: ${n.error}`),this.authState.state==="noAuth"||this.authState.state==="waitingForServerConfirmationOfFreshToken"&&this.tokenConfirmationAttempts>=n1){this.logger.error(`Failed to authenticate: "${n.error}", check your server auth config`),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.authState.state!=="noAuth"&&this.setAndReportAuthFailed(this.authState.config.onAuthChange);return}if(this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this.tokenConfirmationAttempts++,this._logVerbose(`retrying reauthentication, ${n1-this.tokenConfirmationAttempts} attempts remaining`)),this.notifyRefreshChange(!0),await this.stopSocket(),this.authState.state==="noAuth")return;const r=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});r.isFromOutdatedConfig||(r.value&&this.syncState.isNewAuth(r.value)?(this.authenticate(r.value),this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",config:this.authState.config,token:r.value,hadAuth:this.authState.state==="notRefetching"||this.authState.state==="waitingForScheduledRefetch"})):(this._logVerbose("reauthentication failed, could not fetch a new token"),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this.tryRestartSocket())}async refetchToken(){if(this.authState.state==="noAuth")return;this._logVerbose("refetching auth token");const n=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});n.isFromOutdatedConfig||(n.value?this.syncState.isNewAuth(n.value)?(this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",hadAuth:this.syncState.hasAuth(),token:n.value,config:this.authState.config}),this.authenticate(n.value)):this.setAuthState({state:"notRefetching",config:this.authState.config}):(this._logVerbose("refetching token failed"),this.syncState.hasAuth()&&this.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this._logVerbose("restarting WS after auth token fetch (if currently stopped)"),this.tryRestartSocket())}scheduleTokenRefetch(n){if(this.authState.state==="noAuth")return;const r=this.decodeToken(n);if(!r){this.logger.error("Auth token is not a valid JWT, cannot refetch the token");return}const{iat:o,exp:l}=r;if(!o||!l){this.logger.error("Auth token does not have required fields, cannot refetch the token");return}const u=l-o;if(u<=2){this.logger.error("Auth token does not live long enough, cannot refetch the token");return}let f=Math.min(QC,(u-this.refreshTokenLeewaySeconds)*1e3);f<=0&&(this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${u}s`),f=0);const h=setTimeout(()=>{this._logVerbose("running scheduled token refetch"),this.refetchToken()},f);this.setAuthState({state:"waitingForScheduledRefetch",refetchTokenTimeoutId:h,config:this.authState.config}),this._logVerbose(`scheduled preemptive auth token refetching in ${f}
133ms`)}async fetchTokenAndGuardAgainstRace(n,r){const o=++this.configVersion;this._logVerbose(`fetching token with config version ${o}`);const l=await n(r);return this.configVersion!==o?(this._logVerbose(`stale config version, expected ${o}, got ${this.configVersion}`),{isFromOutdatedConfig:!0}):{isFromOutdatedConfig:!1,value:l}}stop(){this.resetAuthState(),this.configVersion++,this._logVerbose(`config version bumped to ${this.configVersion}`)}setAndReportAuthFailed(n){n(!1),this.resetAuthState()}resetAuthState(){this.notifyRefreshChange(!1),this.setAuthState({state:"noAuth"})}setAuthState(n){const r=n.state==="waitingForServerConfirmationOfFreshToken"?{hadAuth:n.hadAuth,state:n.state,token:`...${n.token.slice(-7)}`}:{state:n.state};switch(this._logVerbose(`setting auth state to ${JSON.stringify(r)}`),n.state){case"waitingForScheduledRefetch":case"notRefetching":case"noAuth":this.tokenConfirmationAttempts=0;break}this.authState.state==="waitingForScheduledRefetch"&&clearTimeout(this.authState.refetchTokenTimeoutId),this.authState=n}decodeToken(n){try{return c0(n)}catch(r){return this._logVerbose(`Error decoding token: ${r instanceof Error?r.message:"Unknown error"}`),null}}_logVerbose(n){this.logger.logVerbose(`${n} [v${this.configVersion}]`)}}const YC=["convexClientConstructed","convexWebSocketOpen","convexFirstMessageReceived"];function XC(e,n){const r={sessionId:n};typeof performance>"u"||!performance.mark||performance.mark(e,{detail:r})}function KC(e){let n=e.name.slice(6);return n=n.charAt(0).toLowerCase()+n.slice(1),{name:n,startTime:e.startTime}}function FC(e){if(typeof performance>"u"||!performance.getEntriesByName)return[];const n=[];for(const r of YC){const o=performance.getEntriesByName(r).filter(l=>l.entryType==="mark").filter(l=>l.detail.sessionId===e);n.push(...o)}return n.map(KC)}var JC=Object.defineProperty,WC=(e,n,r)=>n in e?JC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,nt=(e,n,r)=>WC(e,typeof n!="symbol"?n+"":n,r);class e6{constructor(n,r,o){if(nt(this,"address"),nt(this,"state"),nt(this,"requestManager"),nt(this,"webSocketManager"),nt(this,"authenticationManager"),nt(this,"remoteQuerySet"),nt(this,"optimisticQueryResults"),nt(this,"_transitionHandlerCounter",0),nt(this,"_nextRequestId"),nt(this,"_onTransitionFns",new Map),nt(this,"_sessionId"),nt(this,"firstMessageReceived",!1),nt(this,"debug"),nt(this,"logger"),nt(this,"maxObservedTimestamp"),nt(this,"connectionStateSubscribers",new Map),nt(this,"nextConnectionStateSubscriberId",0),nt(this,"_lastPublishedConnectionState"),nt(this,"markConnectionStateDirty",()=>{Promise.resolve().then(()=>{const b=this.connectionState();if(JSON.stringify(b)!==JSON.stringify(this._lastPublishedConnectionState)){this._lastPublishedConnectionState=b;for(const C of this.connectionStateSubscribers.values())C(b)}})}),nt(this,"mark",b=>{this.debug&&XC(b,this.sessionId)}),typeof n=="object")throw new Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");o?.skipConvexDeploymentUrlCheck!==!0&&Md(n),o={...o};const l=o.authRefreshTokenLeewaySeconds??10;let u=o.webSocketConstructor;if(!u&&typeof WebSocket>"u")throw new Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");u=u||WebSocket,this.debug=o.reportDebugInfoToConvex??!1,this.address=n,this.logger=o.logger===!1?Ld({verbose:o.verbose??!1}):o.logger!==!0&&o.logger?o.logger:kd({verbose:o.verbose??!1});const f=n.search("://");if(f===-1)throw new Error("Provided address was not an absolute URL.");const h=n.substring(f+3),p=n.substring(0,f);let m;if(p==="http")m="ws";else if(p==="https")m="wss";else throw new Error(`Unknown parent protocol ${p}`);const v=`${m}://${h}/api/${or}/sync`;this.state=new hC,this.remoteQuerySet=new Wy(b=>this.state.queryPath(b),this.logger),this.requestManager=new gC(this.logger,this.markConnectionStateDirty);const y=()=>{this.webSocketManager.pause(),this.state.pause()};this.authenticationManager=new GC(this.state,{authenticate:b=>{const C=this.state.setAuth(b);return this.webSocketManager.sendMessage(C),C.baseVersion},stopSocket:()=>this.webSocketManager.stop(),tryRestartSocket:()=>this.webSocketManager.tryRestart(),pauseSocket:y,resumeSocket:()=>this.webSocketManager.resume(),clearAuth:()=>{this.clearAuth()}},{logger:this.logger,refreshTokenLeewaySeconds:l}),this.optimisticQueryResults=new EC,this.addOnTransitionHandler(b=>{r(b.queries.map(C=>C.token))}),this._nextRequestId=0,this._sessionId=HC();const{unsavedChangesWarning:w}=o;if(typeof window>"u"||typeof window.addEventListener>"u"){if(w===!0)throw new Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.")}else w!==!1&&window.addEventListener("beforeunload",b=>{if(this.requestManager.hasIncompleteRequests()){b.preventDefault();const C="Are you sure you want to leave? Your changes may not be saved.";return(b||window.event).returnValue=C,C}});this.webSocketManager=new qC(v,{onOpen:b=>{this.mark("convexWebSocketOpen"),this.webSocketManager.sendMessage({...b,type:"Connect",sessionId:this._sessionId,maxObservedTimestamp:this.maxObservedTimestamp}),this.remoteQuerySet=new Wy(R=>this.state.queryPath(R),this.logger);const[C,O]=this.state.restart();O&&this.webSocketManager.sendMessage(O),this.webSocketManager.sendMessage(C);for(const R of this.requestManager.restart())this.webSocketManager.sendMessage(R)},onResume:()=>{const[b,C]=this.state.resume();C&&this.webSocketManager.sendMessage(C),b&&this.webSocketManager.sendMessage(b);for(const O of this.requestManager.resume())this.webSocketManager.sendMessage(O)},onMessage:b=>{switch(this.firstMessageReceived||(this.firstMessageReceived=!0,this.mark("convexFirstMessageReceived"),this.reportMar
133ks()),b.type){case"Transition":{this.observedTimestamp(b.endVersion.ts),this.authenticationManager.onTransition(b),this.remoteQuerySet.transition(b),this.state.transition(b);const C=this.requestManager.removeCompleted(this.remoteQuerySet.timestamp());this.notifyOnQueryResultChanges(C);break}case"MutationResponse":{b.success&&this.observedTimestamp(b.ts);const C=this.requestManager.onResponse(b);C!==null&&this.notifyOnQueryResultChanges(new Map([[C.requestId,C.result]]));break}case"ActionResponse":{this.requestManager.onResponse(b);break}case"AuthError":{this.authenticationManager.onAuthError(b);break}case"FatalError":{const C=cC(this.logger,b.error);throw this.webSocketManager.terminate(),C}}return{hasSyncedPastLastReconnect:this.hasSyncedPastLastReconnect()}},onServerDisconnectError:o.onServerDisconnectError},u,this.logger,this.markConnectionStateDirty,this.debug),this.mark("convexClientConstructed"),o.expectAuth&&y()}hasSyncedPastLastReconnect(){return this.requestManager.hasSyncedPastLastReconnect()&&this.state.hasSyncedPastLastReconnect()}observedTimestamp(n){(this.maxObservedTimestamp===void 0||this.maxObservedTimestamp.lessThanOrEqual(n))&&(this.maxObservedTimestamp=n)}getMaxObservedTimestamp(){return this.maxObservedTimestamp}notifyOnQueryResultChanges(n){const r=this.remoteQuerySet.remoteQueryResults(),o=new Map;for(const[u,f]of r){const h=this.state.queryToken(u);if(h!==null){const p={result:f,udfPath:this.state.queryPath(u),args:this.state.queryArgs(u)};o.set(h,p)}}const l=this.optimisticQueryResults.ingestQueryResultsFromServer(o,new Set(n.keys()));this.handleTransition({queries:l.map(u=>{const f=this.optimisticQueryResults.rawQueryResult(u);return{token:u,modification:{kind:"Updated",result:f}}}),reflectedMutations:Array.from(n).map(([u,f])=>({requestId:u,result:f})),timestamp:this.remoteQuerySet.timestamp()})}handleTransition(n){for(const r of this._onTransitionFns.values())r(n)}addOnTransitionHandler(n){const r=this._transitionHandlerCounter++;return this._onTransitionFns.set(r,n),()=>this._onTransitionFns.delete(r)}getCurrentAuthClaims(){const n=this.state.getAuth();let r={};if(n&&n.tokenType==="User")try{r=n?c0(n.value):{}}catch{r={}}else return;return{token:n.value,decoded:r}}setAuth(n,r,o){this.authenticationManager.setConfig(n,r,o)}hasAuth(){return this.state.hasAuth()}setAdminAuth(n,r){const o=this.state.setAdminAuth(n,r);this.webSocketManager.sendMessage(o)}clearAuth(){const n=this.state.clearAuth();this.webSocketManager.sendMessage(n)}subscribe(n,r,o){const l=Dt(r),{modification:u,queryToken:f,unsubscribe:h}=this.state.subscribe(n,l,o?.journal,o?.componentPath);return u!==null&&this.webSocketManager.sendMessage(u),{queryToken:f,unsubscribe:()=>{const p=h();p&&this.webSocketManager.sendMessage(p)}}}localQueryResult(n,r){const o=Dt(r),l=hr(n,o);return this.optimisticQueryResults.queryResult(l)}localQueryResultByToken(n){return this.optimisticQueryResults.queryResult(n)}hasLocalQueryResultByToken(n){return this.optimisticQueryResults.hasQueryResult(n)}localQueryLogs(n,r){const o=Dt(r),l=hr(n,o);return this.optimisticQueryResults.queryLogs(l)}queryJournal(n,r){const o=Dt(r),l=hr(n,o);return this.state.queryJournal(l)}connectionState(){const n=this.webSocketManager.connectionState();return{hasInflightRequests:this.requestManager.hasInflightRequests(),isWebSocketConnected:n.isConnected,hasEverConnected:n.hasEverConnected,connectionCount:n.connectionCount,connectionRetries:n.connectionRetries,timeOfOldestInflightRequest:this.requestManager.timeOfOldestInflightRequest(),inflightMutations:this.requestManager.inflightMutations(),inflightActions:this.requestManager.inflightActions()}}subscribeToConnectionState(n){const r=this.nextConnectionStateSubscriberId++;return this.connectionStateSubscribers.set(r,n),()=>{this.connectionStateSubscribers.delete(r)}}async mutation(n,r,o){const l=await this.mutationInternal(n,r,o);if(!l.success)throw l.errorData!==void 0?fd(l,new cr(hi("mutation",n,l))):new Error(hi("mutation",n,l));return l.value}async mutationInternal(n,r,o,l){const{mutationPromise:u}=this.enqueueMutation(n,r,o,l);return u}enqueueMutation(n,r,o,l){const u=Dt(r);this.tryReportLongDisconnect();const f=this.nextRequestId;if(this._nextRequestId++,o!==void 0){const v=o.optimisticUpdate;if(v!==void 0){const y=C=>{v(C,u)instanceof Promise&&this.logger.warn("Optimistic update handler returned a Promise. Optimistic updates should be synchronous.")},b=this.optimisticQueryResults.applyOptimisticUpdate(y,f).map(C=>{const O=this.localQueryResultByToken(C);return{token:C,modification:{kind:"Updated",result:O===void 0?void 0:{success:!0,value:O,logLines:[]}}}});this.handleTransition({queries:b,reflectedMutations:[],timestamp:this.remoteQuerySet.timestamp()})}}const h={type:"Mutation",requestId:f,udfPath:n,componentPath:l,args:[Et(u)]},p=this.webSocketManager.sendMessage(h),m=this.requestManager.request(h,p);return{requestId:f,mutationPromise:m}}async action(n,r){const o=await this.actionInternal(n,r);if(!o.success)throw o.errorData!==void 0?fd(o,new cr(hi("action",n,o))):new Error(hi("action",n,o));return o.value}async actionInternal(n,r,o){const l=Dt(r),u=this.nextRequestId;this._nextRequestId++,this.tryReportLongDisconnect();const f={type:"Action",requestId:u,udfPath:n,componentPath:o,args:[Et(l)]},h=this.webSocketManager.sendMessage(f);return this.requestManager.request(f,h)}async close(){return this.authenticationManager.stop(),this.webSocketManager.terminate()}get url(){return this.address}get nextRequestId(){return this._nextRequestId}get sessionId(){return this._sessionId}
133reportMarks(){if(this.debug){const n=FC(this.sessionId);this.webSocketManager.sendMessage({type:"Event",eventType:"ClientConnect",event:n})}}tryReportLongDisconnect(){if(!this.debug)return;const n=this.connectionState().timeOfOldestInflightRequest;if(n===null||Date.now()-n.getTime()<=60*1e3)return;const r=`${this.address}/api/debug_event`;fetch(r,{method:"POST",headers:{"Content-Type":"application/json","Convex-Client":`npm-${or}`},body:JSON.stringify({event:"LongWebsocketDisconnect"})}).then(o=>{o.ok||this.logger.warn("Analytics request failed with response:",o.body)}).catch(o=>{this.logger.warn("Analytics response failed with error:",o)})}}function Gf(e){if(typeof e!="object"||e===null||!Array.isArray(e.page)||typeof e.isDone!="boolean"||typeof e.continueCursor!="string")throw new Error(`Not a valid paginated query result: ${e?.toString()}`);return e}var t6=Object.defineProperty,n6=(e,n,r)=>n in e?t6(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,a1=(e,n,r)=>n6(e,typeof n!="symbol"?n+"":n,r);class a6{constructor(n,r){this.client=n,this.onTransition=r,a1(this,"paginatedQuerySet",new Map),a1(this,"lastTransitionTs"),this.lastTransitionTs=Nt.fromNumber(0),this.client.addOnTransitionHandler(o=>this.onBaseTransition(o))}subscribe(n,r,o){const l=mr(n),u=Ky(l,r,o),f=()=>this.removePaginatedQuerySubscriber(u),h=this.paginatedQuerySet.get(u);return h?(h.numSubscribers+=1,{paginatedQueryToken:u,unsubscribe:f}):(this.paginatedQuerySet.set(u,{token:u,canonicalizedUdfPath:l,args:r,numSubscribers:1,options:{initialNumItems:o.initialNumItems},nextPageKey:0,pageKeys:[],pageKeyToQuery:new Map,ongoingSplits:new Map,skip:!1,id:o.id}),this.addPageToPaginatedQuery(u,null,o.initialNumItems),{paginatedQueryToken:u,unsubscribe:f})}localQueryResult(n,r,o){const l=mr(n),u=Ky(l,r,o);return this.localQueryResultByToken(u)}localQueryResultByToken(n){const r=this.paginatedQuerySet.get(n);if(!r)return;const o=this.activePageQueryTokens(r);if(o.length===0)return{results:[],status:"LoadingFirstPage",loadMore:p=>this.loadMoreOfPaginatedQuery(n,p)};let l=[],u=!1,f=!1;for(const p of o){const m=this.client.localQueryResultByToken(p);if(m===void 0){u=!0,f=!1;continue}const v=Gf(m);l=l.concat(v.page),f=!!v.isDone}let h;return u?h=l.length===0?"LoadingFirstPage":"LoadingMore":f?h="Exhausted":h="CanLoadMore",{results:l,status:h,loadMore:p=>this.loadMoreOfPaginatedQuery(n,p)}}onBaseTransition(n){const r=n.queries.map(f=>f.token),o=this.queriesContainingTokens(r);let l=[];o.length>0&&(this.processPaginatedQuerySplits(o,f=>this.client.localQueryResultByToken(f)),l=o.map(f=>({token:f,modification:{kind:"Updated",result:this.localQueryResultByToken(f)}})));const u={...n,paginatedQueries:l};this.onTransition(u)}loadMoreOfPaginatedQuery(n,r){this.mustGetPaginatedQuery(n);const o=this.queryTokenForLastPageOfPaginatedQuery(n),l=this.client.localQueryResultByToken(o);if(!l)return!1;const u=Gf(l);if(u.isDone)return!1;this.addPageToPaginatedQuery(n,u.continueCursor,r);const f={timestamp:this.lastTransitionTs,reflectedMutations:[],queries:[],paginatedQueries:[{token:n,modification:{kind:"Updated",result:this.localQueryResultByToken(n)}}]};return this.onTransition(f),!0}queriesContainingTokens(n){if(n.length===0)return[];const r=[],o=new Set(n);for(const[l,u]of this.paginatedQuerySet)for(const f of this.allQueryTokens(u))if(o.has(f)){r.push(l);break}return r}processPaginatedQuerySplits(n,r){for(const o of n){const l=this.mustGetPaginatedQuery(o),{ongoingSplits:u,pageKeyToQuery:f,pageKeys:h}=l;for(const[p,[m,v]]of u)r(f.get(m).queryToken)!==void 0&&r(f.get(v).queryToken)!==void 0&&this.completePaginatedQuerySplit(l,p,m,v);for(const p of h){if(u.has(p))continue;const m=f.get(p).queryToken,v=r(m);if(!v)continue;const y=Gf(v);y.splitCursor&&(y.pageStatus==="SplitRecommended"||y.pageStatus==="SplitRequired"||y.page.length>l.options.initialNumItems*2)&&this.splitPaginatedQueryPage(l,p,y.splitCursor,y.continueCursor)}}}splitPaginatedQueryPage(n,r,o,l){const u=n.nextPageKey++,f=n.nextPageKey++,h={cursor:l,numItems:n.options.initialNumItems,id:n.id},p=this.client.subscribe(n.canonicalizedUdfPath,{...n.args,paginationOpts:{...h,cursor:null,endCursor:o}});n.pageKeyToQuery.set(u,p);const m=this.client.subscribe(n.canonicalizedUdfPath,{...n.args,paginationOpts:{...h,cursor:o,endCursor:l}});n.pageKeyToQuery.set(f,m),n.ongoingSplits.set(r,[u,f])}addPageToPaginatedQuery(n,r,o){const l=this.mustGetPaginatedQuery(n),u=l.nextPageKey++,f={cursor:r,numItems:o,id:l.id},h={...l.args,paginationOpts:f},p=this.client.subscribe(l.canonicalizedUdfPath,h);return l.pageKeys.push(u),l.pageKeyToQuery.set(u,p),p}removePaginatedQuerySubscriber(n){const r=this.paginatedQuerySet.get(n);if(r&&(r.numSubscribers-=1,!(r.numSubscribers>
1330))){for(const o of r.pageKeyToQuery.values())o.unsubscribe();this.paginatedQuerySet.delete(n)}}completePaginatedQuerySplit(n,r,o,l){const u=n.pageKeyToQuery.get(r);n.pageKeyToQuery.delete(r);const f=n.pageKeys.indexOf(r);n.pageKeys.splice(f,1,o,l),n.ongoingSplits.delete(r),u.unsubscribe()}activePageQueryTokens(n){return n.pageKeys.map(r=>n.pageKeyToQuery.get(r).queryToken)}allQueryTokens(n){return Array.from(n.pageKeyToQuery.values()).map(r=>r.queryToken)}queryTokenForLastPageOfPaginatedQuery(n){const r=this.mustGetPaginatedQuery(n),o=r.pageKeys[r.pageKeys.length-1];if(o===void 0)throw new Error(`No pages for paginated query ${n}`);return r.pageKeyToQuery.get(o).queryToken}mustGetPaginatedQuery(n){const r=this.paginatedQuerySet.get(n);if(!r)throw new Error("paginated query no longer exists for token "+n);return r}}var r6=Object.defineProperty,i6=(e,n,r)=>n in e?r6(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,_n=(e,n,r)=>i6(e,typeof n!="symbol"?n+"":n,r);const El=560;let Ro;class f0{constructor(n,r){if(_n(this,"address"),_n(this,"auth"),_n(this,"adminAuth"),_n(this,"encodedTsPromise"),_n(this,"debug"),_n(this,"fetchOptions"),_n(this,"fetch"),_n(this,"logger"),_n(this,"mutationQueue",[]),_n(this,"isProcessingQueue",!1),typeof r=="boolean")throw new Error("skipConvexDeploymentUrlCheck as the second argument is no longer supported. Please pass an options object, `{ skipConvexDeploymentUrlCheck: true }`.");(r??{}).skipConvexDeploymentUrlCheck!==!0&&Md(n),this.logger=r?.logger===!1?Ld({verbose:!1}):r?.logger!==!0&&r?.logger?r.logger:kd({verbose:!1}),this.address=n,this.debug=!0,this.auth=void 0,this.adminAuth=void 0,this.fetch=r?.fetch,r?.auth&&this.setAuth(r.auth)}backendUrl(){return`${this.address}/api`}get url(){return this.address}setAuth(n){this.clearAuth(),this.auth=n}setAdminAuth(n,r){if(this.clearAuth(),r!==void 0){const o=new TextEncoder().encode(JSON.stringify(r)),l=btoa(String.fromCodePoint(...o));this.adminAuth=`${n}:${l}`}else this.adminAuth=n}clearAuth(){this.auth=void 0,this.adminAuth=void 0}setDebug(n){this.debug=n}setFetchOptions(n){this.fetchOptions=n}async consistentQuery(n,...r){const o=Dt(r[0]),l=this.getTimestamp();return await this.queryInner(n,o,{timestampPromise:l})}async getTimestamp(){return this.encodedTsPromise?this.encodedTsPromise:this.encodedTsPromise=this.getTimestampInner()}async getTimestampInner(){const n=this.fetch||Ro||fetch,r={"Content-Type":"application/json","Convex-Client":`npm-${or}`},o=await n(`${this.address}/api/query_ts`,{...this.fetchOptions,method:"POST",headers:r});if(!o.ok)throw new Error(await o.text());const{ts:l}=await o.json();return l}async query(n,...r){const o=Dt(r[0]);return await this.queryInner(n,o,{})}async queryInner(n,r,o){const l=rt(n),u=[Et(r)],f={"Content-Type":"application/json","Convex-Client":`npm-${or}`};this.adminAuth?f.Authorization=`Convex ${this.adminAuth}`:this.auth&&(f.Authorization=`Bearer ${this.auth}`);const h=this.fetch||Ro||fetch,p=o.timestampPromise?await o.timestampPromise:void 0,m=JSON.stringify({path:l,format:"convex_encoded_json",args:u,...p?{ts:p}:{}}),v=p?`${this.address}/api/query_at_ts`:`${this.address}/api/query`,y=await h(v,{...this.fetchOptions,body:m,method:"POST",headers:f});if(!y.ok&&y.status!==El)throw new Error(await y.text());const w=await y.json();if(this.debug)for(const b of w.logLines??[])ka(this.logger,"info","query",l,b);switch(w.status){case"success":return pn(w.value);case"error":throw w.errorData!==void 0?Cl(w.errorData,new cr(w.errorMessage)):new Error(w.errorMessage);default:throw new Error(`Invalid response: ${JSON.stringify(w)}`)}}async mutationInner(n,r){const o=rt(n),l=JSON.stringify({path:o,format:"convex_encoded_json",args:[Et(r)]}),u={"Content-Type":"application/json","Convex-Client":`npm-${or}`};this.adminAuth?u.Authorization=`Convex ${this.adminAuth}`:this.auth&&(u.Authorization=`Bearer ${this.auth}`);const h=await(this.fetch||Ro||fetch)(`${this.address}/api/mutation`,{...this.fetchOptions,body:l,method:"POST",headers:u});if(!h.ok&&h.status!==El)throw new Error(await h.text());const p=await h.json();if(this.debug)for(const m of p.logLines??[])ka(this.logger,"info","mutation",o,m);switch(p.status){case"success":return pn(p.value);case"error":throw p.errorData!==void 0?Cl(p.errorData,new cr(p.errorMessage)):new Error(p.errorMessage);default:throw new Error(`Invalid response: ${JSON.stringify(p)}`)}}async processMutationQueue(){if(!this.isProcessingQueue){for(this.isProcessingQueue=!0;
133this.mutationQueue.length>0;){const{mutation:n,args:r,resolve:o,reject:l}=this.mutationQueue.shift();try{const u=await this.mutationInner(n,r);o(u)}catch(u){l(u)}}this.isProcessingQueue=!1}}enqueueMutation(n,r){return new Promise((o,l)=>{this.mutationQueue.push({mutation:n,args:r,resolve:o,reject:l}),this.processMutationQueue()})}async mutation(n,...r){const[o,l]=r,u=Dt(o);return l?.skipQueue?await this.mutationInner(n,u):await this.enqueueMutation(n,u)}async action(n,...r){const o=Dt(r[0]),l=rt(n),u=JSON.stringify({path:l,format:"convex_encoded_json",args:[Et(o)]}),f={"Content-Type":"application/json","Convex-Client":`npm-${or}`};this.adminAuth?f.Authorization=`Convex ${this.adminAuth}`:this.auth&&(f.Authorization=`Bearer ${this.auth}`);const p=await(this.fetch||Ro||fetch)(`${this.address}/api/action`,{...this.fetchOptions,body:u,method:"POST",headers:f});if(!p.ok&&p.status!==El)throw new Error(await p.text());const m=await p.json();if(this.debug)for(const v of m.logLines??[])ka(this.logger,"info","action",l,v);switch(m.status){case"success":return pn(m.value);case"error":throw m.errorData!==void 0?Cl(m.errorData,new cr(m.errorMessage)):new Error(m.errorMessage);default:throw new Error(`Invalid response: ${JSON.stringify(m)}`)}}async function(n,r,...o){const l=Dt(o[0]),u=typeof n=="string"?n:rt(n),f=JSON.stringify({componentPath:r,path:u,format:"convex_encoded_json",args:Et(l)}),h={"Content-Type":"application/json","Convex-Client":`npm-${or}`};this.adminAuth?h.Authorization=`Convex ${this.adminAuth}`:this.auth&&(h.Authorization=`Bearer ${this.auth}`);const m=await(this.fetch||Ro||fetch)(`${this.address}/api/function`,{...this.fetchOptions,body:f,method:"POST",headers:h});if(!m.ok&&m.status!==El)throw new Error(await m.text());const v=await m.json();if(this.debug)for(const y of v.logLines??[])ka(this.logger,"info","any",u,y);switch(v.status){case"success":return pn(v.value);case"error":throw v.errorData!==void 0?Cl(v.errorData,new cr(v.errorMessage)):new Error(v.errorMessage);default:throw new Error(`Invalid response: ${JSON.stringify(v)}`)}}}function Cl(e,n){return n.data=pn(e),n}function o6({getCurrentValue:e,subscribe:n}){const[r,o]=P.useState(()=>({getCurrentValue:e,subscribe:n,value:e()}));let l=r.value;return(r.getCurrentValue!==e||r.subscribe!==n)&&(l=e(),o({getCurrentValue:e,subscribe:n,value:l})),P.useEffect(()=>{let u=!1;const f=()=>{u||o(p=>{if(p.getCurrentValue!==e||p.subscribe!==n)return p;const m=e();return p.value===m?p:{...p,value:m}})},h=n(f);return f(),()=>{u=!0,h()}},[e,n]),l}var s6=Object.defineProperty,l6=(e,n,r)=>n in e?s6(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Xn=(e,n,r)=>l6(e,typeof n!="symbol"?n+"":n,r);const u6=5e3;if(typeof Xt>"u")throw new Error("Required dependency 'react' not found");function d0(e,n,r){function o(l){return p6(l),n.mutation(e,l,{optimisticUpdate:r})}return o.withOptimisticUpdate=function(u){if(r!==void 0)throw new Error(`Already specified optimistic update for mutation ${rt(e)}`);return d0(e,n,u)},o}function c6(e,n){return function(r){return n.action(e,r)}}class f6{constructor(n,r){if(Xn(this,"address"),Xn(this,"cachedSync"),Xn(this,"cachedPaginatedQueryClient"),Xn(this,"listeners"),Xn(this,"options"),Xn(this,"closed",!1),Xn(this,"_logger"),Xn(this,"adminAuth"),Xn(this,"fakeUserIdentity"),n===void 0)throw new Error("No address provided to ConvexReactClient.\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated.");if(typeof n!="string")throw new Error(`ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud', received something of type ${typeof n} instead.`);if(!n.includes("://"))throw new Error("Provided address was not an absolute URL.");this.address=n,this.listeners=new Map,this._logger=r?.logger===!1?Ld({verbose:r?.verbose??!1}):r?.logger!==!0&&r?.logger?r.logger:kd({verbose:r?.verbose??!1}),this.options={...r,logger:this._logger}}get url(){return this.address}get sync(){if(this.closed)throw new Error("ConvexReactClient has already been closed.");return this.cachedSync?this.cachedSync:(this.cachedSync=new e6(this.address,()=>{},this.options),this.adminAuth&&this.cachedSync.setAdminAuth(this.adminAuth,this.fakeUserIdentity),this.cachedPaginatedQueryClient=new a6(this.cachedSync,n=>this.handleTransition(n)),this.cachedSync)}get paginatedQueryClient(){if(this.sync,this.cachedPaginatedQueryClient)return this.cachedPaginatedQueryClient;throw new Error("Should already be instantiated")}setAuth(n,r,o){if(typeof n=="string")throw new Error("Passing a string to ConvexReactClient.setAuth is no longer supported, please upgrade to passing in an async function to handle reauthentication.");this.sync.setAuth(n,r??(()=>{}),o)}clearAuth(){this.sync.clearAuth()}setAdminAuth(n,r){if(this.adminAuth=n,this.fakeUserIdentity=r,this.closed)throw new Error("ConvexReactClient has already been closed.");this.cachedSync&&this.sync.setAdminAuth(n,r)}watchQuery(n,...r){const[o,l]=r,u=rt(n);return{onUpdate:f=>{const{queryToken:h,unsubscribe:p}=this.sync.subscribe(u,o,l),m=this.listeners.get(h);return m!==void 0?m.add(f):this.listeners.set(h,new Set([f])),()=>{if(this.closed)return;const v=this.listeners.get(h);v.delete(f),v.size===0&&this.listeners.delete(h),p()}},localQueryResult:()=>{if(this.cachedSync)return this.cachedSync.localQueryResult(u,o)},localQueryLogs:()=>
133{if(this.cachedSync)return this.cachedSync.localQueryLogs(u,o)},journal:()=>{if(this.cachedSync)return this.cachedSync.queryJournal(u,o)}}}prewarmQuery(n){const r=n.extendSubscriptionFor??u6,l=this.watchQuery(n.query,n.args||{}).onUpdate(()=>{});setTimeout(l,r)}watchPaginatedQuery(n,r,o){const l=rt(n);return{onUpdate:u=>{const{paginatedQueryToken:f,unsubscribe:h}=this.paginatedQueryClient.subscribe(l,r||{},o),p=this.listeners.get(f);return p!==void 0?p.add(u):this.listeners.set(f,new Set([u])),()=>{if(this.closed)return;const m=this.listeners.get(f);m.delete(u),m.size===0&&this.listeners.delete(f),h()}},localQueryResult:()=>this.paginatedQueryClient.localQueryResult(l,r,o)}}mutation(n,...r){const[o,l]=r,u=rt(n);return this.sync.mutation(u,o,l)}action(n,...r){const o=rt(n);return this.sync.action(o,...r)}query(n,...r){const o=this.watchQuery(n,...r),l=o.localQueryResult();return l!==void 0?Promise.resolve(l):new Promise((u,f)=>{const h=o.onUpdate(()=>{h();try{u(o.localQueryResult())}catch(p){f(p)}})})}connectionState(){return this.sync.connectionState()}subscribeToConnectionState(n){return this.sync.subscribeToConnectionState(n)}get logger(){return this._logger}async close(){if(this.closed=!0,this.listeners=new Map,this.cachedPaginatedQueryClient&&(this.cachedPaginatedQueryClient=void 0),this.cachedSync){const n=this.cachedSync;this.cachedSync=void 0,await n.close()}}handleTransition(n){const r=n.queries.map(l=>l.token),o=n.paginatedQueries.map(l=>l.token);this.transition([...r,...o])}transition(n){for(const r of n){const o=this.listeners.get(r);if(o)for(const l of o)l()}}}const nu=Xt.createContext(void 0);function d6(){return P.useContext(nu)}const h6=({client:e,children:n})=>Xt.createElement(nu.Provider,{value:e},n);function H7(e,...n){const r=n[0]==="skip",o=n[0]==="skip"?{}:Dt(n[0]),l=typeof e=="string"?Nd(e):e,u=rt(l),f=P.useMemo(()=>r?{}:{query:{query:l,args:o}},[JSON.stringify(Et(o)),u,r]),p=v6(f).query;if(p instanceof Error)throw p;return p}function P7(e){const n=typeof e=="string"?Nd(e):e,r=P.useContext(nu);if(r===void 0)throw new Error("Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return P.useMemo(()=>d0(n,r),[r,rt(n)])}function $7(e){const n=P.useContext(nu),r=typeof e=="string"?Nd(e):e;if(n===void 0)throw new Error("Could not find Convex client! `useAction` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return P.useMemo(()=>c6(r,n),[n,rt(r)])}function p6(e){if(typeof e=="object"&&e!==null&&"bubbles"in e&&"persist"in e&&"isDefaultPrevented"in e)throw new Error("Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler.")}var m6=Object.defineProperty,g6=(e,n,r)=>n in e?m6(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Yf=(e,n,r)=>g6(e,typeof n!="symbol"?n+"":n,r);class y6{constructor(n){Yf(this,"createWatch"),Yf(this,"queries"),Yf(this,"listeners"),this.createWatch=n,this.queries={},this.listeners=new Set}setQueries(n){for(const r of Object.keys(n)){const{query:o,args:l,paginationOptions:u}=n[r];if(rt(o),this.queries[r]===void 0)this.addQuery(r,o,l,u?{paginationOptions:u}:{});else{const f=this.queries[r];(rt(o)!==rt(f.query)||JSON.stringify(Et(l))!==JSON.stringify(Et(f.args))||JSON.stringify(u)!==JSON.stringify(f.paginationOptions))&&(this.removeQuery(r),this.addQuery(r,o,l,u?{paginationOptions:u}:{}))}}for(const r of Object.keys(this.queries))n[r]===void 0&&this.removeQuery(r)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}getLocalResults(n){const r={};for(const o of Object.keys(n)){const{query:l,args:u}=n[o],f=n[o].paginationOptions;rt(l);const h=this.createWatch(l,u,f?{paginationOptions:f}:{});let p;try{p=h.localQueryResult()}catch(m){if(m instanceof Error)p=m;else throw m}r[o]=p}return r}setCreateWatch(n){this.createWatch=n;for(const r of Object.keys(this.queries)){const{query:o,args:l,watch:u,paginationOptions:f}=this.queries[r],h="journal"in u?u.journal():void 0;this.removeQuery(r),this.addQuery(r,o,l,{...h?{journal:h}:[],...f?{paginationOptions:f}:{}})}}destroy(){for(const n of Object.keys(this.queries))this.removeQuery(n);this.listeners=new Set}addQuery(n,r,o,{paginationOptions:l,journal:u}){if(this.queries[n]!==void 0)throw new Error(`Tried to add a new query with identifier ${n} when it already exists.`);const f=this.createWatch(r,o,{...u?{journal:u}:[],...l?{paginationOptions:l}:{}}),h=f.onUpdate(()=>this.notifyListeners());this.queries[n]={query:r,args:o,watch:f,unsubscribe:h,...l?{paginationOptions:l}:{}}}removeQuery(n){const r=this.queries[n];if(r===void 0)throw new Error(`No query found with identifier ${n}.`);r.unsubscribe(),delete this.queries[n]}notifyListeners(){for(const n of this.listeners)n()}}function v6(e){const n=d6();if(n===void 0)throw new Error("Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");const r=P.useMemo(()=>(o,l,{journal:u,paginationOptions:f})=>f?n.watchPaginatedQuery(o,l,f):n.watchQuery(o,l,u?{journal:u}:{}),[n]);return b6(e,r)}function b6(e,n){const[r]=P.useState(()=>new y6(n));r.createWatch!==n&&r.setCreateWatch(n),P.useEffect(()=>()=>r.destroy(),[r]);const o=P.useMemo(()=>({getCurrentValue:()=>r.getLocalResults(e),subscribe:l=>(r.setQueries(e),r.subscribe(l))}),[r,e]);return o6(o)}const S6=P.createContext(void 0);function w6({children:e,client:n,useAuth:r}){const{isLoading:o,isAuthenticated:l,fetchAccessToken:u}=r(),[f,h]=P.useState(null),[p,m]=P.useState(!1);o&&f!==null&&(h(null),m(!1)),!o&&!l&&f!==!1&&(h(!1),m(!1));const v=l&&(f??!1);return Xt.createElement(S6.Provider,{value:{isLoading:f===null,isAuthenticated:v,isRefreshing:p&&v}},Xt.createElement(_6,{authProviderAuthenticated:l,fetchAccessToken:u,authProviderLoading:o,client:n,setIsConvexAuthenticated:h,setIsRefreshing:m}),Xt.createElement(h6,{client:n},e),Xt.createElement(E6,{authProviderAuthenticated:l,fetchAccessToken:u,authProviderLoading:o,client:n,setIsConvexAuthenticated:h,setIsRefreshing:m}))}function _6({authProviderAuthenticated:e,fetchAccessToken:n,authProviderLoading:r,client:o,setIsConvexAuthenticated:l,setIsRefreshing:u}){return P.useEffect(()=>{let f=!0;if(e)return o.setAuth(n,h=>{f&&l(()=>h)},h=>{f&&u(h)}),()=>{f=!1,l(h=>h?!1:null),u(!1)}},[e,n,r,o,l,u]),null}function E6({authProviderAuthenticated:e,fetchAccessToken:n,authProviderLoading:r,client:o,setIsConvexAuthenticated:l,setIsRefreshing:u}){return P.useEffect(()=>{if(e)return()=>{o.clearAuth(),l(()=>null),u(!1)}},[e,n,r,o,l,u]),null}const C6=Object.prototype.toString,T6=e=>C6.call(e)==="[object Error]",R6=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function A6(e){if(!(e&&T6(e)&&e.name==="TypeError"&&typeof e.message=="string"))return!1;const{message:r,stack:o}=e;return r==="Load failed"?o===void 0||"__sentry_captured__"in e:r.startsWith("error sending request for url")||r==="Failed to fetch"||r.startsWith("Failed to fetch (")&&r.endsWith(")")?!0:R6.has(r)}const Xf=[500,2e3],x6=100,h0=P.createContext(void 0),p0=P.createContext(void 0);function O6(){return P.useContext(p0)}const M6=P.createContext(null),Kf="__convexAuthOAuthVerifier",Tl="__convexAuthJWT",Rl="__convexAuthRefreshToken",r1="__convexAuthServerStateFetchTime";function z6({client:e,serverState:n,onChange:r,shouldHandleCode:o,storage:l,storageNamespace:u,replaceURL:f,children:h}){const p=P.useRef(n?._state.token??null),[m,v]=P.useState(p.current===null),[y,w]=P.useState(p.current),b=e.verbose??!1,C=P.useCallback(ue=>{b&&(console.debug(`${new Date().toISOString()} ${ue}`),e.logger?.logVerbose(ue))}
133,[b]),{storageSet:O,storageGet:R,storageRemove:z,storageKey:H}=k6(l,u),[$,B]=P.useState(!1),W=P.useCallback(async ue=>{const U=p.current!==null;let Z;if(ue.tokens===null)p.current=null,ue.shouldStore&&(await z(Tl),await z(Rl)),Z=null;else{const{token:re}=ue.tokens;if(p.current=re,ue.shouldStore){const{refreshToken:he}=ue.tokens;await O(Tl,re),await O(Rl,he)}Z=re}U!==(Z!==null)&&await r?.(),w(Z),v(!1)},[O,z]);P.useEffect(()=>{const ue=async U=>{if($){U.preventDefault();const Z="Are you sure you want to leave? Your changes may not be saved.";return U.returnValue=!0,Z}};return i1("beforeunload",ue),()=>{o1("beforeunload",ue)}}),P.useEffect(()=>{const ue=U=>{(async()=>{if(U.storageArea===l&&U.key===H(Tl)){const Z=U.newValue;C(`synced access token, is null: ${Z===null}`),await W({shouldStore:!1,tokens:Z===null?null:{token:Z}})}})()};return i1("storage",ue),()=>o1("storage",ue)},[W]);const te=P.useCallback(async ue=>{let U,Z=0;for(;Z<Xf.length;)try{return await e.unauthenticatedCall("auth:signIn","code"in ue?{params:{code:ue.code},verifier:ue.verifier}:ue)}catch(re){if(U=re,!A6(re))break;const he=Xf[Z]+x6*Math.random();Z++,C(`verifyCode failed with network error, retry ${Z} of ${Xf.length} in ${he}ms`),await new Promise(x=>setTimeout(x,he))}throw U},[e]),V=P.useCallback(async ue=>{const{tokens:U}=await te(ue);return C(`retrieved tokens, is null: ${U===null}`),await W({shouldStore:!0,tokens:U??null}),U!==null},[e,W]),F=P.useCallback(async(ue,U)=>{const Z=U instanceof FormData?Array.from(U.entries()).reduce((x,[E,L])=>(x[E]=L,x),{}):U??{},re=await R(Kf)??void 0;await z(Kf);const he=await e.authenticatedCall("auth:signIn",{provider:ue,params:Z,verifier:re});if(he.redirect!==void 0){const x=new URL(he.redirect);return await O(Kf,he.verifier),navigator.product!=="ReactNative"&&(window.location.href=x.toString()),{signingIn:!1,redirect:x}}else if(he.tokens!==void 0){const{tokens:x}=he;return C(`signed in and got tokens, is null: ${x===null}`),await W({shouldStore:!0,tokens:x}),{signingIn:he.tokens!==null}}return{signingIn:!1}},[e,W,R]),ne=P.useCallback(async()=>{try{await e.authenticatedCall("auth:signOut")}catch{}C("signed out, erasing tokens"),await W({shouldStore:!0,tokens:null})},[W,e]),fe=P.useCallback(async({forceRefreshToken:ue})=>{if(ue){const U=p.current;return await N6(Rl,async()=>{const Z=p.current;if(Z!==U)return C(`returning synced token, is null: ${Z===null}`),Z;const re=await R(Rl)??null;return re!==null?(B(!0),await V({refreshToken:re}).finally(()=>{B(!1)}),C(`returning retrieved token, is null: ${Z===null}`),p.current):(B(!1),C("returning null, there is no refresh token"),null)})}return p.current},[V,ne,R]),se=P.useRef(!1);P.useEffect(()=>{if(l===void 0)throw new Error("`localStorage` is not available in this environment, set the `storage` prop on `ConvexAuthProvider`!");const ue=async()=>{const Z=await R(Tl)??null;C(`retrieved token from storage, is null: ${Z===null}`),await W({shouldStore:!1,tokens:Z===null?null:{token:Z}})};if(n!==void 0){const Z=R(r1),re=he=>{if(!he||n._timeFetched>+he){const{token:x,refreshToken:E}=n._state,L=x===null||E===null?null:{token:x,refreshToken:E};O(r1,n._timeFetched.toString()),W({tokens:L,shouldStore:!0})}else ue()};Z instanceof Promise?Z.then(re):re(Z);return}const U=typeof window?.location?.search<"u"?new URLSearchParams(window.location.search).get("code"):null;if(!se.current)if(U&&(o===void 0||(typeof o=="function"?o():o))){se.current=!0;const Z=new URL(window.location.href);Z.searchParams.delete("code"),(async()=>(await f(Z.pathname+Z.search+Z.hash),await F(void 0,{code:U}),se.current=!1))()}else ue()},[e,R]);const le=P.useMemo(()=>({signIn:F,signOut:ne}),[F,ne]),$e=y!==null,xe=P.useMemo(()=>({isLoading:m,isAuthenticated:$e,fetchAccessToken:fe}),[fe,m,$e]);return X.jsx(p0.Provider,{value:xe,children:X.jsx(h0.Provider,{value:le,children:X.jsx(M6.Provider,{value:y,children:h})})})}function k6(e,n){const r=L6(),o=P.useMemo(()=>e??r(),[e]),l=n.replace(/[^a-zA-Z0-9]/g,""),u=P.useCallback(m=>`${m}_${l}`,[n]),f=P.useCallback((m,v)=>o.setItem(u(m),v),[o,u]),h=P.useCallback(m=>o.getItem(u(m)),[o,u]),p=P.useCallback(m=>o.removeItem(u(m)),[o,u]);return{storageSet:f,storageGet:h,storageRemove:p,storageKey:u}}function L6(){const[e,n]=P.useState({});return()=>({getItem:r=>e[r],setItem:(r,o)=>{n(l=>({...l,[r]:o}))},removeItem:r=>{n(o=>{const{[r]:l,...u}=o;return u})}})}async function N6(e,n){const r=window?.navigator?.locks;return r!==void 0?await r.request(e,n):await D6(e,n)}function Al(e){globalThis.__convexAuthMutexes===void 0&&(globalThis.__convexAuthMutexes={});let n=globalThis.__convexAuthMutexes[e];return n===void 0&&(globalThis.__convexAuthMutexes[e]={currentlyRunning:null,waiting:[]}),n=globalThis.__convexAuthMutexes[e],n}function Ff(e,n){globalThis.__convexAuthMutexes[e]=n}async function m0(e,n){const r=Al(e);r.currentlyRunning===null?Ff(e,{currentlyRunning:n().finally(()=>{const o=Al(e).waiting.shift();Al(e).currentlyRunning=null,Ff(e,{...Al(e),currentlyRunning:o===void 0?null:m0(e,o)})}),waiting:[]}):Ff(e,{...r,waiting:[...r.waiting,n]})}async function D6(e,n){return new Promise((o,l)=>{m0(e,()=>n().then(f=>o(f)).catch(f=>l(f)))})}function i1(e,n,r){typeof window>"u"||window.addEventListener?.(e,n,r)}function o1(e,n,r){typeof window>"u"||window.removeEventListener?.(e,n,r)}function V7(){return P.useContext(h0)}function U6(e){const{client:n,storage:r,storageNamespace:o,replaceURL:l,shouldHandleCode:u,children:f}=e,h=P.useMemo(()=>({authenticatedCall(p,m){return n.action(p,m)},unauthenticatedCall(p,m){return new f0(n.address,{logger:n.logger}).action(p,m)}
133,verbose:n.options?.verbose,logger:n.logger}),[n]);return X.jsx(z6,{client:h,storage:r??(typeof window>"u"?void 0:window?.localStorage),storageNamespace:o??n.address,replaceURL:l??(p=>{window.history.replaceState({},"",p)}),shouldHandleCode:u,children:X.jsx(w6,{client:n,useAuth:O6,children:f})})}const B6="https://glad-cassowary-98.eu-west-1.convex.cloud",j6=new f6(B6);function q6({children:e}){return X.jsx(U6,{client:j6,children:e})}const au=hE({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{name:"theme-color",content:"#1f6b37"},{name:"robots",content:"index, follow"},{property:"og:site_name",content:"Zdravotní poradce Zdraví bez léků"},{property:"og:locale",content:"cs_CZ"},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"icon",type:"image/x-icon",href:"/favicon.ico",sizes:"any"},{rel:"icon",type:"image/svg+xml",href:"/favicon.svg"},{rel:"apple-touch-icon",href:"/logo192.png"},{rel:"manifest",href:"/manifest.json"}]}),shellComponent:H6});function H6({children:e}){return X.jsxs("html",{lang:"cs",suppressHydrationWarning:!0,children:[X.jsxs("head",{children:[X.jsx("meta",{name:"ai-generated",content:"true"}),X.jsx("script",{dangerouslySetInnerHTML:{__html:`
134(async function () {
135  setTimeout(() => {
136    var container = document.querySelector("[data-platform-badge-container]");
137    var badge = document.querySelector("a[data-platform-badge]");
138    var closeBtn = document.querySelector("[data-platform-badge-close]");
139    if (!container || !badge) {
140      return;
141    }
142
143    // Lay the badge out as a black pill: wordmark on the left, dismiss (×) on
144    // the right, vertically centered with the wordmark. Styling is applied from
145    // the script so the injected markup stays free of pill styling.
146    // Cap the whole pill (wordmark + ×) at the viewport so a long whitelabel
147    // badge can't push the fixed, right-anchored container off the left edge.
148    container.style.cssText = "position:fixed;bottom:10px;right:10px;display:none;align-items:center;max-width:calc(100vw - 20px);background:#000;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,0.18);z-index:2147483647;";
149
150    // The close (×) button lets visitors dismiss the badge until the next page load.
151    if (closeBtn) {
152      closeBtn.style.cssText = "display:none;align-self:stretch;align-items:center;justify-content:center;padding:0 8px 0 2px;border:none;background:transparent;color:rgba(255,255,255,0.8);font-family:Arial,sans-serif;font-size:16px;line-height:1;cursor:pointer;";
153      closeBtn.addEventListener("click", function (e) {
154        e.preventDefault();
155        e.stopPropagation();
156        container.style.display = "none";
157      });
158    }
159
160    // Fetch badge-config
161    fetch("https://www.macaly.com" + '/api/badge-config?chatId=' + encodeURIComponent("dphu4hjpsqbrmxulk4960we2"))
162      .then(function (res) {
163        return res.json();
164      })
165      .then(function (data) {
166        // Set badge link and show badge
167        if (badge) {
168          badge.href = data.link;
169          var isTextBadge = typeof data.content === "string" && !!data.content.trim();
170          if (isTextBadge) {
171            // The default SVG draws its own pill; custom text needs one on the anchor.
172            // Shrink within the container (which is capped to the viewport) and
173            // reserve room for the × instead of overflowing past it.
174            badge.style.cssText += "align-items:center;justify-content:center;border-radius:999px;background:#000;color:#fff;padding:8px 12px;font-family:Arial,sans-serif;font-size:13px;font-weight:600;line-height:16px;min-width:0;flex:0 1 auto;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;";
175            badge.textContent = data.content;
176          }
177          if (data.badgeVisibility) {
178            badge.style.display = isTextBadge ? "inline-flex" : "block";
179            container.style.display = "inline-flex";
180            if (closeBtn) {
181              closeBtn.style.display = "flex";
182            }
183          }
184        }
185      });
186  }, 200);
187})();
188`}}),X.jsx("script",{dangerouslySetInnerHTML:{__html:`
189(function() {
190 var s = document.createElement('script');
191 s.src = 'https://www.macaly.com/js/platform-app.js';
192 s.defer = true;
193 s.setAttribute('data-url', 'https://m.lilstts.com/events');
194 document.head.appendChild(s);
195})();
196`}}),X.jsx(LE,{}),X.jsx("script",{async:!0,src:"https://www.googletagmanager.com/gtag/js?i
196d=G-F5KDBHPQW7"}),X.jsx("script",{dangerouslySetInnerHTML:{__html:"
vendor: 127 bytes, line 196
196window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '
196G-F5KDBHPQW7
vendor: 3 bytes, line 196
196');
196"}})]}),X.jsx($5,{children:X.jsxs("body",{children:[X.jsx(q6,{children:e}),X.jsx(NE,{})]})}),X.jsxs("div",{"data-platform-badge-container":!0,style:{position:"fixed",bottom:"10px",right:"10px",display:"none"},children:[X.jsx("a",{"data-platform-badge":!0,style:{cursor:"pointer",display:"block"},href:"",target:"_blank",rel:"noopener noreferrer",children:X.jsxs("svg",{width:"172",height:"28",viewBox:"0 0 172 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img",children:[X.jsx("title",{children:"Made with AI in Macaly"}),X.jsx("rect",{width:"172",height:"28",rx:"5",fill:"black",style:{fill:"black",fillOpacity:1}}),X.jsx("path",{d:"M10.9891 10.7273H12.0402L14.5118 16.7642H14.597L17.0686 10.7273H18.1198V18H17.2959V12.4744H17.2249L14.9521 18H14.1567L11.884 12.4744H11.8129V18H10.9891V10.7273ZM21.377 18.1278C21.0314 18.1278 20.7177 18.0627 20.436 17.9325C20.1543 17.8 19.9305 17.6094 19.7648 17.3608C19.5991 17.1098 19.5162 16.8068 19.5162 16.4517C19.5162 16.1392 19.5778 15.8859 19.7009 15.6918C19.824 15.4953 19.9885 15.3414 20.1945 15.2301C20.4005 15.1188 20.6278 15.036 20.8763 14.9815C21.1273 14.9247 21.3794 14.8797 21.6327 14.8466C21.9642 14.804 22.2329 14.772 22.4388 14.7507C22.6472 14.727 22.7987 14.688 22.8934 14.6335C22.9904 14.5791 23.039 14.4844 23.039 14.3494V14.321C23.039 13.9706 22.9431 13.6984 22.7513 13.5043C22.5619 13.3101 22.2743 13.2131 21.8884 13.2131C21.4883 13.2131 21.1746 13.3007 20.9474 13.4759C20.7201 13.651 20.5603 13.8381 20.468 14.0369L19.6725 13.7528C19.8145 13.4214 20.0039 13.1634 20.2407 12.9787C20.4798 12.7917 20.7402 12.6615 21.0219 12.5881C21.306 12.5123 21.5854 12.4744 21.86 12.4744C22.0352 12.4744 22.2364 12.4957 22.4637 12.5384C22.6933 12.5786 22.9147 12.6626 23.1278 12.7905C23.3432 12.9183 23.5219 13.1113 23.664 13.3693C23.806 13.6274 23.877 13.973 23.877 14.4062V18H23.039V17.2614H22.9964C22.9395 17.3797 22.8448 17.5064 22.7123 17.6413C22.5797 17.7763 22.4033 17.8911 22.1831 17.9858C21.963 18.0805 21.6943 18.1278 21.377 18.1278ZM21.5049 17.375C21.8363 17.375 22.1157 17.3099 22.343 17.1797C22.5726 17.0495 22.7454 16.8814 22.8614 16.6754C22.9798 16.4695 23.039 16.2528 23.039 16.0256V15.2585C23.0035 15.3011 22.9253 15.3402 22.8046 15.3757C22.6862 15.4089 22.5489 15.4384 22.3927 15.4645C22.2388 15.4882 22.0885 15.5095 21.9417 15.5284C21.7973 15.545 21.6801 15.5592 21.5901 15.571C21.3723 15.5994 21.1687 15.6456 20.9793 15.7095C20.7923 15.7711 20.6408 15.8646 20.5248 15.9901C20.4111 16.1132 20.3543 16.2812 20.3543 16.4943C20.3543 16.7855 20.462 17.0057 20.6775 17.1548C20.8953 17.3016 21.1711 17.375 21.5049 17.375ZM27.4664 18.1136C27.0118 18.1136 26.6105 17.9988 26.2625 17.7692C25.9145 17.5372 25.6423 17.2105 25.4458 16.7891C25.2493 16.3653 25.151 15.8646 25.151 15.2869C25.151 14.714 25.2493 14.2169 25.4458 13.7955C25.6423 13.3741 25.9157 13.0485 26.2661 12.8189C26.6164 12.5893 27.0213 12.4744 27.4806 12.4744C27.8357 12.4744 28.1162 12.5336 28.3222 12.652C28.5305 12.768 28.6891 12.9006 28.798 13.0497C28.9093 13.1965 28.9957 13.3172 29.0573 13.4119H29.1283V10.7273H29.9664V18H29.1567V17.1619H29.0573C28.9957 17.2614 28.9081 17.3868 28.7945 17.5384C28.6808 17.6875 28.5187 17.8213 28.308 17.9396C28.0973 18.0556 27.8167 18.1136 27.4664 18.1136ZM27.58 17.3608C27.9162 17.3608 28.2003 17.2732 28.4323 17.098C28.6643 16.9205 28.8406 16.6754 28.9614 16.3629C29.0821 16.0481 29.1425 15.6847 29.1425 15.2727C29.1425 14.8655 29.0833 14.5092 28.9649 14.2038C28.8466 13.8961 28.6714 13.657 28.4394 13.4865C28.2074 13.3137 27.9209 13.2273 27.58 13.2273C27.2249 13.2273 26.9289 13.3184 26.6922 13.5007C26.4578 13.6806 26.2815 13.9257 26.1631 14.2358C26.0471 14.5436 25.9891 14.8892 25.9891 15.2727C25.9891 15.661 26.0483 16.0137 26.1666 16.331C26.2874 16.6458 26.4649 16.8968 26.6993 17.0838C26.9361 17.2685 27.2296 17.3608 27.58 17.3608ZM33.9046 18.1136C33.379 18.1136 32.9256 17.9976 32.5445 17.7656C32.1657 17.5312 31.8733 17.2045 31.6673 16.7855C31.4637 16.3641 31.3619 15.8741 31.3619 15.3153C31.3619 14.7566 31.4637 14.2642 31.6673 13.8381C31.8733 13.4096 32.1598 13.0758 32.5267 12.8366C32.896 12.5952 33.3269 12.4744 33.8193 12.4744C34.1034 12.4744 34.384 12.5218 34.661 12.6165C34.9379 12.7112 35.1901 12.8651 35.4173 13.0781C35.6446 13.2888 35.8257 13.5682 35.9607 13.9162C36.0956 14.2642 36.1631 14.6927 36.1631 15.2017V15.5568H31.9585V14.8324H35.3108C35.3108 14.5246 35.2493 14.25 35.1262 14.0085C35.0054 13.767 34.8326 13.5765 34.6077 13.4368C34.3852 13.2971 34.1224 13.2273 33.8193 13.2273C33.4855 13.2273 33.1967 13.3101 32.9529 13.4759C32.7114 13.6392 32.5255 13.8523 32.3953 14.1151C32.2651 14.3778 32.2 14.6596 32.2 14.9602V15.4432C32.2 15.8551 32.271 16.2043 32.4131 16.4908C32.5575 16.7749 32.7575 16.9915 33.0132 17.1406C33.2689 17.2874 33.566 17.3608 33.9046 17.3608C34.1247 17.3608 34.3236 17.33 34.5012 17.2685C34.6811 17.2045 34.8361 17.1098 34.9664 16.9844C35.0966 16.8565 35.1972 16.6979 35.2682 16.5085L36.0779 16.7358C35.9926 17.0104 35.8494 17.2519 35.6482 17.4602C35.4469 17.6662 35.1984 17.8272 34.9024 17.9432C34.6065 18.0568 34.2739 18.1136 33.9046 18.1136ZM41.4862 18L39.8243 12.5455H40.705L41.884 16.7216H41.9408L43.1056 12.5455H44.0004L45.
196151 16.7074H45.2078L46.3868 12.5455H47.2675L45.6056 18H44.7817L43.5885 13.8097H43.5033L42.3101 18H41.4862ZM48.3754 18V12.5455H49.2135V18H48.3754ZM48.8016 11.6364C48.6382 11.6364 48.4974 11.5807 48.379 11.4695C48.263 11.3582 48.205 11.2244 48.205 11.0682C48.205 10.9119 48.263 10.7782 48.379 10.6669C48.4974 10.5556 48.6382 10.5 48.8016 10.5C48.9649 10.5 49.1046 10.5556 49.2206 10.6669C49.339 10.7782 49.3982 10.9119 49.3982 11.0682C49.3982 11.2244 49.339 11.3582 49.2206 11.4695C49.1046 11.5807 48.9649 11.6364 48.8016 11.6364ZM53.1206 12.5455V13.2557H50.2939V12.5455H53.1206ZM51.1178 11.2386H51.9559V16.4375C51.9559 16.6742 51.9902 16.8518 52.0589 16.9702C52.1299 17.0862 52.2198 17.1643 52.3287 17.2045C52.44 17.2424 52.5572 17.2614 52.6803 17.2614C52.7726 17.2614 52.8484 17.2566 52.9076 17.2472C52.9668 17.2353 53.0141 17.2259 53.0496 17.2188L53.2201 17.9716C53.1633 17.9929 53.084 18.0142 52.9822 18.0355C52.8804 18.0592 52.7513 18.071 52.5951 18.071C52.3583 18.071 52.1263 18.0201 51.8991 17.9183C51.6742 17.8165 51.4871 17.6615 51.338 17.4531C51.1912 17.2448 51.1178 16.982 51.1178 16.6648V11.2386ZM55.3366 14.7188V18H54.4985V10.7273H55.3366V13.3977H55.4076C55.5354 13.116 55.7272 12.8923 55.9829 12.7266C56.2409 12.5585 56.5842 12.4744 57.0127 12.4744C57.3844 12.4744 57.7099 12.549 57.9893 12.6982C58.2686 12.8449 58.4852 13.071 58.6391 13.3764C58.7954 13.6795 58.8735 14.0653 58.8735 14.5341V18H58.0354V14.5909C58.0354 14.1577 57.923 13.8227 57.6981 13.5859C57.4755 13.3468 57.1666 13.2273 56.7712 13.2273C56.4966 13.2273 56.2504 13.2853 56.0326 13.4013C55.8171 13.5173 55.6467 13.6866 55.5212 13.9091C55.3981 14.1316 55.3366 14.4015 55.3366 14.7188ZM63.6311 18H62.7078L65.3783 10.7273H66.2874L68.9578 18H68.0345L65.8612 11.8778H65.8044L63.6311 18ZM63.972 15.1591H67.6936V15.9403H63.972V15.1591ZM70.9713 10.7273V18H70.0906V10.7273H70.9713ZM75.436 18V12.5455H76.2741V18H75.436ZM75.8621 11.6364C75.6988 11.6364 75.5579 11.5807 75.4395 11.4695C75.3235 11.3582 75.2655 11.2244 75.2655 11.0682C75.2655 10.9119 75.3235 10.7782 75.4395 10.6669C75.5579 10.5556 75.6988 10.5 75.8621 10.5C76.0255 10.5 76.1652 10.5556 76.2812 10.6669C76.3995 10.7782 76.4587 10.9119 76.4587 11.0682C76.4587 11.2244 76.3995 11.3582 76.2812 11.4695C76.1652 11.5807 76.0255 11.6364 75.8621 11.6364ZM78.6471 14.7188V18H77.809V12.5455H78.6187V13.3977H78.6897C78.8176 13.1207 79.0117 12.8982 79.2721 12.7301C79.5325 12.5597 79.8687 12.4744 80.2806 12.4744C80.6499 12.4744 80.9731 12.5502 81.2501 12.7017C81.5271 12.8509 81.7425 13.0781 81.8964 13.3835C82.0503 13.6866 82.1272 14.0701 82.1272 14.5341V18H81.2892V14.5909C81.2892 14.1624 81.1779 13.8286 80.9553 13.5895C80.7328 13.348 80.4274 13.2273 80.0392 13.2273C79.7716 13.2273 79.5325 13.2853 79.3218 13.4013C79.1135 13.5173 78.949 13.6866 78.8282 13.9091C78.7075 14.1316 78.6471 14.4015 78.6471 14.7188Z",fill:"white",style:{fill:"white",fillOpacity:1}}),X.jsx("path",{d:"M96.3039 7.14491C96.642 6.9517 97.0575 6.9517 97.3956 7.14491L100.7 9.03316L95.9035 11.7733C94.6199 12.507 94.6199 14.3583 95.9035 15.0919L100.7 17.8321L97.3956 19.7203C97.0575 19.9135 96.642 19.9135 96.3039 19.7203L93.5539 18.149C93.2114 17.9532 93.0001 17.5886 93 17.194V9.67122C93 9.27662 93.2114 8.91208 93.5539 8.71623L96.3039 7.14491ZM104.003 7.14491C104.342 6.95176 104.757 6.95171 105.095 7.14491L107.844 8.71623C108.187 8.91207 108.399 9.27658 108.399 9.67122V17.194C108.399 17.5886 108.187 17.9532 107.844 18.149L105.095 19.7203C104.757 19.9135 104.342 19.9135 104.003 19.7203L100.7 17.8321L105.495 15.0919C106.779 14.3583 106.779 12.507 105.495 11.7733L100.7 9.03316L104.003 7.14491ZM96.8494 12.3328C97.4568 12.3328 97.9494 12.825 97.9495 13.4323C97.9495 14.0397 97.4569 14.5324 96.8494 14.5324C96.2421 14.5323 95.75 14.0396 95.75 13.4323C95.7502 12.8251 96.2422 12.333 96.8494 12.3328ZM104.549 12.3328C105.156 12.3328 105.649 12.825 105.649 13.4323C105.649 14.0397 105.156 14.5324 104.549 14.5324C103.942 14.5324 103.449 14.0397 103.449 13.4323C103.449 12.825 103.942 12.3329 104.549 12.3328Z",fill:"white",style:{fill:"white",fillOpacity:1}}),X.jsx("path",{d:"M155.347 22L156.971 18.3558L153.724 11.1174H155.693L157.948 16.2581L160.082 11.1174H161.991L157.256 22H155.347Z",fill:"white",style:{fill:"white",fillOpacity:1}}),X.jsx("path",{d:"M151.273 18.6929V8.17139H153.077V18.6929H151.273Z",fill:"white",style:{fill:"white",fillOpacity:1}}),X.jsx("path",{d:"M145.919 18.8736C145.297 18.8736 144.781 18.7684 144.37 18.5579C143.96 18.3475 143.654 18.0669 143.453 17.7162C143.253 17.3654 143.153 16.9847 143.153 16.5
196738C143.153 16.0928 143.273 15.677 143.514 15.3262C143.764 14.9755 144.13 14.7049 144.611 14.5145C145.092 14.3141 145.683 14.2139 146.385 14.2139H148.294C148.294 13.8131 148.239 13.4824 148.128 13.2219C148.018 12.9513 147.848 12.7509 147.617 12.6206C147.387 12.4904 147.091 12.4252 146.73 12.4252C146.32 12.4252 145.969 12.5204 145.678 12.7108C145.388 12.8912 145.207 13.1718 145.137 13.5526H143.363C143.423 13.0114 143.604 12.5505 143.904 12.1697C144.205 11.7789 144.601 11.4783 145.092 11.2678C145.593 11.0474 146.139 10.9371 146.73 10.9371C147.442 10.9371 148.048 11.0624 148.549 11.3129C149.05 11.5534 149.431 11.9041 149.692 12.3651C149.962 12.816 150.098 13.3622 150.098 14.0035V18.6932H148.564L148.384 17.4757C148.284 17.6761 148.154 17.8615 147.993 18.0318C147.843 18.2022 147.667 18.3525 147.467 18.4828C147.267 18.603 147.036 18.6982 146.776 18.7684C146.525 18.8385 146.239 18.8736 145.919 18.8736ZM146.325 17.4456C146.615 17.4456 146.871 17.3955 147.091 17.2953C147.322 17.1851 147.517 17.0348 147.677 16.8444C147.848 16.644 147.978 16.4235 148.068 16.183C148.159 15.9425 148.219 15.687 148.249 15.4164V15.3863H146.58C146.229 15.3863 145.939 15.4314 145.708 15.5216C145.478 15.6018 145.312 15.722 145.212 15.8824C145.112 16.0427 145.062 16.2281 145.062 16.4385C145.062 16.649 145.112 16.8293 145.212 16.9796C145.312 17.13 145.458 17.2452 145.648 17.3254C145.839 17.4055 146.064 17.4456 146.325 17.4456Z",fill:"white",style:{fill:"white",fillOpacity:1}}),X.jsx("path",{d:"M138.783 18.8736C138.041 18.8736 137.375 18.7082 136.784 18.3775C136.202 18.0368 135.746 17.5709 135.416 16.9796C135.095 16.3784 134.935 15.697 134.935 14.9354C134.935 14.1438 135.095 13.4523 135.416 12.8611C135.746 12.2599 136.202 11.7889 136.784 11.4482C137.375 11.1075 138.046 10.9371 138.798 10.9371C139.74 10.9371 140.532 11.1877 141.173 11.6887C141.773 12.1479 142.171 12.7694 142.368 13.553H140.459C140.346 13.2493 140.153 13.0036 139.88 12.816C139.569 12.5956 139.199 12.4853 138.768 12.4853C138.397 12.4853 138.056 12.5805 137.746 12.7709C137.445 12.9613 137.204 13.2369 137.024 13.5976C136.854 13.9584 136.768 14.3943 136.768 14.9054C136.768 15.2962 136.819 15.6419 136.919 15.9425C137.019 16.2431 137.159 16.4987 137.34 16.7091C137.53 16.9095 137.746 17.0648 137.986 17.1751C138.227 17.2853 138.487 17.3404 138.768 17.3404C139.058 17.3404 139.319 17.2953 139.549 17.2051C139.79 17.1049 139.99 16.9596 140.151 16.7692C140.321 16.5788 140.441 16.3534 140.511 16.0928H142.406C142.225 16.9346 141.814 17.611 141.173 18.122C140.532 18.6231 139.735 18.8736 138.783 18.8736Z",fill:"white",style:{fill:"white",fillOpacity:1}}),X.jsx("path",{d:"M129.836 18.8736C129.214 18.8736 128.698 18.7684 128.287 18.5579C127.877 18.3475 127.571 18.0669 127.37 17.7162C127.17 17.3654 127.07 16.9847 127.07 16.5738C127.07 16.0928 127.19 15.677 127.431 15.3262C127.681 14.9755 128.047 14.7049 128.528 14.5145C129.009 14.3141 129.6 14.2139 130.302 14.2139H132.211C132.211 13.8131 132.156 13.4824 132.045 13.2219C131.935 12.9513 131.765 12.7509 131.534 12.6206C131.304 12.4904 131.008 12.4252 130.647 12.4252C130.237 12.4252 129.886 12.5204 129.595 12.7108C129.305 12.8912 129.124 13.1718 129.054 13.5526H127.28C127.34 13.0114 127.521 12.5505 127.821 12.1697C128.122 11.7789 128.518 11.4783 129.009 11.2678C129.51 11.0474 130.056 10.9371 130.647 10.9371C131.359 10.9371 131.965 11.0624 132.466 11.3129C132.967 11.5534 133.348 11.9041 133.609 12.3651C133.879 12.816 134.015 13.3622 134.015 14.0035V18.6932H132.481L132.301 17.4757C132.201 17.6761 132.07 17.8615 131.91 18.0318C131.76 18.2022 131.584 18.3525 131.384 18.4828C131.184 18.603 130.953 18.6982 130.693 18.7684C130.442 18.8385 130.156 18.8736 129.836 18.8736ZM130.242 17.4456C130.532 17.4456 130.788 17.3955 131.008 17.2953C131.239 17.1851 131.434 17.0348 131.594 16.8444C131.765 16.644 131.895 16.4235 131.985 16.183C132.076 15.9425 132.136 15.687 132.166 15.4164V15.3863H130.497C130.146 15.3863 129.856 15.4314 129.625 15.5216C129.395 15.6018 129.229 15.722 129.129 15.8824C129.029 16.0427 128.979 16.2281 128.979 16.4385C128.979 16.649 129.029 16.8293 129.129 16.9797C129.229 17.13 
196129.375 17.2452 129.565 17.3254C129.756 17.4055 129.981 17.4456 130.242 17.4456Z",fill:"white",style:{fill:"white",fillOpacity:1}}),X.jsx("path",{d:"M114.998 18.6932V8.17139H117.133L120.5 14.9655L123.837 8.17139H125.987V18.6932H124.183V11.2678L121.206 17.2201H119.793L116.802 11.2828V18.6932H114.998Z",fill:"white",style:{fill:"white",fillOpacity:1}})]})}),X.jsx("button",{"data-platform-badge-close":!0,type:"button","aria-label":"Hide badge",style:{display:"none"},children:"×"})]})]})}const P6="modulepreload",$6=function(e){return"/"+e},s1={},Dd=function(n,r,o){let l=Promise.resolve();if(r&&r.length>0){let p=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");l=p(r.map(m=>{if(m=$6(m),m in s1)return;s1[m]=!0;const v=m.endsWith(".css"),y=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const w=document.createElement("link");if(w.rel=v?"stylesheet":P6,v||(w.as="script"),w.crossOrigin="",w.href=m,h&&w.setAttribute("nonce",h),document.head.appendChild(w),v)return new Promise((b,C)=>{w.addEventListener("load",b),w.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return l.then(f=>{for(const h of f||[])h.status==="rejected"&&u(h.reason);return n().catch(u)})};function K(e,n,r){function o(h,p){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:p,constr:f,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),n(h,p);const m=f.prototype,v=Object.keys(m);for(let y=0;y<v.length;y++){const w=v[y];w in h||(h[w]=m[w].bind(h))}}const l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function f(h){var p;const m=r?.Parent?new u:this;o(m,h),(p=m._zod).deferred??(p.deferred=[]);for(const v of m._zod.deferred)v();return m}return Object.defineProperty(f,"init",{value:o}),Object.defineProperty(f,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class vi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class g0 extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const y0={};function gr(e){return y0}function v0(e){const n=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,l])=>n.indexOf(+o)===-1).map(([o,l])=>l)}function dd(e,n){return typeof n=="bigint"?n.toString():n}function Ud(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Bd(e){return e==null}function jd(e){const n=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(n,r)}const l1=Symbol("evaluating");function ze(e,n,r){let o;Object.defineProperty(e,n,{get(){if(o!==l1)return o===void 0&&(o=l1,o=r()),o},set(l){Object.defineProperty(e,n,{value:l})},configurable:!0})}function Sr(e,n,r){Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ba(...e){const n={};for(const r of e){const o=Object.getOwnPropertyDescriptors(r);Object.assign(n,o)}return Object.defineProperties({},n)}function u1(e){return JSON.stringify(e)}function V6(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const b0="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Il(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Z6=Ud(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Io(e){if(Il(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const r=n.prototype;return!(Il(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function S0(e){return Io(e)?{...e}:Array.isArray(e)?[...e]:e}const I6=new Set(["string","number","symbol"]);function ru(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ja(e,n,r){const o=new e._zod.constr(n??e._zod.def);return(!n||r?.parent)&&(o._zod.parent=e),o}function pe(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Q6(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}
vendor: 5,748 bytes, line 196
196function G6(e,n){const r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Ba(e._zod.def,{get shape(){const f={};for(const h in n){if(!(h in r.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(f[h]=r.shape[h])}return Sr(this,"shape",f),f},checks:[]});return ja(e,u)}function Y6(e,n){const r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Ba(e._zod.def,{get shape(){const f={...e._zod.def.shape};for(const h in n){if(!(h in r.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&delete f[h]}return Sr(this,"shape",f),f},checks:[]});return ja(e,u)}function X6(e,n){if(!Io(n))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const u=e._zod.def.shape;for(const f in n)if(Object.getOwnPropertyDescriptor(u,f)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const l=Ba(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Sr(this,"shape",u),u}});return ja(e,l)}function K6(e,n){if(!Io(n))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Ba(e._zod.def,{get shape(){const o={...e._zod.def.shape,...n};return Sr(this,"shape",o),o}});return ja(e,r)}function F6(e,n){const r=Ba(e._zod.def,{get shape(){const o={...e._zod.def.shape,...n._zod.def.shape};return Sr(this,"shape",o),o},get catchall(){return n._zod.def.catchall},checks:[]});return ja(e,r)}function J6(e,n,r){const l=n._zod.def.checks;if(l&&l.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const f=Ba(n._zod.def,{get shape(){const h=n._zod.def.shape,p={...h};if(r)for(const m in r){if(!(m in h))throw new Error(`Unrecognized key: "${m}"`);r[m]&&(p[m]=e?new e({type:"optional",innerType:h[m]}):h[m])}else for(const m in h)p[m]=e?new e({type:"optional",innerType:h[m]}):h[m];return Sr(this,"shape",p),p},checks:[]});return ja(n,f)}function W6(e,n,r){const o=Ba(n._zod.def,{get shape(){const l=n._zod.def.shape,u={...l};if(r)for(const f in r){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);r[f]&&(u[f]=new e({type:"nonoptional",innerType:l[f]}))}else for(const f in l)u[f]=new e({type:"nonoptional",innerType:l[f]});return Sr(this,"shape",u),u}});return ja(n,o)}function pi(e,n=0){if(e.aborted===!0)return!0;for(let r=n;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function w0(e,n){return n.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function xl(e){return typeof e=="string"?e:e?.message}function yr(e,n,r){const o={...e,path:e.path??[]};if(!e.message){const l=xl(e.inst?._zod.def?.error?.(e))??xl(n?.error?.(e))??xl(r.customError?.(e))??xl(r.localeError?.(e))??"Invalid input";o.message=l}return delete o.inst,delete o.continue,n?.reportInput||delete o.input,o}function qd(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Qo(...e){const[n,r,o]=e;return typeof n=="string"?{message:n,code:"custom",input:r,inst:o}:{...n}}const _0=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,dd,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},E0=K("$ZodError",_0),C0=K("$ZodError",_0,{Parent:Error});function eT(e,n=r=>r.message){const r={},o=[];for(const l of e.issues)l.path.length>0?(r[l.path[0]]=r[l.path[0]]||[],r[l.path[0]].push(n(l))):o.push(n(l));return{formErrors:o,fieldErrors:r}}function tT(e,n=r=>r.message){const r={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(f=>o({issues:f}));else if(u.code==="invalid_key")o({issues:u.issues});else if(u.code==="invalid_element")o({issues:u.issues});else if(u.path.length===0)r._errors.push(n(u));else{let f=r,h=0;for(;h<u.path.length;){const p=u.path[h];h===u.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(n(u))):f[p]=f[p]||{_errors:[]},f=f[p],h++}}};return o(e),r}const Hd=e=>(n,r,o,l)=>{const u=o?Object.assign(o,{async:!1}):{async:!1},f=n._zod.run({value:r,issues:[]},u);if(f instanceof Promise)throw new vi;if(f.issues.length){const h=new(l?.Err??e)(f.issues.map(p=>yr(p,u,gr())));throw b0(h,l?.callee),h}return f.value},Pd=e=>async(n,r,o,l)=>{const u=o?Object.assign(o,{async:!0}):{async:!0};let f=n._zod.run({value:r,issues:[]},u);if(f instanceof Promise&&(f=await f),f.issues.length){const h=new(l?.Err??e)(f.issues.map(p=>yr(p,u,gr())));throw b0(h,l?.callee),h}return f.value},iu=e=>(n,r,o)=>{const l=o?{...o,async:!1}:{async:!1},u=n._zod.run({value:r,issues:[]},l);if(u instanceof Promise)throw new vi;return u.issues.length?{success:!1,error:new(e??E0)(u.issues.map(f=>yr(f,l,gr())))}:{success:!0,data:u.value}},nT=iu(C0),ou=e=>async(n,r,o)=>{const l=o?Object.assign(o,{async:!0}):{async:!0};let u=n._zod.run({value:r,issues:[]},l);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(f=>yr(f,l,gr())))}:{success:!0,data:u.value}},aT=ou(C0),rT=e=>(n,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Hd(e)(n,r,l)},iT=e=>(n,r,o)=>Hd(e)(n,r,o),oT=e=>async(n,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Pd(e)(n,r,l)},sT=e=>async(n,r,o)=>Pd(e)(n,r,o),lT=e=>(n,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return iu(e)(n,r,l)},uT=e=>(n,r,o)=>iu(e)(n,r,o),cT=e=>async(n,r,o)=>{const l=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ou(e)(n,r,l)},fT=e=>async(n,r,o)=>
vendor: 5,369 bytes, line 196
196ou(e)(n,r,o),dT=/^[cC][^\s-]{8,}$/,hT=/^[0-9a-z]+$/,pT=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mT=/^[0-9a-vA-V]{20}$/,gT=/^[A-Za-z0-9]{27}$/,yT=/^[a-zA-Z0-9_-]{21}$/,vT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bT=/^([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})$/,c1=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)$/,ST=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function _T(){return new RegExp(wT,"u")}const ET=/^(?:(?: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])$/,CT=/^(([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}|:))$/,TT=/^((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])$/,RT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,AT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,T0=/^[A-Za-z0-9_-]*$/,xT=/^\+[1-9]\d{6,14}$/,R0="(?:(?:\\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])))",OT=new RegExp(`^${R0}$`);function A0(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function MT(e){return new RegExp(`^${A0(e)}$`)}function zT(e){const n=A0({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${n}(?:${r.join("|")})`;return new RegExp(`^${R0}T(?:${o})$`)}const kT=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},LT=/^[^A-Z]*$/,NT=/^[^a-z]*$/,Rn=K("$ZodCheck",(e,n)=>{var r;e._zod??(e._zod={}),e._zod.def=n,(r=e._zod).onattach??(r.onattach=[])}),DT=K("$ZodCheckMaxLength",(e,n)=>{var r;Rn.init(e,n),(r=e._zod.def).when??(r.when=o=>{const l=o.value;return!Bd(l)&&l.length!==void 0}),e._zod.onattach.push(o=>{const l=o._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<l&&(o._zod.bag.maximum=n.maximum)}),e._zod.check=o=>{const l=o.value;if(l.length<=n.maximum)return;const f=qd(l);o.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),UT=K("$ZodCheckMinLength",(e,n)=>{var r;Rn.init(e,n),(r=e._zod.def).when??(r.when=o=>{const l=o.value;return!Bd(l)&&l.length!==void 0}),e._zod.onattach.push(o=>{const l=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>l&&(o._zod.bag.minimum=n.minimum)}),e._zod.check=o=>{const l=o.value;if(l.length>=n.minimum)return;const f=qd(l);o.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),BT=K("$ZodCheckLengthEquals",(e,n)=>{var r;Rn.init(e,n),(r=e._zod.def).when??(r.when=o=>{const l=o.value;return!Bd(l)&&l.length!==void 0}),e._zod.onattach.push(o=>{const l=o._zod.bag;l.minimum=n.length,l.maximum=n.length,l.length=n.length}),e._zod.check=o=>{const l=o.value,u=l.length;if(u===n.length)return;const f=qd(l),h=u>n.length;o.issues.push({origin:f,...h?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!n.abort})}}),su=K("$ZodCheckStringFormat",(e,n)=>{var r,o;Rn.init(e,n),e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(r=e._zod).check??(r.check=l=>{n.pattern.lastIndex=0,!n.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:n.format,input:l.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(o=e._zod).check??(o.check=()=>{})}),jT=K("$ZodCheckRegex",(e,n)=>{su.init(e,n),e._zod.check=r=>{n.pattern.lastIndex=0,!n.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),qT=K("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=LT),su.init(e,n)}),HT=K("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=NT),su.init(e,n)}),PT=K("$ZodCheckIncludes",(e,n)=>{Rn.init(e,n);const r=ru(n.includes),o=new RegExp(typeof n.position=="number"?`^.{${n.position}}${r}`:r);n.pattern=o,e._zod.onattach.push(l=>{const u=l._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(o)}),e._zod.check=l=>{l.value.includes(n.includes,n.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input
vendor: 13,417 bytes, lines 196-232
196:l.value,inst:e,continue:!n.abort})}}),$T=K("$ZodCheckStartsWith",(e,n)=>{Rn.init(e,n);const r=new RegExp(`^${ru(n.prefix)}.*`);n.pattern??(n.pattern=r),e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(n.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:o.value,inst:e,continue:!n.abort})}}),VT=K("$ZodCheckEndsWith",(e,n)=>{Rn.init(e,n);const r=new RegExp(`.*${ru(n.suffix)}$`);n.pattern??(n.pattern=r),e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(n.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:o.value,inst:e,continue:!n.abort})}}),ZT=K("$ZodCheckOverwrite",(e,n)=>{Rn.init(e,n),e._zod.check=r=>{r.value=n.tx(r.value)}});class IT{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const o=n.split(`
197`).filter(f=>f),l=Math.min(...o.map(f=>f.length-f.trimStart().length)),u=o.map(f=>f.slice(l)).map(f=>" ".repeat(this.indent*2)+f);for(const f of u)this.content.push(f)}compile(){const n=Function,r=this?.args,l=[...(this?.content??[""]).map(u=>`  ${u}`)];return new n(...r,l.join(`
198`))}}const QT={major:4,minor:3,patch:6},lt=K("$ZodType",(e,n)=>{var r;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=QT;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const l of o)for(const u of l._zod.onattach)u(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(f,h,p)=>{let m=pi(f),v;for(const y of h){if(y._zod.def.when){if(!y._zod.def.when(f))continue}else if(m)continue;const w=f.issues.length,b=y._zod.check(f);if(b instanceof Promise&&p?.async===!1)throw new vi;if(v||b instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await b,f.issues.length!==w&&(m||(m=pi(f,w)))});else{if(f.issues.length===w)continue;m||(m=pi(f,w))}}return v?v.then(()=>f):f},u=(f,h,p)=>{if(pi(f))return f.aborted=!0,f;const m=l(h,o,p);if(m instanceof Promise){if(p.async===!1)throw new vi;return m.then(v=>e._zod.parse(v,p))}return e._zod.parse(m,p)};e._zod.run=(f,h)=>{if(h.skipChecks)return e._zod.parse(f,h);if(h.direction==="backward"){const m=e._zod.parse({value:f.value,issues:[]},{...h,skipChecks:!0});return m instanceof Promise?m.then(v=>u(v,f,h)):u(m,f,h)}const p=e._zod.parse(f,h);if(p instanceof Promise){if(h.async===!1)throw new vi;return p.then(m=>l(m,o,h))}return l(p,o,h)}}ze(e,"~standard",()=>({validate:l=>{try{const u=nT(e,l);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return aT(e,l).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}))}),$d=K("$ZodString",(e,n)=>{lt.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??kT(e._zod.bag),e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ie=K("$ZodStringFormat",(e,n)=>{su.init(e,n),$d.init(e,n)}),GT=K("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=bT),Ie.init(e,n)}),YT=K("$ZodUUID",(e,n)=>{if(n.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(o===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=c1(o))}else n.pattern??(n.pattern=c1());Ie.init(e,n)}),XT=K("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=ST),Ie.init(e,n)}),KT=K("$ZodURL",(e,n)=>{Ie.init(e,n),e._zod.check=r=>{try{const o=r.value.trim(),l=new URL(o);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(l.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:r.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(l.protocol.endsWith(":")?l.protocol.slice(0,-1):l.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:r.value,inst:e,continue:!n.abort})),n.normalize?r.value=l.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!n.abort})}}}),FT=K("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=_T()),Ie.init(e,n)}),JT=K("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=yT),Ie.init(e,n)}),WT=K("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=dT),Ie.init(e,n)}),e8=K("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=hT),Ie.init(e,n)}),t8=K("$ZodULID",(e,n)=>{n.pattern??(n.pattern=pT),Ie.init(e,n)}),n8=K("$ZodXID",(e,n)=>{n.pattern??(n.pattern=mT),Ie.init(e,n)}),a8=K("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=gT),Ie.init(e,n)}),r8=K("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=zT(n)),Ie.init(e,n)}),i8=K("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=OT),Ie.init(e,n)}),o8=K("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=MT(n)),Ie.init(e,n)}),s8=K("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=vT),Ie.init(e,n)}),l8=K("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=ET),Ie.init(e,n),e._zod.bag.format="ipv4"}),u8=K("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=CT),Ie.init(e,n),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!n.abort})}}}),c8=K("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=TT),Ie.init(e,n)}),f8=K("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=RT),Ie.init(e,n),e._zod.check=r=>{const o=r.value.split("/");try{if(o.length!==2)throw new Error;const[l,u]=o;if(!u)throw new Error;const f=Number(u);if(`${f}`!==u)throw new Error;if(f<0||f>128)throw new Error;new URL(`http://[${l}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!n.abort})}}});function x0(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const d8=K("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=AT),Ie.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{x0(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!n.abort})}});function h8(e){if(!T0.test(e))return!1;const n=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=n.padEnd(Math.ceil(n.length/4)*4,"=");return x0(r)}const p8=K("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=T0),Ie.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{h8(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!n.abort})}}),m8=K("$ZodE164",(e,n)=>{n.pattern??(n.pattern=xT),Ie.init(e,n)});function g8(e,n=null){try{const r=e.split(".");if(r.length!==3)return!1;const[o]=r;if(!o)return!1;const l=JSON.parse(atob(o));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||n&&(!("alg"in l)||l.alg!==n))}catch{return!1}}const y8=K("$ZodJWT",(e,n)=>{Ie.init(e,n),e._zod.check=r=>{g8(r.value,n.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!n.abort})}}),v8=K("$ZodUnknown",(e,n)=>{lt.init(e,n),e._zod.parse=r=>r}),b8=K("$ZodNever",(e,n)=>{lt.init(e,n),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function f1(e,n,r){e.issues.length&&n.issues.push(...w0(r,e.issues)),n.value[r]=e.value}const S8=K("$ZodArray",(e,n)=>{lt.init(e,n),e._zod.parse=(r,o)=>{const l=r.value;if(!Array.isArray(l))return r.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),r;r.value=Array(l.length);const u=[];for(let f=0;f<l.length;f++){const h=l[f],p=n.element._zod.run({value:h,issues:[]},o);p instanceof Promise?u.push(p.then(m=>f1(m,r,f))):f1(p,r,f)}return u.length?Promise.all(u).then(()=>r):r}});function Ql(e,n,r,o,l){if(e.issues.length){if(l&&!(r in o))return;n.issues.push(...w0(r,e.issues))}e.value===void 0?r in o&&(n.value[r]=void 0):n.value[r]=e.value}function O0(e){const n=Object.keys(e.shape);for(const o of n)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const r=Q6(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function M0(e,n,r,o,l,u){const f=[],h=l.keySet,p=l.catchall._zod,m=p.def.type,v=p.optout==="optional";for(const y in n){if(h.has(y))continue;if(m==="never"){f.push(y);continue}const w=p.run({value:n[y],issues:[]},o);w instanceof Promise?e.push(w.then(b=>Ql(b,r,y,n,v))):Ql(w,r,y,n,v)}return f.length&&r.issues.push({code:"unrecognized_keys",keys:f,input:n,inst:u}),e.length?Promise.all(e).then(()=>r):r}const w8=K("$ZodObject",(e,n)=>{if(lt.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const h=n.shape;Object.defineProperty(n,"shape",{get:()=>{const p={...h};return Object.defineProperty(n,"shape",{value:p}),p}})}const o=Ud(()=>O0(n));ze(e._zod,"propValues",()=>{const h=n.shape,p={};for(const m in h){const v=h[m]._zod;if(v.values){p[m]??(p[m]=new Set);for(const y of v.values)p[m].add(y)}}return p});const l=Il,u=n.catchall;let f;e._zod.parse=(h,p)=>{f??(f=o.value);const m=h.value;if(!l(m))return h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h;h.value={};const v=[],y=f.shape;for(const w of f.keys){const b=y[w],C=b._zod.optout==="optional",O=b._zod.run({value:m[w],issues:[]},p);O instanceof Promise?v.push(O.then(R=>Ql(R,h,w,m,C))):Ql(O,h,w,m,C)}return u?M0(v,m,h,p,o.value,e):v.length?Promise.all(v).then(()=>h):h}}),_8=K("$ZodObjectJIT",(e,n)=>{w8.init(e,n);const r=e._zod.parse,o=Ud(()=>O0(n)),l=w=>{const b=new IT(["shape","payload","ctx"]),C=o.value,O=$=>{const B=u1($);return`shape[${B}]._zod.run({ value: input[${B}], issues: [] }, ctx)`};b.write("const input = payload.value;");const R=Object.create(null);let z=0;for(const $ of C.keys)R[$]=`key_${z++}`;b.write("const newResult = {};");for(const $ of C.keys){const B=R[$],W=u1($),V=w[$]?._zod?.optout==="optional";b.write(`const ${B} = ${O($)};`),V?b.write(`
199        if (${B}.issues.length) {
200          if (${W} in input) {
201            payload.issues = payload.issues.concat(${B}.issues.map(iss => ({
202              ...iss,
203              path: iss.path ? [${W}, ...iss.path] : [${W}]
204            })));
205          }
206        }
207        
208        if (${B}.value === undefined) {
209          if (${W} in input) {
210            newResult[${W}] = undefined;
211          }
212        } else {
213          newResult[${W}] = ${B}.value;
214        }
215        
216      `):b.write(`
217        if (${B}.issues.length) {
218          payload.issues = payload.issues.concat(${B}.issues.map(iss => ({
219            ...iss,
220            path: iss.path ? [${W}, ...iss.path] : [${W}]
221          })));
222        }
223        
224        if (${B}.value === undefined) {
225          if (${W} in input) {
226            newResult[${W}] = undefined;
227          }
228        } else {
229          newResult[${W}] = ${B}.value;
230        }
231        
232      `)}b.write("payload.value = newResult;"),b.write("return payload;");const H=b.compile();return($,B)=>H(w,$,B)};let u;const f=Il,h=!y0.jitless,m=h&&Z6.value,v=n.catchall;let y;e._zod.parse=(w,b)=>{y??(y=o.value);const C=w.value;return f(C)?h&&m&&b?.async===!1&&b.jitless!==!0?(u||(u=l(n.shape)),w=u(w,b),v?M0([],C,w,b,y,e):w):r(w,b):(w.issues.push({expected:"object",code:"invalid_type",input:C,inst:e}),w)}});function d1(e,n,r,o){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const l=e.filter(u=>!pi(u));return l.length===1?(n.value=l[0].value,l[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(u=>u.issues.map(f=>yr(f,o,gr())))}),n)}const E8=K("$ZodUnion",(e,n)=>{lt.init(e,n),ze(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),ze(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),ze(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),ze(e._zod,"pattern",()=>{if(n.options.every(l=>l._zod.pattern)){const l=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${l.map(u=>jd(u.source)).join("|")})$`)}});const r=n.options.length===1,o=n.options[0]._zod.run;e._zod.parse=(l,u)=>{if(r)return o(l,u);let f=!1;const h=[];for(const p of n.options){const m=p._zod.run({value:l.value,issues:[]},u);if(m instanceof Promise)h.push(m),f=!0;else{if(m.issues.length===0)return m;h.push(m)}}return f?Promise.all(h).then(p=>d1(p,l,e,u)):d1(h,l,e,u)}}),C8=K("$ZodIntersection",(e,n)=>{lt.init(e,n),e._zod.parse=(r,o)=>{const l=r.value,u=n.left._zod.run({value:l,issues:[]},o),f=n.right._zod.run({value:l,issues:[]},o);return u instanceof Promise||f instanceof Promise?Promise.all([u,f]).then(([p,m])=>h1(r,p,m)):h1(r,u,f)}});function hd(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Io(e)&&Io(n)){const r=Object.keys(n),o=Object.keys(e).filter(u=>r.indexOf(u)!==-1),l={...e,...n};for(const u of o){const f=hd(e[u],n[u]);if(!f.valid)return{valid:!1,mergeErrorPath:[u,...f.mergeErrorPath]};l[u]=f.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<e.length;o++){const l=e[o],u=n[o],f=hd(l,u);if(!f.valid)return{valid:!1,mergeErrorPath:[o,...f.mergeErrorPath]};r.push(f.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function h1(e,n,r){const o=new Map;let l;
vendor: 3,309 bytes, line 232
232for(const h of n.issues)if(h.code==="unrecognized_keys"){l??(l=h);for(const p of h.keys)o.has(p)||o.set(p,{}),o.get(p).l=!0}else e.issues.push(h);for(const h of r.issues)if(h.code==="unrecognized_keys")for(const p of h.keys)o.has(p)||o.set(p,{}),o.get(p).r=!0;else e.issues.push(h);const u=[...o].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(u.length&&l&&e.issues.push({...l,keys:u}),pi(e))return e;const f=hd(n.value,r.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return e.value=f.data,e}const T8=K("$ZodEnum",(e,n)=>{lt.init(e,n);const r=v0(n.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(l=>I6.has(typeof l)).map(l=>typeof l=="string"?ru(l):l.toString()).join("|")})$`),e._zod.parse=(l,u)=>{const f=l.value;return o.has(f)||l.issues.push({code:"invalid_value",values:r,input:f,inst:e}),l}}),R8=K("$ZodTransform",(e,n)=>{lt.init(e,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new g0(e.constructor.name);const l=n.transform(r.value,r);if(o.async)return(l instanceof Promise?l:Promise.resolve(l)).then(f=>(r.value=f,r));if(l instanceof Promise)throw new vi;return r.value=l,r}});function p1(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const z0=K("$ZodOptional",(e,n)=>{lt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",ze(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),ze(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${jd(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(n.innerType._zod.optin==="optional"){const l=n.innerType._zod.run(r,o);return l instanceof Promise?l.then(u=>p1(u,r.value)):p1(l,r.value)}return r.value===void 0?r:n.innerType._zod.run(r,o)}}),A8=K("$ZodExactOptional",(e,n)=>{z0.init(e,n),ze(e._zod,"values",()=>n.innerType._zod.values),ze(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(r,o)=>n.innerType._zod.run(r,o)}),x8=K("$ZodNullable",(e,n)=>{lt.init(e,n),ze(e._zod,"optin",()=>n.innerType._zod.optin),ze(e._zod,"optout",()=>n.innerType._zod.optout),ze(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${jd(r.source)}|null)$`):void 0}),ze(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:n.innerType._zod.run(r,o)}),O8=K("$ZodDefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",ze(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);if(r.value===void 0)return r.value=n.defaultValue,r;const l=n.innerType._zod.run(r,o);return l instanceof Promise?l.then(u=>m1(u,n)):m1(l,n)}});function m1(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const M8=K("$ZodPrefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",ze(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=n.defaultValue),n.innerType._zod.run(r,o))}),z8=K("$ZodNonOptional",(e,n)=>{lt.init(e,n),ze(e._zod,"values",()=>{const r=n.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{const l=n.innerType._zod.run(r,o);return l instanceof Promise?l.then(u=>g1(u,e)):g1(l,e)}});
vendor: 17,198 bytes, lines 232-234
232function g1(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const k8=K("$ZodCatch",(e,n)=>{lt.init(e,n),ze(e._zod,"optin",()=>n.innerType._zod.optin),ze(e._zod,"optout",()=>n.innerType._zod.optout),ze(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);const l=n.innerType._zod.run(r,o);return l instanceof Promise?l.then(u=>(r.value=u.value,u.issues.length&&(r.value=n.catchValue({...r,error:{issues:u.issues.map(f=>yr(f,o,gr()))},input:r.value}),r.issues=[]),r)):(r.value=l.value,l.issues.length&&(r.value=n.catchValue({...r,error:{issues:l.issues.map(u=>yr(u,o,gr()))},input:r.value}),r.issues=[]),r)}}),L8=K("$ZodPipe",(e,n)=>{lt.init(e,n),ze(e._zod,"values",()=>n.in._zod.values),ze(e._zod,"optin",()=>n.in._zod.optin),ze(e._zod,"optout",()=>n.out._zod.optout),ze(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){const u=n.out._zod.run(r,o);return u instanceof Promise?u.then(f=>Ol(f,n.in,o)):Ol(u,n.in,o)}const l=n.in._zod.run(r,o);return l instanceof Promise?l.then(u=>Ol(u,n.out,o)):Ol(l,n.out,o)}});function Ol(e,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},r)}const N8=K("$ZodReadonly",(e,n)=>{lt.init(e,n),ze(e._zod,"propValues",()=>n.innerType._zod.propValues),ze(e._zod,"values",()=>n.innerType._zod.values),ze(e._zod,"optin",()=>n.innerType?._zod?.optin),ze(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);const l=n.innerType._zod.run(r,o);return l instanceof Promise?l.then(y1):y1(l)}});function y1(e){return e.value=Object.freeze(e.value),e}const D8=K("$ZodCustom",(e,n)=>{Rn.init(e,n),lt.init(e,n),e._zod.parse=(r,o)=>r,e._zod.check=r=>{const o=r.value,l=n.fn(o);if(l instanceof Promise)return l.then(u=>v1(u,r,o,e));v1(l,r,o,e)}});function v1(e,n,r,o){if(!e){const l={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(l.params=o._zod.def.params),n.issues.push(Qo(l))}}var b1;class U8{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...r){const o=r[0];return this._map.set(n,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const r=this._map.get(n);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(n),this}get(n){const r=n._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const l={...o,...this._map.get(n)};return Object.keys(l).length?l:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function B8(){return new U8}(b1=globalThis).__zod_globalRegistry??(b1.__zod_globalRegistry=B8());const zo=globalThis.__zod_globalRegistry;function j8(e,n){return new e({type:"string",...pe(n)})}function q8(e,n){return new e({type:"string",coerce:!0,...pe(n)})}function H8(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...pe(n)})}function S1(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...pe(n)})}function P8(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...pe(n)})}function $8(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...pe(n)})}function V8(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...pe(n)})}function Z8(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...pe(n)})}function I8(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...pe(n)})}function Q8(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...pe(n)})}function G8(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...pe(n)})}function Y8(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...pe(n)})}function X8(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...pe(n)})}function K8(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...pe(n)})}function F8(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...pe(n)})}function J8(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...pe(n)})}function W8(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...pe(n)})}function eR(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...pe(n)})}function tR(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...pe(n)})}function nR(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...pe(n)})}function aR(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...pe(n)})}function rR(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...pe(n)})}function iR(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...pe(n)})}function oR(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...pe(n)})}function sR(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...pe(n)})}function lR(e,n){return new e({type:"string",format:"date",check:"string_format",...pe(n)})}function uR(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...pe(n)})}function cR(e,n){return new e({type:"string",format:"duration",check:"string_format",...pe(n)})}function fR(e){return new e({type:"unknown"})}function dR(e,n){return new e({type:"never",...pe(n)})}function k0(e,n){return new DT({check:"max_length",...pe(n),maximum:e})}function Gl(e,n){return new UT({check:"min_length",...pe(n),minimum:e})}function L0(e,n){return new BT({check:"length_equals",...pe(n),length:e})}function hR(e,n){return new jT({check:"string_format",format:"regex",...pe(n),pattern:e})}function pR(e){return new qT({check:"string_format",format:"lowercase",...pe(e)})}function mR(e){return new HT({check:"string_format",format:"uppercase",...pe(e)})}function gR(e,n){return new PT({check:"string_format",format:"includes",...pe(n),includes:e})}function yR(e,n){return new $T({check:"string_format",format:"starts_with",...pe(n),prefix:e})}function vR(e,n){return new VT({check:"string_format",format:"ends_with",...pe(n),suffix:e})}function wi(e){return new ZT({check:"overwrite",tx:e})}function bR(e){return wi(n=>n.normalize(e))}function SR(){return wi(e=>e.trim())}function wR(){return wi(e=>e.toLowerCase())}function _R(){return wi(e=>e.toUpperCase())}function ER(){return wi(e=>V6(e))}function CR(e,n,r){return new e({type:"array",element:n,...pe(r)})}function TR(e,n,r){return new e({type:"custom",check:"custom",fn:n,...pe(r)})}function RR(e){const n=AR(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Qo(o,r.value,n._zod.def));else{const l=o;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=r.value),l.inst??(l.inst=n),l.continue??(l.continue=!n._zod.def.abort),r.issues.push(Qo(l))}},e(r.value,r)));return n}function AR(e,n){const r=new Rn({check:"custom",...pe(n)});return r._zod.check=e,r}function N0(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??zo,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function bt(e,n,r={path:[],schemaPath:[]}){var o;const l=e._zod.def,u=n.seen.get(e);if(u)return u.count++,r.schemaPath.includes(e)&&(u.cycle=r.path),u.schema;const f={schema:{},count:1,cycle:void 0,path:r.path};n.seen.set(e,f);const h=e._zod.toJSONSchema?.();if(h)f.schema=h;else{const v={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,f.schema,v);else{const w=f.schema,b=n.processors[l.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);b(e,n,w,v)}const y=e._zod.parent;y&&(f.ref||(f.ref=y),bt(y,n,v),n.seen.get(y).isParent=!0)}const p=n.metadataRegistry.get(e);return p&&Object.assign(f.schema,p),n.io==="input"&&Tt(e)&&(delete f.schema.examples,delete f.schema.default),n.io==="input"&&f.schema._prefault&&((o=f.schema).default??(o.default=f.schema._prefault)),delete f.schema._prefault,n.seen.get(e).schema}function D0(e,n){const r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const f of e.seen.entries()){const h=e.metadataRegistry.get(f[0])?.id;if(h){const p=o.get(h);if(p&&p!==f[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(h,f[0])}}const l=f=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(f[0])?.id,w=e.external.uri??(C=>C);if(y)return{ref:w(y)};const b=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=b,{defId:b,ref:`${w("__shared")}#/${h}/${b}`}}if(f[1]===r)return{ref:"#"};const m=`#/${h}/`,v=f[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:m+v}},u=f=>{if(f[1].schema.$ref)return;const h=f[1],{ref:p,defId:m}=l(f);h.def={...h.schema},m&&(h.defId=m);const v=h.schema;for(const y in v)delete v[y];v.$ref=p};if(e.cycles==="throw")for(const f of e.seen.entries()){const h=f[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
233
234Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of e.seen.entries()){const h=f[1];if(n===f[0]){u(f);continue}if(e.external){const m=e.external.registry.get(f[0])?.id;if(n!==f[0]&&m){u(f);continue}}if(e.metadataRegistry.get(f[0])?.id){u(f);continue}if(h.cycle){u(f);continue}if(h.count>1&&e.reused==="ref"){u(f);continue}}}function U0(e,n){const r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=f=>{const h=e.seen.get(f);if(h.ref===null)return;const p=h.def??h.schema,m={...p},v=h.ref;if(h.ref=null,v){o(v);const w=e.seen.get(v),b=w.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(b)):Object.assign(p,b),Object.assign(p,m),f._zod.parent===v)for(const O in p)O==="$ref"||O==="allOf"||O in m||delete p[O];if(b.$ref&&w.def)for(const O in p)O==="$ref"||O==="allOf"||O in w.def&&JSON.stringify(p[O])===JSON.stringify(w.def[O])&&delete p[O]}const y=f._zod.parent;if(y&&y!==v){o(y);const w=e.seen.get(y);if(w?.schema.$ref&&(p.$ref=w.schema.$ref,w.def))for(const b in p)b==="$ref"||b==="allOf"||b in w.def&&JSON.stringify(p[b])===JSON.stringify(w.def[b])&&delete p[b]}e.override({zodSchema:f,jsonSchema:p,path:h.path??[]})};for(const f of[...e.seen.entries()].reverse())o(f[0]);const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const f=e.external.registry.get(n)?.id;if(!f)throw new Error("Schema is missing an `id` property");l.$id=e.external.uri(f)}Object.assign(l,r.def??r.schema);const u=e.external?.defs??{};for(const f of e.seen.entries()){const h=f[1];h.def&&h.defId&&(u[h.defId]=h.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?l.$defs=u:l.definitions=u);try{const f=JSON.parse(JSON.stringify(l));return Object.defineProperty(f,"~standard",{value:{...n["~standard"],jsonSchema:{input:Yl(n,"input",e.processors),output:Yl(n,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function Tt(e,n){const r=n??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Tt(o.element,r);if(o.type==="set")return Tt(o.valueType,r);if(o.type==="lazy")return Tt(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Tt(o.innerType,r);if(o.type==="intersection")return Tt(o.left,r)||Tt(o.right,r);if(o.type==="record"||o.type==="map")return Tt(o.keyType,r)||Tt(o.valueType,r);if(o.type==="pipe")return Tt(o.in,r)||Tt(o.out,r);if(o.type==="object"){for(const l in o.shape)if(Tt(o.shape[l],r))return!0;return!1}if(o.type==="union"){for(const l of o.options)if(Tt(l,r))return!0;return!1}if(o.type==="tuple"){for(const l of o.items)if(Tt(l,r))return!0;return!!(o.rest&&Tt(o.rest,r))}return!1}const xR=(e,n={})=>r=>{const o=N0({...r,processors:n});return bt(e,o),D0(o,e),U0(o,e)},Yl=(e,n,r={})=>o=>{const{libraryOptions:l,target:u}=o??{},f=N0({...l??{},target:u,io:n,processors:r});return bt(e,f),D0(f,e),U0(f,e)},OR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},MR=(e,n,r,o)=>{const l=r;l.type="string";const{minimum:u,maximum:f,format:h,patterns:p,contentEncoding:m}=e._zod.bag;if(typeof u=="number"&&(l.minLength=u),typeof f=="number"&&(l.maxLength=f),h&&(l.format=OR[h]??h,l.format===""&&delete l.format,h==="time"&&delete l.format),m&&(l.contentEncoding=m),p&&p.size>0){const v=[...p];v.length===1?l.pattern=v[0].source:v.length>1&&(l.allOf=[...v.map(y=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},zR=(e,n,r,o)=>{r.not={}},kR=(e,n,r,o)=>{},LR=(e,n,r,o)=>{const l=e._zod.def,u=v0(l.entries);u.every(f=>typeof f=="number")&&(r.type="number"),u.every(f=>typeof f=="string")&&(r.type="string"),r.enum=u},NR=(e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},DR=(e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},UR=(e,n,r,o)=>{const l=r,u=e._zod.def,{minimum:f,maximum:h}=e._zod.bag;typeof f=="number"&&(l.minItems=f),typeof h=="number"&&(l.maxItems=h),l.type="array",l.items=bt(u.element,n,{...o,path:[...o.path,"items"]})},BR=(e,n,r,o)=>{const l=r,u=e._zod.def;l.type="object",l.properties={};const f=u.shape;for(const m in f)l.properties[m]=bt(f[m],n,{...o,path:[...o.path,"properties",m]});const h=new Set(Object.keys(f)),p=new Set([...h].filter(m=>{const v=u.shape[m]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));p.size>0&&(l.required=Array.from(p)),u.catchall?._zod.def.type==="never"?l.additionalProperties=!1:u.catchall?u.catchall&&(l.additionalProperties=bt(u.catchall,n,{...o,path:[...o.path,"additionalProperties"]})):n.io==="output"&&(l.additionalProperties=!1)},jR=(e,n,r,o)=>{const l=e._zod.def,u=l.inclusive===!1,f=l.options.map((h,p)=>bt(h,n,{...o,path:[...o.path,u?"oneOf":"anyOf",p]}));u?r.oneOf=f:r.anyOf=f},qR=(e,n,r,o)=>{const l=e._zod.def,u=bt(l.left,n,{...o,path:[...o.path,"allOf",0]}),f=bt(l.right,n,{...o,path:[...o.path,"allOf",1]}),h=m=>"allOf"in m&&Object.keys(m).length===1,p=[...h(u)?u.allOf:[u],...h(f)?f.allOf:[f]];r.allOf=p},HR=(e,n,r,o)=>{const l=e._zod.def,u=bt(l.innerType,n,o),f=n.seen.get(e);n.target==="openapi-3.0"?(f.ref=l.innerType,r.nullable=!0):r.anyOf=[u,{type:"null"}]},PR=(e,n,r,o)=>{const l=e._zod.def;bt(l.innerType,n,o);const u=n.seen.get(e);u.ref=l.innerType},$R=(e,n,r,o)=>{const l=e._zod.def;bt(l.innerType,n,o);const u=n.seen.get(e);u.ref=l.innerType,r.default=JSON.parse(JSON.stringify(l.defaultValue))},VR=(e,n,r,o)=>{const l=e._zod.def;bt(l.innerType,n,o);const u=n.seen.get(e);u.ref=l.innerType,n.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(l.defaultValue)))},ZR=(e,n,r,o)=>{const l=e._zod.def;bt(l.innerType,n,o);const u=n.seen.get(e);u.ref=l.innerType;let f;try{f=l.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=f},IR=(e,n,r,o)=>{const l=e._zod.def,u=n.io==="input"?l.in._zod.def.type==="transform"?l.out:l.in:l.out;bt(u,n,o);const f=n.seen.get(e);f.ref=u},QR=(e,n,r,o)=>{const l=e._zod.def;bt(l.innerType,n,o);const u=n.seen.get(e);u.ref=l.innerType,r.readOnly=!0},B0=(e,n,r,o)=>{const l=e._zod.def;bt(l.innerType,n,o);const u=n.seen.get(e);u.ref=l.innerType},GR=K("ZodISODateTime",(e,n)=>{r8.init(e,n),Qe.init(e,n)});function YR(e){return sR(GR,e)}const XR=K("ZodISODate",(e,n)=>{i8.init(e,n),Qe.init(e,n)});function KR(e){return lR(XR,e)}const FR=K("ZodISOTime",(e,n)=>{o8.init(e,n),Qe.init(e,n)});function JR(e){return uR(FR,e)}const WR=K("ZodISODuration",(e,n)=>{s8.init(e,n),Qe.init(e,n)});function eA(e){return cR(WR,e)}const tA=(e,n)=>{E0.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>tT(e,r)},flatten:{value:r=>eT(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,dd,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,dd,2)}},isEmpty:{get(){return e.issues.length===0}}})},un=K("ZodError",tA,{Parent:Error}
vendor: 9,788 bytes, line 234
234),nA=Hd(un),aA=Pd(un),rA=iu(un),iA=ou(un),oA=rT(un),sA=iT(un),lA=oT(un),uA=sT(un),cA=lT(un),fA=uT(un),dA=cT(un),hA=fT(un),ut=K("ZodType",(e,n)=>(lt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Yl(e,"input"),output:Yl(e,"output")}}),e.toJSONSchema=xR(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...r)=>e.clone(Ba(n,{checks:[...n.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(r,o)=>ja(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>nA(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>rA(e,r,o),e.parseAsync=async(r,o)=>aA(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>iA(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>oA(e,r,o),e.decode=(r,o)=>sA(e,r,o),e.encodeAsync=async(r,o)=>lA(e,r,o),e.decodeAsync=async(r,o)=>uA(e,r,o),e.safeEncode=(r,o)=>cA(e,r,o),e.safeDecode=(r,o)=>fA(e,r,o),e.safeEncodeAsync=async(r,o)=>dA(e,r,o),e.safeDecodeAsync=async(r,o)=>hA(e,r,o),e.refine=(r,o)=>e.check(r7(r,o)),e.superRefine=r=>e.check(i7(r)),e.overwrite=r=>e.check(wi(r)),e.optional=()=>E1(e),e.exactOptional=()=>IA(e),e.nullable=()=>C1(e),e.nullish=()=>E1(C1(e)),e.nonoptional=r=>FA(e,r),e.array=()=>DA(e),e.or=r=>jA([e,r]),e.and=r=>HA(e,r),e.transform=r=>T1(e,VA(r)),e.default=r=>YA(e,r),e.prefault=r=>KA(e,r),e.catch=r=>WA(e,r),e.pipe=r=>T1(e,r),e.readonly=()=>n7(e),e.describe=r=>{const o=e.clone();return zo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return zo.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return zo.get(e);const o=e.clone();return zo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),j0=K("_ZodString",(e,n)=>{$d.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(o,l,u)=>MR(e,o,l);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(hR(...o)),e.includes=(...o)=>e.check(gR(...o)),e.startsWith=(...o)=>e.check(yR(...o)),e.endsWith=(...o)=>e.check(vR(...o)),e.min=(...o)=>e.check(Gl(...o)),e.max=(...o)=>e.check(k0(...o)),e.length=(...o)=>e.check(L0(...o)),e.nonempty=(...o)=>e.check(Gl(1,...o)),e.lowercase=o=>e.check(pR(o)),e.uppercase=o=>e.check(mR(o)),e.trim=()=>e.check(SR()),e.normalize=(...o)=>e.check(bR(...o)),e.toLowerCase=()=>e.check(wR()),e.toUpperCase=()=>e.check(_R()),e.slugify=()=>e.check(ER())}),q0=K("ZodString",(e,n)=>{$d.init(e,n),j0.init(e,n),e.email=r=>e.check(H8(pA,r)),e.url=r=>e.check(I8(mA,r)),e.jwt=r=>e.check(oR(MA,r)),e.emoji=r=>e.check(Q8(gA,r)),e.guid=r=>e.check(S1(w1,r)),e.uuid=r=>e.check(P8(Ml,r)),e.uuidv4=r=>e.check($8(Ml,r)),e.uuidv6=r=>e.check(V8(Ml,r)),e.uuidv7=r=>e.check(Z8(Ml,r)),e.nanoid=r=>e.check(G8(yA,r)),e.guid=r=>e.check(S1(w1,r)),e.cuid=r=>e.check(Y8(vA,r)),e.cuid2=r=>e.check(X8(bA,r)),e.ulid=r=>e.check(K8(SA,r)),e.base64=r=>e.check(aR(AA,r)),e.base64url=r=>e.check(rR(xA,r)),e.xid=r=>e.check(F8(wA,r)),e.ksuid=r=>e.check(J8(_A,r)),e.ipv4=r=>e.check(W8(EA,r)),e.ipv6=r=>e.check(eR(CA,r)),e.cidrv4=r=>e.check(tR(TA,r)),e.cidrv6=r=>e.check(nR(RA,r)),e.e164=r=>e.check(iR(OA,r)),e.datetime=r=>e.check(YR(r)),e.date=r=>e.check(KR(r)),e.time=r=>e.check(JR(r)),e.duration=r=>e.check(eA(r))});function ko(e){return j8(q0,e)}const Qe=K("ZodStringFormat",(e,n)=>{Ie.init(e,n),j0.init(e,n)}),pA=K("ZodEmail",(e,n)=>{XT.init(e,n),Qe.init(e,n)}),w1=K("ZodGUID",(e,n)=>{GT.init(e,n),Qe.init(e,n)}),Ml=K("ZodUUID",(e,n)=>{YT.init(e,n),Qe.init(e,n)}),mA=K("ZodURL",(e,n)=>{KT.init(e,n),Qe.init(e,n)}),gA=K("ZodEmoji",(e,n)=>{FT.init(e,n),Qe.init(e,n)}),yA=K("ZodNanoID",(e,n)=>{JT.init(e,n),Qe.init(e,n)}),vA=K("ZodCUID",(e,n)=>{WT.init(e,n),Qe.init(e,n)}),bA=K("ZodCUID2",(e,n)=>{e8.init(e,n),Qe.init(e,n)}),SA=K("ZodULID",(e,n)=>{t8.init(e,n),Qe.init(e,n)}),wA=K("ZodXID",(e,n)=>{n8.init(e,n),Qe.init(e,n)}),_A=K("ZodKSUID",(e,n)=>{a8.init(e,n),Qe.init(e,n)}),EA=K("ZodIPv4",(e,n)=>{l8.init(e,n),Qe.init(e,n)}),CA=K("ZodIPv6",(e,n)=>{u8.init(e,n),Qe.init(e,n)}),TA=K("ZodCIDRv4",(e,n)=>{c8.init(e,n),Qe.init(e,n)}),RA=K("ZodCIDRv6",(e,n)=>{f8.init(e,n),Qe.init(e,n)}),AA=K("ZodBase64",(e,n)=>{d8.init(e,n),Qe.init(e,n)}),xA=K("ZodBase64URL",(e,n)=>{p8.init(e,n),Qe.init(e,n)}),OA=K("ZodE164",(e,n)=>{m8.init(e,n),Qe.init(e,n)}),MA=K("ZodJWT",(e,n)=>{y8.init(e,n),Qe.init(e,n)}),zA=K("ZodUnknown",(e,n)=>{v8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>kR()});function _1(){return fR(zA)}const kA=K("ZodNever",(e,n)=>{b8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>zR(e,r,o)});function LA(e){return dR(kA,e)}const NA=K("ZodArray",(e,n)=>{S8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>UR(e,r,o,l),e.element=n.element,e.min=(r,o)=>e.check(Gl(r,o)),e.nonempty=r=>e.check(Gl(1,r)),e.max=(r,o)=>e.check(k0(r,o)),e.length=(r,o)=>e.check(L0(r,o)),e.unwrap=()=>e.element});function DA(e,n){return CR(NA,e,n)}const UA=K("ZodObject",(e,n)=>{_8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>BR(e,r,o,l),ze(e,"shape",()=>n.shape),e.keyof=()=>PA(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_1()}),e.loose=()=>e.clone({...e._zod.def,catchall:_1()}),e.strict=()=>e.clone({...e._zod.def,catchall:LA()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>X6(e,r),e.safeExtend=r=>K6(e,r),e.merge=r=>F6(e,r),e.pick=r=>G6(e,r),e.omit=r=>Y6(e,r),e.partial=(...r)=>J6(P0,e,r[0]),e.required=(...r)=>W6($0,e,r[0])});function H0(e,n){const r={type:"object",shape:e??{},...pe(n)};return new UA(r)}const BA=K("ZodUnion",(e,n)=>{E8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>jR(e,r,o,l),e.options=n.options});function jA(e,n){return new BA({type:"union",options:e,...pe(n)})}const qA=K("ZodIntersection",(e,n)=>{C8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>qR(e,r,o,l)});function HA(e,n){return new qA({type:"intersection",left:e,right:n})}const pd=K("ZodEnum",(e,n)=>{T8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(o,l,u)=>LR(e,o,l),e.enum=n.entries,e.options=Object.values(n.entries);const r=new Set(Object.keys(n.entries));e.extract=(o,l)=>{const u={};for(const f of o)if(r.has(f))u[f]=n.entries[f];else throw new Error(`Key ${f} not found in enum`);return new pd({...n,checks:[],...pe(l),entries:u})},e.exclude=(o,l)=>{const u={...n.entries};for(const f of o)if(r.has(f))delete u[f];else throw new Error(`Key ${f} not found in enum`);return new pd({...n,checks:[],...pe(l),entries:u})}});function PA(e,n){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new pd({type:"enum",entries:r,...pe(n)})}const $A=K("ZodTransform",(e,n)=>{R8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>DR(e,r),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new g0(e.constructor.name);r.addIssue=u=>{if(typeof u=="string")r.issues.push(Qo(u,r.value,n));else{const f=u;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=r.value),f.inst??(f.inst=e),r.issues.push(Qo(f))}};const l=n.transform(r.value,r);return l instanceof Promise?l.then(u=>(r.value=u,r)):(r.value=l,r)}});function VA(e){return new $A({type:"transform",transform:e})}const P0=K("ZodOptional",(e,n)=>{z0.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>B0(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function E1(e){return new P0({type:"optional",innerType:e})}const ZA=K("ZodExactOptional",(e,n)=>{A8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>B0(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function IA(e){return new ZA({type:"optional",innerType:e})}const QA=K("ZodNullable",(e,n)=>{x8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>HR(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function C1(e){return new QA({type:"nullable",innerType:e})}const GA=K("ZodDefault",(e,n)=>{O8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>$R(e,r,o,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function YA(e,n){return new GA({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():S0(n)}})}const XA=K("ZodPrefault",(e,n)=>{M8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>VR(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function KA(e,n){return new XA({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():S0(n)}})}const $0=K("ZodNonOptional",(e,n)=>{z8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>PR(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function FA(e,n){return new $0({type:"nonoptional",innerType:e,...pe(n)})}const JA=K("ZodCatch",(e,n)=>{k8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>ZR(e,r,o,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function WA(e,n){return new JA({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const e7=K("ZodPipe",(e,n)=>{L8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>IR(e,r,o,l),e.in=n.in,e.out=n.out});function T1(e,n){return new e7({type:"pipe",in:e,out:n})}const t7=K("ZodReadonly",(e,n)=>{N8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>QR(e,r,o,l),e.unwrap=()=>e._zod.def.innerType});function n7(e){return new t7({type:"readonly",innerType:e})}const a7=K("ZodCustom",(e,n)=>{D8.init(e,n),ut.init(e,n),e._zod.processJSONSchema=(r,o,l)=>NR(e,r)});function r7(e,n={}){return TR(a7,e,n)}function i7(e){return RR(e)}function md(e){return q8(q0,e)}const o7=()=>Dd(()=>import("./chat-BjwuQsu2.js"),__vite__mapDeps([0,1])),s7=H0({productId:md().optional(),productName:ko().optional(),potvrdit:md().optional()}),l7=Ad("/chat")({validateSearch:e=>s7.parse(e),head:()=>({meta:[{name:"robots",content:"noindex, nofollow"},{title:"AI poradce Zdraví bez léků"}]}),component:xd(o7,"component")}
234),gd={"/":{title:"Zdravotní poradce Zdraví bez léků – kvíz pro výběr doplňků a přírodní kosmetiky",description:"Personalizovaný zdravotní poradce: 4krokový kvíz vás do 2 minut navede k přírodním doplňkům stravy a kosmetice. Vyberte z 7 zdravotních oblastí a získejte až 6 ověřených produktů + slevu 5 % po potvrzení e-mailu.",openGraph:{images:"https://assets.macaly-user-data.dev/adsz9nfc34ho3dt5okmsms1k/dphu4hjpsqbrmxulk4960we2/BrhNB4DUXbrk7rAgnAML5/generated-AI__HXhY.jpeg"}},"/admin":{title:"Admin – Zdravotní poradce",description:"Správa produktů a import z Google Merchant feedu (přihlášení e-mailem)."}},u7=()=>Dd(()=>import("./admin-DbucY-vh.js"),[]),c7=Ad("/admin")({head:()=>{const e=gd["/admin"]??gd["/"];return{meta:[{title:e.title},{name:"description",content:e.description},{name:"robots",content:"noindex, nofollow"}]}},component:xd(u7,"component")});function V0(e,n){const r={get(o,l){if(typeof l=="string"){const u=[...n,l];return V0(e,u)}else if(l===s0){if(n.length<1){const u=[e,...n].join(".");throw new Error(`API path is expected to be of the form \`${e}.childComponent.functionName\`. Found: \`${u}\``)}return"_reference/childComponent/"+n.join("/")}else return}};return new Proxy({},r)}const f7=()=>V0("components",[]);var d7={};async function h7(e,...n){const r=await p7(e,...n);return{_name:rt(e),_argsJSON:Et(n[0]??{}),_valueJSON:Et(r)}}async function p7(e,...n){const[r,o]=n;return m7(o??{}).query(e,r||{})}function m7(e){"url"in e&&e.url===void 0&&console.error("deploymentUrl is undefined, are your environment variables set? In the future explicitly passing undefined will cause an error. To explicitly use the default, pass `process.env.NEXT_PUBLIC_CONVEX_URL`.");const n=new f0(g7(e.url,e.skipConvexDeploymentUrlCheck??!1));return e.token!==void 0&&n.setAuth(e.token),e.adminToken!==void 0&&n.setAdminAuth(e.adminToken),n.setFetchOptions({cache:"no-store"}),n}function g7(e,n){const r=e??d7.NEXT_PUBLIC_CONVEX_URL,o=e===void 0;if(typeof r!="string")throw new Error(o?"Environment variable NEXT_PUBLIC_CONVEX_URL is not set.":"Convex function called with invalid deployment address.");return n||Md(r),r}async function R1(e,n,r){return h7(e,n??{},{url:"https://glad-cassowary-98.eu-west-1.convex.cloud"})}const A1=SC;f7();const Z0=[{id:"pohyb",label:"Pohyb a klouby",icon:"🦴",tagline:"Kloubní pohyblivost, kosti a svaly",seoBlurb:"Doplňky stravy pro klouby, chrupavky, kosti a svaly – glukosamin, chondroitin, kurkumin a vitamín D pro pohyblivost bez omezení.",problems:["Bolavé nebo křupavé klouby","Ztuhlost a omezený rozsah pohybu","Bolest zad a páteře","Oslabené či přetížené svaly","Křehké kosti a prevence osteoporózy"],productSourceIds:["39","475","461","205","343","625","495","496","485"]},{id:"ocista",label:"Očista organismu",icon:"🌿",tagline:"Detox, játra, trávení a střeva",seoBlurb:"Přírodní detoxikace jater, očista střev a trávení – bylinné čaje, inulin, fosfolipidy a komplexní očistné kúry.",problems:["Detoxikace jater","Paraziti a narušená střevní mikroflóra","Zácpa a pomalé zažívání","Zadržování vody a otoky","Plný a těžký pocit po jídle"],productSourceIds:["562","202","505","517","171","444"]},{id:"energie",label:"Energie a únava",icon:"⚡",tagline:"Vitalita, výkon a metabolismus",seoBlurb:"Doplňky pro energii a proti chronické únavě – koenzym Q10, BCAA, magnézium a metabolické podpory pro vitální den.",problems:["Chronická únava","Nedostatek energie během dne","Vyčerpání po sportovní zátěži","Slabá vitalita a výkonnost","Metabolismus cukrů a tuků"],productSourceIds:["478","76","375","131","23","300"]},{id:"odolnost",label:"Odolnost a imunita",icon:"🛡️",tagline:"Imunita, prevence nachlazení",seoBlurb:"Podpora imunity a odolnosti – vitamín C s flavonoidy, vitamín D3, zinek, echinacea a probiotika pro pevnou obranyschopnost.",problems:["Častá nachlazení a infekce","Oslabená imunita","Nedostatek vitamínu C a D","Stresová zátěž a náchylnost","Rekonvalescence po nemoci"],productSourceIds:["313","9","355","305","430","66"]},{id:"spanek",label:"Spánek a stres",icon:"🌙",tagline:"Klid, uvolnění a hluboký spánek",seoBlurb:"Přírodní pomoc na stres a spánek – melatonin, magnézium, bylinné uklidňující čaje a relaxační komplexy pro klidnou mysl.",problems:["Špatné usínání","Časté noční buzení","Nervozita a vnitřní neklid","Napětí a úzkost","Nedostatek hořčíku a minerálů"],productSourceIds:["587","306","381","591","371","45"]},{id:"plet_vlasy",label:"Pleť a vlasy",icon:"💧",tagline:"Hydratace, kolagen, hydratační péče",seoBlurb:"Přírodní kosmetika pro pleť a vlasy – hyaluron, kolagen, ceramidy a hydrační krémy i šampony pro zdravý vzhled.",problems:["Dehydrovaná a suchá pleť","Stárnoucí a zralá pleť","Lámavé a bezlesé vlasy","Vypadávání vlasů","Křehké nehty"],productSourceIds:["525","515","528","540","362","377"]},{id:"starnuti",label:"Zpomalení stárnutí",icon:"✨",tagline:"Antioxidanty, kolagen, longevity",seoBlurb:"Antioxidanty a anti-ageing – resveratrol, kolagen, omega-3 a ALA/NAC pro buňky, pleť a kardiovaskulární prevenci.",problems:["První vrásky a ztráta elasticity","Klesající hladina kolagenu","Buněčná oxidace a volné radikály","Kardiovaskulární prevence","Celková vitalita ve vyšším věku"],productSourceIds:["64","530","534","595","100","301"]}],Z7=["Tobolky / kapsle","Tekutina / kapky","Krém / emulze / mast","Čaj / byliny","Je mi to jedno"],I7=["Do 30 let","30–50 let","50–65 let","65 a více let"],Q7="+420 776 612 861",G7="https://wa.me/420776612861",Y7="https://www.zdravibezleku.cz/",y7=Z0.map(e=>e.id);function v7(e){return typeof e=="string"&&y7.includes(e)}function b7(e){const n=Z0.find(r=>r.id===e);if(!n)throw new Error(`Neznámá kategorie: ${e}`);return n}function S7(e){return b7(e).productSourceIds}const w7={"Tobolky / kapsle":["kapsl","cps","tobolka","tobolky","tablet","tbl"],"Tekutina / kapky":["kapk","tekutin","roztok","sirup"],"Krém / emulze / mast":["krém","emulz","masti","gel","balzám"],"Čaj / byliny":["čaj","bylin"],"Je mi to jedno":[]};function X7(e,n=""){const r=`${e} ${n}`.toLowerCase();for(const[o,l]of Object.entries(w7))if(o!=="Je mi to jedno"&&l.some(u=>r.includes(u)))return o;return null}function K7(e){return!!(e&&e!=="vše"&&e!=="Je mi to jedno")}const _7=()=>Dd(()=>
234import("./index-g_kMCqhT.js"),__vite__mapDeps([2,1])),E7=H0({kat:ko().optional(),problem:ko().optional(),forma:ko().optional(),vek:ko().optional(),potvrdit:md().optional()}),C7=Ad("/")({validateSearch:e=>E7.parse(e),loaderDeps:({search:e})=>({kat:e.kat??"",problem:e.problem??"",forma:e.forma??"",vek:e.vek??""}),loader:async({deps:e})=>{const n=v7(e.kat)?e.kat:null,r=n?S7(n):[],[o,l]=await Promise.all([R1(A1.products.getBySourceIds,{sourceIds:r}),R1(A1.heroBanner.get,{})]),u=new URLSearchParams;e.kat&&u.set("kat",e.kat),e.problem&&u.set("problem",e.problem),e.forma&&u.set("forma",e.forma),e.vek&&u.set("vek",e.vek);const h=`https://zdravi-bez-leku.macaly.app${u.toString()?`/?${u.toString()}`:"/"}`;return{preloadedProducts:o,preloadedBanner:l,canonicalUrl:h}},head:({loaderData:e})=>{const n=gd["/"];return{meta:[{title:n.title},{name:"description",content:n.description},{property:"og:title",content:n.title},{property:"og:description",content:n.description},{property:"og:image",content:n.openGraph.images},{property:"og:image:width",content:"1200"},{property:"og:image:height",content:"630"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:n.title},{name:"twitter:description",content:n.description},{name:"twitter:image",content:n.openGraph.images}],links:[{rel:"canonical",href:e?.canonicalUrl??"https://zdravi-bez-leku.macaly.app/"}]}},component:xd(_7,"component")}),T7=l7.update({id:"/chat",path:"/chat",getParentRoute:()=>au}),R7=c7.update({id:"/admin",path:"/admin",getParentRoute:()=>au}),A7=C7.update({id:"/",path:"/",getParentRoute:()=>au}),x7={IndexRoute:A7,AdminRoute:R7,ChatRoute:T7},O7=au._addFileChildren(x7);function M7(){return X.jsxs("div",{className:"flex flex-col items-center justify-center h-screen gap-4 p-6 text-center",children:[X.jsx("h1",{className:"text-4xl font-semibold",children:"404"}),X.jsx("p",{className:"text-muted-foreground",children:"Page not found."}),X.jsx(Rd,{to:"/",className:"text-sm underline underline-offset-4 hover:no-underline",children:"Go home"})]})}function z7({error:e}){const n=St();return X.jsxs("div",{className:"flex flex-col items-center justify-center h-screen gap-4 p-6 text-center",children:[X.jsx("h1",{className:"text-4xl font-semibold",children:"Something went wrong"}),X.jsx("p",{className:"text-muted-foreground max-w-md break-words",children:e.message}),X.jsx("button",{onClick:()=>n.invalidate(),className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground",children:"Retry"})]})}function k7(){return RE({routeTree:O7,scrollRestoration:!0,defaultPreload:"intent",defaultPreloadStaleTime:0,defaultNotFoundComponent:M7,defaultErrorComponent:z7})}async function L7(){const e=await k7();let n;return n=[],window.__TSS_START_OPTIONS__={serializationAdapters:n},n.push(M4),e.options.serializationAdapters&&n.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:n}),e.stores.matchesId.get().length||await k4(e),e}async function N7(){const e=await L7();return window.$_TSR?.h(),e}var Jf;function D7(){return Jf||(Jf=N7()),X.jsx(U4,{promise:Jf,children:e=>X.jsx(OE,{router:e})})}P.startTransition(()=>{b2.hydrateRoot(document,X.jsx(P.StrictMode,{children:X.jsx(D7,{})}))});export{I7 as A,Z0 as C,Z7 as F,Rd as L,Xt as R,Y7 as S,Q7 as W,Dd as _,l7 as a,C7 as b,G7 as c,A1 as d,U7 as e,X7 as f,B7 as g,b7 as h,c2 as i,v7 as j,K7 as k,pn as l,X as m,Nd as n,O6 as o,V7 as p,P7 as q,P as r,Bv as s,H7 as t,$7 as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.