vendor: 5,784 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/speaking-K27Dbph0.js","assets/Layout-C32cqEsX.js","assets/client-6-CsnuMojm.js","assets/speaking-demo-DRgKvuxd.js","assets/arrow-right-CPczM8Il.js","assets/plus-HeD9qkTI.js","assets/podcast-and-newsletter-xkpO5GKB.js","assets/createServerFn-CrZeT7CO.js","assets/event-resources-CLlE2UZU.js","assets/contact-DFhP4Lqs.js","assets/phone-Bu61inqA.js","assets/about-BCQoL0je.js","assets/index-0UziYnNU.js"])))=>i.map(i=>d[i]); 2function Ow(e,n){for(var s=0;s<n.length;s++){const i=n[s];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(i,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var fx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Eh={exports:{}},bi={};var Um;function Cw(){if(Um)return bi;Um=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function s(i,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var f in l)f!=="key"&&(u[f]=l[f])}else u=l;return l=u.ref,{$$typeof:e,type:i,key:c,ref:l!==void 0?l:null,props:u}}return bi.Fragment=n,bi.jsx=s,bi.jsxs=s,bi}var Nm;function kw(){return Nm||(Nm=1,Eh.exports=Cw()),Eh.exports}var Y=kw(),Th={exports:{}},he={};var Lm;function xw(){if(Lm)return he;Lm=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function _(x){return x===null||typeof x!="object"?null:(x=b&&x[b]||x["@@iterator"],typeof x=="function"?x:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,E={};function A(x,$,X){this.props=x,this.context=$,this.refs=E,this.updater=X||S}A.prototype.isReactComponent={},A.prototype.setState=function(x,$){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,$,"setState")},A.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function U(){}U.prototype=A.prototype;function j(x,$,X){this.props=x,this.context=$,this.refs=E,this.updater=X||S}var L=j.prototype=new U;L.constructor=j,O(L,A.prototype),L.isPureReactComponent=!0;var F=Array.isArray;function V(){}var H={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function J(x,$,X){var W=X.ref;return{$$typeof:e,type:x,key:$,ref:W!==void 0?W:null,props:X}}function ae(x,$){return J(x.type,$,x.props)}function ne(x){return typeof x=="object"&&x!==null&&x.$$typeof===e}function ye(x){var $={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(X){return $[X]})}var Ce=/\/+/g;function Ye(x,$){return typeof x=="object"&&x!==null&&x.key!=null?ye(""+x.key):$.toString(36)}function Be(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(V,V):(x.status="pending",x.then(function($){x.status==="pending"&&(x.status="fulfilled",x.value=$)},function($){x.status==="pending"&&(x.status="rejected",x.reason=$)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function B(x,$,X,W,ie){var pe=typeof x;(pe==="undefined"||pe==="boolean")&&(x=null);var we=!1;if(x===null)we=!0;else switch(pe){case"bigint":case"string":case"number":we=!0;break;case"object":switch(x.$$typeof){case e:case n:we=!0;break;case y:return we=x._init,B(we(x._payload),$,X,W,ie)}}if(we)return ie=ie(x),we=W===""?"."+Ye(x,0):W,F(ie)?(X="",we!=null&&(X=we.replace(Ce,"$&/")+"/"),B(ie,$,X,"",function(Sn){return Sn})):ie!=null&&(ne(ie)&&(ie=ae(ie,X+(ie.key==null||x&&x.key===ie.key?"":(""+ie.key).replace(Ce,"$&/")+"/")+we)),$.push(ie)),1;we=0;var Fe=W===""?".":W+":";if(F(x))for(var Ne=0;Ne<x.length;Ne++)W=x[Ne],pe=Fe+Ye(W,Ne),we+=B(W,$,X,pe,ie);else if(Ne=_(x),typeof Ne=="function")for(x=Ne.call(x),Ne=0;!(W=x.next()).done;)W=W.value,pe=Fe+Ye(W,Ne++),we+=B(W,$,X,pe,ie);else if(pe==="object"){if(typeof x.then=="function")return B(Be(x),$,X,W,ie);throw $=String(x),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return we}function Q(x,$,X){if(x==null)return x;var W=[],ie=0;return B(x,W,"","",function(pe){return $.call(X,pe,ie++)}),W}function le(x){if(x._status===-1){var $=x._result;$=$(),$.then(function(X){(x._status===0||x._status===-1)&&(x._status=1,x._result=X)},function(X){(x._status===0||x._status===-1)&&(x._status=2,x._result=X)}),x._status===-1&&(x._status=0,x._result=$)}if(x._status===1)return x._result.default;throw x._result}var Re=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)}
vendor: 5,097 bytes, line 2
2,Oe={map:Q,forEach:function(x,$,X){Q(x,function(){$.apply(this,arguments)},X)},count:function(x){var $=0;return Q(x,function(){$++}),$},toArray:function(x){return Q(x,function($){return $})||[]},only:function(x){if(!ne(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return he.Activity=m,he.Children=Oe,he.Component=A,he.Fragment=s,he.Profiler=l,he.PureComponent=j,he.StrictMode=i,he.Suspense=p,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,he.__COMPILER_RUNTIME={__proto__:null,c:function(x){return H.H.useMemoCache(x)}},he.cache=function(x){return function(){return x.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(x,$,X){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var W=O({},x.props),ie=x.key;if($!=null)for(pe in $.key!==void 0&&(ie=""+$.key),$)!K.call($,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&$.ref===void 0||(W[pe]=$[pe]);var pe=arguments.length-2;if(pe===1)W.children=X;else if(1<pe){for(var we=Array(pe),Fe=0;Fe<pe;Fe++)we[Fe]=arguments[Fe+2];W.children=we}return J(x.type,ie,W)},he.createContext=function(x){return x={$$typeof:c,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:u,_context:x},x},he.createElement=function(x,$,X){var W,ie={},pe=null;if($!=null)for(W in $.key!==void 0&&(pe=""+$.key),$)K.call($,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ie[W]=$[W]);var we=arguments.length-2;if(we===1)ie.children=X;else if(1<we){for(var Fe=Array(we),Ne=0;Ne<we;Ne++)Fe[Ne]=arguments[Ne+2];ie.children=Fe}if(x&&x.defaultProps)for(W in we=x.defaultProps,we)ie[W]===void 0&&(ie[W]=we[W]);return J(x,pe,ie)},he.createRef=function(){return{current:null}},he.forwardRef=function(x){return{$$typeof:f,render:x}},he.isValidElement=ne,he.lazy=function(x){return{$$typeof:y,_payload:{_status:-1,_result:x},_init:le}},he.memo=function(x,$){return{$$typeof:g,type:x,compare:$===void 0?null:$}},he.startTransition=function(x){var $=H.T,X={};H.T=X;try{var W=x(),ie=H.S;ie!==null&&ie(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(V,Re)}catch(pe){Re(pe)}finally{$!==null&&X.types!==null&&($.types=X.types),H.T=$}},he.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},he.use=function(x){return H.H.use(x)},he.useActionState=function(x,$,X){return H.H.useActionState(x,$,X)},he.useCallback=function(x,$){return H.H.useCallback(x,$)},he.useContext=function(x){return H.H.useContext(x)},he.useDebugValue=function(){},he.useDeferredValue=function(x,$){return H.H.useDeferredValue(x,$)},he.useEffect=function(x,$){return H.H.useEffect(x,$)},he.useEffectEvent=function(x){return H.H.useEffectEvent(x)},he.useId=function(){return H.H.useId()},he.useImperativeHandle=function(x,$,X){return H.H.useImperativeHandle(x,$,X)},he.useInsertionEffect=function(x,$){return H.H.useInsertionEffect(x,$)},he.useLayoutEffect=function(x,$){return H.H.useLayoutEffect(x,$)},he.useMemo=function(x,$){return H.H.useMemo(x,$)},he.useOptimistic=function(x,$){return H.H.useOptimistic(x,$)},he.useReducer=function(x,$,X){return H.H.useReducer(x,$,X)},he.useRef=function(x){return H.H.useRef(x)},he.useState=function(x){return H.H.useState(x)},he.useSyncExternalStore=function(x,$,X){return H.H.useSyncExternalStore(x,$,X)},he.useTransition=function(){return H.H.useTransition()},he.version="19.2.5",he}var Dm;function Fi(){return Dm||(Dm=1,Th.exports=xw()),Th.exports}var se=Fi();const ba=wv(se),dx=Ow({__proto__:null,default:ba},[se]);var Rh={exports:{}},_i={},Ah={exports:{}},Oh={};var zm;function jw(){return zm||(zm=1,(function(e){function n(B,Q){var le=B.length;B.push(Q);e:for(;0<le;){var Re=le-1>>>1,Oe=B[Re];if(0<l(Oe,Q))B[Re]=Q,B[le]=Oe,le=Re;else break e}}function s(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var Q=B[0],le=B.pop();if(le!==Q){B[0]=le;e:for(var Re=0,Oe=B.length,x=Oe>>>1;Re<x;){var $=2*(Re+1)-1,X=B[$],W=$+1,ie=B[W];if(0>l(X,le))W<Oe&&0>l(ie,X)?(B[Re]=ie,B[W]=le,Re=W):(B[Re]=X,B[$]=le,Re=$);else if(W<Oe&&0>l(ie,le))B[Re]=ie,B[W]=le,Re=W;else break e}}return Q}function l(B,Q){var le=B.sortIndex-Q.sortIndex;return le!==0?le:B.id-Q.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 c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],g=[],y=1,m=null,b=3,_=!1,S=!1,O=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function L(B){for(var Q=s(g);Q!==null;){if(Q.callback===null)i(g);else if(Q.startTime<=B)i(g),Q.sortIndex=Q.expirationTime,n(p,Q);else break;Q=s(g)}}function F(B){if(O=!1,L(B),!S)if(s(p)!==null)S=!0,V||(V=!0,ye());else{var Q=s(g);Q!==null&&Be(F,Q.startTime-B)}}var V=!1,H=-1,K=5,J=-1;function ae(){return E?!0:!(e.unstable_now()-J<K)}function ne(){if(E=!1,V){var B=e.unstable_now();J=B;var Q=!0;try{e:{S=!1,O&&(O=!1,U(H),H=-1),_=!0;var le=b;
vendor: 10,811 bytes, lines 2-4
2try{t:{for(L(B),m=s(p);m!==null&&!(m.expirationTime>B&&ae());){var Re=m.callback;if(typeof Re=="function"){m.callback=null,b=m.priorityLevel;var Oe=Re(m.expirationTime<=B);if(B=e.unstable_now(),typeof Oe=="function"){m.callback=Oe,L(B),Q=!0;break t}m===s(p)&&i(p),L(B)}else i(p);m=s(p)}if(m!==null)Q=!0;else{var x=s(g);x!==null&&Be(F,x.startTime-B),Q=!1}}break e}finally{m=null,b=le,_=!1}Q=void 0}}finally{Q?ye():V=!1}}}var ye;if(typeof j=="function")ye=function(){j(ne)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Ye=Ce.port2;Ce.port1.onmessage=ne,ye=function(){Ye.postMessage(null)}}else ye=function(){A(ne,0)};function Be(B,Q){H=A(function(){B(e.unstable_now())},Q)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var le=b;b=Q;try{return B()}finally{b=le}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var le=b;b=B;try{return Q()}finally{b=le}},e.unstable_scheduleCallback=function(B,Q,le){var Re=e.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?Re+le:Re):le=Re,B){case 1:var Oe=-1;break;case 2:Oe=250;break;case 5:Oe=1073741823;break;case 4:Oe=1e4;break;default:Oe=5e3}return Oe=le+Oe,B={id:y++,callback:Q,priorityLevel:B,startTime:le,expirationTime:Oe,sortIndex:-1},le>Re?(B.sortIndex=le,n(g,B),s(p)===null&&B===s(g)&&(O?(U(H),H=-1):O=!0,Be(F,le-Re))):(B.sortIndex=Oe,n(p,B),S||_||(S=!0,V||(V=!0,ye()))),B},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(B){var Q=b;return function(){var le=b;b=Q;try{return B.apply(this,arguments)}finally{b=le}}}})(Oh)),Oh}var Pm;function Mw(){return Pm||(Pm=1,Ah.exports=jw()),Ah.exports}var Ch={exports:{}},_t={};var Bm;function Uw(){if(Bm)return _t;Bm=1;var e=Fi();function n(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(n(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,g,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:p,containerInfo:g,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_t.createPortal=function(p,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(n(299));return u(p,g,null,y)},_t.flushSync=function(p){var g=c.T,y=i.p;try{if(c.T=null,i.p=2,p)return p()}finally{c.T=g,i.p=y,i.d.f()}},_t.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(p,g))},_t.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},_t.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?i.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:_}):y==="script"&&i.d.X(p,{crossOrigin:m,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},_t.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=f(g.as,g.crossOrigin);i.d.M(p,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(p)},_t.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin);i.d.L(p,y,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},_t.preloadModule=function(p,g){if(typeof p=="string")if(g){var y=f(g.as,g.crossOrigin);i.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(p)},_t.requestFormReset=function(p){i.d.r(p)},_t.unstable_batchedUpdates=function(p,g){return p(g)},_t.useFormState=function(p,g,y){return c.H.useFormState(p,g,y)},_t.useFormStatus=function(){return c.H.useHostTransitionStatus()},_t.version="19.2.5",_t}var Hm;function Sv(){if(Hm)return Ch.exports;Hm=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(),Ch.exports=Uw(),Ch.exports}var qm;function Nw(){if(qm)return _i;qm=1;var e=Mw(),n=Fi(),s=Sv();function i(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" 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 r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(i(188))}function g(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(i(188));return r!==t?null:t}for(var a=t,o=r;;){var h=a.return;if(h===null)break;var d=h.alternate;if(d===null){if(o=h.return,o!==null){a=o;continue}break}if(h.child===d.child){for(d=h.child;d;){if(d===a)return p(h),t;if(d===o)return p(h),r;d=d.sibling}throw Error(i(188))}if(a.return!==o.return)a=h,o=d;else{for(var v=!1,w=h.child;w;){if(w===a){v=!0,a=h,o=d;break}if(w===o){v=!0,o=h,a=d;break}w=w.sibling}if(!v){for(w=d.child;w;){if(w===a){v=!0,a=d,o=h;break}if(w===o){v=!0,o=d,a=h;break}w=w.sibling}if(!v)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),j=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function ye(t){return t===null||typeof t!="object"?null:(t=ne&&t[ne]||t["@@iterator"],typeof t=="function"?t:null)}var Ce=Symbol.for("react.client.reference");function Ye(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ce?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case F:return"Suspense";case V:return"SuspenseList";case J:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case j:return t.displayName||"Context";case U:return(t._context.displayName||"Context")+".Consumer";case L:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case H:return r=t.displayName||null,r!==null?r:Ye(t.type)||"Memo";case K:r=t._payload,t=t._init;try{return Ye(t(r))}catch{}}return null}var Be=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},Re=[],Oe=-1;function x(t){return{current:t}}function $(t){0>Oe||(t.current=Re[Oe],Re[Oe]=null,Oe--)}function X(t,r){Oe++,Re[Oe]=t.current,t.current=r}var W=x(null),ie=x(null),pe=x(null),we=x(null);function Fe(t,r){switch(X(pe,r),X(ie,t),X(W,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?nm(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=nm(r),t=rm(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}$(W),X(W,t)}function Ne(){$(W),$(ie),$(pe)}function Sn(t){t.memoizedState!==null&&X(we,t);var r=W.current,a=rm(r,t.type);r!==a&&(X(ie,t),X(W,a))}function En(t){ie.current===t&&($(W),$(ie)),we.current===t&&($(we),gi._currentValue=le)}var Zn,Ta;function hn(t){if(Zn===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Zn=r&&r[1]||"",Ta=-1<a.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Zn+t+Ta}var Ra=!1;function ms(t,r){if(!t||Ra)return"";Ra=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(P){var z=P}Reflect.construct(t,[],G)}else{try{G.call()}catch(P){z=P}t.call(G.prototype)}}else{try{throw Error()}catch(P){z=P}(G=t())&&typeof G.catch=="function"&&G.catch(function(){})}}
vendor: 4,266 bytes, lines 4-9
4catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),v=d[0],w=d[1];if(v&&w){var C=v.split(` 5`),D=w.split(` 6`);for(h=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;h<D.length&&!D[h].includes("DetermineComponentFrameRoot");)h++;if(o===C.length||h===D.length)for(o=C.length-1,h=D.length-1;1<=o&&0<=h&&C[o]!==D[h];)h--;for(;1<=o&&0<=h;o--,h--)if(C[o]!==D[h]){if(o!==1||h!==1)do if(o--,h--,0>h||C[o]!==D[h]){var q=` 7`+C[o].replace(" at new "," at ");return t.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",t.displayName)),q}while(1<=o&&0<=h);break}}}finally{Ra=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?hn(a):""}function Zi(t,r){switch(t.tag){case 26:case 27:case 5:return hn(t.type);case 16:return hn("Lazy");case 13:return t.child!==r&&r!==null?hn("Suspense Fallback"):hn("Suspense");case 19:return hn("SuspenseList");case 0:case 15:return ms(t.type,!1);case 11:return ms(t.type.render,!1);case 1:return ms(t.type,!0);case 31:return hn("Activity");default:return""}}function Tn(t){try{var r="",a=null;do r+=Zi(t,a),a=t,t=t.return;while(t);return r}catch(o){return` 8Error generating stack: `+o.message+` 9`+o.stack}}var zr=Object.prototype.hasOwnProperty,tn=e.unstable_scheduleCallback,Aa=e.unstable_cancelCallback,Wi=e.unstable_shouldYield,cu=e.unstable_requestPaint,bt=e.unstable_now,ze=e.unstable_getCurrentPriorityLevel,ct=e.unstable_ImmediatePriority,fn=e.unstable_UserBlockingPriority,ys=e.unstable_NormalPriority,l0=e.unstable_LowPriority,Df=e.unstable_IdlePriority,u0=e.log,c0=e.unstable_setDisableYieldValue,Oa=null,Nt=null;function Wn(t){if(typeof u0=="function"&&c0(t),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Oa,t)}catch{}}var Lt=Math.clz32?Math.clz32:d0,h0=Math.log,f0=Math.LN2;function d0(t){return t>>>=0,t===0?32:31-(h0(t)/f0|0)|0}var eo=256,to=262144,no=4194304;function Pr(t){var r=t&42;if(r!==0)return r;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 ro(t,r,a){var o=t.pendingLanes;if(o===0)return 0;var h=0,d=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var w=o&134217727;return w!==0?(o=w&~d,o!==0?h=Pr(o):(v&=w,v!==0?h=Pr(v):a||(a=w&~t,a!==0&&(h=Pr(a))))):(w=o&~d,w!==0?h=Pr(w):v!==0?h=Pr(v):a||(a=o&~t,a!==0&&(h=Pr(a)))),h===0?0:r!==0&&r!==h&&(r&d)===0&&(d=h&-h,a=r&-r,d>=a||d===32&&(a&4194048)!==0)?r:h}function Ca(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function p0(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 zf(){var t=no;return no<<=1,(no&62914560)===0&&(no=4194304),t}function hu(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function ka(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function g0(t,r,a,o,h,d){var v=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var w=t.entanglements,C=t.expirationTimes,D=t.hiddenUpdates;for(a=v&~a;0<a;){var q=31-Lt(a),G=1<<q;w[q]=0,C[q]=-1;var z=D[q];
vendor: 8,957 bytes, line 9
9if(z!==null)for(D[q]=null,q=0;q<z.length;q++){var P=z[q];P!==null&&(P.lane&=-536870913)}a&=~G}o!==0&&Pf(t,o,0),d!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=d&~(v&~r))}function Pf(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var o=31-Lt(r);t.entangledLanes|=r,t.entanglements[o]=t.entanglements[o]|1073741824|a&261930}function Bf(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var o=31-Lt(a),h=1<<o;h&r|t[o]&r&&(t[o]|=r),a&=~h}}function Hf(t,r){var a=r&-r;return a=(a&42)!==0?1:fu(a),(a&(t.suspendedLanes|r))!==0?0:a}function fu(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 du(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function qf(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:Am(t.type))}function If(t,r){var a=Q.p;try{return Q.p=t,r()}finally{Q.p=a}}var er=Math.random().toString(36).slice(2),ht="__reactFiber$"+er,Et="__reactProps$"+er,vs="__reactContainer$"+er,pu="__reactEvents$"+er,m0="__reactListeners$"+er,y0="__reactHandles$"+er,$f="__reactResources$"+er,xa="__reactMarker$"+er;function gu(t){delete t[ht],delete t[Et],delete t[pu],delete t[m0],delete t[y0]}function bs(t){var r=t[ht];if(r)return r;for(var a=t.parentNode;a;){if(r=a[vs]||a[ht]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=cm(t);t!==null;){if(a=t[ht])return a;t=cm(t)}return r}t=a,a=t.parentNode}return null}function _s(t){if(t=t[ht]||t[vs]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function ja(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(i(33))}function ws(t){var r=t[$f];return r||(r=t[$f]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function it(t){t[xa]=!0}var Gf=new Set,Vf={};function Br(t,r){Ss(t,r),Ss(t+"Capture",r)}function Ss(t,r){for(Vf[t]=r,t=0;t<r.length;t++)Gf.add(r[t])}var v0=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Kf={},Yf={};function b0(t){return zr.call(Yf,t)?!0:zr.call(Kf,t)?!1:v0.test(t)?Yf[t]=!0:(Kf[t]=!0,!1)}function so(t,r,a){if(b0(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function ao(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Rn(t,r,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+o)}}function Gt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ff(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function _0(t,r,a){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,d=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){a=""+v,d.call(this,v)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function mu(t){if(!t._valueTracker){var r=Ff(t)?"checked":"value";t._valueTracker=_0(t,r,""+t[r])}}function Qf(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),o="";return t&&(o=Ff(t)?t.checked?"true":"false":t.value),t=o,t!==a?(r.setValue(t),!0):!1}function io(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 w0=/[\n"\\]/g;function Vt(t){return t.replace(w0,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function yu(t,r,a,o,h,d,v,w){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),r!=null?v==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Gt(r)):t.value!==""+Gt(r)&&(t.value=""+Gt(r)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),r!=null?vu(t,v,Gt(r)):a!=null?vu(t,v,Gt(a)):o!=null&&t.removeAttribute("value"),h==null&&d!=null&&(t.defaultChecked=!!d),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.name=""+Gt(w):t.removeAttribute("name")}function Jf(t,r,a,o,h,d,v,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.type=d),r!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||r!=null)){mu(t);return}a=a!=null?""+Gt(a):"",r=r!=null?""+Gt(r):a,w||r===t.value||(t.value=r),t.defaultValue=r}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=w?t.checked:!!o,t.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),mu(t)}function vu(t,r,a){r==="number"&&io(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Es(t,r,a,o){if(t=t.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=r.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&o&&(t[a].defaultSelected=!0)}else{for(a=""+Gt(a),r=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,o&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Xf(t,r,a){if(r!=null&&(r=""+Gt(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+Gt(a):""}function Zf(t,r,a,o){if(r==null){if(o!=null){if(a!=null)throw Error(i(92));if(Be(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),r=a}a=Gt(r),t.defaultValue=a,o=t.textContent,o===a&&o!==""&&o!==null&&(t.value=o),mu(t)}function Ts(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var S0=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 Wf(t,r,a){var o=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":o?t.setProperty(r,a):typeof a!="number"||a===0||S0.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function ed(t,r,a){if(r!=null&&typeof r!="object")throw Error(i(62));if(t=t.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var h in r)o=r[h],r.hasOwnProperty(h)&&a[h]!==o&&Wf(t,h,o)}else for(var d in r)r.hasOwnProperty(d)&&Wf(t,d,r[d])}function bu(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 E0=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"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),T0=/^[\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 oo(t){return T0.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function An(){}var _u=null;function wu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Rs=null,As=null;function td(t){var r=_s(t);if(r&&(t=r.stateNode)){var a=t[Et]||null;e:switch(t=r.stateNode,r.type){case"input":if(yu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var o=a[r];if(o!==t&&o.form===t.form){var h=o[Et]||null;if(!h)throw Error(i(90));yu(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<a.length;r++)o=a[r],o.form===t.form&&Qf(o)}break e;case"textarea":Xf(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&Es(t,!!a.multiple,r,!1)}}}var Su=!1;function nd(t,r,a){if(Su)return t(r,a);Su=!0;try{var o=t(r);return o}finally{if(Su=!1,(Rs!==null||As!==null)&&(Qo(),Rs&&(r=Rs,t=As,As=Rs=null,td(r),t)))for(r=0;r<t.length;r++)td(t[r])}}function Ma(t,r){var a=t.stateNode;if(a===null)return null;var o=a[Et]||null;if(o===null)return null;a=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(i(231,r,typeof a));return a}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eu=!1;if(On)try{var Ua={};Object.defineProperty(Ua,"passive",{get:function(){Eu=!0}}),window.addEventListener("test",Ua,Ua),window.removeEventListener("test",Ua,Ua)}catch{Eu=!1}var tr=null,Tu=null,lo=null;function rd(){if(lo)return lo;var t,r=Tu,a=r.length,o,h="value"in tr?tr.value:tr.textContent,d=h.length;for(t=0;t<a&&r[t]===h[t];t++);var v=a-t;for(o=1;o<=v&&r[a-o]===h[d-o];o++);return lo=h.slice(t,1<o?1-o:void 0)}function uo(t){var r=t.keyCode;
vendor: 4,829 bytes, line 9
9return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function co(){return!0}function sd(){return!1}function Tt(t){function r(a,o,h,d,v){this._reactName=a,this._targetInst=h,this.type=o,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var w in t)t.hasOwnProperty(w)&&(a=t[w],this[w]=a?a(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?co:sd,this.isPropagationStopped=sd,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=co)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=co)},persist:function(){},isPersistent:co}),r}var Hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ho=Tt(Hr),Na=m({},Hr,{view:0,detail:0}),R0=Tt(Na),Ru,Au,La,fo=m({},Na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cu,button:0,buttons:0,relatedTarget:function(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!==La&&(La&&t.type==="mousemove"?(Ru=t.screenX-La.screenX,Au=t.screenY-La.screenY):Au=Ru=0,La=t),Ru)},movementY:function(t){return"movementY"in t?t.movementY:Au}}),ad=Tt(fo),A0=m({},fo,{dataTransfer:0}),O0=Tt(A0),C0=m({},Na,{relatedTarget:0}),Ou=Tt(C0),k0=m({},Hr,{animationName:0,elapsedTime:0,pseudoElement:0}),x0=Tt(k0),j0=m({},Hr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),M0=Tt(j0),U0=m({},Hr,{data:0}),id=Tt(U0),N0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L0={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"},D0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function z0(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=D0[t])?!!r[t]:!1}function Cu(){return z0}var P0=m({},Na,{key:function(t){if(t.key){var r=N0[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=uo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?L0[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cu,charCode:function(t){return t.type==="keypress"?uo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?uo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),B0=Tt(P0),H0=m({},fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),od=Tt(H0),q0=m({},Na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cu}),I0=Tt(q0),$0=m({},Hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),G0=Tt($0),V0=m({},fo,{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}),K0=Tt(V0),Y0=m({},Hr,{newState:0,oldState:0}),F0=Tt(Y0),Q0=[9,13,27,32],ku=On&&"CompositionEvent"in window,Da=null;On&&"documentMode"in document&&(Da=document.documentMode);var J0=On&&"TextEvent"in window&&!Da,ld=On&&(!ku||Da&&8<Da&&11>=Da),ud=" ",cd=!1;function hd(t,r){switch(t){case"keyup":return Q0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Os=!1;function X0(t,r){switch(t){case"compositionend":return fd(r);case"keypress":return r.which!==32?null:(cd=!0,ud);case"textInput":return t=r.data,t===ud&&cd?null:t;default:return null}}function Z0(t,r){if(Os)return t==="compositionend"||!ku&&hd(t,r)?(t=rd(),lo=Tu=tr=null,Os=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;
vendor: 5,767 bytes, line 9
9if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ld&&r.locale!=="ko"?null:r.data;default:return null}}var W0={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 dd(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!W0[t.type]:r==="textarea"}function pd(t,r,a,o){Rs?As?As.push(o):As=[o]:Rs=o,r=nl(r,"onChange"),0<r.length&&(a=new ho("onChange","change",null,a,o),t.push({event:a,listeners:r}))}var za=null,Pa=null;function e_(t){Jg(t,0)}function po(t){var r=ja(t);if(Qf(r))return t}function gd(t,r){if(t==="change")return r}var md=!1;if(On){var xu;if(On){var ju="oninput"in document;if(!ju){var yd=document.createElement("div");yd.setAttribute("oninput","return;"),ju=typeof yd.oninput=="function"}xu=ju}else xu=!1;md=xu&&(!document.documentMode||9<document.documentMode)}function vd(){za&&(za.detachEvent("onpropertychange",bd),Pa=za=null)}function bd(t){if(t.propertyName==="value"&&po(Pa)){var r=[];pd(r,Pa,t,wu(t)),nd(e_,r)}}function t_(t,r,a){t==="focusin"?(vd(),za=r,Pa=a,za.attachEvent("onpropertychange",bd)):t==="focusout"&&vd()}function n_(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return po(Pa)}function r_(t,r){if(t==="click")return po(r)}function s_(t,r){if(t==="input"||t==="change")return po(r)}function a_(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Dt=typeof Object.is=="function"?Object.is:a_;function Ba(t,r){if(Dt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),o=Object.keys(r);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var h=a[o];if(!zr.call(r,h)||!Dt(t[h],r[h]))return!1}return!0}function _d(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function wd(t,r){var a=_d(t);t=0;for(var o;a;){if(a.nodeType===3){if(o=t+a.textContent.length,t<=r&&o>=r)return{node:a,offset:r-t};t=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=_d(a)}}function Sd(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Sd(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Ed(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=io(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=io(t.document)}return r}function Mu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var i_=On&&"documentMode"in document&&11>=document.documentMode,Cs=null,Uu=null,Ha=null,Nu=!1;function Td(t,r,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Nu||Cs==null||Cs!==io(o)||(o=Cs,"selectionStart"in o&&Mu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ha&&Ba(Ha,o)||(Ha=o,o=nl(Uu,"onSelect"),0<o.length&&(r=new ho("onSelect","select",null,r,a),t.push({event:r,listeners:o}),r.target=Cs)))}function qr(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var ks={animationend:qr("Animation","AnimationEnd"),animationiteration:qr("Animation","AnimationIteration"),animationstart:qr("Animation","AnimationStart"),transitionrun:qr("Transition","TransitionRun"),transitionstart:qr("Transition","TransitionStart"),transitioncancel:qr("Transition","TransitionCancel"),transitionend:qr("Transition","TransitionEnd")},Lu={},Rd={};On&&(Rd=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function Ir(t){if(Lu[t])return Lu[t];if(!ks[t])return t;var r=ks[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in Rd)return Lu[t]=r[a];return t}var Ad=Ir("animationend"),Od=Ir("animationiteration"),Cd=Ir("animationstart"),o_=Ir("transitionrun"),l_=Ir("transitionstart"),u_=Ir("transitioncancel"),kd=Ir("transitionend"),xd=new Map,Du="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(" ");Du.push("scrollEnd");function nn(t,r){xd.set(t,r),Br(r,[t])}var go=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Kt=[],xs=0,zu=0;function mo(){for(var t=xs,r=zu=xs=0;r<t;){var a=Kt[r];Kt[r++]=null;var o=Kt[r];Kt[r++]=null;var h=Kt[r];Kt[r++]=null;var d=Kt[r];if(Kt[r++]=null,o!==null&&h!==null){var v=o.pending;
vendor: 16,211 bytes, line 9
9v===null?h.next=h:(h.next=v.next,v.next=h),o.pending=h}d!==0&&jd(a,h,d)}}function yo(t,r,a,o){Kt[xs++]=t,Kt[xs++]=r,Kt[xs++]=a,Kt[xs++]=o,zu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function Pu(t,r,a,o){return yo(t,r,a,o),vo(t)}function $r(t,r){return yo(t,null,null,r),vo(t)}function jd(t,r,a){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a);for(var h=!1,d=t.return;d!==null;)d.childLanes|=a,o=d.alternate,o!==null&&(o.childLanes|=a),d.tag===22&&(t=d.stateNode,t===null||t._visibility&1||(h=!0)),t=d,d=d.return;return t.tag===3?(d=t.stateNode,h&&r!==null&&(h=31-Lt(a),t=d.hiddenUpdates,o=t[h],o===null?t[h]=[r]:o.push(r),r.lane=a|536870912),d):null}function vo(t){if(50<li)throw li=0,Yc=null,Error(i(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var js={};function c_(t,r,a,o){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(t,r,a,o){return new c_(t,r,a,o)}function Bu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Cn(t,r){var a=t.alternate;return a===null?(a=zt(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Md(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function bo(t,r,a,o,h,d){var v=0;if(o=t,typeof t=="function")Bu(t)&&(v=1);else if(typeof t=="string")v=gw(t,a,W.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case J:return t=zt(31,a,r,h),t.elementType=J,t.lanes=d,t;case O:return Gr(a.children,h,d,r);case E:v=8,h|=24;break;case A:return t=zt(12,a,r,h|2),t.elementType=A,t.lanes=d,t;case F:return t=zt(13,a,r,h),t.elementType=F,t.lanes=d,t;case V:return t=zt(19,a,r,h),t.elementType=V,t.lanes=d,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:v=10;break e;case U:v=9;break e;case L:v=11;break e;case H:v=14;break e;case K:v=16,o=null;break e}v=29,a=Error(i(130,t===null?"null":typeof t,"")),o=null}return r=zt(v,a,r,h),r.elementType=t,r.type=o,r.lanes=d,r}function Gr(t,r,a,o){return t=zt(7,t,o,r),t.lanes=a,t}function Hu(t,r,a){return t=zt(6,t,null,r),t.lanes=a,t}function Ud(t){var r=zt(18,null,null,0);return r.stateNode=t,r}function qu(t,r,a){return r=zt(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Nd=new WeakMap;function Yt(t,r){if(typeof t=="object"&&t!==null){var a=Nd.get(t);return a!==void 0?a:(r={value:t,source:r,stack:Tn(r)},Nd.set(t,r),r)}return{value:t,source:r,stack:Tn(r)}}var Ms=[],Us=0,_o=null,qa=0,Ft=[],Qt=0,nr=null,dn=1,pn="";function kn(t,r){Ms[Us++]=qa,Ms[Us++]=_o,_o=t,qa=r}function Ld(t,r,a){Ft[Qt++]=dn,Ft[Qt++]=pn,Ft[Qt++]=nr,nr=t;var o=dn;t=pn;var h=32-Lt(o)-1;o&=~(1<<h),a+=1;var d=32-Lt(r)+h;if(30<d){var v=h-h%5;d=(o&(1<<v)-1).toString(32),o>>=v,h-=v,dn=1<<32-Lt(r)+h|a<<h|o,pn=d+t}else dn=1<<d|a<<h|o,pn=t}function Iu(t){t.return!==null&&(kn(t,1),Ld(t,1,0))}function $u(t){for(;t===_o;)_o=Ms[--Us],Ms[Us]=null,qa=Ms[--Us],Ms[Us]=null;for(;t===nr;)nr=Ft[--Qt],Ft[Qt]=null,pn=Ft[--Qt],Ft[Qt]=null,dn=Ft[--Qt],Ft[Qt]=null}function Dd(t,r){Ft[Qt++]=dn,Ft[Qt++]=pn,Ft[Qt++]=nr,dn=r.id,pn=r.overflow,nr=t}var ft=null,He=null,_e=!1,rr=null,Jt=!1,Gu=Error(i(519));function sr(t){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ia(Yt(r,t)),Gu}function zd(t){var r=t.stateNode,a=t.type,o=t.memoizedProps;switch(r[ht]=t,r[Et]=o,a){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(a=0;a<ci.length;a++)me(ci[a],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":me("invalid",r),Jf(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":me("invalid",r);break;case"textarea":me("invalid",r),Zf(r,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||o.suppressHydrationWarning===!0||em(r.textContent,a)?(o.popover!=null&&(me("beforetoggle",r),me("toggle",r)),o.onScroll!=null&&me("scroll",r),o.onScrollEnd!=null&&me("scrollend",r),o.onClick!=null&&(r.onclick=An),r=!0):r=!1,r||sr(t,!0)}function Pd(t){for(ft=t.return;ft;)switch(ft.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:ft=ft.return}}function Ns(t){if(t!==ft)return!1;if(!_e)return Pd(t),_e=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||lh(t.type,t.memoizedProps)),a=!a),a&&He&&sr(t),Pd(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));He=um(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));He=um(t)}else r===27?(r=He,vr(t.type)?(t=dh,dh=null,He=t):He=r):He=ft?Zt(t.stateNode.nextSibling):null;return!0}function Vr(){He=ft=null,_e=!1}function Vu(){var t=rr;return t!==null&&(Ct===null?Ct=t:Ct.push.apply(Ct,t),rr=null),t}function Ia(t){rr===null?rr=[t]:rr.push(t)}var Ku=x(null),Kr=null,xn=null;function ar(t,r,a){X(Ku,r._currentValue),r._currentValue=a}function jn(t){t._currentValue=Ku.current,$(Ku)}function Yu(t,r,a){for(;t!==null;){var o=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),t===a)break;t=t.return}}function Fu(t,r,a,o){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var d=h.dependencies;if(d!==null){var v=h.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=h;for(var C=0;C<r.length;C++)if(w.context===r[C]){d.lanes|=a,w=d.alternate,w!==null&&(w.lanes|=a),Yu(d.return,a,t),o||(v=null);break e}d=w.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(i(341));v.lanes|=a,d=v.alternate,d!==null&&(d.lanes|=a),Yu(v,a,t),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===t){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function Ls(t,r,a,o){t=null;for(var h=r,d=!1;h!==null;){if(!d){if((h.flags&524288)!==0)d=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var w=h.type;Dt(h.pendingProps.value,v.value)||(t!==null?t.push(w):t=[w])}}else if(h===we.current){if(v=h.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(gi):t=[gi])}h=h.return}t!==null&&Fu(r,t,a,o),r.flags|=262144}function wo(t){for(t=t.firstContext;t!==null;){if(!Dt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Yr(t){Kr=t,xn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function dt(t){return Bd(Kr,t)}function So(t,r){return Kr===null&&Yr(t),Bd(t,r)}function Bd(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},xn===null){if(t===null)throw Error(i(308));xn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else xn=xn.next=r;return a}var h_=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,o){t.push(o)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},f_=e.unstable_scheduleCallback,d_=e.unstable_NormalPriority,Xe={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qu(){return{controller:new h_,data:new Map,refCount:0}}function $a(t){t.refCount--,t.refCount===0&&f_(d_,function(){t.controller.abort()})}var Ga=null,Ju=0,Ds=0,zs=null;function p_(t,r){if(Ga===null){var a=Ga=[];Ju=0,Ds=Wc(),zs={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Ju++,r.then(Hd,Hd),r}function Hd(){if(--Ju===0&&Ga!==null){zs!==null&&(zs.status="fulfilled");var t=Ga;Ga=null,Ds=0,zs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function g_(t,r){var a=[],o={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){o.status="fulfilled",o.value=r;for(var h=0;h<a.length;h++)(0,a[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),o}var qd=B.S;B.S=function(t,r){Tg=bt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&p_(t,r),qd!==null&&qd(t,r)};var Fr=x(null);function Xu(){var t=Fr.current;return t!==null?t:Le.pooledCache}function Eo(t,r){r===null?X(Fr,Fr.current):X(Fr,r.pool)}function Id(){var t=Xu();return t===null?null:{parent:Xe._currentValue,pool:t}}var Ps=Error(i(460)),Zu=Error(i(474)),To=Error(i(542)),Ro={then:function(){}};function $d(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Gd(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(An,An),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Kd(t),t;default:if(typeof r.status=="string")r.then(An,An);else{if(t=Le,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=r,t.status="pending",t.then(function(o){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=o}},function(o){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Kd(t),t}throw Jr=r,Ps}}function Qr(t){try{var r=t._init;return r(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Jr=a,Ps):a}}var Jr=null;function Vd(){if(Jr===null)throw Error(i(459));var t=Jr;return Jr=null,t}function Kd(t){if(t===Ps||t===To)throw Error(i(483))}var Bs=null,Va=0;function Ao(t){var r=Va;return Va+=1,Bs===null&&(Bs=[]),Gd(Bs,t,r)}function Ka(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Oo(t,r){throw r.$$typeof===b?Error(i(525)):(t=Object.prototype.toString.call(r),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Yd(t){function r(M,k){if(t){var N=M.deletions;N===null?(M.deletions=[k],M.flags|=16):N.push(k)}}function a(M,k){if(!t)return null;for(;k!==null;)r(M,k),k=k.sibling;return null}function o(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function h(M,k){return M=Cn(M,k),M.index=0,M.sibling=null,M}function d(M,k,N){return M.index=N,t?(N=M.alternate,N!==null?(N=N.index,N<k?(M.flags|=67108866,k):N):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function v(M){return t&&M.alternate===null&&(M.flags|=67108866),M}function w(M,k,N,I){return k===null||k.tag!==6?(k=Hu(N,M.mode,I),k.return=M,k):(k=h(k,N),k.return=M,k)}function C(M,k,N,I){var oe=N.type;return oe===O?q(M,k,N.props.children,I,N.key):k!==null&&(k.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===K&&Qr(oe)===k.type)?(k=h(k,N.props),Ka(k,N),k.return=M,k):(k=bo(N.type,N.key,N.props,null,M.mode,I),Ka(k,N),k.return=M,k)}function D(M,k,N,I){return k===null||k.tag!==4||k.stateNode.containerInfo!==N.containerInfo||k.stateNode.implementation!==N.implementation?(k=qu(N,M.mode,I),k.return=M,k):(k=h(k,N.children||[]),k.return=M,k)}function q(M,k,N,I,oe){return k===null||k.tag!==7?(k=Gr(N,M.mode,I,oe),k.return=M,k):(k=h(k,N),k.return=M,k)}function G(M,k,N){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Hu(""+k,M.mode,N),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case _:return N=bo(k.type,k.key,k.props,null,M.mode,N),Ka(N,k),N.return=M,N;case S:return k=qu(k,M.mode,N),k.return=M,k;case K:return k=Qr(k),G(M,k,N)}if(Be(k)||ye(k))return k=Gr(k,M.mode,N,null),k.return=M,k;if(typeof k.then=="function")return G(M,Ao(k),N);if(k.$$typeof===j)return G(M,So(M,k),N);Oo(M,k)}return null}function z(M,k,N,I){var oe=k!==null?k.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return oe!==null?null:w(M,k,""+N,I);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _:return N.key===oe?C(M,k,N,I):null;case S:return N.key===oe?D(M,k,N,I):null;case K:return N=Qr(N),z(M,k,N,I)}if(Be(N)||ye(N))return oe!==null?null:q(M,k,N,I,null);if(typeof N.then=="function")return z(M,k,Ao(N),I);if(N.$$typeof===j)return z(M,k,So(M,N),I);Oo(M,N)}return null}function P(M,k,N,I,oe){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return M=M.get(N)||null,w(k,M,""+I,oe);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return M=M.get(I.key===null?N:I.key)||null,C(k,M,I,oe);case S:return M=M.get(I.key===null?N:I.key)||null,D(k,M,I,oe);case K:return I=Qr(I),P(M,k,N,I,oe)}if(Be(I)||ye(I))return M=M.get(N)||null,q(k,M,I,oe,null);if(typeof I.then=="function")return P(M,k,N,Ao(I),oe);if(I.$$typeof===j)return P(M,k,N,So(k,I),oe);Oo(k,I)}return null}function ee(M,k,N,I){for(var oe=null,Se=null,re=k,de=k=0,be=null;re!==null&&de<N.length;de++){re.index>de?(be=re,re=null):be=re.sibling;var Ee=z(M,re,N[de],I);if(Ee===null){re===null&&(re=be);break}t&&re&&Ee.alternate===null&&r(M,re),k=d(Ee,k,de),Se===null?oe=Ee:Se.sibling=Ee,Se=Ee,re=be}if(de===N.length)return a(M,re),_e&&kn(M,de),oe;if(re===null){for(;de<N.length;de++)re=G(M,N[de],I),re!==null&&(k=d(re,k,de),Se===null?oe=re:Se.sibling=re,Se=re);return _e&&kn(M,de),oe}for(re=o(re);de<N.length;de++)be=P(re,M,de,N[de],I),be!==null&&(t&&be.alternate!==null&&re.delete(be.key===null?de:be.key),k=d(be,k,de),Se===null?oe=be:Se.sibling=be,Se=be);return t&&re.forEach(function(Er){return r(M,Er)}),_e&&kn(M,de),oe}function ue(M,k,N,I){if(N==null)throw Error(i(151));for(var oe=null,Se=null,re=k,de=k=0,be=null,Ee=N.next();re!==null&&!Ee.done;de++,Ee=N.next()){re.index>de?(be=re,re=null):be=re.sibling;var Er=z(M,re,Ee.value,I);if(Er===null){re===null&&(re=be);break}t&&re&&Er.alternate===null&&r(M,re),k=d(Er,k,de),Se===null?oe=Er:Se.sibling=Er,Se=Er,re=be}if(Ee.done)return a(M,re),_e&&kn(M,de),oe;if(re===null){for(;!Ee.done;de++,Ee=N.next())Ee=G(M,Ee.value,I),Ee!==null&&(k=d(Ee,k,de),Se===null?oe=Ee:Se.sibling=Ee,Se=Ee);return _e&&kn(M,de),oe}for(re=o(re);!Ee.done;de++,Ee=N.next())Ee=P(re,M,de,Ee.value,I),Ee!==null&&(t&&Ee.alternate!==null&&re.delete(Ee.key===null?de:Ee.key),k=d(Ee,k,de),Se===null?oe=Ee:Se.sibling=Ee,Se=Ee);return t&&re.forEach(function(Aw){return r(M,Aw)}),_e&&kn(M,de),oe}function Ue(M,k,N,I){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 _:e:{for(var oe=N.key;k!==null;){if(k.key===oe){if(oe=N.type,oe===O){if(k.tag===7){a(M,k.sibling),I=h(k,N.props.children),I.return=M,M=I;break e}}else if(k.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===K&&Qr(oe)===k.type){a(M,k.sibling),I=h(k,N.props),Ka(I,N),I.return=M,M=I;break e}a(M,k);break}else r(M,k);k=k.sibling}N.type===O?(I=Gr(N.props.children,M.mode,I,N.key),I.return=M,M=I):(I=bo(N.type,N.key,N.props,null,M.mode,I),Ka(I,N),I.return=M,M=I)}return v(M);case S:e:{for(oe=N.key;k!==null;){if(k.key===oe)if(k.tag===4&&k.stateNode.containerInfo===N.containerInfo&&k.stateNode.implementation===N.implementation){a(M,k.sibling),I=h(k,N.children||[]),I.return=M,M=I;break e}else{a(M,k);break}else r(M,k);k=k.sibling}I=qu(N,M.mode,I),I.return=M,M=I}return v(M);case K:return N=Qr(N),Ue(M,k,N,I)}if(Be(N))return ee(M,k,N,I);
vendor: 5,182 bytes, line 9
9if(ye(N)){if(oe=ye(N),typeof oe!="function")throw Error(i(150));return N=oe.call(N),ue(M,k,N,I)}if(typeof N.then=="function")return Ue(M,k,Ao(N),I);if(N.$$typeof===j)return Ue(M,k,So(M,N),I);Oo(M,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,k!==null&&k.tag===6?(a(M,k.sibling),I=h(k,N),I.return=M,M=I):(a(M,k),I=Hu(N,M.mode,I),I.return=M,M=I),v(M)):a(M,k)}return function(M,k,N,I){try{Va=0;var oe=Ue(M,k,N,I);return Bs=null,oe}catch(re){if(re===Ps||re===To)throw re;var Se=zt(29,re,null,M.mode);return Se.lanes=I,Se.return=M,Se}}}var Xr=Yd(!0),Fd=Yd(!1),ir=!1;function Wu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ec(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function or(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function lr(t,r,a){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var h=o.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=vo(t),jd(t,null,a),r}return yo(t,o,r,a),vo(t)}function Ya(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var o=r.lanes;o&=t.pendingLanes,a|=o,r.lanes=a,Bf(t,a)}}function tc(t,r){var a=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var h=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?h=d=v:d=d.next=v,a=a.next}while(a!==null);d===null?h=d=r:d=d.next=r}else h=d=r;a={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var nc=!1;function Fa(){if(nc){var t=zs;if(t!==null)throw t}}function Qa(t,r,a,o){nc=!1;var h=t.updateQueue;ir=!1;var d=h.firstBaseUpdate,v=h.lastBaseUpdate,w=h.shared.pending;if(w!==null){h.shared.pending=null;var C=w,D=C.next;C.next=null,v===null?d=D:v.next=D,v=C;var q=t.alternate;q!==null&&(q=q.updateQueue,w=q.lastBaseUpdate,w!==v&&(w===null?q.firstBaseUpdate=D:w.next=D,q.lastBaseUpdate=C))}if(d!==null){var G=h.baseState;v=0,q=D=C=null,w=d;do{var z=w.lane&-536870913,P=z!==w.lane;if(P?(ve&z)===z:(o&z)===z){z!==0&&z===Ds&&(nc=!0),q!==null&&(q=q.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ee=t,ue=w;z=r;var Ue=a;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){G=ee.call(Ue,G,z);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ue.payload,z=typeof ee=="function"?ee.call(Ue,G,z):ee,z==null)break e;G=m({},G,z);break e;case 2:ir=!0}}z=w.callback,z!==null&&(t.flags|=64,P&&(t.flags|=8192),P=h.callbacks,P===null?h.callbacks=[z]:P.push(z))}else P={lane:z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},q===null?(D=q=P,C=G):q=q.next=P,v|=z;if(w=w.next,w===null){if(w=h.shared.pending,w===null)break;P=w,w=P.next,P.next=null,h.lastBaseUpdate=P,h.shared.pending=null}}while(!0);q===null&&(C=G),h.baseState=C,h.firstBaseUpdate=D,h.lastBaseUpdate=q,d===null&&(h.shared.lanes=0),dr|=v,t.lanes=v,t.memoizedState=G}}function Qd(t,r){if(typeof t!="function")throw Error(i(191,t));t.call(r)}function Jd(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Qd(a[t],r)}var Hs=x(null),Co=x(0);function Xd(t,r){t=Hn,X(Co,t),X(Hs,r),Hn=t|r.baseLanes}function rc(){X(Co,Hn),X(Hs,Hs.current)}function sc(){Hn=Co.current,$(Hs),$(Co)}var Pt=x(null),Xt=null;function ur(t){var r=t.alternate;X(Qe,Qe.current&1),X(Pt,t),Xt===null&&(r===null||Hs.current!==null||r.memoizedState!==null)&&(Xt=t)}function ac(t){X(Qe,Qe.current),X(Pt,t),Xt===null&&(Xt=t)}function Zd(t){t.tag===22?(X(Qe,Qe.current),X(Pt,t),Xt===null&&(Xt=t)):cr()}function cr(){X(Qe,Qe.current),X(Pt,Pt.current)}function Bt(t){$(Pt),Xt===t&&(Xt=null),$(Qe)}var Qe=x(0);function ko(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||hh(a)||fh(a)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Mn=0,fe=null,je=null,Ze=null,xo=!1,qs=!1,Zr=!1,jo=0,Ja=0,Is=null,m_=0;function Ge(){throw Error(i(321))}function ic(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!Dt(t[a],r[a]))return!1;return!0}function oc(t,r,a,o,h,d){return Mn=d,fe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=t===null||t.memoizedState===null?Lp:Sc,Zr=!1,d=a(o,h),Zr=!1,qs&&(d=ep(r,a,o,h)),Wd(t),d}function Wd(t){B.H=Wa;var r=je!==null&&je.next!==null;if(Mn=0,Ze=je=fe=null,xo=!1,Ja=0,Is=null,r)throw Error(i(300));t===null||We||(t=t.dependencies,t!==null&&wo(t)&&(We=!0))}function ep(t,r,a,o){fe=t;var h=0;
vendor: 7,493 bytes, line 9
9do{if(qs&&(Is=null),Ja=0,qs=!1,25<=h)throw Error(i(301));if(h+=1,Ze=je=null,t.updateQueue!=null){var d=t.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}B.H=Dp,d=r(a,o)}while(qs);return d}function y_(){var t=B.H,r=t.useState()[0];return r=typeof r.then=="function"?Xa(r):r,t=t.useState()[0],(je!==null?je.memoizedState:null)!==t&&(fe.flags|=1024),r}function lc(){var t=jo!==0;return jo=0,t}function uc(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function cc(t){if(xo){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}xo=!1}Mn=0,Ze=je=fe=null,qs=!1,Ja=jo=0,Is=null}function wt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?fe.memoizedState=Ze=t:Ze=Ze.next=t,Ze}function Je(){if(je===null){var t=fe.alternate;t=t!==null?t.memoizedState:null}else t=je.next;var r=Ze===null?fe.memoizedState:Ze.next;if(r!==null)Ze=r,je=t;else{if(t===null)throw fe.alternate===null?Error(i(467)):Error(i(310));je=t,t={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Ze===null?fe.memoizedState=Ze=t:Ze=Ze.next=t}return Ze}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xa(t){var r=Ja;return Ja+=1,Is===null&&(Is=[]),t=Gd(Is,t,r),r=fe,(Ze===null?r.memoizedState:Ze.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Lp:Sc),t}function Uo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xa(t);if(t.$$typeof===j)return dt(t)}throw Error(i(438,String(t)))}function hc(t){var r=null,a=fe.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var o=fe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=Mo(),fe.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),o=0;o<t;o++)a[o]=ae;return r.index++,a}function Un(t,r){return typeof r=="function"?r(t):r}function No(t){var r=Je();return fc(r,je,t)}function fc(t,r,a){var o=t.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var h=t.baseQueue,d=o.pending;if(d!==null){if(h!==null){var v=h.next;h.next=d.next,d.next=v}r.baseQueue=h=d,o.pending=null}if(d=t.baseState,h===null)t.memoizedState=d;else{r=h.next;var w=v=null,C=null,D=r,q=!1;do{var G=D.lane&-536870913;if(G!==D.lane?(ve&G)===G:(Mn&G)===G){var z=D.revertLane;if(z===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),G===Ds&&(q=!0);else if((Mn&z)===z){D=D.next,z===Ds&&(q=!0);continue}else G={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(w=C=G,v=d):C=C.next=G,fe.lanes|=z,dr|=z;G=D.action,Zr&&a(d,G),d=D.hasEagerState?D.eagerState:a(d,G)}else z={lane:G,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(w=C=z,v=d):C=C.next=z,fe.lanes|=G,dr|=G;D=D.next}while(D!==null&&D!==r);if(C===null?v=d:C.next=w,!Dt(d,t.memoizedState)&&(We=!0,q&&(a=zs,a!==null)))throw a;t.memoizedState=d,t.baseState=v,t.baseQueue=C,o.lastRenderedState=d}return h===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function dc(t){var r=Je(),a=r.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=t;var o=a.dispatch,h=a.pending,d=r.memoizedState;if(h!==null){a.pending=null;var v=h=h.next;do d=t(d,v.action),v=v.next;while(v!==h);Dt(d,r.memoizedState)||(We=!0),r.memoizedState=d,r.baseQueue===null&&(r.baseState=d),a.lastRenderedState=d}return[d,o]}function tp(t,r,a){var o=fe,h=Je(),d=_e;if(d){if(a===void 0)throw Error(i(407));a=a()}else a=r();var v=!Dt((je||h).memoizedState,a);if(v&&(h.memoizedState=a,We=!0),h=h.queue,mc(sp.bind(null,o,h,t),[t]),h.getSnapshot!==r||v||Ze!==null&&Ze.memoizedState.tag&1){if(o.flags|=2048,$s(9,{destroy:void 0},rp.bind(null,o,h,a,r),null),Le===null)throw Error(i(349));d||(Mn&127)!==0||np(o,r,a)}return a}function np(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=fe.updateQueue,r===null?(r=Mo(),fe.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function rp(t,r,a,o){r.value=a,r.getSnapshot=o,ap(r)&&ip(t)}function sp(t,r,a){return a(function(){ap(r)&&ip(t)})}function ap(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!Dt(t,a)}catch{return!0}}function ip(t){var r=$r(t,2);r!==null&&kt(r,t,2)}function pc(t){var r=wt();if(typeof t=="function"){var a=t;if(t=a(),Zr){Wn(!0);try{a()}finally{Wn(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:t},r}function op(t,r,a,o){return t.baseState=a,fc(t,je,typeof o=="function"?o:Un)}function v_(t,r,a,o,h){if(zo(t))throw Error(i(485));if(t=r.action,t!==null){var d={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};B.T!==null?a(!0):d.isTransition=!1,o(d),a=r.pending,a===null?(d.next=r.pending=d,lp(r,d)):(d.next=a.next,r.pending=a.next=d)}}function lp(t,r){var a=r.action,o=r.payload,h=t.state;if(r.isTransition){var d=B.T,v={};B.T=v;try{var w=a(h,o),C=B.S;C!==null&&C(v,w),up(t,r,w)}catch(D){gc(t,r,D)}finally{d!==null&&v.types!==null&&(d.types=v.types),B.T=d}}else try{d=a(h,o),up(t,r,d)}catch(D){gc(t,r,D)}}function up(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){cp(t,r,o)},function(o){return gc(t,r,o)}):cp(t,r,a)}function cp(t,r,a){r.status="fulfilled",r.value=a,hp(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,lp(t,a)))}function gc(t,r,a){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=a,hp(r),r=r.next;while(r!==o)}t.action=null}function hp(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function fp(t,r){return r}function dp(t,r){if(_e){var a=Le.formState;if(a!==null){e:{var o=fe;if(_e){if(He){t:{for(var h=He,d=Jt;h.nodeType!==8;){if(!d){h=null;break t}if(h=Zt(h.nextSibling),h===null){h=null;break t}}d=h.data,h=d==="F!"||d==="F"?h:null}if(h){He=Zt(h.nextSibling),o=h.data==="F!";break e}}sr(o)}o=!1}o&&(r=a[0])}}return a=wt(),a.memoizedState=a.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fp,lastRenderedState:r},a.queue=o,a=Mp.bind(null,fe,o),o.dispatch=a,o=pc(!1),d=wc.bind(null,fe,!1,o.queue),o=wt(),h={state:r,dispatch:null,action:t,pending:null},o.queue=h,a=v_.bind(null,fe,h,d,a),h.dispatch=a,o.memoizedState=t,[r,a,!1]}function pp(t){var r=Je();return gp(r,je,t)}function gp(t,r,a){if(r=fc(t,r,fp)[0],t=No(Un)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Xa(r)}catch(v){throw v===Ps?To:v}else o=r;r=Je();var h=r.queue,d=h.dispatch;return a!==r.memoizedState&&(fe.flags|=2048,$s(9,{destroy:void 0},b_.bind(null,h,a),null)),[o,d,t]}function b_(t,r){t.action=r}function mp(t){var r=Je(),a=je;if(a!==null)return gp(r,a,t);Je(),r=r.memoizedState,a=Je();var o=a.queue.dispatch;return a.memoizedState=t,[r,o,!1]}function $s(t,r,a,o){return t={tag:t,create:a,deps:o,inst:r,next:null},r=fe.updateQueue,r===null&&(r=Mo(),fe.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(o=a.next,a.next=t,t.next=o,r.lastEffect=t),t}function yp(){return Je().memoizedState}function Lo(t,r,a,o){var h=wt();fe.flags|=t,h.memoizedState=$s(1|r,{destroy:void 0}
vendor: 5,168 bytes, line 9
9,a,o===void 0?null:o)}function Do(t,r,a,o){var h=Je();o=o===void 0?null:o;var d=h.memoizedState.inst;je!==null&&o!==null&&ic(o,je.memoizedState.deps)?h.memoizedState=$s(r,d,a,o):(fe.flags|=t,h.memoizedState=$s(1|r,d,a,o))}function vp(t,r){Lo(8390656,8,t,r)}function mc(t,r){Do(2048,8,t,r)}function __(t){fe.flags|=4;var r=fe.updateQueue;if(r===null)r=Mo(),fe.updateQueue=r,r.events=[t];else{var a=r.events;a===null?r.events=[t]:a.push(t)}}function bp(t){var r=Je().memoizedState;return __({ref:r,nextImpl:t}),function(){if((Ae&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function _p(t,r){return Do(4,2,t,r)}function wp(t,r){return Do(4,4,t,r)}function Sp(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Ep(t,r,a){a=a!=null?a.concat([t]):null,Do(4,4,Sp.bind(null,r,t),a)}function yc(){}function Tp(t,r){var a=Je();r=r===void 0?null:r;var o=a.memoizedState;return r!==null&&ic(r,o[1])?o[0]:(a.memoizedState=[t,r],t)}function Rp(t,r){var a=Je();r=r===void 0?null:r;var o=a.memoizedState;if(r!==null&&ic(r,o[1]))return o[0];if(o=t(),Zr){Wn(!0);try{t()}finally{Wn(!1)}}return a.memoizedState=[o,r],o}function vc(t,r,a){return a===void 0||(Mn&1073741824)!==0&&(ve&261930)===0?t.memoizedState=r:(t.memoizedState=a,t=Ag(),fe.lanes|=t,dr|=t,a)}function Ap(t,r,a,o){return Dt(a,r)?a:Hs.current!==null?(t=vc(t,a,o),Dt(t,r)||(We=!0),t):(Mn&42)===0||(Mn&1073741824)!==0&&(ve&261930)===0?(We=!0,t.memoizedState=a):(t=Ag(),fe.lanes|=t,dr|=t,r)}function Op(t,r,a,o,h){var d=Q.p;Q.p=d!==0&&8>d?d:8;var v=B.T,w={};B.T=w,wc(t,!1,r,a);try{var C=h(),D=B.S;if(D!==null&&D(w,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var q=g_(C,o);Za(t,r,q,It(t))}else Za(t,r,o,It(t))}catch(G){Za(t,r,{then:function(){},status:"rejected",reason:G},It())}finally{Q.p=d,v!==null&&w.types!==null&&(v.types=w.types),B.T=v}}function w_(){}function bc(t,r,a,o){if(t.tag!==5)throw Error(i(476));var h=Cp(t).queue;Op(t,h,r,le,a===null?w_:function(){return kp(t),a(o)})}function Cp(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:le},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function kp(t){var r=Cp(t);r.next===null&&(r=t.alternate.memoizedState),Za(t,r.next.queue,{},It())}function _c(){return dt(gi)}function xp(){return Je().memoizedState}function jp(){return Je().memoizedState}function S_(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=It();t=or(a);var o=lr(r,t,a);o!==null&&(kt(o,r,a),Ya(o,r,a)),r={cache:Qu()},t.payload=r;return}r=r.return}}function E_(t,r,a){var o=It();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zo(t)?Up(r,a):(a=Pu(t,r,a,o),a!==null&&(kt(a,t,o),Np(a,r,o)))}function Mp(t,r,a){var o=It();Za(t,r,a,o)}function Za(t,r,a,o){var h={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zo(t))Up(r,h);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=r.lastRenderedReducer,d!==null))try{var v=r.lastRenderedState,w=d(v,a);if(h.hasEagerState=!0,h.eagerState=w,Dt(w,v))return yo(t,r,h,0),Le===null&&mo(),!1}catch{}if(a=Pu(t,r,h,o),a!==null)return kt(a,t,o),Np(a,r,o),!0}return!1}function wc(t,r,a,o){if(o={lane:2,revertLane:Wc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},zo(t)){if(r)throw Error(i(479))}else r=Pu(t,a,o,2),r!==null&&kt(r,t,2)}function zo(t){var r=t.alternate;return t===fe||r!==null&&r===fe}function Up(t,r){qs=xo=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function Np(t,r,a){if((a&4194048)!==0){var o=r.lanes;o&=t.pendingLanes,a|=o,r.lanes=a,Bf(t,a)}}var Wa={readContext:dt,use:Uo,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};Wa.useEffectEvent=Ge;var Lp={readContext:dt,use:Uo,useCallback:function(t,r){return wt().memoizedState=[t,r===void 0?null:r],t},useContext:dt,useEffect:vp,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,Lo(4194308,4,Sp.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Lo(4194308,4,t,r)},useInsertionEffect:function(t,r){Lo(4,2,t,r)},useMemo:function(t,r){var a=wt();r=r===void 0?null:r;var o=t();if(Zr){Wn(!0);try{t()}finally{Wn(!1)}}return a.memoizedState=[o,r],o},useReducer:function(t,r,a){var o=wt();if(a!==void 0){var h=a(r);if(Zr){Wn(!0);try{a(r)}finally{Wn(!1)}}}else h=r;return o.memoizedState=o.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},o.queue=t,t=t.dispatch=E_.bind(null,fe,t),[o.memoizedState,t]}
vendor: 4,769 bytes, line 9
9,useRef:function(t){var r=wt();return t={current:t},r.memoizedState=t},useState:function(t){t=pc(t);var r=t.queue,a=Mp.bind(null,fe,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:yc,useDeferredValue:function(t,r){var a=wt();return vc(a,t,r)},useTransition:function(){var t=pc(!1);return t=Op.bind(null,fe,t.queue,!0,!1),wt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var o=fe,h=wt();if(_e){if(a===void 0)throw Error(i(407));a=a()}else{if(a=r(),Le===null)throw Error(i(349));(ve&127)!==0||np(o,r,a)}h.memoizedState=a;var d={value:a,getSnapshot:r};return h.queue=d,vp(sp.bind(null,o,d,t),[t]),o.flags|=2048,$s(9,{destroy:void 0},rp.bind(null,o,d,a,r),null),a},useId:function(){var t=wt(),r=Le.identifierPrefix;if(_e){var a=pn,o=dn;a=(o&~(1<<32-Lt(o)-1)).toString(32)+a,r="_"+r+"R_"+a,a=jo++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=m_++,r="_"+r+"r_"+a.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:_c,useFormState:dp,useActionState:dp,useOptimistic:function(t){var r=wt();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=wc.bind(null,fe,!0,a),a.dispatch=r,[t,r]},useMemoCache:hc,useCacheRefresh:function(){return wt().memoizedState=S_.bind(null,fe)},useEffectEvent:function(t){var r=wt(),a={impl:t};return r.memoizedState=a,function(){if((Ae&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Sc={readContext:dt,use:Uo,useCallback:Tp,useContext:dt,useEffect:mc,useImperativeHandle:Ep,useInsertionEffect:_p,useLayoutEffect:wp,useMemo:Rp,useReducer:No,useRef:yp,useState:function(){return No(Un)},useDebugValue:yc,useDeferredValue:function(t,r){var a=Je();return Ap(a,je.memoizedState,t,r)},useTransition:function(){var t=No(Un)[0],r=Je().memoizedState;return[typeof t=="boolean"?t:Xa(t),r]},useSyncExternalStore:tp,useId:xp,useHostTransitionStatus:_c,useFormState:pp,useActionState:pp,useOptimistic:function(t,r){var a=Je();return op(a,je,t,r)},useMemoCache:hc,useCacheRefresh:jp};Sc.useEffectEvent=bp;var Dp={readContext:dt,use:Uo,useCallback:Tp,useContext:dt,useEffect:mc,useImperativeHandle:Ep,useInsertionEffect:_p,useLayoutEffect:wp,useMemo:Rp,useReducer:dc,useRef:yp,useState:function(){return dc(Un)},useDebugValue:yc,useDeferredValue:function(t,r){var a=Je();return je===null?vc(a,t,r):Ap(a,je.memoizedState,t,r)},useTransition:function(){var t=dc(Un)[0],r=Je().memoizedState;return[typeof t=="boolean"?t:Xa(t),r]},useSyncExternalStore:tp,useId:xp,useHostTransitionStatus:_c,useFormState:mp,useActionState:mp,useOptimistic:function(t,r){var a=Je();return je!==null?op(a,je,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:hc,useCacheRefresh:jp};Dp.useEffectEvent=bp;function Ec(t,r,a,o){r=t.memoizedState,a=a(o,r),a=a==null?r:m({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Tc={enqueueSetState:function(t,r,a){t=t._reactInternals;var o=It(),h=or(o);h.payload=r,a!=null&&(h.callback=a),r=lr(t,h,o),r!==null&&(kt(r,t,o),Ya(r,t,o))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var o=It(),h=or(o);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=lr(t,h,o),r!==null&&(kt(r,t,o),Ya(r,t,o))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=It(),o=or(a);o.tag=2,r!=null&&(o.callback=r),r=lr(t,o,a),r!==null&&(kt(r,t,a),Ya(r,t,a))}};function zp(t,r,a,o,h,d,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,d,v):r.prototype&&r.prototype.isPureReactComponent?!Ba(a,o)||!Ba(h,d):!0}function Pp(t,r,a,o){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,o),r.state!==t&&Tc.enqueueReplaceState(r,r.state,null)}function Wr(t,r){var a=r;if("ref"in r){a={};for(var o in r)o!=="ref"&&(a[o]=r[o])}if(t=t.defaultProps){a===r&&(a=m({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}function Bp(t){go(t)}function Hp(t){console.error(t)}function qp(t){go(t)}function Po(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function Ip(t,r,a){try{var o=t.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Rc(t,r,a){return a=or(a),a.tag=3,a.payload={element:null},a.callback=function(){Po(t,r)},a}function $p(t){return t=or(t),t.tag=3,t}function Gp(t,r,a,o){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var d=o.value;t.payload=function(){return h(d)},t.callback=function(){Ip(r,a,o)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){Ip(r,a,o),typeof h!="function"&&(pr===null?pr=ne
vendor: 9,877 bytes, line 9
9w Set([this]):pr.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function T_(t,r,a,o,h){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=a.alternate,r!==null&&Ls(r,a,h,!0),a=Pt.current,a!==null){switch(a.tag){case 31:case 13:return Xt===null?Jo():a.alternate===null&&Ve===0&&(Ve=3),a.flags&=-257,a.flags|=65536,a.lanes=h,o===Ro?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([o]):r.add(o),Jc(t,o,h)),!1;case 22:return a.flags|=65536,o===Ro?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([o]):a.add(o)),Jc(t,o,h)),!1}throw Error(i(435,a.tag))}return Jc(t,o,h),Jo(),!1}if(_e)return r=Pt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==Gu&&(t=Error(i(422),{cause:o}),Ia(Yt(t,a)))):(o!==Gu&&(r=Error(i(423),{cause:o}),Ia(Yt(r,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,o=Yt(o,a),h=Rc(t.stateNode,o,h),tc(t,h),Ve!==4&&(Ve=2)),!1;var d=Error(i(520),{cause:o});if(d=Yt(d,a),oi===null?oi=[d]:oi.push(d),Ve!==4&&(Ve=2),r===null)return!0;o=Yt(o,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=Rc(a.stateNode,o,t),tc(a,t),!1;case 1:if(r=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(pr===null||!pr.has(d))))return a.flags|=65536,h&=-h,a.lanes|=h,h=$p(h),Gp(h,t,a,o),tc(a,h),!1}a=a.return}while(a!==null);return!1}var Ac=Error(i(461)),We=!1;function pt(t,r,a,o){r.child=t===null?Fd(r,null,a,o):Xr(r,t.child,a,o)}function Vp(t,r,a,o,h){a=a.render;var d=r.ref;if("ref"in o){var v={};for(var w in o)w!=="ref"&&(v[w]=o[w])}else v=o;return Yr(r),o=oc(t,r,a,v,d,h),w=lc(),t!==null&&!We?(uc(t,r,h),Nn(t,r,h)):(_e&&w&&Iu(r),r.flags|=1,pt(t,r,o,h),r.child)}function Kp(t,r,a,o,h){if(t===null){var d=a.type;return typeof d=="function"&&!Bu(d)&&d.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=d,Yp(t,r,d,o,h)):(t=bo(a.type,null,o,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(d=t.child,!Nc(t,h)){var v=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ba,a(v,o)&&t.ref===r.ref)return Nn(t,r,h)}return r.flags|=1,t=Cn(d,o),t.ref=r.ref,t.return=r,r.child=t}function Yp(t,r,a,o,h){if(t!==null){var d=t.memoizedProps;if(Ba(d,o)&&t.ref===r.ref)if(We=!1,r.pendingProps=o=d,Nc(t,h))(t.flags&131072)!==0&&(We=!0);else return r.lanes=t.lanes,Nn(t,r,h)}return Oc(t,r,a,o,h)}function Fp(t,r,a,o){var h=o.children,d=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,t!==null){for(o=r.child=t.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~d}else o=0,r.child=null;return Qp(t,r,d,a,o)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Eo(r,d!==null?d.cachePool:null),d!==null?Xd(r,d):rc(),Zd(r);else return o=r.lanes=536870912,Qp(t,r,d!==null?d.baseLanes|a:a,a,o)}else d!==null?(Eo(r,d.cachePool),Xd(r,d),cr(),r.memoizedState=null):(t!==null&&Eo(r,null),rc(),cr());return pt(t,r,h,a),r.child}function ei(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Qp(t,r,a,o,h){var d=Xu();return d=d===null?null:{parent:Xe._currentValue,pool:d},r.memoizedState={baseLanes:a,cachePool:d},t!==null&&Eo(r,null),rc(),Zd(r),t!==null&&Ls(t,r,o,!0),r.childLanes=h,null}function Bo(t,r){return r=qo({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function Jp(t,r,a){return Xr(r,t.child,null,a),t=Bo(r,r.pendingProps),t.flags|=2,Bt(r),r.memoizedState=null,t}function R_(t,r,a){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(_e){if(o.mode==="hidden")return t=Bo(r,o),r.lanes=536870912,ei(null,t);if(ac(r),(t=He)?(t=lm(t,Jt),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:nr!==null?{id:dn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},a=Ud(t),a.return=r,r.child=a,ft=r,He=null)):t=null,t===null)throw sr(r);return r.lanes=536870912,null}return Bo(r,o)}var d=t.memoizedState;if(d!==null){var v=d.dehydrated;if(ac(r),h)if(r.flags&256)r.flags&=-257,r=Jp(t,r,a);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(i(558));else if(We||Ls(t,r,a,!1),h=(a&t.childLanes)!==0,We||h){if(o=Le,o!==null&&(v=Hf(o,a),v!==0&&v!==d.retryLane))throw d.retryLane=v,$r(t,v),kt(o,t,v),Ac;Jo(),r=Jp(t,r,a)}else t=d.treeContext,He=Zt(v.nextSibling),ft=r,_e=!0,rr=null,Jt=!1,t!==null&&Dd(r,t),r=Bo(r,o),r.flags|=4096;return r}return t=Cn(t.child,{mode:o.mode,children:o.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Ho(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Oc(t,r,a,o,h){return Yr(r),a=oc(t,r,a,o,void 0,h),o=lc(),t!==null&&!We?(uc(t,r,h),Nn(t,r,h)):(_e&&o&&Iu(r),r.flags|=1,pt(t,r,a,h),r.child)}function Xp(t,r,a,o,h,d){return Yr(r),r.updateQueue=null,a=ep(r,o,a,h),Wd(t),o=lc(),t!==null&&!We?(uc(t,r,d),Nn(t,r,d)):(_e&&o&&Iu(r),r.flags|=1,pt(t,r,a,d),r.child)}function Zp(t,r,a,o,h){if(Yr(r),r.stateNode===null){var d=js,v=a.contextType;typeof v=="object"&&v!==null&&(d=dt(v)),d=new a(o,d),r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Tc,r.stateNode=d,d._reactInternals=r,d=r.stateNode,d.props=o,d.state=r.memoizedState,d.refs={},Wu(r),v=a.contextType,d.context=typeof v=="object"&&v!==null?dt(v):js,d.state=r.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Ec(r,a,v,o),d.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Tc.enqueueReplaceState(d,d.state,null),Qa(r,o,d,h),Fa(),d.state=r.memoizedState),typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(t===null){d=r.stateNode;var w=r.memoizedProps,C=Wr(a,w);d.props=C;var D=d.context,q=a.contextType;v=js,typeof q=="object"&&q!==null&&(v=dt(q));var G=a.getDerivedStateFromProps;q=typeof G=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=r.pendingProps!==w,q||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||D!==v)&&Pp(r,d,o,v),ir=!1;var z=r.memoizedState;d.state=z,Qa(r,o,d,h),Fa(),D=r.memoizedState,w||z!==D||ir?(typeof G=="function"&&(Ec(r,a,G,o),D=r.memoizedState),(C=ir||zp(r,a,C,o,z,D,v))?(q||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"&&(r.flags|=4194308)):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=D),d.props=o,d.state=D,d.context=v,o=C):(typeof d.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{d=r.stateNode,ec(t,r),v=r.memoizedProps,q=Wr(a,v),d.props=q,G=r.pendingProps,z=d.context,D=a.contextType,C=js,typeof D=="object"&&D!==null&&(C=dt(D)),w=a.getDerivedStateFromProps,(D=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==G||z!==C)&&Pp(r,d,o,C),ir=!1,z=r.memoizedState,d.state=z,Qa(r,o,d,h),Fa();var P=r.memoizedState;v!==G||z!==P||ir||t!==null&&t.dependencies!==null&&wo(t.dependencies)?(typeof w=="function"&&(Ec(r,a,w,o),P=r.memoizedState),(q=ir||zp(r,a,q,o,z,P,C)||t!==null&&t.dependencies!==null&&wo(t.dependencies))?(D||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,P,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,P,C)),typeof d.componentDidUpdate=="function"&&(r.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=P),d.props=o,d.state=P,d.context=C,o=q):(typeof d.componentDidUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(r.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&z===t.memoizedState||(r.flags|=1024),o=!1)}return d=o,Ho(t,r),o=(r.flags&128)!==0,d||o?(d=r.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:d.render(),r.flags|=1,t!==null&&o?(r.child=Xr(r,t.child,null,h),r.child=Xr(r,null,a,h)):pt(t,r,a,h),r.memoizedState=d.state,t=r.child):t=Nn(t,r,h),t}function Wp(t,r,a,o){return Vr(),r.flags|=256,pt(t,r,a,o),r.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(t){return{baseLanes:t,cachePool:Id()}}function xc(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=qt),t}function eg(t,r,a){var o=r.pendingProps,h=!1,d=(r.flags&128)!==0,v;if((v=d)||(v=t!==null&&t.memoizedState===null?!1:(Qe.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,t===null){if(_e){if(h?ur(r):cr(),(t=He)?(t=lm(t,Jt),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:nr!==null?{id:dn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null}
vendor: 6,326 bytes, line 9
9,a=Ud(t),a.return=r,r.child=a,ft=r,He=null)):t=null,t===null)throw sr(r);return fh(t)?r.lanes=32:r.lanes=536870912,null}var w=o.children;return o=o.fallback,h?(cr(),h=r.mode,w=qo({mode:"hidden",children:w},h),o=Gr(o,h,a,null),w.return=r,o.return=r,w.sibling=o,r.child=w,o=r.child,o.memoizedState=kc(a),o.childLanes=xc(t,v,a),r.memoizedState=Cc,ei(null,o)):(ur(r),jc(r,w))}var C=t.memoizedState;if(C!==null&&(w=C.dehydrated,w!==null)){if(d)r.flags&256?(ur(r),r.flags&=-257,r=Mc(t,r,a)):r.memoizedState!==null?(cr(),r.child=t.child,r.flags|=128,r=null):(cr(),w=o.fallback,h=r.mode,o=qo({mode:"visible",children:o.children},h),w=Gr(w,h,a,null),w.flags|=2,o.return=r,w.return=r,o.sibling=w,r.child=o,Xr(r,t.child,null,a),o=r.child,o.memoizedState=kc(a),o.childLanes=xc(t,v,a),r.memoizedState=Cc,r=ei(null,o));else if(ur(r),fh(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var D=v.dgst;v=D,o=Error(i(419)),o.stack="",o.digest=v,Ia({value:o,source:null,stack:null}),r=Mc(t,r,a)}else if(We||Ls(t,r,a,!1),v=(a&t.childLanes)!==0,We||v){if(v=Le,v!==null&&(o=Hf(v,a),o!==0&&o!==C.retryLane))throw C.retryLane=o,$r(t,o),kt(v,t,o),Ac;hh(w)||Jo(),r=Mc(t,r,a)}else hh(w)?(r.flags|=192,r.child=t.child,r=null):(t=C.treeContext,He=Zt(w.nextSibling),ft=r,_e=!0,rr=null,Jt=!1,t!==null&&Dd(r,t),r=jc(r,o.children),r.flags|=4096);return r}return h?(cr(),w=o.fallback,h=r.mode,C=t.child,D=C.sibling,o=Cn(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,D!==null?w=Cn(D,w):(w=Gr(w,h,a,null),w.flags|=2),w.return=r,o.return=r,o.sibling=w,r.child=o,ei(null,o),o=r.child,w=t.child.memoizedState,w===null?w=kc(a):(h=w.cachePool,h!==null?(C=Xe._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=Id(),w={baseLanes:w.baseLanes|a,cachePool:h}),o.memoizedState=w,o.childLanes=xc(t,v,a),r.memoizedState=Cc,ei(t.child,o)):(ur(r),a=t.child,t=a.sibling,a=Cn(a,{mode:"visible",children:o.children}),a.return=r,a.sibling=null,t!==null&&(v=r.deletions,v===null?(r.deletions=[t],r.flags|=16):v.push(t)),r.child=a,r.memoizedState=null,a)}function jc(t,r){return r=qo({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function qo(t,r){return t=zt(22,t,null,r),t.lanes=0,t}function Mc(t,r,a){return Xr(r,t.child,null,a),t=jc(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function tg(t,r,a){t.lanes|=r;var o=t.alternate;o!==null&&(o.lanes|=r),Yu(t.return,r,a)}function Uc(t,r,a,o,h,d){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:h,treeForkCount:d}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=a,v.tailMode=h,v.treeForkCount=d)}function ng(t,r,a){var o=r.pendingProps,h=o.revealOrder,d=o.tail;o=o.children;var v=Qe.current,w=(v&2)!==0;if(w?(v=v&1|2,r.flags|=128):v&=1,X(Qe,v),pt(t,r,o,a),o=_e?qa:0,!w&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&tg(t,a,r);else if(t.tag===19)tg(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(a=r.child,h=null;a!==null;)t=a.alternate,t!==null&&ko(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),Uc(r,!1,h,a,d,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&ko(t)===null){r.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}Uc(r,!0,a,null,d,o);break;case"together":Uc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Nn(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),dr|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(Ls(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(i(153));if(r.child!==null){for(t=r.child,a=Cn(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Cn(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function Nc(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&wo(t)))}function A_(t,r,a){switch(r.tag){case 3:Fe(r,r.stateNode.containerInfo),ar(r,Xe,t.memoizedState.cache),Vr();break;case 27:case 5:Sn(r);break;case 4:Fe(r,r.stateNode.containerInfo);break;case 10:ar(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,ac(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(ur(r),r.flags|=128,null):(a&r.child.childLanes)!==0?eg(t,r,a):(ur(r),t=Nn(t,r,a),t!==null?t.sibling:null);ur(r);break;case 19:var h=(t.flags&128)!==0;if(o=(a&r.childLanes)!==0,o||(Ls(t,r,a,!1),o=(a&r.childLanes)!==0),h){if(o)return ng(t,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),X(Qe,Qe.current),o)break;return null;case 22:return r.lanes=0,Fp(t,r,a,r.pendingProps);case 24:ar(r,Xe,t.memoizedState.cache)}return Nn(t,r,a)}function rg(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)We=!0;else{if(!Nc(t,a)&&(r.flags&128)===0)return We=!1,A_(t,r,a);We=(t.flags&131072)!==0}else We=!1,_e&&(r.flags&1048576)!==0&&Ld(r,qa,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(t=Qr(r.elementType),r.type=t,typeof t=="function")Bu(t)?(o=Wr(t,o),r.tag=1,r=Zp(null,r,t,o,a)):(r.tag=0,r=Oc(null,r,t,o,a));else{if(t!=null){var h=t.$$typeof;if(h===L){r.tag=11,r=Vp(null,r,t,o,a);break e}else if(h===H){r.tag=14,r=Kp(null,r,t,o,a);break e}}throw r=Ye(t)||t,Error(i(306,r,""))}}return r;case 0:return Oc(t,r,r.type,r.pendingProps,a);case 1:return o=r.type,h=Wr(o,r.pendingProps),Zp(t,r,o,h,a);case 3:e:{if(Fe(r,r.stateNode.containerInfo),t===null)throw Error(i(387));o=r.pendingProps;var d=r.memoizedState;h=d.element,ec(t,r),Qa(r,o,null,a);var v=r.memoizedState;if(o=v.cache,ar(r,Xe,o),o!==d.cache&&Fu(r,[Xe],a,!0),Fa(),o=v.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=d,r.memoizedState=d,r.flags&256){r=Wp(t,r,o,a);break e}else if(o!==h){h=Yt(Error(i(424)),r),Ia(h),r=Wp(t,r,o,a);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,He=Zt(t.firstChild),ft=r,_e=!0,rr=null,Jt=!0,a=Fd(r,null,o,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;
vendor: 5,137 bytes, line 9
9else{if(Vr(),o===h){r=Nn(t,r,a);break e}pt(t,r,o,a)}r=r.child}return r;case 26:return Ho(t,r),t===null?(a=pm(r.type,null,r.pendingProps,null))?r.memoizedState=a:_e||(a=r.type,t=r.pendingProps,o=rl(pe.current).createElement(a),o[ht]=r,o[Et]=t,gt(o,a,t),it(o),r.stateNode=o):r.memoizedState=pm(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Sn(r),t===null&&_e&&(o=r.stateNode=hm(r.type,r.pendingProps,pe.current),ft=r,Jt=!0,h=He,vr(r.type)?(dh=h,He=Zt(o.firstChild)):He=h),pt(t,r,r.pendingProps.children,a),Ho(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&_e&&((h=o=He)&&(o=nw(o,r.type,r.pendingProps,Jt),o!==null?(r.stateNode=o,ft=r,He=Zt(o.firstChild),Jt=!1,h=!0):h=!1),h||sr(r)),Sn(r),h=r.type,d=r.pendingProps,v=t!==null?t.memoizedProps:null,o=d.children,lh(h,d)?o=null:v!==null&&lh(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=oc(t,r,y_,null,null,a),gi._currentValue=h),Ho(t,r),pt(t,r,o,a),r.child;case 6:return t===null&&_e&&((t=a=He)&&(a=rw(a,r.pendingProps,Jt),a!==null?(r.stateNode=a,ft=r,He=null,t=!0):t=!1),t||sr(r)),null;case 13:return eg(t,r,a);case 4:return Fe(r,r.stateNode.containerInfo),o=r.pendingProps,t===null?r.child=Xr(r,null,o,a):pt(t,r,o,a),r.child;case 11:return Vp(t,r,r.type,r.pendingProps,a);case 7:return pt(t,r,r.pendingProps,a),r.child;case 8:return pt(t,r,r.pendingProps.children,a),r.child;case 12:return pt(t,r,r.pendingProps.children,a),r.child;case 10:return o=r.pendingProps,ar(r,r.type,o.value),pt(t,r,o.children,a),r.child;case 9:return h=r.type._context,o=r.pendingProps.children,Yr(r),h=dt(h),o=o(h),r.flags|=1,pt(t,r,o,a),r.child;case 14:return Kp(t,r,r.type,r.pendingProps,a);case 15:return Yp(t,r,r.type,r.pendingProps,a);case 19:return ng(t,r,a);case 31:return R_(t,r,a);case 22:return Fp(t,r,a,r.pendingProps);case 24:return Yr(r),o=dt(Xe),t===null?(h=Xu(),h===null&&(h=Le,d=Qu(),h.pooledCache=d,d.refCount++,d!==null&&(h.pooledCacheLanes|=a),h=d),r.memoizedState={parent:o,cache:h},Wu(r),ar(r,Xe,h)):((t.lanes&a)!==0&&(ec(t,r),Qa(r,null,null,a),Fa()),h=t.memoizedState,d=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),ar(r,Xe,o)):(o=d.cache,ar(r,Xe,o),o!==h.cache&&Fu(r,[Xe],a,!0))),pt(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Ln(t){t.flags|=4}function Lc(t,r,a,o,h){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(xg())t.flags|=8192;else throw Jr=Ro,Zu}else t.flags&=-16777217}function sg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!bm(r))if(xg())t.flags|=8192;else throw Jr=Ro,Zu}function Io(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?zf():536870912,t.lanes|=r,Ys|=r)}function ti(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function qe(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,o=0;if(r)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=o,t.childLanes=a,r}function O_(t,r,a){var o=r.pendingProps;switch($u(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(r),null;case 1:return qe(r),null;case 3:return a=r.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),jn(Xe),Ne(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ns(r)?Ln(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Vu())),qe(r),null;case 26:var h=r.type,d=r.memoizedState;return t===null?(Ln(r),d!==null?(qe(r),sg(r,d)):(qe(r),Lc(r,h,null,o,a))):d?d!==t.memoizedState?(Ln(r),qe(r),sg(r,d)):(qe(r),r.flags&=-16777217):(t=t.memoizedProps,t!==o&&Ln(r),qe(r),Lc(r,h,t,o,a)),null;case 27:if(En(r),a=pe.current,h=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==o&&Ln(r);else{if(!o){if(r.stateNode===null)throw Error(i(166));return qe(r),null}t=W.current,Ns(r)?zd(r):(t=hm(h,o,a),r.stateNode=t,Ln(r))}return qe(r),null;case 5:if(En(r),h=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==o&&Ln(r);else{if(!o){if(r.stateNode===null)throw Error(i(166));return qe(r),null}if(d=W.current,Ns(r))zd(r);else{var v=rl(pe.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;
vendor: 26,156 bytes, line 9
9case"select":d=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?v.createElement(h,{is:o.is}):v.createElement(h)}}d[ht]=r,d[Et]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=d;e:switch(gt(d,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Ln(r)}}return qe(r),Lc(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,a),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==o&&Ln(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(i(166));if(t=pe.current,Ns(r)){if(t=r.stateNode,a=r.memoizedProps,o=null,h=ft,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}t[ht]=r,t=!!(t.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||em(t.nodeValue,a)),t||sr(r,!0)}else t=rl(t).createTextNode(o),t[ht]=r,r.stateNode=t}return qe(r),null;case 31:if(a=r.memoizedState,t===null||t.memoizedState!==null){if(o=Ns(r),a!==null){if(t===null){if(!o)throw Error(i(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[ht]=r}else Vr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),t=!1}else a=Vu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return r.flags&256?(Bt(r),r):(Bt(r),null);if((r.flags&128)!==0)throw Error(i(558))}return qe(r),null;case 13:if(o=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Ns(r),o!==null&&o.dehydrated!==null){if(t===null){if(!h)throw Error(i(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[ht]=r}else Vr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),h=!1}else h=Vu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bt(r),r):(Bt(r),null)}return Bt(r),(r.flags&128)!==0?(r.lanes=a,r):(a=o!==null,t=t!==null&&t.memoizedState!==null,a&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==h&&(o.flags|=2048)),a!==t&&a&&(r.child.flags|=8192),Io(r,r.updateQueue),qe(r),null);case 4:return Ne(),t===null&&rh(r.stateNode.containerInfo),qe(r),null;case 10:return jn(r.type),qe(r),null;case 19:if($(Qe),o=r.memoizedState,o===null)return qe(r),null;if(h=(r.flags&128)!==0,d=o.rendering,d===null)if(h)ti(o,!1);else{if(Ve!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(d=ko(t),d!==null){for(r.flags|=128,ti(o,!1),t=d.updateQueue,r.updateQueue=t,Io(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)Md(a,t),a=a.sibling;return X(Qe,Qe.current&1|2),_e&&kn(r,o.treeForkCount),r.child}t=t.sibling}o.tail!==null&&bt()>Yo&&(r.flags|=128,h=!0,ti(o,!1),r.lanes=4194304)}else{if(!h)if(t=ko(d),t!==null){if(r.flags|=128,h=!0,t=t.updateQueue,r.updateQueue=t,Io(r,t),ti(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!_e)return qe(r),null}else 2*bt()-o.renderingStartTime>Yo&&a!==536870912&&(r.flags|=128,h=!0,ti(o,!1),r.lanes=4194304);o.isBackwards?(d.sibling=r.child,r.child=d):(t=o.last,t!==null?t.sibling=d:r.child=d,o.last=d)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=bt(),t.sibling=null,a=Qe.current,X(Qe,h?a&1|2:a&1),_e&&kn(r,o.treeForkCount),t):(qe(r),null);case 22:case 23:return Bt(r),sc(),o=r.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(a&536870912)!==0&&(r.flags&128)===0&&(qe(r),r.subtreeFlags&6&&(r.flags|=8192)):qe(r),a=r.updateQueue,a!==null&&Io(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048),t!==null&&$(Fr),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),jn(Xe),qe(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function C_(t,r){switch($u(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return jn(Xe),Ne(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return En(r),null;case 31:if(r.memoizedState!==null){if(Bt(r),r.alternate===null)throw Error(i(340));Vr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(Bt(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));Vr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return $(Qe),null;case 4:return Ne(),null;case 10:return jn(r.type),null;case 22:case 23:return Bt(r),sc(),t!==null&&$(Fr),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return jn(Xe),null;case 25:return null;default:return null}}function ag(t,r){switch($u(r),r.tag){case 3:jn(Xe),Ne();break;case 26:case 27:case 5:En(r);break;case 4:Ne();break;case 31:r.memoizedState!==null&&Bt(r);break;case 13:Bt(r);break;case 19:$(Qe);break;case 10:jn(r.type);break;case 22:case 23:Bt(r),sc(),t!==null&&$(Fr);break;case 24:jn(Xe)}}function ni(t,r){try{var a=r.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var h=o.next;a=h;do{if((a.tag&t)===t){o=void 0;var d=a.create,v=a.inst;o=d(),v.destroy=o}a=a.next}while(a!==h)}}catch(w){xe(r,r.return,w)}}function hr(t,r,a){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var d=h.next;o=d;do{if((o.tag&t)===t){var v=o.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,h=r;var C=a,D=w;try{D()}catch(q){xe(h,C,q)}}}o=o.next}while(o!==d)}}catch(q){xe(r,r.return,q)}}function ig(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{Jd(r,a)}catch(o){xe(t,t.return,o)}}}function og(t,r,a){a.props=Wr(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(o){xe(t,r,o)}}function ri(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof a=="function"?t.refCleanup=a(o):a.current=o}}catch(h){xe(t,r,h)}}function gn(t,r){var a=t.ref,o=t.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(h){xe(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){xe(t,r,h)}else a.current=null}function lg(t){var r=t.type,a=t.memoizedProps,o=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(h){xe(t,t.return,h)}}function Dc(t,r,a){try{var o=t.stateNode;J_(o,t.type,a,r),o[Et]=r}catch(h){xe(t,t.return,h)}}function ug(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&vr(t.type)||t.tag===4}function zc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ug(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&&vr(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 Pc(t,r,a){var o=t.tag;if(o===5||o===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=An));else if(o!==4&&(o===27&&vr(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(Pc(t,r,a),t=t.sibling;t!==null;)Pc(t,r,a),t=t.sibling}function $o(t,r,a){var o=t.tag;if(o===5||o===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(o!==4&&(o===27&&vr(t.type)&&(a=t.stateNode),t=t.child,t!==null))for($o(t,r,a),t=t.sibling;t!==null;)$o(t,r,a),t=t.sibling}function cg(t){var r=t.stateNode,a=t.memoizedProps;try{for(var o=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);gt(r,o,a),r[ht]=t,r[Et]=a}catch(d){xe(t,t.return,d)}}var Dn=!1,et=!1,Bc=!1,hg=typeof WeakSet=="function"?WeakSet:Set,ot=null;function k_(t,r){if(t=t.containerInfo,ih=cl,t=Ed(t),Mu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var h=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var v=0,w=-1,C=-1,D=0,q=0,G=t,z=null;t:for(;;){for(var P;G!==a||h!==0&&G.nodeType!==3||(w=v+h),G!==d||o!==0&&G.nodeType!==3||(C=v+o),G.nodeType===3&&(v+=G.nodeValue.length),(P=G.firstChild)!==null;)z=G,G=P;for(;;){if(G===t)break t;if(z===a&&++D===h&&(w=v),z===d&&++q===o&&(C=v),(P=G.nextSibling)!==null)break;G=z,z=G.parentNode}G=P}a=w===-1||C===-1?null:{start:w,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(oh={focusedElem:t,selectionRange:a},cl=!1,ot=r;ot!==null;)if(r=ot,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,ot=t;else for(;ot!==null;){switch(r=ot,d=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)h=t[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&d!==null){t=void 0,a=r,h=d.memoizedProps,d=d.memoizedState,o=a.stateNode;try{var ee=Wr(a.type,h);t=o.getSnapshotBeforeUpdate(ee,d),o.__reactInternalSnapshotBeforeUpdate=t}catch(ue){xe(a,a.return,ue)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)ch(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":ch(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(i(163))}if(t=r.sibling,t!==null){t.return=r.return,ot=t;break}ot=r.return}}function fg(t,r,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:Pn(t,a),o&4&&ni(5,a);break;case 1:if(Pn(t,a),o&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(v){xe(a,a.return,v)}else{var h=Wr(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(v){xe(a,a.return,v)}}o&64&&ig(a),o&512&&ri(a,a.return);break;case 3:if(Pn(t,a),o&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{Jd(t,r)}catch(v){xe(a,a.return,v)}}break;case 27:r===null&&o&4&&cg(a);case 26:case 5:Pn(t,a),r===null&&o&4&&lg(a),o&512&&ri(a,a.return);break;case 12:Pn(t,a);break;case 31:Pn(t,a),o&4&&gg(t,a);break;case 13:Pn(t,a),o&4&&mg(t,a),o&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=P_.bind(null,a),sw(t,a))));break;case 22:if(o=a.memoizedState!==null||Dn,!o){r=r!==null&&r.memoizedState!==null||et,h=Dn;var d=et;Dn=o,(et=r)&&!d?Bn(t,a,(a.subtreeFlags&8772)!==0):Pn(t,a),Dn=h,et=d}break;case 30:break;default:Pn(t,a)}}function dg(t){var r=t.alternate;r!==null&&(t.alternate=null,dg(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&gu(r)),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 Ie=null,Rt=!1;function zn(t,r,a){for(a=a.child;a!==null;)pg(t,r,a),a=a.sibling}function pg(t,r,a){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Oa,a)}catch{}switch(a.tag){case 26:et||gn(a,r),zn(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:et||gn(a,r);var o=Ie,h=Rt;vr(a.type)&&(Ie=a.stateNode,Rt=!1),zn(t,r,a),fi(a.stateNode),Ie=o,Rt=h;break;case 5:et||gn(a,r);case 6:if(o=Ie,h=Rt,Ie=null,zn(t,r,a),Ie=o,Rt=h,Ie!==null)if(Rt)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(a.stateNode)}catch(d){xe(a,r,d)}else try{Ie.removeChild(a.stateNode)}catch(d){xe(a,r,d)}break;case 18:Ie!==null&&(Rt?(t=Ie,im(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),ta(t)):im(Ie,a.stateNode));break;case 4:o=Ie,h=Rt,Ie=a.stateNode.containerInfo,Rt=!0,zn(t,r,a),Ie=o,Rt=h;break;case 0:case 11:case 14:case 15:hr(2,a,r),et||hr(4,a,r),zn(t,r,a);break;case 1:et||(gn(a,r),o=a.stateNode,typeof o.componentWillUnmount=="function"&&og(a,r,o)),zn(t,r,a);break;case 21:zn(t,r,a);break;case 22:et=(o=et)||a.memoizedState!==null,zn(t,r,a),et=o;break;default:zn(t,r,a)}}function gg(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ta(t)}catch(a){xe(r,r.return,a)}}}function mg(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ta(t)}catch(a){xe(r,r.return,a)}}function x_(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new hg),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new hg),r;default:throw Error(i(435,t.tag))}}function Go(t,r){var a=x_(t);r.forEach(function(o){if(!a.has(o)){a.add(o);var h=B_.bind(null,t,o);o.then(h,h)}})}function At(t,r){var a=r.deletions;if(a!==null)for(var o=0;o<a.length;o++){var h=a[o],d=t,v=r,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(vr(w.type)){Ie=w.stateNode,Rt=!1;break e}break;case 5:Ie=w.stateNode,Rt=!1;break e;case 3:case 4:Ie=w.stateNode.containerInfo,Rt=!0;break e}w=w.return}if(Ie===null)throw Error(i(160));pg(d,v,h),Ie=null,Rt=!1,d=h.alternate,d!==null&&(d.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)yg(r,t),r=r.sibling}var rn=null;function yg(t,r){var a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:At(r,t),Ot(t),o&4&&(hr(3,t,t.return),ni(3,t),hr(5,t,t.return));break;case 1:At(r,t),Ot(t),o&512&&(et||a===null||gn(a,a.return)),o&64&&Dn&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var h=rn;if(At(r,t),Ot(t),o&512&&(et||a===null||gn(a,a.return)),o&4){var d=a!==null?a.memoizedState:null;if(o=t.memoizedState,a===null)if(o===null)if(t.stateNode===null){e:{o=t.type,a=t.memoizedProps,h=h.ownerDocument||h;t:switch(o){case"title":d=h.getElementsByTagName("title")[0],(!d||d[xa]||d[ht]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=h.createElement(o),h.head.insertBefore(d,h.querySelector("head > title"))),gt(d,o,a),d[ht]=t,it(d),o=d;break e;case"link":var v=ym("link","href",h).get(o+(a.href||""));if(v){for(var w=0;w<v.length;w++)if(d=v[w],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(w,1);break t}}d=h.createElement(o),gt(d,o,a),h.head.appendChild(d);break;case"meta":if(v=ym("meta","content",h).get(o+(a.content||""))){for(w=0;w<v.length;w++)if(d=v[w],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(w,1);break t}}d=h.createElement(o),gt(d,o,a),h.head.appendChild(d);break;default:throw Error(i(468,o))}d[ht]=t,it(d),o=d}t.stateNode=o}else vm(h,t.type,t.stateNode);else t.stateNode=mm(h,o,t.memoizedProps);else d!==o?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,o===null?vm(h,t.type,t.stateNode):mm(h,o,t.memoizedProps)):o===null&&t.stateNode!==null&&Dc(t,t.memoizedProps,a.memoizedProps)}break;case 27:At(r,t),Ot(t),o&512&&(et||a===null||gn(a,a.return)),a!==null&&o&4&&Dc(t,t.memoizedProps,a.memoizedProps);break;case 5:if(At(r,t),Ot(t),o&512&&(et||a===null||gn(a,a.return)),t.flags&32){h=t.stateNode;try{Ts(h,"")}catch(ee){xe(t,t.return,ee)}}o&4&&t.stateNode!=null&&(h=t.memoizedProps,Dc(t,h,a!==null?a.memoizedProps:h)),o&1024&&(Bc=!0);break;case 6:if(At(r,t),Ot(t),o&4){if(t.stateNode===null)throw Error(i(162));o=t.memoizedProps,a=t.stateNode;try{a.nodeValue=o}catch(ee){xe(t,t.return,ee)}}break;case 3:if(il=null,h=rn,rn=sl(r.containerInfo),At(r,t),rn=h,Ot(t),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ta(r.containerInfo)}catch(ee){xe(t,t.return,ee)}Bc&&(Bc=!1,vg(t));break;case 4:o=rn,rn=sl(t.stateNode.containerInfo),At(r,t),Ot(t),rn=o;break;case 12:At(r,t),Ot(t);break;case 31:At(r,t),Ot(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Go(t,o)));break;case 13:At(r,t),Ot(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ko=bt()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Go(t,o)));break;case 22:h=t.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,D=Dn,q=et;if(Dn=D||h,et=q||C,At(r,t),et=q,Dn=D,Ot(t),o&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(a===null||C||Dn||et||es(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){C=a=r;try{if(d=C.stateNode,h)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=C.stateNode;var G=C.memoizedProps.style,z=G!=null&&G.hasOwnProperty("display")?G.display:null;w.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ee){xe(C,C.return,ee)}}}else if(r.tag===6){if(a===null){C=r;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(ee){xe(C,C.return,ee)}}}else if(r.tag===18){if(a===null){C=r;try{var P=C.stateNode;h?om(P,!0):om(C.stateNode,!1)}catch(ee){xe(C,C.return,ee)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=t.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Go(t,a))));break;case 19:At(r,t),Ot(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Go(t,o)));break;case 30:break;case 21:break;default:At(r,t),Ot(t)}}function Ot(t){var r=t.flags;if(r&2){try{for(var a,o=t.return;o!==null;){if(ug(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var h=a.stateNode,d=zc(t);$o(t,d,h);break;case 5:var v=a.stateNode;a.flags&32&&(Ts(v,""),a.flags&=-33);var w=zc(t);$o(t,w,v);break;case 3:case 4:var C=a.stateNode.containerInfo,D=zc(t);Pc(t,D,C);break;default:throw Error(i(161))}}catch(q){xe(t,t.return,q)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function vg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;vg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Pn(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)fg(t,r.alternate,r),r=r.sibling}function es(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:hr(4,r,r.return),es(r);break;case 1:gn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&og(r,r.return,a),es(r);break;case 27:fi(r.stateNode);case 26:case 5:gn(r,r.return),es(r);break;case 22:r.memoizedState===null&&es(r);break;case 30:es(r);break;default:es(r)}t=t.sibling}}function Bn(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,h=t,d=r,v=d.flags;switch(d.tag){case 0:case 11:case 15:Bn(h,d,a),ni(4,d);break;case 1:if(Bn(h,d,a),o=d,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){xe(o,o.return,D)}if(o=d,h=o.updateQueue,h!==null){var w=o.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)Qd(C[h],w)}catch(D){xe(o,o.return,D)}}a&&v&64&&ig(d),ri(d,d.return);break;case 27:cg(d);case 26:case 5:Bn(h,d,a),a&&o===null&&v&4&&lg(d),ri(d,d.return);break;case 12:Bn(h,d,a);break;case 31:Bn(h,d,a),a&&v&4&&gg(h,d);break;case 13:Bn(h,d,a),a&&v&4&&mg(h,d);break;case 22:d.memoizedState===null&&Bn(h,d,a),ri(d,d.return);break;case 30:break;default:Bn(h,d,a)}r=r.sibling}}function Hc(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&$a(a))}function qc(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&$a(t))}function sn(t,r,a,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)bg(t,r,a,o),r=r.sibling}function bg(t,r,a,o){var h=r.flags;switch(r.tag){case 0:case 11:case 15:sn(t,r,a,o),h&2048&&ni(9,r);break;case 1:sn(t,r,a,o);break;case 3:sn(t,r,a,o),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&$a(t)));break;case 12:if(h&2048){sn(t,r,a,o),t=r.stateNode;try{var d=r.memoizedProps,v=d.id,w=d.onPostCommit;typeof w=="function"&&w(v,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(C){xe(r,r.return,C)}}else sn(t,r,a,o);break;case 31:sn(t,r,a,o);break;case 13:sn(t,r,a,o);break;case 23:break;case 22:d=r.stateNode,v=r.alternate,r.memoizedState!==null?d._visibility&2?sn(t,r,a,o):si(t,r):d._visibility&2?sn(t,r,a,o):(d._visibility|=2,Gs(t,r,a,o,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Hc(v,r);break;case 24:sn(t,r,a,o),h&2048&&qc(r.alternate,r);break;default:sn(t,r,a,o)}}function Gs(t,r,a,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var d=t,v=r,w=a,C=o,D=v.flags;switch(v.tag){case 0:case 11:case 15:Gs(d,v,w,C,h),ni(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Gs(d,v,w,C,h):si(d,v):(q._visibility|=2,Gs(d,v,w,C,h)),h&&D&2048&&Hc(v.alternate,v);break;case 24:Gs(d,v,w,C,h),h&&D&2048&&qc(v.alternate,v);break;default:Gs(d,v,w,C,h)}r=r.sibling}}function si(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,o=r,h=o.flags;switch(o.tag){case 22:si(a,o),h&2048&&Hc(o.alternate,o);break;case 24:si(a,o),h&2048&&qc(o.alternate,o);break;default:si(a,o)}r=r.sibling}}var ai=8192;function Vs(t,r,a){if(t.subtreeFlags&ai)for(t=t.child;t!==null;)_g(t,r,a),t=t.sibling}function _g(t,r,a){switch(t.tag){case 26:Vs(t,r,a),t.flags&ai&&t.memoizedState!==null&&mw(a,rn,t.memoizedState,t.memoizedProps);break;case 5:Vs(t,r,a);break;case 3:case 4:var o=rn;rn=sl(t.stateNode.containerInfo),Vs(t,r,a),rn=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=ai,ai=16777216,Vs(t,r,a),ai=o):Vs(t,r,a));break;default:Vs(t,r,a)}}function wg(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function ii(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var o=r[a];ot=o,Eg(o,t)}wg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sg(t),t=t.sibling}function Sg(t){switch(t.tag){case 0:case 11:case 15:ii(t),t.flags&2048&&hr(9,t,t.return);break;case 3:ii(t);break;case 12:ii(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Vo(t)):ii(t);break;default:ii(t)}}function Vo(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var o=r[a];ot=o,Eg(o,t)}wg(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:hr(8,r,r.return),Vo(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,Vo(r));break;default:Vo(r)}t=t.sibling}}function Eg(t,r){for(;ot!==null;){var a=ot;switch(a.tag){case 0:case 11:case 15:hr(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:$a(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,ot=o;else e:for(a=t;ot!==null;){o=ot;var h=o.sibling,d=o.return;if(dg(o),o===a){ot=null;break e}if(h!==null){h.return=d,ot=h;break e}ot=d}}}var j_={getCacheForType:function(t){var r=dt(Xe),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a},cacheSignal:function(){return dt(Xe).controller.signal}},M_=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Le=null,ge=null,ve=0,ke=0,Ht=null,fr=!1,Ks=!1,Ic=!1,Hn=0,Ve=0,dr=0,ts=0,$c=0,qt=0,Ys=0,oi=null,Ct=null,Gc=!1,Ko=0,Tg=0,Yo=1/0,Fo=null,pr=null,rt=0,gr=null,Fs=null,qn=0,Vc=0,Kc=null,Rg=null,li=0,Yc=null;function It(){return(Ae&2)!==0&&ve!==0?ve&-ve:B.T!==null?Wc():qf()}function Ag(){if(qt===0)if((ve&536870912)===0||_e){var t=to;to<<=1,(to&3932160)===0&&(to=262144),qt=t}else qt=536870912;return t=Pt.current,t!==null&&(t.flags|=32),qt}function kt(t,r,a){(t===Le&&(ke===2||ke===9)||t.cancelPendingCommit!==null)&&(Qs(t,0),mr(t,ve,qt,!1)),ka(t,a),((Ae&2)===0||t!==Le)&&(t===Le&&((Ae&2)===0&&(ts|=a),Ve===4&&mr(t,ve,qt,!1)),mn(t))}function Og(t,r,a){if((Ae&6)!==0)throw Error(i(327));var o=!a&&(r&127)===0&&(r&t.expiredLanes)===0||Ca(t,r),h=o?L_(t,r):Qc(t,r,!0),d=o;do{if(h===0){Ks&&!o&&mr(t,r,0,!1);break}else{if(a=t.current.alternate,d&&!U_(a)){h=Qc(t,r,!1),d=!1;continue}if(h===2){if(d=r,t.errorRecoveryDisabledLanes&d)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var w=t;h=oi;var C=w.current.memoizedState.isDehydrated;if(C&&(Qs(w,v).flags|=256),v=Qc(w,v,!1),v!==2){if(Ic&&!C){w.errorRecoveryDisabledLanes|=d,ts|=d,h=4;break e}d=Ct,Ct=h,d!==null&&(Ct===null?Ct=d:Ct.push.apply(Ct,d))}h=v}if(d=!1,h!==2)continue}}if(h===1){Qs(t,0),mr(t,r,0,!0);break}e:{switch(o=t,d=h,d){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:mr(o,r,qt,!fr);break e;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(h=Ko+300-bt(),10<h)){if(mr(o,r,qt,!fr),ro(o,0,!0)!==0)break e;qn=r,o.timeoutHandle=sm(Cg.bind(null,o,a,Ct,Fo,Gc,r,qt,ts,Ys,fr,d,"Throttled",-0,0),h);break e}Cg(o,a,Ct,Fo,Gc,r,qt,ts,Ys,fr,d,null,-0,0)}}break}while(!0);mn(t)}
vendor: 2,483 bytes, line 9
9function Cg(t,r,a,o,h,d,v,w,C,D,q,G,z,P){if(t.timeoutHandle=-1,G=r.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:An},_g(r,d,G);var ee=(d&62914560)===d?Ko-bt():(d&4194048)===d?Tg-bt():0;if(ee=yw(G,ee),ee!==null){qn=d,t.cancelPendingCommit=ee(Dg.bind(null,t,r,d,a,o,h,v,w,C,q,G,null,z,P)),mr(t,d,v,!D);return}}Dg(t,r,d,a,o,h,v,w,C)}function U_(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var h=a[o],d=h.getSnapshot;h=h.value;try{if(!Dt(d(),h))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function mr(t,r,a,o){r&=~$c,r&=~ts,t.suspendedLanes|=r,t.pingedLanes&=~r,o&&(t.warmLanes|=r),o=t.expirationTimes;for(var h=r;0<h;){var d=31-Lt(h),v=1<<d;o[d]=-1,h&=~v}a!==0&&Pf(t,a,r)}function Qo(){return(Ae&6)===0?(ui(0),!1):!0}function Fc(){if(ge!==null){if(ke===0)var t=ge.return;else t=ge,xn=Kr=null,cc(t),Bs=null,Va=0,t=ge;for(;t!==null;)ag(t.alternate,t),t=t.return;ge=null}}function Qs(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,W_(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),qn=0,Fc(),Le=t,ge=a=Cn(t.current,null),ve=r,ke=0,Ht=null,fr=!1,Ks=Ca(t,r),Ic=!1,Ys=qt=$c=ts=dr=Ve=0,Ct=oi=null,Gc=!1,(r&8)!==0&&(r|=r&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=r;0<o;){var h=31-Lt(o),d=1<<h;r|=t[h],o&=~d}return Hn=r,mo(),a}function kg(t,r){fe=null,B.H=Wa,r===Ps||r===To?(r=Vd(),ke=3):r===Zu?(r=Vd(),ke=4):ke=r===Ac?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ht=r,ge===null&&(Ve=1,Po(t,Yt(r,t.current)))}function xg(){var t=Pt.current;return t===null?!0:(ve&4194048)===ve?Xt===null:(ve&62914560)===ve||(ve&536870912)!==0?t===Xt:!1}function jg(){var t=B.H;return B.H=Wa,t===null?Wa:t}function Mg(){var t=B.A;return B.A=j_,t}function Jo(){Ve=4,fr||(ve&4194048)!==ve&&Pt.current!==null||(Ks=!0),(dr&134217727)===0&&(ts&134217727)===0||Le===null||mr(Le,ve,qt,!1)}function Qc(t,r,a){var o=Ae;Ae|=2;var h=jg(),d=Mg();(Le!==t||ve!==r)&&(Fo=null,Qs(t,r)),r=!1;var v=Ve;e:do try{if(ke!==0&&ge!==null){var w=ge,C=Ht;switch(ke){case 8:Fc(),v=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(r=!0);var D=ke;
vendor: 4,312 bytes, line 9
9if(ke=0,Ht=null,Js(t,w,C,D),a&&Ks){v=0;break e}break;default:D=ke,ke=0,Ht=null,Js(t,w,C,D)}}N_(),v=Ve;break}catch(q){kg(t,q)}while(!0);return r&&t.shellSuspendCounter++,xn=Kr=null,Ae=o,B.H=h,B.A=d,ge===null&&(Le=null,ve=0,mo()),v}function N_(){for(;ge!==null;)Ug(ge)}function L_(t,r){var a=Ae;Ae|=2;var o=jg(),h=Mg();Le!==t||ve!==r?(Fo=null,Yo=bt()+500,Qs(t,r)):Ks=Ca(t,r);e:do try{if(ke!==0&&ge!==null){r=ge;var d=Ht;t:switch(ke){case 1:ke=0,Ht=null,Js(t,r,d,1);break;case 2:case 9:if($d(d)){ke=0,Ht=null,Ng(r);break}r=function(){ke!==2&&ke!==9||Le!==t||(ke=7),mn(t)},d.then(r,r);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:$d(d)?(ke=0,Ht=null,Ng(r)):(ke=0,Ht=null,Js(t,r,d,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var w=ge;if(v?bm(v):w.stateNode.complete){ke=0,Ht=null;var C=w.sibling;if(C!==null)ge=C;else{var D=w.return;D!==null?(ge=D,Xo(D)):ge=null}break t}}ke=0,Ht=null,Js(t,r,d,5);break;case 6:ke=0,Ht=null,Js(t,r,d,6);break;case 8:Fc(),Ve=6;break e;default:throw Error(i(462))}}D_();break}catch(q){kg(t,q)}while(!0);return xn=Kr=null,B.H=o,B.A=h,Ae=a,ge!==null?0:(Le=null,ve=0,mo(),Ve)}function D_(){for(;ge!==null&&!Wi();)Ug(ge)}function Ug(t){var r=rg(t.alternate,t,Hn);t.memoizedProps=t.pendingProps,r===null?Xo(t):ge=r}function Ng(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=Xp(a,r,r.pendingProps,r.type,void 0,ve);break;case 11:r=Xp(a,r,r.pendingProps,r.type.render,r.ref,ve);break;case 5:cc(r);default:ag(a,r),r=ge=Md(r,Hn),r=rg(a,r,Hn)}t.memoizedProps=t.pendingProps,r===null?Xo(t):ge=r}function Js(t,r,a,o){xn=Kr=null,cc(r),Bs=null,Va=0;var h=r.return;try{if(T_(t,h,r,a,ve)){Ve=1,Po(t,Yt(a,t.current)),ge=null;return}}catch(d){if(h!==null)throw ge=h,d;Ve=1,Po(t,Yt(a,t.current)),ge=null;return}r.flags&32768?(_e||o===1?t=!0:Ks||(ve&536870912)!==0?t=!1:(fr=t=!0,(o===2||o===9||o===3||o===6)&&(o=Pt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Lg(r,t)):Xo(r)}function Xo(t){var r=t;do{if((r.flags&32768)!==0){Lg(r,fr);return}t=r.return;var a=O_(r.alternate,r,Hn);if(a!==null){ge=a;return}if(r=r.sibling,r!==null){ge=r;return}ge=r=t}while(r!==null);Ve===0&&(Ve=5)}function Lg(t,r){do{var a=C_(t.alternate,t);if(a!==null){a.flags&=32767,ge=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){ge=t;return}ge=t=a}while(t!==null);Ve=6,ge=null}function Dg(t,r,a,o,h,d,v,w,C){t.cancelPendingCommit=null;do Zo();while(rt!==0);if((Ae&6)!==0)throw Error(i(327));if(r!==null){if(r===t.current)throw Error(i(177));if(d=r.lanes|r.childLanes,d|=zu,g0(t,a,d,v,w,C),t===Le&&(ge=Le=null,ve=0),Fs=r,gr=t,qn=a,Vc=d,Kc=h,Rg=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,H_(ys,function(){return qg(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,h=Q.p,Q.p=2,v=Ae,Ae|=4;try{k_(t,r,a)}finally{Ae=v,Q.p=h,B.T=o}}rt=1,zg(),Pg(),Bg()}}function zg(){if(rt===1){rt=0;var t=gr,r=Fs,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var o=Q.p;Q.p=2;var h=Ae;Ae|=4;try{yg(r,t);var d=oh,v=Ed(t.containerInfo),w=d.focusedElem,C=d.selectionRange;if(v!==w&&w&&w.ownerDocument&&Sd(w.ownerDocument.documentElement,w)){if(C!==null&&Mu(w)){var D=C.start,q=C.end;if(q===void 0&&(q=D),"selectionStart"in w)w.selectionStart=D,w.selectionEnd=Math.min(q,w.value.length);else{var G=w.ownerDocument||document,z=G&&G.defaultView||window;if(z.getSelection){var P=z.getSelection(),ee=w.textContent.length,ue=Math.min(C.start,ee),Ue=C.end===void 0?ue:Math.min(C.end,ee);!P.extend&&ue>Ue&&(v=Ue,Ue=ue,ue=v);var M=wd(w,ue),k=wd(w,Ue);if(M&&k&&(P.rangeCount!==1||P.anchorNode!==M.node||P.anchorOffset!==M.offset||P.focusNode!==k.node||P.focusOffset!==k.offset)){var N=G.createRange();N.setStart(M.node,M.offset),P.removeAllRanges(),ue>Ue?(P.addRange(N),P.extend(k.node,k.offset)):(N.setEnd(k.node,k.offset),P.addRange(N))}}}}for(G=[],P=w;P=P.parentNode;)P.nodeType===1&&G.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<G.length;w++){var I=G[w];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}cl=!!ih,oh=ih=null}finally{Ae=h,Q.p=o,B.T=a}}t.current=r,rt=2}}function Pg(){if(rt===2){rt=0;var t=gr,r=Fs,a=(r.flags&8772)!==0;
vendor: 6,265 bytes, line 9
9if((r.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var o=Q.p;Q.p=2;var h=Ae;Ae|=4;try{fg(t,r.alternate,r)}finally{Ae=h,Q.p=o,B.T=a}}rt=3}}function Bg(){if(rt===4||rt===3){rt=0,cu();var t=gr,r=Fs,a=qn,o=Rg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?rt=5:(rt=0,Fs=gr=null,Hg(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(pr=null),du(a),r=r.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Oa,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=B.T,h=Q.p,Q.p=2,B.T=null;try{for(var d=t.onRecoverableError,v=0;v<o.length;v++){var w=o[v];d(w.value,{componentStack:w.stack})}}finally{B.T=r,Q.p=h}}(qn&3)!==0&&Zo(),mn(t),h=t.pendingLanes,(a&261930)!==0&&(h&42)!==0?t===Yc?li++:(li=0,Yc=t):li=0,ui(0)}}function Hg(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,$a(r)))}function Zo(){return zg(),Pg(),Bg(),qg()}function qg(){if(rt!==5)return!1;var t=gr,r=Vc;Vc=0;var a=du(qn),o=B.T,h=Q.p;try{Q.p=32>a?32:a,B.T=null,a=Kc,Kc=null;var d=gr,v=qn;if(rt=0,Fs=gr=null,qn=0,(Ae&6)!==0)throw Error(i(331));var w=Ae;if(Ae|=4,Sg(d.current),bg(d,d.current,v,a),Ae=w,ui(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Oa,d)}catch{}return!0}finally{Q.p=h,B.T=o,Hg(t,r)}}function Ig(t,r,a){r=Yt(a,r),r=Rc(t.stateNode,r,2),t=lr(t,r,2),t!==null&&(ka(t,2),mn(t))}function xe(t,r,a){if(t.tag===3)Ig(t,t,a);else for(;r!==null;){if(r.tag===3){Ig(r,t,a);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(pr===null||!pr.has(o))){t=Yt(a,t),a=$p(2),o=lr(r,a,2),o!==null&&(Gp(a,o,r,t),ka(o,2),mn(o));break}}r=r.return}}function Jc(t,r,a){var o=t.pingCache;if(o===null){o=t.pingCache=new M_;var h=new Set;o.set(r,h)}else h=o.get(r),h===void 0&&(h=new Set,o.set(r,h));h.has(a)||(Ic=!0,h.add(a),t=z_.bind(null,t,r,a),r.then(t,t))}function z_(t,r,a){var o=t.pingCache;o!==null&&o.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Le===t&&(ve&a)===a&&(Ve===4||Ve===3&&(ve&62914560)===ve&&300>bt()-Ko?(Ae&2)===0&&Qs(t,0):$c|=a,Ys===ve&&(Ys=0)),mn(t)}function $g(t,r){r===0&&(r=zf()),t=$r(t,r),t!==null&&(ka(t,r),mn(t))}function P_(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),$g(t,a)}function B_(t,r){var a=0;switch(t.tag){case 31:case 13:var o=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(r),$g(t,a)}function H_(t,r){return tn(t,r)}var Wo=null,Xs=null,Xc=!1,el=!1,Zc=!1,yr=0;function mn(t){t!==Xs&&t.next===null&&(Xs===null?Wo=Xs=t:Xs=Xs.next=t),el=!0,Xc||(Xc=!0,I_())}function ui(t,r){if(!Zc&&el){Zc=!0;do for(var a=!1,o=Wo;o!==null;){if(t!==0){var h=o.pendingLanes;if(h===0)var d=0;else{var v=o.suspendedLanes,w=o.pingedLanes;d=(1<<31-Lt(42|t)+1)-1,d&=h&~(v&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Yg(o,d))}else d=ve,d=ro(o,o===Le?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Ca(o,d)||(a=!0,Yg(o,d));o=o.next}while(a);Zc=!1}}function q_(){Gg()}function Gg(){el=Xc=!1;var t=0;yr!==0&&Z_()&&(t=yr);for(var r=bt(),a=null,o=Wo;o!==null;){var h=o.next,d=Vg(o,r);d===0?(o.next=null,a===null?Wo=h:a.next=h,h===null&&(Xs=a)):(a=o,(t!==0||(d&3)!==0)&&(el=!0)),o=h}rt!==0&&rt!==5||ui(t),yr!==0&&(yr=0)}function Vg(t,r){for(var a=t.suspendedLanes,o=t.pingedLanes,h=t.expirationTimes,d=t.pendingLanes&-62914561;0<d;){var v=31-Lt(d),w=1<<v,C=h[v];C===-1?((w&a)===0||(w&o)!==0)&&(h[v]=p0(w,r)):C<=r&&(t.expiredLanes|=w),d&=~w}if(r=Le,a=ve,a=ro(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,a===0||t===r&&(ke===2||ke===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&Aa(o),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Ca(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(o!==null&&Aa(o),du(a)){case 2:case 8:a=fn;break;case 32:a=ys;break;case 268435456:a=Df;break;default:a=ys}return o=Kg.bind(null,t),a=tn(a,o),t.callbackPriority=r,t.callbackNode=a,r}return o!==null&&o!==null&&Aa(o),t.callbackPriority=2,t.callbackNode=null,2}function Kg(t,r){if(rt!==0&&rt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Zo()&&t.callbackNode!==a)return null;var o=ve;return o=ro(t,t===Le?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Og(t,o,r),Vg(t,bt()),t.callbackNode!=null&&t.callbackNode===a?Kg.bind(null,t):null)}function Yg(t,r){if(Zo())return null;Og(t,r,!0)}function I_(){ew(function(){(Ae&6)!==0?tn(ct,q_):Gg()})}function Wc(){if(yr===0){var t=Ds;t===0&&(t=eo,eo<<=1,(eo&261888)===0&&(eo=256)),yr=t}return yr}function Fg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:oo(""+t)}function Qg(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function $_(t,r,a,o,h){if(r==="submit"&&a&&a.stateNode===h){var d=Fg((h[Et]||null).action),v=o.submitter;v&&(r=(r=v[Et]||null)?Fg(r.formAction):v.getAttribute("formAction"),r!==null&&(d=r,v=null));var w=new ho("action","action",null,o,h);t.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(yr!==0){var C=v?Qg(h,v):new FormData(h);bc(a,{pending:!0,data:C,method:h.method,action:d},null,C)}}else typeof d=="function"&&(w.preventDefault(),C=v?Qg(h,v):new FormData(h),bc(a,{pending:!0,data:C,method:h.method,action:d},d,C))},currentTarget:h}]})}}for(var eh=0;eh<Du.length;eh++){var th=Du[eh],G_=th.toLowerCase(),V_=th[0].toUpperCase()+th.slice(1);nn(G_,"on"+V_)}nn(Ad,"onAnimationEnd"),nn(Od,"onAnimationIteration"),nn(Cd,"onAnimationStart"),nn("dblclick","onDoubleClick"),nn("focusin","onFocus"),nn("focusout","onBlur"),nn(o_,"onTransitionRun"),nn(l_,"onTransitionStart"),nn(u_,"onTransitionCancel"),nn(kd,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),Br("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Br("onSelect","focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange".split(" ")),Br("onBeforeInput",["compositionend","keypress","textInput","paste"]),Br("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Br("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Br("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ci="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(" "),K_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ci));function Jg(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var o=t[a],h=o.event;o=o.listeners;e:{var d=void 0;if(r)for(var v=o.length-1;0<=v;v--){var w=o[v],C=w.instance,D=w.currentTarget;if(w=w.listener,C!==d&&h.isPropagationStopped())break e;d=w,h.currentTarget=D;try{d(h)}catch(q){go(q)}h.currentTarget=null,d=C}else for(v=0;v<o.length;v++){if(w=o[v],C=w.instance,D=w.currentTarget,w=w.listener,C!==d&&h.isPropagationStopped())break e;d=w,h.currentTarget=D;try{d(h)}catch(q){go(q)}h.currentTarget=null,d=C}}}}function me(t,r){var a=r[pu];a===void 0&&(a=r[pu]=new Set);var o=t+"__bubble";a.has(o)||(Xg(r,t,2,!1),a.add(o))}function nh(t,r,a){var o=0;r&&(o|=4),Xg(a,t,o,r)}var tl="_reactListening"+Math.random().toString(36).slice(2);function rh(t){if(!t[tl]){t[tl]=!0,Gf.forEach(function(a){a!=="selectionchange"&&(K_.has(a)||nh(a,!1,t),nh(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[tl]||(r[tl]=!0,nh("selectionchange",!1,r))}}function Xg(t,r,a,o){switch(Am(r)){case 2:var h=_w;break;case 8:h=ww;break;default:h=vh}a=h.bind(null,r,a,t),h=void 0,!Eu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?t.addEventListener(r,a,{capture:!0,passive:h}):t.addEventListener(r,a,!0):h!==void 0?t.addEventListener(r,a,{passive:h}):t.addEventListener(r,a,!1)}function sh(t,r,a,o,h){var d=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var w=o.stateNode.containerInfo;if(w===h)break;if(v===4)for(v=o.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;w!==null;){if(v=bs(w),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){o=d=v;continue e}w=w.parentNode}}o=o.return}nd(function(){var D=d,q=wu(a),G=[];e:{var z=xd.get(t);if(z!==void 0){var P=ho,ee=t;switch(t){case"keypress":if(uo(a)===0)break e;case"keydown":case"keyup":P=B0;break;case"focusin":ee="focus",P=Ou;break;case"focusout":ee="blur",P=Ou;break;case"beforeblur":case"afterblur":P=Ou;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=ad;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=O0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=I0;break;case Ad:case Od:case Cd:P=x0;break;case kd:P=G0;break;case"scroll":case"scrollend":P=R0;break;case"wheel":P=K0;break;case"copy":case"cut":case"paste":P=M0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=od;break;case"toggle":case"beforetoggle":P=F0}var ue=(r&4)!==0,Ue=!ue&&(t==="scroll"||t==="scrollend"),M=ue?z!==null?z+"Capture":null:z;ue=[];for(var k=D,N;k!==null;){var I=k;if(N=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||N===null||M===null||(I=Ma(k,M),I!=null&&ue.push(hi(k,I,N))),Ue)break;k=k.return}0<ue.length&&(z=new P(z,ee,null,a,q),G.push({event:z,listeners:ue}))}}if((r&7)===0){e:{if(z=t==="mouseover"||t==="pointerover",P=t==="mouseout"||t==="pointerout",z&&a!==_u&&(ee=a.relatedTarget||a.fromElement)&&(bs(ee)||ee[vs]))break e;if((P||z)&&(z=q.window===q?q:(z=q.ownerDocument)?z.defaultView||z.parentWindow:window,P?(ee=a.relatedTarget||a.toElement,P=D,ee=ee?bs(ee):null,ee!==null&&(Ue=u(ee),ue=ee.tag,ee!==Ue||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(P=null,ee=D),P!==ee)){if(ue=ad,I="onMouseLeave",M="onMouseEnter",k="mouse",(t==="pointerout"||t==="pointerover")&&(ue=od,I="onPointerLeave",M="onPointerEnter",k="pointer"),Ue=P==null?z:ja(P),N=ee==null?z:ja(ee),z=new ue(I,k+"leave",P,a,q),z.target=Ue,z.relatedTarget=N,I=null,bs(q)===D&&(ue=new ue(M,k+"enter",ee,a,q),ue.target=N,ue.relatedTarget=Ue,I=ue),Ue=I,P&&ee)t:{for(ue=Y_,M=P,k=ee,N=0,I=M;I;I=ue(I))N++;I=0;for(var oe=k;oe;oe=ue(oe))I++;for(;0<N-I;)M=ue(M),N--;for(;0<I-N;)k=ue(k),I--;for(;N--;
vendor: 5,345 bytes, lines 9-10
9){if(M===k||k!==null&&M===k.alternate){ue=M;break t}M=ue(M),k=ue(k)}ue=null}else ue=null;P!==null&&Zg(G,z,P,ue,!1),ee!==null&&Ue!==null&&Zg(G,Ue,ee,ue,!0)}}e:{if(z=D?ja(D):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var Se=gd;else if(dd(z))if(md)Se=s_;else{Se=n_;var re=t_}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?D&&bu(D.elementType)&&(Se=gd):Se=r_;if(Se&&(Se=Se(t,D))){pd(G,Se,a,q);break e}re&&re(t,z,D),t==="focusout"&&D&&z.type==="number"&&D.memoizedProps.value!=null&&vu(z,"number",z.value)}switch(re=D?ja(D):window,t){case"focusin":(dd(re)||re.contentEditable==="true")&&(Cs=re,Uu=D,Ha=null);break;case"focusout":Ha=Uu=Cs=null;break;case"mousedown":Nu=!0;break;case"contextmenu":case"mouseup":case"dragend":Nu=!1,Td(G,a,q);break;case"selectionchange":if(i_)break;case"keydown":case"keyup":Td(G,a,q)}var de;if(ku)e:{switch(t){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else Os?hd(t,a)&&(be="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(be="onCompositionStart");be&&(ld&&a.locale!=="ko"&&(Os||be!=="onCompositionStart"?be==="onCompositionEnd"&&Os&&(de=rd()):(tr=q,Tu="value"in tr?tr.value:tr.textContent,Os=!0)),re=nl(D,be),0<re.length&&(be=new id(be,t,null,a,q),G.push({event:be,listeners:re}),de?be.data=de:(de=fd(a),de!==null&&(be.data=de)))),(de=J0?X0(t,a):Z0(t,a))&&(be=nl(D,"onBeforeInput"),0<be.length&&(re=new id("onBeforeInput","beforeinput",null,a,q),G.push({event:re,listeners:be}),re.data=de)),$_(G,t,D,a,q)}Jg(G,r)})}function hi(t,r,a){return{instance:t,listener:r,currentTarget:a}}function nl(t,r){for(var a=r+"Capture",o=[];t!==null;){var h=t,d=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||d===null||(h=Ma(t,a),h!=null&&o.unshift(hi(t,h,d)),h=Ma(t,r),h!=null&&o.push(hi(t,h,d))),t.tag===3)return o;t=t.return}return[]}function Y_(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Zg(t,r,a,o,h){for(var d=r._reactName,v=[];a!==null&&a!==o;){var w=a,C=w.alternate,D=w.stateNode;if(w=w.tag,C!==null&&C===o)break;w!==5&&w!==26&&w!==27||D===null||(C=D,h?(D=Ma(a,d),D!=null&&v.unshift(hi(a,D,C))):h||(D=Ma(a,d),D!=null&&v.push(hi(a,D,C)))),a=a.return}v.length!==0&&t.push({event:r,listeners:v})}var F_=/\r\n?/g,Q_=/\u0000|\uFFFD/g;function Wg(t){return(typeof t=="string"?t:""+t).replace(F_,` 10`).replace(Q_,"")}function em(t,r){return r=Wg(r),Wg(t)===r}function Me(t,r,a,o,h,d){switch(a){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||Ts(t,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&Ts(t,""+o);break;case"className":ao(t,"class",o);break;case"tabIndex":ao(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ao(t,a,o);break;case"style":ed(t,o,d);break;case"data":if(r!=="object"){ao(t,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=oo(""+o),t.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(a,"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"&&(a==="formAction"?(r!=="input"&&Me(t,r,"name",h.name,h,null),Me(t,r,"formEncType",h.formEncType,h,null),Me(t,r,"formMethod",h.formMethod,h,null),Me(t,r,"formTarget",h.formTarget,h,null)):(Me(t,r,"encType",h.encType,h,null),Me(t,r,"method",h.method,h,null),Me(t,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=oo(""+o),t.setAttribute(a,o);break;case"onClick":o!=null&&(t.onclick=An);break;case"onScroll":o!=null&&me("scroll",t);break;case"onScrollEnd":o!=null&&me("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(h.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}a=oo(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,""+o):t.removeAttribute(a);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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":o===!0?t.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,o):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(a,o):t.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(a):t.setAttribute(a,o);break;case"popover":me("beforetoggle",t),me("toggle",t),so(t,"popover",o);break;case"xlinkActuate":Rn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Rn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Rn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Rn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Rn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Rn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Rn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Rn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Rn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":so(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=E0.get(a)||a,so(t,a,o))}}function ah(t,r,a,o,h,d){switch(a){case"style":ed(t,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(h.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"children":typeof o=="string"?Ts(t,o):(typeof o=="number"||typeof o=="bigint")&&Ts(t,""+o);break;case"onScroll":o!=null&&me("scroll",t);break;case"onScrollEnd":o!=null&&me("scrollend",t);break;case"onClick":o!=null&&(t.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),r=a.slice(2,h?a.length-7:void 0),d=t[Et]||null,d=d!=null?d[a]:null,typeof d=="function"&&t.removeEventListener(r,d,h),typeof o=="function")){typeof d!="function"&&d!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,o,h);break e}a in t?t[a]=o:o===!0?t.setAttribute(a,""):so(t,a,o)}}}function gt(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":me("error",t),me("load",t);var o=!1,h=!1,d;for(d in a)if(a.hasOwnProperty(d)){var v=a[d];if(v!=null)switch(d){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Me(t,r,d,v,a,null)}}h&&Me(t,r,"srcSet",a.srcSet,a,null),o&&Me(t,r,"src",a.src,a,null);return;case"input":me("invalid",t);var w=d=v=h=null,C=null,D=null;for(o in a)if(a.hasOwnProperty(o)){var q=a[o];if(q!=null)switch(o){case"name":h=q;break;case"type":v=q;break;case"checked":C=q;break;case"defaultChecked":D=q;break;case"value":d=q;break;case"defaultValue":w=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(137,r));break;default:Me(t,r,o,q,a,null)}}Jf(t,d,w,C,D,v,h,!1);return;case"select":me("invalid",t),o=v=d=null;for(h in a)if(a.hasOwnProperty(h)&&(w=a[h],w!=null))switch(h){case"value":d=w;break;case"defaultValue":v=w;break;case"multiple":o=w;default:Me(t,r,h,w,a,null)}r=d,a=v,t.multiple=!!o,r!=null?Es(t,!!o,r,!1):a!=null&&Es(t,!!o,a,!0);return;case"textarea":me("invalid",t),d=h=o=null;for(v in a)if(a.hasOwnProperty(v)&&(w=a[v],w!=null))switch(v){case"value":o=w;break;case"defaultValue":h=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:Me(t,r,v,w,a,null)}Zf(t,o,h,d);return;case"option":for(C in a)a.hasOwnProperty(C)&&(o=a[C],o!=null)&&(C==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(t,r,C,o,a,null));return;case"dialog":me("beforetoggle",t),me("toggle",t),me("cancel",t),me("close",t);break;case"iframe":case"object":me("load",t);break;case"video":case"audio":for(o=0;o<ci.length;o++)me(ci[o],t);break;case"image":me("error",t),me("load",t);break;case"details":me("toggle",t);break;case"embed":case"source":case"link":me("error",t),me("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 a)if(a.hasOwnProperty(D)&&(o=a[D],o!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:Me(t,r,D,o,a,null)}return;default:if(bu(r)){for(q in a)a.hasOwnProperty(q)&&(o=a[q],o!==void 0&&ah(t,r,q,o,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(o=a[w],o!=null&&Me(t,r,w,o,a,null))}function J_(t,r,a,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,d=null,v=null,w=null,C=null,D=null,q=null;for(P in a){var G=a[P];if(a.hasOwnProperty(P)&&G!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":C=G;default:o.hasOwnProperty(P)||Me(t,r,P,null,o,G)}}for(var z in o){var P=o[z];if(G=a[z],o.hasOwnProperty(z)&&(P!=null||G!=null))switch(z){case"type":d=P;break;case"name":h=P;break;case"checked":D=P;break;case"defaultChecked":q=P;break;case"value":v=P;break;case"defaultValue":w=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(137,r));break;default:P!==G&&Me(t,r,z,P,o,G)}}yu(t,v,w,C,D,q,d,h);return;case"select":P=v=w=z=null;for(d in a)if(C=a[d],a.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":P=C;default:o.hasOwnProperty(d)||Me(t,r,d,null,o,C)}for(h in o)if(d=o[h],C=a[h],o.hasOwnProperty(h)&&(d!=null||C!=null))switch(h){case"value":z=d;break;case"defaultValue":w=d;break;case"multiple":v=d;default:d!==C&&Me(t,r,h,d,o,C)}r=w,a=v,o=P,z!=null?Es(t,!!a,z,!1):!!o!=!!a&&(r!=null?Es(t,!!a,r,!0):Es(t,!!a,a?[]:"",!1));return;case"textarea":P=z=null;for(w in a)if(h=a[w],a.hasOwnProperty(w)&&h!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Me(t,r,w,null,o,h)}for(v in o)if(h=o[v],d=a[v],o.hasOwnProperty(v)&&(h!=null||d!=null))switch(v){case"value":z=h;break;case"defaultValue":P=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==d&&Me(t,r,v,h,o,d)}Xf(t,z,P);return;case"option":for(var ee in a)z=a[ee],a.hasOwnProperty(ee)&&z!=null&&!o.hasOwnProperty(ee)&&(ee==="selected"?t.selected=!1:Me(t,r,ee,null,o,z));for(C in o)z=o[C],P=a[C],o.hasOwnProperty(C)&&z!==P&&(z!=null||P!=null)&&(C==="selected"?t.selected=z&&typeof z!="function"&&typeof z!="symbol":Me(t,r,C,z,o,P));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ue in a)z=a[ue],a.hasOwnProperty(ue)&&z!=null&&!o.hasOwnProperty(ue)&&Me(t,r,ue,null,o,z);for(D in o)if(z=o[D],P=a[D],o.hasOwnProperty(D)&&z!==P&&(z!=null||P!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(137,r));break;default:Me(t,r,D,z,o,P)}return;default:if(bu(r)){for(var Ue in a)z=a[Ue],a.hasOwnProperty(Ue)&&z!==void 0&&!o.hasOwnProperty(Ue)&&ah(t,r,Ue,void 0,o,z);for(q in o)z=o[q],P=a[q],!o.hasOwnProperty(q)||z===P||z===void 0&&P===void 0||ah(t,r,q,z,o,P);return}}for(var M in a)z=a[M],a.hasOwnProperty(M)&&z!=null&&!o.hasOwnProperty(M)&&Me(t,r,M,null,o,z);for(G in o)z=o[G],P=a[G],!o.hasOwnProperty(G)||z===P||z==null&&P==null||Me(t,r,G,z,o,P)}function tm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}
vendor: 9,883 bytes, line 10
10function X_(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var h=a[o],d=h.transferSize,v=h.initiatorType,w=h.duration;if(d&&w&&tm(v)){for(v=0,w=h.responseEnd,o+=1;o<a.length;o++){var C=a[o],D=C.startTime;if(D>w)break;var q=C.transferSize,G=C.initiatorType;q&&tm(G)&&(C=C.responseEnd,v+=q*(C<w?1:(w-D)/(C-D)))}if(--o,r+=8*(d+v)/(h.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var ih=null,oh=null;function rl(t){return t.nodeType===9?t:t.ownerDocument}function nm(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 rm(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function lh(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var uh=null;function Z_(){var t=window.event;return t&&t.type==="popstate"?t===uh?!1:(uh=t,!0):(uh=null,!1)}var sm=typeof setTimeout=="function"?setTimeout:void 0,W_=typeof clearTimeout=="function"?clearTimeout:void 0,am=typeof Promise=="function"?Promise:void 0,ew=typeof queueMicrotask=="function"?queueMicrotask:typeof am<"u"?function(t){return am.resolve(null).then(t).catch(tw)}:sm;function tw(t){setTimeout(function(){throw t})}function vr(t){return t==="head"}function im(t,r){var a=r,o=0;do{var h=a.nextSibling;if(t.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(o===0){t.removeChild(h),ta(r);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")fi(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,fi(a);for(var d=a.firstChild;d;){var v=d.nextSibling,w=d.nodeName;d[xa]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=v}}else a==="body"&&fi(t.ownerDocument.body);a=h}while(a);ta(r)}function om(t,r){var a=t;t=0;do{var o=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=o}while(a)}function ch(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ch(a),gu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function nw(t,r,a,o){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[xa])switch(r){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!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(d=t.getAttribute("src"),(d!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&d&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var d=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===d)return t}else return t;if(t=Zt(t.nextSibling),t===null)break}return null}function rw(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Zt(t.nextSibling),t===null))return null;return t}function lm(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Zt(t.nextSibling),t===null))return null;return t}function hh(t){return t.data==="$?"||t.data==="$~"}function fh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function sw(t,r){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||a.readyState!=="loading")r();else{var o=function(){r(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function Zt(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var dh=null;function um(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(r===0)return Zt(t.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}t=t.nextSibling}return null}function cm(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return t;r--}else a!=="/$"&&a!=="/&"||r++}t=t.previousSibling}return null}function hm(t,r,a){switch(r=rl(a),t){case"html":if(t=r.documentElement,!t)throw Error(i(452));return t;case"head":if(t=r.head,!t)throw Error(i(453));return t;case"body":if(t=r.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function fi(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);gu(t)}var Wt=new Map,fm=new Set;function sl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var In=Q.d;Q.d={f:aw,r:iw,D:ow,C:lw,L:uw,m:cw,X:fw,S:hw,M:dw};function aw(){var t=In.f(),r=Qo();return t||r}function iw(t){var r=_s(t);r!==null&&r.tag===5&&r.type==="form"?kp(r):In.r(t)}var Zs=typeof document>"u"?null:document;function dm(t,r,a){var o=Zs;if(o&&typeof r=="string"&&r){var h=Vt(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),fm.has(h)||(fm.add(h),t={rel:t,crossOrigin:a,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),gt(r,"link",t),it(r),o.head.appendChild(r)))}}function ow(t){In.D(t),dm("dns-prefetch",t,null)}function lw(t,r){In.C(t,r),dm("preconnect",t,r)}function uw(t,r,a){In.L(t,r,a);var o=Zs;if(o&&t&&r){var h='link[rel="preload"][as="'+Vt(r)+'"]';r==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Vt(a.imageSizes)+'"]')):h+='[href="'+Vt(t)+'"]';var d=h;switch(r){case"style":d=Ws(t);break;case"script":d=ea(t)}Wt.has(d)||(t=m({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),Wt.set(d,t),o.querySelector(h)!==null||r==="style"&&o.querySelector(di(d))||r==="script"&&o.querySelector(pi(d))||(r=o.createElement("link"),gt(r,"link",t),it(r),o.head.appendChild(r)))}}function cw(t,r){In.m(t,r);var a=Zs;if(a&&t){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Vt(o)+'"][href="'+Vt(t)+'"]',d=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ea(t)}if(!Wt.has(d)&&(t=m({rel:"modulepreload",href:t},r),Wt.set(d,t),a.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(pi(d)))return}o=a.createElement("link"),gt(o,"link",t),it(o),a.head.appendChild(o)}}}function hw(t,r,a){In.S(t,r,a);var o=Zs;if(o&&t){var h=ws(o).hoistableStyles,d=Ws(t);r=r||"default";var v=h.get(d);if(!v){var w={loading:0,preload:null};if(v=o.querySelector(di(d)))w.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},a),(a=Wt.get(d))&&ph(t,a);var C=v=o.createElement("link");it(C),gt(C,"link",t),C._p=new Promise(function(D,q){C.onload=D,C.onerror=q}),C.addEventListener("load",function(){w.loading|=1}),C.addEventListener("error",function(){w.loading|=2}),w.loading|=4,al(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:w},h.set(d,v)}}}function fw(t,r){In.X(t,r);var a=Zs;if(a&&t){var o=ws(a).hoistableScripts,h=ea(t),d=o.get(h);d||(d=a.querySelector(pi(h)),d||(t=m({src:t,async:!0},r),(r=Wt.get(h))&&gh(t,r),d=a.createElement("script"),it(d),gt(d,"link",t),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(h,d))}}function dw(t,r){In.M(t,r);var a=Zs;if(a&&t){var o=ws(a).hoistableScripts,h=ea(t),d=o.get(h);d||(d=a.querySelector(pi(h)),d||(t=m({src:t,async:!0,type:"module"},r),(r=Wt.get(h))&&gh(t,r),d=a.createElement("script"),it(d),gt(d,"link",t),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(h,d))}}function pm(t,r,a,o){var h=(h=pe.current)?sl(h):null;if(!h)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Ws(a.href),a=ws(h).hoistableStyles,o=a.get(r),o||(o={type:"style",instance:null,count:0,state:null},a.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Ws(a.href);var d=ws(h).hoistableStyles,v=d.get(t);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(t,v),(d=h.querySelector(di(t)))&&!d._p&&(v.instance=d,v.state.loading=5),Wt.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Wt.set(t,a),d||pw(h,t,a,v.state))),r&&o===null)throw Error(i(528,""));return v}if(r&&o!==null)throw Error(i(529,""));return null;
vendor: 1,645 bytes, line 10
10case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=ea(a),a=ws(h).hoistableScripts,o=a.get(r),o||(o={type:"script",instance:null,count:0,state:null},a.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function Ws(t){return'href="'+Vt(t)+'"'}function di(t){return'link[rel="stylesheet"]['+t+"]"}function gm(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function pw(t,r,a,o){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=t.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),gt(r,"link",a),it(r),t.head.appendChild(r))}function ea(t){return'[src="'+Vt(t)+'"]'}function pi(t){return"script[async]"+t}function mm(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var o=t.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(o)return r.instance=o,it(o),o;var h=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),it(o),gt(o,"style",h),al(o,a.precedence,t),r.instance=o;case"stylesheet":h=Ws(a.href);var d=t.querySelector(di(h));if(d)return r.state.loading|=4,r.instance=d,it(d),d;o=gm(a),(h=Wt.get(h))&&ph(o,h),d=(t.ownerDocument||t).createElement("link"),it(d);var v=d;return v._p=new Promise(function(w,C){v.onload=w,v.onerror=C}),gt(d,"link",o),r.state.loading|=4,al(d,a.precedence,t),r.instance=d;case"script":return d=ea(a.src),(h=t.querySelector(pi(d)))?(r.instance=h,it(h),h):(o=a,(h=Wt.get(d))&&
vendor: 4,470 bytes, line 10
10(o=m({},a),gh(o,h)),t=t.ownerDocument||t,h=t.createElement("script"),it(h),gt(h,"link",o),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,al(o,a.precedence,t));return r.instance}function al(t,r,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,d=h,v=0;v<o.length;v++){var w=o[v];if(w.dataset.precedence===r)d=w;else if(d!==h)break}d?d.parentNode.insertBefore(t,d.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function ph(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function gh(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var il=null;function ym(t,r,a){if(il===null){var o=new Map,h=il=new Map;h.set(a,o)}else h=il,o=h.get(a),o||(o=new Map,h.set(a,o));if(o.has(t))return o;for(o.set(t,null),a=a.getElementsByTagName(t),h=0;h<a.length;h++){var d=a[h];if(!(d[xa]||d[ht]||t==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(r)||"";v=t+v;var w=o.get(v);w?w.push(d):o.set(v,[d])}}return o}function vm(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function gw(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function bm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function mw(t,r,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=Ws(o.href),d=r.querySelector(di(h));if(d){r=d._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=ol.bind(t),r.then(t,t)),a.state.loading|=4,a.instance=d,it(d);return}d=r.ownerDocument||r,o=gm(o),(h=Wt.get(h))&&ph(o,h),d=d.createElement("link"),it(d);var v=d;v._p=new Promise(function(w,C){v.onload=w,v.onerror=C}),gt(d,"link",o),a.instance=d}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ol.bind(t),r.addEventListener("load",a),r.addEventListener("error",a))}}var mh=0;function yw(t,r){return t.stylesheets&&t.count===0&&ul(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var o=setTimeout(function(){if(t.stylesheets&&ul(t,t.stylesheets),t.unsuspend){var d=t.unsuspend;t.unsuspend=null,d()}},6e4+r);0<t.imgBytes&&mh===0&&(mh=62500*X_());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ul(t,t.stylesheets),t.unsuspend)){var d=t.unsuspend;t.unsuspend=null,d()}},(t.imgBytes>mh?50:800)+r);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function ol(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ul(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ll=null;function ul(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ll=new Map,r.forEach(vw,t),ll=null,ol.call(t))}function vw(t,r){if(!(r.state.loading&4)){var a=ll.get(t);if(a)var o=a.get(null);else{a=new Map,ll.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<h.length;d++){var v=h[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),o=v)}o&&a.set(null,o)}h=r.instance,v=h.getAttribute("data-precedence"),d=a.get(v)||o,d===o&&a.set(null,h),a.set(v,h),this.count++,o=ol.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),d?d.parentNode.insertBefore(h,d.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var gi={$$typeof:j,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};
vendor: 9,094 bytes, line 10
10function bw(t,r,a,o,h,d,v,w,C){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=hu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hu(0),this.hiddenUpdates=hu(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function _m(t,r,a,o,h,d,v,w,C,D,q,G){return t=new bw(t,r,a,v,C,D,q,G,w),r=1,d===!0&&(r|=24),d=zt(3,null,null,r),t.current=d,d.stateNode=t,r=Qu(),r.refCount++,t.pooledCache=r,r.refCount++,d.memoizedState={element:o,isDehydrated:a,cache:r},Wu(d),t}function wm(t){return t?(t=js,t):js}function Sm(t,r,a,o,h,d){h=wm(h),o.context===null?o.context=h:o.pendingContext=h,o=or(r),o.payload={element:a},d=d===void 0?null:d,d!==null&&(o.callback=d),a=lr(t,o,r),a!==null&&(kt(a,t,r),Ya(a,t,r))}function Em(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function yh(t,r){Em(t,r),(t=t.alternate)&&Em(t,r)}function Tm(t){if(t.tag===13||t.tag===31){var r=$r(t,67108864);r!==null&&kt(r,t,67108864),yh(t,67108864)}}function Rm(t){if(t.tag===13||t.tag===31){var r=It();r=fu(r);var a=$r(t,r);a!==null&&kt(a,t,r),yh(t,r)}}var cl=!0;function _w(t,r,a,o){var h=B.T;B.T=null;var d=Q.p;try{Q.p=2,vh(t,r,a,o)}finally{Q.p=d,B.T=h}}function ww(t,r,a,o){var h=B.T;B.T=null;var d=Q.p;try{Q.p=8,vh(t,r,a,o)}finally{Q.p=d,B.T=h}}function vh(t,r,a,o){if(cl){var h=bh(o);if(h===null)sh(t,r,o,hl,a),Om(t,o);else if(Ew(h,t,r,a,o))o.stopPropagation();else if(Om(t,o),r&4&&-1<Sw.indexOf(t)){for(;h!==null;){var d=_s(h);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=Pr(d.pendingLanes);if(v!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var C=1<<31-Lt(v);w.entanglements[1]|=C,v&=~C}mn(d),(Ae&6)===0&&(Yo=bt()+500,ui(0))}}break;case 31:case 13:w=$r(d,2),w!==null&&kt(w,d,2),Qo(),yh(d,2)}if(d=bh(o),d===null&&sh(t,r,o,hl,a),d===h)break;h=d}h!==null&&o.stopPropagation()}else sh(t,r,o,null,a)}}function bh(t){return t=wu(t),_h(t)}var hl=null;function _h(t){if(hl=null,t=bs(t),t!==null){var r=u(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=c(r),t!==null)return t;t=null}else if(a===31){if(t=f(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return hl=t,null}function Am(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(ze()){case ct:return 2;case fn:return 8;case ys:case l0:return 32;case Df:return 268435456;default:return 32}default:return 32}}var wh=!1,br=null,_r=null,wr=null,mi=new Map,yi=new Map,Sr=[],Sw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Om(t,r){switch(t){case"focusin":case"focusout":br=null;break;case"dragenter":case"dragleave":_r=null;break;case"mouseover":case"mouseout":wr=null;break;case"pointerover":case"pointerout":mi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":yi.delete(r.pointerId)}}function vi(t,r,a,o,h,d){return t===null||t.nativeEvent!==d?(t={blockedOn:r,domEventName:a,eventSystemFlags:o,nativeEvent:d,targetContainers:[h]},r!==null&&(r=_s(r),r!==null&&Tm(r)),t):(t.eventSystemFlags|=o,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function Ew(t,r,a,o,h){switch(r){case"focusin":return br=vi(br,t,r,a,o,h),!0;case"dragenter":return _r=vi(_r,t,r,a,o,h),!0;case"mouseover":return wr=vi(wr,t,r,a,o,h),!0;case"pointerover":var d=h.pointerId;return mi.set(d,vi(mi.get(d)||null,t,r,a,o,h)),!0;case"gotpointercapture":return d=h.pointerId,yi.set(d,vi(yi.get(d)||null,t,r,a,o,h)),!0}return!1}function Cm(t){var r=bs(t.target);if(r!==null){var a=u(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){t.blockedOn=r,If(t.priority,function(){Rm(a)});return}}else if(r===31){if(r=f(a),r!==null){t.blockedOn=r,If(t.priority,function(){Rm(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function fl(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=bh(t.nativeEvent);if(a===null){a=t.nativeEvent;var o=new a.constructor(a.type,a);_u=o,a.target.dispatchEvent(o),_u=null}else return r=_s(a),r!==null&&Tm(r),t.blockedOn=a,!1;r.shift()}return!0}function km(t,r,a){fl(t)&&a.delete(r)}function Tw(){wh=!1,br!==null&&fl(br)&&(br=null),_r!==null&&fl(_r)&&(_r=null),wr!==null&&fl(wr)&&(wr=null),mi.forEach(km),yi.forEach(km)}function dl(t,r){t.blockedOn===r&&(t.blockedOn=null,wh||(wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Tw)))}var pl=null;function xm(t){pl!==t&&(pl=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){pl===t&&(pl=null);for(var r=0;r<t.length;r+=3){var a=t[r],o=t[r+1],h=t[r+2];if(typeof o!="function"){if(_h(o||a)===null)continue;break}var d=_s(a);d!==null&&(t.splice(r,3),r-=3,bc(d,{pending:!0,data:h,method:a.method,action:o},o,h))}}))}function ta(t){function r(C){return dl(C,t)}br!==null&&dl(br,t),_r!==null&&dl(_r,t),wr!==null&&dl(wr,t),mi.forEach(r),yi.forEach(r);for(var a=0;a<Sr.length;a++){var o=Sr[a];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Sr.length&&(a=Sr[0],a.blockedOn===null);)Cm(a),a.blockedOn===null&&Sr.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var h=a[o],d=a[o+1],v=h[Et]||null;if(typeof d=="function")v||xm(a);else if(v){var w=null;if(d&&d.hasAttribute("formAction")){if(h=d,v=d[Et]||null)w=v.formAction;else if(_h(h)!==null)continue}else w=v.action;typeof w=="function"?a[o+1]=w:(a.splice(o,3),o-=3),xm(a)}}}function jm(){function t(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(a,20)}function a(){if(!o&&!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 o=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function Sh(t){this._internalRoot=t}gl.prototype.render=Sh.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(i(409));var a=r.current,o=It();Sm(a,o,t,r,null,null)},gl.prototype.unmount=Sh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Sm(t.current,2,null,t,null,null),Qo(),r[vs]=null}};function gl(t){this._internalRoot=t}gl.prototype.unstable_scheduleHydration=function(t){if(t){var r=qf();t={blockedOn:null,target:t,priority:r};for(var a=0;a<Sr.length&&r!==0&&r<Sr[a].priority;a++);Sr.splice(a,0,t),a===0&&Cm(t)}};var Mm=n.version;if(Mm!=="19.2.5")throw Error(i(527,Mm,"19.2.5"));Q.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=g(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var Rw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ml.isDisabled&&ml.supportsFiber)try{Oa=ml.inject(Rw),Nt=ml}catch{}}return _i.createRoot=function(t,r){if(!l(t))throw Error(i(299));var a=!1,o="",h=Bp,d=Hp,v=qp;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(d=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=_m(t,1,!1,null,null,a,o,null,h,d,v,jm),t[vs]=r.current,rh(t),new Sh(r)},_i.hydrateRoot=function(t,r,a){if(!l(t))throw Error(i(299));var o=!1,h="",d=Bp,v=Hp,w=qp,C=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),r=_m(t,1,!0,r,a??null,o,h,C,d,v,w,jm),r.context=wm(null),a=r.current,o=It(),o=fu(o),h=or(o),h.callback=null,lr(a,h,o),a=o,r.current.lanes=a,ka(r,a),mn(r),t[vs]=r.current,rh(t),new gl(r)},_i.version="19.2.5",_i}var Im;function Lw(){if(Im)return Rh.exports;Im=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(),Rh.exports=Nw(),Rh.exports}var Dw=Lw(),zw="__TSS_CONTEXT",Fh=Symbol.for("TSS_SERVER_FUNCTION"),px=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),Pw="application/x-tss-framed",$n={JSON:0,CHUNK:1,END:2,ERROR:3},Bw=/;\s*v=(\d+)/;function Hw(e){const n=e.match(Bw);return n?parseInt(n[1],10):void 0}function qw(e){const n=Hw(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 Ev=()=>window.__TSS_START_OPTIONS__,Tv=!1;function Ni(e){return e[e.length-1]}function Iw(e){return typeof e=="function"}function Cr(e,n){return Iw(e)?e(n):e}var $w=Object.prototype.hasOwnProperty,$m=Object.prototype.propertyIsEnumerable,Gw=()=>Object.create(null),ns=(e,n)=>is(e,n,Gw);function is(e,n,s=()=>({}),i=0){if(e===n)return e;if(i>500)return n;const l=n,u=Km(e)&&Km(l);if(!u&&!(_a(e)&&_a(l)))return l;const c=u?e:Gm(e);if(!c)return l;const f=u?l:Gm(l);if(!f)return l;const p=c.length,g=f.length,y=u?new Array(g):s();let m=0;for(let b=0;b<g;b++){const _=u?b:f[b],S=e[_],O=l[_];if(S===O){y[_]=S,(u?b<p:$w.call(e,_))&&m++;continue}if(S===null||O===null||typeof S!="object"||typeof O!="object"){y[_]=O;continue}const E=is(S,O,s,i+1);y[_]=E,E===S&&m++}return p===g&&m===p?e:y}function Gm(e){const n=Object.getOwnPropertyNames(e);for(const l of n)if(!$m.call(e,l))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return n;const i=n;for(const l of s){if(!$m.call(e,l))return!1;i.push(l)}return i}function _a(e){if(!Vm(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const s=n.prototype;return!(!Vm(s)||!s.hasOwnProperty("isPrototypeOf"))}function Vm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Km(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jt(e,n,s){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 i=0,l=e.length;i<l;i++)if(!jt(e[i],n[i],s))return!1;return!0}if(_a(e)&&_a(n)){const i=s?.ignoreUndefined??!0;if(s?.partial){for(const c in n)if((!i||n[c]!==void 0)&&!jt(e[c],n[c],s))return!1;return!0}let l=0;if(!i)l=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&l++;let u=0;for(const c in n)if((!i||n[c]!==void 0)&&(u++,u>l||!jt(e[c],n[c],s)))return!1;return l===u}return!1}function ds(e){let n,s;const i=new Promise((l,u)=>{n=l,s=u});return i.status="pending",i.resolve=l=>{i.status="resolved",i.value=l,n(l),e?.(l)},i.reject=l=>{i.status="rejected",s(l)},i}function Vw(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 Li(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Kw(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Ym(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return Kw(n)}var Yw=["http:","https:","mailto:","tel:"];function zl(e,n){if(!e)return!1;try{const s=new URL(e);return!n.has(s.protocol)}catch{return!1}}var Fw={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Qw=/[&><\u2028\u2029]/g;function Jw(e){return e.replace(Qw,n=>Fw[n])}function wi(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 s=0,i="",l;for(;(l=n.exec(e))!==null;)i+=Ym(e.slice(s,l.index))+l[0],s=n.lastIndex;i=i+Ym(s?e.slice(s):e);let u=!1;return i.startsWith("//")&&(u=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:u}}function Xw(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Zw(e,n){if(e===n)return!0;
10if(e.length!==n.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==n[s])return!1;return!0}function Ut(){throw new Error("Invariant failed")}function Di(e){const n=new Map;let s,i;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,i&&(i.next=u,u.prev=i)):(u.next.prev=void 0,s=u.next,u.next=void 0,i&&(u.prev=i,i.next=u)),i=u)};return{get(u){const c=n.get(u);if(c)return l(c),c.value},set(u,c){if(n.size>=e&&s){const p=s;n.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===i&&(i=void 0)}const f=n.get(u);if(f)f.value=c,l(f);else{const p={key:u,value:c,prev:i};i&&(i.next=p),i=p,s||(s=p),n.set(u,p)}},clear(){n.clear(),s=void 0,i=void 0}}}var kr=4,Rv=5;function Ww(e){const n=e.indexOf("{");if(n===-1)return null;const s=e.indexOf("}",n);return s===-1||n+1>=e.length?null:[n,s]}function wf(e,n,s=new Uint16Array(6)){const i=e.indexOf("/",n),l=i===-1?e.length:i,u=e.substring(n,l);if(!u||!u.includes("$"))return s[0]=0,s[1]=n,s[2]=n,s[3]=l,s[4]=l,s[5]=l,s;if(u==="$"){const f=e.length;return s[0]=2,s[1]=n,s[2]=n,s[3]=f,s[4]=f,s[5]=f,s}if(u.charCodeAt(0)===36)return s[0]=1,s[1]=n,s[2]=n+1,s[3]=l,s[4]=l,s[5]=l,s;const c=Ww(u);if(c){const[f,p]=c,g=u.charCodeAt(f+1);if(g===45){if(f+2<u.length&&u.charCodeAt(f+2)===36){const y=f+3,m=p;if(y<m)return s[0]=3,s[1]=n+f,s[2]=n+y,s[3]=n+m,s[4]=n+p+1,s[5]=l,s}}else if(g===36){const y=f+1,m=f+2;return m===p?(s[0]=2,s[1]=n+f,s[2]=n+y,s[3]=n+m,s[4]=n+p+1,s[5]=e.length,s):(s[0]=1,s[1]=n+f,s[2]=n+m,s[3]=n+p,s[4]=n+p+1,s[5]=l,s)}}return s[0]=0,s[1]=n,s[2]=n,s[3]=l,s[4]=l,s[5]=l,s}function Xl(e,n,s,i,l,u,c){c?.(s);let f=i;{const p=s.fullPath??s.from,g=p.length,y=s.options?.caseSensitive??e,m=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;f<g;){const _=wf(p,f,n);let S;const O=f,E=_[5];switch(f=E+1,u++,_[0]){case 0:{const A=p.substring(_[2],_[3]);if(y){const U=l.static?.get(A);if(U)S=U;else{l.static??=new Map;const j=os(s.fullPath??s.from);j.parent=l,j.depth=u,S=j,l.static.set(A,j)}}else{const U=A.toLowerCase(),j=l.staticInsensitive?.get(U);if(j)S=j;else{l.staticInsensitive??=new Map;const L=os(s.fullPath??s.from);L.parent=l,L.depth=u,S=L,l.staticInsensitive.set(U,L)}}break}case 1:{const A=p.substring(O,_[1]),U=p.substring(_[4],E),j=y&&!!(A||U),L=A?j?A:A.toLowerCase():void 0,F=U?j?U:U.toLowerCase():void 0,V=!m&&l.dynamic?.find(H=>!H.skipOnParamError&&H.caseSensitive===j&&H.prefix===L&&H.suffix===F);if(V)S=V;else{const H=xh(1,s.fullPath??s.from,j,L,F);S=H,H.depth=u,H.parent=l,l.dynamic??=[],l.dynamic.push(H)}break}case 3:{const A=p.substring(O,_[1]),U=p.substring(_[4],E),j=y&&!!(A||U),L=A?j?A:A.toLowerCase():void 0,F=U?j?U:U.toLowerCase():void 0,V=!m&&l.optional?.find(H=>!H.skipOnParamError&&H.caseSensitive===j&&H.prefix===L&&H.suffix===F);if(V)S=V;else{const H=xh(3,s.fullPath??s.from,j,L,F);S=H,H.parent=l,H.depth=u,l.optional??=[],l.optional.push(H)}break}case 2:{const A=p.substring(O,_[1]),U=p.substring(_[4],E),j=y&&!!(A||U),L=A?j?A:A.toLowerCase():void 0,F=U?j?U:U.toLowerCase():void 0,V=xh(2,s.fullPath??s.from,j,L,F);S=V,V.parent=l,V.depth=u,l.wildcard??=[],l.wildcard.push(V)}}l=S}if(m&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=os(s.fullPath??s.from);_.kind=Rv,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=os(s.fullPath??s.from);_.kind=kr,_.parent=l,u++,_.depth=u,l.index=_,l=_}l.parse=s.options?.params?.parse??null,l.skipOnParamError=m,l.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,b&&!l.route&&(l.route=s,l.fullPath=s.fullPath??s.from)}if(s.children)for(const p of s.children)Xl(e,n,p,f,l,u,c)}function kh(e,n){if(e.skipOnParamError&&!n.skipOnParamError)return-1;if(!e.skipOnParamError&&n.skipOnParamError)return 1;if(e.skipOnParamError&&n.skipOnParamError&&(e.parsingPriority||n.parsingPriority))return n.parsingPriority-e.parsingPriority;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 Tr(e){if(e.pathless)for(const n of e.pathless)Tr(n);if(e.static)for(const n of e.static.values())Tr(n);if(e.staticInsensitive)for(const n of e.staticInsensitive.values())Tr(n);if(e.dynamic?.length){e.dynamic.sort(kh);for(const n of e.dynamic)Tr(n)}if(e.optional?.length){e.optional.sort(kh);for(const n of e.optional)Tr(n)}if(e.wildcard?.length){e.wildcard.sort(kh);for(const n of e.wildcard)Tr(n)}}function os(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,skipOnParamError:!1,parsingPriority:0}}function xh(e,n,s,i,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,skipOnParamError:!1,parsingPriority:0,caseSensitive:s,prefix:i,suffix:l}}function eS(e,n){const s=os("/"),i=new Uint16Array(6);for(const l of e)Xl(!1,i,l,1,s,0);Tr(s),n.masksTree=s,n.flatCache=Di(1e3)}function tS(e,n){e||="/";const s=n.flatCache.get(e);if(s)return s;const i=Sf(e,n.masksTree);return n.flatCache.set(e,i),i}function nS(e,n,s,i,l){e||="/",i||="/";const u=n?`case\0${e}`:e;let c=l.singleCache.get(u);return c||(c=os("/"),Xl(n,new Uint16Array(6),{from:e},1,c,0),l.singleCache.set(u,c)),Sf(i,c,s)}function rS(e,n,s=!1){const i=s?e:`nofuzz\0${e}`,l=n.matchCache.get(i);if(l!==void 0)return l;e||="/";let u;try{u=Sf(e,n.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=iS(u.route)),n.matchCache.set(i,u),u}function sS(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function aS(e,n=!1,s){const i=os(e.fullPath),l=new Uint16Array(6),u={},c={};let f=0;return Xl(n,l,e,1,i,0,p=>{if(s?.(p,f),p.id in u&&Ut(),u[p.id]=p,f!==0&&p.path){const g=sS(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}f++}),Tr(i),{processedTree:{segmentTree:i,singleCache:Di(1e3),matchCache:Di(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function Sf(e,n,s=!1){const i=e.split("/"),l=lS(e,i,n,s);if(!l)return null;const[u]=Av(e,i,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function Av(e,n,s){const i=oS(s.node);let l=null;const u=Object.create(null);let c=s.extract?.part??0,f=s.extract?.node??0,p=s.extract?.path??0,g=s.extract?.segment??0;for(;f<i.length;c++,f++,p++,g++){const y=i[f];if(y.kind===kr)break;if(y.kind===Rv){g--,c--,p--;continue}const m=n[c],b=p;if(m&&(p+=m.length),y.kind===1){l??=s.node.fullPath.split("/");const _=l[g],S=y.prefix?.length??0;if(_.charCodeAt(S)===123){const O=y.suffix?.length??0,E=_.substring(S+2,_.length-O-1),A=m.substring(S,m.length-O);u[E]=decodeURIComponent(A)}else{const O=_.substring(1);u[O]=decodeURIComponent(m)}}else if(y.kind===3){if(s.skipped&1<<f){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[g],S=y.prefix?.length??0,O=y.suffix?.length??0,E=_.substring(S+3,_.length-O-1),A=y.suffix||y.prefix?m.substring(S,m.length-O):m;A&&(u[E]=decodeURIComponent(A))}else if(y.kind===2){const _=y,S=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),O=decodeURIComponent(S);u["*"]=O,u._splat=O;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:f,path:p,segment:g}]}function iS(e){const n=[e];for(;e.parentRoute;)e=e.parentRoute,n.push(e);return n.reverse(),n}function oS(e){const n=Array(e.depth+1);do n[e.depth]=e,e=e.parent;while(e);return n}function lS(e,n,s,i){if(e==="/"&&s.index)return{node:s.index,skipped:0};const l=!Ni(n),u=l&&e!=="/",c=n.length-(l?1:0),f=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;f.length;){const y=f.pop(),{node:m,index:b,skipped:_,depth:S,statics:O,dynamics:E,optionals:A}=y;let{extract:U,rawParams:j,parsedParams:L}=y;if(m.kind===2&&m.route&&!vl(g,y))continue;if(m.skipOnParamError){if(!Fm(e,n,y))continue;j=y.rawParams,U=y.extract,L=y.parsedParams}i&&m.route&&m.kind!==kr&&vl(p,y)&&(p=y);const F=b===c;if(F&&(m.route&&(!u||m.kind===kr||m.kind===2)&&vl(g,y)&&(g=y),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const V=F?void 0:n[b];let H;if(F&&m.index){const K={node:m.index,index:b,skipped:_,depth:S+1,statics:O,dynamics:E,optionals:A,extract:U,rawParams:j,parsedParams:L};let J=!0;if(m.index.skipOnParamError&&(Fm(e,n,K)||(J=!1)),J){if(!E&&!A&&!_&&uS(O,c)
10)return K;vl(g,K)&&(g=K)}}if(m.wildcard)for(let K=m.wildcard.length-1;K>=0;K--){const J=m.wildcard[K],{prefix:ae,suffix:ne}=J;if(!(ae&&(F||!(J.caseSensitive?V:H??=V.toLowerCase()).startsWith(ae)))){if(ne){if(F)continue;const ye=n.slice(b).join("/").slice(-ne.length);if((J.caseSensitive?ye:ye.toLowerCase())!==ne)continue}f.push({node:J,index:c,skipped:_,depth:S+1,statics:O,dynamics:E,optionals:A,extract:U,rawParams:j,parsedParams:L})}}if(m.optional){const K=_|1<<S,J=S+1;for(let ae=m.optional.length-1;ae>=0;ae--){const ne=m.optional[ae];f.push({node:ne,index:b,skipped:K,depth:J,statics:O,dynamics:E,optionals:A,extract:U,rawParams:j,parsedParams:L})}if(!F)for(let ae=m.optional.length-1;ae>=0;ae--){const ne=m.optional[ae],{prefix:ye,suffix:Ce}=ne;if(ye||Ce){const Ye=ne.caseSensitive?V:H??=V.toLowerCase();if(ye&&!Ye.startsWith(ye)||Ce&&!Ye.endsWith(Ce))continue}f.push({node:ne,index:b+1,skipped:_,depth:J,statics:O,dynamics:E,optionals:A+yl(c,b),extract:U,rawParams:j,parsedParams:L})}}if(!F&&m.dynamic&&V)for(let K=m.dynamic.length-1;K>=0;K--){const J=m.dynamic[K],{prefix:ae,suffix:ne}=J;if(ae||ne){const ye=J.caseSensitive?V:H??=V.toLowerCase();if(ae&&!ye.startsWith(ae)||ne&&!ye.endsWith(ne))continue}f.push({node:J,index:b+1,skipped:_,depth:S+1,statics:O,dynamics:E+yl(c,b),optionals:A,extract:U,rawParams:j,parsedParams:L})}if(!F&&m.staticInsensitive){const K=m.staticInsensitive.get(H??=V.toLowerCase());K&&f.push({node:K,index:b+1,skipped:_,depth:S+1,statics:O+yl(c,b),dynamics:E,optionals:A,extract:U,rawParams:j,parsedParams:L})}if(!F&&m.static){const K=m.static.get(V);K&&f.push({node:K,index:b+1,skipped:_,depth:S+1,statics:O+yl(c,b),dynamics:E,optionals:A,extract:U,rawParams:j,parsedParams:L})}if(m.pathless){const K=S+1;for(let J=m.pathless.length-1;J>=0;J--){const ae=m.pathless[J];f.push({node:ae,index:b,skipped:_,depth:K,statics:O,dynamics:E,optionals:A,extract:U,rawParams:j,parsedParams:L})}}}if(g)return g;if(i&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=n[b].length;const m=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(m),p}return null}function yl(e,n){return 2**(e-n-1)}function uS(e,n){return e===2**(n-1)-1}function Fm(e,n,s){try{const[i,l]=Av(e,n,s);s.rawParams=i,s.extract=l;const u=s.node.parse(i);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,u),!0}catch{return null}}function vl(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===kr)>(e.node.kind===kr)||n.node.kind===kr==(e.node.kind===kr)&&n.depth>e.depth))):!0}function jl(e){return Ef(e.filter(n=>n!==void 0).join("/"))}function Ef(e){return e.replace(/\/{2,}/g,"/")}function Ov(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function jr(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function Cv(e){return jr(Ov(e))}function Pl(e,n){return e?.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function cS(e,n,s){return Pl(e,s)===Pl(n,s)}function hS({base:e,to:n,trailingSlash:s="never",cache:i}){const l=n.startsWith("/"),u=!l&&n===".";let c;if(i){c=l?n:u?e:e+"\0"+n;const m=i.get(c);if(m)return m}let f;if(u)f=e.split("/");else if(l)f=n.split("/");else{for(f=e.split("/");f.length>1&&Ni(f)==="";)f.pop();const m=n.split("/");for(let b=0,_=m.length;b<_;b++){const S=m[b];S===""?b?b===_-1&&f.push(S):f=[S]:S===".."?f.pop():S==="."||f.push(S)}}f.length>1&&(Ni(f)===""?s==="never"&&f.pop():s==="always"&&f.push(""));let p,g="";for(let m=0;m<f.length;m++){m>0&&(g+="/");const b=f[m];if(!b)continue;p=wf(b,0,p);const _=p[0];if(_===0){g+=b;continue}const S=p[5],O=b.substring(0,p[1]),E=b.substring(p[4],S),A=b.substring(p[2],p[3]);_===1?g+=O||E?`${O}{$${A}}${E}`:`$${A}`:_===2?g+=O||E?`${O}{$}${E}`:"$":g+=`${O}{-$${A}}${E}`}g=Ef(g);const y=g||"/";return c&&i&&i.set(c,y),y}function fS(e){const n=new Map(e.map(l=>[encodeURIComponent(l),l])),s=Array.from(n.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(s,"g");return l=>l.replace(i,u=>n.get(u)??u)}function jh(e,n,s){const i=n[e];
10return typeof i!="string"?i:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(l=>Jm(l,s)).join("/"):Jm(i,s)}function Qm({path:e,params:n,decoder:s,...i}){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 c=e.length;let f=0,p,g="";for(;f<c;){const y=f;p=wf(e,y,p);const m=p[5];if(f=m+1,y===m)continue;const b=p[0];if(b===0){g+="/"+e.substring(y,m);continue}if(b===2){const _=n._splat;u._splat=_,u["*"]=_;const S=e.substring(y,p[1]),O=e.substring(p[4],m);if(!_){l=!0,(S||O)&&(g+="/"+S+O);continue}const E=jh("_splat",n,s);g+="/"+S+E+O;continue}if(b===1){const _=e.substring(p[2],p[3]);!l&&!(_ in n)&&(l=!0),u[_]=n[_];const S=e.substring(y,p[1]),O=e.substring(p[4],m),E=jh(_,n,s)??"undefined";g+="/"+S+E+O;continue}if(b===3){const _=e.substring(p[2],p[3]),S=n[_];if(S==null)continue;u[_]=S;const O=e.substring(y,p[1]),E=e.substring(p[4],m),A=jh(_,n,s)??"";g+="/"+O+A+E;continue}}return e.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:l}}function Jm(e,n){const s=encodeURIComponent(e);return n?.(s)??s}function ut(e){return e?.isNotFound===!0}function dS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var pS="tsr-scroll-restoration-v1_3";function gS(){const e=dS();if(!e)return null;let n={};try{const i=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");_a(i)&&(n=i)}catch{}return{get state(){return n},set:i=>{n=Cr(i,n)||n},persist:()=>{try{e.setItem(pS,JSON.stringify(n))}catch{}}}}var Xm=gS(),mS=e=>e.state.__TSR_key||e.href;function yS(e){const n=[];let s;for(;s=e.parentNode;)n.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${n.reverse().join(" > ")}`.toLowerCase()}var bl=!1,Si="window",Zm="data-scroll-restoration-id";function vS(e,n){if(!Xm)return;const s=Xm;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,bl=!1;const i=e.options.getScrollRestorationKey||mS,l=new Map;window.history.scrollRestoration="manual";const u=f=>{if(!(bl||!e.isScrollRestoring))if(f.target===document||f.target===window)l.set(Si,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=f.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=f=>{if(!e.isScrollRestoring||!f||l.size===0||!s)return;const p=s.state[f]||={};for(const[g,y]of l){let m;if(g===Si)m=Si;else if(g.isConnected){const b=g.getAttribute(Zm);m=b?`[${Zm}="${b}"]`:yS(g)}m&&(p[m]=y)}};document.addEventListener("scroll",u,!0),e.subscribe("onBeforeLoad",f=>{c(f.fromLocation?i(f.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",f=>{const p=i(f.toLocation),g=e.options.scrollRestorationBehavior,y=e.options.scrollToTopSelectors;if(l.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){bl=!0;try{const m=e.isScrollRestoring?s.state[p]:void 0;let b=!1;if(m)for(const _ in m){const S=m[_];if(!_a(S))continue;const{scrollX:O,scrollY:E}=S;if(!(!Number.isFinite(O)||!Number.isFinite(E))){if(_===Si)window.scrollTo({top:E,left:O,behavior:g}),b=!0;else if(_){let A;try{A=document.querySelector(_)}catch{continue}A&&(A.scrollLeft=O,A.scrollTop=E,b=!0)}}}if(!b){const _=e.history.location.hash.slice(1);if(_){const S=window.history.state?.__hashScrollIntoViewOptions??!0;if(S){const O=document.getElementById(_);O&&O.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:g};if(window.scrollTo(S),y)for(const O of y){if(O===Si)continue;const E=typeof O=="function"?O():document.querySelector(O);E&&E.scrollTo(S)}}}}finally{bl=!1}e.isScrollRestoring&&s.set(m=>(m[p]||={},m))}})}function kv(e,n=String){const s=new URLSearchParams;for(const i in e){const l=e[i];l!==void 0&&s.set(i,n(l))}return s.toString()}function Mh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function bS(e){const n=new URLSearchParams(e),s=Object.create(null);for(const[i,l]of n.entries()){const u=s[i];u==null?s[i]=Mh(l):Array.isArray(u)?u.push(Mh(l)):s[i]=[u,Mh(l)]}return s}var _S=SS(JSON.parse),wS=ES(JSON.stringify,JSON.parse);function SS(e){return n=>{n[0]==="?"&&(n=n.substring(1));const s=bS(n);for(const i in s){const l=s[i];if(typeof l=="string")try{s[i]=e(l)}catch{}}return s}}function ES(e,n){const s=typeof n=="function";function i(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(s&&typeof l=="string")try{return n(l),e(l)}catch{}return l}return l=>
10{const u=kv(l,i);return u?`?${u}`:""}}var hs="__root__";function Qi(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 s=new Response(null,{status:e.statusCode,headers:n});if(s.options=e,e.throw)throw s;return s}function Mt(e){return e instanceof Response&&!!e.options}function TS(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Qi(e)}function RS(e){return{input:({url:n})=>{for(const s of e)n=Qh(s,n);return n},output:({url:n})=>{for(let s=e.length-1;s>=0;s--)n=xv(e[s],n);return n}}}function AS(e){const n=Cv(e.basepath),s=`/${n}`,i=`${s}/`,l=e.caseSensitive?s:s.toLowerCase(),u=e.caseSensitive?i:i.toLowerCase();return{input:({url:c})=>{const f=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return f===l?c.pathname="/":f.startsWith(u)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=jl(["/",n,c.pathname]),c)}}function Qh(e,n){const s=e?.input?.({url:n});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return n}function xv(e,n){const s=e?.output?.({url:n});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return n}function OS(e,n){const{createMutableStore:s,createReadonlyStore:i,batch:l,init:u}=n,c=new Map,f=new Map,p=new Map,g=s(e.status),y=s(e.loadedAt),m=s(e.isLoading),b=s(e.isTransitioning),_=s(e.location),S=s(e.resolvedLocation),O=s(e.statusCode),E=s(e.redirect),A=s([]),U=s([]),j=s([]),L=i(()=>Uh(c,A.get())),F=i(()=>Uh(f,U.get())),V=i(()=>Uh(p,j.get())),H=i(()=>A.get()[0]),K=i(()=>A.get().some(Q=>c.get(Q)?.get().status==="pending")),J=i(()=>({locationHref:_.get().href,resolvedLocationHref:S.get()?.href,status:g.get()})),ae=i(()=>({status:g.get(),loadedAt:y.get(),isLoading:m.get(),isTransitioning:b.get(),matches:L.get(),location:_.get(),resolvedLocation:S.get(),statusCode:O.get(),redirect:E.get()})),ne=Di(64);function ye(Q){let le=ne.get(Q);return le||(le=i(()=>{const Re=A.get();for(const Oe of Re){const x=c.get(Oe);if(x&&x.routeId===Q)return x.get()}}),ne.set(Q,le)),le}const Ce={status:g,loadedAt:y,isLoading:m,isTransitioning:b,location:_,resolvedLocation:S,statusCode:O,redirect:E,matchesId:A,pendingIds:U,cachedIds:j,matches:L,pendingMatches:F,cachedMatches:V,firstId:H,hasPending:K,matchRouteDeps:J,matchStores:c,pendingMatchStores:f,cachedMatchStores:p,__store:ae,getRouteMatchStore:ye,setMatches:Ye,setPending:Be,setCached:B};Ye(e.matches),u?.(Ce);function Ye(Q){Nh(Q,c,A,s,l)}function Be(Q){Nh(Q,f,U,s,l)}function B(Q){Nh(Q,p,j,s,l)}return Ce}function Uh(e,n){const s=[];for(const i of n){const l=e.get(i);l&&s.push(l.get())}return s}function Nh(e,n,s,i,l){const u=e.map(f=>f.id),c=new Set(u);l(()=>{for(const f of n.keys())c.has(f)||n.delete(f);for(const f of e){const p=n.get(f.id);if(!p){const g=i(f);g.routeId=f.routeId,n.set(f.id,g);continue}p.routeId=f.routeId,p.get()!==f&&p.set(f)}Zw(s.get(),u)||s.set(u)})}var Jh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},CS=e=>e.stores.matchesId.get().some(n=>e.stores.matchStores.get(n)?.get()._forcePending),Zl=(e,n)=>!!(e.preload&&!e.router.stores.matchStores.has(n)),fs=(e,n,s=!0)=>{const i={...e.router.options.context??{}},l=s?n:n-1;for(let u=0;u<=l;u++){const c=e.matches[u];if(!c)continue;const f=e.router.getMatch(c.id);f&&Object.assign(i,f.__routeContext,f.__beforeLoadContext)}return i},Wm=(e,n)=>{if(!e.matches.length)return;const s=n.routeId,i=e.matches.findIndex(c=>c.routeId===e.router.routeTree.id),l=i>=0?i:0;let u=s?e.matches.findIndex(c=>c.routeId===s):e.firstBadMatchIndex??e.matches.length-1;u<0&&(u=l);for(let c=u;c>=0;c--){const f=e.matches[c];if(e.router.looseRoutesById[f.routeId].options.notFoundComponent)return c}return s?u:l},xr=(e,n,s)=>{if(!(!Mt(s)&&!ut(s)))throw Mt(s)&&s.redirectHandled&&!s.options.reloadDocument||(n&&(n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0,n._nonReactive.error=s,e.updateMatch(n.id,i=>
10({...i,status:Mt(s)?"redirected":ut(s)?"notFound":i.status==="pending"?"success":i.status,context:fs(e,n.index),isFetching:!1,error:s})),ut(s)&&!s.routeId&&(s.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()),Mt(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},jv=(e,n)=>{const s=e.router.getMatch(n);return!!(!s||s._nonReactive.dehydrated)},ey=(e,n,s)=>{const i=fs(e,s);e.updateMatch(n,l=>({...l,context:i}))},Ei=(e,n,s,i)=>{const{id:l,routeId:u}=e.matches[n],c=e.router.looseRoutesById[u];if(s instanceof Promise)throw s;s.routerCode=i,e.firstBadMatchIndex??=n,xr(e,e.router.getMatch(l),s);try{c.options.onError?.(s)}catch(f){s=f,xr(e,e.router.getMatch(l),s)}e.updateMatch(l,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Mt(s)&&!ut(s)&&(e.serialError??=s)},Mv=(e,n,s,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Zl(e,n)&&(s.options.loader||s.options.beforeLoad||Nv(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Jh(e)},l);i._nonReactive.pendingTimeout=u}},kS=(e,n,s)=>{const i=e.router.getMatch(n);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;Mv(e,n,s,i);const l=()=>{const u=e.router.getMatch(n);u.preload&&(u.status==="redirected"||u.status==="notFound")&&xr(e,u,u.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(l):l()},xS=(e,n,s,i)=>{const l=e.router.getMatch(n);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=ds(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:f}=l;c&&Ei(e,s,c,"PARSE_PARAMS"),f&&Ei(e,s,f,"VALIDATE_SEARCH"),Mv(e,n,i,l);const p=new AbortController;let g=!1;const y=()=>{g||(g=!0,e.updateMatch(n,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},m=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(n,L=>({...L,isFetching:!1}))};if(!i.options.beforeLoad){e.router.batch(()=>{y(),m()});return}l._nonReactive.beforeLoadPromise=ds();const b={...fs(e,s,!1),...l.__routeContext},{search:_,params:S,cause:O}=l,E=Zl(e,n),A={search:_,abortController:p,params:S,preload:E,context:b,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":O,matches:e.matches,routeId:i.id,...e.router.options.additionalContext},U=L=>{if(L===void 0){e.router.batch(()=>{y(),m()});return}(Mt(L)||ut(L))&&(y(),Ei(e,s,L,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(n,F=>({...F,__beforeLoadContext:L})),m()})};let j;try{if(j=i.options.beforeLoad(A),Li(j))return y(),j.catch(L=>{Ei(e,s,L,"BEFORE_LOAD")}).then(U)}catch(L){y(),Ei(e,s,L,"BEFORE_LOAD")}U(j)},jS=(e,n)=>{const{id:s,routeId:i}=e.matches[n],l=e.router.looseRoutesById[i],u=()=>f(),c=()=>xS(e,s,n,l),f=()=>{if(jv(e,s))return;const p=kS(e,s,l);return Li(p)?p.then(c):c()};return u()},MS=(e,n,s)=>{const i=e.router.getMatch(n);if(!i||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([s.options.head?.(l),s.options.scripts?.(l),s.options.headers?.(l)]).then(([u,c,f])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:f,scripts:c,styles:u?.styles}))},Uv=(e,n,s,i,l)=>{const u=n[i-1],{params:c,loaderDeps:f,abortController:p,cause:g}=e.router.getMatch(s),y=fs(e,i),m=Zl(e,s);return{params:c,deps:f,preload:!!m,parentMatchPromise:u,abortController:p,context:y,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:m?"preload":g,route:l,...e.router.options.additionalContext}},ty=async(e,n,s,i,l)=>{try{const u=e.router.getMatch(s);try{(!(Tv??e.router.isServer)||u.ssr===!0)&&zi(l);const c=l.options.loader,f=typeof c=="function"?c:c?.handler,p=f?.(Uv(e,n,s,i,l)),g=!!f&&Li(p);if((g||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(s,m=>({...m,isFetching:"loader"})),f){const m=g?await p:p;xr(e,e.router.getMatch(s),m),m!==void 0&&e.updateMatch(s,b=>({...b,loaderData:m}))}l._lazyPromise&&await l._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,l._componentsPromise&&await l._componentsPromise,e.updateMatch(s,m=>({...m,error:void 0,context:fs(e,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let f=c;if(f?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(s,g=>({...g,status:g.status==="pending"?"success":g.status,isFetching:!1,context:fs(e,i)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,ut(c)&&await l.options.notFoundComponent?.preload?.(),xr(e,e.router.getMatch(s),c);try{l.options.onError?.(c)}catch(g){f=g,xr(e,e.router.getMatch(s),g)}!Mt(f)&&!ut(f)&&await zi(l,["errorComponent"]),e.updateMatch(s,g=>({...g,error:f,context:fs(e,i),status:"error",isFetching:!1}))}}catch(u){const c=e.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),xr(e,c,u)}},US=async(e,n,s)=>{async function i(_,S,O,E,A){const U=Date.now()-S.updatedAt,j=_?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,L=A.options.shouldReload,F=typeof L=="function"?L(Uv(e,n,l,s,A)):L,{status:V,invalid:H}=E,K=U>=j&&(!!e.forceStaleReload||E.cause==="enter"||O!==void 0&&O!==E.id);c=V==="success"&&(H||(F??K)),_&&A.options.preload===!1||(c&&!e.sync&&y?(f=!0,(async()=>{try{await ty(e,n,l,s,A);const J=e.router.getMatch(l);J._nonReactive.loaderPromise?.resolve(),J._nonReactive.loadPromise?.resolve(),J._nonReactive.loaderPromise=void 0,J._nonReactive.loadPromise=void 0}catch(J){Mt(J)&&await e.router.navigate(J.options)}})()):V!=="success"||c?await ty(e,n,l,s,A):ey(e,l,s))}const{id:l,routeId:u}=e.matches[s];let c=!1,f=!1;const p=e.router.looseRoutesById[u],g=p.options.loader,y=((typeof g=="function"?void 0:g?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(jv(e,l)){if(!e.router.getMatch(l))return e.matches[s];ey(e,l,s)}else{const _=e.router.getMatch(l),S=e.router.stores.matchesId.get()[s],O=(S&&e.router.stores.matchStores.get(S)||null)?.routeId===u?S:e.router.stores.matches.get().find(A=>A.routeId===u)?.id,E=Zl(e,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const A=e.router.getMatch(l),U=A._nonReactive.error||A.error;U&&xr(e,A,U),A.status==="pending"&&await i(E,_,O,A,p)}else{const A=E&&!e.router.stores.matchStores.has(l),U=e.router.getMatch(l);U._nonReactive.loaderPromise=ds(),A!==U.preload&&e.updateMatch(l,j=>({...j,preload:A})),await i(E,_,O,U,p)}}const m=e.router.getMatch(l);f||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pen
10dingTimeout),m._nonReactive.pendingTimeout=void 0,f||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const b=f?m.isFetching:!1;return b!==m.isFetching||m.invalid!==!1?(e.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),e.router.getMatch(l)):m};async function ny(e){const n=e,s=[];CS(n.router)&&Jh(n);let i;for(let b=0;b<n.matches.length;b++){try{const _=jS(n,b);Li(_)&&await _}catch(_){if(Mt(_))throw _;if(ut(_))i=_;else if(!n.preload)throw _;break}if(n.serialError||n.firstBadMatchIndex!=null)break}const l=n.firstBadMatchIndex??n.matches.length,u=i&&!n.preload?Wm(n,i):void 0,c=i&&n.preload?0:u!==void 0?Math.min(u+1,l):l;let f,p;for(let b=0;b<c;b++)s.push(US(n,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const S=_.reason;if(Mt(S))throw S;ut(S)?f??=S:p??=S}if(p!==void 0)throw p}const g=f??(i&&!n.preload?i:void 0);let y=n.firstBadMatchIndex!==void 0?n.firstBadMatchIndex:n.matches.length-1;if(!g&&i&&n.preload)return n.matches;if(g){const b=Wm(n,g);b===void 0&&Ut();const _=n.matches[b],S=n.router.looseRoutesById[_.routeId],O=n.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&O&&(S.options.notFoundComponent=O),g.routeId=_.routeId;const E=_.routeId===n.router.routeTree.id;n.updateMatch(_.id,A=>({...A,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),y=b,await zi(S,["notFoundComponent"])}else if(!n.preload){const b=n.matches[0];b.globalNotFound||n.router.getMatch(b.id)?.globalNotFound&&n.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(n.serialError&&n.firstBadMatchIndex!==void 0){const b=n.router.looseRoutesById[n.matches[n.firstBadMatchIndex].routeId];await zi(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:_,routeId:S}=n.matches[b],O=n.router.looseRoutesById[S];try{const E=MS(n,_,O);if(E){const A=await E;n.updateMatch(_,U=>({...U,...A}))}}catch(E){console.error(`Error executing head for route ${S}:`,E)}}const m=Jh(n);if(Li(m)&&await m,g)throw g;if(n.serialError&&!n.preload&&!n.onReady)throw n.serialError;return n.matches}function ry(e,n){const s=n.map(i=>e.options[i]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function zi(e,n=Ml){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(i=>{const{id:l,...u}=i.options;Object.assign(e.options,u),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const s=()=>e._componentsLoaded?void 0:n===Ml?(()=>{if(e._componentsPromise===void 0){const i=ry(e,Ml);i?e._componentsPromise=i.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():ry(e,n);return e._lazyPromise?e._lazyPromise.then(s):s()}function Nv(e){for(const n of Ml)if(e.options[n]?.preload)return!0;return!1}var Ml=["component","errorComponent","pendingComponent","notFoundComponent"],Mr="__TSR_index",sy="popstate",ay="beforeunload";function NS(e){let n=e.getLocation();const s=new Set,i=c=>{n=e.getLocation(),s.forEach(f=>f({location:n,action:c}))},l=c=>{e.notifyOnIndexChange??!0?i(c):n=e.getLocation()},u=async({task:c,navigateOpts:f,...p})=>{if(f?.ignoreBlocker??!1){c();return}const g=e.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const m of g){const b=Bl(p.path,p.state);if(await m.blockerFn({currentLocation:n,nextLocation:b,action:p.type})){e.onBlocked?.();return}}c()};return{get location(){return n},get length(){return e.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,f,p)=>{const g=n.state[Mr];f=iy(g+1,f),u({task:()=>{e.pushState(c,f),i({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:f})},replace:(c,f,p)=>{const g=n.state[Mr];f=iy(g,f),u({task:()=>{e.replaceState(c,f),i({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:f})},go:(c,f)=>{u({task:()=>{e.go(c),l({type:"GO",index:c})},navigateOpts:f,type:"GO"})},back:c=>{u({task:()=>{e.back(c?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{e.forward(c?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>n.state[Mr]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,c]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}
10function iy(e,n){n||(n={});const s=Tf();return{...n,key:s,__TSR_key:s,[Mr]:e}}function LS(e){const n=typeof document<"u"?window:void 0,s=n.history.pushState,i=n.history.replaceState;let l=[];const u=()=>l,c=K=>l=K,f=(K=>K),p=(()=>Bl(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!n.history.state?.__TSR_key&&!n.history.state?.key){const K=Tf();n.history.replaceState({[Mr]:0,key:K,__TSR_key:K},"")}let g=p(),y,m=!1,b=!1,_=!1,S=!1;const O=()=>g;let E,A;const U=()=>{E&&(H._ignoreSubscribers=!0,(E.isPush?n.history.pushState:n.history.replaceState)(E.state,"",E.href),H._ignoreSubscribers=!1,E=void 0,A=void 0,y=void 0)},j=(K,J,ae)=>{const ne=f(J);A||(y=g),g=Bl(J,ae),E={href:ne,state:ae,isPush:E?.isPush||K==="push"},A||(A=Promise.resolve().then(()=>U()))},L=K=>{g=p(),H.notify({type:K})},F=async()=>{if(b){b=!1;return}const K=p(),J=K.state[Mr]-g.state[Mr],ae=J===1,ne=J===-1,ye=!ae&&!ne||m;m=!1;const Ce=ye?"GO":ne?"BACK":"FORWARD",Ye=ye?{type:"GO",index:J}:{type:ne?"BACK":"FORWARD"};if(_)_=!1;else{const Be=u();if(typeof document<"u"&&Be.length){for(const B of Be)if(await B.blockerFn({currentLocation:g,nextLocation:K,action:Ce})){b=!0,n.history.go(1),H.notify(Ye);return}}}g=p(),H.notify(Ye)},V=K=>{if(S){S=!1;return}let J=!1;const ae=u();if(typeof document<"u"&&ae.length)for(const ne of ae){const ye=ne.enableBeforeUnload??!0;if(ye===!0){J=!0;break}if(typeof ye=="function"&&ye()===!0){J=!0;break}}if(J)return K.preventDefault(),K.returnValue=""},H=NS({getLocation:O,getLength:()=>n.history.length,pushState:(K,J)=>j("push",K,J),replaceState:(K,J)=>j("replace",K,J),back:K=>(K&&(_=!0),S=!0,n.history.back()),forward:K=>{K&&(_=!0),S=!0,n.history.forward()},go:K=>{m=!0,n.history.go(K)},createHref:K=>f(K),flush:U,destroy:()=>{n.history.pushState=s,n.history.replaceState=i,n.removeEventListener(ay,V,{capture:!0}),n.removeEventListener(sy,F)},onBlocked:()=>{y&&g!==y&&(g=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return n.addEventListener(ay,V,{capture:!0}),n.addEventListener(sy,F),n.history.pushState=function(...K){const J=s.apply(n.history,K);return H._ignoreSubscribers||L("PUSH"),J},n.history.replaceState=function(...K){const J=i.apply(n.history,K);return H._ignoreSubscribers||L("REPLACE"),J},H}function DS(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function Bl(e,n){const s=DS(e),i=s.indexOf("#"),l=s.indexOf("?"),u=Tf();return{href:s,pathname:s.substring(0,i>0?l>0?Math.min(i,l):i:l>0?l:s.length),hash:i>-1?s.substring(i):"",search:l>-1?s.slice(l,i===-1?void 0:i):"",state:n||{[Mr]:0,key:u,__TSR_key:u}}}function Tf(){return(Math.random()+1).toString(36).substring(7)}function zS(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function ga(e,n){const s=n,i=e;return{fromLocation:s,toLocation:i,pathChanged:s?.pathname!==i.pathname,hrefChanged:s?.href!==i.href,hashChanged:s?.hash!==i.hash}}var PS=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.startTransition=s=>s(),this.update=s=>{const i=this.options,l=this.basepath??i?.basepath??"/",u=this.basepath===void 0,c=i?.rewrite;if(this.options={...i,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=fS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=LS()),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 y;this.resolvePathCache=Di(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=OS(HS(this.latestLocation),y),vS(this)}let f=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||l!==p||c!==g){this.basepath=p;const y=[],m=Cv(p);m&&m!=="/"&&y.push(AS({basepath:p})),g&&y.push(g),this.rewrite=y.length===0?void 0:y.length===1?y[0]:RS(y),this.history&&this.updateLatestLocation(),f=!0}f&&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 s=aS(this.routeTree,this.options.caseSensitive,(i,l)=>{i.init({originalIndex:l})});return this.options.routeMasks&&eS(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,i)=>{const l={eventType:s,fn:i};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=s=>
10{this.subscribers.forEach(i=>{i.eventType===s.type&&i.fn(s)})},this.parseLocation=(s,i)=>{const l=({pathname:p,search:g,hash:y,href:m,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(g),U=this.options.stringifySearch(A);return{href:p+U+y,publicHref:p+U+y,pathname:wi(p).path,external:!1,searchStr:U,search:ns(i?.search,A),hash:wi(y.slice(1)).path,state:is(i?.state,b)}}const _=new URL(m,this.origin),S=Qh(this.rewrite,_),O=this.options.parseSearch(S.search),E=this.options.stringifySearch(O);return S.search=E,{href:S.href.replace(S.origin,""),publicHref:m,pathname:wi(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:E,search:ns(i?.search,O),hash:wi(S.hash.slice(1)).path,state:is(i?.state,b)}},u=l(s),{__tempLocation:c,__tempKey:f}=u.state;if(c&&(!f||f===this.tempLocationKey)){const p=l(c);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=(s,i)=>hS({base:s,to:Ef(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,i,l)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:i},l):this.matchRoutesInternal(s,i),this.getMatchedRoutes=s=>qS({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const i=this.getMatch(s);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const i=this.stores.matchStores.get(s)?.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const i=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??f.fullPath,g=this.resolvePathWithBase(p,"."),y=f.search,m=Object.assign(Object.create(null),f.params),b=u.to?this.resolvePathWithBase(g,`${u.to}`):this.resolvePathWithBase(g,"."),_=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?m:Object.assign(m,Cr(u.params,m)),S=this.getMatchedRoutes(b);let O=S.matchedRoutes;if((!S.foundRoute||S.foundRoute.path!=="/"&&S.routeParams["**"])&&this.options.notFoundRoute&&(O=[...O,this.options.notFoundRoute]),Object.keys(_).length>0)for(const ae of O){const ne=ae.options.params?.stringify??ae.options.stringifyParams;if(ne)try{Object.assign(_,ne(_))}catch{}}const E=s.leaveParams?b:wi(Qm({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=y;if(s._includeValidateSearch&&this.options.search?.strict){const ae={};O.forEach(ne=>{if(ne.options.validateSearch)try{Object.assign(ae,Ul(ne.options.validateSearch,{...ae,...A}))}catch{}}),A=ae}A=IS({search:A,dest:u,destRoutes:O,_includeValidateSearch:s._includeValidateSearch}),A=ns(y,A);const U=this.options.stringifySearch(A),j=u.hash===!0?c.hash:u.hash?Cr(u.hash,c.hash):void 0,L=j?`#${j}`:"";let F=u.state===!0?c.state:u.state?Cr(u.state,c.state):{};F=is(c.state,F);const V=`${E}${U}${L}`;let H,K,J=!1;if(this.rewrite){const ae=new URL(V,this.origin),ne=xv(this.rewrite,ae);H=ae.href.replace(ae.origin,""),ne.origin!==this.origin?(K=ne.href,J=!0):K=ne.pathname+ne.search+ne.hash}else H=Xw(V),K=H;return{publicHref:K,href:H,pathname:E,search:A,searchStr:U,state:F,hash:j??"",external:J,unmaskOnReload:u.unmaskOnReload}},l=(u={},c)=>{const f=i(u);let p=c?i(c):void 0;if(!p){const g=Object.create(null);if(this.options.routeMasks){const y=tS(f.pathname,this.processedTree);if(y){Object.assign(g,y.rawParams);const{from:m,params:b,..._}=y.route,S=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,Cr(b,g));c={from:s.from,..._,params:S},p=i(c)}}}return p&&(f.maskedLocation=p),f};return s.mask?l(s,{from:s.from,...s.mask}):l(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:i,...l})=>{const u=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{l.state[y]=this.latestLocation.state[y]});const g=jt(l.state,this.latestLocation.state);return p.forEach(y=>{delete l.state[y]}),g},c=jr(this.latestLocation.href)===jr(l.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=ds(()=>{f?.resolve(),f=void 0}),c&&u())this.load();else{let{maskedLocation:p,hashScrollIntoView:g,...y}=l;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[l.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:i})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:i,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,href:f,...p}={})=>
10{if(f){const m=this.history.location.state.__TSR_index,b=Bl(f,{__TSR_index:s?m:m+1}),_=new URL(b.pathname,this.origin);p.to=Qh(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const g=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=g;const y=this.commitLocation({...g,viewTransition:u,replace:s,resetScroll:i,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:s,reloadDocument:i,href:l,publicHref:u,...c})=>{let f=!1;if(l)try{new URL(`${l}`),f=!0}catch{}if(f&&!i&&(i=!0),i){if(s!==void 0||!l){const g=this.buildLocation({to:s,...c});l=l??g.publicHref,u=u??g.publicHref}const p=!f&&u?u:l;if(zl(p,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const y of g)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...c,href:l,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(l=>!s.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(s),this.stores.setCached(i)})},this.load=async s=>{let i,l,u;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const g=this.latestLocation,y=ga(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await ny({router:this,sync:s?.sync,forceStaleReload:c.href===g.href,matches:this.stores.pendingMatches.get(),location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,b=null,_=null,S=null;this.batch(()=>{const O=this.stores.pendingMatches.get(),E=O.length,A=this.stores.matches.get();m=E?A.filter(L=>!this.stores.pendingMatchStores.has(L.id)):null;const U=new Set;for(const L of this.stores.pendingMatchStores.values())L.routeId&&U.add(L.routeId);const j=new Set;for(const L of this.stores.matchStores.values())L.routeId&&j.add(L.routeId);b=E?A.filter(L=>!U.has(L.routeId)):null,_=E?O.filter(L=>!j.has(L.routeId)):null,S=E?O.filter(L=>j.has(L.routeId)):A,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(O),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(L=>L.status!=="error"&&L.status!=="notFound"&&L.status!=="redirected")]),this.clearExpiredCache())});for(const[O,E]of[[b,"onLeave"],[_,"onEnter"],[S,"onStay"]])if(O)for(const A of O)this.looseRoutesById[A.routeId].options[E]?.(A)})})}})}catch(g){Mt(g)?(i=g,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):ut(g)&&(l=g);const y=i?i.status:l?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(i)})}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 f;this.hasNotFoundMatch()?f=404:this.stores.matches.get().some(p=>p.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.set(f)},this.startViewTransition=s=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),f=typeof i.types=="function"?i.types(ga(u,c)):i.types;if(f===!1){s();return}l={update:s,types:f}}else l=s;document.startViewTransition(l)}else s()},this.updateMatch=(s,i)=>{this.startTransition(()=>
10{const l=this.stores.pendingMatchStores.get(s);if(l){l.set(i);return}const u=this.stores.matchStores.get(s);if(u){u.set(i);return}const c=this.stores.cachedMatchStores.get(s);if(c){const f=i(c.get());f.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(g=>g!==s)):c.set(f)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const i=l=>s?.filter?.(l)??!0?{...l,invalid:!0,...s?.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(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const i=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const l=s.options._builtLocation??this.buildLocation(s.options),u=this.getParsedLocationHref(l);s.options.href=u,s.headers.set("Location",u)}else if(i)try{const l=new URL(i);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;s.options.href=u,s.headers.set("Location",u)}}catch{}if(s.options.href&&!s.options._builtLocation&&zl(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const i=s?.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!i(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),i=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const c=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:s-l.updatedAt>=c};this.clearCache({filter:i})},this.loadRouteChunk=zi,this.preloadRoute=async s=>{const i=s._builtLocation??this.buildLocation(s);let l=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:s});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),f=l.filter(p=>!c.has(p.id));if(f.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...f])}try{return l=await ny({router:this,matches:l,location:i,preload:!0,updateMatch:(p,g)=>{u.has(p)?l=l.map(y=>y.id===p?g(y):y):this.updateMatch(p,g)}}),l}catch(p){if(Mt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:i});ut(p)||console.error(p);return}},this.matchRoute=(s,i)=>{const l={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},u=this.buildLocation(l);if(i?.pending&&this.stores.status.get()!=="pending")return!1;const c=(i?.pending===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),f=nS(u.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,c.pathname,this.processedTree);return!f||s.params&&!jt(f.rawParams,s.params,{partial:!0})?!1:i?.includeSearch??!0?jt(c.search,u.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.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??wS,parseSearch:e.parseSearch??_S,protocolAllowlist:e.protocolAllowlist??Yw}),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:s}){this.routesById=e,this.routesByPath=n,this.processedTree=s;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}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 s=this.getMatchedRoutes(e.pathname),{foundRoute:i,routeParam
10s:l,parsedParams:u}=s;let{matchedRoutes:c}=s,f=!1;(i?i.path!=="/"&&l["**"]:jr(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:f=!0);const p=f?GS(this.options.notFoundMode,c):void 0,g=new Array(c.length),y=new Map;for(const m of this.stores.matchStores.values())m.routeId&&y.set(m.routeId,m.get());for(let m=0;m<c.length;m++){const b=c[m],_=g[m-1];let S,O,E;{const Ce=_?.search??e.search,Ye=_?._strictSearch??void 0;try{const Be=Ul(b.options.validateSearch,{...Ce})??void 0;S={...Ce,...Be},O={...Ye,...Be},E=void 0}catch(Be){let B=Be;if(Be instanceof Hl||(B=new Hl(Be.message,{cause:Be})),n?.throwOnError)throw B;S=Ce,O={},E=B}}const A=b.options.loaderDeps?.({search:S})??"",U=A?JSON.stringify(A):"",{interpolatedPath:j,usedParams:L}=Qm({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),F=b.id+j+U,V=this.getMatch(F),H=y.get(b.id),K=V?._strictParams??L;let J;if(!V)try{oy(b,L,u,K)}catch(Ce){if(ut(Ce)||Mt(Ce)?J=Ce:J=new BS(Ce.message,{cause:Ce}),n?.throwOnError)throw J}Object.assign(l,K);const ae=H?"stay":"enter";let ne;if(V)ne={...V,cause:ae,params:H?.params??l,_strictParams:K,search:ns(H?H.search:V.search,S),_strictSearch:O};else{const Ce=b.options.loader||b.options.beforeLoad||b.lazyFn||Nv(b)?"pending":"success";ne={id:F,ssr:b.options.ssr,index:m,routeId:b.id,params:H?.params??l,_strictParams:K,pathname:j,updatedAt:Date.now(),search:H?ns(H.search,S):S,_strictSearch:O,searchError:void 0,status:Ce,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:ds()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ae,loaderDeps:H?is(H.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}n?.preload||(ne.globalNotFound=p===b.id),ne.searchError=E;const ye=this.getParentContext(_);ne.context={...ye,...ne.__routeContext,...ne.__beforeLoadContext},g[m]=ne}for(let m=0;m<g.length;m++){const b=g[m],_=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),O=y.get(b.routeId);if(b.params=O?ns(O.params,l):l,!S){const E=g[m-1],A=this.getParentContext(E);if(_.options.context){const U={deps:b.loaderDeps,params:b.params,context:A??{},location:e,navigate:j=>this.navigate({...j,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:_.id};b.__routeContext=_.options.context(U)??void 0}b.context={...A,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(e){const{matchedRoutes:n,routeParams:s,parsedParams:i}=this.getMatchedRoutes(e.pathname),l=Ni(n),u={...e.search};for(const y of n)try{Object.assign(u,Ul(y.options.validateSearch,u))}catch{}const c=Ni(this.stores.matchesId.get()),f=c&&this.stores.matchStores.get(c)?.get(),p=f&&f.routeId===l.id&&f.pathname===e.pathname;let g;if(p)g=f.params;else{const y=Object.assign(Object.create(null),s);for(const m of n)try{oy(m,s,i??{},y)}catch{}g=y}return{matchedRoutes:n,fullPath:l.fullPath,search:u,params:g}}},Hl=class extends Error{},BS=class extends Error{};function HS(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ul(e,n){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(n);if(s instanceof Promise)throw new Hl("Async validation not supported");if(s.issues)throw new Hl(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(n):typeof e=="function"?e(n):{}}function qS({pathname:e,routesById:n,processedTree:s}){const i=Object.create(null),l=jr(e);let u,c;const f=rS(l,s,!0);return f&&(u=f.route,Object.assign(i,f.rawParams),c=Object.assign(Object.create(null),f.parsedParams)),{matchedRoutes:f?.branch||[n.__root__],routeParams:i,foundRoute:u,parsedParams:c}}function IS({search:e,dest:n,destRoutes:s,_includeValidateSearch:i}){return $S(s)(e,n,i??!1)}function $S(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:c,next:f})=>{let p=c;
10"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((y,m)=>m(y),c));const g=f(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,m)=>m(y),g):g};n.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:f})=>{const p=f(c);if(!n._includeValidateSearch)return p;try{return{...p,...Ul(l.options.validateSearch,p)??void 0}}catch{return p}};n.middlewares.push(u)}}const s=({search:l})=>{const u=n.dest;return u.search?u.search===!0?l:Cr(u.search,l):{}};n.middlewares.push(s);const i=(l,u,c)=>{if(l>=c.length)return u;const f=c[l];return f({search:u,next:g=>i(l+1,g,c)})};return function(u,c,f){return n.dest=c,n._includeValidateSearch=f,i(0,u,n.middlewares)}}function GS(e,n){if(e!=="root")for(let s=n.length-1;s>=0;s--){const i=n[s];if(i.children)return i.id}return hs}function oy(e,n,s,i){const l=e.options.params?.parse??e.options.parseParams;if(l)if(e.options.skipRouteOnParseError)for(const u in n)u in s&&(i[u]=s[u]);else{const u=l(i);Object.assign(i,u)}}var _n=Symbol.for("TSR_DEFERRED_PROMISE");function VS(e,n){const s=e;return s[_n]||(s[_n]={status:"pending"},s.then(i=>{s[_n].status="success",s[_n].data=i}).catch(i=>{s[_n].status="error",s[_n].error={data:zS(i),__isServerError:!0}})),s}var KS="Error preloading route! âï¸";function ly(e,n){if(e)return typeof e=="string"?e:e[n]}function YS(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function FS(e){if(e.tag!=="link")return;const n=e.attrs?.rel,s=e.attrs?.href;if(typeof s=="string"&&(typeof n=="string"?n.split(/\s+/):[]).includes("stylesheet"))return s}function QS(e,n){const s=FS(n);return!!s&&e?.inlineCss?.styles[s]!==void 0}var Lv=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 s=this.options,i=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=hs:this.parentRoute||Ut();let l=i?hs:s?.path;l&&l!=="/"&&(l=Ov(l));const u=s?.id||l;let c=i?hs:jl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=jl(["/",c]));const f=c==="__root__"?"/":jl([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=f,this._to=jr(f)},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=>Qi({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.")}},JS=class extends Lv{constructor(e){super(e)}};function XS(e){if(typeof document<"u"&&document.querySelector){const n=e.stores.location.get(),s=n.state.__hashScrollIntoViewOptions??!0;if(s&&n.hash!==""){const i=document.getElementById(n.hash);i&&i.scrollIntoView(s)}}}var ZS=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(ZS||{}),Yn=Symbol.asyncIterator,Dv=Symbol.hasInstance,ma=Symbol.isConcatSpreadable,Fn=Symbol.iterator,zv=Symbol.match,Pv=Symbol.matchAll,Bv=Symbol.replace,Hv=Symbol.search,qv=Symbol.species,Iv=Symbol.split,$v=Symbol.toPrimitive,ya=Symbol.toStringTag,Gv=Symbol.unscopables,Vv={[Yn]:0,[Dv]:1,[ma]:2,[Fn]:3,[zv]:4,[Pv]:5,[Bv]:6,[Hv]:7,[qv]:8,[Iv]:9,[$v]:10,[ya]:11,[Gv]:12},WS={0:Yn,1:Dv,2:ma,3:Fn,4:zv,5:Pv,6:Bv,7:Hv,8:qv,9:Iv,10:$v,11:ya,12:Gv},R=void 0,eE={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},tE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},nE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Te(e,n,s,i,l,u,c,f,p,g,y,m){return{t:e,i:n,s,c:i,m:l,p:u,e:c,a:f,f:p,b:g,o:y,l:m}}function Ur(e){return Te(2,R,e,R,R,R,R,R,R,R,R,R)}var Kv=Ur(2),Yv=Ur(3),rE=Ur(1),sE=Ur(0),aE=Ur(4),iE=Ur(5),oE=Ur(6),lE=Ur(7);function uE(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 R}}function Nr(e){let n="",s=0,i;for(let l=0,u=e.length;l<u;l++)i=uE(e[l]),i&&(n+=e.slice(s,l)+i,s=l+1);return s===0?n=e:n+=e.slice(s),n}function cE(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 Lr(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,cE)}var _l="__SEROVAL_REFS__",Fv=new Map,da=new Map;function Qv(e){return Fv.has(e)}function hE(e){return da.has(e)}function fE(e){if(Qv(e))return Fv.get(e);throw new $E(e)}function dE(e){if(hE(e))return da.get(e);throw new GE(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,_l,{value:da,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,_l,{value:da,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,_l,{value:da,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,_l,{value:da,configurable:!0,writable:!1,enumerable:!1});function Rf(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 pE(e){let n=tE[Rf(e)];return e.name!==n?{name:e.name}:e.constructor.name!==n?{name:e.constructor.name}:{}}function Jv(e,n){let s=pE(e),i=Object.getOwnPropertyNames(e);for(let l=0,u=i.length,c;
12l<u;l++)c=i[l],c!=="name"&&c!=="message"&&(c==="stack"?n&4&&(s=s||{},s[c]=e[c]):(s=s||{},s[c]=e[c]));return s}function Xv(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function gE(e){switch(e){case Number.POSITIVE_INFINITY:return iE;case Number.NEGATIVE_INFINITY:return oE}return e!==e?lE:Object.is(e,-0)?aE:Te(0,R,e,R,R,R,R,R,R,R,R,R)}function Zv(e){return Te(1,R,Nr(e),R,R,R,R,R,R,R,R,R)}function mE(e){return Te(3,R,""+e,R,R,R,R,R,R,R,R,R)}function yE(e){return Te(4,e,R,R,R,R,R,R,R,R,R,R)}function vE(e,n){let s=n.valueOf();return Te(5,e,s!==s?"":n.toISOString(),R,R,R,R,R,R,R,R,R)}function bE(e,n){return Te(6,e,R,Nr(n.source),n.flags,R,R,R,R,R,R,R)}function _E(e,n){return Te(17,e,Vv[n],R,R,R,R,R,R,R,R,R)}function wE(e,n){return Te(18,e,Nr(fE(n)),R,R,R,R,R,R,R,R,R)}function SE(e,n,s){return Te(25,e,s,Nr(n),R,R,R,R,R,R,R,R)}function EE(e,n,s){return Te(9,e,R,R,R,R,R,s,R,R,Xv(n),R)}function TE(e,n){return Te(21,e,R,R,R,R,R,R,n,R,R,R)}function RE(e,n,s){return Te(15,e,R,n.constructor.name,R,R,R,R,s,n.byteOffset,R,n.length)}function AE(e,n,s){return Te(16,e,R,n.constructor.name,R,R,R,R,s,n.byteOffset,R,n.byteLength)}function OE(e,n,s){return Te(20,e,R,R,R,R,R,R,s,n.byteOffset,R,n.byteLength)}function CE(e,n,s){return Te(13,e,Rf(n),R,Nr(n.message),s,R,R,R,R,R,R)}function kE(e,n,s){return Te(14,e,Rf(n),R,Nr(n.message),s,R,R,R,R,R,R)}function xE(e,n){return Te(7,e,R,R,R,R,R,n,R,R,R,R)}function jE(e,n){return Te(28,R,R,R,R,R,R,[e,n],R,R,R,R)}function ME(e,n){return Te(30,R,R,R,R,R,R,[e,n],R,R,R,R)}function UE(e,n,s){return Te(31,e,R,R,R,R,R,s,n,R,R,R)}function NE(e,n){return Te(32,e,R,R,R,R,R,R,n,R,R,R)}function LE(e,n){return Te(33,e,R,R,R,R,R,R,n,R,R,R)}function DE(e,n){return Te(34,e,R,R,R,R,R,R,n,R,R,R)}function zE(e,n,s,i){return Te(35,e,s,R,R,R,R,n,R,R,R,i)}var PE={parsing:1,serialization:2,deserialization:3};function BE(e){return`Seroval Error (step: ${PE[e]})`}var HE=(e,n)=>BE(e),Wv=class extends Error{constructor(e,n){super(HE(e)),this.cause=n}},uy=class extends Wv{constructor(e){super("parsing",e)}},qE=class extends Wv{constructor(e){super("deserialization",e)}};function Qn(e){return`Seroval Error (specific: ${e})`}var Wl=class extends Error{constructor(n){super(Qn(1)),this.value=n}},eb=class extends Error{constructor(n){super(Qn(2))}},IE=class extends Error{constructor(e){super(Qn(3))}},Ji=class extends Error{constructor(e){super(Qn(4))}},$E=class extends Error{constructor(e){super(Qn(5)),this.value=e}},GE=class extends Error{constructor(e){super(Qn(6))}},VE=class extends Error{constructor(e){super(Qn(7))}},Dr=class extends Error{constructor(e){super(Qn(8))}},KE=class extends Error{constructor(n){super(Qn(9))}},YE=class{constructor(e,n){this.value=e,this.replacement=n}},eu=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((n,s)=>{e.s=n,e.f=s}),e},FE=(e,n)=>{e.s(n),e.p.s=1,e.p.v=n},QE=(e,n)=>{e.f(n),e.p.s=2,e.p.v=n};eu.toString();FE.toString();QE.toString();var JE=()=>{let e=[],n=[],s=!0,i=!1,l=0,u=(p,g,y)=>{for(y=0;y<l;y++)n[y]&&n[y][g](p)},c=(p,g,y,m)=>{for(g=0,y=e.length;g<y;g++)m=e[g],!s&&g===y-1?p[i?"return":"throw"](m):p.next(m)},f=(p,g)=>(s&&(g=l++,n[g]=p),c(p),()=>{s&&(n[g]=n[l],n[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>f(p),next:p=>{s&&(e.push(p),u(p,"next"))},throw:p=>{s&&(e.push(p),u(p,"throw"),s=!1,i=!1,n.length=0)},return:p=>{s&&(e.push(p),u(p,"return"),s=!1,i=!0,n.length=0)}}},XE=e=>n=>()=>{let s=0,i={[e]:()=>i,next:()=>{if(s>n.d)return{done:!0,value:void 0};let l=s++,u=n.v[l];if(l===n.t)throw u;return{done:l===n.d,value:u}}};return i},ZE=(e,n)=>s=>()=>{let i=0,l=-1,u=!1,c=[],f=[],p=(y=0,m=f.length)=>{for(;y<m;y++)f[y].s({done:!0,value:void 0})};s.on({next:y=>{let m=f.shift();m&&m.s({done:!1,value:y}),c.push(y)},throw:y=>{let m=f.shift();m&&m.f(y),p(),l=c.length,u=!0,c.push(y)},return:y=>{let m=f.shift();m&&m.s({done:!0,value:y}),p(),l=c.length,c.push(y)}});let g={[e]:()=>g,next:()=>{if(l===-1){let b=i++;if(b>=c.length){let _=n();return f.push(_),_.p}return{done:!1,value:c[b]}}if(i>l)return{done:!0,value:void 0};let y=i++,m=c[y];if(y!==l)return{done:!1,value:m};if(u)throw m;return{done:!0,value:m}}};return g},tb=e=>{let n=atob(e),s=n.length,i=new Uint8Array(s);for(let l=0;l<s;l++)i[l]=n.charCodeAt(l);return i.buffer};tb.toString();
12function WE(e){return"__SEROVAL_SEQUENCE__"in e}function nb(e,n,s){return{__SEROVAL_SEQUENCE__:!0,v:e,t:n,d:s}}function eT(e){let n=[],s=-1,i=-1,l=e[Fn]();for(;;)try{let u=l.next();if(n.push(u.value),u.done){i=n.length-1;break}}catch(u){s=n.length,n.push(u)}return nb(n,s,i)}var tT=XE(Fn);function nT(e){return tT(e)}var rT={},sT={},aT={0:{},1:{},2:{},3:{},4:{},5:{}};function tu(e){return"__SEROVAL_STREAM__"in e}function ps(){return JE()}function iT(e){let n=ps(),s=e[Yn]();async function i(){try{let l=await s.next();l.done?n.return(l.value):(n.next(l.value),await i())}catch(l){n.throw(l)}}return i().catch(()=>{}),n}var oT=ZE(Yn,eu);function lT(e){return oT(e)}async function uT(e){try{return[1,await e]}catch(n){return[0,n]}}function cT(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 hT(e,n){let s=e.refs.size;return e.refs.set(n,s),s}function nu(e,n){let s=e.refs.get(n);return s!=null?(Nl(e,s),{type:1,value:yE(s)}):{type:0,value:hT(e,n)}}function Af(e,n){let s=nu(e,n);return s.type===1?s:Qv(n)?{type:2,value:wE(s.value,n)}:s}function ls(e,n){let s=Af(e,n);if(s.type!==0)return s.value;if(n in Vv)return _E(s.value,n);throw new Wl(n)}function ru(e,n){let s=nu(e,aT[n]);return s.type===1?s.value:Te(26,s.value,n,R,R,R,R,R,R,R,R,R)}function fT(e){let n=nu(e,rT);return n.type===1?n.value:Te(27,n.value,R,R,R,R,R,R,ls(e,Fn),R,R,R)}function dT(e){let n=nu(e,sT);return n.type===1?n.value:Te(29,n.value,R,R,R,R,R,[ru(e,1),ls(e,Yn)],R,R,R,R)}function pT(e,n,s,i){return Te(s?11:10,e,R,R,R,i,R,R,R,R,Xv(n),R)}function gT(e,n,s,i){return Te(8,n,R,R,R,R,{k:s,v:i},R,ru(e,0),R,R,R)}function mT(e,n,s){let i=new Uint8Array(s),l="";for(let u=0,c=i.length;u<c;u++)l+=String.fromCharCode(i[u]);return Te(19,n,Nr(btoa(l)),R,R,R,R,R,ru(e,5),R,R,R)}function yT(e,n){return{base:cT(e,n),child:void 0}}var vT=class{constructor(e,n){this._p=e,this.depth=n}parse(e){return st(this._p,this.depth,e)}};async function bT(e,n,s){let i=[];for(let l=0,u=s.length;l<u;l++)l in s?i[l]=await st(e,n,s[l]):i[l]=0;return i}async function _T(e,n,s,i){return EE(s,i,await bT(e,n,i))}async function Of(e,n,s){let i=Object.entries(s),l=[],u=[];for(let c=0,f=i.length;c<f;c++)l.push(Nr(i[c][0])),u.push(await st(e,n,i[c][1]));return Fn in s&&(l.push(ls(e.base,Fn)),u.push(jE(fT(e.base),await st(e,n,eT(s))))),Yn in s&&(l.push(ls(e.base,Yn)),u.push(ME(dT(e.base),await st(e,n,iT(s))))),ya in s&&(l.push(ls(e.base,ya)),u.push(Zv(s[ya]))),ma in s&&(l.push(ls(e.base,ma)),u.push(s[ma]?Kv:Yv)),{k:l,v:u}}async function Lh(e,n,s,i,l){return pT(s,i,l,await Of(e,n,i))}async function wT(e,n,s,i){return TE(s,await st(e,n,i.valueOf()))}async function ST(e,n,s,i){return RE(s,i,await st(e,n,i.buffer))}async function ET(e,n,s,i){return AE(s,i,await st(e,n,i.buffer))}async function TT(e,n,s,i){return OE(s,i,await st(e,n,i.buffer))}async function cy(e,n,s,i){let l=Jv(i,e.base.features);return CE(s,i,l?await Of(e,n,l):R)}async function RT(e,n,s,i){let l=Jv(i,e.base.features);return kE(s,i,l?await Of(e,n,l):R)}async function AT(e,n,s,i){let l=[],u=[];for(let[c,f]of i.entries())l.push(await st(e,n,c)),u.push(await st(e,n,f));return gT(e.base,s,l,u)}async function OT(e,n,s,i){let l=[];for(let u of i.keys())l.push(await st(e,n,u));return xE(s,l)}async function rb(e,n,s,i){let l=e.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){let f=l[u];if(f.parse.async&&f.test(i))return SE(s,f.tag,await f.parse.async(i,new vT(e,n),{id:s}))}return R}async function CT(e,n,s,i){let[l,u]=await uT(i);return Te(12,s,l,R,R,R,R,R,await st(e,n,u),R,R,R)}function kT(e,n,s,i,l){let u=[],c=s.on({next:f=>{Nl(this.base,n),st(this,e,f).then(p=>{u.push(NE(n,p))},p=>{l(p),c()})},throw:f=>{Nl(this.base,n),st(this,e,f).then(p=>{u.push(LE(n,p)),i(u),c()},p=>{l(p),c()})},return:f=>{Nl(this.base,n),st(this,e,f).then(p=>{u.push(DE(n,p)),i(u),c()},p=>{l(p),c()})}})}async function xT(e,n,s,i){return UE(s,ru(e.base,4),await new Promise(kT.bind(e,n,s,i)))}async function jT(e,n,s,i){let l=[];for(let u=0,c=i.v.length;u<c;u++)l[u]=await st(e,n,i.v[u]);return zE(s,l,i.t,i.d)}async function MT(e,n,s,i){if(Array.isArray(i))return _T(e,n,s,i);if(tu(i))return xT(e,n,s,i);if(WE(i))return jT(e,n,s,i);let l=i.constructor;if(l===YE)return st(e,n,i.replacement);let u=await rb(e,n,s,i);if(u)return u;switch(l){case Object:return Lh(e,n,s,i,!1);case R:return Lh(e,n,s,i,!0);case Date:return vE(s,i);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return cy(e,n,s,i);case Number:case Boolean:case String:case BigInt:return wT(e,n,s,i);case ArrayBuffer:return mT(e.base,s,i);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return ST(e,n,s,i);case DataView:return TT(e,n,s,i);case Map:return AT(e,n,s,i);
12case Set:return OT(e,n,s,i)}if(l===Promise||i instanceof Promise)return CT(e,n,s,i);let c=e.base.features;if(c&32&&l===RegExp)return bE(s,i);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return ET(e,n,s,i)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||i instanceof AggregateError))return RT(e,n,s,i);if(i instanceof Error)return cy(e,n,s,i);if(Fn in i||Yn in i)return Lh(e,n,s,i,!!l);throw new Wl(i)}async function UT(e,n,s){let i=Af(e.base,s);if(i.type!==0)return i.value;let l=await rb(e,n,i.value,s);if(l)return l;throw new Wl(s)}async function st(e,n,s){switch(typeof s){case"boolean":return s?Kv:Yv;case"undefined":return rE;case"string":return Zv(s);case"number":return gE(s);case"bigint":return mE(s);case"object":{if(s){let i=Af(e.base,s);return i.type===0?await MT(e,n+1,i.value,s):i.value}return sE}case"symbol":return ls(e.base,s);case"function":return UT(e,n,s);default:throw new Wl(s)}}async function NT(e,n){try{return await st(e,0,n)}catch(s){throw s instanceof uy?s:new uy(s)}}var LT=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(LT||{});function sb(e,n){for(let s=0,i=n.length;s<i;s++){let l=n[s];e.has(l)||(e.add(l),l.extends&&sb(e,l.extends))}}function ab(e){if(e){let n=new Set;return sb(n,e),[...n]}}function DT(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 VE(e)}}var zT=1e6,PT=1e4,BT=2e4;function ib(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 HT=1e3;function qT(e,n){var s;return{mode:e,plugins:n.plugins,refs:n.refs||new Map,features:(s=n.features)!=null?s:63^(n.disabledFeatures||0),depthLimit:n.depthLimit||HT}}function IT(e){return{mode:2,base:qT(2,e),child:R}}var $T=class{constructor(e,n){this._p=e,this.depth=n}deserialize(e){return De(this._p,this.depth,e)}};function ob(e,n){if(n<0||!Number.isFinite(n)||!Number.isInteger(n))throw new Dr({t:4,i:n});if(e.refs.has(n))throw new Error("Conflicted ref id: "+n)}function GT(e,n,s){return ob(e.base,n),e.state.marked.has(n)&&e.base.refs.set(n,s),s}function VT(e,n,s){return ob(e.base,n),e.base.refs.set(n,s),s}function at(e,n,s){return e.mode===1?GT(e,n,s):VT(e,n,s)}function Xh(e,n,s){if(Object.hasOwn(n,s))return n[s];throw new Dr(e)}function KT(e,n){return at(e,n.i,dE(Lr(n.s)))}function YT(e,n,s){let i=s.a,l=i.length,u=at(e,s.i,new Array(l));for(let c=0,f;c<l;c++)f=i[c],f&&(u[c]=De(e,n,f));return ib(u,s.o),u}function FT(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function QT(e){switch(e){case Yn:case ma:case ya:case Fn:return!0;default:return!1}}function hy(e,n,s){FT(n)?e[n]=s:Object.defineProperty(e,n,{value:s,configurable:!0,enumerable:!0,writable:!0})}function JT(e,n,s,i,l){if(typeof i=="string")hy(s,Lr(i),De(e,n,l));else{let u=De(e,n,i);switch(typeof u){case"string":hy(s,u,De(e,n,l));break;case"symbol":QT(u)&&(s[u]=De(e,n,l));break;default:throw new Dr(i)}}}function lb(e,n,s,i){let l=s.k;if(l.length>0)for(let u=0,c=s.v,f=l.length;u<f;u++)JT(e,n,i,l[u],c[u]);return i}function XT(e,n,s){let i=at(e,s.i,s.t===10?{}:Object.create(null));return lb(e,n,s.p,i),ib(i,s.o),i}function ZT(e,n){return at(e,n.i,new Date(n.s))}function WT(e,n){if(e.base.features&32){let s=Lr(n.c);if(s.length>BT)throw new Dr(n);return at(e,n.i,new RegExp(s,n.m))}throw new eb(n)}function eR(e,n,s){let i=at(e,s.i,new Set);for(let l=0,u=s.a,c=u.length;l<c;l++)i.add(De(e,n,u[l]));return i}function tR(e,n,s){let i=at(e,s.i,new Map);for(let l=0,u=s.e.k,c=s.e.v,f=u.length;l<f;l++)i.set(De(e,n,u[l]),De(e,n,c[l]));return i}function nR(e,n){if(n.s.length>zT)throw new Dr(n);return at(e,n.i,tb(Lr(n.s)))}function rR(e,n,s){var i;let l=DT(s.c),u=De(e,n,s.f),c=(i=s.b)!=null?i:0;if(c<0||c>u.byteLength)throw new Dr(s);return at(e,s.i,new l(u,c,s.l))}function sR(e,n,s){var i;let l=De(e,n,s.f),u=(i=s.b)!=null?i:0;if(u<0||u>l.byteLength)throw new Dr(s);return at(e,s.i,new DataView(l,u,s.l))}function ub(e,n,s,i){if(s.p){let l=lb(e,n,s.p,{});Object.defineProperties(i,Object.getOwnPropertyDescriptors(l))}return i}function aR(e,n,s){let i=at(e,s.i,new AggregateError([],Lr(s.m)));return ub(e,n,s,i)}function iR(e,n,s){let i=Xh(s,nE,s.s),l=at(e,s.i,new i(Lr(s.m)));return ub(e,n,s,l)}function oR(e,n,s){let i=eu(),l=at(e,s.i,i.p),u=De(e,n,s.f);return s.s?i.s(u):i.f(u),l}
12function lR(e,n,s){return at(e,s.i,Object(De(e,n,s.f)))}function uR(e,n,s){let i=e.base.plugins;if(i){let l=Lr(s.c);for(let u=0,c=i.length;u<c;u++){let f=i[u];if(f.tag===l)return at(e,s.i,f.deserialize(s.s,new $T(e,n),{id:s.i}))}}throw new IE(s.c)}function cR(e,n){return at(e,n.i,at(e,n.s,eu()).p)}function hR(e,n,s){let i=e.base.refs.get(s.i);if(i)return i.s(De(e,n,s.a[1])),R;throw new Ji("Promise")}function fR(e,n,s){let i=e.base.refs.get(s.i);if(i)return i.f(De(e,n,s.a[1])),R;throw new Ji("Promise")}function dR(e,n,s){De(e,n,s.a[0]);let i=De(e,n,s.a[1]);return nT(i)}function pR(e,n,s){De(e,n,s.a[0]);let i=De(e,n,s.a[1]);return lT(i)}function gR(e,n,s){let i=at(e,s.i,ps()),l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)De(e,n,l[c]);return i}function mR(e,n,s){let i=e.base.refs.get(s.i);if(i&&tu(i))return i.next(De(e,n,s.f)),R;throw new Ji("Stream")}function yR(e,n,s){let i=e.base.refs.get(s.i);if(i&&tu(i))return i.throw(De(e,n,s.f)),R;throw new Ji("Stream")}function vR(e,n,s){let i=e.base.refs.get(s.i);if(i&&tu(i))return i.return(De(e,n,s.f)),R;throw new Ji("Stream")}function bR(e,n,s){return De(e,n,s.f),R}function _R(e,n,s){return De(e,n,s.a[1]),R}function wR(e,n,s){let i=at(e,s.i,nb([],s.s,s.l));for(let l=0,u=s.a.length;l<u;l++)i.v[l]=De(e,n,s.a[l]);return i}function De(e,n,s){if(n>e.base.depthLimit)throw new KE(e.base.depthLimit);switch(n+=1,s.t){case 2:return Xh(s,eE,s.s);case 0:return Number(s.s);case 1:return Lr(String(s.s));case 3:if(String(s.s).length>PT)throw new Dr(s);return BigInt(s.s);case 4:return e.base.refs.get(s.i);case 18:return KT(e,s);case 9:return YT(e,n,s);case 10:case 11:return XT(e,n,s);case 5:return ZT(e,s);case 6:return WT(e,s);case 7:return eR(e,n,s);case 8:return tR(e,n,s);case 19:return nR(e,s);case 16:case 15:return rR(e,n,s);case 20:return sR(e,n,s);case 14:return aR(e,n,s);case 13:return iR(e,n,s);case 12:return oR(e,n,s);case 17:return Xh(s,WS,s.s);case 21:return lR(e,n,s);case 25:return uR(e,n,s);case 22:return cR(e,s);case 23:return hR(e,n,s);case 24:return fR(e,n,s);case 28:return dR(e,n,s);case 30:return pR(e,n,s);case 31:return gR(e,n,s);case 32:return mR(e,n,s);case 33:return yR(e,n,s);case 34:return vR(e,n,s);case 27:return bR(e,n,s);case 29:return _R(e,n,s);case 35:return wR(e,n,s);default:throw new eb(s)}}function SR(e,n){try{return De(e,0,n)}catch(s){throw new qE(s)}}var ER=()=>T;ER.toString();function fy(e,n){let s=ab(n.plugins),i=IT({plugins:s,refs:n.refs,features:n.features,disabledFeatures:n.disabledFeatures,depthLimit:n.depthLimit});return SR(i,e)}async function TR(e,n={}){let s=ab(n.plugins),i=yT(1,{plugins:s,disabledFeatures:n.disabledFeatures});return{t:await NT(i,e),f:i.base.features,m:Array.from(i.base.marked)}}function RR(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(n,s,i){return{v:s.parse(e.toSerializable(n))}},async async(n,s,i){return{v:await s.parse(e.toSerializable(n))}},stream(n,s,i){return{v:s.parse(e.toSerializable(n))}}},serialize:void 0,deserialize(n,s,i){return e.fromSerializable(s.deserialize(n.v))}}}var AR=class{constructor(e,n){this.stream=e,this.hint=n?.hint??"binary"}},ql=globalThis.Buffer,cb=!!ql&&typeof ql.from=="function";function hb(e){if(e.length===0)return"";if(cb)return ql.from(e).toString("base64");const n=32768,s=[];for(let i=0;i<e.length;i+=n){const l=e.subarray(i,i+n);s.push(String.fromCharCode.apply(null,l))}return btoa(s.join(""))}function fb(e){if(e.length===0)return new Uint8Array(0);if(cb){const i=ql.from(e,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}const n=atob(e),s=new Uint8Array(n.length);for(let i=0;i<n.length;i++)s[i]=n.charCodeAt(i);return s}var Ti=Object.create(null),Ri=Object.create(null),OR=e=>new ReadableStream({start(n){e.on({next(s){try{n.enqueue(fb(s))}catch{}},throw(s){n.error(s)},return(){try{n.close()}catch{}}})}}),CR=new TextEncoder,kR=e=>new ReadableStream({start(n){e.on({next(s){try{typeof s=="string"?n.enqueue(CR.encode(s)):n.enqueue(fb(s.$b64))}catch{}},throw(s){n.error(s)},return(){try{n.close()}catch{}}})}}),xR="(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(_){}}})}}))",jR="(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 dy(e){const n=ps(),s=e.getReader();return(async()=>{try{for(;;){const{done:i,value:l}=await s.read();if(i){n.return(void 0);break}n.next(hb(l))}}catch(i){n.throw(i)}finally{s.releaseLock()}})(),n}function py(e){const n=ps(),s=e.getReader(),i=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await s.read();if(l){try{const c=i.decode();c.length>0&&n.next(c)}catch{}n.return(void 0);break}try{const c=i.decode(u,{stream:!0});c.length>0&&n.next(c)}catch{n.next({$b64:hb(u)})}}}catch(l){n.throw(l)}finally{s.releaseLock()}})(),n}var MR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===Ti},parse:{sync(e,n,s){return{}},async async(e,n,s){return{}},stream(e,n,s){return{}}},serialize(e,n,s){return xR},deserialize(e,n,s){return Ti}},{tag:"tss/RawStreamFactoryText",test(e){return e===Ri},parse:{sync(e,n,s){return{}},async async(e,n,s){return{}},stream(e,n,s){return{}}},serialize(e,n,s){return jR},deserialize(e,n,s){return Ri}}],test(e){return e instanceof AR},parse:{sync(e,n,s){const i=e.hint==="text"?Ri:Ti;return{hint:n.parse(e.hint),factory:n.parse(i),stream:n.parse(ps())}},async async(e,n,s){const i=e.hint==="text"?Ri:Ti,l=e.hint==="text"?py(e.stream):dy(e.stream);return{hint:await n.parse(e.hint),factory:await n.parse(i),stream:await n.parse(l)}},stream(e,n,s){const i=e.hint==="text"?Ri:Ti,l=e.hint==="text"?py(e.stream):dy(e.stream);return{hint:n.parse(e.hint),factory:n.parse(i),stream:n.parse(l)}}},serialize(e,n,s){return"("+n.serialize(e.factory)+")("+n.serialize(e.stream)+")"},deserialize(e,n,s){const i=n.deserialize(e.stream);return n.deserialize(e.hint)==="text"?kR(i):OR(i)}};function UR(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(n,s,i){return e(typeof s?.deserialize=="function"?s.deserialize(n.streamId):n.streamId)}}}var NR={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))}},Rr={},db=e=>new ReadableStream({start:n=>{e.on({next:s=>{try{n.enqueue(s)}catch{}},throw:s=>{n.error(s)},return:()=>{try{n.close()}catch{}}})}}),LR={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Rr},parse:{sync(){return Rr},async async(){return await Promise.resolve(Rr)},stream(){return Rr}},serialize(){return db.toString()},deserialize(){return Rr}};function gy(e){let n=ps(),s=e.getReader();async function i(){try{let l=await s.read();l.done?n.return(l.value):(n.next(l.value),await i())}catch(l){n.throw(l)}}return i().catch(()=>{}),n}var DR={tag:"seroval/plugins/web/ReadableStream",extends:[LR],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,n){return{factory:n.parse(Rr),stream:n.parse(ps())}},async async(e,n){return{factory:await n.parse(Rr),stream:await n.parse(gy(e))}},stream(e,n){return{factory:n.parse(Rr),stream:n.parse(gy(e))}}},serialize(e,n){return"("+n.serialize(e.factory)+")("+n.serialize(e.stream)+")"},deserialize(e,n){let s=n.deserialize(e.stream);return db(s)}},zR=DR,PR=[NR,MR,zR];function BR(){return[...Ev()?.serializationAdapters?.map(RR)??[],...PR]}var my=new TextDecoder,HR=new Uint8Array(0),yy=16*1024*1024,vy=32*1024*1024,by=1024,_y=1e5;function qR(e){const n=new Map,s=new Map,i=new Set;let l=!1,u=null,c=0,f;const p=new ReadableStream({start(m){f=m},cancel(){l=!0;try{u?.cancel()}catch{}n.forEach(m=>{try{m.error(new Error("Framed response cancelled"))}catch{}}),n.clear(),s.clear(),i.clear()}});function g(m){const b=s.get(m);
12if(b)return b;if(i.has(m))return new ReadableStream({start(S){S.close()}});if(s.size>=by)throw new Error(`Too many raw streams in framed response (max ${by})`);const _=new ReadableStream({start(S){n.set(m,S)},cancel(){i.add(m),n.delete(m),s.delete(m)}});return s.set(m,_),_}function y(m){return g(m),n.get(m)}return(async()=>{const m=e.getReader();u=m;const b=[];let _=0;function S(){if(_<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const A=new Uint8Array(9);let U=0,j=9;for(let L=0;L<b.length&&j>0;L++){const F=b[L],V=Math.min(F.length,j);A.set(F.subarray(0,V),U),U+=V,j-=V}return{type:A[0],streamId:(A[1]<<24|A[2]<<16|A[3]<<8|A[4])>>>0,length:(A[5]<<24|A[6]<<16|A[7]<<8|A[8])>>>0}}function O(E){if(E===0)return HR;const A=new Uint8Array(E);let U=0,j=E;for(;j>0&&b.length>0;){const L=b[0];if(!L)break;const F=Math.min(L.length,j);A.set(L.subarray(0,F),U),U+=F,j-=F,F===L.length?b.shift():b[0]=L.subarray(F)}return _-=E,A}try{for(;;){const{done:E,value:A}=await m.read();if(l||E)break;if(A){if(_+A.length>vy)throw new Error(`Framed response buffer exceeded ${vy} bytes`);for(b.push(A),_+=A.length;;){const U=S();if(!U)break;const{type:j,streamId:L,length:F}=U;if(j!==$n.JSON&&j!==$n.CHUNK&&j!==$n.END&&j!==$n.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===$n.JSON){if(L!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(L===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(F>yy)throw new Error(`Frame payload too large: ${F} bytes (max ${yy})`);const V=9+F;if(_<V)break;if(++c>_y)throw new Error(`Too many frames in framed response (max ${_y})`);O(9);const H=O(F);switch(j){case $n.JSON:try{f.enqueue(my.decode(H))}catch{}break;case $n.CHUNK:{const K=y(L);K&&K.enqueue(H);break}case $n.END:{const K=y(L);if(i.add(L),K){try{K.close()}catch{}n.delete(L)}break}case $n.ERROR:{const K=y(L);if(i.add(L),K){const J=my.decode(H);K.error(new Error(J)),n.delete(L)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}n.forEach(E=>{try{E.close()}catch{}}),n.clear()}catch(E){try{f.error(E)}catch{}n.forEach(A=>{try{A.error(E)}catch{}}),n.clear()}finally{try{m.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var Pi=null;async function Zh(e){e.length>0&&await Promise.allSettled(e)}var IR=Object.prototype.hasOwnProperty;function pb(e){for(const n in e)if(IR.call(e,n))return!0;return!1}async function $R(e,n,s){Pi||(Pi=BR());const i=n[0],l=i.fetch??s,u=i.data instanceof FormData?"formData":"payload",c=i.headers?new Headers(i.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${Pw}, application/x-ndjson, application/json`),i.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await gb(i);if(p!==void 0){const g=kv({payload:p});e.includes("?")?e+=`&${g}`:e+=`?${g}`}}let f;if(i.method==="POST"){const p=await GR(i);p?.contentType&&c.set("content-type",p.contentType),f=p?.body}return await VR(async()=>l(e,{method:i.method,headers:c,signal:i.signal,body:f}))}async function gb(e){let n=!1;const s={};if(e.data!==void 0&&(n=!0,s.data=e.data),e.context&&pb(e.context)&&(n=!0,s.context=e.context),n)return mb(s)}async function mb(e){return JSON.stringify(await Promise.resolve(TR(e,{plugins:Pi})))}async function GR(e){if(e.data instanceof FormData){let s;return e.context&&pb(e.context)&&(s=await mb(e.context)),s!==void 0&&e.data.set(zw,s),{body:e.data}}const n=await gb(e);if(n)return{body:n,contentType:"application/json"}}async function VR(e){let n;try{n=await e()}catch(i){if(i instanceof Response)n=i;else throw console.log(i),i}if(n.headers.get("x-tss-raw")==="true")return n;const s=n.headers.get("content-type");if(s||Ut(),n.headers.get("x-tss-serialized")){let i;if(s.includes("application/x-tss-framed")){if(qw(s),!n.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=qR(n.body),c=[UR(l),...Pi||[]],f=new Map;i=await KR({jsonStream:u,onMessage:p=>fy(p,{refs:f,plugins:c}),onError(p,g){console.error(p,g)}})}else if(s.includes("application/json")){const l=await n.json(),u=[];i=fy(l,{plugins:Pi}),await Zh(u)}if(i||Ut(),i instanceof Error)throw i;return i}if(s.includes("application/json")){const i=await n.json(),l=TS(i);if(l)throw l;if(ut(i))throw i;return i}if(!n.ok)throw new Error(await n.text());return n}async function KR({jsonStream:e,onMessage:n,onError:s}){const i=e.getReader(),{value:l,done:u}=await i.read();if(u||!l)throw new Error("Stream ended before first object");const c=JSON.parse(l);let f=!1;const p=(async()=>{try{for(;;){const{value:m,done:b}=await i.read();if(b)break;
12if(m)try{const _=[];try{n(JSON.parse(m))}finally{}await Zh(_)}catch(_){s?.(`Invalid JSON: ${m}`,_)}}}catch(m){f||s?.("Stream processing error:",m)}})();let g;const y=[];try{g=n(c)}catch(m){throw f=!0,i.cancel().catch(()=>{}),m}return await Zh(y),Promise.resolve(g).catch(()=>{f=!0,i.cancel().catch(()=>{})}),p.finally(()=>{try{i.releaseLock()}catch{}}),g}function YR(e){const n="/_serverFn/"+e;return Object.assign((...l)=>{const u=Ev()?.serverFns?.fetch;return $R(n,l,u??fetch)},{url:n,serverFnMeta:{id:e},[Fh]:!0})}var FR={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Fh in e)?!1:!!e[Fh],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>YR(e)};function wy(e){return e.replaceAll("\0","/").replaceAll("�","/")}function QR(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 JR(e){window.$_TSR||Ut();const n=e.options.serializationAdapters;if(n?.length){const E=new Map;n.forEach(A=>{E.set(A.key,A.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(A=>A())}window.$_TSR.initialized=!0,window.$_TSR.router||Ut();const s=window.$_TSR.router;s.matches.forEach(E=>{E.i=wy(E.i)}),s.lastMatchId&&(s.lastMatchId=wy(s.lastMatchId));const{manifest:i,dehydratedData:l,lastMatchId:u}=s;e.ssr={manifest:i};const c=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:c};const f=e.matchRoutes(e.stores.location.get()),p=Promise.all(f.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function g(E){const A=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(A){const U=ds();E._nonReactive.minPendingPromise=U,E._forcePending=!0,setTimeout(()=>{U.resolve(),e.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},A)}}function y(E){const A=e.looseRoutesById[E.routeId];A&&(A.options.ssr=E.ssr)}let m;f.forEach(E=>{const A=s.matches.find(U=>U.i===E.id);if(!A){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}QR(E,A),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&m===void 0&&(m=E.index,g(E))}),e.stores.setMatches(f),await e.options.hydrate?.(l);const b=e.stores.matches.get(),_=e.stores.location.get();await Promise.all(b.map(async E=>{try{const A=e.looseRoutesById[E.routeId],U=b[E.index-1]?.context??e.options.context;if(A.options.context){const V={deps:E.loaderDeps,params:E.params,context:U??{},location:_,navigate:H=>e.navigate({...H,_fromLocation:_}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:f,routeId:A.id};E.__routeContext=A.options.context(V)??void 0}E.context={...U,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},L=await A.options.head?.(j),F=await A.options.scripts?.(j);E.meta=L?.meta,E.links=L?.links,E.headScripts=L?.scripts,E.styles=L?.styles,E.scripts=F}catch(A){if(ut(A))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,A);else throw E.error=A,console.error(`Error during hydration for route ${E.routeId}:`,A),A}}));const S=f[f.length-1].id!==u;if(!f.some(E=>E.ssr===!1)&&!S)return f.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const O=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(S){const E=f[1];E||Ut(),g(E),E._displayPending=!0,E._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(E.id,A=>({...A,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Il=se.use,Ci=typeof window<"u"?se.useLayoutEffect:se.useEffect;function Dh(e){const n=se.useRef({value:e,prev:null}),s=n.current.value;return e!==s&&(n.current={value:e,prev:s}),n.current.prev}function XR(e,n,s={},i={}){se.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{n(u)},s);return l.observe(e.current),()=>{l.disconnect()}},[n,s,i.disabled,e])}function ZR(e){const n=se.useRef(null);return se.useImperativeHandle(e,()=>n.current,[]),n}function WR({promise:e}){if(Il)return Il(e);const n=VS(e);if(n[_n].status==="pending")throw n;if(n[_n].status==="error")throw n[_n].error;return n[_n].data}function eA(e){const n=Y.jsx(tA,{...e});
12return e.fallback?Y.jsx(se.Suspense,{fallback:e.fallback,children:n}):n}function tA(e){const n=WR(e);return e.children(n)}function Cf(e){const n=e.errorComponent??kf;return Y.jsx(nA,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:i})=>s?se.createElement(n,{error:s,reset:i}):e.children})}var nA=class extends se.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,n){const s=e.getResetKey();return n.error&&n.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}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 kf({error:e}){const[n,s]=se.useState(!1);return Y.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[Y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[Y.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),Y.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(i=>!i),children:n?"Hide Error":"Show Error"})]}),Y.jsx("div",{style:{height:".25rem"}}),n?Y.jsx("div",{children:Y.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?Y.jsx("code",{children:e.message}):null})}):null]})}function rA({children:e,fallback:n=null}){return xf()?Y.jsx(ba.Fragment,{children:e}):Y.jsx(ba.Fragment,{children:n})}function xf(){return ba.useSyncExternalStore(sA,()=>!0,()=>!1)}function sA(){return()=>{}}var yb=se.createContext(null);function vt(e){return se.useContext(yb)}var su=se.createContext(void 0),aA=se.createContext(void 0),$e=(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))($e||{});function iA({update:e,notify:n,unwatched:s}){return{link:i,unlink:l,propagate:u,checkDirty:c,shallowPropagate:f};function i(g,y,m){const b=y.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===g){_.version=m,y.depsTail=_;return}const S=g.subsTail;if(S!==void 0&&S.version===m&&S.sub===y)return;const O=y.depsTail=g.subsTail={version:m,dep:g,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=O),b!==void 0?b.nextDep=O:y.deps=O,S!==void 0?S.nextSub=O:g.subs=O}function l(g,y=g.sub){const m=g.dep,b=g.prevDep,_=g.nextDep,S=g.nextSub,O=g.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=O:m.subsTail=O,O!==void 0?O.nextSub=S:(m.subs=S)===void 0&&s(m),_}function u(g){let y=g.nextSub,m;e:do{const b=g.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(g,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&n(b),_&1){const S=b.subs;if(S!==void 0){const O=(g=S).nextSub;O!==void 0&&(m={value:y,prev:m},y=O);continue}}if((g=y)!==void 0){y=g.nextSub;continue}for(;m!==void 0;)if(g=m.value,m=m.prev,g!==void 0){y=g.nextSub;continue e}break}while(!0)}function c(g,y){let m,b=0,_=!1;e:do{const S=g.dep,O=S.flags;if(y.flags&16)_=!0;else if((O&17)===17){if(e(S)){const E=S.subs;E.nextSub!==void 0&&f(E),_=!0}}else if((O&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(m={value:g,prev:m}),g=S.deps,y=S,++b;continue}if(!_){const E=g.nextDep;if(E!==void 0){g=E;continue}}for(;b--;){const E=y.subs,A=E.nextSub!==void 0;if(A?(g=m.value,m=m.prev):g=E,_){if(e(y)){A&&f(E),y=g.sub;continue}_=!1}else y.flags&=-33;y=g.sub;const U=g.nextDep;if(U!==void 0){g=U;continue e}}return _}while(!0)}function f(g){do{const y=g.sub,m=y.flags;(m&48)===32&&(y.flags=m|16,(m&6)===2&&n(y))}while((g=g.nextSub)!==void 0)}function p(g,y){let m=y.depsTail;for(;m!==void 0;){if(m===g)return!0;m=m.prevDep}return!1}}function oA(e,n,s){const i=typeof e=="object",l=i?e:void 0;return{next:(i?e.next:e)?.bind(l),error:(i?e.error:n)?.bind(l),complete:(i?e.complete:s)?.bind(l)}}const Wh=[];let Ll=0;const{link:Sy,unlink:lA,propagate:uA,checkDirty:vb,shallowPropagate:Ey}=iA({update(e){return e._update()},notify(e){Wh[ef++]=e,e.flags&=~$e.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=$e.Mutable|$e.Dirty,$l(e))}});let wl=0,ef=0,vn,tf=0;function bb(e){try{++tf,e()}finally{--tf||_b()}}function $l(e){const n=e.depsTail;let s=n!==void 0?n.nextDep:e.deps;for(;s!==void 0;)s=lA(s,e)}function _b(){if(!(tf>0)){for(;wl<ef;){const e=Wh[wl];Wh[wl++]=void 0,e.notify()}wl=0,ef=0}}function Ty(e,n){const s=typeof e=="function",i=e,l={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?$e.None:$e.Mutable,get(){return vn!==void 0&&Sy(l,vn,Ll),l._snapshot},subscribe(u){const c=oA(u),f={current:!1},p=cA(()=>{l.get(),f.current?c.next?.(l._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=vn,f=n?.compare??Object.is;if(s)vn=l,++Ll,l.depsTail=void 0;else if(u===void 0)return!1;s&&(l.flags=$e.Mutable|$e.RecursedCheck);try{const p=l._snapshot,g=typeof u=="function"?u(p):u===void 0&&s?i(p):u;return p===void 0||!f(p,g)?(l._snapshot=g,!0):!1}finally{vn=c,s&&(l.flags&=~$e.RecursedCheck),$l(l)}}};return s?(l.flags=$e.Mutable|$e.Dirty,l.get=function(){const u=l.flags;if(u&$e.Dirty||u&$e.Pending&&vb(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&Ey(c)}}else u&$e.Pending&&(l.flags=u&~$e.Pending);return vn!==void 0&&Sy(l,vn,Ll),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(uA(c),Ey(c),_b())}},l}function cA(e){const n=()=>{const i=vn;vn=s,++Ll,s.depsTail=void 0,s.flags=$e.Watching|$e.RecursedCheck;try{return e()}finally{vn=i,s.flags&=~$e.RecursedCheck,$l(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:$e.Watching|$e.RecursedCheck,notify(){const i=this.flags;i&$e.Dirty||i&$e.Pending&&vb(this.deps,this)?n():this.flags=$e.Watching},stop(){this.flags=$e.None,this.depsTail=void 0,$l(this)}};return n(),s}var zh={exports:{}},Ph={},Bh={exports:{}},Hh={};var Ry;function hA(){if(Ry)return Hh;Ry=1;var e=Fi();function n(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var s=typeof Object.is=="function"?Object.is:n,i=e.useState,l=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function f(m,b){var _=b(),S=i({inst:{value:_,getSnapshot:b}}),O=S[0].inst,E=S[1];return u(function(){O.value=_,O.getSnapshot=b,p(O)&&E({inst:O})},[m,_,b]),l(function(){return p(O)&&E({inst:O}),m(function(){p(O)&&E({inst:O})})},[m]),c(_),_}function p(m){var b=m.getSnapshot;m=m.value;try{var _=b();return!s(m,_)}catch{return!0}}function g(m,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:f;return Hh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Hh}var Ay;function fA(){return Ay||(Ay=1,Bh.exports=hA()),Bh.exports}var Oy;function dA(){if(Oy)return Ph;Oy=1;var e=Fi(),n=fA();function s(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var i=typeof Object.is=="function"?Object.is:s,l=n.useSyncExternalStore,u=e.useRef,c=e.useEffect,f=e.useMemo,p=e.useDebugValue;return Ph.useSyncExternalStoreWithSelector=function(g,y,m,b,_){var S=u(null);if(S.current===null){var O={hasValue:!1,value:null};S.current=O}else O=S.current;S=f(function(){function A(V){if(!U){if(U=!0,j=V,V=b(V),_!==void 0&&O.hasValue){var H=O.value;if(_(H,V))return L=H}return L=V}if(H=L,i(j,V))return H;var K=b(V);return _!==void 0&&_(H,K)?(j=V,H):(j=V,L=K)}var U=!1,j,L,F=m===void 0?null:m;return[function(){return A(y())},F===null?void 0:function(){return A(F())}]},[y,m,b,_]);var E=l(g,S[0],S[1]);return c(function(){O.hasValue=!0,O.value=E},[E]),p(E),E},Ph}var Cy;function pA(){return Cy||(Cy=1,zh.exports=dA()),zh.exports}var gA=pA();function mA(e,n){return e===n}function nt(e,n,s=mA){const i=se.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:f}=e.subscribe(c);return f},[e]),l=se.useCallback(()=>e?.get(),[e]);return gA.useSyncExternalStoreWithSelector(i,l,l,n,s)}var yA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function gs(e){const n=vt(),s=se.useContext(e.from?aA:su),i=e.from??s,l=i?e.from?n.stores.getRouteMatchStore(i):n.stores.matchStores.get(i):void 0,u=se.useRef(void 0);return nt(l??yA,c=>
12{if((e.shouldThrow??!0)&&!c&&Ut(),c===void 0)return;const f=e.select?e.select(c):c;if(e.structuralSharing??n.options.defaultStructuralSharing){const p=is(u.current,f);return u.current=p,p}return f})}function wb(e){return gs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function Sb(e){const{select:n,...s}=e;return gs({...s,select:i=>n?n(i.loaderDeps):i.loaderDeps})}function Eb(e){return gs({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const s=e.strict===!1?n.params:n._strictParams;return e.select?e.select(s):s}})}function Tb(e){return gs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Rb(e){const n=vt();return se.useCallback(s=>n.navigate({...s,from:s.from??e?.from}),[e?.from,n])}function Ab(e){return gs({...e,select:n=>e.select?e.select(n.context):n.context})}var Ob=Sv();const vx=wv(Ob);function vA(e,n){const s=vt(),i=ZR(n),{activeProps:l,inactiveProps:u,activeOptions:c,to:f,preload:p,preloadDelay:g,preloadIntentProximity:y,hashScrollIntoView:m,replace:b,startTransition:_,resetScroll:S,viewTransition:O,children:E,target:A,disabled:U,style:j,className:L,onClick:F,onBlur:V,onFocus:H,onMouseEnter:K,onMouseLeave:J,onTouchStart:ae,ignoreBlocker:ne,params:ye,search:Ce,hash:Ye,state:Be,mask:B,reloadDocument:Q,unsafeRelative:le,from:Re,_fromLocation:Oe,...x}=e,$=xf(),X=se.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=nt(s.stores.location,ze=>ze,(ze,ct)=>ze.href===ct.href),ie=se.useMemo(()=>{const ze={_fromLocation:W,...X};return s.buildLocation(ze)},[s,W,X]),pe=ie.maskedLocation?ie.maskedLocation.publicHref:ie.publicHref,we=ie.maskedLocation?ie.maskedLocation.external:ie.external,Fe=se.useMemo(()=>TA(pe,we,s.history,U),[U,we,pe,s.history]),Ne=se.useMemo(()=>{if(Fe?.external)return zl(Fe.href,s.protocolAllowlist)?void 0:Fe.href;if(!RA(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),zl(f,s.protocolAllowlist)?void 0:f}catch{}},[f,Fe,s.protocolAllowlist]),Sn=se.useMemo(()=>{if(Ne)return!1;if(c?.exact){if(!cS(W.pathname,ie.pathname,s.basepath))return!1}else{const ze=Pl(W.pathname,s.basepath),ct=Pl(ie.pathname,s.basepath);if(!(ze.startsWith(ct)&&(ze.length===ct.length||ze[ct.length]==="/")))return!1}return(c?.includeSearch??!0)&&!jt(W.search,ie.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?$&&W.hash===ie.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,W,Ne,$,ie.hash,ie.pathname,ie.search,s.basepath]),En=Sn?Cr(l,{})??bA:qh,Zn=Sn?qh:Cr(u,{})??qh,Ta=[L,En.className,Zn.className].filter(Boolean).join(" "),hn=(j||En.style||Zn.style)&&{...j,...En.style,...Zn.style},[Ra,ms]=se.useState(!1),Zi=se.useRef(!1),Tn=e.reloadDocument||Ne?!1:p??s.options.defaultPreload,zr=g??s.options.defaultPreloadDelay??0,tn=se.useCallback(()=>{s.preloadRoute({...X,_builtLocation:ie}).catch(ze=>{console.warn(ze),console.warn(KS)})},[s,X,ie]);XR(i,se.useCallback(ze=>{ze?.isIntersecting&&tn()},[tn]),EA,{disabled:!!U||Tn!=="viewport"}),se.useEffect(()=>{Zi.current||!U&&Tn==="render"&&(tn(),Zi.current=!0)},[U,tn,Tn]);const Aa=ze=>{const ct=ze.currentTarget.getAttribute("target"),fn=A!==void 0?A:ct;if(!U&&!AA(ze)&&!ze.defaultPrevented&&(!fn||fn==="_self")&&ze.button===0){ze.preventDefault(),Ob.flushSync(()=>{ms(!0)});const ys=s.subscribe("onResolved",()=>{ys(),ms(!1)});s.navigate({...X,replace:b,resetScroll:S,hashScrollIntoView:m,startTransition:_,viewTransition:O,ignoreBlocker:ne})}};if(Ne)return{...x,ref:i,href:Ne,...E&&{children:E},...A&&{target:A},...U&&{disabled:U},...j&&{style:j},...L&&{className:L},...F&&{onClick:F},...V&&{onBlur:V},...H&&{onFocus:H},...K&&{onMouseEnter:K},...J&&{onMouseLeave:J},...ae&&{onTouchStart:ae}};const Wi=ze=>{if(U||Tn!=="intent")return;if(!zr){tn();return}const ct=ze.currentTarget;if(Ai.has(ct))return;const fn=setTimeout(()=>{Ai.delete(ct),tn()},zr);Ai.set(ct,fn)},cu=ze=>{U||Tn!=="intent"||tn()},bt=ze=>{if(U||!Tn||!zr)return;const ct=ze.currentTarget,fn=Ai.get(ct);fn&&(clearTimeout(fn),Ai.delete(ct))};return{...x,...En,...Zn,href:Fe?.href,ref:i,onClick:na([F,Aa]),onBlur:na([V,bt]),onFocus:na([H,Wi]),onMouseEnter:na([K,Wi]),onMouseLeave:na([J,bt]),onTouchStart:na([ae,cu]),disabled:!!U,target:A,...hn&&{style:hn},...Ta&&{className:Ta},...U&&_A,...Sn&&wA,...$&&Ra&&SA}}var qh={},bA={className:"active"},_A={role:"link","aria-disabled":!0},wA={"data-status":"active","aria-current":"page"},SA={"data-transitioning":"transitioning"},Ai=new WeakMap,EA={rootMargin:"100px"},na=e=>n=>{for(const s of e)if(s){if(n.defaultPrevented)return;s(n)}};function TA(e,n,s,i){if(!i)return n?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function RA(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}
12var jf=se.forwardRef((e,n)=>{const{_asChild:s,...i}=e,{type:l,...u}=vA(i,n),c=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;if(!s){const{disabled:f,...p}=u;return se.createElement("a",p,c)}return se.createElement(s,u,c)});function AA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var OA=class extends Lv{constructor(n){super(n),this.useMatch=s=>gs({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>Ab({...s,from:this.id}),this.useSearch=s=>Tb({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>Eb({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>Sb({...s,from:this.id}),this.useLoaderData=s=>wb({...s,from:this.id}),this.useNavigate=()=>Rb({from:this.fullPath}),this.Link=ba.forwardRef((s,i)=>Y.jsx(jf,{ref:i,from:this.fullPath,...s}))}};function CA(e){return new OA(e)}function kA(){return e=>jA(e)}var xA=class extends JS{constructor(e){super(e),this.useMatch=n=>gs({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ab({...n,from:this.id}),this.useSearch=n=>Tb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Eb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Sb({...n,from:this.id}),this.useLoaderData=n=>wb({...n,from:this.id}),this.useNavigate=()=>Rb({from:this.fullPath}),this.Link=ba.forwardRef((n,s)=>Y.jsx(jf,{ref:s,from:this.fullPath,...n}))}};function jA(e){return new xA(e)}function Jn(e){return new MA(e,{silent:!0}).createRoute}var MA=class{constructor(e,n){this.path=e,this.createRoute=s=>{const i=CA(s);return i.isRoot=!1,i},this.silent=n?.silent}};function wa(e,n){let s,i,l,u;const c=()=>(s||(s=e().then(p=>{s=void 0,i=p[n]}).catch(p=>{if(l=p,Vw(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(g)||(sessionStorage.setItem(g,"1"),u=!0)}})),s),f=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!i)if(Il)Il(c());else throw c();return se.createElement(i,g)};return f.preload=c,f}function UA(e){const n=vt(),s=`not-found-${nt(n.stores.location,i=>i.pathname)}-${nt(n.stores.status,i=>i)}`;return Y.jsx(Cf,{getResetKey:()=>s,onCatch:(i,l)=>{if(ut(i))e.onCatch?.(i,l);else throw i},errorComponent:({error:i})=>{if(ut(i))return e.fallback?.(i);throw i},children:e.children})}function NA(){return Y.jsx("p",{children:"Not Found"})}function la(e){return Y.jsx(Y.Fragment,{children:e.children})}function Cb(e,n,s){return n.options.notFoundComponent?Y.jsx(n.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?Y.jsx(e.options.defaultNotFoundComponent,{...s}):Y.jsx(NA,{})}function LA(e){return null}function DA(){return LA(vt()),null}var kb=se.memo(function({matchId:n}){const s=vt(),i=s.stores.matchStores.get(n);i||Ut();const l=nt(s.stores.loadedAt,c=>c),u=nt(i,c=>c);return Y.jsx(zA,{router:s,matchId:n,resetKey:l,matchState:se.useMemo(()=>{const c=u.routeId,f=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:f}},[u._displayPending,u.routeId,u.ssr,s.routesById])})});function zA({router:e,matchId:n,resetKey:s,matchState:i}){const l=e.routesById[i.routeId],u=l.options.pendingComponent??e.options.defaultPendingComponent,c=u?Y.jsx(u,{}):null,f=l.options.errorComponent??e.options.defaultErrorComponent,p=l.options.onCatch??e.options.defaultOnCatch,g=l.isRoot?l.options.notFoundComponent??e.options.notFoundRoute?.options.component:l.options.notFoundComponent,y=i.ssr===!1||i.ssr==="data-only",m=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||y))?se.Suspense:la,b=f?Cf:la,_=g?UA:la;return Y.jsxs(l.isRoot?l.options.shellComponent??la:la,{children:[Y.jsx(su.Provider,{value:n,children:Y.jsx(m,{fallback:c,children:Y.jsx(b,{getResetKey:()=>s,errorComponent:f||kf,onCatch:(S,O)=>{if(ut(S))throw S.routeId??=i.routeId,S;p?.(S,O)},children:Y.jsx(_,{fallback:S=>{if(S.routeId??=i.routeId,!g||S.routeId&&S.routeId!==i.routeId||!S.routeId&&
12!l.isRoot)throw S;return se.createElement(g,S)},children:y||i._displayPending?Y.jsx(rA,{fallback:c,children:Y.jsx(ky,{matchId:n})}):Y.jsx(ky,{matchId:n})})})})}),i.parentRouteId===hs?Y.jsxs(Y.Fragment,{children:[Y.jsx(PA,{resetKey:s}),e.options.scrollRestoration&&Tv?Y.jsx(DA,{}):null]}):null]})}function PA({resetKey:e}){const n=vt(),s=se.useRef(void 0);return Ci(()=>{const i=n.latestLocation.href;(s.current===void 0||s.current!==i)&&(n.emit({type:"onRendered",...ga(n.stores.location.get(),n.stores.resolvedLocation.get())}),s.current=i)},[n.latestLocation.state.__TSR_key,e,n]),null}var ky=se.memo(function({matchId:n}){const s=vt(),i=(y,m)=>s.getMatch(y.id)?._nonReactive[m]??y._nonReactive[m],l=s.stores.matchStores.get(n);l||Ut();const u=nt(l,y=>y),c=u.routeId,f=s.routesById[c],p=se.useMemo(()=>{const y=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return y?JSON.stringify(y):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,s.options.defaultRemountDeps,s.routesById]),g=se.useMemo(()=>{const y=f.options.component??s.options.defaultComponent;return y?Y.jsx(y,{},p):Y.jsx(xb,{})},[p,f.options.component,s.options.defaultComponent]);if(u._displayPending)throw i(u,"displayPendingPromise");if(u._forcePending)throw i(u,"minPendingPromise");if(u.status==="pending"){const y=f.options.pendingMinMs??s.options.defaultPendingMinMs;if(y){const m=s.getMatch(u.id);if(m&&!m._nonReactive.minPendingPromise){const b=ds();m._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),m._nonReactive.minPendingPromise=void 0},y)}}throw i(u,"loadPromise")}if(u.status==="notFound")return ut(u.error)||Ut(),Cb(s,f,u.error);if(u.status==="redirected")throw Mt(u.error)||Ut(),i(u,"loadPromise");if(u.status==="error")throw u.error;return g}),xb=se.memo(function(){const n=vt(),s=se.useContext(su);let i,l=!1,u;{const g=s?n.stores.matchStores.get(s):void 0;[i,l]=nt(g,y=>[y?.routeId,y?.globalNotFound??!1]),u=nt(n.stores.matchesId,y=>y[y.findIndex(m=>m===s)+1])}const c=i?n.routesById[i]:void 0,f=n.options.defaultPendingComponent?Y.jsx(n.options.defaultPendingComponent,{}):null;if(l)return c||Ut(),Cb(n,c,void 0);if(!u)return null;const p=Y.jsx(kb,{matchId:u});return i===hs?Y.jsx(se.Suspense,{fallback:f,children:p}):p});function BA(){const e=vt(),n=se.useRef({router:e,mounted:!1}),[s,i]=se.useState(!1),l=nt(e.stores.isLoading,m=>m),u=nt(e.stores.hasPending,m=>m),c=Dh(l),f=l||s||u,p=Dh(f),g=l||u,y=Dh(g);return e.startTransition=m=>{i(!0),se.startTransition(()=>{m(),i(!1)})},se.useEffect(()=>{const m=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return jr(e.latestLocation.publicHref)!==jr(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{m()}},[e,e.history]),Ci(()=>{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(b){console.error(b)}})()},[e]),Ci(()=>{c&&!l&&e.emit({type:"onLoad",...ga(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,l]),Ci(()=>{y&&!g&&e.emit({type:"onBeforeRouteMount",...ga(e.stores.location.get(),e.stores.resolvedLocation.get())})},[g,y,e]),Ci(()=>{if(p&&!f){const m=ga(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),bb(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),m.hrefChanged&&XS(e)}},[f,p,e]),null}function HA(){const e=vt(),n=e.routesById[hs].options.pendingComponent??e.options.defaultPendingComponent,s=n?Y.jsx(n,{}):null,i=Y.jsxs(typeof document<"u"&&e.ssr?la:se.Suspense,{fallback:s,children:[Y.jsx(BA,{}),Y.jsx(qA,{})]});return e.options.InnerWrap?Y.jsx(e.options.InnerWrap,{children:i}):i}function qA(){const e=vt(),n=nt(e.stores.firstId,l=>l),s=nt(e.stores.loadedAt,l=>l),i=n?Y.jsx(kb,{matchId:n}):null;return Y.jsx(su.Provider,{value:n,children:e.options.disableGlobalCatchBoundary?i:Y.jsx(Cf,{getResetKey:()=>s,errorComponent:kf,onCatch:void 0,children:i})})}var IA=e=>({createMutableStore:Ty,createReadonlyStore:Ty,batch:bb}),$A=e=>new GA(e),GA=class extends PS{constructor(e){super(e,IA)}};function VA({router:e,children:n,...s}){Object.keys(s).length>0&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const i=Y.jsx(yb.Provider,{value:e,children:n});return e.options.Wrap?Y.jsx(e.options.Wrap,{children:i}):i}function KA({router:e,...n}){return Y.jsx(VA,{router:e,...n,children:Y.jsx(HA,{})})}function jb(e){const{attrs:n,children:s,nonce:i}=e;switch(e.tag){case"title":return Y.jsx("title",{...n,suppressHydrationWarning:!0,children:s});case"meta":return Y.jsx("meta",{...n,suppressHydrationWarning:!0});case"link":return Y.jsx("link",{...n,precedence:n?.precedence??(n?.rel==="stylesheet"?"default":void 0),nonce:i,suppressHydrationWarning:!0});case"style":return e.inlineCss,Y.jsx("style",{...n,dangerouslySetInnerHTML:{__html:s},nonce:i});case"script":return Y.jsx(YA,{attrs:n,children:s});default:return null}}function YA({attrs:e,children:n}){vt();const s=xf(),i=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(se.useEffect(()=>{if(!i){if(e?.src){const l=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===l))return;const u=document.createElement("script");for(const[c,f]of Object.entries(e))c!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&u.setAttribute(c,typeof f=="boolean"?"":String(f));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(f=>{if(!(f instanceof HTMLScriptElement))return!1;const p=f.getAttribute("type")??"text/javascript",g=f.getAttribute("nonce")??void 0;return f.textContent===n&&p===l&&g===u}))return;const c=document.createElement("script");
12if(c.textContent=n,e)for(const[f,p]of Object.entries(e))f!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(f,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[e,n,i]),i&&typeof n=="string")return Y.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n}});if(!s){if(e?.src)return Y.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof n=="string")return Y.jsx("script",{...e,dangerouslySetInnerHTML:{__html:n},suppressHydrationWarning:!0})}return null}var FA=e=>{const n=vt(),s=n.options.ssr?.nonce,i=nt(n.stores.matches,g=>g.map(y=>y.meta).filter(Boolean),jt),l=se.useMemo(()=>{const g=[],y={};let m;for(let b=i.length-1;b>=0;b--){const _=i[b];for(let S=_.length-1;S>=0;S--){const O=_[S];if(O)if(O.title)m||(m={tag:"title",children:O.title});else if("script:ld+json"in O)try{const E=JSON.stringify(O["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:Jw(E)})}catch{}else{const E=O.name??O.property;if(E){if(y[E])continue;y[E]=!0}g.push({tag:"meta",attrs:{...O,nonce:s}})}}}return m&&g.push(m),s&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),g.reverse(),g},[i,s]),u=nt(n.stores.matches,g=>{const y=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),m=n.ssr?.manifest,b=g.map(_=>m?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?QS(m,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:ly(e,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},jt),c=nt(n.stores.matches,g=>{const y=[];return g.map(m=>n.looseRoutesById[m.routeId]).forEach(m=>n.ssr?.manifest?.routes[m.id]?.preloads?.filter(Boolean).forEach(b=>{const _=YS(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:ly(e,"modulepreload")??_.crossOrigin,nonce:s}})})),y},jt),f=nt(n.stores.matches,g=>g.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"style",attrs:{...m,nonce:s},children:y})),jt),p=nt(n.stores.matches,g=>g.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...m})=>({tag:"script",attrs:{...m,nonce:s},children:y})),jt);return QA([...l,...c,...u,...f,...p],g=>JSON.stringify(g))};function QA(e,n){const s=new Set;return e.filter(i=>{const l=n(i);return s.has(l)?!1:(s.add(l),!0)})}function JA(e){const n=FA(e.assetCrossOrigin),s=vt().options.ssr?.nonce;return Y.jsx(Y.Fragment,{children:n.map(i=>se.createElement(jb,{...i,key:`tsr-meta-${JSON.stringify(i)}`,nonce:s}))})}var XA=()=>{const e=vt(),n=e.options.ssr?.nonce,s=u=>{const c=[],f=e.ssr?.manifest;return f?(u.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>f.routes[p.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:n},children:g.children})})),c):[]},i=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...f})=>({tag:"script",attrs:{...f,suppressHydrationWarning:!0,nonce:n},children:c})),l=nt(e.stores.matches,s,jt);return ZA(e,nt(e.stores.matches,i,jt),l)};function ZA(e,n,s){let i;e.serverSsr&&(i=e.serverSsr.takeBufferedScripts());const l=[...n,...s];return i&&l.unshift(i),Y.jsx(Y.Fragment,{children:l.map((u,c)=>se.createElement(jb,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var us=(e,n)=>{const s={type:"request",...n||e};return{options:s,middleware:i=>us({},Object.assign(s,{middleware:i})),inputValidator:i=>us({},Object.assign(s,{inputValidator:i})),client:i=>us({},Object.assign(s,{client:i})),server:i=>us({},Object.assign(s,{server:i}))}};function Mb(e,n){for(let s=0,i=n.length;s<i;s++){const l=n[s];e.has(l)||(e.add(l),l.extends&&Mb(e,l.extends))}}var WA=e=>({getOptions:async()=>{const n=await e();if(n.serializationAdapters){const s=new Set;Mb(s,n.serializationAdapters),n.serializationAdapters=Array.from(s)}return n},createMiddleware:us});function e1(e,n,s,i){function l(u){return u instanceof s?u:new s(function(c){c(u)})}
12return new(s||(s=Promise))(function(u,c){function f(y){try{g(i.next(y))}catch(m){c(m)}}function p(y){try{g(i.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(f,p)}g((i=i.apply(e,n||[])).next())})}const t1=e=>e?(...n)=>e(...n):(...n)=>fetch(...n);class Mf extends Error{constructor(n,s="FunctionsError",i){super(n),this.name=s,this.context=i}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class n1 extends Mf{constructor(n){super("Failed to send a request to the Edge Function","FunctionsFetchError",n)}}class xy extends Mf{constructor(n){super("Relay Error invoking the Edge Function","FunctionsRelayError",n)}}class jy extends Mf{constructor(n){super("Edge Function returned a non-2xx status code","FunctionsHttpError",n)}}var nf;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(nf||(nf={}));class r1{constructor(n,{headers:s={},customFetch:i,region:l=nf.Any}={}){this.url=n,this.headers=s,this.region=l,this.fetch=t1(i)}setAuth(n){this.headers.Authorization=`Bearer ${n}`}invoke(n){return e1(this,arguments,void 0,function*(s,i={}){var l;let u,c;try{const{headers:f,method:p,body:g,signal:y,timeout:m}=i;let b={},{region:_}=i;_||(_=this.region);const S=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let O;g&&(f&&!Object.prototype.hasOwnProperty.call(f,"Content-Type")||!f)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",O=g):typeof g=="string"?(b["Content-Type"]="text/plain",O=g):typeof FormData<"u"&&g instanceof FormData?O=g:(b["Content-Type"]="application/json",O=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?O=JSON.stringify(g):O=g;let E=y;m&&(c=new AbortController,u=setTimeout(()=>c.abort(),m),y?(E=c.signal,y.addEventListener("abort",()=>c.abort())):E=c.signal);const A=yield this.fetch(S.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),f),body:O,signal:E}).catch(F=>{throw new n1(F)}),U=A.headers.get("x-relay-error");if(U&&U==="true")throw new xy(A);if(!A.ok)throw new jy(A);let j=((l=A.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),L;return j==="application/json"?L=yield A.json():j==="application/octet-stream"||j==="application/pdf"?L=yield A.blob():j==="text/event-stream"?L=A:j==="multipart/form-data"?L=yield A.formData():L=yield A.text(),{data:L,error:null,response:A}}catch(f){return{data:null,error:f,response:f instanceof jy||f instanceof xy?f.context:void 0}}finally{u&&clearTimeout(u)}})}}const Ub=3,My=e=>Math.min(1e3*2**e,3e4),s1=[520,503],Nb=["GET","HEAD","OPTIONS"];var a1=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
12de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Uy(e,n){return new Promise(s=>{if(n?.aborted){s();return}const i=setTimeout(()=>{n?.removeEventListener("abort",l),s()},e);function l(){clearTimeout(i),s()}n?.addEventListener("abort",l)})}function i1(e,n,s,i){return!(!i||s>=Ub||!Nb.includes(e)||!s1.includes(n))}var o1=class{constructor(e){var n,s,i,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(n=e.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=e.signal,this.isMaybeSingle=(s=e.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(i=e.shouldStripNulls)!==null&&i!==void 0?i:!1,this.urlLengthLimit=(l=e.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u=e.retry)!==null&&u!==void 0?u:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,n){return this.headers=new Headers(this.headers),this.headers.set(e,n),this}retry(e){return this.retryEnabled=e,this}then(e,n){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const i=this.fetch;let u=(async()=>{let c=0;for(;;){const g=new Headers(s.headers);c>0&&g.set("X-Retry-Count",String(c));let y;try{y=await i(s.url.toString(),{method:s.method,headers:g,body:JSON.stringify(s.body,(m,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(m){if(m?.name==="AbortError"||m?.code==="ABORT_ERR"||!Nb.includes(s.method))throw m;if(s.retryEnabled&&c<Ub){const b=My(c);c++,await Uy(b,s.signal);continue}throw m}if(i1(s.method,y.status,c,s.retryEnabled)){var f,p;const m=(f=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&f!==void 0?f:null,b=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:My(c);await y.text(),c++,await Uy(b,s.signal);continue}return await s.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var f;let p="",g="",y="";const m=c?.cause;if(m){var b,_,S,O;const U=(b=m?.message)!==null&&b!==void 0?b:"",j=(_=m?.code)!==null&&_!==void 0?_:"";p=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,p+=` 13 14Caused by: ${(O=m?.name)!==null&&O!==void 0?O:"Error"}: ${U}`,j&&(p+=` (${j})`),m?.stack&&(p+=` 15${m.stack}`)}else{var E;p=(E=c?.stack)!==null&&E!==void 0?E:""}const A=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",g="Request was aborted (timeout or manual cancellation)",A>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${A} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(m?.name==="HeadersOverflowError"||m?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",g="HTTP headers exceeded server limits (typically 16KB)",A>this.urlLengthLimit&&(g+=`. Your request URL is ${A} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(f=c?.name)!==null&&f!==void 0?f:"FetchError"}: ${c?.message}`,details:p,hint:g,code:y},data:null,count:null,status:0,statusText:""}})),u.then(e,n)}async processResponse(e){var n=this;let s=null,i=null,l=null,u=e.status,c=e.statusText;if(e.ok){var f,p;if(n.method!=="HEAD"){var g;const b=await e.text();b===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((g=n.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text"))?i=b:i=JSON.parse(b))}const y=(f=n.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),m=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&m&&m.length>1&&(l=parseInt(m[1])),n.isMaybeSingle&&Array.isArray(i)&&(i.length>1?(s={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,l=null,u=406,c="Not Acceptable"):i.length===1?i=i[0]:i=null)}else{const y=await e.text();try{s=JSON.parse(y),Array.isArray(s)&&e.status===404&&(i=[],s=null,u=200,c="OK")}catch{e.status===404&&y===""?(u=204,c="No Content"):s={message:y}}if(s&&n.shouldThrowOnError)throw new a1(s)}return{success:s===null,error:s,data:i,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},l1=class extends o1{select(e){let n=!1;const s=(e??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:n=!0,nullsFirst:s,foreignTable:i,referencedTable:l=i}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${e}.${n?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:n,referencedTable:s=n}={}){const i=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${e}`),this}range(e,n,{foreignTable:s,referencedTable:i=s}={}){const l=typeof i>"u"?"offset":`${i}.offset`,u=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(l,`${e}`),this.url.searchParams.set(u,`${n-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
15explain({analyze:e=!1,verbose:n=!1,settings:s=!1,buffers:i=!1,wal:l=!1,format:u="text"}={}){var c;const f=[e?"analyze":null,n?"verbose":null,s?"settings":null,i?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${f};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Ny=new RegExp("[,()]");var ua=class extends l1{eq(e,n){return this.url.searchParams.append(e,`eq.${n}`),this}neq(e,n){return this.url.searchParams.append(e,`neq.${n}`),this}gt(e,n){return this.url.searchParams.append(e,`gt.${n}`),this}gte(e,n){return this.url.searchParams.append(e,`gte.${n}`),this}lt(e,n){return this.url.searchParams.append(e,`lt.${n}`),this}lte(e,n){return this.url.searchParams.append(e,`lte.${n}`),this}like(e,n){return this.url.searchParams.append(e,`like.${n}`),this}likeAllOf(e,n){return this.url.searchParams.append(e,`like(all).{${n.join(",")}}`),this}likeAnyOf(e,n){return this.url.searchParams.append(e,`like(any).{${n.join(",")}}`),this}ilike(e,n){return this.url.searchParams.append(e,`ilike.${n}`),this}ilikeAllOf(e,n){return this.url.searchParams.append(e,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(e,n){return this.url.searchParams.append(e,`ilike(any).{${n.join(",")}}`),this}regexMatch(e,n){return this.url.searchParams.append(e,`match.${n}`),this}regexIMatch(e,n){return this.url.searchParams.append(e,`imatch.${n}`),this}is(e,n){return this.url.searchParams.append(e,`is.${n}`),this}isDistinct(e,n){return this.url.searchParams.append(e,`isdistinct.${n}`),this}in(e,n){const s=Array.from(new Set(n)).map(i=>typeof i=="string"&&Ny.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}notIn(e,n){const s=Array.from(new Set(n)).map(i=>typeof i=="string"&&Ny.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`not.in.(${s})`),this}contains(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cs.{${n.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(n)}`),this}containedBy(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cd.{${n.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(n)}`),this}rangeGt(e,n){return this.url.searchParams.append(e,`sr.${n}`),this}rangeGte(e,n){return this.url.searchParams.append(e,`nxl.${n}`),this}rangeLt(e,n){return this.url.searchParams.append(e,`sl.${n}`),this}rangeLte(e,n){return this.url.searchParams.append(e,`nxr.${n}`),this}rangeAdjacent(e,n){return this.url.searchParams.append(e,`adj.${n}`),this}overlaps(e,n){return typeof n=="string"?this.url.searchParams.append(e,`ov.${n}`):this.url.searchParams.append(e,`ov.{${n.join(",")}}`),this}textSearch(e,n,{config:s,type:i}={}){let l="";i==="plain"?l="pl":i==="phrase"?l="ph":i==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(e,`${l}fts${u}.${n}`),this}match(e){return Object.entries(e).filter(([n,s])=>s!==void 0).forEach(([n,s])=>{this.url.searchParams.append(n,`eq.${s}`)}),this}not(e,n,s){return this.url.searchParams.append(e,`not.${n}.${s}`),this}or(e,{foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.or`:"or";return this.url.searchParams.append(i,`(${e})`),this}filter(e,n,s){return this.url.searchParams.append(e,`${n}.${s}`),this}},u1=class{constructor(e,{headers:n={},schema:s,fetch:i,urlLengthLimit:l=8e3,retry:u}){this.url=e,this.headers=new Headers(n),this.schema=s,this.fetch=i,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,n){const{head:s=!1,count:i}=n??{},l=s?"HEAD":"GET";let u=!1;const c=(e??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:f,headers:p}=this.cloneRequestState();return f.searchParams.set("select",c),i&&p.append("Prefer",`count=${i}`),new ua({method:l,url:f,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:n,defaultToNull:s=!0}={}){var i;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(n&&c.append("Prefer",`count=${n}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const f=e.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(f.length>0){const p=[...new Set(f)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new ua({method:l,url:u,headers:c,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:n,ignoreDuplicates:s=!1,count:i,defaultToNull:l=!0}={}){var u;const c="POST",{url:f,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),n!==void 0&&f.searchParams.set("on_conflict",n),i&&p.append("Prefer",`count=${i}`),l||p.append("Prefer","missing=default"),Array.isArray(e)){const g=e.reduce((y,m)=>y.concat(Object.keys(m)),[]);if(g.length>0){const y=[...new Set(g)].map(m=>`"${m}"`);f.searchParams.set("columns",y.join(","))}}return new ua({method:c,url:f,headers:p,schema:this.schema,body:e,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:n}={}){var s;const i="PATCH",{url:l,headers:u}=this.cloneRequestState();return n&&u.append("Prefer",`count=${n}`),new ua({method:i,url:l,headers:u,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var n;const s="DELETE",{url:i,headers:l}=this.cloneRequestState();return e&&l.append("Prefer",`count=${e}`),new ua({method:s,url:i,headers:l,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bi(e)}function c1(e,n){if(Bi(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,n);if(Bi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function h1(e){var n=c1(e,"string");return Bi(n)=="symbol"?n:n+""}function f1(e,n,s){return(n=h1(n))in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}function Ly(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,i)}return s}function Sl(e){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};
15n%2?Ly(Object(s),!0).forEach(function(i){f1(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Ly(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}var d1=class Lb{constructor(n,{headers:s={},schema:i,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:f}={}){this.url=n,this.headers=new Headers(s),this.schemaName=i,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,y)=>{const m=new AbortController,b=setTimeout(()=>m.abort(),u),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,y);const S=()=>{clearTimeout(b),m.abort()};return _.addEventListener("abort",S,{once:!0}),p(g,Sl(Sl({},y),{},{signal:m.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return p(g,Sl(Sl({},y),{},{signal:m.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=f}from(n){if(!n||typeof n!="string"||n.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new u1(new URL(`${this.url}/${n}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(n){return new Lb(this.url,{headers:this.headers,schema:n,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(n,s={},{head:i=!1,get:l=!1,count:u}={}){var c;let f;const p=new URL(`${this.url}/rpc/${n}`);let g;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),m=i&&Object.values(s).some(y);m?(f="POST",g=s):i||l?(f=i?"HEAD":"GET",Object.entries(s).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{p.searchParams.append(_,S)})):(f="POST",g=s);const b=new Headers(this.headers);return m?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new ua({method:f,url:p,headers:b,schema:this.schemaName,body:g,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class p1{constructor(){}static detectEnvironment(){var n;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const i=typeof global<"u"?global:void 0;if(i&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((n=navigator.userAgent)===null||n===void 0)&&n.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const l=globalThis.process;if(l){const u=l.versions;if(u&&u.node){const c=u.node,f=parseInt(c.replace(/^v/,"").split(".")[0]);return f>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${f} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${f} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const n=this.detectEnvironment();if(n.wsConstructor)return n.wsConstructor;let s=n.error||"WebSocket not supported in this environment.";throw n.workaround&&(s+=` 18 19Suggested solution: ${n.workaround}`),new Error(s)}static isWebSocketSupported(){try{const n=this.detectEnvironment();return n.type==="native"||n.type==="ws"}catch{return!1}}}const g1="2.105.4",m1=`realtime-js/${g1}`,y1="1.0.0",Db="2.0.0",v1=Db,b1=1e4,_1=100,Ar={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},zb={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},rf={connecting:"connecting",closing:"closing",closed:"closed"};class w1{constructor(n){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=n??[]}
19encode(n,s){if(n.event===this.BROADCAST_EVENT&&!(n.payload instanceof ArrayBuffer)&&typeof n.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(n));let i=[n.join_ref,n.ref,n.topic,n.event,n.payload];return s(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(n){var s;return this._isArrayBuffer((s=n.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(n):this._encodeJsonUserBroadcastPush(n)}_encodeBinaryUserBroadcastPush(n){var s,i;const l=(i=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(n,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(n){var s,i;const l=(i=(s=n.payload)===null||s===void 0?void 0:s.payload)!==null&&i!==void 0?i:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(n,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(n,s,i){var l,u;const c=n.topic,f=(l=n.ref)!==null&&l!==void 0?l:"",p=(u=n.join_ref)!==null&&u!==void 0?u:"",g=n.payload.event,y=this.allowedMetadataKeys?this._pick(n.payload,this.allowedMetadataKeys):{},m=Object.keys(y).length===0?"":JSON.stringify(y);if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`metadata length ${m.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+f.length+c.length+g.length+m.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),O=0;S.setUint8(O++,this.KINDS.userBroadcastPush),S.setUint8(O++,p.length),S.setUint8(O++,f.length),S.setUint8(O++,c.length),S.setUint8(O++,g.length),S.setUint8(O++,m.length),S.setUint8(O++,s),Array.from(p,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(f,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(c,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(g,A=>S.setUint8(O++,A.charCodeAt(0))),Array.from(m,A=>S.setUint8(O++,A.charCodeAt(0)));var E=new Uint8Array(_.byteLength+i.byteLength);return E.set(new Uint8Array(_),0),E.set(new Uint8Array(i),_.byteLength),E.buffer}decode(n,s){if(this._isArrayBuffer(n)){let i=this._binaryDecode(n);return s(i)}if(typeof n=="string"){const i=JSON.parse(n),[l,u,c,f,p]=i;return s({join_ref:l,ref:u,topic:c,event:f,payload:p})}return s({})}_binaryDecode(n){const s=new DataView(n),i=s.getUint8(0),l=new TextDecoder;if(i===this.KINDS.userBroadcast)return this._decodeUserBroadcast(n,s,l)}_decodeUserBroadcast(n,s,i){const l=s.getUint8(1),u=s.getUint8(2),c=s.getUint8(3),f=s.getUint8(4);let p=this.HEADER_LENGTH+4;const g=i.decode(n.slice(p,p+l));p=p+l;const y=i.decode(n.slice(p,p+u));p=p+u;const m=i.decode(n.slice(p,p+c));p=p+c;const b=n.slice(p,n.byteLength),_=f===this.JSON_ENCODING?JSON.parse(i.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(S.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(n){var s;return n instanceof ArrayBuffer||((s=n?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(n,s){return!n||typeof n!="object"?{}:Object.fromEntries(Object.entries(n).filter(([i])=>s.includes(i)))}}var Pe;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Pe||(Pe={}));const Dy=(e,n,s={})=>{var i;const l=(i=s.skipTypes)!==null&&i!==void 0?i:[];return n?Object.keys(n).reduce((u,c)=>(u[c]=S1(c,e,n,l),u),{}):{}},S1=(e,n,s,i)=>{const l=n.find(f=>f.name===e),u=l?.type,c=s[e];return u&&!i.includes(u)?Pb(u,c):sf(c)},Pb=(e,n)=>{if(e.charAt(0)==="_"){const s=e.slice(1,e.length);return A1(n,s)}switch(e){case Pe.bool:return E1(n);case Pe.float4:case Pe.float8:case Pe.int2:case Pe.int4:case Pe.int8:case Pe.numeric:case Pe.oid:return T1(n);case Pe.json:case Pe.jsonb:return R1(n);case Pe.timestamp:return O1(n);case Pe.abstime:case Pe.date:case Pe.daterange:case Pe.int4range:case Pe.int8range:case Pe.money:case Pe.reltime:case Pe.text:case Pe.time:case Pe.timestamptz:case Pe.timetz:case Pe.tsrange:case Pe.tstzrange:return sf(n);default:return sf(n)}},sf=e=>e,E1=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},T1=e=>{if(typeof e=="string"){const n=parseFloat(e);
19if(!Number.isNaN(n))return n}return e},R1=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},A1=(e,n)=>{if(typeof e!="string")return e;const s=e.length-1,i=e[s];if(e[0]==="{"&&i==="}"){let u;const c=e.slice(1,s);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(f=>Pb(n,f))}return e},O1=e=>typeof e=="string"?e.replace(" ","T"):e,Bb=e=>{const n=new URL(e);return n.protocol=n.protocol.replace(/^ws/i,"http"),n.pathname=n.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),n.pathname===""||n.pathname==="/"?n.pathname="/api/broadcast":n.pathname=n.pathname+"/api/broadcast",n.href};var ji=e=>typeof e=="function"?e:function(){return e},C1=typeof self<"u"?self:null,ca=typeof window<"u"?window:null,bn=C1||ca||globalThis,k1="2.0.0",x1=1e4,j1=1e3,wn={connecting:0,open:1,closing:2,closed:3},xt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Vn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},af={longpoll:"longpoll",websocket:"websocket"},M1={complete:4},of="base64url.bearer.phx.",El=class{constructor(e,n,s,i){this.channel=e,this.event=n,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,n){return this.hasReceived(e)&&n(this.receivedResp.response),this.recHooks.push({status:e,callback:n}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:n,_ref:s}){this.recHooks.filter(i=>i.status===e).forEach(i=>i.callback(n))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,n){this.channel.trigger(this.refEvent,{status:e,response:n})}},Hb=class{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},U1=class{constructor(e,n,s){this.state=xt.closed,this.topic=e,this.params=ji(n||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new El(this,Vn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Hb(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=xt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",i=>{this.state=xt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=xt.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=xt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new El(this,Vn.leave,ji({}),this.timeout).send(),this.state=xt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Vn.reply,(i,l)=>{this.trigger(this.replyEventName(l),i)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
19teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=xt.closed,this.bindings=[]}onClose(e){this.on(Vn.close,e)}onError(e){return this.on(Vn.error,n=>e(n))}on(e,n){let s=this.bindingRef++;return this.bindings.push({event:e,ref:s,callback:n}),s}off(e,n){this.bindings=this.bindings.filter(s=>!(s.event===e&&(typeof n>"u"||n===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,n,s=this.timeout){if(n=n||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new El(this,e,function(){return n},s);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=xt.leaving;let n=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Vn.close,"leave")},s=new El(this,Vn.leave,ji({}),e);return s.receive("ok",()=>n()).receive("timeout",()=>n()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(e,n,s){return n}filterBindings(e,n,s){return!0}isMember(e,n,s,i){return this.topic!==e?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:n,payload:s,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=xt.joining,this.joinPush.resend(e))}trigger(e,n,s,i){let l=this.onMessage(e,n,s,i);if(n&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===e&&this.filterBindings(c,n,s));for(let c=0;c<u.length;c++)u[c].callback(l,s,i||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===xt.closed}isErrored(){return this.state===xt.errored}isJoined(){return this.state===xt.joined}isJoining(){return this.state===xt.joining}isLeaving(){return this.state===xt.leaving}},Gl=class{static request(e,n,s,i,l,u,c){if(bn.XDomainRequest){let f=new bn.XDomainRequest;return this.xdomainRequest(f,e,n,i,l,u,c)}else if(bn.XMLHttpRequest){let f=new bn.XMLHttpRequest;return this.xhrRequest(f,e,n,s,i,l,u,c)}else{if(bn.fetch&&bn.AbortController)return this.fetchRequest(e,n,s,i,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,n,s,i,l,u,c){let f={method:e,headers:s,body:i},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),f.signal=p.signal),bn.fetch(n,f).then(g=>g.text()).then(g=>this.parseJSON(g)).then(g=>c&&c(g)).catch(g=>{g.name==="AbortError"&&u?u():c&&c(null)}),p}static xdomainRequest(e,n,s,i,l,u,c){return e.timeout=l,e.open(n,s),e.onload=()=>{let f=this.parseJSON(e.responseText);c&&c(f)},u&&(e.ontimeout=u),e.onprogress=()=>{},e.send(i),e}static xhrRequest(e,n,s,i,l,u,c,f){e.open(n,s,!0),e.timeout=u;for(let[p,g]of Object.entries(i))e.setRequestHeader(p,g);return e.onerror=()=>f&&f(null),e.onreadystatechange=()=>{if(e.readyState===M1.complete&&f){let p=this.parseJSON(e.responseText);f(p)}},c&&(e.ontimeout=c),e.send(l),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,n){let s=[];for(var i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let l=n?`${n}[${i}]`:i,u=e[i];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(e,n){if(Object.keys(n).length===0)return e;let s=e.match(/\?/)?"&":"?";return`${e}${s}${this.serialize(n)}`}},N1=e=>{let n="",s=new Uint8Array(e),i=s.byteLength;for(let l=0;l<i;l++)n+=String.fromCharCode(s[l]);return btoa(n)},ra=class{constructor(e,n){n&&n.length===2&&n[1].startsWith(of)&&(this.authToken=atob(n[1].slice(of.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){}
vendor: 1,073 bytes, line 19
19,this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=wn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+af.websocket),"$1/"+af.longpoll)}endpointURL(){return Gl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,n,s){this.close(e,n,s),this.readyState=wn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===wn.open||this.readyState===wn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),n=>{if(n){var{status:s,token:i,messages:l}=n;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else s=0;switch(s){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=wn.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${s}`)}})}send(e){typeof e!="string"&&(e=N1(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 20`),()=>this.onerror("timeout"),n=>{this.awaitingBatchAck=!1,!n||n.status!==200?(this.onerror(n&&n.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,n,s){for(let l of this.reqs)l.abort();this.readyState=wn.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:n,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(e,n,s,i,l){let u,c=()=>{this.reqs.delete(u),i()};u=Gl.request(e,this.endpointURL(),n,s,this.timeout,c,f=>{this.reqs.delete(u),this.isActive()&&l(f)}),this.reqs.add(u)}},L1=class ki{constructor(n,s={}){let i=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=n,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(i.state,l=>{let{onJoin:u,onLeave:c,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ki.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=ki.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],f()}),this.channel.on(i.diff,l=>{let{onJoin:u,onLeave:c,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=ki.syncDiff(this.state,l,u,c),f())})}onJoin(n){this.caller.onJoin=n}onLeave(n){this.caller.onLeave=n}onSync(n){this.caller.onSync=n}list(n){return ki.list(this.state,n)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(n,s,i,l){let u=this.clone(n),c={},f={};return this.map(u,(p,g)=>{s[p]||(f[p]=g)}),this.map(s,(p,g)=>{let y=u[p];if(y){let m=g.metas.map(O=>O.phx_ref),b=y.metas.map(O=>O.phx_ref),_=g.metas.filter(O=>b.indexOf(O.phx_ref)<0),S=y.metas.filter(O=>m.indexOf(O.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),S.length>0&&(f[p]=this.clone(y),f[p].metas=S)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:f},i,l)}static syncDiff(n,s,i,l){let{joins:u,leaves:c}=this.clone(s);return i||(i=function(){}),l||(l=function(){}),this.map(u,(f,p)=>{let g=n[f];if(n[f]=this.clone(p),g){let y=n[f].metas.map(b=>b.phx_ref),m=g.metas.filter(b=>y.indexOf(b.phx_ref)<0);n[f].metas.unshift(...m)}i(f,g,p)}),this.map(c,(f,p)=>{let g=n[f];if(!g)return;let y=p.metas.map(m=>m.phx_ref);g.metas=g.metas.filter(m=>y.indexOf(m.phx_ref)<0),l(f,g,p),g.metas.length===0&&delete n[f]}),n}static list(n,s){return s||(s=function(i,l){return l}),this.map(n,(i,l)=>s(i,l))}static map(n,s){return Object.getOwnPropertyNames(n).map(i=>s(i,n[i]))}static clone(n){return JSON.parse(JSON.stringify(n))}},Tl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,n){if(e.payload.constructor===ArrayBuffer)return n(this.binaryEncode(e));{let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(s))}},decode(e,n){if(e.constructor===ArrayBuffer)return n(this.binaryDecode(e));{let[s,i,l,u,c]=JSON.parse(e);return n({join_ref:s,ref:i,topic:l,event:u,payload:c})}},binaryEncode(e){let{join_ref:n,ref:s,event:i,topic:l,payload:u}=e,c=this.META_LENGTH+n.length+s.length+l.length+i.length,f=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(f),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,n.length),p.setUint8(g++,s.length),p.setUint8(g++,l.length),p.setUint8(g++,i.length),Array.from(n,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(s,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(l,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(i,m=>p.setUint8(g++,m.charCodeAt(0)));var y=new Uint8Array(f.byteLength+u.byteLength);return y.set(new Uint8Array(f),0),y.set(new Uint8Array(u),f.byteLength),y.buffer},binaryDecode(e){let n=new DataView(e),s=n.getUint8(0),i=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(e,n,i);case this.KINDS.reply:return this.decodeReply(e,n,i);case this.KINDS.broadcast:return this.decodeBroadcast(e,n,i)}},decodePush(e,n,s){let i=n.getUint8(1),l=n.getUint8(2),u=n.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,f=s.decode(e.slice(c,c+i));c=c+i;let p=s.decode(e.slice(c,c+l));c=c+l;let g=s.decode(e.slice(c,c+u));c=c+u;let y=e.slice(c,e.byteLength);return{join_ref:f,ref:null,topic:p,event:g,payload:y}},decodeReply(e,n,s){let i=n.getUint8(1),l=n.getUint8(2),u=n.getUint8(3),c=n.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(e.slice(f,f+i));f=f+i;let g=s.decode(e.slice(f,f+l));f=f+l;let y=s.decode(e.slice(f,f+u));f=f+u;let m=s.decode(e.slice(f,f+c));f=f+c;let b=e.slice(f,e.byteLength),_={status:m,response:b};return{join_ref:p,ref:g,topic:y,event:Vn.reply,payload:_}},decodeBroadcast(e,n,s){let i=n.getUint8(1),l=n.getUint8(2),u=this.HEADER_LENGTH+2,c=s.decode(e.slice(u,u+i));u=u+i;let f=s.decode(e.slice(u,u+l));u=u+l;let p=e.slice(u,e.byteLength);return{join_ref:null,ref:null,topic:c,event:f,payload:p}}},D1=class{constructor(e,n={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=n.timeout||x1,this.transport=n.transport||bn.WebSocket||ra,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=n.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=bn&&bn.sessionStorage}catch{}this.sessionStore=n.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=Tl.encode.bind(Tl),this.defaultDecoder=Tl.decode.bind(Tl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=n.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ra?(this.encode=n.encode||this.defaultEncoder,this.decode=n.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;ca&&ca.addEventListener&&(ca.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),i=this.connectClock)}),ca.addEventListener("pageshow",l=>{i===this.connectClock&&(i=null,this.connect())}),ca.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=n.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=n.autoSendHeartbeat??!0,this.heartbeatCallback=n.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>n.rejoinAfterMs?n.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>n.reconnectAfterMs?n.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=n.logger||null,!this.logger&&n.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=n.longpollerTimeout||2e4,this.params=ji(n.params||{}),this.endPoint=`${e}/${af.websocket}`,this.vsn=n.vsn||k1,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Hb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{n.beforeReconnect&&await n.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=n.authToken}getLongPollTransport(){return ra}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.
vendor: 4,337 bytes, line 20
20close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Gl.appendParams(Gl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,n,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},n,s)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ji(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ra?this.connectWithFallback(ra,this.longPollFallbackMs):this.transportConnect())}log(e,n,s){this.logger&&this.logger(e,n,s)}hasLogger(){return this.logger!==null}onOpen(e){let n=this.makeRef();return this.stateChangeCallbacks.open.push([n,e]),n}onClose(e){let n=this.makeRef();return this.stateChangeCallbacks.close.push([n,e]),n}onError(e){let n=this.makeRef();return this.stateChangeCallbacks.error.push([n,e]),n}onMessage(e){let n=this.makeRef();return this.stateChangeCallbacks.message.push([n,e]),n}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let n=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:n});let i=this.onMessage(l=>{l.ref===n&&(this.off([i]),e(Date.now()-s))});return!0}transportName(e){return e===ra?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${of}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=n=>this.onConnError(n),this.conn.onmessage=n=>this.onConnMessage(n),this.conn.onclose=n=>this.onConnClose(n)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,n){this.sessionStore&&this.sessionStore.setItem(e,n)}connectWithFallback(e,n=2500){clearTimeout(this.fallbackTimer);let s=!1,i=!0,l,u,c=this.transportName(e),f=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),i=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return f("memorized");this.fallbackTimer=setTimeout(f,n),u=this.onError(p=>{this.log("transport","error",p),i&&!s&&(clearTimeout(this.fallbackTimer),f(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!i){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,n),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),j1,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,n,s){if(!this.conn)return e&&e();const i=this.conn;this.waitForBufferDone(i,()=>{n?i.close(n,s||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 4,785 bytes, line 20
20,this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,n,s=1){if(s===5||!e.bufferedAmount){n();return}setTimeout(()=>{this.waitForBufferDone(e,n,s+1)},150*s)}waitForSocketClosed(e,n,s=1){if(s===5||e.readyState===wn.closed){n();return}setTimeout(()=>{this.waitForSocketClosed(e,n,s+1)},150*s)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let n=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",e,n,s),(n===this.transport||s>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(n=>{n.isErrored()||n.isLeaving()||n.isClosed()||n.trigger(Vn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case wn.connecting:return"connecting";case wn.open:return"open";case wn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(n=>n!==e)}off(e){for(let n in this.stateChangeCallbacks)this.stateChangeCallbacks[n]=this.stateChangeCallbacks[n].filter(([s])=>e.indexOf(s)===-1)}channel(e,n={}){let s=new U1(e,n,this);return this.channels.push(s),s}push(e){if(this.hasLogger()){let{topic:n,event:s,payload:i,ref:l,join_ref:u}=e;this.log("push",`${n} ${s} (${u}, ${l})`,i)}this.isConnected()?this.encode(e,n=>this.conn.send(n)):this.sendBuffer.push(()=>this.encode(e,n=>this.conn.send(n)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,n=>{let{topic:s,event:i,payload:l,ref:u,join_ref:c}=n;if(u&&u===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",f)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${s} ${i} ${u&&"("+u+")"||""}`.trim(),l);for(let f=0;f<this.channels.length;f++){const p=this.channels[f];p.isMember(s,i,l,c)&&p.trigger(i,l,u,c)}this.triggerStateCallbacks("message",n)})}triggerStateCallbacks(e,...n){try{this.stateChangeCallbacks[e].forEach(([s,i])=>{try{i(...n)}catch(l){this.log("error",`error in ${e} callback`,l)}})}catch(s){this.log("error",`error triggering ${e} callbacks`,s)}}leaveOpenTopic(e){let n=this.channels.find(s=>s.topic===e&&(s.isJoined()||s.isJoining()));n&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),n.leave())}};class Mi{constructor(n,s){const i=P1(s);this.presence=new L1(n.getChannel(),i),this.presence.onJoin((l,u,c)=>{const f=Mi.onJoinPayload(l,u,c);n.getChannel().trigger("presence",f)}),this.presence.onLeave((l,u,c)=>{const f=Mi.onLeavePayload(l,u,c);n.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{n.getChannel().trigger("presence",{event:"sync"})})}get state(){return Mi.transformState(this.presence.state)}static transformState(n){return n=z1(n),Object.getOwnPropertyNames(n).reduce((s,i)=>{const l=n[i];return s[i]=Dl(l),s},{})}static onJoinPayload(n,s,i){const l=zy(s),u=Dl(i);return{event:"join",key:n,currentPresences:l,newPresences:u}}static onLeavePayload(n,s,i){const l=zy(s),u=Dl(i);return{event:"leave",key:n,currentPresences:l,leftPresences:u}}}function Dl(e){return e.metas.map(n=>(n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n))}function z1(e){return JSON.parse(JSON.stringify(e))}function P1(e){return e?.events&&{events:e.events}}function zy(e){return e?.metas?Dl(e):[]}var Py;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Py||(Py={}));class B1{get state(){return this.presenceAdapter.state}constructor(n,s){this.channel=n,this.presenceAdapter=new Mi(this.channel.channelAdapter,s
20)}}function H1(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(e&&typeof e=="object"){const n=e;if(typeof n.code=="number"){const s=typeof n.reason=="string"&&n.reason?` (${n.reason})`:"";return new Error(`socket closed: ${n.code}${s}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class q1{constructor(n,s,i){const l=I1(i);this.channel=n.getSocket().channel(s,l),this.socket=n}get state(){return this.channel.state}set state(n){this.channel.state=n}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(n,s){return this.channel.on(n,s)}off(n,s){this.channel.off(n,s)}subscribe(n){return this.channel.join(n)}unsubscribe(n){return this.channel.leave(n)}teardown(){this.channel.teardown()}onClose(n){this.channel.onClose(n)}onError(n){return this.channel.onError(n)}push(n,s,i){let l;try{l=this.channel.push(n,s,i)}catch{throw new Error(`tried to push '${n}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>_1){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return l}updateJoinPayload(n){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),n)}canPush(){return this.socket.isConnected()&&this.state===Ar.joined}isJoined(){return this.state===Ar.joined}isJoining(){return this.state===Ar.joining}isClosed(){return this.state===Ar.closed}isLeaving(){return this.state===Ar.leaving}updateFilterBindings(n){this.channel.filterBindings=n}updatePayloadTransform(n){this.channel.onMessage=n}getChannel(){return this.channel}}function I1(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var By;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(By||(By={}));var pa;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(pa||(pa={}));var Kn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Kn||(Kn={}));class Ui{get state(){return this.channelAdapter.state}set state(n){this.channelAdapter.state=n}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(n,s={config:{}},i){var l,u;if(this.topic=n,this.params=s,this.socket=i,this.bindings={},this.subTopic=n.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new q1(this.socket.socketAdapter,n,this.params),this.presence=new B1(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Bb(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(n,s=this.timeout){var i,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:f,private:p}}=this.params,g=(l=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(_=>_.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[pa.PRESENCE]&&this.bindings[pa.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,m={},b={broadcast:c,presence:Object.assign(Object.assign({},f),{enabled:y}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(_=>{n?.(Kn.CHANNEL_ERROR,H1(_))}),this._onClose(()=>n?.(Kn.CLOSED)),this.updateJoinPayload(Object.assign({config:b},m)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){n?.(Kn.SUBSCRIBED);return}this._updatePostgresBindings(_,n)}).receive("error",_=>{this.state=Ar.errored;const S=Object.values(_).join(", ")||"error";n?.(Kn.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{n?.(Kn.TIMED_OUT)})}return this}_updatePostgresBindings(n,s){var i;const l=this.bindings.postgres_changes,u=(i=l?.length)!==null&&i!==void 0?i:0,c=[];for(let f=0;f<u;f++){const p=l[f],{filter:{event:g,schema:y,table:m,filter:b}}=p,_=n&&n[f];if(_&&_.event===g&&Ui.isFilterValueEqual(_.schema,y)&&Ui.isFilterValueEqual(_.table,m)&&Ui.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Ar.errored,s?.(Kn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Ar.errored&&s&&s(Kn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(n,s={}){return await this.send({type:"presence",event:"track",payload:n},s.timeout||this.timeout)}async untrack(n={}){return await this.send({type:"presence",event:"untrack"},n)}on(n,s,i){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=n===pa.PRESENCE||n===pa.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${n}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(n,s,i)}async httpSend(n,s,i={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:s,private:this.private}]})},f=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(l=i.timeout)!==null&&l!==void 0?l:this.timeout);if(f.status===202)return{success:!0};let p=f.statusText;try{const g=await f.json();p=g.error||g.message||p}catch{}return Promise.reject(new Error(p))}async send(n,s={}){var i,l;if(!this.channelAdapter.canPush()&&n.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=n,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(i=s.timeout)!==null&&i!==void 0?i:this.timeout);return await((l=g.body)===null||l===void 0?void 0:l.cancel()),g.ok?"ok":"error"}catch(g){return g instanceof Error&&g.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,f,p;const g=this.channelAdapter.push(n.type,n,s.timeout||this.timeout);n.type==="broadcast"&&!(!((p=(f=(c=this.params)===null||c===void 0?void 0:c.config)===null||f===void 0?void 0:f.broadcast)===null||p===void 0)&&p.ack)&&u("ok"),g.receive("ok",()=>u("ok")),g.receive("error",()=>u("error")),g.receive("timeout",()=>u("timed out"))})}updateJoinPayload(n){this.channelAdapter.updateJoinPayload(n)}async unsubscribe(n=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(n).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(n,s,i){const l=new AbortController,u=setTimeout(()=>l.abort(),i),c=await this.socket.fetch(n,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),c}_on(n,s,i){const l=n.toLocaleLowerCase(),u=this.channelAdapter.on(n,i),c={type:l,filter:s,callback:i,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(n){this.channelAdapter.onClose(n)}_onError(n){this.channelAdapter.onError(n)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((n,s,i)=>{var l,u,c,f,p,g,y;const m=n.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,i))return!1;const b=(l=this.bindings[m])===null||l===void 0?void 0:l.find(_=>_.ref===n.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in b){const _=b.id,S=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=s.ids)===null||c===void 0?void 0:c.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((f=s.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const _=(g=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((y=s?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===m})}_notThisChannelEvent(n,s){const{close:i,error:l,leave:u,join:c}=zb;return s&&[i,l,u,c].includes(n)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((n,s,i)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:c,commit_timestamp:f,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:f,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return s})}copyBindings(n){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in n.bindings)for(const i of n.bindings[s])this._on(i.type,i.filter,i.callback)}static isFilterValueEqual(n,s){return(n??void 0)===(s??void 0)}_getPayloadRecords(n){const s={new:{},old:{}};return(n.type==="INSERT"||n.type==="UPDATE")&&(s.new=Dy(n.columns,n.record)),(n.type==="UPDATE"||n.type==="DELETE")&&(s.old=Dy(n.columns,n.old_record)),s}}class $1{constructor(n,s){this.socket=new D1(n,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(n){this.socket.heartbeatCallback=n}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(n,s,i,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{n(),u("ok")},s,i)})}push(n){this.socket.push(n)}log(n,s,i){this.socket.log(n,s,i)}makeRef(){return this.socket.makeRef()}onOpen(n){this.socket.onOpen(n)}onClose(n){this.socket.onClose(n)}onError(n){this.socket.onError(n)}onMessage(n){this.socket.onMessage(n)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==rf.connecting}isDisconnecting(){return this.socket.connectionState()==rf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Hy={HEARTBEAT_INTERVAL:25e3},G1=[1e3,2e3,5e3,1e4],V1=1e4;function K1(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(n){return e.has(n)?e.get(n):null},key(n){var s;return(s=Array.from(e.keys())[n])!==null&&s!==void 0?s:null},removeItem(n){e.delete(n)},setItem(n,s){e.set(n,String(s))}}}function Y1(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return K1()}const F1=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class Q1{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(n,s){var i;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new w1,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((i=s?.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const l=this._initializeOptions(s);this.socketAdapter=new $1(n,l),this.httpEndpoint=Bb(n),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(n){const s=n.message;throw s.includes("Node.js")?new Error(`${s} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(n,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},n,s)}getChannels(){return this.channels}async removeChannel(n){const s=await n.unsubscribe();return s==="ok"&&n.teardown(),s}async removeAllChannels(){const n=this.channels.map(async i=>{const l=await i.unsubscribe();return i.teardown(),l}),s=await Promise.all(n);return await this.disconnect(),s}log(n,s,i){this.socketAdapter.log(n,s,i)}connectionState(){return this.socketAdapter.connectionState()||rf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(n,s={config:{}}){const i=`realtime:${n}`,l=this.getChannels().find(u=>u.topic===i);if(l)return l;{const u=new Ui(`realtime:${n}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(n){this.socketAdapter.push(n)}async setAuth(n=null){this._authPromise=this._performAuth(n);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(n){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(n)}_makeRef(){return this.socketAdapter.makeRef()}_remove(n){this.channels=this.channels.filter(s=>s.topic!==n.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(n=null){let s,i=!1;if(n)s=n,i=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),s=this.accessTokenValue}else s=this.accessTokenValue;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(l=>{const u={access_token:s,version:m1};s&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(zb.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(n="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${n}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(n=>{n.ref&&n.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(n){return(s,i)=>{s=="sent"&&this._setAuthSafely(),n&&n(s,i)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const n=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(n),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(n){let s;if(n)s=n;else{const i=new Blob([F1],{type:"application/javascript"});s=URL.createObjectURL(i)}return s}_initializeOptions(n){var s,i,l,u,c,f,p,g,y,m,b,_;this.worker=(s=n?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(i=n?.accessToken)!==null&&i!==void 0?i:null;const S={};S.timeout=(l=n?.timeout)!==null&&l!==void 0?l:b1,S.heartbeatIntervalMs=(u=n?.heartbeatIntervalMs)!==null&&u!==void 0?u:Hy.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=n?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((f=n?.heartbeatIntervalMs)!==null&&f!==void 0?f:Hy.HEARTBEAT_INTERVAL),S.transport=(p=n?.transport)!==null&&p!==void 0?p:p1.getWebSocketConstructor(),S.params=n?.params,S.logger=n?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(n?.heartbeatCallback),S.sessionStorage=(g=n?.sessionStorage)!==null&&g!==void 0?g:Y1(),S.reconnectAfterMs=(y=n?.reconnectAfterMs)!==null&&y!==void 0?y:(U=>G1[U-1]||V1);let O,E;const A=(m=n?.vsn)!==null&&m!==void 0?m:v1;switch(A){case y1:O=(U,j)=>j(JSON.stringify(U)),E=(U,j)=>j(JSON.parse(U));break;case Db:O=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=A,S.encode=(b=n?.encode)!==null&&b!==void 0?b:O,S.decode=(_=n?.decode)!==null&&_!==void 0?_:E,S.beforeReconnect=this._reconnectAuth.bind(this),(n?.logLevel||n?.log_level)&&(this.logLevel=n.logLevel||n.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=n?.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var Hi=class extends Error{constructor(e,n){super(e),this.name="IcebergError",this.status=n.status,this.icebergType=n.icebergType,this.icebergCode=n.icebergCode,this.details=n.details,this.isCommitStateUnknown=n.icebergType==="CommitStateUnknownException"||[500,502,504].includes(n.status)&&n.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function J1(e,n,s){const i=new URL(n,e);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&i.searchParams.set(l,u);return i.toString()}async function X1(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function Z1(e){const n=e.fetchImpl??globalThis.fetch;return{async request({method:s,path:i,query:l,body:u,headers:c}){const f=J1(e.baseUrl,i,l),p=await X1(e.auth),g=await n(f,{method:s,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),y=await g.text(),m=(g.headers.get("content-type")||"").includes("application/json"),b=m&&y?JSON.parse(y):y;if(!g.ok){const _=m?b:void 0,S=_?.error;throw new Hi(S?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:S?.type,icebergCode:S?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function Rl(e){return e.join("�")}var W1=class{constructor(e,n=""){this.client=e,this.prefix=n}async listNamespaces(e){const n=e?{parent:Rl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:n})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(e,n){const s={namespace:e.namespace,properties:n?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Rl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Rl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Rl(e.namespace)}`}),!0}catch(n){if(n instanceof Hi&&n.status===404)return!1;throw n}}async createNamespaceIfNotExists(e,n){try{return await this.createNamespace(e,n)}catch(s){if(s instanceof Hi&&s.status===409)return;throw s}}};function sa(e){return e.join("�")}var eO=class{constructor(e,n="",s){this.client=e,this.prefix=n,this.accessDelegation=s}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sa(e.namespace)}/tables`})).data.identifiers}async createTable(e,n){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${sa(e.namespace)}/tables`,body:n,headers:s})).data.metadata}async updateTable(e,n){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${sa(e.namespace)}/tables/${e.name}`,body:n});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(e,n){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${sa(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(n?.purge??!1)}})}async loadTable(e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sa(e.namespace)}/tables/${e.name}`,headers:n})).data.metadata}async tableExists(e){const n={};this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${sa(e.namespace)}/tables/${e.name}`,headers:n}),!0}catch(s){if(s instanceof Hi&&s.status===404)return!1;throw s}}async createTableIfNotExists(e,n){try{return await this.createTable(e,n)}catch(s){if(s instanceof Hi&&s.status===409)return await this.loadTable({namespace:e.namespace,name:n.name});throw s}}},tO=class{constructor(e){let n="v1";e.catalogName&&(n+=`/${e.catalogName}`);const s=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=Z1({baseUrl:s,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new W1(this.client,n),this.tableOps=new eO(this.client,n,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,n){return this.namespaceOps.createNamespace(e,n)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
38async createTable(e,n){return this.tableOps.createTable(e,n)}async updateTable(e,n){return this.tableOps.updateTable(e,n)}async dropTable(e,n){await this.tableOps.dropTable(e,n)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,n){return this.namespaceOps.createNamespaceIfNotExists(e,n)}async createTableIfNotExists(e,n){return this.tableOps.createTableIfNotExists(e,n)}};function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qi(e)}function nO(e,n){if(qi(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,n);if(qi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function rO(e){var n=nO(e,"string");return qi(n)=="symbol"?n:n+""}function sO(e,n,s){return(n=rO(n))in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}function qy(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,i)}return s}function ce(e){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?qy(Object(s),!0).forEach(function(i){sO(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):qy(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}var au=class extends Error{constructor(e,n="storage",s,i){super(e),this.__isStorageError=!0,this.namespace=n,this.name=n==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function iu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var lf=class extends au{constructor(e,n,s,i="storage"){super(e,i,n,s),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=n,this.statusCode=s}toJSON(){return ce({},super.toJSON())}},qb=class extends au{constructor(e,n,s="storage"){super(e,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=n}};function Vl(e,n,s){const i=ce({},e),l=n.toLowerCase();for(const u of Object.keys(i))u.toLowerCase()===l&&delete i[u];return i[l]=s,i}function aO(e){const n={};for(const[s,i]of Object.entries(e))n[s.toLowerCase()]=i;return n}const iO=e=>e?(...n)=>e(...n):(...n)=>fetch(...n),oO=e=>{if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},uf=e=>{if(Array.isArray(e))return e.map(s=>uf(s));if(typeof e=="function"||e!==Object(e))return e;const n={};return Object.entries(e).forEach(([s,i])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));n[l]=uf(i)}),n},lO=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Iy=e=>{if(typeof e=="object"&&e!==null){const n=e;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error;if(typeof n.error=="object"&&n.error!==null){const s=n.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(e)},uO=async(e,n,s,i)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const l=e;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(c=>{const f=c?.statusCode||c?.code||u+"";n(new lf(Iy(c),u,f,i))}).catch(()=>{const c=u+"";n(new lf(l.statusText||`HTTP ${u} error`,u,c,i))})}else n(new qb(Iy(e),e,i))},cO=(e,n,s,i)=>{const l={method:e,headers:n?.headers||{}};if(e==="GET"||e==="HEAD"||!i)return ce(ce({},l),s);if(oO(i)){var u;const c=n?.headers||{};let f;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(f=g);l.headers=Vl(c,"Content-Type",(u=f)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(i)}else l.body=i;return n?.duplex&&(l.duplex=n.duplex),ce(ce({},l),s)};async function Oi(e,n,s,i,l,u,c){return new Promise((f,p)=>{e(s,cO(n,i,l,u)).then(g=>{if(!g.ok)throw g;if(i?.noResolveJson)return g;if(c==="vectors"){const y=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!y||!y.includes("application/json"))return{}}return g.json()}).then(g=>f(g)).catch(g=>uO(g,p,i,c))})}function Ib(e="storage"){return{get:async(n,s,i,l)=>Oi(n,"GET",s,i,l,void 0,e),post:async(n,s,i,l,u)=>Oi(n,"POST",s,l,u,i,e),put:async(n,s,i,l,u)=>Oi(n,"PUT",s,l,u,i,e),head:async(n,s,i,l)=>Oi(n,"HEAD",s,ce(ce({},i),{},{noResolveJson:!0}),l,void 0,e),remove:async(n,s,i,l,u)=>Oi(n,"DELETE",s,l,u,i,e)}}const hO=Ib("storage"),{get:Ii,post:on,put:cf,head:fO,remove:Uf}=hO,$t=Ib("vectors");var Sa=class{constructor(e,n={},s,i="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=aO(n),this.fetch=iO(s),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,n){return this.headers=Vl(this.headers,e,n),this}async handleOperation(e){var n=this;try{return{data:await e(),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(iu(s))return{data:null,error:s};throw s}}},dO=class{constructor(e,n){this.downloadFn=e,this.shouldThrowOnError=n}then(e,n){return this.execute().then(e,n)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(iu(n))return{data:null,error:n};throw n}}};let $b;$b=Symbol.toStringTag;var pO=class{constructor(e,n){this.downloadFn=e,this.shouldThrowOnError=n,this[$b]="BlobDownloadBuilder",this.promise=null}asStream(){return new dO(this.downloadFn,this.shouldThrowOnError)}then(e,n){return this.getPromise().then(e,n)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(iu(n))return{data:null,error:n};throw n}}};const gO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}}
38,$y={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var mO=class extends Sa{constructor(e,n={},s,i){super(e,n,i,"storage"),this.bucketId=s}async uploadOrUpdate(e,n,s,i){var l=this;return l.handleOperation(async()=>{let u;const c=ce(ce({},$y),i);let f=ce(ce({},l.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&s instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",s)):typeof FormData<"u"&&s instanceof FormData?(u=s,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=s,f["cache-control"]=`max-age=${c.cacheControl}`,f["content-type"]=c.contentType,p&&(f["x-metadata"]=l.toBase64(l.encodeMetadata(p))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),i?.headers)for(const[b,_]of Object.entries(i.headers))f=Vl(f,b,_);const g=l._removeEmptyFolders(n),y=l._getFinalPath(g),m=await(e=="PUT"?cf:on)(l.fetch,`${l.url}/object/${y}`,u,ce({headers:f},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:m.Id,fullPath:m.Key}})}async upload(e,n,s){return this.uploadOrUpdate("POST",e,n,s)}async uploadToSignedUrl(e,n,s,i){var l=this;const u=l._removeEmptyFolders(e),c=l._getFinalPath(u),f=new URL(l.url+`/object/upload/sign/${c}`);return f.searchParams.set("token",n),l.handleOperation(async()=>{let p;const g=ce(ce({},$y),i);let y=ce(ce({},l.headers),{"x-upsert":String(g.upsert)});const m=g.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),m&&p.append("metadata",l.encodeMetadata(m)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),m&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(m))):(p=s,y["cache-control"]=`max-age=${g.cac
38heControl}`,y["content-type"]=g.contentType,m&&(y["x-metadata"]=l.toBase64(l.encodeMetadata(m))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!g.duplex&&(g.duplex="half")),i?.headers)for(const[b,_]of Object.entries(i.headers))y=Vl(y,b,_);return{path:u,fullPath:(await cf(l.fetch,f.toString(),p,ce({headers:y},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(e,n){var s=this;return s.handleOperation(async()=>{let i=s._getFinalPath(e);const l=ce({},s.headers);n?.upsert&&(l["x-upsert"]="true");const u=await on(s.fetch,`${s.url}/object/upload/sign/${i}`,{},{headers:l}),c=new URL(s.url+u.url),f=c.searchParams.get("token");if(!f)throw new au("No token returned by API");return{signedUrl:c.toString(),path:e,token:f}})}async update(e,n,s){return this.uploadOrUpdate("PUT",e,n,s)}async move(e,n,s){var i=this;return i.handleOperation(async()=>await on(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:e,destinationKey:n,destinationBucket:s?.destinationBucket},{headers:i.headers}))}async copy(e,n,s){var i=this;return i.handleOperation(async()=>({path:(await on(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:e,destinationKey:n,destinationBucket:s?.destinationBucket},{headers:i.headers})).Key}))}async createSignedUrl(e,n,s){var i=this;return i.handleOperation(async()=>{let l=i._getFinalPath(e);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let c=await on(i.fetch,`${i.url}/object/sign/${l}`,ce({expiresIn:n},u?{transform:s.transform}:{}),{headers:i.headers});const f=new URLSearchParams;s?.download&&f.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&f.set("cacheNonce",String(s.cacheNonce));const p=f.toString();return{signedUrl:encodeURI(`${i.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,n,s){var i=this;return i.handleOperation(async()=>{const l=await on(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:n,paths:e},{headers:i.headers}),u=new URLSearchParams;s?.download&&u.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&u.set("cacheNonce",String(s.cacheNonce));const c=u.toString();return l.map(f=>ce(ce({},f),{},{signedUrl:f.signedURL?encodeURI(`${i.url}${f.signedURL}${c?`&${c}`:""}`):null}))})}download(e,n,s){const i=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;n?.transform&&this.applyTransformOptsToQuery(l,n.transform),n?.cacheNonce!=null&&l.set("cacheNonce",String(n.cacheNonce));const u=l.toString(),c=this._getFinalPath(e),f=()=>Ii(this.fetch,`${this.url}/${i}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new pO(f,this.shouldThrowOnError)}async info(e){var n=this;const s=n._getFinalPath(e);return n.handleOperation(async()=>uf(await Ii(n.fetch,`${n.url}/object/info/${s}`,{headers:n.headers})))}async exists(e){var n=this;const s=n._getFinalPath(e);try{return await fO(n.fetch,`${n.url}/object/${s}`,{headers:n.headers}),{data:!0,error:null}}catch(l){if(n.shouldThrowOnError)throw l;if(iu(l)){var i;const u=l instanceof lf?l.status:l instanceof qb?(i=l.originalError)===null||i===void 0?void 0:i.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(e,n){const s=this._getFinalPath(e),i=new URLSearchParams;n?.download&&i.set("download",n.download===!0?"":n.download),n?.transform&&this.applyTransformOptsToQuery(i,n.transform),n?.cacheNonce!=null&&i.set("cacheNonce",String(n.cacheNonce));const l=i.toString(),u=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${s}`)+(l?`?${l}`:"")}}}async remove(e){var n=this;return n.handleOperation(async()=>await Uf(n.fetch,`${n.url}/object/${n.bucketId}`,{prefixes:e},{headers:n.headers}))}async list(e,n,s){var i=this;return i.handleOperation(async()=>{const l=ce(ce(ce({},gO),n),{},{prefix:e||""});return await on(i.fetch,`${i.url}/object/list/${i.bucketId}`,l,{headers:i.headers},s)})}async listV2(e,n){var s=this;return s.handleOperation(async()=>{const i=ce({},e);return await on(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,i,{headers:s.headers},n)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,n){return n.width&&e.set("width",n.width.toString()),n.height&&e.set("height",n.height.toString()),n.resize&&e.set("resize",n.resize),n.format&&e.set("format",n.format),n.quality&&e.set("qual
38ity",n.quality.toString()),e}};const yO="2.105.4",Xi={"X-Client-Info":`storage-js/${yO}`};var vO=class extends Sa{constructor(e,n={},s,i){const l=new URL(e);i?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const u=l.href.replace(/\/$/,""),c=ce(ce({},Xi),n);super(u,c,s,"storage")}async listBuckets(e){var n=this;return n.handleOperation(async()=>{const s=n.listBucketOptionsToQueryString(e);return await Ii(n.fetch,`${n.url}/bucket${s}`,{headers:n.headers})})}async getBucket(e){var n=this;return n.handleOperation(async()=>await Ii(n.fetch,`${n.url}/bucket/${e}`,{headers:n.headers}))}async createBucket(e,n={public:!1}){var s=this;return s.handleOperation(async()=>await on(s.fetch,`${s.url}/bucket`,{id:e,name:e,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async updateBucket(e,n){var s=this;return s.handleOperation(async()=>await cf(s.fetch,`${s.url}/bucket/${e}`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(e){var n=this;return n.handleOperation(async()=>await on(n.fetch,`${n.url}/bucket/${e}/empty`,{},{headers:n.headers}))}async deleteBucket(e){var n=this;return n.handleOperation(async()=>await Uf(n.fetch,`${n.url}/bucket/${e}`,{},{headers:n.headers}))}listBucketOptionsToQueryString(e){const n={};return e&&("limit"in e&&(n.limit=String(e.limit)),"offset"in e&&(n.offset=String(e.offset)),e.search&&(n.search=e.search),e.sortColumn&&(n.sortColumn=e.sortColumn),e.sortOrder&&(n.sortOrder=e.sortOrder)),Object.keys(n).length>0?"?"+new URLSearchParams(n).toString():""}},bO=class extends Sa{constructor(e,n={},s){const i=e.replace(/\/$/,""),l=ce(ce({},Xi),n);super(i,l,s,"storage")}async createBucket(e){var n=this;return n.handleOperation(async()=>await on(n.fetch,`${n.url}/bucket`,{name:e},{headers:n.headers}))}async listBuckets(e){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;e?.limit!==void 0&&s.set("limit",e.limit.toString()),e?.offset!==void 0&&s.set("offset",e.offset.toString()),e?.sortColumn&&s.set("sortColumn",e.sortColumn),e?.sortOrder&&s.set("sortOrder",e.sortOrder),e?.search&&s.set("search",e.search);const i=s.toString(),l=i?`${n.url}/bucket?${i}`:`${n.url}/bucket`;return await Ii(n.fetch,l,{headers:n.headers})})}async deleteBucket(e){var n=this;return n.handleOperation(async()=>await Uf(n.fetch,`${n.url}/bucket/${e}`,{},{headers:n.headers}))}from(e){var n=this;if(!lO(e))throw new au("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new tO({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>n.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...f)=>{try{return{data:await c.apply(l,f),error:null}}catch(p){if(i)throw p;return{data:null,error:p}}}}})}},_O=class extends Sa{constructor(e,n={},s){const i=e.replace(/\/$/,""),l=ce(ce({},Xi),{},{"Content-Type":"application/json"},n);super(i,l,s,"vectors")}async createIndex(e){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/CreateIndex`,e,{headers:n.headers})||{})}async getIndex(e,n){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:e,indexName:n},{headers:s.headers}))}async listIndexes(e){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/ListIndexes`,e,{headers:n.headers}))}async deleteIndex(e,n){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:e,indexName:n},{headers:s.headers})||{})}},wO=class extends Sa{constructor(e,n={},s){const i=e.replace(/\/$/,""),l=ce(ce({},Xi),{},{"Content-Type":"application/json"},n);super(i,l,s,"vectors")}async putVectors(e){var n=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/PutVectors`,e,{headers:n.headers})||{})}async getVectors(e){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/GetVectors`,e,{headers:n.headers}))}async listVectors(e){var n=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
38if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/ListVectors`,e,{headers:n.headers}))}async queryVectors(e){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/QueryVectors`,e,{headers:n.headers}))}async deleteVectors(e){var n=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/DeleteVectors`,e,{headers:n.headers})||{})}},SO=class extends Sa{constructor(e,n={},s){const i=e.replace(/\/$/,""),l=ce(ce({},Xi),{},{"Content-Type":"application/json"},n);super(i,l,s,"vectors")}async createBucket(e){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:n.headers})||{})}async getBucket(e){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/GetVectorBucket`,{vectorBucketName:e},{headers:n.headers}))}async listBuckets(e={}){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/ListVectorBuckets`,e,{headers:n.headers}))}async deleteBucket(e){var n=this;return n.handleOperation(async()=>await $t.post(n.fetch,`${n.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:n.headers})||{})}},EO=class extends SO{constructor(e,n={}){super(e,n.headers||{},n.fetch)}from(e){return new TO(this.url,this.headers,e,this.fetch)}async createBucket(e){var n=()=>super.createBucket,s=this;return n().call(s,e)}async getBucket(e){var n=()=>super.getBucket,s=this;return n().call(s,e)}async listBuckets(e={}){var n=()=>super.listBuckets,s=this;return n().call(s,e)}async deleteBucket(e){var n=()=>super.deleteBucket,s=this;return n().call(s,e)}},TO=class extends _O{constructor(e,n,s,i){super(e,n,i),this.vectorBucketName=s}async createIndex(e){var n=()=>super.createIndex,s=this;return n().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(e={}){var n=()=>super.listIndexes,s=this;return n().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(e){var n=()=>super.getIndex,s=this;return n().call(s,s.vectorBucketName,e)}async deleteIndex(e){var n=()=>super.deleteIndex,s=this;return n().call(s,s.vectorBucketName,e)}index(e){return new RO(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},RO=class extends wO{constructor(e,n,s,i,l){super(e,n,l),this.vectorBucketName=s,this.indexName=i}async putVectors(e){var n=()=>super.putVectors,s=this;return n().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(e){var n=()=>super.getVectors,s=this;return n().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(e={}){var n=()=>super.listVectors,s=this;return n().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(e){var n=()=>super.queryVectors,s=this;return n().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(e){var n=()=>super.deleteVectors,s=this;return n().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},AO=class extends vO{constructor(e,n={},s,i){super(e,n,s,i)}from(e){return new mO(this.url,this.headers,e,this.fetch)}get vectors(){return new EO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new bO(this.url+"/iceberg",this.headers,this.fetch)}};function ou(e,n){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(s[i[l]]=e[i[l]]);return s}const Gb="2.105.4",ha=30*1e3,hf=3,Ih=hf*ha,OO="http://localhost:9999",CO="supabase.auth.token",kO={"X-Client-Info":`gotrue-js/${Gb}`},ff="X-Supabase-Api-Version",Vb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},xO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,jO=600*1e3;
38class $i extends Error{constructor(n,s,i){super(n),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function Z(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class MO extends $i{constructor(n,s,i){super(n,s,i),this.name="AuthApiError",this.status=s,this.code=i}}function UO(e){return Z(e)&&e.name==="AuthApiError"}class un extends $i{constructor(n,s){super(n),this.name="AuthUnknownError",this.originalError=s}}class Xn extends $i{constructor(n,s,i,l){super(n,i,l),this.name=s,this.status=i}}class lt extends Xn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Al(e){return Z(e)&&e.name==="AuthSessionMissingError"}class aa extends Xn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ol extends Xn{constructor(n){super(n,"AuthInvalidCredentialsError",400,void 0)}}class Cl extends Xn{constructor(n,s=null){super(n,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function NO(e){return Z(e)&&e.name==="AuthImplicitGrantRedirectError"}class Gy extends Xn{constructor(n,s=null){super(n,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class LO extends Xn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class df extends Xn{constructor(n,s){super(n,"AuthRetryableFetchError",s,void 0)}}function $h(e){return Z(e)&&e.name==="AuthRetryableFetchError"}class Vy extends Xn{constructor(n,s,i){super(n,"AuthWeakPasswordError",s,"weak_password"),this.reasons=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class pf extends Xn{constructor(n){super(n,"AuthInvalidJwtError",400,"invalid_jwt")}}const Kl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Ky=` 39\r=`.split(""),DO=(()=>{const e=new Array(128);for(let n=0;n<e.length;n+=1)e[n]=-1;for(let n=0;n<Ky.length;n+=1)e[Ky[n].charCodeAt(0)]=-2;for(let n=0;n<Kl.length;n+=1)e[Kl[n].charCodeAt(0)]=n;return e})();function Yy(e,n,s){if(e!==null)for(n.queue=n.queue<<8|e,n.queuedBits+=8;n.queuedBits>=6;){const i=n.queue>>n.queuedBits-6&63;s(Kl[i]),n.queuedBits-=6}else if(n.queuedBits>0)for(n.queue=n.queue<<6-n.queuedBits,n.queuedBits=6;n.queuedBits>=6;){const i=n.queue>>n.queuedBits-6&63;s(Kl[i]),n.queuedBits-=6}}function Kb(e,n,s){const i=DO[e];if(i>-1)for(n.queue=n.queue<<6|i,n.queuedBits+=6;n.queuedBits>=8;)s(n.queue>>n.queuedBits-8&255),n.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Fy(e){const n=[],s=c=>{n.push(String.fromCodePoint(c))},i={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{BO(c,i,s)};for(let c=0;c<e.length;c+=1)Kb(e.charCodeAt(c),l,u);return n.join("")}function zO(e,n){if(e<=127){n(e);return}else if(e<=2047){n(192|e>>6),n(128|e&63);return}else if(e<=65535){n(224|e>>12),n(128|e>>6&63),n(128|e&63);return}else if(e<=1114111){n(240|e>>18),n(128|e>>12&63),n(128|e>>6&63),n(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function PO(e,n){for(let s=0;s<e.length;s+=1){let i=e.charCodeAt(s);if(i>55295&&i<=56319){const l=(i-55296)*1024&65535;i=(e.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}zO(i,n)}}function BO(e,n,s){if(n.utf8seq===0){if(e<=127){s(e);return}for(let i=1;i<6;i+=1)if((e>>7-i&1)===0){n.utf8seq=i;break}if(n.utf8seq===2)n.codepoint=e&31;else if(n.utf8seq===3)n.codepoint=e&15;else if(n.utf8seq===4)n.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");n.utf8seq-=1}else if(n.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");n.codepoint=n.codepoint<<6|e&63,n.utf8seq-=1,n.utf8seq===0&&s(n.codepoint)}}function va(e){const n=[],s={queue:0,queuedBits:0},i=l=>{n.push(l)};for(let l=0;l<e.length;l+=1)Kb(e.charCodeAt(l),s,i);return new Uint8Array(n)}function HO(e){const n=[];return PO(e,s=>n.push(s)),new Uint8Array(n)}function cs(e){const n=[],s={queue:0,queuedBits:0},i=l=>{n.push(l)};return e.forEach(l=>Yy(l,s,i)),Yy(null,s,i),n.join("")}function qO(e){return Math.round(Date.now()/1e3)+e}function IO(){return Symbol("auth-callback")}const yt=()=>typeof window<"u"&&typeof document<"u",rs={tested:!1,writable:!1},Yb=()=>{if(!yt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(rs.tested)return rs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),rs.tested=!0,rs.writable=!0}catch{rs.tested=!0,rs.writable=!1}return rs.writable};function $O(e){const n={},s=new URL(e);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEac
39h((l,u)=>{n[u]=l})}catch{}return s.searchParams.forEach((i,l)=>{n[l]=i}),n}const Fb=e=>e?(...n)=>e(...n):(...n)=>fetch(...n),GO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",fa=async(e,n,s)=>{await e.setItem(n,JSON.stringify(s))},ss=async(e,n)=>{const s=await e.getItem(n);if(!s)return null;try{return JSON.parse(s)}catch{return null}},mt=async(e,n)=>{await e.removeItem(n)};class lu{constructor(){this.promise=new lu.promiseConstructor((n,s)=>{this.resolve=n,this.reject=s})}}lu.promiseConstructor=Promise;function kl(e){const n=e.split(".");if(n.length!==3)throw new pf("Invalid JWT structure");for(let i=0;i<n.length;i++)if(!xO.test(n[i]))throw new pf("JWT not in base64url format");return{header:JSON.parse(Fy(n[0])),payload:JSON.parse(Fy(n[1])),signature:va(n[2]),raw:{header:n[0],payload:n[1]}}}async function VO(e){return await new Promise(n=>{setTimeout(()=>n(null),e)})}function KO(e,n){return new Promise((i,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await e(u);if(!n(u,null,c)){i(c);return}}catch(c){if(!n(u,c)){l(c);return}}})()})}function YO(e){return("0"+e.toString(16)).substr(-2)}function FO(){const n=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*i));return l}return crypto.getRandomValues(n),Array.from(n,YO).join("")}async function QO(e){const s=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(i);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function JO(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const s=await QO(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ia(e,n,s=!1){const i=FO();let l=i;s&&(l+="/recovery"),await fa(e,`${n}-code-verifier`,l);const u=await JO(i);return[u,i===u?"plain":"s256"]}const XO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function ZO(e){const n=e.headers.get(ff);if(!n||!n.match(XO))return null;try{return new Date(`${n}T00:00:00.0Z`)}catch{return null}}function WO(e){if(!e)throw new Error("Missing exp claim");const n=Math.floor(Date.now()/1e3);if(e<=n)throw new Error("JWT has expired")}function eC(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const tC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Gn(e){if(!tC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function an(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Gh(){const e={};return new Proxy(e,{get:(n,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const i=s.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(n,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function nC(e,n){return new Proxy(e,{get:(s,i,l)=>{if(i==="__isInsecureUserWarningProxy")return!0;
39if(typeof i=="symbol"){const u=i.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,i,l)}return!n.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),n.value=!0),Reflect.get(s,i,l)}})}function Qy(e){return JSON.parse(JSON.stringify(e))}const as=e=>{if(typeof e=="object"&&e!==null){const n=e;if(typeof n.msg=="string")return n.msg;if(typeof n.message=="string")return n.message;if(typeof n.error_description=="string")return n.error_description;if(typeof n.error=="string")return n.error}return JSON.stringify(e)},rC=[502,503,504,520,521,522,523,524,530];async function Jy(e){var n;if(!GO(e))throw new df(as(e),0);if(rC.includes(e.status))throw new df(as(e),e.status);let s;try{s=await e.json()}catch(u){throw new un(as(u),u)}let i;const l=ZO(e);if(l&&l.getTime()>=Vb["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?i=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(i=s.error_code),i){if(i==="weak_password")throw new Vy(as(s),e.status,((n=s.weak_password)===null||n===void 0?void 0:n.reasons)||[]);if(i==="session_not_found")throw new lt}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new Vy(as(s),e.status,s.weak_password.reasons);throw new MO(as(s),e.status||500,i)}const sC=(e,n,s,i)=>{const l={method:e,headers:n?.headers||{}};return e==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},n?.headers),l.body=JSON.stringify(i),Object.assign(Object.assign({},l),s))};async function te(e,n,s,i){var l;const u=Object.assign({},i?.headers);u[ff]||(u[ff]=Vb["2024-01-01"].name),i?.jwt&&(u.Authorization=`Bearer ${i.jwt}`);const c=(l=i?.query)!==null&&l!==void 0?l:{};i?.redirectTo&&(c.redirect_to=i.redirectTo);const f=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await aC(e,n,s+f,{headers:u,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(p):{data:Object.assign({},p),error:null}}async function aC(e,n,s,i,l,u){const c=sC(n,i,l,u);let f;try{f=await e(s,Object.assign({},c))}catch(p){throw console.error(p),new df(as(p),0)}if(f.ok||await Jy(f),i?.noResolveJson)return f;try{return await f.json()}catch(p){await Jy(p)}}function en(e){var n;let s=null;lC(e)&&(s=Object.assign({},e),e.expires_at||(s.expires_at=qO(e.expires_in)));const i=(n=e.user)!==null&&n!==void 0?n:e;return{data:{session:s,user:i},error:null}}function Xy(e){const n=en(e);return!n.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((s,i)=>s&&typeof i=="string",!0)&&(n.data.weak_password=e.weak_password),n}function Or(e){var n;return{data:{user:(n=e.user)!==null&&n!==void 0?n:e},error:null}}function iC(e){return{data:e,error:null}}function oC(e){const{action_link:n,email_otp:s,hashed_token:i,redirect_to:l,verification_type:u}=e,c=ou(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:n,email_otp:s,hashed_token:i,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:f,user:p},error:null}}function Zy(e){return e}function lC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Vh=["global","local","others"];class uC{constructor({url:n="",headers:s={},fetch:i,experimental:l}){this.url=n,this.headers=s,this.fetch=Fb(i),this.experimental=l??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}
39async signOut(n,s=Vh[0]){if(Vh.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Vh.join(", ")}`);try{return await te(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:n,noResolveJson:!0}),{data:null,error:null}}catch(i){if(Z(i))return{data:null,error:i};throw i}}async inviteUserByEmail(n,s={}){try{return await te(this.fetch,"POST",`${this.url}/invite`,{body:{email:n,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Or})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async generateLink(n){try{const{options:s}=n,i=ou(n,["options"]),l=Object.assign(Object.assign({},i),s);return"newEmail"in i&&(l.new_email=i?.newEmail,delete l.newEmail),await te(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:oC,redirectTo:s?.redirectTo})}catch(s){if(Z(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(n){try{return await te(this.fetch,"POST",`${this.url}/admin/users`,{body:n,headers:this.headers,xform:Or})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async listUsers(n){var s,i,l,u,c,f,p;try{const g={nextPage:null,lastPage:0,total:0},y=await te(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(s=n?.page)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:"",per_page:(u=(l=n?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Zy});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const O=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);g[`${E}Page`]=O}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(Z(g))return{data:{users:[]},error:g};throw g}}async getUserById(n){Gn(n);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${n}`,{headers:this.headers,xform:Or})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async updateUserById(n,s){Gn(n);try{return await te(this.fetch,"PUT",`${this.url}/admin/users/${n}`,{body:s,headers:this.headers,xform:Or})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async deleteUser(n,s=!1){Gn(n);try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${n}`,{headers:this.headers,body:{should_soft_delete:s},xform:Or})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async _listFactors(n){Gn(n.userId);try{const{data:s,error:i}=await te(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:i}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _deleteFactor(n){Gn(n.userId),Gn(n.id);try{return{data:await te(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/factors/${n.id}`,{headers:this.headers}),error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listOAuthClients(n){var s,i,l,u,c,f,p;try{const g={nextPage:null,lastPage:0,total:0},y=await te(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(s=n?.page)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:"",per_page:(u=(l=n?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Zy});if(y.error)throw y.error;const m=await y.json(),b=(c=y.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const O=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);g[`${E}Page`]=O}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(Z(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(n){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getOAuthClient(n){try{return await te(this.fetch,"GET",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateOAuthClient(n,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${n}`,{body:s,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(Z(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(n){try{return await te(this.fetch,"DELET
39E",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(n){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients/${n}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listCustomProviders(n){try{const s={};return n?.type&&(s.type=n.type),await te(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:i=>{var l;return{data:{providers:(l=i?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(Z(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(n){try{return await te(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getCustomProvider(n){try{return await te(this.fetch,"GET",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateCustomProvider(n,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/custom-providers/${n}`,{body:s,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(Z(i))return{data:null,error:i};throw i}}async _deleteCustomProvider(n){try{return await te(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminListPasskeys(n){an(this.experimental),Gn(n.userId);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(n){an(this.experimental),Gn(n.userId),Gn(n.passkeyId);try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/passkeys/${n.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}}function Wy(e={}){return{getItem:n=>e[n]||null,setItem:(n,s)=>{e[n]=s},removeItem:n=>{delete e[n]}}}const yn={debug:!!(globalThis&&Yb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Qb extends Error{constructor(n){super(n),this.isAcquireTimeout=!0}}class ev extends Qb{}async function cC(e,n,s){yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,n);const i=new globalThis.AbortController;let l;n>0&&(l=setTimeout(()=>{i.abort(),yn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},n)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,n===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},async u=>{if(u){clearTimeout(l),yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,u.name);try{return await s()}finally{yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,u.name)}}else{if(n===0)throw yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ev(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(yn.debug)try{const c=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(c,null," "))}catch(c){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",c)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(l),await s()}})}catch(u){if(n>0&&clearTimeout(l),u!==null&&typeof u=="object"&&"name"in u&&u.name==="AbortError"&&n>0){if(i.signal.aborted)return yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@
39supabase/gotrue-js: Lock "${e}" was not released within ${n}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async c=>{if(c){yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,c.name);try{return await s()}finally{yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,c.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await s()}));throw yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new ev(`Lock "${e}" was released because another request stole it`)}throw u}}function hC(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Jb(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function fC(e){return parseInt(e,16)}function dC(e){const n=new TextEncoder().encode(e);return"0x"+Array.from(n,i=>i.toString(16).padStart(2,"0")).join("")}function pC(e){var n;const{chainId:s,domain:i,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:f,requestId:p,resources:g,scheme:y,uri:m,version:b}=e;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!m)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((n=e.statement)===null||n===void 0)&&n.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=Jb(e.address),S=y?`${y}://${i}`:i,O=e.statement?`${e.statement} 41`:"",E=`${S} wants you to sign in with your Ethereum account: 42${_} 43 44${O}`;let A=`URI: ${m} 45Version: ${b} 46Chain ID: ${s}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;if(l&&(A+=` 49Expiration Time: ${l.toISOString()}`),f&&(A+=` 50Not Before: ${f.toISOString()}`),p&&(A+=` 51Request ID: ${p}`),g){let U=` 52Resources:`;for(const j of g){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);U+=` 53- ${j}`}A+=U}return`${E} 54${A}`}class tt extends Error{constructor({message:n,code:s,cause:i,name:l}){var u;super(n,{cause:i}),this.__isWebAuthnError=!0,this.name=(u=l??(i instanceof Error?i.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Yl extends tt{constructor(n,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:n}),this.name="WebAuthnUnknownError",this.originalError=s}}function gC({error:e,options:n}){var s,i,l;const{publicKey:u}=n;if(!u)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(n.signal instanceof AbortSignal)return new tt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((s=u.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new tt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(n.mediation==="conditional"&&((i=u.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new tt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((l=u.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new tt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new tt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new tt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return u.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new tt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new tt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const c=window.location.hostname;if(Xb(c)){if(u.rp.id!==c)return new tt({message:`The RP ID "${u.rp.id}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new tt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new tt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function mC({error:e,options:n}){const{publicKey:s}=n;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(n.signal instanceof AbortSignal)return new tt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new tt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(Xb(i)){if(s.rpId!==i)return new tt({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new tt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class yC{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const n=new AbortController;return this.controller=n,n.signal}cancelCeremony(){if(this.controller){const n=new Error("Manually cancelling existing WebAuthn API call");n.name="AbortError",this.controller.abort(n),this.controller=void 0}}}const gf=new yC;function tv(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:n,user:s,excludeCredentials:i}=e,l=ou(e,["challenge","user","excludeCredentials"]),u=va(n).buffer,c=Object.assign(Object.assign({},s),{id:va(s.id).buffer}),f=Object.assign(Object.assign({},l),{challenge:u,user:c});if(i&&i.length>0){f.excludeCredentials=new Array(i.length);for(let p=0;p<i.length;p++){const g=i[p];f.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:va(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return f}function nv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:n,allowCredentials:s}=e,i=ou(e,["challenge","allowCredentials"]),l=va(n).buffer,u=Object.assign(Object.assign({},i),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let c=0;c<s.length;c++){const f=s[c];u.allowCredentials[c]=Object.assign(Object.assign({},f),{id:va(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function rv(e){var n;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e;return{id:e.id,rawId:e.id,response:{attestationObject:cs(new Uint8Array(e.response.attestationObject)),clientDataJSON:cs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function sv(e){var n;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e,i=e.getClientExtensionResults(),l=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:cs(new Uint8Array(l.authenticatorData)),clientDataJSON:cs(new Uint8Array(l.clientDataJSON)),signature:cs(new Uint8Array(l.signature)),userHandle:l.userHandle?cs(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(n=s.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function Xb(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Fl(){var e,n;return!!(yt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((n=navigator?.credentials)===null||n===void 0?void 0:n.get)=="function")}async function Zb(e){try{const n=await navigator.credentials.create(e);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new Yl("Browser returned unexpected credential type",n)}:{data:null,error:new Yl("Empty credential response",n)}}catch(n){return{data:null,error:gC({error:n,options:e})}}}async function Wb(e){try{const n=await navigator.credentials.get(e);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new Yl("Browser returned unexpected credential type",n)}:{data:null,error:new Yl("Empty credential response",n)}}catch(n){return{data:null,error:mC({error:n,options:e})}}}const vC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},bC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ql(...e){const n=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),i={};for(const l of e)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))i[u]=c;else if(s(c))i[u]=c;else if(n(c)){const f=i[u];n(f)?i[u]=Ql(f,c):i[u]=Ql(c)}else i[u]=c}return i}function _C(e,n){return Ql(vC,e,n||{})}function wC(e,n){return Ql(bC,e,n||{})}class SC{constructor(n){this.client=n,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(n){return this.client.mfa.enroll(Object.assign(Object.assign({},n),{factorType:"webauthn"}))}async _challenge({factorId:n,webauthn:s,friendlyName:i,signal:l},u){var c;try{const{data:f,error:p}=await this.client.mfa.challenge({factorId:n,webauthn:s});if(!f)return{data:null,error:p};const g=l??gf.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:y}=f.webauthn.credential_options.publicKey;if(!y.name){const m=i;if(m)y.name=`${y.id}:${m}`;else{const _=(await this.client.getUser()).data.user,S=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(f.webauthn.type){case"create":{const y=_C(f.webauthn.credential_options.publicKey,u?.create),{data:m,error:b}=await Zb({publicKey:y,signal:g});return m?{data:{factorId:n,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}case"request":{const y=wC(f.webauthn.credential_options.publicKey,u?.request),{data:m,error:b}=await Wb(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:y,signal:g}));return m?{data:{factorId:n,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}}}catch(f){return Z(f)?{data:null,error:f}:{data:null,error:new un("Unexpected error in challenge",f)}}}async _verify({challengeId:n,factorId:s,webauthn:i}){return this.client.mfa.verify({factorId:s,challengeId:n,webauthn:i})}async _authenticate({factorId:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new $i("rpId is required for WebAuthn authentication")};try{if(!Fl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this.challenge({factorId:n,webauthn:{rpId:s,rpOrigins:i},signal:l},{request:u});if(!c)return{data:null,error:f};const{webauthn:p}=c;return this._verify({factorId:n,challengeId:c.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:i,credential_response:p.credential_response}})}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in authenticate",c)}}}async _register({friendlyName:n,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new $i("rpId is required for WebAuthn registration")};try{if(!Fl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this._enroll({friendlyName:n});if(!c)return await this.client.mfa.listFactors().then(y=>{var m;return(m=y.data)===null||m===void 0?void 0:m.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===n&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:f};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:s,rpOrigins:i},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:i,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:g}}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in register",c)}}}}hC();const EC={url:OO,storageKey:CO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:kO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function av(e,n,s){return await s()}const oa={};class Gi{get jwks(){var n,s;return(s=(n=oa[this.storageKey])===null||n===void 0?void 0:n.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(n){oa[this.storageKey]=Object.assign(Object.assign({},oa[this.storageKey]),{jwks:n})}get jwks_cached_at(){var n,s;return(s=(n=oa[this.storageKey])===null||n===void 0?void 0:n.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(n){oa[this.storageKey]=Object.assign(Object.assign({},oa[this.storageKey]),{cachedAt:n})}constructor(n){var s,i,l,u;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},EC),n);if(this.storageKey=c.storageKey,this.instanceID=(s=Gi.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,Gi.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&yt()){const f=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(f),this.logDebugMessages&&console.trace(f)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(i=c.experimental)!==null&&i!==void 0?i:{},this.admin=new uC({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=Fb(c.fetch),this.lock=c.lock||av,this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock?this.lock=c.lock:this.persistSession&&yt()&&
54(!((l=globalThis?.navigator)===null||l===void 0)&&l.locks)?this.lock=cC:this.lock=av,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new SC(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(c.storage?this.storage=c.storage:Yb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Wy(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=Wy(this.memoryStorage)),yt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(f){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",f)}(u=this.broadcastChannel)===null||u===void 0||u.addEventListener("message",async f=>{this._debug("received broadcast notification from other tab or client",f);try{await this._notifyAllSubscribers(f.data.event,f.data.session,!1)}catch(p){this._debug("#broadcastChannel","error",p)}})}c.skipAutoInitialize||this.initialize().catch(f=>{this._debug("#initialize()","error",f)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(n){if(this.throwOnError&&n&&n.error)throw n.error;return n}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Gb}) ${new Date().toISOString()}`}_debug(...n){return this.logDebugMessages&&this.logger(this._logPrefix(),...n),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var n;try{let s={},i="none";if(yt()&&(s=$O(window.location.href),this._isImplicitGrantCallback(s)?i="implicit":await this._isPKCECallback(s)&&(i="pkce")),yt()&&this.detectSessionInUrl&&i!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,i);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),NO(u)){const p=(n=u.details)===null||n===void 0?void 0:n.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:f}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",f),await this._saveSession(c),setTimeout(async()=>{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return Z(s)?this._returnResult({error:s}):this._returnResult({error:new un("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(n){var s,i,l;try{const u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(s=n?.options)===null||s===void 0?void 0:s.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(l=n?.options)===null||l===void 0?void 0:l.captchaToken}},xform:en}),{data:c,error:f}=u;if(f||!c)return this._returnResult({data:{user:null,session:null},error:f});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(n){var s,i,l;
54try{let u;if("email"in n){const{email:y,password:m,options:b}=n;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await ia(this.storage,this.storageKey)),u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:m,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:S},xform:en})}else if("phone"in n){const{phone:y,password:m,options:b}=n;u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:m,data:(i=b?.data)!==null&&i!==void 0?i:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:en})}else throw new Ol("You must provide either an email or phone number and a password");const{data:c,error:f}=u;if(f||!c)return await mt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});const p=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(u){if(await mt(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(n){try{let s;if("email"in n){const{email:u,password:c,options:f}=n;s=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:Xy})}else if("phone"in n){const{phone:u,password:c,options:f}=n;s=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:Xy})}else throw new Ol("You must provide either an email or phone number and a password");const{data:i,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!i||!i.session||!i.user){const u=new aa;return this._returnResult({data:{user:null,session:null},error:u})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:l})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(n){var s,i,l,u;return await this._handleProviderSignIn(n.provider,{redirectTo:(s=n.options)===null||s===void 0?void 0:s.redirectTo,scopes:(i=n.options)===null||i===void 0?void 0:i.scopes,queryParams:(l=n.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=n.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(n){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(n))}async signInWithWeb3(n){const{chain:s}=n;switch(s){case"ethereum":return await this.signInWithEthereum(n);case"solana":return await this.signInWithSolana(n);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(n){var s,i,l,u,c,f,p,g,y,m,b;let _,S;if("message"in n)_=n.message,S=n.signature;else{const{chain:O,wallet:E,statement:A,options:U}=n;let j;if(yt())if(typeof E=="object")j=E;else{const J=window;if("ethereum"in J&&typeof J.ethereum=="object"&&"request"in J.ethereum&&typeof J.ethereum.request=="function")j=J.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof E!="object"||!U?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const L=new URL((s=U?.url)!==null&&s!==void 0?s:window.location.href),F=await j.request({method:"eth_requestAccounts"}).then(J=>J).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!F||F.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const V=Jb(F[0]);let H=(i=U?.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!H){const J=await j.request({method:"eth_chainId"});H=fC(J)}const K={domain:L.host,address:V,statement:A,uri:L.href,version:"1",chainId:H,nonce:(l=U?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=U?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(f=U?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(p=U?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=U?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(y=U?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=pC(K),S=await j.request({method:"personal_sign",params:[dC(_),V]})}try{const{data:O,error:E}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((m=n.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(b=n.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:en});if(E)throw E;if(!O||!O.session||!O.user){const A=new aa;return this._returnResult({data:{user:null,session:null},error:A})}return O.session&&(await this._saveSession(O.session),await this._notifyAllSubscribers("SIGNED_IN",O.session)),this._returnResult({data:Object.assign({},O),error:E})}catch(O){if(Z(O))return this._returnResult({data:{user:null,session:null},error:O});throw O}}async signInWithSolana(n){var s,i,l,u,c,f,p,g,y,m,b,_;let S,O;if("message"in n)S=n.message,O=n.signature;else{const{chain:E,wallet:A,statement:U,options:j}=n;let L;if(yt())if(typeof A=="object")L=A;else{const V=window;if("solana"in V&&typeof V.solana=="object"&&("signIn"in V.solana&&typeof V.solana.signIn=="function"||"signMessage"in V.solana&&typeof V.solana.signMessage=="function"))L=V.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof A!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");L=A}const F=new URL((s=j?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in L&&L.signIn){const V=await L.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:F.host,uri:F.href}),U?{statement:U}:null));let H;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")H=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)H=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in H&&"signature"in H&&(typeof H.signedMessage=="string"||H.signedMessage instanceof Uint8Array)&&H.signature instanceof Uint8Array)S=typeof H.signedMessage=="string"?H.signedMessage:new TextDecoder().decode(H.signedMessage),O=H.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in L)||typeof L.signMessage!="function"||!("publicKey"in L)||typeof L!="object"||!L.publicKey||!("toBase58"in L.publicKey)||typeof L.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${F.host} wants you to sign in with your Solana account:`,L.publicKey.toBase58(),...U?["",U,""]:[""],"Version: 1",`URI: ${F.href}`,`Issued At: ${(l=(i=j?.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=j?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((c=j?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((f=j?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((g=j?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((m=(y=j?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||m===void 0)&&m.length?["Resources",...j.sign
54InWithSolana.resources.map(H=>`- ${H}`)]:[]].join(` 55`);const V=await L.signMessage(new TextEncoder().encode(S),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");O=V}}try{const{data:E,error:A}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:cs(O)},!((b=n.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=n.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:en});if(A)throw A;if(!E||!E.session||!E.user){const U=new aa;return this._returnResult({data:{user:null,session:null},error:U})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:A})}catch(E){if(Z(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(n){const s=await ss(this.storage,`${this.storageKey}-code-verifier`),[i,l]=(s??"").split("/");try{if(!i&&this.flowType==="pkce")throw new LO;const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:n,code_verifier:i},xform:en});if(await mt(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const f=new aa;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:c})}catch(u){if(await mt(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(n){try{const{options:s,provider:i,token:l,access_token:u,nonce:c}=n,f=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:en}),{data:p,error:g}=f;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const y=new aa;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:g})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(n){var s,i,l,u,c;try{if("email"in n){const{email:f,options:p}=n;let g=null,y=null;this.flowType==="pkce"&&([g,y]=await ia(this.storage,this.storageKey));const{error:m}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(i=p?.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:g,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in n){const{phone:f,options:p}=n,{data:g,error:y}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(c=p?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:y})}throw new Ol("You must provide either an email or phone number.")}catch(f){if(await mt(this.storage,`${this.storageKey}-code-verifier`),Z(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(n){var s,i;try{let l,u;"options"in n&&(l=(s=n.options)===null||s===void 0?void 0:s.redirectTo,u=(i=n.options)===null||i===void 0?void 0:i.captchaToken);const{data:c,error:f}=await te(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},n),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:en});if(f)throw f;if(!c)throw new Error("An error occurred on token verification.");const p=c.session,g=c.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(n.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(l){if(Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(n){var s,i,l,u,c;try{let f=null,p=null;this.flowType==="pkce"&&([f,p]=await ia(this.storage,this.storageKey));const g=await te(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in n?{provider_id:n.providerId}:null),"domain"in n?{domain:n.domain}:null),{redirect_to:(i=(s=n.options)===null||s===void 0?void 0:s.redirectTo)!==null&&i!==void 0?i:void 0}),!((l=n?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:n.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:p}),headers:this.headers,xform:iC});return!((u=g.data)===null||u===void 0)&&u.url&&yt()&&!(!((c=n.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(f){if(await mt(this.storage,`${this.storageKey}-code-verifier`),Z(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)throw i;if(!s)throw new lt;const{error:l}=await te(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(n){if(Z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async resend(n){try{const s=`${this.url}/resend`;if("email"in n){const{email:i,type:l,options:u}=n,{error:c}=await te(this.fetch,"POST",s,{headers:this.headers,body:{email:i,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}},redirectTo:u?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in n){const{phone:i,type:l,options:u}=n,{data:c,error:f}=await te(this.fetch,"POST",s,{headers:this.headers,body:{phone:i,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:f})}throw new Ol("You must provide either an email or phone number and a type")}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async s=>s))}async _acquireLock(n,s){this._debug("#_acquireLock","begin",n);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await i,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,n,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=s();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(n){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await n(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let n=null;const s=await ss(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?n=s:(this._debug("#getSession()","session from storage is not val
55id"),await this._removeSession())),!n)return{data:{session:null},error:null};const i=n.expires_at?n.expires_at*1e3-Date.now()<Ih:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",n.expires_at),!i){if(this.userStorage){const c=await ss(this.userStorage,this.storageKey+"-user");c?.user?n.user=c.user:n.user=Gh()}if(this.storage.isServer&&n.user&&!n.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};n.user=nC(n.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:n},error:null}}const{data:l,error:u}=await this._callRefreshToken(n.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(n){if(n)return await this._getUser(n);await this.initializePromise;const s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(n){try{return n?await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:n,xform:Or}):await this._useSession(async s=>{var i,l,u;const{data:c,error:f}=s;if(f)throw f;return!(!((i=c.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new lt}:await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(l=c.session)===null||l===void 0?void 0:l.access_token)!==null&&u!==void 0?u:void 0,xform:Or})})}catch(s){if(Z(s))return Al(s)&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(n,s={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(n,s))}async _updateUser(n,s={}){try{return await this._useSession(async i=>{const{data:l,error:u}=i;if(u)throw u;if(!l.session)throw new lt;const c=l.session;let f=null,p=null;this.flowType==="pkce"&&n.email!=null&&([f,p]=await ia(this.storage,this.storageKey));const{data:g,error:y}=await te(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s?.emailRedirectTo,body:Object.assign(Object.assign({},n),{code_challenge:f,code_challenge_method:p}),jwt:c.access_token,xform:Or});if(y)throw y;return c.user=g.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(i){if(await mt(this.storage,`${this.storageKey}-code-verifier`),Z(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(n))}async _setSession(n){try{if(!n.access_token||!n.refresh_token)throw new lt;const s=Date.now()/1e3;let i=s,l=!0,u=null;const{payload:c}=kl(n.access_token);if(c.exp&&(i=c.exp,l=i<=s),l){const{data:f,error:p}=await this._callRefreshToken(n.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f)return{data:{user:null,session:null},error:null};u=f}else{const{data:f,error:p}=await this._getUser(n.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:n.access_token,refresh_token:n.refresh_token,user:f.user,token_type:"bearer",expires_in:i-s,expires_at:i},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(s){if(Z(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(n){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(n))}async _refreshSession(n){try{return await this._useSession(async s=>{var i;if(!n){const{data:c,error:f}=s;if(f)throw f;n=(i=c.session)!==null&&i!==void 0?i:void 0}if(!n?.refresh_token)throw new lt;const{data:l,error:u}=await this._callRefreshToken(n.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(n,s){var i;try{if(!yt())throw new Cl("No browser detected.");
55if(n.error||n.error_description||n.error_code)throw new Cl(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new Gy("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Cl("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!n.code)throw new Gy("No code detected.");const{data:j,error:L}=await this._exchangeCodeForSession(n.code);if(L)throw L;const F=new URL(window.location.href);return F.searchParams.delete("code"),window.history.replaceState(window.history.state,"",F.toString()),{data:{session:j.session,redirectType:(i=j.redirectType)!==null&&i!==void 0?i:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:f,expires_in:p,expires_at:g,token_type:y}=n;if(!c||!p||!f||!y)throw new Cl("No session defined in URL");const m=Math.round(Date.now()/1e3),b=parseInt(p);let _=m+b;g&&(_=parseInt(g));const S=_-m;S*1e3<=ha&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const O=_-b;m-O>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",O,_,m):m-O<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",O,_,m);const{data:E,error:A}=await this._getUser(c);if(A)throw A;const U={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:f,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:U,redirectType:n.type},error:null})}catch(l){if(Z(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(n){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),n):!!(n.access_token||n.error_description)}async _isPKCECallback(n){const s=await ss(this.storage,`${this.storageKey}-code-verifier`);return!!(n.code&&s)}async signOut(n={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(n))}async _signOut({scope:n}={scope:"global"}){return await this._useSession(async s=>{var i;const{data:l,error:u}=s;if(u&&!Al(u))return this._returnResult({error:u});const c=(i=l.session)===null||i===void 0?void 0:i.access_token;if(c){const{error:f}=await this.admin.signOut(c,n);if(f&&!(UO(f)&&(f.status===404||f.status===401||f.status===403)||Al(f)))return this._returnResult({error:f})}return n!=="others"&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(n){const s=IO(),i={id:s,callback:n,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,i),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)})))(),{data:{subscription:i}}}async _emitInitialSession(n){return await this._useSession(async s=>{var i,l;try{const{data:{session:u},error:c}=s;if(c)throw c;await((i=this.stateChangeEmitters.get(n))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",n,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(n))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",n,"error",u),Al(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(n,s={}){let i=null,l=null;this.flowType==="pkce"&&([i,l]=await ia(this.storage,this.storageKey,!0));try{return await te(this.fetch,"POST",`${this.url}
55/recover`,{body:{email:n,code_challenge:i,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(u){if(await mt(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var n;try{const{data:s,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(n=s.user.identities)!==null&&n!==void 0?n:[]},error:null})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(n){return"token"in n?this.linkIdentityIdToken(n):this.linkIdentityOAuth(n)}async linkIdentityOAuth(n){var s;try{const{data:i,error:l}=await this._useSession(async u=>{var c,f,p,g,y;const{data:m,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,n.provider,{redirectTo:(c=n.options)===null||c===void 0?void 0:c.redirectTo,scopes:(f=n.options)===null||f===void 0?void 0:f.scopes,queryParams:(p=n.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await te(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(g=m.session)===null||g===void 0?void 0:g.access_token)!==null&&y!==void 0?y:void 0})});if(l)throw l;return yt()&&!(!((s=n.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(i?.url),this._returnResult({data:{provider:n.provider,url:i?.url},error:null})}catch(i){if(Z(i))return this._returnResult({data:{provider:n.provider,url:null},error:i});throw i}}async linkIdentityIdToken(n){return await this._useSession(async s=>{var i;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:c,provider:f,token:p,access_token:g,nonce:y}=n,m=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=u?.access_token)!==null&&i!==void 0?i:void 0,body:{provider:f,id_token:p,access_token:g,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:en}),{data:b,error:_}=m;return _?this._returnResult({data:{user:null,session:null},error:_}):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new aa}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await mt(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(n){try{return await this._useSession(async s=>{var i,l;const{data:u,error:c}=s;if(c)throw c;return await te(this.fetch,"DELETE",`${this.url}/user/identities/${n.identity_id}`,{headers:this.headers,jwt:(l=(i=u.session)===null||i===void 0?void 0:i.access_token)!==null&&l!==void 0?l:void 0})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(n){const s=`#_refreshAccessToken(${n.substring(0,5)}...)`;this._debug(s,"begin");try{const i=Date.now();return await KO(async l=>(l>0&&await VO(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await te(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:n},headers:this.headers,xform:en})),(l,u)=>{const c=200*Math.pow(2,l);return u&&$h(u)&&Date.now()+c-i<ha})}catch(i){if(this._debug(s,"error",i),Z(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(s,"end")}}_isValidSession(n){return typeof n=="object"&&n!==null&&"access_token"in n&&"refresh_token"in n&&"expires_at"in n}async _handleProviderSignIn(n,s){const i=await this._getUrlForProvider(`${this.url}/authorize`,n,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",n,"options",s,"url",i),yt()&&!s.skipBrowserRedirect&&window.location.assign(i),{data:{provider:n,url:i},error:null}}async _recoverAndRefresh(){var n,s;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const l=await ss(this.storage,this.storageKey);if(l&&this.userStorage){let c=await ss(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await fa(this.userStorage,this.storageKey+"-user",c)),l.user=(n=c?.user)!==null&&n!==void 0?n:Gh()}else if(l&&!l.user&&!l.user){const c=await ss(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await mt(this.storage,this.storageKey+"-user"),await fa(this.storage,this.storageKey,l)):l.user=Gh()}if(this._debug(i,"session from storage",l),!this._isValidSession(l)){this._debug(i,"session is not val
55id"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<Ih;if(this._debug(i,`session has${u?"":" not"} expired with margin of ${Ih}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(console.error(c),$h(c)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:f}=await this._getUser(l.access_token);!f&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(i,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(i,"error",l),console.error(l);return}finally{this._debug(i,"end")}}async _callRefreshToken(n){var s,i;if(!n)throw new lt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l=`#_callRefreshToken(${n.substring(0,5)}...)`;this._debug(l,"begin");try{this.refreshingDeferred=new lu;const{data:u,error:c}=await this._refreshAccessToken(n);if(c)throw c;if(!u.session)throw new lt;await this._saveSession(u.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const f={data:u.session,error:null};return this.refreshingDeferred.resolve(f),f}catch(u){if(this._debug(l,"error",u),Z(u)){const c={data:null,error:u};return $h(u)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(c),c}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(n,s,i=!0){const l=`#_notifyAllSubscribers(${n})`;this._debug(l,"begin",s,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:n,session:s});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(n,s)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let f=0;f<u.length;f+=1)console.error(u[f]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(n){this._debug("#_saveSession()",n),this.suppressGetSessionWarning=!0,await mt(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},n),i=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&s.user&&await fa(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=Qy(l);await fa(this.storage,this.storageKey,u)}else{const l=Qy(s);await fa(this.storage,this.storageKey,l)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await mt(this.storage,this.storageKey),await mt(this.storage,this.storageKey+"-code-verifier"),await mt(this.storage,this.storageKey+"-user"),this.userStorage&&await mt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const n=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{n&&yt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",n)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const n=setInterval(()=>this._autoRefreshTokenTick(),ha);this.autoRefreshTicker=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const n=this.autoRefreshTicker;this.autoRefreshTicker=null,n&&clearInterval(n);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const n=Date.now();try{return await this._useSession(async s=>{const{data:{session:i}}=s;
55if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((i.expires_at*1e3-n)/ha);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${ha}ms, refresh threshold is ${hf} ticks`),l<=hf&&await this._callRefreshToken(i.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(n){if(n instanceof Qb)this._debug("auto refresh token tick lock not available");else throw n}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!yt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(n){this._debug("#visibilityChangedCallback","error",n)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(n){console.error("_handleVisibilityChange",n)}}async _onVisibilityChanged(n){const s=`#_onVisibilityChanged(${n})`;this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),n||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(n,s,i){const l=[`provider=${encodeURIComponent(s)}`];if(i?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i?.scopes&&l.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[u,c]=await ia(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(f.toString())}if(i?.queryParams){const u=new URLSearchParams(i.queryParams);l.push(u.toString())}return i?.skipBrowserRedirect&&l.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${n}?${l.join("&")}`}async _unenroll(n){try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await te(this.fetch,"DELETE",`${this.url}/factors/${n.factorId}`,{headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(n){try{return await this._useSession(async s=>{var i,l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const f=Object.assign({friendly_name:n.friendlyName,factor_type:n.factorType},n.factorType==="phone"?{phone:n.phone}:n.factorType==="totp"?{issuer:n.issuer}:{}),{data:p,error:g}=await te(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(i=u?.session)===null||i===void 0?void 0:i.access_token});return g?this._returnResult({data:null,error:g}):(n.factorType==="totp"&&p.type==="totp"&&(!((l=p?.totp)===null||l===void 0)&&l.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _verify(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;if(u)return this._returnResult({data:null,error:u});const c=Object.assign({challenge_id:n.challengeId},"webauthn"in n?{webauthn:Object.assign(Object.assign({},n.webauthn),{credential_response:n.webauthn.type==="create"?rv(n.webauthn.credential_response):sv(n.webauthn.credential_response)})}:{code:n.code}),{data:f,error:p}=await te(this.fetch,"POST",`${this.url}/factors/${n.factorId}/verify`,{body:c,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});return p?this._returnResult({data:null,error:p}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+f.expires_in},f)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",f),this._returnResult({data:f,error:p}))})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}})}async _challenge(n){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;if(u)return this._returnResult({data:null,error:u});const c=await te(this.fetch,"POST",`${this.url}/factors/${n.factorId}/challenge`,{body:n,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});if(c.error)return c;const{data:f}=c;if(f.type!=="webauthn")return{data:f,error:null};switch(f.webauthn.type){case"create":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:tv(f.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:nv(f.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}})}async _challengeAndVerify(n){const{data:s,error:i}=await this._challenge({factorId:n.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:n.factorId,challengeId:s.id,code:n.code})}async _listFactors(){var n;const{data:{user:s},error:i}=await this.getUser();if(i)return{data:null,error:i};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(n=s?.factors)!==null&&n!==void 0?n:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(n){var s,i,l,u;if(n)try{const{payload:_}=kl(n);let S=null;_.aal&&(S=_.aal);let O=S;const{data:{user:E},error:A}=await this.getUser(n);if(A)return this._returnResult({data:null,error:A});((i=(s=E?.factors)===null||s===void 0?void 0:s.filter(L=>L.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(O="aal2");const j=_.amr||[];return{data:{currentLevel:S,nextLevel:O,currentAuthenticationMethods:j},error:null}}catch(_){if(Z(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:f}
55=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=kl(c.access_token);let g=null;p.aal&&(g=p.aal);let y=g;((u=(l=c.user.factors)===null||l===void 0?void 0:l.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:g,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;return l?this._returnResult({data:null,error:l}):i?await te(this.fetch,"GET",`${this.url}/oauth/authorizations/${n}`,{headers:this.headers,jwt:i.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new lt})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(n,s){try{return await this._useSession(async i=>{const{data:{session:l},error:u}=i;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new lt});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});
55return c.data&&c.data.redirect_url&&yt()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(n,s){try{return await this._useSession(async i=>{const{data:{session:l},error:u}=i;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new lt});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return c.data&&c.data.redirect_url&&yt()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;return i?this._returnResult({data:null,error:i}):s?await te(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new lt})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _revokeOAuthGrant(n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;return l?this._returnResult({data:null,error:l}):i?(await te(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:n.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new lt})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(n,s={keys:[]}){let i=s.keys.find(f=>f.kid===n);if(i)return i;const l=Date.now();if(i=this.jwks.keys.find(f=>f.kid===n),i&&this.jwks_cached_at+jO>l)return i;const{data:u,error:c}=await te(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=l,i=u.keys.find(f=>f.kid===n),!i)?null:i}async getClaims(n,s={}){try{let i=n;if(!i){const{data:_,error:S}
55=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});i=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:f,payload:p}}=kl(i);s?.allowExpired||WO(u.exp);const g=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!g){const{error:_}=await this.getUser(i);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const y=eC(l.alg),m=await crypto.subtle.importKey("jwk",g,y,!0,["verify"]);if(!await crypto.subtle.verify(y,m,c,HO(`${f}.${p}`)))throw new pf("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async signInWithPasskey(n){var s,i,l;an(this.experimental);try{if(!Fl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(s=n?.options)===null||s===void 0?void 0:s.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const f=nv(u.options),p=(l=(i=n?.options)===null||i===void 0?void 0:i.signal)!==null&&l!==void 0?l:gf.createNewAbortSignal(),{data:g,error:y}=await Wb({publicKey:f,signal:p});if(y||!g)return this._returnResult({data:null,error:y??new un("WebAuthn ceremony failed",null)});const m=sv(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:m})}catch(u){if(Z(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(n){var s,i;an(this.experimental);try{if(!Fl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyRegistration();if(u||!l)return this._returnResult({data:null,error:u});const c=tv(l.options),f=(i=(s=n?.options)===null||s===void 0?void 0:s.signal)!==null&&i!==void 0?i:gf.createNewAbortSignal(),{data:p,error:g}=await Zb({publicKey:c,signal:f});if(g||!p)return this._returnResult({data:null,error:g??new un("WebAuthn ceremony failed",null)});const y=rv(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:y})}catch(l){if(Z(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){an(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const{data:l,error:u}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyRegistration(n){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new lt});const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:i.access_token,body:{challenge_id:n.challengeId,credential:n.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(n){var s;an(this.experimental);try{const{data:i,error:l}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=n?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:i,error:null})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _verifyPasskeyAuthentication(n){an(this.experimental);try{const{data:s,error:i}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:n.challengeId,credential:n.credential},xform:en});return i?this._returnResult({data:null,error:i}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){an(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new lt});const{data:l,error:u}=await te(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _updatePasskey(n){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new lt});const{data:u,error:c}=await te(this.fetch,"PATCH",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:i.access_token,body:{friendly_name:n.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(n){an(this.experimental);try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new lt});const{error:u}
55=await te(this.fetch,"DELETE",`${this.url}/passkeys/${n.passkeyId}`,{headers:this.headers,jwt:i.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}}Gi.nextInstanceID={};const TC=Gi,RC="2.105.4";let xi="";typeof Deno<"u"?xi="deno":typeof document<"u"?xi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?xi="react-native":xi="node";const AC={"X-Client-Info":`supabase-js-${xi}/${RC}`},OC={headers:AC},CC={schema:"public"},kC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},xC={};function Vi(e){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vi(e)}function jC(e,n){if(Vi(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,n);if(Vi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function MC(e){var n=jC(e,"string");return Vi(n)=="symbol"?n:n+""}function UC(e,n,s){return(n=MC(n))in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}function iv(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,i)}return s}function Ke(e){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?iv(Object(s),!0).forEach(function(i){UC(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):iv(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}const NC=e=>e?(...n)=>e(...n):(...n)=>fetch(...n),LC=()=>Headers,DC=(e,n,s)=>{const i=NC(s),l=LC();return async(u,c)=>{var f;const p=(f=await n())!==null&&f!==void 0?f:e;let g=new l(c?.headers);return g.has("apikey")||g.set("apikey",e),g.has("Authorization")||g.set("Authorization",`Bearer ${p}`),i(u,Ke(Ke({},c),{},{headers:g}))}};function zC(e){return e.endsWith("/")?e:e+"/"}function PC(e,n){var s,i;const{db:l,auth:u,realtime:c,global:f}=e,{db:p,auth:g,realtime:y,global:m}=n,b={db:Ke(Ke({},p),l),auth:Ke(Ke({},g),u),realtime:Ke(Ke({},y),c),storage:{},global:Ke(Ke(Ke({},m),f),{},{headers:Ke(Ke({},(s=m?.headers)!==null&&s!==void 0?s:{}),(i=f?.headers)!==null&&i!==void 0?i:{})}),accessToken:async()=>""};return e.accessToken?b.accessToken=e.accessToken:delete b.accessToken,b}function BC(e){const n=e?.trim();if(!n)throw new Error("supabaseUrl is required.");if(!n.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(zC(n))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var HC=class extends TC{constructor(e){super(e)}},qC=class{constructor(e,n,s){var i,l;this.supabaseUrl=e,this.supabaseKey=n;const u=BC(e);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,f={db:CC,realtime:xC,auth:Ke(Ke({},kC),{},{storageKey:c}),global:OC},p=PC(s??{},f);if(this.storageKey=(i=p.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(l=p.global.headers)!==null&&l!==void 0?l:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=p.auth)!==null&&g!==void 0?g:{},this.headers,p.global.fetch)}this.fetch=DC(n,this._getAccessToken.bind(this),p.global.fetch),this.realtime=this._initRealtimeClient(Ke({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new d1(new URL("rest/v1",u).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new AO(this.storageUrl.href,this.headers,this.fetch,s?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new r1(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,n={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,n,s)}channel(e,n={config:{}}){return this.realtime.channel(e,n)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,n,s;if(e.accessToken)return await e.accessToken();const{data:i}=await e.auth.getSession();return(n=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&n!==void 0?n:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:n,detectSessionInUrl:s,storage:i,userStorage:l,storageKey:u,flowType:c,lock:f,debug:p,throwOnError:g,experimental:y,lockAcquireTimeout:m,ski
55pAutoInitialize:b},_,S){const O={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new HC({url:this.authUrl.href,headers:Ke(Ke({},O),_),storageKey:u,autoRefreshToken:e,persistSession:n,detectSessionInUrl:s,storage:i,userStorage:l,flowType:c,lock:f,debug:p,throwOnError:g,experimental:y,fetch:S,lockAcquireTimeout:m,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new Q1(this.realtimeUrl.href,Ke(Ke({},e),{},{params:Ke(Ke({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,n)=>{this._handleTokenChanged(e,"CLIENT",n?.access_token)})}_handleTokenChanged(e,n,s){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const IC=(e,n,s)=>new qC(e,n,s);function $C(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const n=e.version;if(n==null)return!1;const s=n.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}$C()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function GC(){if(typeof window>"u")return;const e=location.hostname,s=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(E=>e===E||e.endsWith("."+E)),i="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",l=s?e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+i+")(?:-dev)?(?=\\.|$)","i"))?.[1]??e.match(new RegExp("^("+i+")(?=[.-])","i"))?.[1]:void 0,u=window.parent&&window.parent!==window;if(!l||!u)return localStorage;const c=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),f=c?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,p=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),g=p&&f.test(p)?[p]:c?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",m=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(E,A,U)=>new Promise(j=>{const L=b();let F=!1,V;const H=ae=>{F||(F=!0,clearTimeout(V),window.removeEventListener("message",K),j(ae))},K=ae=>{if(g.indexOf(ae.origin)<0)return;const ne=ae.data;ne&&ne.type===y&&ne.requestId===L&&H(ne)};window.addEventListener("message",K);const J={type:E,requestId:L,projectId:l,key:A};U!==void 0&&(J.value=U);for(const ae of g)window.parent.postMessage(J,ae);V=setTimeout(()=>H(null),m)});let S=!0;const O=250;return{getItem:async E=>{let A=await _("lovable-preview-auth:get",E);return!A&&S&&(await new Promise(U=>setTimeout(U,O)),A=await _("lovable-preview-auth:get",E)),S=!1,A&&A.ok&&typeof A.value=="string"?A.value===""?(localStorage.removeItem(E),null):A.value:localStorage.getItem(E)},setItem:(E,A)=>(localStorage.setItem(E,A),_("lovable-preview-auth:set",E,A).then(()=>{})),removeItem:E=>(localStorage.removeItem(E),_("lovable-preview-auth:remove",E).then(()=>{}))}}function VC(){return IC("https://ejlnjbtsibszxixvwiex.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVqbG5qYnRzaWJzenhpeHZ3aWV4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg2MTIzNTQsImV4cCI6MjA5NDE4ODM1NH0.hgYMxLh1ULwIwTcjMHmw2d8tnpyb_j1BG5A_Z08rqWU",{auth:{storage:GC(),persistSession:!0,autoRefreshToken:!0}})}let Kh;const KC=new Proxy({},{get(e,n,s){return Kh||(Kh=VC()),Reflect.get(Kh,n,s)}}),YC=us({type:"function"}).client(async({next:e})=>{const{data:n}=await KC.auth.getSession(),s=n.session?.access_token;return e({headers:s?{Authorization:`Bearer ${s}`}:{}})}),FC=us(),ov=WA(()=>({functionMiddleware:[YC],requestMiddleware:[FC]}));var uu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},QC=class extends uu{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 22,068 bytes, line 55
55this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},e0=new QC,JC={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},XC=class{#e=JC;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},mf=new XC;function ZC(e){setTimeout(e,0)}var WC=typeof window>"u"||"Deno"in globalThis;function ln(){}function ek(e,n){return typeof e=="function"?e(n):e}function tk(e){return typeof e=="number"&&e>=0&&e!==1/0}function nk(e,n){return Math.max(e+(n||0)-Date.now(),0)}function yf(e,n){return typeof e=="function"?e(n):e}function rk(e,n){return typeof e=="function"?e(n):e}function lv(e,n){const{type:s="all",exact:i,fetchStatus:l,predicate:u,queryKey:c,stale:f}=e;if(c){if(i){if(n.queryHash!==Nf(c,n.options))return!1}else if(!Yi(n.queryKey,c))return!1}if(s!=="all"){const p=n.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||l&&l!==n.state.fetchStatus||u&&!u(n))}function uv(e,n){const{exact:s,status:i,predicate:l,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(s){if(Ki(n.options.mutationKey)!==Ki(u))return!1}else if(!Yi(n.options.mutationKey,u))return!1}return!(i&&n.state.status!==i||l&&!l(n))}function Nf(e,n){return(n?.queryKeyHashFn||Ki)(e)}function Ki(e){return JSON.stringify(e,(n,s)=>vf(s)?Object.keys(s).sort().reduce((i,l)=>(i[l]=s[l],i),{}):s)}function Yi(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(s=>Yi(e[s],n[s])):!1}var sk=Object.prototype.hasOwnProperty;function t0(e,n,s=0){if(e===n)return e;if(s>500)return n;const i=cv(e)&&cv(n);if(!i&&!(vf(e)&&vf(n)))return n;const u=(i?e:Object.keys(e)).length,c=i?n:Object.keys(n),f=c.length,p=i?new Array(f):{};let g=0;for(let y=0;y<f;y++){const m=i?y:c[y],b=e[m],_=n[m];if(b===_){p[m]=b,(i?y<u:sk.call(e,m))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[m]=_;continue}const S=t0(b,_,s+1);p[m]=S,S===b&&g++}return u===f&&g===u?e:p}function _x(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const s in e)if(e[s]!==n[s])return!1;return!0}function cv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vf(e){if(!hv(e))return!1;const n=e.constructor;if(n===void 0)return!0;const s=n.prototype;return!(!hv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hv(e){return Object.prototype.toString.call(e)==="[object Object]"}function ak(e){return new Promise(n=>{mf.setTimeout(n,e)})}function ik(e,n,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,n):s.structuralSharing!==!1?t0(e,n):n}function ok(e,n,s=0){const i=[...e,n];return s&&i.length>s?i.slice(1):i}function lk(e,n,s=0){const i=[n,...e];return s&&i.length>s?i.slice(0,-1):i}var Lf=Symbol();function n0(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Lf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function wx(e,n){return typeof e=="function"?e(...n):!!e}function uk(e,n,s){let i=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=n(),i||(i=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),e}var r0=(()=>{let e=()=>WC;return{isServer(){return e()},setIsServer(n){e=n}}})();function ck(){let e,n;const s=new Promise((l,u)=>{e=l,n=u});s.status="pending",s.catch(()=>{});function i(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{i({status:"fulfilled",value:l}),e(l)},s.reject=l=>{i({status:"rejected",reason:l}),n(l)},s}var hk=ZC;function fk(){let e=[],n=0,s=f=>{f()},i=f=>{f()},l=hk;const u=f=>{n?e.push(f):l(()=>{s(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{i(()=>{f.forEach(p=>{s(p)})})})};return{batch:f=>{let p;n++;try{p=f()}finally{n--,n||c()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{s=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{l=f}}}var St=fk(),dk=class extends uu{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Jl=new dk;function pk(e){return Math.min(1e3*2**e,3e4)}function s0(e){return(e??"online")==="online"?Jl.isOnline():!0}var bf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function a0(e){let n=!1,s=0,i;const l=ck(),u=()=>l.status!=="pending",c=O=>{if(!u()){const E=new bf(O);b(E),e.onCancel?.(E)}},f=()=>{n=!0},p=()=>{n=!1},g=()=>e0.isFocused()&&(e.networkMode==="always"||Jl.isOnline())&&e.canRun(),y=()=>s0(e.networkMode)&&e.canRun(),m=O=>{u()||(i?.(),l.resolve(O))},b=O=>{u()||(i?.(),l.reject(O))},_=()=>new Promise(O=>{i=E=>{(u()||g())&&O(E)},e.onPause?.()}).then(()=>{i=void 0,u()||e.onContinue?.()}),S=()=>{if(u())return;let O;const E=s===0?e.initialPromise:void 0;try{O=E??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(m).catch(A=>{if(u())return;const U=e.retry??(r0.isServer()?0:3),j=e.retryDelay??pk,L=typeof j=="function"?j(s,A):j,F=U===!0||typeof U=="number"&&s<U||typeof U=="function"&&U(s,A);if(n||!F){b(A);return}s++,e.onFail?.(s,A),ak(L).then(()=>g()?void 0:_()).then(()=>{n?b(A):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(i?.(),l),cancelRetry:f,continueRetry:p,canStart:y,start:()=>(y()?S():_().then(S),l)}}var i0=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tk(this.gcTime)&&(this.#e=mf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r0.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(mf.clearTimeout(this.#e),this.#e=void 0)}},gk=class extends i0{#e;#n;#t;#s;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=dv(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=dv(this.options);n.data!==void 0&&(this.setState(fv(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,n){const s=ik(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),s}setState(e,n){this.#o({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(ln).catch(ln):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>rk(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Lf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>yf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!nk(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const s=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#i=!0,s.signal)})},l=()=>{const f=n0(this.options,n),g=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#i=!1,this.options.persister?this.options.persister(f,g,this):f(g)},c=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=a0({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof bf&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(f,p)=>{this.#o({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof bf){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const n=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...mk(s.data,this.options),fetchMeta:e.meta??null};case"success":const i={...s,...fv(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?i:void 0,i;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=n(this.state),St.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function mk(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:s0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fv(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dv(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,s=n!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function pv(e){return{onFetch:(n,s)=>{const i=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const m=S=>{uk(S,()=>n.signal,()=>y=!0)},b=n0(n.options,n.fetchOptions),_=async(S,O,E)=>{if(y)return Promise.reject();if(O==null&&S.pages.length)return Promise.resolve(S);const U=(()=>{const V={client:n.client,queryKey:n.queryKey,pageParam:O,direction:E?"backward":"forward",meta:n.options.meta};return m(V),V})(),j=await b(U),{maxPages:L}=n.options,F=E?lk:ok;return{pages:F(S.pages,j,L),pageParams:F(S.pageParams,O,L)}};if(l&&u.length){const S=l==="backward",O=S?yk:gv,E={pages:u,pageParams:c},A=O(i,E);f=await _(E,A,S)}else{const S=e??u.length;do{const O=p===0?c[0]??i.initialPageParam:gv(i,f);if(p>0&&O==null)break;f=await _(f,O),p++}while(p<S)}return f};n.options.persister?n.fetchFn=()=>n.options.persister?.(g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s):n.fetchFn=g}}}function gv(e,{pages:n,pageParams:s}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,s[i],s):void 0}function yk(e,{pages:n,pageParams:s}){return n.length>0?e.getPreviousPageParam?.(n[0],n,s[0],s):void 0}var vk=class extends i0{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||bk(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(n=>n!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=a0({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const i=this.state.status==="pending",l=!this.#s.canStart();try{if(i)n();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,s);const c=await this.options.onMutate?.(e,s);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:l})}const u=await this.#s.start();return await this.#t.config.onSuccess?.(u,e,this.state.context,this,s),await this.options.onSuccess?.(u,e,this.state.context,s),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,e,this.state.context,s),this.#r({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,e,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,e,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#r(e){const n=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),St.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function bk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _k=class extends uu{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,n,s){const i=new vk({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(n),state:s});return this.add(i),i}add(e){this.#e.add(e);const n=xl(e);if(typeof n=="string"){const s=this.#n.get(n);s?s.push(e):this.#n.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=xl(e);if(typeof n=="string"){const s=this.#n.get(n);if(s)if(s.length>1){const i=s.indexOf(e);i!==-1&&s.splice(i,1)}else s[0]===e&&this.#n.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=xl(e);if(typeof n=="string"){const i=this.#n.get(n)?.find(l=>l.state.status==="pending");return!i||i===e}else return!0}runNext(e){const n=xl(e);return typeof n=="string"?this.#n.get(n)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){St.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(s=>uv(n,s))}findAll(e={}){return this.getAll().filter(n=>uv(e,n))}notify(e){St.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return St.batch(()=>Promise.all(e.map(n=>n.continue().catch(ln))))}};function xl(e){return e.options.scope?.id}var wk=class extends uu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,s){const i=n.queryKey,l=n.queryHash??Nf(i,n);let u=this.get(l);return u||(u=new gk({client:e,queryKey:i,queryHash:l,options:e.defaultQueryOptions(n),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){St.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(s=>lv(n,s))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(s=>lv(e,s)):n}notify(e){St.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){St.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){St.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Sk=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new wk,this.#n=e.mutationCache||new _k,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=e0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Jl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),s=this.#e.build(this,n),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(yf(n.staleTime,s))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:s})=>{const i=s.data;return[n,i]})}setQueryData(e,n,s){const i=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(i.queryHash)?.state.data,c=ek(n,u);if(c!==void 0)return this.#e.build(this,i).setData(c,{...s,manual:!0})}setQueriesData(e,n,s){return St.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,s)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;St.batch(()=>{n.findAll(e).forEach(s=>{n.remove(s)})})}resetQueries(e,n){const s=this.#e;return St.batch(()=>(s.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const s={revert:!0,...n},i=St.batch(()=>this.#e.findAll(e).map(l=>l.cancel(s)));return Promise.all(i).then(ln).catch(ln)}invalidateQueries(e,n={}){return St.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const s={...n,cancelRefetch:n.cancelRefetch??!0},i=St.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(ln)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(ln)}fetchQuery(e){const n=this.defaultQueryOptions(e);
55n.retry===void 0&&(n.retry=!1);const s=this.#e.build(this,n);return s.isStaleByTime(yf(n.staleTime,s))?s.fetch(n):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ln).catch(ln)}fetchInfiniteQuery(e){return e.behavior=pv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ln).catch(ln)}ensureInfiniteQueryData(e){return e.behavior=pv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Jl.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,n){this.#s.set(Ki(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#s.values()],s={};return n.forEach(i=>{Yi(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,n){this.#r.set(Ki(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],s={};return n.forEach(i=>{Yi(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Nf(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Lf&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},o0=se.createContext(void 0),Sx=e=>{const n=se.useContext(o0);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},Ek=({client:e,children:n})=>(se.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Y.jsx(o0.Provider,{value:e,children:n}));const Tk="/assets/styles-DLTtGGtS.css";function Rk(){return Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),Y.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),Y.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),Y.jsx("div",{className:"mt-6",children:Y.jsx(jf,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 uppercase tracking-[0.08em]",children:"Go home"})})]})})}function Ak({error:e,reset:n}){console.error(e);const s=vt();return Y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:Y.jsxs("div",{className:"max-w-md text-center",children:[Y.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),Y.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),Y.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[Y.jsx("button",{onClick:()=>{s.invalidate(),n()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 uppercase tracking-[0.08em]",children:"Try again"}),Y.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent uppercase tracking-[0.08em]",children:"Go home"})]})]})})}const cn=kA()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Rebecca Maklad | Speaker | Rethinking What It Means to Be Human in the Age of AI"},{name:"description",content:"Rebecca Maklad is a keynote speaker and advisor exploring human advantage, leadership and influence in the age of artificial intelligence."},{name:"google-site-verification",content:"8Natci1is5kpwVVvsmrfycsOebTbiLPFPO_BpJh9LsE"},{property:"og:site_name",content:"Rebecca Maklad"},{property:"og:type",content:"website"},{property:"og:title",content:"Rebecca Maklad | Speaker | Rethinking What It Means to Be Human in the Age of AI"},{property:"og:description",content:"Rebecca Maklad is a keynote speaker and advisor exploring human advantage, leadership and influence in the age of artificial intelligence."},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Rebecca Maklad | Speaker | Rethinking What It Means to Be Human in the Age of AI"},{name:"twitter:description",content:"Rebecca Maklad is a keynote speaker and advisor exploring human advantage, leadership and influence in the age of artificial intelligence."},{property:"og:image",content:"https://rebeccamaklad.com/__l5e/assets-v1/13581a1b-3f7c-4136-883b-5b15d18a2018/rebecca-humanity-quote.png"},{property:"og:image:width",content:"800"},{property:"og:image:height",content:"800"},{property:"og:image:alt",content:"Rebecca Maklad speaking, open arms, in a pink blazer"},{name:"twitter:image",content:"https://rebeccamaklad.com/__l5e/assets-v1/13581a1b-3f7c-4136-883b-5b15d18a2018/rebecca-humanity-quote.png"}],links:[{rel:"stylesheet",href:Tk}
55,{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Noto+Sans:wght@300;400;500;600;700&display=swap"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Person","@id":"https://rebeccamaklad.com/#rebecca",name:"Rebecca Maklad",url:"https://rebeccamaklad.com",jobTitle:"Keynote Speaker and Advisor",description:"Keynote speaker, podcast host and advisor on the human capabilities that grow in value as artificial intelligence becomes abundant.",image:"https://storage.googleapis.com/gpt-engineer-file-uploads/hH2Y54eGUeaCnM7KCAvUYWpVQUZ2/social-images/social-1778656185367-Rebecca_Maklad__The_Human_Edge_Keynote.webp",knowsLanguage:"English",address:{"@type":"PostalAddress",addressLocality:"Sydney",addressCountry:"AU"},affiliation:[{"@type":"Organization",name:"ODE Management"},{"@type":"Organization",name:"Future Crunch",url:"https://www.futurecrunch.com"},{"@type":"Organization",name:"Humanity Schools",url:"https://www.humanityschools.com"}],sameAs:["https://www.linkedin.com/in/rebeccamaklad/","https://www.instagram.com/rebeccamaklad/","https://www.facebook.com/rebeccamaklad","https://rebeccamaklad.substack.com"],knowsAbout:["Artificial intelligence and human advantage","Leadership in the age of artificial intelligence","Influence and communication","The Human Edge keynote","Future of work"]})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"WebSite",name:"Rebecca Maklad",url:"https://rebeccamaklad.com"})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",serviceType:"Keynote speaking and workshops",provider:{"@type":"Person",name:"Rebecca Maklad",url:"https://rebeccamaklad.com"},areaServed:"Worldwide",url:"https://rebeccamaklad.com/speaking",description:"Keynote presentations and workshops on human advantage, leadership and influence in the age of artificial intelligence, including the signature keynote The Human Edge."})}]}),shellComponent:Ok,component:Ck,notFoundComponent:Rk,errorComponent:Ak});function Ok({children:e}){return Y.jsxs("html",{lang:"en",children:[Y.jsx("head",{children:Y.jsx(JA,{})}),Y.jsxs("body",{children:[e,Y.jsx(XA,{})]})]})}function Ck(){const{queryClient:e}=cn.useRouteContext();return Y.jsx(Ek,{client:e,children:Y.jsx(xb,{})})}const kk=Jn("/talks")({beforeLoad:()=>{throw Qi({to:"/speaking",replace:!0})}}),xk=Jn("/substack")({beforeLoad:()=>{throw Qi({to:"/podcast-and-newsletter",replace:!0})}}),jk="modulepreload",Mk=function(e){return"/"+e},mv={},Ea=function(n,s,i){let l=Promise.resolve();if(s&&s.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");l=p(s.map(g=>{if(g=Mk(g),g in mv)return;mv[g]=!0;const y=g.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${m}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":jk,y||(b.as="script"),b.crossOrigin="",b.href=g,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return l.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return n().catch(u)})},Uk="/__l5e/assets-v1/58cb5a5f-6fbc-440f-b1cd-f85b557ed470/podcast-hero-brochure.png",_f={url:Uk},yv=_f.url,Nk=()=>Ea(()=>import("./speaking-K27Dbph0.js"),__vite__mapDeps([0,1,2,3,4,5])),Lk=Jn("/speaking")({component:wa(Nk,"component"),head:()=>({meta:[{title:"Speaking Topics, Rebecca Maklad"},{name:"description",content:"Keynotes on the human capabilities that decide who thrives in the age of AI: Full Stack Human, Ctrl + Alt + Adapt and Ground Truth, built with Future Crunch."},{property:"og:title",content:"Speaking Topics, Rebecca Maklad"},{property:"og:description",content:"Rethinking human capability in the age of AI. Three signature keynotes built with Future Crunch."},{property:"og:url",content:"https://rebeccamaklad.com/speaking"},{property:"og:image",content:yv},{name:"twitter:image",content:yv}],links:[{rel:"canonical",href:"https://rebeccamaklad.com/speaking"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"ItemList",name:"Keynote topics by Rebecca Maklad",itemListElement:[{"@type":"Service",position:1,name:"Full Stack Human",serviceType:"Keynote",provider:{"@type":"Person",name:"Rebecca Maklad"},description:"A keynote on the five trainable human capabilities that decide who thrives when artificial intelligence keeps accelerating: cognitive bias, learning agility, updating, curiosity and context.",url:"https://rebeccamaklad.com/speaking#full-stack-human"},{"@type":"Service",position:2,name:"Ctrl + Alt + Adapt",serviceType:"Keynote",provider:{"@type":"Person",name:"Rebecca Maklad"},description:"A keynote on adaptive intelligence: building teams that stay curious under pressure, collaborative in complexity and steady in uncertainty.",url:"https://rebeccamaklad.com/speaking#ctrl-alt-adapt"},{"@type":"Service",position:3,name:"Ground Truth",serviceType:"Keynote",provider:{"@type":"Person",name:"Rebecca Maklad"},description:"A field report from the next economy on where capital is actually moving, and how leaders hold breakdown and breakthrough at once with intelligent optimism.",url:"https://rebeccamaklad.com/speaking#ground-truth"}]})}]})}),Dk=Jn("/speaker-bureau")({beforeLoad:()=>{throw Qi({to:"/event-resources",replace:!0})}}),zk="/__l5e/assets-v1/f19dc909-0b3e-4b76-a140-1f5139e460c7/talks-hero-stage.png",vv={url:zk},Pk=()=>Ea(()=>import("./podcast-and-newsletter-xkpO5GKB.js"),__vite__mapDeps([6,1,7,4])),Bk=Jn("/podcast-and-newsletter")({component:wa(Pk,"component"),head:()=>({meta:[{title:"Swallow The Future, writing by Rebecca Maklad"},{name:"description",content:"Essays on leading, deciding and thinking when intelligence becomes abundant. Subscribe to Swallow The Future on Substack."},{property:"og:title",content:"Swallow The Future by Rebecca Maklad"},{property:"og:description",content:"Essays on leading, deciding and thinking when intelligence becomes abundant."},{property:"og:url",content:"https://rebeccamaklad.com/podcast-and-newsletter"},{property:"og:image",content:vv.url},{name:"twitter:image",content:vv.url}],links:[{rel:"canonical",href:"https://rebeccamaklad.com/podcast-and-newsletter"}]})}),Hk="/__l5e/assets-v1/2e0db2b0-37f3-4223-aaab-519f093a3f8b/articles-hero-polycrisis.jpg",qk={url:Hk},bv=qk.url,Ik=()=>Ea(()=>import("./event-resources-CLlE2UZU.js"),__vite__mapDeps([8,1,2,7,4])),$k=Jn("/event-resources")({component:wa(Ik,"component"),head:()=>({meta:[{name:"robots",content:"noindex, follow"},{title:"Event Resources, Rebecca Maklad"},{name:"description",content:"A complete resource for clients, bureaus, agents and producers booking Rebecca Maklad: signature keynotes, speaker images, testimonials and booking enquiry."},{property:"og:title",content:"Event Resources, Rebecca Maklad"},{property:"og:description",content:"Everything clients, bureaus, agents and producers need to plan, promote and book Rebecca Maklad."},{property:"og:url",content:"https://rebeccamaklad.com/event-resources"},{property:"og:image",content:bv},{name:"twitter:image",content:bv}],links:[{rel:"canonical",href:"https://rebeccamaklad.com/event-resources"}]})}),Gk=()=>Ea(()=>import("./contact-DFhP4Lqs.js"),__vite__mapDeps([9,1,10])),Vk=Jn("/contact")({component:wa(Gk,"component"),head:()=>({meta:[{title:"Booking and Contact, Rebecca Maklad"},{name:"description",content:"Enquire about keynotes, workshops and advisory engagements."},{property:"og:title",content:"Booking and Contact, Rebecca Maklad"},{property:"og:description",content:"Enquire about keynotes, workshops and advisory engagements."},{property:"og:url",content:"https://rebeccamaklad.com/contact"},{property:"og:image",content:`https://rebeccamaklad.com${_f.url}`},{name:"twitter:image",content:`https://rebeccamaklad.com${_f.url}`}],links:[{rel:"canonical",href:"https://rebeccamaklad.com/contact"}]})}),Kk="/__l5e/assets-v1/3fa78fbe-1a5e-4e48-8e84-9bdb23eacd86/rebecca-fedsquare-pink.png",_v={url:Kk},Yk=()=>Ea(()=>import("./about-BCQoL0je.js"),__vite__mapDeps([11,1,5,4,10])),Fk=Jn("/about")({component:wa(Yk,"component"),head:()=>({meta:[{title:"About, Rebecca Maklad"},{name:"description",content:"For more than two decades, Rebecca Maklad has worked at the intersection of ideas, technology and human potential. Keynote speaker and Co-Founder of Humanity Schools."},{property:"og:title",content:"About Rebecca Maklad"},{property:"og:description",content:"Creator of The Human Edge keynote."},{property:"og:url",content:"https://rebeccamaklad.com/about"},{property:"og:image",content:_v.url},{name:"twitter:image",content:_v.url}],links:[{rel:"canonical",href:"https://rebeccamaklad.com/about"}]})}),Qk=()=>Ea(()=>import("./index-0UziYnNU.js"),__vite__mapDeps([12,3,1,4,2])),Jk=J
55n("/")({component:wa(Qk,"component"),head:()=>({meta:[{title:"Rebecca Maklad | Speaker | Rethinking What It Means to Be Human in the Age of AI"},{name:"description",content:"Keynote speaker and podcast host helping leaders build the human capabilities that grow in value as artificial intelligence advances."},{name:"stripe-verification",content:"V69RiX"},{property:"og:title",content:"Rebecca Maklad | Speaker | Rethinking What It Means to Be Human in the Age of AI"},{property:"og:description",content:"Keynote speaker on the human edges that compound as intelligence becomes abundant."},{property:"og:url",content:"https://rebeccamaklad.com/"},{property:"og:image",content:"https://rebeccamaklad.com/__l5e/assets-v1/13581a1b-3f7c-4136-883b-5b15d18a2018/rebecca-humanity-quote.png"},{property:"og:image:width",content:"800"},{property:"og:image:height",content:"800"},{property:"og:image:alt",content:"Rebecca Maklad speaking, open arms, in a pink blazer"},{name:"twitter:image",content:"https://rebeccamaklad.com/__l5e/assets-v1/13581a1b-3f7c-4136-883b-5b15d18a2018/rebecca-humanity-quote.png"}],links:[{rel:"canonical",href:"https://rebeccamaklad.com/"}]})}),Xk=kk.update({id:"/talks",path:"/talks",getParentRoute:()=>cn}),Zk=xk.update({id:"/substack",path:"/substack",getParentRoute:()=>cn}),Wk=Lk.update({id:"/speaking",path:"/speaking",getParentRoute:()=>cn}),ex=Dk.update({id:"/speaker-bureau",path:"/speaker-bureau",getParentRoute:()=>cn}),tx=Bk.update({id:"/podcast-and-newsletter",path:"/podcast-and-newsletter",getParentRoute:()=>cn}),nx=$k.update({id:"/event-resources",path:"/event-resources",getParentRoute:()=>cn}),rx=Vk.update({id:"/contact",path:"/contact",getParentRoute:()=>cn}),sx=Fk.update({id:"/about",path:"/about",getParentRoute:()=>cn}),ax=Jk.update({id:"/",path:"/",getParentRoute:()=>cn}),ix={IndexRoute:ax,AboutRoute:sx,ContactRoute:rx,EventResourcesRoute:nx,PodcastAndNewsletterRoute:tx,SpeakerBureauRoute:ex,SpeakingRoute:Wk,SubstackRoute:Zk,TalksRoute:Xk},ox=cn._addFileChildren(ix),lx=()=>{const e=new Sk;return $A({routeTree:ox,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function ux(){const e=await lx();let n;if(ov){const s=await ov.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,n=s.serializationAdapters,e.options.defaultSsr=s.defaultSsr}else n=[],window.__TSS_START_OPTIONS__={serializationAdapters:n};return n.push(FR),e.options.serializationAdapters&&n.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:n}),e.stores.matchesId.get().length||await JR(e),e}async function cx(){const e=await ux();return window.$_TSR?.h(),e}var Yh;function hx(){return Yh||(Yh=cx()),Y.jsx(eA,{promise:Yh,children:e=>Y.jsx(KA,{router:e})})}se.startTransition(()=>{Dw.hydrateRoot(document,Y.jsx(se.StrictMode,{children:Y.jsx(hx,{})}))});export{Ev as A,_f as B,_v as C,Ob as D,vx as E,jf as L,dx as R,uu as S,px as T,rk as a,yf as b,mf as c,mk as d,r0 as e,e0 as f,ik as g,yv as h,tk as i,Y as j,St as k,wx as l,YR as m,ln as n,vv as o,ck as p,vt as q,se as r,_x as s,nk as t,Sx as u,Mt as v,fx as w,wv as x,bv as y,TS as z};
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.