vendor: 6,291 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/auth-FPboCxsP.js","assets/card-79DExngm.js","assets/admin-DO1Hr63c.js"])))=>i.map(i=>d[i]); 2function AS(e,t){for(var s=0;s<t.length;s++){const a=t[s];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(a,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function OS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Th={exports:{}},ga={};var Um;function CS(){if(Um)return ga;Um=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(a,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:e,type:a,key:c,ref:l!==void 0?l:null,props:u}}return ga.Fragment=t,ga.jsx=s,ga.jsxs=s,ga}var Nm;function xS(){return Nm||(Nm=1,Th.exports=CS()),Th.exports}var F=xS(),Rh={exports:{}},he={};var Lm;function kS(){if(Lm)return he;Lm=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=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 _(k){return k===null||typeof k!="object"?null:(k=b&&k[b]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,R={};function O(k,$,X){this.props=k,this.context=$,this.refs=R,this.updater=X||w}O.prototype.isReactComponent={},O.prototype.setState=function(k,$){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,$,"setState")},O.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function D(){}D.prototype=O.prototype;function j(k,$,X){this.props=k,this.context=$,this.refs=R,this.updater=X||w}var L=j.prototype=new D;L.constructor=j,A(L,O.prototype),L.isPureReactComponent=!0;var Q=Array.isArray;function V(){}var q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function J(k,$,X){var W=X.ref;return{$$typeof:e,type:k,key:$,ref:W!==void 0?W:null,props:X}}function le(k,$){return J(k.type,$,k.props)}function se(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function ye(k){var $={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(X){return $[X]})}var Ce=/\/+/g;function Fe(k,$){return typeof k=="object"&&k!==null&&k.key!=null?ye(""+k.key):$.toString(36)}function Be(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(V,V):(k.status="pending",k.then(function($){k.status==="pending"&&(k.status="fulfilled",k.value=$)},function($){k.status==="pending"&&(k.status="rejected",k.reason=$)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,$,X,W,ie){var pe=typeof k;(pe==="undefined"||pe==="boolean")&&(k=null);var Se=!1;if(k===null)Se=!0;else switch(pe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(k.$$typeof){case e:case t:Se=!0;break;case y:return Se=k._init,B(Se(k._payload),$,X,W,ie)}}if(Se)return ie=ie(k),Se=W===""?"."+Fe(k,0):W,Q(ie)?(X="",Se!=null&&(X=Se.replace(Ce,"$&/")+"/"),B(ie,$,X,"",function(wn){return wn})):ie!=null&&(se(ie)&&(ie=le(ie,X+(ie.key==null||k&&k.key===ie.key?"":(""+ie.key).replace(Ce,"$&/")+"/")+Se)),$.push(ie)),1;Se=0;var Ye=W===""?".":W+":";if(Q(k))for(var Ue=0;Ue<k.length;Ue++)W=k[Ue],pe=Ye+Fe(W,Ue),Se+=B(W,$,X,pe,ie);else if(Ue=_(k),typeof Ue=="function")for(k=Ue.call(k),Ue=0;!(W=k.next()).done;)W=W.value,pe=Ye+Fe(W,Ue++),Se+=B(W,$,X,pe,ie);else if(pe==="object"){if(typeof k.then=="function")return B(Be(k),$,X,W,ie);throw $=String(k),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Se}function Y(k,$,X){if(k==null)return k;var W=[],ie=0;return B(k,W,"","",function(pe){return $.call(X,pe,ie++)}),W}function oe(k){if(k._status===-1){var $=k._result;$=$(),$.then(function(X){(k._status===0||k._status===-1)&&(k._status=1,k._result=X)},function(X){(k._status===0||k._status===-1)&&(k._status=2,k._result=X)}),k._status===-1&&(k._status=0,k._result=$)}if(k._status===1)return k._result.default;throw k._result}var Re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Oe={map:Y,forEach:function(k,$,X){Y(k,function(){$.apply(this,arguments)},X)},count:function(k){var $=0;return Y(k,function(){$++}),$},toArray:function(k){return Y(k,function($){return $})||[]},only:function(k){if(!se(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return he.Activity=m,he.Children=Oe,he.Component=O,he.Fragment=s,he.Profiler=l,he.PureComponent=j,he.StrictMode=a,he.Suspense=p,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,he.__COMPILER_RUNTIME={__proto__:null,c:function(k){return q.H.useMemoCache(k)}},he.cache=function(k){return function(){return k.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(k,$,X){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var W=A({},k.props),ie=k.key;if($!=null)for(pe in $.key!==void 0&&(ie=""+$.key),$)!K.call($,pe)||pe==="key"||pe==="__self"||pe
vendor: 4,146 bytes, line 2
2==="__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 Se=Array(pe),Ye=0;Ye<pe;Ye++)Se[Ye]=arguments[Ye+2];W.children=Se}return J(k.type,ie,W)},he.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},he.createElement=function(k,$,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 Se=arguments.length-2;if(Se===1)ie.children=X;else if(1<Se){for(var Ye=Array(Se),Ue=0;Ue<Se;Ue++)Ye[Ue]=arguments[Ue+2];ie.children=Ye}if(k&&k.defaultProps)for(W in Se=k.defaultProps,Se)ie[W]===void 0&&(ie[W]=Se[W]);return J(k,pe,ie)},he.createRef=function(){return{current:null}},he.forwardRef=function(k){return{$$typeof:d,render:k}},he.isValidElement=se,he.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:oe}},he.memo=function(k,$){return{$$typeof:g,type:k,compare:$===void 0?null:$}},he.startTransition=function(k){var $=q.T,X={};q.T=X;try{var W=k(),ie=q.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),q.T=$}},he.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},he.use=function(k){return q.H.use(k)},he.useActionState=function(k,$,X){return q.H.useActionState(k,$,X)},he.useCallback=function(k,$){return q.H.useCallback(k,$)},he.useContext=function(k){return q.H.useContext(k)},he.useDebugValue=function(){},he.useDeferredValue=function(k,$){return q.H.useDeferredValue(k,$)},he.useEffect=function(k,$){return q.H.useEffect(k,$)},he.useEffectEvent=function(k){return q.H.useEffectEvent(k)},he.useId=function(){return q.H.useId()},he.useImperativeHandle=function(k,$,X){return q.H.useImperativeHandle(k,$,X)},he.useInsertionEffect=function(k,$){return q.H.useInsertionEffect(k,$)},he.useLayoutEffect=function(k,$){return q.H.useLayoutEffect(k,$)},he.useMemo=function(k,$){return q.H.useMemo(k,$)},he.useOptimistic=function(k,$){return q.H.useOptimistic(k,$)},he.useReducer=function(k,$,X){return q.H.useReducer(k,$,X)},he.useRef=function(k){return q.H.useRef(k)},he.useState=function(k){return q.H.useState(k)},he.useSyncExternalStore=function(k,$,X){return q.H.useSyncExternalStore(k,$,X)},he.useTransition=function(){return q.H.useTransition()},he.version="19.2.5",he}var zm;function Va(){return zm||(zm=1,Rh.exports=kS()),Rh.exports}var re=Va();const mi=OS(re),dk=AS({__proto__:null,default:mi},[re]);var Ah={exports:{}},ma={},Oh={exports:{}},Ch={};var Pm;function jS(){return Pm||(Pm=1,(function(e){function t(B,Y){var oe=B.length;B.push(Y);e:for(;0<oe;){var Re=oe-1>>>1,Oe=B[Re];if(0<l(Oe,Y))B[Re]=Y,B[oe]=Oe,oe=Re;else break e}}function s(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var Y=B[0],oe=B.pop();if(oe!==Y){B[0]=oe;e:for(var Re=0,Oe=B.length,k=Oe>>>1;Re<k;){var $=2*(Re+1)-1,X=B[$],W=$+1,ie=B[W];if(0>l(X,oe))W<Oe&&0>l(ie,X)?(B[Re]=ie,B[W]=oe,Re=W):(B[Re]=X,B[$]=oe,Re=$);else if(W<Oe&&0>l(ie,oe))B[Re]=ie,B[W]=oe,Re=W;else break e}}return Y}function l(B,Y){var oe=B.sortIndex-Y.sortIndex;return oe!==0?oe:B.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],g=[],y=1,m=null,b=3,_=!1,w=!1,A=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function L(B){for(var Y=s(g);Y!==null;){if(Y.callback===null)a(g);else if(Y.startTime<=B)a(g),Y.sortIndex=Y.expirationTime,t(p,Y);else break;Y=s(g)}}function Q(B){if(A=!1,L(B),!w)if(s(p)!==null)w=!0,V||(V=!0,ye());else{var Y=s(g);Y!==null&&Be(Q,Y.startTime-B)}}var V=!1,q=-1,K=5,J=-1;function le(){return R?!0:!(e.unstable_now()-J<K)}function se(){if(R=!1,V){var B=e.unstable_now();J=B;var Y=!0;try{e:{w=!1,A&&(A=!1,D(q),q=-1),_=!0;var oe=b;
vendor: 10,811 bytes, lines 2-4
2try{t:{for(L(B),m=s(p);m!==null&&!(m.expirationTime>B&&le());){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),Y=!0;break t}m===s(p)&&a(p),L(B)}else a(p);m=s(p)}if(m!==null)Y=!0;else{var k=s(g);k!==null&&Be(Q,k.startTime-B),Y=!1}}break e}finally{m=null,b=oe,_=!1}Y=void 0}}finally{Y?ye():V=!1}}}var ye;if(typeof j=="function")ye=function(){j(se)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Fe=Ce.port2;Ce.port1.onmessage=se,ye=function(){Fe.postMessage(null)}}else ye=function(){O(se,0)};function Be(B,Y){q=O(function(){B(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(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 Y=3;break;default:Y=b}var oe=b;b=Y;try{return B()}finally{b=oe}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var oe=b;b=B;try{return Y()}finally{b=oe}},e.unstable_scheduleCallback=function(B,Y,oe){var Re=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Re+oe:Re):oe=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=oe+Oe,B={id:y++,callback:Y,priorityLevel:B,startTime:oe,expirationTime:Oe,sortIndex:-1},oe>Re?(B.sortIndex=oe,t(g,B),s(p)===null&&B===s(g)&&(A?(D(q),q=-1):A=!0,Be(Q,oe-Re))):(B.sortIndex=Oe,t(p,B),w||_||(w=!0,V||(V=!0,ye()))),B},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(B){var Y=b;return function(){var oe=b;b=Y;try{return B.apply(this,arguments)}finally{b=oe}}}})(Ch)),Ch}var Bm;function MS(){return Bm||(Bm=1,Oh.exports=jS()),Oh.exports}var xh={exports:{}},bt={};var Hm;function DS(){if(Hm)return bt;Hm=1;var e=Va();function t(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 a={d:{f:s,r:function(){throw Error(t(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 d(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,bt.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(t(299));return u(p,g,null,y)},bt.flushSync=function(p){var g=c.T,y=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=g,a.p=y,a.d.f()}},bt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(p,g))},bt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},bt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,m=d(y,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?a.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:_}):y==="script"&&a.d.X(p,{crossOrigin:m,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},bt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=d(g.as,g.crossOrigin);a.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&&a.d.M(p)},bt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=d(y,g.crossOrigin);a.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})}},bt.preloadModule=function(p,g){if(typeof p=="string")if(g){var y=d(g.as,g.crossOrigin);a.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 a.d.m(p)},bt.requestFormReset=function(p){a.d.r(p)},bt.unstable_batchedUpdates=function(p,g){return p(g)},bt.useFormState=function(p,g,y){return c.H.useFormState(p,g,y)},bt.useFormStatus=function(){return c.H.useHostTransitionStatus()},bt.version="19.2.5",bt}var qm;function _v(){if(qm)return xh.exports;qm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xh.exports=DS(),xh.exports}var Im;function US(){if(Im)return ma;Im=1;var e=MS(),t=Va(),s=_v();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(a(188))}function g(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(a(188));return r!==n?null:n}for(var i=n,o=r;;){var h=i.return;if(h===null)break;var f=h.alternate;if(f===null){if(o=h.return,o!==null){i=o;continue}break}if(h.child===f.child){for(f=h.child;f;){if(f===i)return p(h),n;if(f===o)return p(h),r;f=f.sibling}throw Error(a(188))}if(i.return!==o.return)i=h,o=f;else{for(var v=!1,S=h.child;S;){if(S===i){v=!0,i=h,o=f;break}if(S===o){v=!0,o=h,i=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===i){v=!0,i=f,o=h;break}if(S===o){v=!0,o=f,i=h;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==o)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),j=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ye(n){return n===null||typeof n!="object"?null:(n=se&&n[se]||n["@@iterator"],typeof n=="function"?n:null)}var Ce=Symbol.for("react.client.reference");function Fe(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case O:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case V:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case j:return n.displayName||"Context";case D:return(n._context.displayName||"Context")+".Consumer";case L:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case q:return r=n.displayName||null,r!==null?r:Fe(n.type)||"Memo";case K:r=n._payload,n=n._init;try{return Fe(n(r))}catch{}}return null}var Be=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Re=[],Oe=-1;function k(n){return{current:n}}function $(n){0>Oe||(n.current=Re[Oe],Re[Oe]=null,Oe--)}function X(n,r){Oe++,Re[Oe]=n.current,n.current=r}var W=k(null),ie=k(null),pe=k(null),Se=k(null);function Ye(n,r){switch(X(pe,r),X(ie,n),X(W,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?rm(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=rm(r),n=sm(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(W),X(W,n)}function Ue(){$(W),$(ie),$(pe)}function wn(n){n.memoizedState!==null&&X(Se,n);var r=W.current,i=sm(r,n.type);r!==i&&(X(ie,n),X(W,i))}function En(n){ie.current===n&&($(W),$(ie)),Se.current===n&&($(Se),ha._currentValue=oe)}var Xn,_i;function hn(n){if(Xn===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Xn=r&&r[1]||"",_i=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Xn+n+_i}var Si=!1;function gs(n,r){if(!n||Si)return"";Si=!0;var i=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(n,[],G)}else{try{G.call()}catch(P){z=P}n.call(G.prototype)}}else{try{throw Error()}catch(P){z=P}(G=n())&&typeof G.catch=="function"&&G.catch(function(){})}}
vendor: 6,252 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 f=o.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var C=v.split(` 5`),N=S.split(` 6`);for(h=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;h<N.length&&!N[h].includes("DetermineComponentFrameRoot");)h++;if(o===C.length||h===N.length)for(o=C.length-1,h=N.length-1;1<=o&&0<=h&&C[o]!==N[h];)h--;for(;1<=o&&0<=h;o--,h--)if(C[o]!==N[h]){if(o!==1||h!==1)do if(o--,h--,0>h||C[o]!==N[h]){var H=` 7`+C[o].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=o&&0<=h);break}}}finally{Si=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?hn(i):""}function Xa(n,r){switch(n.tag){case 26:case 27:case 5:return hn(n.type);case 16:return hn("Lazy");case 13:return n.child!==r&&r!==null?hn("Suspense Fallback"):hn("Suspense");case 19:return hn("SuspenseList");case 0:case 15:return gs(n.type,!1);case 11:return gs(n.type.render,!1);case 1:return gs(n.type,!0);case 31:return hn("Activity");default:return""}}function Tn(n){try{var r="",i=null;do r+=Xa(n,i),i=n,n=n.return;while(n);return r}catch(o){return` 8Error generating stack: `+o.message+` 9`+o.stack}}var Lr=Object.prototype.hasOwnProperty,tn=e.unstable_scheduleCallback,wi=e.unstable_cancelCallback,Za=e.unstable_shouldYield,hu=e.unstable_requestPaint,vt=e.unstable_now,ze=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,fn=e.unstable_UserBlockingPriority,ms=e.unstable_NormalPriority,ob=e.unstable_LowPriority,zf=e.unstable_IdlePriority,lb=e.log,ub=e.unstable_setDisableYieldValue,Ei=null,Ut=null;function Zn(n){if(typeof lb=="function"&&ub(n),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(Ei,n)}catch{}}var Nt=Math.clz32?Math.clz32:fb,cb=Math.log,hb=Math.LN2;function fb(n){return n>>>=0,n===0?32:31-(cb(n)/hb|0)|0}var Wa=256,eo=262144,to=4194304;function zr(n){var r=n&42;if(r!==0)return r;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function no(n,r,i){var o=n.pendingLanes;if(o===0)return 0;var h=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=o&134217727;return S!==0?(o=S&~f,o!==0?h=zr(o):(v&=S,v!==0?h=zr(v):i||(i=S&~n,i!==0&&(h=zr(i))))):(S=o&~f,S!==0?h=zr(S):v!==0?h=zr(v):i||(i=o&~n,i!==0&&(h=zr(i)))),h===0?0:r!==0&&r!==h&&(r&f)===0&&(f=h&-h,i=r&-r,f>=i||f===32&&(i&4194048)!==0)?r:h}function Ti(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function db(n,r){switch(n){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 Pf(){var n=to;return to<<=1,(to&62914560)===0&&(to=4194304),n}function fu(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Ri(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function pb(n,r,i,o,h,f){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,C=n.expirationTimes,N=n.hiddenUpdates;for(i=v&~i;0<i;){var H=31-Nt(i),G=1<<H;S[H]=0,C[H]=-1;var z=N[H];if(z!==null)for(N[H]=null,H=0;H<z.length;H++){var P=z[H];P!==null&&(P.lane&=-536870913)}i&=~G}o!==0&&Bf(n,o,0),f!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~r))}function Bf(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var o=31-Nt(r);n.entangledLanes|=r,n.entanglements[o]=n.entanglements[o]|1073741824|i&261930}function Hf(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var o=31-Nt(i),h=1<<o;h&r|n[o]&r&&(n[o]|=r),i&=~h}}function qf(n,r){var i=r&-r;return i=(i&42)!==0?1:du(i),(i&(n.suspendedLanes|r))!==0?0:i}function du(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function pu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function If(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Om(n.type))}function $f(n,r){var i=Y.p;try{return Y.p=n,r()}finally{Y.p=i}}var Wn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Wn,Et="__reactProps$"+Wn,ys="__reactContainer$"+Wn,gu="__reactEvents$"+Wn,gb="__reactListeners$"+Wn,mb="__reactHandles$"+Wn,Gf="__reactResources$"+Wn,Ai="__reactMarker$"+Wn;function mu(n){delete n[ft],delete n[Et],delete n[gu],delete n[gb],delete n[mb]}function vs(n){var r=n[ft];if(r)return r;for(var i=n.parentNode;i;){if(r=i[ys]||i[ft]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=hm(n);n!==null;){if(i=n[ft])return i;n=hm(n)}return r}n=i,i=n.parentNode}return null}function bs(n){if(n=n[ft]||n[ys]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Oi(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function _s(n){var r=n[Gf];return r||(r=n[Gf]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ot(n){n[Ai]=!0}
vendor: 6,971 bytes, line 9
9var Vf=new Set,Kf={};function Pr(n,r){Ss(n,r),Ss(n+"Capture",r)}function Ss(n,r){for(Kf[n]=r,n=0;n<r.length;n++)Vf.add(r[n])}var yb=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]*$"),Ff={},Yf={};function vb(n){return Lr.call(Yf,n)?!0:Lr.call(Ff,n)?!1:yb.test(n)?Yf[n]=!0:(Ff[n]=!0,!1)}function ro(n,r,i){if(vb(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function so(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function Rn(n,r,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+o)}}function Gt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Qf(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function bb(n,r,i){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,f=o.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(v){i=""+v,f.call(this,v)}}),Object.defineProperty(n,r,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function yu(n){if(!n._valueTracker){var r=Qf(n)?"checked":"value";n._valueTracker=bb(n,r,""+n[r])}}function Jf(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),o="";return n&&(o=Qf(n)?n.checked?"true":"false":n.value),n=o,n!==i?(r.setValue(n),!0):!1}function io(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var _b=/[\n"\\]/g;function Vt(n){return n.replace(_b,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function vu(n,r,i,o,h,f,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),r!=null?v==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Gt(r)):n.value!==""+Gt(r)&&(n.value=""+Gt(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?bu(n,v,Gt(r)):i!=null?bu(n,v,Gt(i)):o!=null&&n.removeAttribute("value"),h==null&&f!=null&&(n.defaultChecked=!!f),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+Gt(S):n.removeAttribute("name")}function Xf(n,r,i,o,h,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),r!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||r!=null)){yu(n);return}i=i!=null?""+Gt(i):"",r=r!=null?""+Gt(r):i,S||r===n.value||(n.value=r),n.defaultValue=r}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=S?n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),yu(n)}function bu(n,r,i){r==="number"&&io(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function ws(n,r,i,o){if(n=n.options,r){r={};for(var h=0;h<i.length;h++)r["$"+i[h]]=!0;for(i=0;i<n.length;i++)h=r.hasOwnProperty("$"+n[i].value),n[i].selected!==h&&(n[i].selected=h),h&&o&&(n[i].defaultSelected=!0)}else{for(i=""+Gt(i),r=null,h=0;h<n.length;h++){if(n[h].value===i){n[h].selected=!0,o&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Zf(n,r,i){if(r!=null&&(r=""+Gt(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+Gt(i):""}function Wf(n,r,i,o){if(r==null){if(o!=null){if(i!=null)throw Error(a(92));if(Be(o)){if(1<o.length)throw Error(a(93));o=o[0]}i=o}i==null&&(i=""),r=i}i=Gt(r),n.defaultValue=i,o=n.textContent,o===i&&o!==""&&o!==null&&(n.value=o),yu(n)}function Es(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var Sb=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 ed(n,r,i){var o=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":o?n.setProperty(r,i):typeof i!="number"||i===0||Sb.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function td(n,r,i){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var h in r)o=r[h],r.hasOwnProperty(h)&&i[h]!==o&&ed(n,h,o)}else for(var f in r)r.hasOwnProperty(f)&&ed(n,f,r[f])}function _u(n){if(n.indexOf("-")===-1)return!1;switch(n){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 wb=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"]]),Eb=/^[\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 ao(n){return Eb.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function An(){}var Su=null;function wu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ts=null,Rs=null;
vendor: 1,742 bytes, line 9
9function nd(n){var r=bs(n);if(r&&(n=r.stateNode)){var i=n[Et]||null;e:switch(n=r.stateNode,r.type){case"input":if(vu(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Vt(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var o=i[r];if(o!==n&&o.form===n.form){var h=o[Et]||null;if(!h)throw Error(a(90));vu(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<i.length;r++)o=i[r],o.form===n.form&&Jf(o)}break e;case"textarea":Zf(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&ws(n,!!i.multiple,r,!1)}}}var Eu=!1;function rd(n,r,i){if(Eu)return n(r,i);Eu=!0;try{var o=n(r);return o}finally{if(Eu=!1,(Ts!==null||Rs!==null)&&(Yo(),Ts&&(r=Ts,n=Rs,Rs=Ts=null,nd(r),n)))for(r=0;r<n.length;r++)nd(n[r])}}function Ci(n,r){var i=n.stateNode;if(i===null)return null;var o=i[Et]||null;if(o===null)return null;i=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)||(n=n.type,o=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!o;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,r,typeof i));return i}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tu=!1;if(On)try{var xi={};Object.defineProperty(xi,"passive",{get:function(){Tu=!0}}),window.addEventListener("test",xi,xi),window.removeEventListener("test",xi,xi)}catch{Tu=!1}var er=null,Ru=null,oo=null;
vendor: 2,841 bytes, line 9
9function sd(){if(oo)return oo;var n,r=Ru,i=r.length,o,h="value"in er?er.value:er.textContent,f=h.length;for(n=0;n<i&&r[n]===h[n];n++);var v=i-n;for(o=1;o<=v&&r[i-o]===h[f-o];o++);return oo=h.slice(n,1<o?1-o:void 0)}function lo(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function uo(){return!0}function id(){return!1}function Tt(n){function r(i,o,h,f,v){this._reactName=i,this._targetInst=h,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?uo:id,this.isPropagationStopped=id,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=uo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=uo)},persist:function(){},isPersistent:uo}),r}var Br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=Tt(Br),ki=m({},Br,{view:0,detail:0}),Tb=Tt(ki),Au,Ou,ji,ho=m({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ji&&(ji&&n.type==="mousemove"?(Au=n.screenX-ji.screenX,Ou=n.screenY-ji.screenY):Ou=Au=0,ji=n),Au)},movementY:function(n){return"movementY"in n?n.movementY:Ou}}),ad=Tt(ho),Rb=m({},ho,{dataTransfer:0}),Ab=Tt(Rb),Ob=m({},ki,{relatedTarget:0}),Cu=Tt(Ob),Cb=m({},Br,{animationName:0,elapsedTime:0,pseudoElement:0}),xb=Tt(Cb),kb=m({},Br,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),jb=Tt(kb),Mb=m({},Br,{data:0}),od=Tt(Mb),Db={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ub={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"},Nb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};
vendor: 5,412 bytes, line 9
9function Lb(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Nb[n])?!!r[n]:!1}function xu(){return Lb}var zb=m({},ki,{key:function(n){if(n.key){var r=Db[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=lo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Ub[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xu,charCode:function(n){return n.type==="keypress"?lo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?lo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Pb=Tt(zb),Bb=m({},ho,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ld=Tt(Bb),Hb=m({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xu}),qb=Tt(Hb),Ib=m({},Br,{propertyName:0,elapsedTime:0,pseudoElement:0}),$b=Tt(Ib),Gb=m({},ho,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Vb=Tt(Gb),Kb=m({},Br,{newState:0,oldState:0}),Fb=Tt(Kb),Yb=[9,13,27,32],ku=On&&"CompositionEvent"in window,Mi=null;On&&"documentMode"in document&&(Mi=document.documentMode);var Qb=On&&"TextEvent"in window&&!Mi,ud=On&&(!ku||Mi&&8<Mi&&11>=Mi),cd=" ",hd=!1;function fd(n,r){switch(n){case"keyup":return Yb.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var As=!1;function Jb(n,r){switch(n){case"compositionend":return dd(r);case"keypress":return r.which!==32?null:(hd=!0,cd);case"textInput":return n=r.data,n===cd&&hd?null:n;default:return null}}function Xb(n,r){if(As)return n==="compositionend"||!ku&&fd(n,r)?(n=sd(),oo=Ru=er=null,As=!1,n):null;switch(n){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;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ud&&r.locale!=="ko"?null:r.data;default:return null}}var Zb={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 pd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!Zb[n.type]:r==="textarea"}function gd(n,r,i,o){Ts?Rs?Rs.push(o):Rs=[o]:Ts=o,r=tl(r,"onChange"),0<r.length&&(i=new co("onChange","change",null,i,o),n.push({event:i,listeners:r}))}var Di=null,Ui=null;function Wb(n){Xg(n,0)}function fo(n){var r=Oi(n);if(Jf(r))return n}function md(n,r){if(n==="change")return r}var yd=!1;if(On){var ju;if(On){var Mu="oninput"in document;if(!Mu){var vd=document.createElement("div");vd.setAttribute("oninput","return;"),Mu=typeof vd.oninput=="function"}ju=Mu}else ju=!1;yd=ju&&(!document.documentMode||9<document.documentMode)}function bd(){Di&&(Di.detachEvent("onpropertychange",_d),Ui=Di=null)}function _d(n){if(n.propertyName==="value"&&fo(Ui)){var r=[];gd(r,Ui,n,wu(n)),rd(Wb,r)}}function e_(n,r,i){n==="focusin"?(bd(),Di=r,Ui=i,Di.attachEvent("onpropertychange",_d)):n==="focusout"&&bd()}function t_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return fo(Ui)}function n_(n,r){if(n==="click")return fo(r)}function r_(n,r){if(n==="input"||n==="change")return fo(r)}function s_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Lt=typeof Object.is=="function"?Object.is:s_;function Ni(n,r){if(Lt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var h=i[o];if(!Lr.call(r,h)||!Lt(n[h],r[h]))return!1}return!0}function Sd(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function wd(n,r){var i=Sd(n);n=0;for(var o;i;){if(i.nodeType===3){if(o=n+i.textContent.length,n<=r&&o>=r)return{node:i,offset:r-n};n=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Sd(i)}}function Ed(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Ed(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Td(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=io(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=io(n.document)}return r}function Du(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var i_=On&&"documentMode"in document&&11>=document.documentMode,Os=null,Uu=null,Li=null,Nu=!1;function Rd(n,r,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Nu||Os==null||Os!==io(o)||(o=Os,"selectionStart"in o&&Du(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focu
vendor: 15,667 bytes, line 9
9sNode:o.focusNode,focusOffset:o.focusOffset}),Li&&Ni(Li,o)||(Li=o,o=tl(Uu,"onSelect"),0<o.length&&(r=new co("onSelect","select",null,r,i),n.push({event:r,listeners:o}),r.target=Os)))}function Hr(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var Cs={animationend:Hr("Animation","AnimationEnd"),animationiteration:Hr("Animation","AnimationIteration"),animationstart:Hr("Animation","AnimationStart"),transitionrun:Hr("Transition","TransitionRun"),transitionstart:Hr("Transition","TransitionStart"),transitioncancel:Hr("Transition","TransitionCancel"),transitionend:Hr("Transition","TransitionEnd")},Lu={},Ad={};On&&(Ad=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function qr(n){if(Lu[n])return Lu[n];if(!Cs[n])return n;var r=Cs[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in Ad)return Lu[n]=r[i];return n}var Od=qr("animationend"),Cd=qr("animationiteration"),xd=qr("animationstart"),a_=qr("transitionrun"),o_=qr("transitionstart"),l_=qr("transitioncancel"),kd=qr("transitionend"),jd=new Map,zu="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(" ");zu.push("scrollEnd");function nn(n,r){jd.set(n,r),Pr(r,[n])}var po=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Kt=[],xs=0,Pu=0;function go(){for(var n=xs,r=Pu=xs=0;r<n;){var i=Kt[r];Kt[r++]=null;var o=Kt[r];Kt[r++]=null;var h=Kt[r];Kt[r++]=null;var f=Kt[r];if(Kt[r++]=null,o!==null&&h!==null){var v=o.pending;v===null?h.next=h:(h.next=v.next,v.next=h),o.pending=h}f!==0&&Md(i,h,f)}}function mo(n,r,i,o){Kt[xs++]=n,Kt[xs++]=r,Kt[xs++]=i,Kt[xs++]=o,Pu|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function Bu(n,r,i,o){return mo(n,r,i,o),yo(n)}function Ir(n,r){return mo(n,null,null,r),yo(n)}function Md(n,r,i){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i);for(var h=!1,f=n.return;f!==null;)f.childLanes|=i,o=f.alternate,o!==null&&(o.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(h=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,h&&r!==null&&(h=31-Nt(i),n=f.hiddenUpdates,o=n[h],o===null?n[h]=[r]:o.push(r),r.lane=i|536870912),f):null}function yo(n){if(50<sa)throw sa=0,Yc=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var ks={};function u_(n,r,i,o){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=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(n,r,i,o){return new u_(n,r,i,o)}function Hu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Cn(n,r){var i=n.alternate;return i===null?(i=zt(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function Dd(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function vo(n,r,i,o,h,f){var v=0;if(o=n,typeof n=="function")Hu(n)&&(v=1);else if(typeof n=="string")v=pS(n,i,W.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case J:return n=zt(31,i,r,h),n.elementType=J,n.lanes=f,n;case A:return $r(i.children,h,f,r);case R:v=8,h|=24;break;case O:return n=zt(12,i,r,h|2),n.elementType=O,n.lanes=f,n;case Q:return n=zt(13,i,r,h),n.elementType=Q,n.lanes=f,n;case V:return n=zt(19,i,r,h),n.elementType=V,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case D:v=9;break e;case L:v=11;break e;case q:v=14;break e;case K:v=16,o=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),o=null}return r=zt(v,i,r,h),r.elementType=n,r.type=o,r.lanes=f,r}function $r(n,r,i,o){return n=zt(7,n,o,r),n.lanes=i,n}function qu(n,r,i){return n=zt(6,n,null,r),n.lanes=i,n}function Ud(n){var r=zt(18,null,null,0);return r.stateNode=n,r}function Iu(n,r,i){return r=zt(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Nd=new WeakMap;function Ft(n,r){if(typeof n=="object"&&n!==null){var i=Nd.get(n);return i!==void 0?i:(r={value:n,source:r,stack:Tn(r)},Nd.set(n,r),r)}return{value:n,source:r,stack:Tn(r)}}var js=[],Ms=0,bo=null,zi=0,Yt=[],Qt=0,tr=null,dn=1,pn="";function xn(n,r){js[Ms++]=zi,js[Ms++]=bo,bo=n,zi=r}function Ld(n,r,i){Yt[Qt++]=dn,Yt[Qt++]=pn,Yt[Qt++]=tr,tr=n;var o=dn;n=pn;var h=32-Nt(o)-1;o&=~(1<<h),i+=1;var f=32-Nt(r)+h;if(30<f){var v=h-h%5;f=(o&(1<<v)-1).toString(32),o>>=v,h-=v,dn=1<<32-Nt(r)+h|i<<h|o,pn=f+n}else dn=1<<f|i<<h|o,pn=n}function $u(n){n.return!==null&&(xn(n,1),Ld(n,1,0))}function Gu(n){for(;n===bo;)bo=js[--Ms],js[Ms]=null,zi=js[--Ms],js[Ms]=null;for(;n===tr;)tr=Yt[--Qt],Yt[Qt]=null,pn=Yt[--Qt],Yt[Qt]=null,dn=Yt[--Qt],Yt[Qt]=null}function zd(n,r){Yt[Qt++]=dn,Yt[Qt++]=pn,Yt[Qt++]=tr,dn=r.id,pn=r.overflow,tr=n}var dt=null,He=null,_e=!1,nr=null,Jt=!1,Vu=Error(a(519));function rr(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pi(Ft(r,n)),Vu}function Pd(n){var r=n.stateNode,i=n.type,o=n.memoizedProps;switch(r[ft]=n,r[Et]=o,i){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(i=0;i<aa.length;i++)me(aa[i],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),Xf(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),Wf(r,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||o.suppressHydrationWarning===!0||tm(r.textContent,i)?(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||rr(n,!0)}function Bd(n){for(dt=n.return;dt;)switch(dt.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:dt=dt.return}}function Ds(n){if(n!==dt)return!1;if(!_e)return Bd(n),_e=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||uh(n.type,n.memoizedProps)),i=!i),i&&He&&rr(n),Bd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));He=cm(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));He=cm(n)}else r===27?(r=He,yr(n.type)?(n=ph,ph=null,He=n):He=r):He=dt?Zt(n.stateNode.nextSibling):null;return!0}function Gr(){He=dt=null,_e=!1}function Ku(){var n=nr;return n!==null&&(Ct===null?Ct=n:Ct.push.apply(Ct,n),nr=null),n}function Pi(n){nr===null?nr=[n]:nr.push(n)}var Fu=k(null),Vr=null,kn=null;function sr(n,r,i){X(Fu,r._currentValue),r._currentValue=i}function jn(n){n._currentValue=Fu.current,$(Fu)}function Yu(n,r,i){for(;n!==null;){var o=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),n===i)break;n=n.return}}function Qu(n,r,i,o){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var f=h.dependencies;if(f!==null){var v=h.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=h;for(var C=0;C<r.length;C++)if(S.context===r[C]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),Yu(f.return,i,n),o||(v=null);break e}f=S.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),Yu(v,i,n),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===n){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function Us(n,r,i,o){n=null;for(var h=r,f=!1;h!==null;){if(!f){if((h.flags&524288)!==0)f=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=h.type;Lt(h.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(h===Se.current){if(v=h.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(ha):n=[ha])}h=h.return}n!==null&&Qu(r,n,i,o),r.flags|=262144}function _o(n){for(n=n.firstContext;n!==null;){if(!Lt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Kr(n){Vr=n,kn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function pt(n){return Hd(Vr,n)}function So(n,r){return Vr===null&&Kr(n),Hd(n,r)}function Hd(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},kn===null){if(n===null)throw Error(a(308));kn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else kn=kn.next=r;return i}var c_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,o){n.push(o)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},h_=e.unstable_scheduleCallback,f_=e.unstable_NormalPriority,Ze={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ju(){return{controller:new c_,data:new Map,refCount:0}}function Bi(n){n.refCount--,n.refCount===0&&h_(f_,function(){n.controller.abort()})}var Hi=null,Xu=0,Ns=0,Ls=null;function d_(n,r){if(Hi===null){var i=Hi=[];Xu=0,Ns=eh(),Ls={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Xu++,r.then(qd,qd),r}function qd(){if(--Xu===0&&Hi!==null){Ls!==null&&(Ls.status="fulfilled");var n=Hi;Hi=null,Ns=0,Ls=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function p_(n,r){var i=[],o={status:"pending",value:null,reason:null,then:function(h){i.push(h)}};return n.then(function(){o.status="fulfilled",o.value=r;for(var h=0;h<i.length;h++)(0,i[h])(r)},function(h){for(o.status="rejected",o.reason=h,h=0;h<i.length;h++)(0,i[h])(void 0)}),o}var Id=B.S;B.S=function(n,r){Rg=vt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&d_(n,r),Id!==null&&Id(n,r)};var Fr=k(null);function Zu(){var n=Fr.current;return n!==null?n:Ne.pooledCache}function wo(n,r){r===null?X(Fr,Fr.current):X(Fr,r.pool)}function $d(){var n=Zu();return n===null?null:{parent:Ze._currentValue,pool:n}}var zs=Error(a(460)),Wu=Error(a(474)),Eo=Error(a(542)),To={then:function(){}};function Gd(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Vd(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(An,An),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Fd(n),n;default:if(typeof r.status=="string")r.then(An,An);else{if(n=Ne,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.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 n=r.reason,Fd(n),n}throw Qr=r,zs}}function Yr(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Qr=i,zs):i}}var Qr=null;function Kd(){if(Qr===null)throw Error(a(459));var n=Qr;return Qr=null,n}function Fd(n){if(n===zs||n===Eo)throw Error(a(483))}var Ps=null,qi=0;function Ro(n){var r=qi;return qi+=1,Ps===null&&(Ps=[]),Vd(Ps,n,r)}function Ii(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Ao(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Yd(n){function r(M,x){if(n){var U=M.deletions;U===null?(M.deletions=[x],M.flags|=16):U.push(x)}}function i(M,x){if(!n)return null;for(;x!==null;)r(M,x),x=x.sibling;return null}function o(M){for(var x=new Map;M!==null;)M.key!==null?x.set(M.key,M):x.set(M.index,M),M=M.sibling;return x}function h(M,x){return M=Cn(M,x),M.index=0,M.sibling=null,M}function f(M,x,U){return M.index=U,n?(U=M.alternate,U!==null?(U=U.index,U<x?(M.flags|=67108866,x):U):(M.flags|=67108866,x)):(M.flags|=1048576,x)}function v(M){return n&&M.alternate===null&&(M.flags|=67108866),M}function S(M,x,U,I){return x===null||x.tag!==6?(x=qu(U,M.mode,I),x.return=M,x):(x=h(x,U),x.return=M,x)}function C(M,x,U,I){var ae=U.type;return ae===A?H(M,x,U.props.children,I,U.key):x!==null&&(x.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===K&&Yr(ae)===x.type)?(x=h(x,U.props),Ii(x,U),x.return=M,x):(x=vo(U.type,U.key,U.props,null,M.mode,I),Ii(x,U),x.return=M,x)}function N(M,x,U,I){return x===null||x.tag!==4||x.stateNode.containerInfo!==U.containerInfo||x.stateNode.implementation!==U.implementation?(x=Iu(U,M.mode,I),x.return=M,x):(x=h(x,U.children||[]),x.return=M,x)}function H(M,x,U,I,ae){return x===null||x.tag!==7?(x=$r(U,M.mode,I,ae),x.return=M,x):(x=h(x,U),x.return=M,x)}function G(M,x,U){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=qu(""+x,M.mode,U),x.return=M,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _:return U=vo(x.type,x.key,x.props,null,M.mode,U),Ii(U,x),U.return=M,U;case w:return x=Iu(x,M.mode,U),x.return=M,x;case K:return x=Yr(x),G(M,x,U)}if(Be(x)||ye(x))return x=$r(x,M.mode,U,null),x.return=M,x;if(typeof x.then=="function")return G(M,Ro(x),U);if(x.$$typeof===j)return G(M,So(M,x),U);Ao(M,x)}return null}function z(M,x,U,I){var ae=x!==null?x.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ae!==null?null:S(M,x,""+U,I);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case _:return U.key===ae?C(M,x,U,I):null;case w:return U.key===ae?N(M,x,U,I):null;case K:return U=Yr(U),z(M,x,U,I)}if(Be(U)||ye(U))return ae!==null?null:H(M,x,U,I,null);
vendor: 4,264 bytes, line 9
9if(typeof U.then=="function")return z(M,x,Ro(U),I);if(U.$$typeof===j)return z(M,x,So(M,U),I);Ao(M,U)}return null}function P(M,x,U,I,ae){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return M=M.get(U)||null,S(x,M,""+I,ae);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return M=M.get(I.key===null?U:I.key)||null,C(x,M,I,ae);case w:return M=M.get(I.key===null?U:I.key)||null,N(x,M,I,ae);case K:return I=Yr(I),P(M,x,U,I,ae)}if(Be(I)||ye(I))return M=M.get(U)||null,H(x,M,I,ae,null);if(typeof I.then=="function")return P(M,x,U,Ro(I),ae);if(I.$$typeof===j)return P(M,x,U,So(x,I),ae);Ao(x,I)}return null}function ee(M,x,U,I){for(var ae=null,we=null,ne=x,de=x=0,be=null;ne!==null&&de<U.length;de++){ne.index>de?(be=ne,ne=null):be=ne.sibling;var Ee=z(M,ne,U[de],I);if(Ee===null){ne===null&&(ne=be);break}n&&ne&&Ee.alternate===null&&r(M,ne),x=f(Ee,x,de),we===null?ae=Ee:we.sibling=Ee,we=Ee,ne=be}if(de===U.length)return i(M,ne),_e&&xn(M,de),ae;if(ne===null){for(;de<U.length;de++)ne=G(M,U[de],I),ne!==null&&(x=f(ne,x,de),we===null?ae=ne:we.sibling=ne,we=ne);return _e&&xn(M,de),ae}for(ne=o(ne);de<U.length;de++)be=P(ne,M,de,U[de],I),be!==null&&(n&&be.alternate!==null&&ne.delete(be.key===null?de:be.key),x=f(be,x,de),we===null?ae=be:we.sibling=be,we=be);return n&&ne.forEach(function(wr){return r(M,wr)}),_e&&xn(M,de),ae}function ue(M,x,U,I){if(U==null)throw Error(a(151));for(var ae=null,we=null,ne=x,de=x=0,be=null,Ee=U.next();ne!==null&&!Ee.done;de++,Ee=U.next()){ne.index>de?(be=ne,ne=null):be=ne.sibling;var wr=z(M,ne,Ee.value,I);if(wr===null){ne===null&&(ne=be);break}n&&ne&&wr.alternate===null&&r(M,ne),x=f(wr,x,de),we===null?ae=wr:we.sibling=wr,we=wr,ne=be}if(Ee.done)return i(M,ne),_e&&xn(M,de),ae;if(ne===null){for(;!Ee.done;de++,Ee=U.next())Ee=G(M,Ee.value,I),Ee!==null&&(x=f(Ee,x,de),we===null?ae=Ee:we.sibling=Ee,we=Ee);return _e&&xn(M,de),ae}for(ne=o(ne);!Ee.done;de++,Ee=U.next())Ee=P(ne,M,de,Ee.value,I),Ee!==null&&(n&&Ee.alternate!==null&&ne.delete(Ee.key===null?de:Ee.key),x=f(Ee,x,de),we===null?ae=Ee:we.sibling=Ee,we=Ee);return n&&ne.forEach(function(RS){return r(M,RS)}),_e&&xn(M,de),ae}function De(M,x,U,I){if(typeof U=="object"&&U!==null&&U.type===A&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case _:e:{for(var ae=U.key;x!==null;){if(x.key===ae){if(ae=U.type,ae===A){if(x.tag===7){i(M,x.sibling),I=h(x,U.props.children),I.return=M,M=I;break e}}else if(x.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===K&&Yr(ae)===x.type){i(M,x.sibling),I=h(x,U.props),Ii(I,U),I.return=M,M=I;break e}i(M,x);break}else r(M,x);x=x.sibling}U.type===A?(I=$r(U.props.children,M.mode,I,U.key),I.return=M,M=I):(I=vo(U.type,U.key,U.props,null,M.mode,I),Ii(I,U),I.return=M,M=I)}return v(M);case w:e:{for(ae=U.key;x!==null;){if(x.key===ae)if(x.tag===4&&x.stateNode.containerInfo===U.containerInfo&&x.stateNode.implementation===U.implementation){i(M,x.sibling),I=h(x,U.children||[]),I.return=M,M=I;break e}else{i(M,x);break}else r(M,x);x=x.sibling}I=Iu(U,M.mode,I),I.return=M,M=I}return v(M);case K:return U=Yr(U),De(M,x,U,I)}if(Be(U))return ee(M,x,U,I);if(ye(U)){if(ae=ye(U),typeof ae!="function")throw Error(a(150));return U=ae.call(U),ue(M,x,U,I)}if(typeof U.then=="function")return De(M,x,Ro(U),I);if(U.$$typeof===j)return De(M,x,So(M,U),I);Ao(M,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,x!==null&&x.tag===6?(i(M,x.sibling),I=h(x,U),I.return=M,M=I):(i(M,x),I=qu(U,M.mode,I),I.return=M,M=I),v(M)):i(M,x)}return function(M,x,U,I){try{qi=0;var ae=De(M,x,U,I);return Ps=null,ae}catch(ne){if(ne===zs||ne===Eo)throw ne;var we=zt(29,ne,null,M.mode);return we.lanes=I,we.return=M,we}}}var Jr=Yd(!0),Qd=Yd(!1),ir=!1;function ec(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tc(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ar(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function or(n,r,i){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var h=o.pending;
vendor: 7,529 bytes, line 9
9return h===null?r.next=r:(r.next=h.next,h.next=r),o.pending=r,r=yo(n),Md(n,null,i),r}return mo(n,o,r,i),yo(n)}function $i(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,Hf(n,i)}}function nc(n,r){var i=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var h=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?h=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?h=f=r:f=f.next=r}else h=f=r;i={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var rc=!1;function Gi(){if(rc){var n=Ls;if(n!==null)throw n}}function Vi(n,r,i,o){rc=!1;var h=n.updateQueue;ir=!1;var f=h.firstBaseUpdate,v=h.lastBaseUpdate,S=h.shared.pending;if(S!==null){h.shared.pending=null;var C=S,N=C.next;C.next=null,v===null?f=N:v.next=N,v=C;var H=n.alternate;H!==null&&(H=H.updateQueue,S=H.lastBaseUpdate,S!==v&&(S===null?H.firstBaseUpdate=N:S.next=N,H.lastBaseUpdate=C))}if(f!==null){var G=h.baseState;v=0,H=N=C=null,S=f;do{var z=S.lane&-536870913,P=z!==S.lane;if(P?(ve&z)===z:(o&z)===z){z!==0&&z===Ns&&(rc=!0),H!==null&&(H=H.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ee=n,ue=S;z=r;var De=i;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){G=ee.call(De,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(De,G,z):ee,z==null)break e;G=m({},G,z);break e;case 2:ir=!0}}z=S.callback,z!==null&&(n.flags|=64,P&&(n.flags|=8192),P=h.callbacks,P===null?h.callbacks=[z]:P.push(z))}else P={lane:z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},H===null?(N=H=P,C=G):H=H.next=P,v|=z;if(S=S.next,S===null){if(S=h.shared.pending,S===null)break;P=S,S=P.next,P.next=null,h.lastBaseUpdate=P,h.shared.pending=null}}while(!0);H===null&&(C=G),h.baseState=C,h.firstBaseUpdate=N,h.lastBaseUpdate=H,f===null&&(h.shared.lanes=0),fr|=v,n.lanes=v,n.memoizedState=G}}function Jd(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Xd(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Jd(i[n],r)}var Bs=k(null),Oo=k(0);function Zd(n,r){n=Hn,X(Oo,n),X(Bs,r),Hn=n|r.baseLanes}function sc(){X(Oo,Hn),X(Bs,Bs.current)}function ic(){Hn=Oo.current,$(Bs),$(Oo)}var Pt=k(null),Xt=null;function lr(n){var r=n.alternate;X(Qe,Qe.current&1),X(Pt,n),Xt===null&&(r===null||Bs.current!==null||r.memoizedState!==null)&&(Xt=n)}function ac(n){X(Qe,Qe.current),X(Pt,n),Xt===null&&(Xt=n)}function Wd(n){n.tag===22?(X(Qe,Qe.current),X(Pt,n),Xt===null&&(Xt=n)):ur()}function ur(){X(Qe,Qe.current),X(Pt,Pt.current)}function Bt(n){$(Pt),Xt===n&&(Xt=null),$(Qe)}var Qe=k(0);function Co(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||fh(i)||dh(i)))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===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Mn=0,fe=null,je=null,We=null,xo=!1,Hs=!1,Xr=!1,ko=0,Ki=0,qs=null,g_=0;function Ge(){throw Error(a(321))}function oc(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!Lt(n[i],r[i]))return!1;return!0}function lc(n,r,i,o,h,f){return Mn=f,fe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=n===null||n.memoizedState===null?Lp:Ec,Xr=!1,f=i(o,h),Xr=!1,Hs&&(f=tp(r,i,o,h)),ep(n),f}function ep(n){B.H=Qi;var r=je!==null&&je.next!==null;if(Mn=0,We=je=fe=null,xo=!1,Ki=0,qs=null,r)throw Error(a(300));n===null||et||(n=n.dependencies,n!==null&&_o(n)&&(et=!0))}function tp(n,r,i,o){fe=n;var h=0;do{if(Hs&&(qs=null),Ki=0,Hs=!1,25<=h)throw Error(a(301));if(h+=1,We=je=null,n.updateQueue!=null){var f=n.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}B.H=zp,f=r(i,o)}while(Hs);return f}function m_(){var n=B.H,r=n.useState()[0];return r=typeof r.then=="function"?Fi(r):r,n=n.useState()[0],(je!==null?je.memoizedState:null)!==n&&(fe.flags|=1024),r}function uc(){var n=ko!==0;return ko=0,n}function cc(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function hc(n){if(xo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}xo=!1}Mn=0,We=je=fe=null,Hs=!1,Ki=ko=0,qs=null}function St(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?fe.memoizedState=We=n:We=We.next=n,We}function Je(){if(je===null){var n=fe.alternate;n=n!==null?n.memoizedState:null}else n=je.next;var r=We===null?fe.memoizedState:We.next;if(r!==null)We=r,je=n;else{if(n===null)throw fe.alternate===null?Error(a(467)):Error(a(310));je=n,n={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},We===null?fe.memoizedState=We=n:We=We.next=n}return We}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fi(n){var r=Ki;return Ki+=1,qs===null&&(qs=[]),n=Vd(qs,n,r),r=fe,(We===null?r.memoizedState:We.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?Lp:Ec),n}function Mo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Fi(n);if(n.$$typeof===j)return pt(n)}throw Error(a(438,String(n)))}function fc(n){var r=null,i=fe.updateQueue;if(i!==null&&(r=i.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}),i===null&&(i=jo(),fe.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),o=0;o<n;o++)i[o]=le;return r.index++,i}function Dn(n,r){return typeof r=="function"?r(n):r}function Do(n){var r=Je();return dc(r,je,n)}function dc(n,r,i){var o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var h=n.baseQueue,f=o.pending;if(f!==null){if(h!==null){var v=h.next;h.next=f.next,f.next=v}r.baseQueue=h=f,o.pending=null}if(f=n.baseState,h===null)n.memoizedState=f;else{r=h.next;var S=v=null,C=null,N=r,H=!1;do{var G=N.lane&-536870913;if(G!==N.lane?(ve&G)===G:(Mn&G)===G){var z=N.revertLane;if(z===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),G===Ns&&(H=!0);else if((Mn&z)===z){N=N.next,z===Ns&&(H=!0);continue}else G={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(S=C=G,v=f):C=C.next=G,fe.lanes|=z,fr|=z;G=N.action,Xr&&i(f,G),f=N.hasEagerState?N.eagerState:i(f,G)}else z={lane:G,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(S=C=z,v=f):C=C.next=z,fe.lanes|=G,fr|=G;N=N.next}while(N!==null&&N!==r);if(C===null?v=f:C.next=S,!Lt(f,n.memoizedState)&&(et=!0,H&&(i=Ls,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=C,o.lastRenderedState=f}return h===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function pc(n){var r=Je(),i=r.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;
vendor: 5,778 bytes, line 9
9var o=i.dispatch,h=i.pending,f=r.memoizedState;if(h!==null){i.pending=null;var v=h=h.next;do f=n(f,v.action),v=v.next;while(v!==h);Lt(f,r.memoizedState)||(et=!0),r.memoizedState=f,r.baseQueue===null&&(r.baseState=f),i.lastRenderedState=f}return[f,o]}function np(n,r,i){var o=fe,h=Je(),f=_e;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=r();var v=!Lt((je||h).memoizedState,i);if(v&&(h.memoizedState=i,et=!0),h=h.queue,yc(ip.bind(null,o,h,n),[n]),h.getSnapshot!==r||v||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,Is(9,{destroy:void 0},sp.bind(null,o,h,i,r),null),Ne===null)throw Error(a(349));f||(Mn&127)!==0||rp(o,r,i)}return i}function rp(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=fe.updateQueue,r===null?(r=jo(),fe.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function sp(n,r,i,o){r.value=i,r.getSnapshot=o,ap(r)&&op(n)}function ip(n,r,i){return i(function(){ap(r)&&op(n)})}function ap(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!Lt(n,i)}catch{return!0}}function op(n){var r=Ir(n,2);r!==null&&xt(r,n,2)}function gc(n){var r=St();if(typeof n=="function"){var i=n;if(n=i(),Xr){Zn(!0);try{i()}finally{Zn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:n},r}function lp(n,r,i,o){return n.baseState=i,dc(n,je,typeof o=="function"?o:Dn)}function y_(n,r,i,o,h){if(Lo(n))throw Error(a(485));if(n=r.action,n!==null){var f={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};B.T!==null?i(!0):f.isTransition=!1,o(f),i=r.pending,i===null?(f.next=r.pending=f,up(r,f)):(f.next=i.next,r.pending=i.next=f)}}function up(n,r){var i=r.action,o=r.payload,h=n.state;if(r.isTransition){var f=B.T,v={};B.T=v;try{var S=i(h,o),C=B.S;C!==null&&C(v,S),cp(n,r,S)}catch(N){mc(n,r,N)}finally{f!==null&&v.types!==null&&(f.types=v.types),B.T=f}}else try{f=i(h,o),cp(n,r,f)}catch(N){mc(n,r,N)}}function cp(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){hp(n,r,o)},function(o){return mc(n,r,o)}):hp(n,r,i)}function hp(n,r,i){r.status="fulfilled",r.value=i,fp(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,up(n,i)))}function mc(n,r,i){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=i,fp(r),r=r.next;while(r!==o)}n.action=null}function fp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function dp(n,r){return r}function pp(n,r){if(_e){var i=Ne.formState;if(i!==null){e:{var o=fe;if(_e){if(He){t:{for(var h=He,f=Jt;h.nodeType!==8;){if(!f){h=null;break t}if(h=Zt(h.nextSibling),h===null){h=null;break t}}f=h.data,h=f==="F!"||f==="F"?h:null}if(h){He=Zt(h.nextSibling),o=h.data==="F!";break e}}rr(o)}o=!1}o&&(r=i[0])}}return i=St(),i.memoizedState=i.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dp,lastRenderedState:r},i.queue=o,i=Dp.bind(null,fe,o),o.dispatch=i,o=gc(!1),f=wc.bind(null,fe,!1,o.queue),o=St(),h={state:r,dispatch:null,action:n,pending:null},o.queue=h,i=y_.bind(null,fe,h,f,i),h.dispatch=i,o.memoizedState=n,[r,i,!1]}function gp(n){var r=Je();return mp(r,je,n)}function mp(n,r,i){if(r=dc(n,r,dp)[0],n=Do(Dn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Fi(r)}catch(v){throw v===zs?Eo:v}else o=r;r=Je();var h=r.queue,f=h.dispatch;return i!==r.memoizedState&&(fe.flags|=2048,Is(9,{destroy:void 0},v_.bind(null,h,i),null)),[o,f,n]}function v_(n,r){n.action=r}function yp(n){var r=Je(),i=je;if(i!==null)return mp(r,i,n);Je(),r=r.memoizedState,i=Je();var o=i.queue.dispatch;return i.memoizedState=n,[r,o,!1]}function Is(n,r,i,o){return n={tag:n,create:i,deps:o,inst:r,next:null},r=fe.updateQueue,r===null&&(r=jo(),fe.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(o=i.next,i.next=n,n.next=o,r.lastEffect=n),n}function vp(){return Je().memoizedState}function Uo(n,r,i,o){var h=St();fe.flags|=n,h.memoizedState=Is(1|r,{destroy:void 0},i,o===void 0?null:o)}function No(n,r,i,o){var h=Je();o=o===void 0?null:o;var f=h.memoizedState.inst;je!==null&&o!==null&&oc(o,je.memoizedState.deps)?h.memoizedState=Is(r,f,i,o):(fe.flags|=n,h.memoizedState=Is(1|r,f,i,o))}function bp(n,r){Uo(8390656,8,n,r)}function yc(n,r){No(2048,8,n,r)}function b_(n){fe.flags|=4;var r=fe.updateQueue;if(r===null)r=jo(),fe.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function _p(n){var r=Je().memoizedState;return b_({ref:r,nextImpl:n}),function(){if((Ae&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Sp(n,r){return No(4,2,n,r)}function wp(n,r){return No(4,4,n,r)}function Ep(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Tp(n,r,i){i=i!=null?i.concat([n]):null,No(4,4,Ep.bind(null,r,n),i)}function vc(){}function Rp(n,r){var i=Je();r=r===void 0?null:r;var o=i.memoizedState;return r!==null&&oc(r,o[1])?o[0]:(i.memoizedState=[n,r],n)}function Ap(n,r){var i=Je();r=r===void 0?null:r;var o=i.memoizedState;if(r!==null&&oc(r,o[1]))return o[0];if(o=n(),Xr){Zn(!0);try{n()}finally{Zn(!1)}}return i.memoizedState=[o,r],o}function bc(n,r,i){return i===void 0||(Mn&1073741824)!==0&&(ve&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=Og(),fe.lanes|=n,fr|=n,i)}function Op(n,r,i,o){return Lt(i,r)?i:Bs.current!==null?(n=bc(n,i,o),Lt(n,r)||(et=!0),n):(Mn&42)===0||(Mn&1073741824)!==0&&(ve&261930)===0?(et=!0,n.memoizedState=i):(n=Og(),fe.lanes|=n,fr|=n,r)}function Cp(n,r,i,o,h){var f=Y.p;Y.p=f!==0&&8>f?f:8;var v=B.T,S={};B.T=S,wc(n,!1,r,i);try{var C=h(),N=B.S;if(N!==null&&N(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var H=
vendor: 4,745 bytes, line 9
9p_(C,o);Yi(n,r,H,It(n))}else Yi(n,r,o,It(n))}catch(G){Yi(n,r,{then:function(){},status:"rejected",reason:G},It())}finally{Y.p=f,v!==null&&S.types!==null&&(v.types=S.types),B.T=v}}function __(){}function _c(n,r,i,o){if(n.tag!==5)throw Error(a(476));var h=xp(n).queue;Cp(n,h,r,oe,i===null?__:function(){return kp(n),i(o)})}function xp(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:oe},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function kp(n){var r=xp(n);r.next===null&&(r=n.alternate.memoizedState),Yi(n,r.next.queue,{},It())}function Sc(){return pt(ha)}function jp(){return Je().memoizedState}function Mp(){return Je().memoizedState}function S_(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=It();n=ar(i);var o=or(r,n,i);o!==null&&(xt(o,r,i),$i(o,r,i)),r={cache:Ju()},n.payload=r;return}r=r.return}}function w_(n,r,i){var o=It();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Lo(n)?Up(r,i):(i=Bu(n,r,i,o),i!==null&&(xt(i,n,o),Np(i,r,o)))}function Dp(n,r,i){var o=It();Yi(n,r,i,o)}function Yi(n,r,i,o){var h={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Lo(n))Up(r,h);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var v=r.lastRenderedState,S=f(v,i);if(h.hasEagerState=!0,h.eagerState=S,Lt(S,v))return mo(n,r,h,0),Ne===null&&go(),!1}catch{}if(i=Bu(n,r,h,o),i!==null)return xt(i,n,o),Np(i,r,o),!0}return!1}function wc(n,r,i,o){if(o={lane:2,revertLane:eh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Lo(n)){if(r)throw Error(a(479))}else r=Bu(n,i,o,2),r!==null&&xt(r,n,2)}function Lo(n){var r=n.alternate;return n===fe||r!==null&&r===fe}function Up(n,r){Hs=xo=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function Np(n,r,i){if((i&4194048)!==0){var o=r.lanes;o&=n.pendingLanes,i|=o,r.lanes=i,Hf(n,i)}}var Qi={readContext:pt,use:Mo,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};Qi.useEffectEvent=Ge;var Lp={readContext:pt,use:Mo,useCallback:function(n,r){return St().memoizedState=[n,r===void 0?null:r],n},useContext:pt,useEffect:bp,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,Uo(4194308,4,Ep.bind(null,r,n),i)},useLayoutEffect:function(n,r){return Uo(4194308,4,n,r)},useInsertionEffect:function(n,r){Uo(4,2,n,r)},useMemo:function(n,r){var i=St();r=r===void 0?null:r;var o=n();if(Xr){Zn(!0);try{n()}finally{Zn(!1)}}return i.memoizedState=[o,r],o},useReducer:function(n,r,i){var o=St();if(i!==void 0){var h=i(r);if(Xr){Zn(!0);try{i(r)}finally{Zn(!1)}}}else h=r;return o.memoizedState=o.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},o.queue=n,n=n.dispatch=w_.bind(null,fe,n),[o.memoizedState,n]},useRef:function(n){var r=St();return n={current:n},r.memoizedState=n},useState:function(n){n=gc(n);var r=n.queue,i=Dp.bind(null,fe,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:vc,useDeferredValue:function(n,r){var i=St();return bc(i,n,r)},useTransition:function(){var n=gc(!1);return n=Cp.bind(null,fe,n.queue,!0,!1),St().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var o=fe,h=St();if(_e){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Ne===null)throw Error(a(349));(ve&127)!==0||rp(o,r,i)}h.memoizedState=i;var f={value:i,getSnapshot:r};return h.queue=f,bp(ip.bind(null,o,f,n),[n]),o.flags|=2048,Is(9,{destroy:void 0},sp.bind(null,o,f,i,r),null),i},useId:function(){var n=St(),r=Ne.identifierPrefix;if(_e){var i=pn,o=dn;i=(o&~(1<<32-Nt(o)-1)).toString(32)+i,r="_"+r+"R_"+i,i=ko++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=g_++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Sc,useFormState:pp,useActionState:pp,useOptimistic:function(n){var r=St();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=wc.bind(null,fe,!0,i),i.dispatch=r,[n,r]},useMemoCache:fc,useCacheRefresh:function(){return St().memoizedState=S_.bind(null,fe)},useEffectEvent:function(n){var r=St(),i={impl:n}
vendor: 4,547 bytes, line 9
9;return r.memoizedState=i,function(){if((Ae&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Ec={readContext:pt,use:Mo,useCallback:Rp,useContext:pt,useEffect:yc,useImperativeHandle:Tp,useInsertionEffect:Sp,useLayoutEffect:wp,useMemo:Ap,useReducer:Do,useRef:vp,useState:function(){return Do(Dn)},useDebugValue:vc,useDeferredValue:function(n,r){var i=Je();return Op(i,je.memoizedState,n,r)},useTransition:function(){var n=Do(Dn)[0],r=Je().memoizedState;return[typeof n=="boolean"?n:Fi(n),r]},useSyncExternalStore:np,useId:jp,useHostTransitionStatus:Sc,useFormState:gp,useActionState:gp,useOptimistic:function(n,r){var i=Je();return lp(i,je,n,r)},useMemoCache:fc,useCacheRefresh:Mp};Ec.useEffectEvent=_p;var zp={readContext:pt,use:Mo,useCallback:Rp,useContext:pt,useEffect:yc,useImperativeHandle:Tp,useInsertionEffect:Sp,useLayoutEffect:wp,useMemo:Ap,useReducer:pc,useRef:vp,useState:function(){return pc(Dn)},useDebugValue:vc,useDeferredValue:function(n,r){var i=Je();return je===null?bc(i,n,r):Op(i,je.memoizedState,n,r)},useTransition:function(){var n=pc(Dn)[0],r=Je().memoizedState;return[typeof n=="boolean"?n:Fi(n),r]},useSyncExternalStore:np,useId:jp,useHostTransitionStatus:Sc,useFormState:yp,useActionState:yp,useOptimistic:function(n,r){var i=Je();return je!==null?lp(i,je,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:fc,useCacheRefresh:Mp};zp.useEffectEvent=_p;function Tc(n,r,i,o){r=n.memoizedState,i=i(o,r),i=i==null?r:m({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var Rc={enqueueSetState:function(n,r,i){n=n._reactInternals;var o=It(),h=ar(o);h.payload=r,i!=null&&(h.callback=i),r=or(n,h,o),r!==null&&(xt(r,n,o),$i(r,n,o))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var o=It(),h=ar(o);h.tag=1,h.payload=r,i!=null&&(h.callback=i),r=or(n,h,o),r!==null&&(xt(r,n,o),$i(r,n,o))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=It(),o=ar(i);o.tag=2,r!=null&&(o.callback=r),r=or(n,o,i),r!==null&&(xt(r,n,i),$i(r,n,i))}};function Pp(n,r,i,o,h,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,f,v):r.prototype&&r.prototype.isPureReactComponent?!Ni(i,o)||!Ni(h,f):!0}function Bp(n,r,i,o){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,o),r.state!==n&&Rc.enqueueReplaceState(r,r.state,null)}function Zr(n,r){var i=r;if("ref"in r){i={};for(var o in r)o!=="ref"&&(i[o]=r[o])}if(n=n.defaultProps){i===r&&(i=m({},i));for(var h in n)i[h]===void 0&&(i[h]=n[h])}return i}function Hp(n){po(n)}function qp(n){console.error(n)}function Ip(n){po(n)}function zo(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function $p(n,r,i){try{var o=n.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Ac(n,r,i){return i=ar(i),i.tag=3,i.payload={element:null},i.callback=function(){zo(n,r)},i}function Gp(n){return n=ar(n),n.tag=3,n}function Vp(n,r,i,o){var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var f=o.value;n.payload=function(){return h(f)},n.callback=function(){$p(r,i,o)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){$p(r,i,o),typeof h!="function"&&(dr===null?dr=new Set([this]):dr.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})})}function E_(n,r,i,o,h){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=i.alternate,r!==null&&Us(r,i,h,!0),i=Pt.current,i!==null){switch(i.tag){case 31:case 13:return Xt===null?Qo():i.alternate===null&&Ve===0&&(Ve=3),i.flags&=-257,i.flags|=65536,i.lanes=h,o===To?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([o]):r.add(o),Xc(n,o,h)),!1;case 22:return i.flags|=65536,o===To?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([o]):i.add(o)),Xc(n,o,h)),!1}throw Error(a(435,i.tag))}return Xc(n,o,h),Qo(),!1}if(_e)return r=Pt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,o!==Vu&&(n=Error(a(422),{cause:o}),Pi(Ft(n,i)))):(o!==Vu&&(r=Error(a(423),{cause:o}),Pi(Ft(r,i))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,o=Ft(o,i),h=Ac(n.stateNode,o,h),nc(n,h),Ve!==4&&(Ve=2)),!1;var f=Error(a(520),{cause:o});
vendor: 3,556 bytes, line 9
9if(f=Ft(f,i),ra===null?ra=[f]:ra.push(f),Ve!==4&&(Ve=2),r===null)return!0;o=Ft(o,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=h&-h,i.lanes|=n,n=Ac(i.stateNode,o,n),nc(i,n),!1;case 1:if(r=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(dr===null||!dr.has(f))))return i.flags|=65536,h&=-h,i.lanes|=h,h=Gp(h),Vp(h,n,i,o),nc(i,h),!1}i=i.return}while(i!==null);return!1}var Oc=Error(a(461)),et=!1;function gt(n,r,i,o){r.child=n===null?Qd(r,null,i,o):Jr(r,n.child,i,o)}function Kp(n,r,i,o,h){i=i.render;var f=r.ref;if("ref"in o){var v={};for(var S in o)S!=="ref"&&(v[S]=o[S])}else v=o;return Kr(r),o=lc(n,r,i,v,f,h),S=uc(),n!==null&&!et?(cc(n,r,h),Un(n,r,h)):(_e&&S&&$u(r),r.flags|=1,gt(n,r,o,h),r.child)}function Fp(n,r,i,o,h){if(n===null){var f=i.type;return typeof f=="function"&&!Hu(f)&&f.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=f,Yp(n,r,f,o,h)):(n=vo(i.type,null,o,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(f=n.child,!Nc(n,h)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:Ni,i(v,o)&&n.ref===r.ref)return Un(n,r,h)}return r.flags|=1,n=Cn(f,o),n.ref=r.ref,n.return=r,r.child=n}function Yp(n,r,i,o,h){if(n!==null){var f=n.memoizedProps;if(Ni(f,o)&&n.ref===r.ref)if(et=!1,r.pendingProps=o=f,Nc(n,h))(n.flags&131072)!==0&&(et=!0);else return r.lanes=n.lanes,Un(n,r,h)}return Cc(n,r,i,o,h)}function Qp(n,r,i,o){var h=o.children,f=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,n!==null){for(o=r.child=n.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~f}else o=0,r.child=null;return Jp(n,r,f,i,o)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&wo(r,f!==null?f.cachePool:null),f!==null?Zd(r,f):sc(),Wd(r);else return o=r.lanes=536870912,Jp(n,r,f!==null?f.baseLanes|i:i,i,o)}else f!==null?(wo(r,f.cachePool),Zd(r,f),ur(),r.memoizedState=null):(n!==null&&wo(r,null),sc(),ur());return gt(n,r,h,i),r.child}function Ji(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Jp(n,r,i,o,h){var f=Zu();return f=f===null?null:{parent:Ze._currentValue,pool:f},r.memoizedState={baseLanes:i,cachePool:f},n!==null&&wo(r,null),sc(),Wd(r),n!==null&&Us(n,r,o,!0),r.childLanes=h,null}function Po(n,r){return r=Ho({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Xp(n,r,i){return Jr(r,n.child,null,i),n=Po(r,r.pendingProps),n.flags|=2,Bt(r),r.memoizedState=null,n}function T_(n,r,i){var o=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(_e){if(o.mode==="hidden")return n=Po(r,o),r.lanes=536870912,Ji(null,n);if(ac(r),(n=He)?(n=um(n,Jt),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:tr!==null?{id:dn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},i=Ud(n),i.return=r,r.child=i,dt=r,He=null)):n=null,n===null)throw rr(r);return r.lanes=536870912,null}return Po(r,o)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if(ac(r),h)if(r.flags&256)r.flags&=-257,r=Xp(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(et||Us(n,r,i,!1),h=(i&n.childLanes)!==0,et||h){if(o=Ne,o!==null&&(v=qf(o,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,Ir(n,v),xt(o,n,v),Oc;Qo(),r=Xp(n,r,i)}
vendor: 11,711 bytes, line 9
9else n=f.treeContext,He=Zt(v.nextSibling),dt=r,_e=!0,nr=null,Jt=!1,n!==null&&zd(r,n),r=Po(r,o),r.flags|=4096;return r}return n=Cn(n.child,{mode:o.mode,children:o.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Bo(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function Cc(n,r,i,o,h){return Kr(r),i=lc(n,r,i,o,void 0,h),o=uc(),n!==null&&!et?(cc(n,r,h),Un(n,r,h)):(_e&&o&&$u(r),r.flags|=1,gt(n,r,i,h),r.child)}function Zp(n,r,i,o,h,f){return Kr(r),r.updateQueue=null,i=tp(r,o,i,h),ep(n),o=uc(),n!==null&&!et?(cc(n,r,f),Un(n,r,f)):(_e&&o&&$u(r),r.flags|=1,gt(n,r,i,f),r.child)}function Wp(n,r,i,o,h){if(Kr(r),r.stateNode===null){var f=ks,v=i.contextType;typeof v=="object"&&v!==null&&(f=pt(v)),f=new i(o,f),r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Rc,r.stateNode=f,f._reactInternals=r,f=r.stateNode,f.props=o,f.state=r.memoizedState,f.refs={},ec(r),v=i.contextType,f.context=typeof v=="object"&&v!==null?pt(v):ks,f.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Tc(r,i,v,o),f.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&Rc.enqueueReplaceState(f,f.state,null),Vi(r,o,f,h),Gi(),f.state=r.memoizedState),typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(n===null){f=r.stateNode;var S=r.memoizedProps,C=Zr(i,S);f.props=C;var N=f.context,H=i.contextType;v=ks,typeof H=="object"&&H!==null&&(v=pt(H));var G=i.getDerivedStateFromProps;H=typeof G=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||N!==v)&&Bp(r,f,o,v),ir=!1;var z=r.memoizedState;f.state=z,Vi(r,o,f,h),Gi(),N=r.memoizedState,S||z!==N||ir?(typeof G=="function"&&(Tc(r,i,G,o),N=r.memoizedState),(C=ir||Pp(r,i,C,o,z,N,v))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(r.flags|=4194308)):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=N),f.props=o,f.state=N,f.context=v,o=C):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{f=r.stateNode,tc(n,r),v=r.memoizedProps,H=Zr(i,v),f.props=H,G=r.pendingProps,z=f.context,N=i.contextType,C=ks,typeof N=="object"&&N!==null&&(C=pt(N)),S=i.getDerivedStateFromProps,(N=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==G||z!==C)&&Bp(r,f,o,C),ir=!1,z=r.memoizedState,f.state=z,Vi(r,o,f,h),Gi();var P=r.memoizedState;v!==G||z!==P||ir||n!==null&&n.dependencies!==null&&_o(n.dependencies)?(typeof S=="function"&&(Tc(r,i,S,o),P=r.memoizedState),(H=ir||Pp(r,i,H,o,z,P,C)||n!==null&&n.dependencies!==null&&_o(n.dependencies))?(N||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,P,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,P,C)),typeof f.componentDidUpdate=="function"&&(r.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=P),f.props=o,f.state=P,f.context=C,o=H):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),o=!1)}return f=o,Bo(n,r),o=(r.flags&128)!==0,f||o?(f=r.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:f.render(),r.flags|=1,n!==null&&o?(r.child=Jr(r,n.child,null,h),r.child=Jr(r,null,i,h)):gt(n,r,i,h),r.memoizedState=f.state,n=r.child):n=Un(n,r,h),n}function eg(n,r,i,o){return Gr(),r.flags|=256,gt(n,r,i,o),r.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(n){return{baseLanes:n,cachePool:$d()}}function jc(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=qt),n}function tg(n,r,i){var o=r.pendingProps,h=!1,f=(r.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(Qe.current&2)!==0),v&&(h=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(_e){if(h?lr(r):ur(),(n=He)?(n=um(n,Jt),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:tr!==null?{id:dn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},i=Ud(n),i.return=r,r.child=i,dt=r,He=null)):n=null,n===null)throw rr(r);return dh(n)?r.lanes=32:r.lanes=536870912,null}var S=o.children;return o=o.fallback,h?(ur(),h=r.mode,S=Ho({mode:"hidden",children:S},h),o=$r(o,h,i,null),S.return=r,o.return=r,S.sibling=o,r.child=S,o=r.child,o.memoizedState=kc(i),o.childLanes=jc(n,v,i),r.memoizedState=xc,Ji(null,o)):(lr(r),Mc(r,S))}var C=n.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(f)r.flags&256?(lr(r),r.flags&=-257,r=Dc(n,r,i)):r.memoizedState!==null?(ur(),r.child=n.child,r.flags|=128,r=null):(ur(),S=o.fallback,h=r.mode,o=Ho({mode:"visible",children:o.children},h),S=$r(S,h,i,null),S.flags|=2,o.return=r,S.return=r,o.sibling=S,r.child=o,Jr(r,n.child,null,i),o=r.child,o.memoizedState=kc(i),o.childLanes=jc(n,v,i),r.memoizedState=xc,r=Ji(null,o));else if(lr(r),dh(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var N=v.dgst;v=N,o=Error(a(419)),o.stack="",o.digest=v,Pi({value:o,source:null,stack:null}),r=Dc(n,r,i)}else if(et||Us(n,r,i,!1),v=(i&n.childLanes)!==0,et||v){if(v=Ne,v!==null&&(o=qf(v,i),o!==0&&o!==C.retryLane))throw C.retryLane=o,Ir(n,o),xt(v,n,o),Oc;fh(S)||Qo(),r=Dc(n,r,i)}else fh(S)?(r.flags|=192,r.child=n.child,r=null):(n=C.treeContext,He=Zt(S.nextSibling),dt=r,_e=!0,nr=null,Jt=!1,n!==null&&zd(r,n),r=Mc(r,o.children),r.flags|=4096);return r}return h?(ur(),S=o.fallback,h=r.mode,C=n.child,N=C.sibling,o=Cn(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,N!==null?S=Cn(N,S):(S=$r(S,h,i,null),S.flags|=2),S.return=r,o.return=r,o.sibling=S,r.child=o,Ji(null,o),o=r.child,S=n.child.memoizedState,S===null?S=kc(i):(h=S.cachePool,h!==null?(C=Ze._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=$d(),S={baseLanes:S.baseLanes|i,cachePool:h}),o.memoizedState=S,o.childLanes=jc(n,v,i),r.memoizedState=xc,Ji(n.child,o)):(lr(r),i=n.child,n=i.sibling,i=Cn(i,{mode:"visible",children:o.children}),i.return=r,i.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=i,r.memoizedState=null,i)}function Mc(n,r){return r=Ho({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Ho(n,r){return n=zt(22,n,null,r),n.lanes=0,n}function Dc(n,r,i){return Jr(r,n.child,null,i),n=Mc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function ng(n,r,i){n.lanes|=r;var o=n.alternate;o!==null&&(o.lanes|=r),Yu(n.return,r,i)}function Uc(n,r,i,o,h,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:h,treeForkCount:f}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=i,v.tailMode=h,v.treeForkCount=f)}function rg(n,r,i){var o=r.pendingProps,h=o.revealOrder,f=o.tail;o=o.children;var v=Qe.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,X(Qe,v),gt(n,r,o,i),o=_e?zi:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&ng(n,i,r);else if(n.tag===19)ng(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(i=r.child,h=null;i!==null;)n=i.alternate,n!==null&&Co(n)===null&&(h=i),i=i.sibling;i=h,i===null?(h=r.child,r.child=null):(h=i.sibling,i.sibling=null),Uc(r,!1,h,i,f,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&Co(n)===null){r.child=h;break}n=h.sibling,h.sibling=i,i=h,h=n}Uc(r,!0,i,null,f,o);break;case"together":Uc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Un(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),fr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(Us(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,i=Cn(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=Cn(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function Nc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&_o(n)))}function R_(n,r,i){switch(r.tag){case 3:Ye(r,r.stateNode.containerInfo),sr(r,Ze,n.memoizedState.cache),Gr();break;case 27:case 5:wn(r);break;case 4:Ye(r,r.stateNode.containerInfo);break;case 10:sr(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?(lr(r),r.flags|=128,null):(i&r.child.childLanes)!==0?tg(n,r,i):(lr(r),n=Un(n,r,i),n!==null?n.sibling:null);lr(r);break;case 19:var h=(n.flags&128)!==0;if(o=(i&r.childLanes)!==0,o||(Us(n,r,i,!1),o=(i&r.childLanes)!==0),h){if(o)return rg(n,r,i);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,Qp(n,r,i,r.pendingProps);case 24:sr(r,Ze,n.memoizedState.cache)}return Un(n,r,i)}function sg(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)et=!0;else{if(!Nc(n,i)&&(r.flags&128)===0)return et=!1,R_(n,r,i);et=(n.flags&131072)!==0}else et=!1,_e&&(r.flags&1048576)!==0&&Ld(r,zi,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(n=Yr(r.elementType),r.type=n,typeof n=="function")Hu(n)?(o=Zr(n,o),r.tag=1,r=Wp(null,r,n,o,i)):(r.tag=0,r=Cc(null,r,n,o,i));else{if(n!=null){var h=n.$$typeof;if(h===L){r.tag=11,r=Kp(null,r,n,o,i);break e}else if(h===q){r.tag=14,r=Fp(null,r,n,o,i);break e}}throw r=Fe(n)||n,Error(a(306,r,""))}}return r;case 0:return Cc(n,r,r.type,r.pendingProps,i);case 1:return o=r.type,h=Zr(o,r.pendingProps),Wp(n,r,o,h,i);case 3:e:{if(Ye(r,r.stateNode.containerInfo),n===null)throw Error(a(387));o=r.pendingProps;var f=r.memoizedState;h=f.element,tc(n,r),Vi(r,o,null,i);var v=r.memoizedState;if(o=v.cache,sr(r,Ze,o),o!==f.cache&&Qu(r,[Ze],i,!0),Gi(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){r=eg(n,r,o,i);break e}else if(o!==h){h=Ft(Error(a(424)),r),Pi(h),r=eg(n,r,o,i);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,He=Zt(n.firstChild),dt=r,_e=!0,nr=null,Jt=!0,i=Qd(r,null,o,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Gr(),o===h){r=Un(n,r,i);break e}gt(n,r,o,i)}r=r.child}return r;case 26:return Bo(n,r),n===null?(i=gm(r.type,null,r.pendingProps,null))?r.memoizedState=i:_e||(i=r.type,n=r.pen
vendor: 4,917 bytes, line 9
9dingProps,o=nl(pe.current).createElement(i),o[ft]=r,o[Et]=n,mt(o,i,n),ot(o),r.stateNode=o):r.memoizedState=gm(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return wn(r),n===null&&_e&&(o=r.stateNode=fm(r.type,r.pendingProps,pe.current),dt=r,Jt=!0,h=He,yr(r.type)?(ph=h,He=Zt(o.firstChild)):He=h),gt(n,r,r.pendingProps.children,i),Bo(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&_e&&((h=o=He)&&(o=tS(o,r.type,r.pendingProps,Jt),o!==null?(r.stateNode=o,dt=r,He=Zt(o.firstChild),Jt=!1,h=!0):h=!1),h||rr(r)),wn(r),h=r.type,f=r.pendingProps,v=n!==null?n.memoizedProps:null,o=f.children,uh(h,f)?o=null:v!==null&&uh(h,v)&&(r.flags|=32),r.memoizedState!==null&&(h=lc(n,r,m_,null,null,i),ha._currentValue=h),Bo(n,r),gt(n,r,o,i),r.child;case 6:return n===null&&_e&&((n=i=He)&&(i=nS(i,r.pendingProps,Jt),i!==null?(r.stateNode=i,dt=r,He=null,n=!0):n=!1),n||rr(r)),null;case 13:return tg(n,r,i);case 4:return Ye(r,r.stateNode.containerInfo),o=r.pendingProps,n===null?r.child=Jr(r,null,o,i):gt(n,r,o,i),r.child;case 11:return Kp(n,r,r.type,r.pendingProps,i);case 7:return gt(n,r,r.pendingProps,i),r.child;case 8:return gt(n,r,r.pendingProps.children,i),r.child;case 12:return gt(n,r,r.pendingProps.children,i),r.child;case 10:return o=r.pendingProps,sr(r,r.type,o.value),gt(n,r,o.children,i),r.child;case 9:return h=r.type._context,o=r.pendingProps.children,Kr(r),h=pt(h),o=o(h),r.flags|=1,gt(n,r,o,i),r.child;case 14:return Fp(n,r,r.type,r.pendingProps,i);case 15:return Yp(n,r,r.type,r.pendingProps,i);case 19:return rg(n,r,i);case 31:return T_(n,r,i);case 22:return Qp(n,r,i,r.pendingProps);case 24:return Kr(r),o=pt(Ze),n===null?(h=Zu(),h===null&&(h=Ne,f=Ju(),h.pooledCache=f,f.refCount++,f!==null&&(h.pooledCacheLanes|=i),h=f),r.memoizedState={parent:o,cache:h},ec(r),sr(r,Ze,h)):((n.lanes&i)!==0&&(tc(n,r),Vi(r,null,null,i),Gi()),h=n.memoizedState,f=r.memoizedState,h.parent!==o?(h={parent:o,cache:o},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),sr(r,Ze,o)):(o=f.cache,sr(r,Ze,o),o!==h.cache&&Qu(r,[Ze],i,!0))),gt(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Nn(n){n.flags|=4}function Lc(n,r,i,o,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(jg())n.flags|=8192;else throw Qr=To,Wu}else n.flags&=-16777217}function ig(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!_m(r))if(jg())n.flags|=8192;else throw Qr=To,Wu}function qo(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Pf():536870912,n.lanes|=r,Ks|=r)}function Xi(n,r){if(!_e)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function qe(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,o=0;if(r)for(var h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)i|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=o,n.childLanes=i,r}function A_(n,r,i){var o=r.pendingProps;switch(Gu(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 i=r.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),jn(Ze),Ue(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Ds(r)?Nn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Ku())),qe(r),null;case 26:var h=r.type,f=r.memoizedState;return n===null?(Nn(r),f!==null?(qe(r),ig(r,f)):(qe(r),Lc(r,h,null,o,i))):f?f!==n.memoizedState?(Nn(r),qe(r),ig(r,f)):(qe(r),r.flags&=-16777217):(n=n.memoizedProps,n!==o&&Nn(r),qe(r),Lc(r,h,n,o,i)),null;case 27:if(En(r),i=pe.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Nn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return qe(r),null}n=W.current,Ds(r)?Pd(r):(n=fm(h,o,i),r.stateNode=n,Nn(r))}return qe(r),null;case 5:if(En(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==o&&Nn(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return qe(r),null}if(f=W.current,Ds(r))Pd(r);else{var v=nl(pe.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
9",f=f.removeChild(f.firstChild);break;case"select":f=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?f.multiple=!0:o.size&&(f.size=o.size);break;default:f=typeof o.is=="string"?v.createElement(h,{is:o.is}):v.createElement(h)}}f[ft]=r,f[Et]=o;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)f.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=f;e:switch(mt(f,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&&Nn(r)}}return qe(r),Lc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==o&&Nn(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(n=pe.current,Ds(r)){if(n=r.stateNode,i=r.memoizedProps,o=null,h=dt,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}n[ft]=r,n=!!(n.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||tm(n.nodeValue,i)),n||rr(r,!0)}else n=nl(n).createTextNode(o),n[ft]=r,r.stateNode=n}return qe(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(o=Ds(r),i!==null){if(n===null){if(!o)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[ft]=r}else Gr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),n=!1}else i=Ku(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(Bt(r),r):(Bt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return qe(r),null;case 13:if(o=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Ds(r),o!==null&&o.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[ft]=r}else Gr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;qe(r),h=!1}else h=Ku(),n!==null&&n.memoizedState!==null&&(n.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=i,r):(i=o!==null,n=n!==null&&n.memoizedState!==null,i&&(o=r.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==h&&(o.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),qo(r,r.updateQueue),qe(r),null);case 4:return Ue(),n===null&&sh(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,f=o.rendering,f===null)if(h)Xi(o,!1);else{if(Ve!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(f=Co(n),f!==null){for(r.flags|=128,Xi(o,!1),n=f.updateQueue,r.updateQueue=n,qo(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)Dd(i,n),i=i.sibling;return X(Qe,Qe.current&1|2),_e&&xn(r,o.treeForkCount),r.child}n=n.sibling}o.tail!==null&&vt()>Ko&&(r.flags|=128,h=!0,Xi(o,!1),r.lanes=4194304)}else{if(!h)if(n=Co(f),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,qo(r,n),Xi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!_e)return qe(r),null}else 2*vt()-o.renderingStartTime>Ko&&i!==536870912&&(r.flags|=128,h=!0,Xi(o,!1),r.lanes=4194304);o.isBackwards?(f.sibling=r.child,r.child=f):(n=o.last,n!==null?n.sibling=f:r.child=f,o.last=f)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=vt(),n.sibling=null,i=Qe.current,X(Qe,h?i&1|2:i&1),_e&&xn(r,o.treeForkCount),n):(qe(r),null);case 22:case 23:return Bt(r),ic(),o=r.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(i&536870912)!==0&&(r.flags&128)===0&&(qe(r),r.subtreeFlags&6&&(r.flags|=8192)):qe(r),i=r.updateQueue,i!==null&&qo(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048),n!==null&&$(Fr),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),jn(Ze),qe(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function O_(n,r){switch(Gu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return jn(Ze),Ue(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-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(a(340));Gr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Bt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Gr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return $(Qe),null;case 4:return Ue(),null;case 10:return jn(r.type),null;case 22:case 23:return Bt(r),ic(),n!==null&&$(Fr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return jn(Ze),null;case 25:return null;default:return null}}function ag(n,r){switch(Gu(r),r.tag){case 3:jn(Ze),Ue();break;case 26:case 27:case 5:En(r);break;case 4:Ue();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),ic(),n!==null&&$(Fr);break;case 24:jn(Ze)}}function Zi(n,r){try{var i=r.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var h=o.next;i=h;do{if((i.tag&n)===n){o=void 0;var f=i.create,v=i.inst;o=f(),v.destroy=o}i=i.next}while(i!==h)}}catch(S){ke(r,r.return,S)}}function cr(n,r,i){try{var o=r.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var f=h.next;o=f;do{if((o.tag&n)===n){var v=o.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,h=r;var C=i,N=S;try{N()}catch(H){ke(h,C,H)}}}o=o.next}while(o!==f)}}catch(H){ke(r,r.return,H)}}function og(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{Xd(r,i)}catch(o){ke(n,n.return,o)}}}function lg(n,r,i){i.props=Zr(n.type,n.memoizedProps),i.state=n.memoizedState;
vendor: 18,134 bytes, line 9
9try{i.componentWillUnmount()}catch(o){ke(n,r,o)}}function Wi(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var o=n.stateNode;break;case 30:o=n.stateNode;break;default:o=n.stateNode}typeof i=="function"?n.refCleanup=i(o):i.current=o}}catch(h){ke(n,r,h)}}function gn(n,r){var i=n.ref,o=n.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(h){ke(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(h){ke(n,r,h)}else i.current=null}function ug(n){var r=n.type,i=n.memoizedProps,o=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(h){ke(n,n.return,h)}}function zc(n,r,i){try{var o=n.stateNode;Q_(o,n.type,i,r),o[Et]=r}catch(h){ke(n,n.return,h)}}function cg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&yr(n.type)||n.tag===4}function Pc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||cg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&yr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Bc(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=An));else if(o!==4&&(o===27&&yr(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(Bc(n,r,i),n=n.sibling;n!==null;)Bc(n,r,i),n=n.sibling}function Io(n,r,i){var o=n.tag;if(o===5||o===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(o!==4&&(o===27&&yr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(Io(n,r,i),n=n.sibling;n!==null;)Io(n,r,i),n=n.sibling}function hg(n){var r=n.stateNode,i=n.memoizedProps;try{for(var o=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);mt(r,o,i),r[ft]=n,r[Et]=i}catch(f){ke(n,n.return,f)}}var Ln=!1,tt=!1,Hc=!1,fg=typeof WeakSet=="function"?WeakSet:Set,lt=null;function C_(n,r){if(n=n.containerInfo,oh=ul,n=Td(n),Du(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var h=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,S=-1,C=-1,N=0,H=0,G=n,z=null;t:for(;;){for(var P;G!==i||h!==0&&G.nodeType!==3||(S=v+h),G!==f||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===n)break t;if(z===i&&++N===h&&(S=v),z===f&&++H===o&&(C=v),(P=G.nextSibling)!==null)break;G=z,z=G.parentNode}G=P}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(lh={focusedElem:n,selectionRange:i},ul=!1,lt=r;lt!==null;)if(r=lt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,lt=n;else for(;lt!==null;){switch(r=lt,f=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)h=n[i],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=r,h=f.memoizedProps,f=f.memoizedState,o=i.stateNode;try{var ee=Zr(i.type,h);n=o.getSnapshotBeforeUpdate(ee,f),o.__reactInternalSnapshotBeforeUpdate=n}catch(ue){ke(i,i.return,ue)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)hh(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":hh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,lt=n;break}lt=r.return}}function dg(n,r,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:Pn(n,i),o&4&&Zi(5,i);break;case 1:if(Pn(n,i),o&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){ke(i,i.return,v)}else{var h=Zr(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){ke(i,i.return,v)}}o&64&&og(i),o&512&&Wi(i,i.return);break;case 3:if(Pn(n,i),o&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Xd(n,r)}catch(v){ke(i,i.return,v)}}break;case 27:r===null&&o&4&&hg(i);case 26:case 5:Pn(n,i),r===null&&o&4&&ug(i),o&512&&Wi(i,i.return);break;case 12:Pn(n,i);break;case 31:Pn(n,i),o&4&&mg(n,i);break;case 13:Pn(n,i),o&4&&yg(n,i),o&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=z_.bind(null,i),rS(n,i))));break;case 22:if(o=i.memoizedState!==null||Ln,!o){r=r!==null&&r.memoizedState!==null||tt,h=Ln;var f=tt;Ln=o,(tt=r)&&!f?Bn(n,i,(i.subtreeFlags&8772)!==0):Pn(n,i),Ln=h,tt=f}break;case 30:break;default:Pn(n,i)}}function pg(n){var r=n.alternate;r!==null&&(n.alternate=null,pg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&mu(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ie=null,Rt=!1;function zn(n,r,i){for(i=i.child;i!==null;)gg(n,r,i),i=i.sibling}function gg(n,r,i){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(Ei,i)}catch{}switch(i.tag){case 26:tt||gn(i,r),zn(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:tt||gn(i,r);var o=Ie,h=Rt;yr(i.type)&&(Ie=i.stateNode,Rt=!1),zn(n,r,i),la(i.stateNode),Ie=o,Rt=h;break;case 5:tt||gn(i,r);case 6:if(o=Ie,h=Rt,Ie=null,zn(n,r,i),Ie=o,Rt=h,Ie!==null)if(Rt)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(i.stateNode)}catch(f){ke(i,r,f)}else try{Ie.removeChild(i.stateNode)}catch(f){ke(i,r,f)}break;case 18:Ie!==null&&(Rt?(n=Ie,om(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),ei(n)):om(Ie,i.stateNode));break;case 4:o=Ie,h=Rt,Ie=i.stateNode.containerInfo,Rt=!0,zn(n,r,i),Ie=o,Rt=h;break;case 0:case 11:case 14:case 15:cr(2,i,r),tt||cr(4,i,r),zn(n,r,i);break;case 1:tt||(gn(i,r),o=i.stateNode,typeof o.componentWillUnmount=="function"&&lg(i,r,o)),zn(n,r,i);break;case 21:zn(n,r,i);break;case 22:tt=(o=tt)||i.memoizedState!==null,zn(n,r,i),tt=o;break;default:zn(n,r,i)}}function mg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ei(n)}catch(i){ke(r,r.return,i)}}}function yg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ei(n)}catch(i){ke(r,r.return,i)}}function x_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new fg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new fg),r;default:throw Error(a(435,n.tag))}}function $o(n,r){var i=x_(n);r.forEach(function(o){if(!i.has(o)){i.add(o);var h=P_.bind(null,n,o);o.then(h,h)}})}function At(n,r){var i=r.deletions;if(i!==null)for(var o=0;o<i.length;o++){var h=i[o],f=n,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(yr(S.type)){Ie=S.stateNode,Rt=!1;break e}break;case 5:Ie=S.stateNode,Rt=!1;break e;case 3:case 4:Ie=S.stateNode.containerInfo,Rt=!0;break e}S=S.return}if(Ie===null)throw Error(a(160));gg(f,v,h),Ie=null,Rt=!1,f=h.alternate,f!==null&&(f.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)vg(r,n),r=r.sibling}var rn=null;function vg(n,r){var i=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:At(r,n),Ot(n),o&4&&(cr(3,n,n.return),Zi(3,n),cr(5,n,n.return));break;case 1:At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),o&64&&Ln&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var h=rn;if(At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),o&4){var f=i!==null?i.memoizedState:null;if(o=n.memoizedState,i===null)if(o===null)if(n.stateNode===null){e:{o=n.type,i=n.memoizedProps,h=h.ownerDocument||h;t:switch(o){case"title":f=h.getElementsByTagName("title")[0],(!f||f[Ai]||f[ft]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=h.createElement(o),h.head.insertBefore(f,h.querySelector("head > title"))),mt(f,o,i),f[ft]=n,ot(f),o=f;break e;case"link":var v=vm("link","href",h).get(o+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}f=h.createElement(o),mt(f,o,i),h.head.appendChild(f);break;case"meta":if(v=vm("meta","content",h).get(o+(i.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}f=h.createElement(o),mt(f,o,i),h.head.appendChild(f);break;default:throw Error(a(468,o))}f[ft]=n,ot(f),o=f}n.stateNode=o}else bm(h,n.type,n.stateNode);else n.stateNode=ym(h,o,n.memoizedProps);else f!==o?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,o===null?bm(h,n.type,n.stateNode):ym(h,o,n.memoizedProps)):o===null&&n.stateNode!==null&&zc(n,n.memoizedProps,i.memoizedProps)}break;case 27:At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),i!==null&&o&4&&zc(n,n.memoizedProps,i.memoizedProps);break;case 5:if(At(r,n),Ot(n),o&512&&(tt||i===null||gn(i,i.return)),n.flags&32){h=n.stateNode;try{Es(h,"")}catch(ee){ke(n,n.return,ee)}}o&4&&n.stateNode!=null&&(h=n.memoizedProps,zc(n,h,i!==null?i.memoizedProps:h)),o&1024&&(Hc=!0);break;case 6:if(At(r,n),Ot(n),o&4){if(n.stateNode===null)throw Error(a(162));o=n.memoizedProps,i=n.stateNode;try{i.nodeValue=o}catch(ee){ke(n,n.return,ee)}}break;case 3:if(il=null,h=rn,rn=rl(r.containerInfo),At(r,n),rn=h,Ot(n),o&4&&i!==null&&i.memoizedState.isDehydrated)try{ei(r.containerInfo)}catch(ee){ke(n,n.return,ee)}Hc&&(Hc=!1,bg(n));break;case 4:o=rn,rn=rl(n.stateNode.containerInfo),At(r,n),Ot(n),rn=o;break;case 12:At(r,n),Ot(n);break;case 31:At(r,n),Ot(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,$o(n,o)));break;case 13:At(r,n),Ot(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Vo=vt()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,$o(n,o)));break;case 22:h=n.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,N=Ln,H=tt;if(Ln=N||h,tt=H||C,At(r,n),tt=H,Ln=N,Ot(n),o&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(i===null||C||Ln||tt||Wr(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){C=i=r;try{if(f=C.stateNode,h)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=C.stateNode;var G=C.memoizedProps.style,z=G!=null&&G.hasOwnProperty("display")?G.display:null;S.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===6){if(i===null){C=r;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(ee){ke(C,C.return,ee)}}}else if(r.tag===18){if(i===null){C=r;try{var P=C.stateNode;h?lm(P,!0):lm(C.stateNode,!1)}catch(ee){ke(C,C.return,ee)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=n.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,$o(n,i))));break;case 19:At(r,n),Ot(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,$o(n,o)));break;case 30:break;case 21:break;default:At(r,n),Ot(n)}}function Ot(n){var r=n.flags;if(r&2){try{for(var i,o=n.return;o!==null;){if(cg(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var h=i.stateNode,f=Pc(n);Io(n,f,h);break;case 5:var v=i.stateNode;i.flags&32&&(Es(v,""),i.flags&=-33);var S=Pc(n);Io(n,S,v);break;case 3:case 4:var C=i.stateNode.containerInfo,N=Pc(n);Bc(n,N,C);break;default:throw Error(a(161))}}catch(H){ke(n,n.return,H)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function bg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;bg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Pn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)dg(n,r.alternate,r),r=r.sibling}function Wr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:cr(4,r,r.return),Wr(r);break;case 1:gn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&lg(r,r.return,i),Wr(r);break;case 27:la(r.stateNode);case 26:case 5:gn(r,r.return),Wr(r);break;case 22:r.memoizedState===null&&Wr(r);break;case 30:Wr(r);break;default:Wr(r)}n=n.sibling}}function Bn(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,h=n,f=r,v=f.flags;switch(f.tag){case 0:case 11:case 15:Bn(h,f,i),Zi(4,f);break;case 1:if(Bn(h,f,i),o=f,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(N){ke(o,o.return,N)}if(o=f,h=o.updateQueue,h!==null){var S=o.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)Jd(C[h],S)}catch(N){ke(o,o.return,N)}}i&&v&64&&og(f),Wi(f,f.return);break;case 27:hg(f);case 26:case 5:Bn(h,f,i),i&&o===null&&v&4&&ug(f),Wi(f,f.return);break;case 12:Bn(h,f,i);break;case 31:Bn(h,f,i),i&&v&4&&mg(h,f);break;case 13:Bn(h,f,i),i&&v&4&&yg(h,f);break;case 22:f.memoizedState===null&&Bn(h,f,i),Wi(f,f.return);break;case 30:break;default:Bn(h,f,i)}r=r.sibling}}function qc(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&Bi(i))}function Ic(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Bi(n))}function sn(n,r,i,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)_g(n,r,i,o),r=r.sibling}function _g(n,r,i,o){var h=r.flags;switch(r.tag){case 0:case 11:case 15:sn(n,r,i,o),h&2048&&Zi(9,r);break;case 1:sn(n,r,i,o);break;case 3:sn(n,r,i,o),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Bi(n)));break;case 12:if(h&2048){sn(n,r,i,o),n=r.stateNode;try{var f=r.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(C){ke(r,r.return,C)}}else sn(n,r,i,o);break;case 31:sn(n,r,i,o);break;case 13:sn(n,r,i,o);break;case 23:break;case 22:f=r.stateNode,v=r.alternate,r.memoizedState!==null?f._visibility&2?sn(n,r,i,o):ea(n,r):f._visibility&2?sn(n,r,i,o):(f._visibility|=2,$s(n,r,i,o,(r.subtreeFlags&10256)!==0||!1)),h&2048&&qc(v,r);break;case 24:sn(n,r,i,o),h&2048&&Ic(r.alternate,r);break;default:sn(n,r,i,o)}}function $s(n,r,i,o,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var f=n,v=r,S=i,C=o,N=v.flags;switch(v.tag){case 0:case 11:case 15:$s(f,v,S,C,h),Zi(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?$s(f,v,S,C,h):ea(f,v):(H._visibility|=2,$s(f,v,S,C,h)),h&&N&2048&&qc(v.alternate,v);break;case 24:$s(f,v,S,C,h),h&&N&2048&&Ic(v.alternate,v);break;default:$s(f,v,S,C,h)}r=r.sibling}}function ea(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,o=r,h=o.flags;switch(o.tag){case 22:ea(i,o),h&2048&&qc(o.alternate,o);break;case 24:ea(i,o),h&2048&&Ic(o.alternate,o);break;default:ea(i,o)}r=r.sibling}}var ta=8192;function Gs(n,r,i){if(n.subtreeFlags&ta)for(n=n.child;n!==null;)Sg(n,r,i),n=n.sibling}function Sg(n,r,i){switch(n.tag){case 26:Gs(n,r,i),n.flags&ta&&n.memoizedState!==null&&gS(i,rn,n.memoizedState,n.memoizedProps);break;case 5:Gs(n,r,i);break;case 3:case 4:var o=rn;rn=rl(n.stateNode.containerInfo),Gs(n,r,i),rn=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=ta,ta=16777216,Gs(n,r,i),ta=o):Gs(n,r,i));break;default:Gs(n,r,i)}}function wg(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function na(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];lt=o,Tg(o,n)}wg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Eg(n),n=n.sibling}function Eg(n){switch(n.tag){case 0:case 11:case 15:na(n),n.flags&2048&&cr(9,n,n.return);break;case 3:na(n);break;case 12:na(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Go(n)):na(n);break;default:na(n)}}function Go(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var o=r[i];lt=o,Tg(o,n)}wg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:cr(8,r,r.return),Go(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Go(r));break;default:Go(r)}n=n.sibling}}function Tg(n,r){for(;lt!==null;){var i=lt;switch(i.tag){case 0:case 11:case 15:cr(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Bi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,lt=o;else e:for(i=n;lt!==null;){o=lt;var h=o.sibling,f=o.return;if(pg(o),o===i){lt=null;break e}if(h!==null){h.return=f,lt=h;break e}lt=f}}}var k_={getCacheForType:function(n){var r=pt(Ze),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i}
vendor: 22,198 bytes, lines 9-10
9,cacheSignal:function(){return pt(Ze).controller.signal}},j_=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ne=null,ge=null,ve=0,xe=0,Ht=null,hr=!1,Vs=!1,$c=!1,Hn=0,Ve=0,fr=0,es=0,Gc=0,qt=0,Ks=0,ra=null,Ct=null,Vc=!1,Vo=0,Rg=0,Ko=1/0,Fo=null,dr=null,st=0,pr=null,Fs=null,qn=0,Kc=0,Fc=null,Ag=null,sa=0,Yc=null;function It(){return(Ae&2)!==0&&ve!==0?ve&-ve:B.T!==null?eh():If()}function Og(){if(qt===0)if((ve&536870912)===0||_e){var n=eo;eo<<=1,(eo&3932160)===0&&(eo=262144),qt=n}else qt=536870912;return n=Pt.current,n!==null&&(n.flags|=32),qt}function xt(n,r,i){(n===Ne&&(xe===2||xe===9)||n.cancelPendingCommit!==null)&&(Ys(n,0),gr(n,ve,qt,!1)),Ri(n,i),((Ae&2)===0||n!==Ne)&&(n===Ne&&((Ae&2)===0&&(es|=i),Ve===4&&gr(n,ve,qt,!1)),mn(n))}function Cg(n,r,i){if((Ae&6)!==0)throw Error(a(327));var o=!i&&(r&127)===0&&(r&n.expiredLanes)===0||Ti(n,r),h=o?U_(n,r):Jc(n,r,!0),f=o;do{if(h===0){Vs&&!o&&gr(n,r,0,!1);break}else{if(i=n.current.alternate,f&&!M_(i)){h=Jc(n,r,!1),f=!1;continue}if(h===2){if(f=r,n.errorRecoveryDisabledLanes&f)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var S=n;h=ra;var C=S.current.memoizedState.isDehydrated;if(C&&(Ys(S,v).flags|=256),v=Jc(S,v,!1),v!==2){if($c&&!C){S.errorRecoveryDisabledLanes|=f,es|=f,h=4;break e}f=Ct,Ct=h,f!==null&&(Ct===null?Ct=f:Ct.push.apply(Ct,f))}h=v}if(f=!1,h!==2)continue}}if(h===1){Ys(n,0),gr(n,r,0,!0);break}e:{switch(o=n,f=h,f){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:gr(o,r,qt,!hr);break e;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=Vo+300-vt(),10<h)){if(gr(o,r,qt,!hr),no(o,0,!0)!==0)break e;qn=r,o.timeoutHandle=im(xg.bind(null,o,i,Ct,Fo,Vc,r,qt,es,Ks,hr,f,"Throttled",-0,0),h);break e}xg(o,i,Ct,Fo,Vc,r,qt,es,Ks,hr,f,null,-0,0)}}break}while(!0);mn(n)}function xg(n,r,i,o,h,f,v,S,C,N,H,G,z,P){if(n.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},Sg(r,f,G);var ee=(f&62914560)===f?Vo-vt():(f&4194048)===f?Rg-vt():0;if(ee=mS(G,ee),ee!==null){qn=f,n.cancelPendingCommit=ee(zg.bind(null,n,r,f,i,o,h,v,S,C,H,G,null,z,P)),gr(n,f,v,!N);return}}zg(n,r,f,i,o,h,v,S,C)}function M_(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var h=i[o],f=h.getSnapshot;h=h.value;try{if(!Lt(f(),h))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function gr(n,r,i,o){r&=~Gc,r&=~es,n.suspendedLanes|=r,n.pingedLanes&=~r,o&&(n.warmLanes|=r),o=n.expirationTimes;for(var h=r;0<h;){var f=31-Nt(h),v=1<<f;o[f]=-1,h&=~v}i!==0&&Bf(n,i,r)}function Yo(){return(Ae&6)===0?(ia(0),!1):!0}function Qc(){if(ge!==null){if(xe===0)var n=ge.return;else n=ge,kn=Vr=null,hc(n),Ps=null,qi=0,n=ge;for(;n!==null;)ag(n.alternate,n),n=n.return;ge=null}}function Ys(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,Z_(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),qn=0,Qc(),Ne=n,ge=i=Cn(n.current,null),ve=r,xe=0,Ht=null,hr=!1,Vs=Ti(n,r),$c=!1,Ks=qt=Gc=es=fr=Ve=0,Ct=ra=null,Vc=!1,(r&8)!==0&&(r|=r&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=r;0<o;){var h=31-Nt(o),f=1<<h;r|=n[h],o&=~f}return Hn=r,go(),i}function kg(n,r){fe=null,B.H=Qi,r===zs||r===Eo?(r=Kd(),xe=3):r===Wu?(r=Kd(),xe=4):xe=r===Oc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ht=r,ge===null&&(Ve=1,zo(n,Ft(r,n.current)))}function jg(){var n=Pt.current;return n===null?!0:(ve&4194048)===ve?Xt===null:(ve&62914560)===ve||(ve&536870912)!==0?n===Xt:!1}function Mg(){var n=B.H;return B.H=Qi,n===null?Qi:n}function Dg(){var n=B.A;return B.A=k_,n}function Qo(){Ve=4,hr||(ve&4194048)!==ve&&Pt.current!==null||(Vs=!0),(fr&134217727)===0&&(es&134217727)===0||Ne===null||gr(Ne,ve,qt,!1)}function Jc(n,r,i){var o=Ae;Ae|=2;var h=Mg(),f=Dg();(Ne!==n||ve!==r)&&(Fo=null,Ys(n,r)),r=!1;var v=Ve;e:do try{if(xe!==0&&ge!==null){var S=ge,C=Ht;switch(xe){case 8:Qc(),v=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(r=!0);var N=xe;if(xe=0,Ht=null,Qs(n,S,C,N),i&&Vs){v=0;break e}break;default:N=xe,xe=0,Ht=null,Qs(n,S,C,N)}}D_(),v=Ve;break}catch(H){kg(n,H)}while(!0);return r&&n.shellSuspendCounter++,kn=Vr=null,Ae=o,B.H=h,B.A=f,ge===null&&(Ne=null,ve=0,go()),v}function D_(){for(;ge!==null;)Ug(ge)}function U_(n,r){var i=Ae;Ae|=2;var o=Mg(),h=Dg();Ne!==n||ve!==r?(Fo=null,Ko=vt()+500,Ys(n,r)):Vs=Ti(n,r);e:do try{if(xe!==0&&ge!==null){r=ge;var f=Ht;t:switch(xe){case 1:xe=0,Ht=null,Qs(n,r,f,1);break;case 2:case 9:if(Gd(f)){xe=0,Ht=null,Ng(r);break}r=function(){xe!==2&&xe!==9||Ne!==n||(xe=7),mn(n)},f.then(r,r);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:Gd(f)?(xe=0,Ht=null,Ng(r)):(xe=0,Ht=null,Qs(n,r,f,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var S=ge;if(v?_m(v):S.stateNode.complete){xe=0,Ht=null;var C=S.sibling;if(C!==null)ge=C;else{var N=S.return;N!==null?(ge=N,Jo(N)):ge=null}break t}}xe=0,Ht=null,Qs(n,r,f,5);break;case 6:xe=0,Ht=null,Qs(n,r,f,6);break;case 8:Qc(),Ve=6;break e;default:throw Error(a(462))}}N_();break}catch(H){kg(n,H)}while(!0);return kn=Vr=null,B.H=o,B.A=h,Ae=i,ge!==null?0:(Ne=null,ve=0,go(),Ve)}function N_(){for(;ge!==null&&!Za();)Ug(ge)}function Ug(n){var r=sg(n.alternate,n,Hn);n.memoizedProps=n.pendingProps,r===null?Jo(n):ge=r}function Ng(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=Zp(i,r,r.pendingProps,r.type,void 0,ve);break;case 11:r=Zp(i,r,r.pendingProps,r.type.render,r.ref,ve);break;case 5:hc(r);default:ag(i,r),r=ge=Dd(r,Hn),r=sg(i,r,Hn)}n.memoizedProps=n.pendingProps,r===null?Jo(n):ge=r}function Qs(n,r,i,o){kn=Vr=null,hc(r),Ps=null,qi=0;var h=r.return;try{if(E_(n,h,r,i,ve)){Ve=1,zo(n,Ft(i,n.current)),ge=null;return}}catch(f){if(h!==null)throw ge=h,f;Ve=1,zo(n,Ft(i,n.current)),ge=null;return}r.flags&32768?(_e||o===1?n=!0:Vs||(ve&536870912)!==0?n=!1:(hr=n=!0,(o===2||o===9||o===3||o===6)&&(o=Pt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Lg(r,n)):Jo(r)}function Jo(n){var r=n;do{if((r.flags&32768)!==0){Lg(r,hr);return}n=r.return;var i=A_(r.alternate,r,Hn);if(i!==null){ge=i;return}if(r=r.sibling,r!==null){ge=r;return}ge=r=n}while(r!==null);Ve===0&&(Ve=5)}function Lg(n,r){do{var i=O_(n.alternate,n);if(i!==null){i.flags&=32767,ge=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){ge=n;return}ge=n=i}while(n!==null);Ve=6,ge=null}function zg(n,r,i,o,h,f,v,S,C){n.cancelPendingCommit=null;do Xo();while(st!==0);if((Ae&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(f=r.lanes|r.childLanes,f|=Pu,pb(n,i,f,v,S,C),n===Ne&&(ge=Ne=null,ve=0),Fs=r,pr=n,qn=i,Kc=f,Fc=h,Ag=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,B_(ms,function(){return Ig(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,h=Y.p,Y.p=2,v=Ae,Ae|=4;try{C_(n,r,i)}finally{Ae=v,Y.p=h,B.T=o}}st=1,Pg(),Bg(),Hg()}}function Pg(){if(st===1){st=0;var n=pr,r=Fs,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var o=Y.p;Y.p=2;var h=Ae;Ae|=4;try{vg(r,n);var f=lh,v=Td(n.containerInfo),S=f.focusedElem,C=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&Ed(S.ownerDocument.documentElement,S)){if(C!==null&&Du(S)){var N=C.start,H=C.end;if(H===void 0&&(H=N),"selectionStart"in S)S.selectionStart=N,S.selectionEnd=Math.min(H,S.value.length);else{var G=S.ownerDocument||document,z=G&&G.defaultView||window;if(z.getSelection){var P=z.getSelection(),ee=S.textContent.length,ue=Math.min(C.start,ee),De=C.end===void 0?ue:Math.min(C.end,ee);!P.extend&&ue>De&&(v=De,De=ue,ue=v);var M=wd(S,ue),x=wd(S,De);if(M&&x&&(P.rangeCount!==1||P.anchorNode!==M.node||P.anchorOffset!==M.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)){var U=G.createRange();U.setStart(M.node,M.offset),P.removeAllRanges(),ue>De?(P.addRange(U),P.extend(x.node,x.offset)):(U.setEnd(x.node,x.offset),P.addRange(U))}}}}for(G=[],P=S;P=P.parentNode;)P.nodeType===1&&G.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<G.length;S++){var I=G[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}ul=!!oh,lh=oh=null}finally{Ae=h,Y.p=o,B.T=i}}n.current=r,st=2}}function Bg(){if(st===2){st=0;var n=pr,r=Fs,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var o=Y.p;Y.p=2;var h=Ae;Ae|=4;try{dg(n,r.alternate,r)}finally{Ae=h,Y.p=o,B.T=i}}st=3}}function Hg(){if(st===4||st===3){st=0,hu();var n=pr,r=Fs,i=qn,o=Ag;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?st=5:(st=0,Fs=pr=null,qg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(dr=null),pu(i),r=r.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(Ei,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=B.T,h=Y.p,Y.p=2,B.T=null;try{for(var f=n.onRecoverableError,v=0;v<o.length;v++){var S=o[v];f(S.value,{componentStack:S.stack})}}finally{B.T=r,Y.p=h}}(qn&3)!==0&&Xo(),mn(n),h=n.pendingLanes,(i&261930)!==0&&(h&42)!==0?n===Yc?sa++:(sa=0,Yc=n):sa=0,ia(0)}}function qg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Bi(r)))}function Xo(){return Pg(),Bg(),Hg(),Ig()}function Ig(){if(st!==5)return!1;var n=pr,r=Kc;Kc=0;var i=pu(qn),o=B.T,h=Y.p;try{Y.p=32>i?32:i,B.T=null,i=Fc,Fc=null;var f=pr,v=qn;if(st=0,Fs=pr=null,qn=0,(Ae&6)!==0)throw Error(a(331));var S=Ae;if(Ae|=4,Eg(f.current),_g(f,f.current,v,i),Ae=S,ia(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(Ei,f)}catch{}return!0}finally{Y.p=h,B.T=o,qg(n,r)}}function $g(n,r,i){r=Ft(i,r),r=Ac(n.stateNode,r,2),n=or(n,r,2),n!==null&&(Ri(n,2),mn(n))}function ke(n,r,i){if(n.tag===3)$g(n,n,i);else for(;r!==null;){if(r.tag===3){$g(r,n,i);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(dr===null||!dr.has(o))){n=Ft(i,n),i=Gp(2),o=or(r,i,2),o!==null&&(Vp(i,o,r,n),Ri(o,2),mn(o));break}}r=r.return}}function Xc(n,r,i){var o=n.pingCache;if(o===null){o=n.pingCache=new j_;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(i)||($c=!0,h.add(i),n=L_.bind(null,n,r,i),r.then(n,n))}function L_(n,r,i){var o=n.pingCache;o!==null&&o.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ne===n&&(ve&i)===i&&(Ve===4||Ve===3&&(ve&62914560)===ve&&300>vt()-Vo?(Ae&2)===0&&Ys(n,0):Gc|=i,Ks===ve&&(Ks=0)),mn(n)}function Gg(n,r){r===0&&(r=Pf()),n=Ir(n,r),n!==null&&(Ri(n,r),mn(n))}function z_(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),Gg(n,i)}function P_(n,r){var i=0;switch(n.tag){case 31:case 13:var o=n.stateNode,h=n.memoizedState;h!==null&&(i=h.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),Gg(n,i)}function B_(n,r){return tn(n,r)}var Zo=null,Js=null,Zc=!1,Wo=!1,Wc=!1,mr=0;function mn(n){n!==Js&&n.next===null&&(Js===null?Zo=Js=n:Js=Js.next=n),Wo=!0,Zc||(Zc=!0,q_())}function ia(n,r){if(!Wc&&Wo){Wc=!0;do for(var i=!1,o=Zo;o!==null;){if(n!==0){var h=o.pendingLanes;if(h===0)var f=0;else{var v=o.suspendedLanes,S=o.pingedLanes;f=(1<<31-Nt(42|n)+1)-1,f&=h&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,Yg(o,f))}else f=ve,f=no(o,o===Ne?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(f&3)===0||Ti(o,f)||(i=!0,Yg(o,f));o=o.next}while(i);Wc=!1}}function H_(){Vg()}function Vg(){Wo=Zc=!1;var n=0;mr!==0&&X_()&&(n=mr);for(var r=vt(),i=null,o=Zo;o!==null;){var h=o.next,f=Kg(o,r);f===0?(o.next=null,i===null?Zo=h:i.next=h,h===null&&(Js=i)):(i=o,(n!==0||(f&3)!==0)&&(Wo=!0)),o=h}st!==0&&st!==5||ia(n),mr!==0&&(mr=0)}function Kg(n,r){for(var i=n.suspendedLanes,o=n.pingedLanes,h=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-Nt(f),S=1<<v,C=h[v];C===-1?((S&i)===0||(S&o)!==0)&&(h[v]=db(S,r)):C<=r&&(n.expiredLanes|=S),f&=~S}if(r=Ne,i=ve,i=no(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,i===0||n===r&&(xe===2||xe===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&wi(o),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Ti(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(o!==null&&wi(o),pu(i)){case 2:case 8:i=fn;break;case 32:i=ms;break;case 268435456:i=zf;break;default:i=ms}return o=Fg.bind(null,n),i=tn(i,o),n.callbackPriority=r,n.callbackNode=i,r}return o!==null&&o!==null&&wi(o),n.callbackPriority=2,n.callbackNode=null,2}function Fg(n,r){if(st!==0&&st!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(Xo()&&n.callbackNode!==i)return null;var o=ve;return o=no(n,n===Ne?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Cg(n,o,r),Kg(n,vt()),n.callbackNode!=null&&n.callbackNode===i?Fg.bind(null,n):null)}function Yg(n,r){if(Xo())return null;Cg(n,r,!0)}function q_(){W_(function(){(Ae&6)!==0?tn(ht,H_):Vg()})}function eh(){if(mr===0){var n=Ns;n===0&&(n=Wa,Wa<<=1,(Wa&261888)===0&&(Wa=256)),mr=n}return mr}function Qg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ao(""+n)}function Jg(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function I_(n,r,i,o,h){if(r==="submit"&&i&&i.stateNode===h){var f=Qg((h[Et]||null).action),v=o.submitter;v&&(r=(r=v[Et]||null)?Qg(r.formAction):v.getAttribute("formAction"),r!==null&&(f=r,v=null));var S=new co("action","action",null,o,h);n.push({event:S,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(mr!==0){var C=v?Jg(h,v):new FormData(h);_c(i,{pending:!0,data:C,method:h.method,action:f},null,C)}}else typeof f=="function"&&(S.preventDefault(),C=v?Jg(h,v):new FormData(h),_c(i,{pending:!0,data:C,method:h.method,action:f},f,C))},currentTarget:h}]})}}for(var th=0;th<zu.length;th++){var nh=zu[th],$_=nh.toLowerCase(),G_=nh[0].toUpperCase()+nh.slice(1);nn($_,"on"+G_)}nn(Od,"onAnimationEnd"),nn(Cd,"onAnimationIteration"),nn(xd,"onAnimationStart"),nn("dblclick","onDoubleClick"),nn("focusin","onFocus"),nn("focusout","onBlur"),nn(a_,"onTransitionRun"),nn(o_,"onTransitionStart"),nn(l_,"onTransitionCancel"),nn(kd,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),Pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var aa="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(" "),V_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(aa));function Xg(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var o=n[i],h=o.event;o=o.listeners;e:{var f=void 0;if(r)for(var v=o.length-1;0<=v;v--){var S=o[v],C=S.instance,N=S.currentTarget;if(S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=N;try{f(h)}catch(H){po(H)}h.currentTarget=null,f=C}else for(v=0;v<o.length;v++){if(S=o[v],C=S.instance,N=S.currentTarget,S=S.listener,C!==f&&h.isPropagationStopped())break e;f=S,h.currentTarget=N;try{f(h)}catch(H){po(H)}h.currentTarget=null,f=C}}}}function me(n,r){var i=r[gu];i===void 0&&(i=r[gu]=new Set);var o=n+"__bubble";i.has(o)||(Zg(r,n,2,!1),i.add(o))}function rh(n,r,i){var o=0;r&&(o|=4),Zg(i,n,o,r)}var el="_reactListening"+Math.random().toString(36).slice(2);function sh(n){if(!n[el]){n[el]=!0,Vf.forEach(function(i){i!=="selectionchange"&&(V_.has(i)||rh(i,!1,n),rh(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[el]||(r[el]=!0,rh("selectionchange",!1,r))}}function Zg(n,r,i,o){switch(Om(r)){case 2:var h=bS;break;case 8:h=_S;break;default:h=bh}i=h.bind(null,r,i,n),h=void 0,!Tu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),o?h!==void 0?n.addEventListener(r,i,{capture:!0,passive:h}):n.addEventListener(r,i,!0):h!==void 0?n.addEventListener(r,i,{passive:h}):n.addEventListener(r,i,!1)}function ih(n,r,i,o,h){var f=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 S=o.stateNode.containerInfo;if(S===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(;S!==null;){if(v=vs(S),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){o=f=v;continue e}S=S.parentNode}}o=o.return}rd(function(){var N=f,H=wu(i),G=[];e:{var z=jd.get(n);if(z!==void 0){var P=co,ee=n;switch(n){case"keypress":if(lo(i)===0)break e;case"keydown":case"keyup":P=Pb;break;case"focusin":ee="focus",P=Cu;break;case"focusout":ee="blur",P=Cu;break;case"beforeblur":case"afterblur":P=Cu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=ad;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Ab;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=qb;break;case Od:case Cd:case xd:P=xb;break;case kd:P=$b;break;case"scroll":case"scrollend":P=Tb;break;case"wheel":P=Vb;break;case"copy":case"cut":case"paste":P=jb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=ld;break;case"toggle":case"beforetoggle":P=Fb}var ue=(r&4)!==0,De=!ue&&(n==="scroll"||n==="scrollend"),M=ue?z!==null?z+"Capture":null:z;ue=[];for(var x=N,U;x!==null;){var I=x;if(U=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||U===null||M===null||(I=Ci(x,M),I!=null&&ue.push(oa(x,I,U))),De)break;x=x.return}0<ue.length&&(z=new P(z,ee,null,i,H),G.push({event:z,listeners:ue}))}}if((r&7)===0){e:{if(z=n==="mouseover"||n==="pointerover",P=n==="mouseout"||n==="pointerout",z&&i!==Su&&(ee=i.relatedTarget||i.fromElement)&&(vs(ee)||ee[ys]))break e;if((P||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,P?(ee=i.relatedTarget||i.toElement,P=N,ee=ee?vs(ee):null,ee!==null&&(De=u(ee),ue=ee.tag,ee!==De||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(P=null,ee=N),P!==ee)){if(ue=ad,I="onMouseLeave",M="onMouseEnter",x="mouse",(n==="pointerout"||n==="pointerover")&&(ue=ld,I="onPointerLeave",M="onPointerEnter",x="pointer"),De=P==null?z:Oi(P),U=ee==null?z:Oi(ee),z=new ue(I,x+"leave",P,i,H),z.target=De,z.relatedTarget=U,I=null,vs(H)===N&&(ue=new ue(M,x+"enter",ee,i,H),ue.target=U,ue.relatedTarget=De,I=ue),De=I,P&&ee)t:{for(ue=K_,M=P,x=ee,U=0,I=M;I;I=ue(I))U++;I=0;for(var ae=x;ae;ae=ue(ae))I++;for(;0<U-I;)M=ue(M),U--;for(;0<I-U;)x=ue(x),I--;for(;U--;){if(M===x||x!==null&&M===x.alternate){ue=M;break t}M=ue(M),x=ue(x)}ue=null}else ue=null;P!==null&&Wg(G,z,P,ue,!1),ee!==null&&De!==null&&Wg(G,De,ee,ue,!0)}}e:{if(z=N?Oi(N):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var we=md;else if(pd(z))if(yd)we=r_;else{we=t_;var ne=e_}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?N&&_u(N.elementType)&&(we=md):we=n_;if(we&&(we=we(n,N))){gd(G,we,i,H);break e}ne&&ne(n,z,N),n==="focusout"&&N&&z.type==="number"&&N.memoizedProps.value!=null&&bu(z,"number",z.value)}switch(ne=N?Oi(N):window,n){case"focusin":(pd(ne)||ne.contentEditable==="true")&&(Os=ne,Uu=N,Li=null);break;case"focusout":Li=Uu=Os=null;break;case"mousedown":Nu=!0;break;case"contextmenu":case"mouseup":case"dragend":Nu=!1,Rd(G,i,H);break;case"selectionchange":if(i_)break;case"keydown":case"keyup":Rd(G,i,H)}var de;if(ku)e:{switch(n){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else As?fd(n,i)&&(be="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(ud&&i.locale!=="ko"&&(As||be!=="onCompositionStart"?be==="onCompositionEnd"&&As&&(de=sd()):(er=H,Ru="value"in er?er.value:er.textContent,As=!0)),ne=tl(N,be),0<ne.length&&(be=new od(be,n,null,i,H),G.push({event:be,listeners:ne}),de?be.data=de:(de=dd(i),de!==null&&(be.data=de)))),(de=Qb?Jb(n,i):Xb(n,i))&&(be=tl(N,"onBeforeInput"),0<be.length&&(ne=new od("onBeforeInput","beforeinput",null,i,H),G.push({event:ne,listeners:be}),ne.data=de)),I_(G,n,N,i,H)}Xg(G,r)})}function oa(n,r,i){return{instance:n,listener:r,currentTarget:i}}function tl(n,r){for(var i=r+"Capture",o=[];n!==null;){var h=n,f=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||f===null||(h=Ci(n,i),h!=null&&o.unshift(oa(n,h,f)),h=Ci(n,r),h!=null&&o.push(oa(n,h,f))),n.tag===3)return o;n=n.return}return[]}function K_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Wg(n,r,i,o,h){for(var f=r._reactName,v=[];i!==null&&i!==o;){var S=i,C=S.alternate,N=S.stateNode;if(S=S.tag,C!==null&&C===o)break;S!==5&&S!==26&&S!==27||N===null||(C=N,h?(N=Ci(i,f),N!=null&&v.unshift(oa(i,N,C))):h||(N=Ci(i,f),N!=null&&v.push(oa(i,N,C)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var F_=/\r\n?/g,Y_=/\u0000|\uFFFD/g;function em(n){return(typeof n=="string"?n:""+n).replace(F_,` 10`).replace(Y_,"")}function tm(n,r){return r=em(r),em(n)===r}function Me(n,r,i,o,h,f){switch(i){case"children":typeof o=="str
10ing"?r==="body"||r==="textarea"&&o===""||Es(n,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&Es(n,""+o);break;case"className":so(n,"class",o);break;case"tabIndex":so(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":so(n,i,o);break;case"style":td(n,o,f);break;case"data":if(r!=="object"){so(n,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=ao(""+o),n.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(r!=="input"&&Me(n,r,"name",h.name,h,null),Me(n,r,"formEncType",h.formEncType,h,null),Me(n,r,"formMethod",h.formMethod,h,null),Me(n,r,"formTarget",h.formTarget,h,null)):(Me(n,r,"encType",h.encType,h,null),Me(n,r,"method",h.method,h,null),Me(n,r,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(i);break}o=ao(""+o),n.setAttribute(i,o);break;case"onClick":o!=null&&(n.onclick=An);break;case"onScroll":o!=null&&me("scroll",n);break;case"onScrollEnd":o!=null&&me("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":n.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"){n.removeAttribute("xlink:href");break}i=ao(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""+o):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":o===!0?n.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(i,o):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(i,o):n.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(i):n.setAttribute(i,o);break;case"popover":me("beforetoggle",n),me("toggle",n),ro(n,"popover",o);break;case"xlinkActuate":Rn(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Rn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Rn(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Rn(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Rn(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Rn(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Rn(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Rn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Rn(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ro(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=wb.get(i)||i,ro(n,i,o))}}function ah(n,r,i,o,h,f){switch(i){case"style":td(n,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=i}}break;
vendor: 6,437 bytes, line 10
10case"children":typeof o=="string"?Es(n,o):(typeof o=="number"||typeof o=="bigint")&&Es(n,""+o);break;case"onScroll":o!=null&&me("scroll",n);break;case"onScrollEnd":o!=null&&me("scrollend",n);break;case"onClick":o!=null&&(n.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kf.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(h=i.endsWith("Capture"),r=i.slice(2,h?i.length-7:void 0),f=n[Et]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(r,f,h),typeof o=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,o,h);break e}i in n?n[i]=o:o===!0?n.setAttribute(i,""):ro(n,i,o)}}}function mt(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":me("error",n),me("load",n);var o=!1,h=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(n,r,f,v,i,null)}}h&&Me(n,r,"srcSet",i.srcSet,i,null),o&&Me(n,r,"src",i.src,i,null);return;case"input":me("invalid",n);var S=f=v=h=null,C=null,N=null;for(o in i)if(i.hasOwnProperty(o)){var H=i[o];if(H!=null)switch(o){case"name":h=H;break;case"type":v=H;break;case"checked":C=H;break;case"defaultChecked":N=H;break;case"value":f=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,r));break;default:Me(n,r,o,H,i,null)}}Xf(n,f,S,C,N,v,h,!1);return;case"select":me("invalid",n),o=v=f=null;for(h in i)if(i.hasOwnProperty(h)&&(S=i[h],S!=null))switch(h){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":o=S;default:Me(n,r,h,S,i,null)}r=f,i=v,n.multiple=!!o,r!=null?ws(n,!!o,r,!1):i!=null&&ws(n,!!o,i,!0);return;case"textarea":me("invalid",n),f=h=o=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":o=S;break;case"defaultValue":h=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Me(n,r,v,S,i,null)}Wf(n,o,h,f);return;case"option":for(C in i)i.hasOwnProperty(C)&&(o=i[C],o!=null)&&(C==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(n,r,C,o,i,null));return;case"dialog":me("beforetoggle",n),me("toggle",n),me("cancel",n),me("close",n);break;case"iframe":case"object":me("load",n);break;case"video":case"audio":for(o=0;o<aa.length;o++)me(aa[o],n);break;case"image":me("error",n),me("load",n);break;case"details":me("toggle",n);break;case"embed":case"source":case"link":me("error",n),me("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in i)if(i.hasOwnProperty(N)&&(o=i[N],o!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(n,r,N,o,i,null)}return;default:if(_u(r)){for(H in i)i.hasOwnProperty(H)&&(o=i[H],o!==void 0&&ah(n,r,H,o,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(o=i[S],o!=null&&Me(n,r,S,o,i,null))}function Q_(n,r,i,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,f=null,v=null,S=null,C=null,N=null,H=null;for(P in i){var G=i[P];if(i.hasOwnProperty(P)&&G!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":C=G;default:o.hasOwnProperty(P)||Me(n,r,P,null,o,G)}}for(var z in o){var P=o[z];if(G=i[z],o.hasOwnProperty(z)&&(P!=null||G!=null))switch(z){case"type":f=P;break;case"name":h=P;break;case"checked":N=P;break;case"defaultChecked":H=P;break;case"value":v=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,r));break;default:P!==G&&Me(n,r,z,P,o,G)}}vu(n,v,S,C,N,H,f,h);return;case"select":P=v=S=z=null;for(f in i)if(C=i[f],i.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":P=C;default:o.hasOwnProperty(f)||Me(n,r,f,null,o,C)}for(h in o)if(f=o[h],C=i[h],o.hasOwnProperty(h)&&(f!=null||C!=null))switch(h){case"value":z=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==C&&Me(n,r,h,f,o,C)}r=S,i=v,o=P,z!=null?ws(n,!!i,z,!1):!!o!=!!i&&(r!=null?ws(n,!!i,r,!0):ws(n,!!i,i?[]:"",!1));return;case"textarea":P=z=null;for(S in i)if(h=i[S],i.hasOwnProperty(S)&&h!=null&&!o.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Me(n,r,S,null,o,h)}for(v in o)if(h=o[v],f=i[v],o.hasOwnProperty(v)&&(h!=null||f!=null))switch(v){case"value":z=h;break;case"defaultValue":P=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==f&&Me(n,r,v,h,o,f)}Zf(n,z,P);return;case"option":for(var ee in i)z=i[ee],i.hasOwnProperty(ee)&&z!=null&&!o.hasOwnProperty(ee)&&(ee==="selected"?n.selected=!1:Me(n,r,ee,null,o,z));for(C in o)z=o[C],P=i[C],o.hasOwnProperty(C)&&z!==P&&(z!=null||P!=null)&&(C==="selected"?n.selected=z&&typeof z!="function"&&typeof z!="symbol":Me(n,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 i)z=i[ue],i.hasOwnProperty(ue)&&z!=null&&!o.hasOwnProperty(ue)&&Me(n,r,ue,null,o,z);for(N in o)if(z=o[N],P=i[N],o.hasOwnProperty(N)&&z!==P&&(z!=null||P!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(137,r));break;default:Me(n,r,N,z,o,P)}return;default:if(_u(r)){for(var De in i)z=i[De],i.hasOwnProperty(De)&&z!==void 0&&!o.hasOwnProperty(De)&&ah(n,r,De,void 0,o,z);for(H in o)z=o[H],P=i[H],!o.hasOwnProperty(H)||z===P||z===void 0&&P===void 0||ah(n,r,H,z,o,P);return}}for(var M in i)z=i[M],i.hasOwnProperty(M)&&z!=null&&!o.hasOwnProperty(M)&&Me(n,r,M,null,o,z);for(G in o)z=o[G],P=i[G],!o.hasOwnProperty(G)||z===P||z==null&&P==null||Me(n,r,G,z,o,P)}function nm(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var h=i[o],f=h.transferSize,v=h.initiatorType,S=h.duration;if(f&&S&&nm(v)){for(v=0,S=h.responseEnd,o+=1;o<i.length;o++){var C=i[o],N=C.startTime;if(N>S)break;var H=C.transferSize,G=C.initiatorType;
vendor: 8,773 bytes, line 10
10H&&nm(G)&&(C=C.responseEnd,v+=H*(C<S?1:(S-N)/(C-N)))}if(--o,r+=8*(f+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var oh=null,lh=null;function nl(n){return n.nodeType===9?n:n.ownerDocument}function rm(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sm(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function uh(n,r){return n==="textarea"||n==="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 ch=null;function X_(){var n=window.event;return n&&n.type==="popstate"?n===ch?!1:(ch=n,!0):(ch=null,!1)}var im=typeof setTimeout=="function"?setTimeout:void 0,Z_=typeof clearTimeout=="function"?clearTimeout:void 0,am=typeof Promise=="function"?Promise:void 0,W_=typeof queueMicrotask=="function"?queueMicrotask:typeof am<"u"?function(n){return am.resolve(null).then(n).catch(eS)}:im;function eS(n){setTimeout(function(){throw n})}function yr(n){return n==="head"}function om(n,r){var i=r,o=0;do{var h=i.nextSibling;if(n.removeChild(i),h&&h.nodeType===8)if(i=h.data,i==="/$"||i==="/&"){if(o===0){n.removeChild(h),ei(r);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")la(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,la(i);for(var f=i.firstChild;f;){var v=f.nextSibling,S=f.nodeName;f[Ai]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&la(n.ownerDocument.body);i=h}while(i);ei(r)}function lm(n,r){var i=n;n=0;do{var o=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=o}while(i)}function hh(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":hh(i),mu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function tS(n,r,i,o){for(;n.nodeType===1;){var h=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[Ai])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var f=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=Zt(n.nextSibling),n===null)break}return null}function nS(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Zt(n.nextSibling),n===null))return null;return n}function um(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Zt(n.nextSibling),n===null))return null;return n}function fh(n){return n.data==="$?"||n.data==="$~"}function dh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function rS(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var o=function(){r(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function Zt(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var ph=null;function cm(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return Zt(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function hm(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function fm(n,r,i){switch(r=nl(i),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function la(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);mu(n)}var Wt=new Map,dm=new Set;function rl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var In=Y.d;Y.d={f:sS,r:iS,D:aS,C:oS,L:lS,m:uS,X:hS,S:cS,M:fS};function sS(){var n=In.f(),r=Yo();return n||r}function iS(n){var r=bs(n);r!==null&&r.tag===5&&r.type==="form"?kp(r):In.r(n)}var Xs=typeof document>"u"?null:document;function pm(n,r,i){var o=Xs;if(o&&typeof r=="string"&&r){var h=Vt(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof i=="string"&&(h+='[crossorigin="'+i+'"]'),dm.has(h)||(dm.add(h),n={rel:n,crossOrigin:i,href:r},o.querySelector(h)===null&&(r=o.createElement("link"),mt(r,"link",n),ot(r),o.head.appendChild(r)))}}function aS(n){In.D(n),pm("dns-prefetch",n,null)}function oS(n,r){In.C(n,r),pm("preconnect",n,r)}function lS(n,r,i){In.L(n,r,i);var o=Xs;if(o&&n&&r){var h='link[rel="preload"][as="'+Vt(r)+'"]';r==="image"&&i&&i.imageSrcSet?(h+='[imagesrcset="'+Vt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(h+='[imagesizes="'+Vt(i.imageSizes)+'"]')):h+='[href="'+Vt(n)+'"]';var f=h;switch(r){case"style":f=Zs(n);break;case"script":f=Ws(n)}Wt.has(f)||(n=m({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),Wt.set(f,n),o.querySelector(h)!==null||r==="style"&&o.querySelector(ua(f))||r==="script"&&o.querySelector(ca(f))||(r=o.createElement("link"),mt(r,"link",n),ot(r),o.head.appendChild(r)))}}function uS(n,r){In.m(n,r);var i=Xs;if(i&&n){var o=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Vt(o)+'"][href="'+Vt(n)+'"]',f=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ws(n)}if(!Wt.has(f)&&(n=m({rel:"modulepreload",href:n},r),Wt.set(f,n),i.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ca(f)))return}o=i.createElement("link"),mt(o,"link",n),ot(o),i.head.appendChild(o)}}}function cS(n,r,i){In.S(n,r,i);var o=Xs;if(o&&n){var h=_s(o).hoistableStyles,f=Zs(n);r=r||"default";var v=h.get(f);if(!v){var S={loading:0,preload:null};if(v=o.querySelector(ua(f)))S.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":r},i),(i=Wt.get(f))&&gh(n,i);var C=v=o.createElement("link");ot(C),mt(C,"link",n),C._p=new Promise(function(N,H){C.onload=N,C.onerror=H}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,sl(v,r,o)}v={type:"stylesheet",instance:v,count:1,state:S},h.set(f,v)}}}function hS(n,r){In.X(n,r);var i=Xs;if(i&&n){var o=_s(i).hoistableScripts,h=Ws(n),f=o.get(h);f||(f=i.querySelector(ca(h)),f||(n=m({src:n,async:!0},r),(r=Wt.get(h))&&mh(n,r),f=i.createElement("script"),ot(f),mt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function fS(n,r){In.M(n,r);var i=Xs;if(i&&n){var o=_s(i).hoistableScripts,h=Ws(n),f=o.get(h);f||(f=i.querySelector(ca(h)),f||(n=m({src:n,async:!0,type:"module"},r),(r=Wt.get(h))&&mh(n,r),f=i.createElement("script"),ot(f),mt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(h,f))}}function gm(n,r,i,o){var h=(h=pe.current)?rl(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=Zs(i.href),i=_s(
vendor: 4,604 bytes, line 10
10h).hoistableStyles,o=i.get(r),o||(o={type:"style",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Zs(i.href);var f=_s(h).hoistableStyles,v=f.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,v),(f=h.querySelector(ua(n)))&&!f._p&&(v.instance=f,v.state.loading=5),Wt.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Wt.set(n,i),f||dS(h,n,i,v.state))),r&&o===null)throw Error(a(528,""));return v}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ws(i),i=_s(h).hoistableScripts,o=i.get(r),o||(o={type:"script",instance:null,count:0,state:null},i.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Zs(n){return'href="'+Vt(n)+'"'}function ua(n){return'link[rel="stylesheet"]['+n+"]"}function mm(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function dS(n,r,i,o){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=n.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),mt(r,"link",i),ot(r),n.head.appendChild(r))}function Ws(n){return'[src="'+Vt(n)+'"]'}function ca(n){return"script[async]"+n}function ym(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var o=n.querySelector('style[data-href~="'+Vt(i.href)+'"]');if(o)return r.instance=o,ot(o),o;var h=m({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),ot(o),mt(o,"style",h),sl(o,i.precedence,n),r.instance=o;case"stylesheet":h=Zs(i.href);var f=n.querySelector(ua(h));if(f)return r.state.loading|=4,r.instance=f,ot(f),f;o=mm(i),(h=Wt.get(h))&&gh(o,h),f=(n.ownerDocument||n).createElement("link"),ot(f);var v=f;return v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),mt(f,"link",o),r.state.loading|=4,sl(f,i.precedence,n),r.instance=f;case"script":return f=Ws(i.src),(h=n.querySelector(ca(f)))?(r.instance=h,ot(h),h):(o=i,(h=Wt.get(f))&&(o=m({},i),mh(o,h)),n=n.ownerDocument||n,h=n.createElement("script"),ot(h),mt(h,"link",o),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,sl(o,i.precedence,n));return r.instance}function sl(n,r,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,f=h,v=0;v<o.length;v++){var S=o[v];if(S.dataset.precedence===r)f=S;else if(f!==h)break}f?f.parentNode.insertBefore(n,f.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function gh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function mh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var il=null;function vm(n,r,i){if(il===null){var o=new Map,h=il=new Map;h.set(i,o)}else h=il,o=h.get(i),o||(o=new Map,h.set(i,o));if(o.has(n))return o;for(o.set(n,null),i=i.getElementsByTagName(n),h=0;h<i.length;h++){var f=i[h];if(!(f[Ai]||f[ft]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(r)||"";v=n+v;var S=o.get(v);S?S.push(f):o.set(v,[f])}}return o}function bm(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function pS(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){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"?(n=r.disabled,typeof r.precedence=="string"&&n==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 _m(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function gS(n,r,i,o){if(i.type==="stylesheet"&&(typeof o.media!="str
10ing"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var h=Zs(o.href),f=r.querySelector(ua(h));if(f){r=f._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=al.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=f,ot(f);return}f=r.ownerDocument||r,o=mm(o),(h=Wt.get(h))&&gh(o,h),f=f.createElement("link"),ot(f);var v=f;v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),mt(f,"link",o),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=al.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var yh=0;function mS(n,r){return n.stylesheets&&n.count===0&&ll(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var o=setTimeout(function(){if(n.stylesheets&&ll(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+r);0<n.imgBytes&&yh===0&&(yh=62500*J_());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&ll(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>yh?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function al(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ll(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var ol=null;function ll(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,ol=new Map,r.forEach(yS,n),ol=null,al.call(n))}function yS(n,r){if(!(r.state.loading&4)){var i=ol.get(n);if(i)var o=i.get(null);else{i=new Map,ol.set(n,i);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<h.length;f++){var v=h[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),o=v)}o&&i.set(null,o)}h=r.instance,v=h.getAttribute("data-precedence"),f=i.get(v)||o,f===o&&i.set(null,h),i.set(v,h),this.count++,o=al.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),f?f.parentNode.insertBefore(h,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var ha={$$typeof:j,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function vS(n,r,i,o,h,f,v,S,C){this.tag=1,this.containerInfo=n,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=fu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fu(0),this.hiddenUpdates=fu(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Sm(n,r,i,o,h,f,v,S,C,N,H,G){return n=new vS(n,r,i,v,C,N,H,G,S),r=1,f===!0&&(r|=24),f=zt(3,null,null,r),n.current=f,f.stateNode=n,r=Ju(),r.refCount++,n.pooledCache=r,r.refCount++,f.memoizedState={element:o,isDehydrated:i,cache:r},ec(f),n}function wm(n){return n?(n=ks,n):ks}function Em(n,r,i,o,h,f){h=wm(h),o.context===null?o.context=h:o.pendingContext=h,o=ar(r),o.payload={element:i},f=f===void 0?null:f,f!==null&&(o.callback=f),i=or(n,o,r),i!==null&&(xt(i,n,r),$i(i,n,r))}function Tm(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function vh(n,r){Tm(n,r),(n=n.alternate)&&Tm(n,r)}function Rm(n){if(n.tag===13||n.tag===31){var r=Ir(n,67108864);r!==null&&xt(r,n,67108864),vh(n,67108864)}}function Am(n){if(n.tag===13||n.tag===31){var r=It();r=du(r);var i=Ir(n,r);i!==null&&xt(i,n,r),vh(n,r)}}var ul=!0;function bS(n,r,i,o){var h=B.T;B.T=null;var f=Y.p;try{Y.p=2,bh(n,r,i,o)}finally{Y.p=f,B.T=h}}function _S(n,r,i,o){var h=B.T;B.T=null;var f=Y.p;try{Y.p=8,bh(n,r,i,o)}finally{Y.p=f,B.T=h}}function bh(n,r,i,o){if(ul){var h=_h(o);if(h===null)ih(n,r,o,cl,i),Cm(n,o);else if(wS(h,n,r,i,o))o.stopPropagation();else if(Cm(n,o),r&4&&-1<SS.indexOf(n)){for(;h!==null;){var f=bs(h);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=zr(f.pen
vendor: 8,524 bytes, line 10
10dingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var C=1<<31-Nt(v);S.entanglements[1]|=C,v&=~C}mn(f),(Ae&6)===0&&(Ko=vt()+500,ia(0))}}break;case 31:case 13:S=Ir(f,2),S!==null&&xt(S,f,2),Yo(),vh(f,2)}if(f=_h(o),f===null&&ih(n,r,o,cl,i),f===h)break;h=f}h!==null&&o.stopPropagation()}else ih(n,r,o,null,i)}}function _h(n){return n=wu(n),Sh(n)}var cl=null;function Sh(n){if(cl=null,n=vs(n),n!==null){var r=u(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=c(r),n!==null)return n;n=null}else if(i===31){if(n=d(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return cl=n,null}function Om(n){switch(n){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 ht:return 2;case fn:return 8;case ms:case ob:return 32;case zf:return 268435456;default:return 32}default:return 32}}var wh=!1,vr=null,br=null,_r=null,fa=new Map,da=new Map,Sr=[],SS="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 Cm(n,r){switch(n){case"focusin":case"focusout":vr=null;break;case"dragenter":case"dragleave":br=null;break;case"mouseover":case"mouseout":_r=null;break;case"pointerover":case"pointerout":fa.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":da.delete(r.pointerId)}}function pa(n,r,i,o,h,f){return n===null||n.nativeEvent!==f?(n={blockedOn:r,domEventName:i,eventSystemFlags:o,nativeEvent:f,targetContainers:[h]},r!==null&&(r=bs(r),r!==null&&Rm(r)),n):(n.eventSystemFlags|=o,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function wS(n,r,i,o,h){switch(r){case"focusin":return vr=pa(vr,n,r,i,o,h),!0;case"dragenter":return br=pa(br,n,r,i,o,h),!0;case"mouseover":return _r=pa(_r,n,r,i,o,h),!0;case"pointerover":var f=h.pointerId;return fa.set(f,pa(fa.get(f)||null,n,r,i,o,h)),!0;case"gotpointercapture":return f=h.pointerId,da.set(f,pa(da.get(f)||null,n,r,i,o,h)),!0}return!1}function xm(n){var r=vs(n.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){n.blockedOn=r,$f(n.priority,function(){Am(i)});return}}else if(r===31){if(r=d(i),r!==null){n.blockedOn=r,$f(n.priority,function(){Am(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function hl(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=_h(n.nativeEvent);if(i===null){i=n.nativeEvent;var o=new i.constructor(i.type,i);Su=o,i.target.dispatchEvent(o),Su=null}else return r=bs(i),r!==null&&Rm(r),n.blockedOn=i,!1;r.shift()}return!0}function km(n,r,i){hl(n)&&i.delete(r)}function ES(){wh=!1,vr!==null&&hl(vr)&&(vr=null),br!==null&&hl(br)&&(br=null),_r!==null&&hl(_r)&&(_r=null),fa.forEach(km),da.forEach(km)}function fl(n,r){n.blockedOn===r&&(n.blockedOn=null,wh||(wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ES)))}var dl=null;function jm(n){dl!==n&&(dl=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dl===n&&(dl=null);for(var r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],h=n[r+2];if(typeof o!="function"){if(Sh(o||i)===null)continue;break}var f=bs(i);f!==null&&(n.splice(r,3),r-=3,_c(f,{pending:!0,data:h,method:i.method,action:o},o,h))}}))}function ei(n){function r(C){return fl(C,n)}vr!==null&&fl(vr,n),br!==null&&fl(br,n),_r!==null&&fl(_r,n),fa.forEach(r),da.forEach(r);for(var i=0;i<Sr.length;i++){var o=Sr[i];o.blockedOn===n&&(o.blockedOn=null)}for(;0<Sr.length&&(i=Sr[0],i.blockedOn===null);)xm(i),i.blockedOn===null&&Sr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var h=i[o],f=i[o+1],v=h[Et]||null;if(typeof f=="function")v||jm(i);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(h=f,v=f[Et]||null)S=v.formAction;else if(Sh(h)!==null)continue}else S=v.action;typeof S=="function"?i[o+1]=S:(i.splice(o,3),o-=3),jm(i)}}}function Mm(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function Eh(n){this._internalRoot=n}pl.prototype.render=Eh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var i=r.current,o=It();Em(i,o,n,r,null,null)},pl.prototype.unmount=Eh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Em(n.current,2,null,n,null,null),Yo(),r[ys]=null}};function pl(n){this._internalRoot=n}pl.prototype.unstable_scheduleHydration=function(n){if(n){var r=If();n={blockedOn:null,target:n,priority:r};for(var i=0;i<Sr.length&&r!==0&&r<Sr[i].priority;i++);Sr.splice(i,0,n),i===0&&xm(n)}};var Dm=t.version;if(Dm!=="19.2.5")throw Error(a(527,Dm,"19.2.5"));Y.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=g(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var TS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gl.isDisabled&&gl.supportsFiber)try{Ei=gl.inject(TS),Ut=gl}catch{}}return ma.createRoot=function(n,r){if(!l(n))throw Error(a(299));var i=!1,o="",h=Hp,f=qp,v=Ip;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(f=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=Sm(n,1,!1,null,null,i,o,null,h,f,v,Mm),n[ys]=r.current,sh(n),new Eh(r)},ma.hydrateRoot=function(n,r,i){if(!l(n))throw Error(a(299));var o=!1,h="",f=Hp,v=qp,S=Ip,C=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),r=Sm(n,1,!0,r,i??null,o,h,C,f,v,S,Mm),r.context=wm(null),i=r.current,o=It(),o=du(o),h=ar(o),h.callback=null,or(i,h,o),i=o,r.current.lanes=i,Ri(r,i),mn(r),n[ys]=r.current,sh(n),new pl(r)},ma.version="19.2.5",ma}var $m;function NS(){if($m)return Ah.exports;$m=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ah.exports=US(),Ah.exports}
10var LS=NS(),zS="__TSS_CONTEXT",Xh=Symbol.for("TSS_SERVER_FUNCTION"),pk=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),PS="application/x-tss-framed",$n={JSON:0,CHUNK:1,END:2,ERROR:3},BS=/;\s*v=(\d+)/;function HS(e){const t=e.match(BS);return t?parseInt(t[1],10):void 0}function qS(e){const t=HS(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var Sv=()=>window.__TSS_START_OPTIONS__,wv=!1;function ja(e){return e[e.length-1]}function IS(e){return typeof e=="function"}function Or(e,t){return IS(e)?e(t):e}var $S=Object.prototype.hasOwnProperty,Gm=Object.prototype.propertyIsEnumerable,GS=()=>Object.create(null),ts=(e,t)=>is(e,t,GS);function is(e,t,s=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const l=t,u=Fm(e)&&Fm(l);if(!u&&!(yi(e)&&yi(l)))return l;const c=u?e:Vm(e);if(!c)return l;const d=u?l:Vm(l);if(!d)return l;const p=c.length,g=d.length,y=u?new Array(g):s();let m=0;for(let b=0;b<g;b++){const _=u?b:
10d[b],w=e[_],A=l[_];if(w===A){y[_]=w,(u?b<p:$S.call(e,_))&&m++;continue}if(w===null||A===null||typeof w!="object"||typeof A!="object"){y[_]=A;continue}const R=is(w,A,s,a+1);y[_]=R,R===w&&m++}return p===g&&m===p?e:y}function Vm(e){const t=Object.getOwnPropertyNames(e);for(const l of t)if(!Gm.call(e,l))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return t;const a=t;for(const l of s){if(!Gm.call(e,l))return!1;a.push(l)}return a}function yi(e){if(!Km(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!Km(s)||!s.hasOwnProperty("isPrototypeOf"))}function Km(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jt(e,t,s){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,l=e.length;a<l;a++)if(!jt(e[a],t[a],s))return!1;return!0}if(yi(e)&&yi(t)){const a=s?.ignoreUndefined??!0;if(s?.partial){for(const c in t)if((!a||t[c]!==void 0)&&!jt(e[c],t[c],s))return!1;return!0}let l=0;if(!a)l=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&l++;let u=0;for(const c in t)if((!a||t[c]!==void 0)&&(u++,u>l||!jt(e[c],t[c],s)))return!1;return l===u}return!1}function fs(e){let t,s;const a=new Promise((l,u)=>{t=l,s=u});return a.status="pending",a.resolve=l=>{a.status="resolved",a.value=l,t(l),e?.(l)},a.reject=l=>{a.status="rejected",s(l)},a}function VS(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 Ma(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function KS(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Ym(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return KS(t)}var FS=["http:","https:","mailto:","tel:"];function Ll(e,t){if(!e)return!1;try{const s=new URL(e);return!t.has(s.protocol)}catch{return!1}}var YS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},QS=/[&><\u2028\u2029]/g;function JS(e){return e.replace(QS,t=>YS[t])}function ya(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let s=0,a="",l;for(;(l=t.exec(e))!==null;)a+=Ym(e.slice(s,l.index))+l[0],s=t.lastIndex;a=a+Ym(s?e.slice(s):e);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function XS(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ZS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function Dt(){throw new Error("Invariant failed")}function Da(e){const t=new Map;let s,a;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,a&&(a.next=u,u.prev=a
10)):(u.next.prev=void 0,s=u.next,u.next=void 0,a&&(u.prev=a,a.next=u)),a=u)};return{get(u){const c=t.get(u);if(c)return l(c),c.value},set(u,c){if(t.size>=e&&s){const p=s;t.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const d=t.get(u);if(d)d.value=c,l(d);else{const p={key:u,value:c,prev:a};a&&(a.next=p),a=p,s||(s=p),t.set(u,p)}},clear(){t.clear(),s=void 0,a=void 0}}}var Cr=4,Ev=5;function WS(e){const t=e.indexOf("{");if(t===-1)return null;const s=e.indexOf("}",t);return s===-1||t+1>=e.length?null:[t,s]}function Sf(e,t,s=new Uint16Array(6)){const a=e.indexOf("/",t),l=a===-1?e.length:a,u=e.substring(t,l);if(!u||!u.includes("$"))return s[0]=0,s[1]=t,s[2]=t,s[3]=l,s[4]=l,s[5]=l,s;if(u==="$"){const d=e.length;return s[0]=2,s[1]=t,s[2]=t,s[3]=d,s[4]=d,s[5]=d,s}if(u.charCodeAt(0)===36)return s[0]=1,s[1]=t,s[2]=t+1,s[3]=l,s[4]=l,s[5]=l,s;const c=WS(u);if(c){const[d,p]=c,g=u.charCodeAt(d+1);if(g===45){if(d+2<u.length&&u.charCodeAt(d+2)===36){const y=d+3,m=p;if(y<m)return s[0]=3,s[1]=t+d,s[2]=t+y,s[3]=t+m,s[4]=t+p+1,s[5]=l,s}}else if(g===36){const y=d+1,m=d+2;return m===p?(s[0]=2,s[1]=t+d,s[2]=t+y,s[3]=t+m,s[4]=t+p+1,s[5]=e.length,s):(s[0]=1,s[1]=t+d,s[2]=t+m,s[3]=t+p,s[4]=t+p+1,s[5]=l,s)}}return s[0]=0,s[1]=t,s[2]=t,s[3]=l,s[4]=l,s[5]=l,s}function Zl(e,t,s,a,l,u,c){c?.(s);let d=a;{const p=s.fullPath??s.from,g=p.length,y=s.options?.caseSensitive??e,m=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;d<g;){const _=Sf(p,d,t);let w;const A=d,R=_[5];switch(d=R+1,u++,_[0]){case 0:{const O=p.substring(_[2],_[3]);if(y){const D=l.static?.get(O);if(D)w=D;else{l.static??=new Map;const j=as(s.fullPath??s.from);j.parent=l,j.depth=u,w=j,l.static.set(O,j)}}else{const D=O.toLowerCase(),j=l.staticInsensitive?.get(D);if(j)w=j;else{l.staticInsensitive??=new Map;const L=as(s.fullPath??s.from);L.parent=l,L.depth=u,w=L,l.staticInsensitive.set(D,L)}}break}case 1:{const O=p.substring(A,_[1]),D=p.substring(_[4],R),j=y&&!!(O||D),L=O?j?O:O.toLowerCase():void 0,Q=D?j?D:D.toLowerCase():void 0,V=!m&&l.dynamic?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===L&&q.suffix===Q);if(V)w=V;else{const q=jh(1,s.fullPath??s.from,j,L,Q);w=q,q.depth=u,q.parent=l,l.dynamic??=[],l.dynamic.push(q)}break}case 3:{const O=p.substring(A,_[1]),D=p.substring(_[4],R),j=y&&!!(O||D),L=O?j?O:O.toLowerCase():void 0,Q=D?j?D:D.toLowerCase():void 0,V=!m&&l.optional?.find(q=>!q.skipOnParamError&&q.caseSensitive===j&&q.prefix===L&&q.suffix===Q);if(V)w=V;else{const q=jh(3,s.fullPath??s.from,j,L,Q);w=q,q.parent=l,q.depth=u,l.optional??=[],l.optional.push(q)}break}case 2:{const O=p.substring(A,_[1]),D=p.substring(_[4],R),j=y&&!!(O||D),L=O?j?O:O.toLowerCase():void 0,Q=D?j?D:D.toLowerCase():void 0,V=jh(2,s.fullPath??s.from,j,L,Q);w=V,V.parent=l,V.depth=u,l.wildcard??=[],l.wildcard.push(V)}}l=w}if(m&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=as(s.fullPath??s.from);_.kind=Ev,_.parent=l,u++,_.depth=u,l.pathless??=[],l.pathless.push(_),l=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=as(s.fullPath??s.from);_.kind=Cr,_.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)Zl(e,t,p,d,l,u,c)}function kh(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Er(e){if(e.pathless)for(const t of e.pathless)Er(t);if(e.static)for(const t of e.static.values())Er(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Er(t);if(e.dynamic?.length){e.dynamic.sort(kh);for(const t of e.dynamic)Er(t)}if(e.optional?.length){e.optional.sort(kh);for(const t of e.optional)Er(t)}if(e.wildcard?.length){e.wildcard.sort(kh);for(const t of e.wildcard)Er(t)}}function as(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 jh(e,t,s,a,l){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:s,prefix:a,suffix:l}}function ew(e,t){const s=as("/"),a=new Uint16Array(6);for(const l of e)Zl(!1,a,l,1,s,0);Er(s),t.masksTree=s,t.flatCache=Da(1e3)}function tw(e,t){e||="/";const s=t.flatCache.get(e);if(s)return s;const a=wf(e,t.masksTree);return t.flatCache.set(e,a),a}function nw(e,t,s,a,l){e||="/",a||="/";const u=t?`case\0${e}`:e;let c=l.singleCache.get(u);return c||(c=as("/"),Zl(t,new Uint16Array(6),{from:e},1,c,0),l.singleCache.set(u,c)),wf(a,c,s)}function rw(e,t,s=!1){const a=s?e:`nofuzz\0${e}`,l=t.matchCache.get(a);if(l!==void 0)return l;e||="/";let u;
10try{u=wf(e,t.segmentTree,s)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=aw(u.route)),t.matchCache.set(a,u),u}function sw(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function iw(e,t=!1,s){const a=as(e.fullPath),l=new Uint16Array(6),u={},c={};let d=0;return Zl(t,l,e,1,a,0,p=>{if(s?.(p,d),p.id in u&&Dt(),u[p.id]=p,d!==0&&p.path){const g=sw(p.fullPath);(!c[g]||p.fullPath.endsWith("/"))&&(c[g]=p)}d++}),Er(a),{processedTree:{segmentTree:a,singleCache:Da(1e3),matchCache:Da(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function wf(e,t,s=!1){const a=e.split("/"),l=lw(e,a,t,s);if(!l)return null;const[u]=Tv(e,a,l);return{route:l.node.route,rawParams:u,parsedParams:l.parsedParams}}function Tv(e,t,s){const a=ow(s.node);let l=null;const u=Object.create(null);let c=s.extract?.part??0,d=s.extract?.node??0,p=s.extract?.path??0,g=s.extract?.segment??0;for(;d<a.length;c++,d++,p++,g++){const y=a[d];if(y.kind===Cr)break;if(y.kind===Ev){g--,c--,p--;continue}const m=t[c],b=p;if(m&&(p+=m.length),y.kind===1){l??=s.node.fullPath.split("/");const _=l[g],w=y.prefix?.length??0;if(_.charCodeAt(w)===123){const A=y.suffix?.length??0,R=_.substring(w+2,_.length-A-1),O=m.substring(w,m.length-A);u[R]=decodeURIComponent(O)}else{const A=_.substring(1);u[A]=decodeURIComponent(m)}}else if(y.kind===3){if(s.skipped&1<<d){c--,p=b-1;continue}l??=s.node.fullPath.split("/");const _=l[g],w=y.prefix?.length??0,A=y.suffix?.length??0,R=_.substring(w+3,_.length-A-1),O=y.suffix||y.prefix?m.substring(w,m.length-A):m;O&&(u[R]=decodeURIComponent(O))}else if(y.kind===2){const _=y,w=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),A=decodeURIComponent(w);u["*"]=A,u._splat=A;break}}return s.rawParams&&Object.assign(u,s.rawParams),[u,{part:c,node:d,path:p,segment:g}]}function aw(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ow(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function lw(e,t,s,a){if(e==="/"&&s.index)return{node:s.index,skipped:0};const l=!ja(t),u=l&&e!=="/",c=t.length-(l?1:0),d=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;d.length;){const y=d.pop(),{node:m,index:b,skipped:_,depth:w,statics:A,dynamics:R,optionals:O}=y;let{extract:D,rawParams:j,parsedParams:L}=y;if(m.kind===2&&m.route&&!yl(g,y))continue;if(m.skipOnParamError){if(!Qm(e,t,y))continue;j=y.rawParams,D=y.extract,L=y.parsedParams}a&&m.route&&m.kind!==Cr&&yl(p,y)&&(p=y);const Q=b===c;if(Q&&(m.route&&(!u||m.kind===Cr||m.kind===2)&&yl(g,y)&&(g=y),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const V=Q?void 0:t[b];let q;if(Q&&m.index){const K={node:m.index,index:b,skipped:_,depth:w+1,statics:A,dynamics:R,optionals:O,extract:D,rawParams:j,parsedParams:L};let J=!0;if(m.index.skipOnParamError&&(Qm(e,t,K)||(J=!1)),J){if(!R&&!O&&!_&&uw(A,c))return K;yl(g,K)&&(g=K)}}if(m.wildcard)for(let K=m.wildcard.length-1;K>=0;K--){const J=m.wildcard[K],{prefix:le,suffix:se}=J;if(!(le&&(Q||!(J.caseSensitive?V:q??=V.toLowerCase()).startsWith(le)))){if(se){if(Q)continue;const ye=t.slice(b).join("/").slice(-se.length);if((J.caseSensitive?ye:ye.toLowerCase())!==se)continue}d.push({node:J,index:c,skipped:_,depth:w+1,statics:A,dynamics:R,optionals:O,extract:D,rawParams:j,parsedParams:L})}}if(m.optional){const K=_|1<<w,J=w+1;for(let le=m.optional.length-1;le>=0;le--){const se=m.optional[le];d.push({node:se,index:b,skipped:K,depth:J,statics:A,dynamics:R,optionals:O,extract:D,rawParams:j,parsedParams:L})}if(!Q)for(let le=m.optional.length-1;le>=0;le--){const se=m.optional[le],{prefix:ye,suffix:Ce}=se;if(ye||Ce){const Fe=se.caseSensitive?V:q??=V.toLowerCase();if(ye&&!Fe.startsWith(ye)||Ce&&!Fe.endsWith(Ce))continue}d.push({node:se,index:b+1,skipped:_,depth:J,statics:A,dynamics:R,optionals:O+ml(c,b),extract:D,rawParams:j,parsedParams:L})}}if(!Q&&m.dynamic&&V)for(let K=m.dynamic.length-1;K>=0;K--){const J=m.dynamic[K],{prefix:le,suffix:se}=J;if(le||se){const ye=J.caseSensitive?V:q??=V.toLowerCase();if(le&&!ye.startsWith(le)||se&&!ye.endsWith(se))continue}d.push({node:J,index:b+1,skipped:_,depth:w+1,statics:A,dynamics:R+ml(c,b),optionals:O,extract:D,rawParams:j,parsedParams:L})}if(!Q&&m.staticInsensitive){const K=m.staticInsensitive.get(q??=V.toLowerCase());K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+ml(c,b),dynamics:R,optionals:O,extract:D,rawParams:j,parsedParams:L})}if(!Q&&m.static){const K=m.static.get(V);K&&d.push({node:K,index:b+1,skipped:_,depth:w+1,statics:A+ml(c,b),dynamics:R,optionals:O,extract:D,rawParams:j,parsedParams:L})}if(m.pathless){const K=w+1;for(let J=m.pathless.length-1;J>=0;J--){const le=m.pathless[J];d.push({node:le,index:b,skipped:_,depth:K,statics:A,dynamics:R,optionals:O,extract:D,rawParams:j,parsedParams:L})}}}if(g)return g;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=t[b].length;const m=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(m),p}return null}function ml(e,t){return 2**(e-t-1)}function uw(e,t){return e===2**(t-1)-1}function Qm(e,t,s){try{const[a,l]=Tv(e,t,s);s.rawParams=a,s.extract=l;const u=s.node.parse(a);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,u),!0}catch{return null}}function yl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Cr)>(e.node.kind===Cr)||t.node.kind===Cr==(e.node.kind===Cr)&&t.depth>e.depth))):!0}function kl(e){return Ef(e.filter(t=>t!==void 0).join("/"))}function Ef(e){return e.replace(/\/{2,}/g,"/")}function Rv(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function kr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Av(e){return kr(Rv(e))}function zl(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function cw(e,t,s){return zl(e,s)===zl(t,s)}function hw({base:e,to:t,trailingSlash:s="never",cache:a}){const l=t.startsWith("/"),u=!l&&t===".";let c;if(a){c=l?t:u?e:e+"\0"+t;const m=a.get(c);if(m)return m}let d;if(u)d=e.split("/");else if(l)d=t.split("/");else{for(d=e.split("/");d.length>1&&ja(d)==="";)d.pop();const m=t.split("/");for(let b=0,_=m.length;b<_;b++){const w=m[b];w===""?b?b===_-1&&d.push(w):d=[w]:w===".."?d.pop():w==="."||d.push(w)}}d.length>1&&(ja(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));let p,g="";for(let m=0;m<d.length;m++){m>0&&(g+="/");const b=d[m];if(!b)continue;p=Sf(b,0,p);const _=p[0];if(_===0){g+=b;continue}const w=p[5],A=b.substring(0,p[1]),R=b.substring(p[4],w),O=b.substring(p[2],p[3]);_===1?g+=A||R?`${A}{$${O}}${R}`:`$${O}`:_===2?g+=A||R?`${A}{$}${R}`:"$":g+=`${A}{-$${O}}${R}`}g=Ef(g);const y=g||"/";return c&&a&&a.set(c,y),y}function fw(e){const t=new Map(e.map(l=>[encodeURIComponent(l),l])),s=Array.from(t.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(s,"g");return l=>l.replace(a,u=>t.get(u)??u)}function Mh(e,t,s){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(l=>Xm(l,s)).join("/"):Xm(a,s)}function Jm({path:e,params:t,decoder:s,...a}){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 d=0,p,g="";for(;d<c;){const y=d;p=Sf(e,y,p);const m=p[5];if(d=m+1,y===m)continue;const b=p[0];if(b===0){g+="/"+e.substring(y,m);continue}if(b===2){const _=t._splat;u._splat=_,u["*"]=_;const w=e.substring(y,p[1]),A=e.substring(p[4],m);
10if(!_){l=!0,(w||A)&&(g+="/"+w+A);continue}const R=Mh("_splat",t,s);g+="/"+w+R+A;continue}if(b===1){const _=e.substring(p[2],p[3]);!l&&!(_ in t)&&(l=!0),u[_]=t[_];const w=e.substring(y,p[1]),A=e.substring(p[4],m),R=Mh(_,t,s)??"undefined";g+="/"+w+R+A;continue}if(b===3){const _=e.substring(p[2],p[3]),w=t[_];if(w==null)continue;u[_]=w;const A=e.substring(y,p[1]),R=e.substring(p[4],m),O=Mh(_,t,s)??"";g+="/"+A+O+R;continue}}return e.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:l}}function Xm(e,t){const s=encodeURIComponent(e);return t?.(s)??s}function ct(e){return e?.isNotFound===!0}function dw(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var pw="tsr-scroll-restoration-v1_3";function gw(){const e=dw();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");yi(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=Or(a,t)||t},persist:()=>{try{e.setItem(pw,JSON.stringify(t))}catch{}}}}var Zm=gw(),mw=e=>e.state.__TSR_key||e.href;function yw(e){const t=[];let s;for(;s=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${t.reverse().join(" > ")}`.toLowerCase()}var vl=!1,va="window",Wm="data-scroll-restoration-id";function vw(e,t){if(!Zm)return;const s=Zm;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,vl=!1;const a=e.options.getScrollRestorationKey||mw,l=new Map;window.history.scrollRestoration="manual";const u=d=>{if(!(vl||!e.isScrollRestoring))if(d.target===document||d.target===window)l.set(va,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=d.target;l.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},c=d=>{if(!e.isScrollRestoring||!d||l.size===0||!s)return;const p=s.state[d]||={};for(const[g,y]of l){let m;if(g===va)m=va;else if(g.isConnected){const b=g.getAttribute(Wm);m=b?`[${Wm}="${b}"]`:yw(g)}m&&(p[m]=y)}};document.addEventListener("scroll",u,!0),e.subscribe("onBeforeLoad",d=>{c(d.fromLocation?a(d.fromLocation):void 0),l.clear()}),window.addEventListener("pagehide",()=>{c(a(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",d=>{const p=a(d.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}))){vl=!0;try{const m=e.isScrollRestoring?s.state[p]:void 0;let b=!1;if(m)for(const _ in m){const w=m[_];if(!yi(w))continue;const{scrollX:A,scrollY:R}=w;if(!(!Number.isFinite(A)||!Number.isFinite(R))){if(_===va)window.scrollTo({top:R,left:A,behavior:g}),b=!0;else if(_){let O;try{O=document.querySelector(_)}catch{continue}O&&(O.scrollLeft=A,O.scrollTop=R,b=!0)}}}if(!b){const _=e.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const A=document.getElementById(_);A&&A.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:g};if(window.scrollTo(w),y)for(const A of y){if(A===va)continue;const R=typeof A=="function"?A():document.querySelector(A);R&&R.scrollTo(w)}}}}finally{vl=!1}e.isScrollRestoring&&s.set(m=>(m[p]||={},m))}})}function Ov(e,t=String){const s=new URLSearchParams;for(const a in e){const l=e[a];l!==void 0&&s.set(a,t(l))}return s.toString()}function Dh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function bw(e){const t=new URLSearchParams(e),s=Object.create(null);for(const[a,l]of t.entries()){const u=s[a];u==null?s[a]=Dh(l):Array.isArray(u)?u.push(Dh(l)):s[a]=[u,Dh(l)]}return s}var _w=ww(JSON.parse),Sw=Ew(JSON.stringify,JSON.parse);function ww(e){return t=>{t[0]==="?"&&(t=t.substring(1));const s=bw(t);for(const a in s){const l=s[a];if(typeof l=="string")try{s[a]=e(l)}catch{}}return s}}function Ew(e,t){const s=typeof t=="function";function a(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(s&&typeof l=="string")try{return t(l),e(l)}catch{}return l}return l=>{const u=Ov(l,a);return u?`?${u}
10`:""}}var cs="__root__";function Tf(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 t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function Mt(e){return e instanceof Response&&!!e.options}function Tw(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Tf(e)}function Rw(e){return{input:({url:t})=>{for(const s of e)t=Zh(s,t);return t},output:({url:t})=>{for(let s=e.length-1;s>=0;s--)t=Cv(e[s],t);return t}}}function Aw(e){const t=Av(e.basepath),s=`/${t}`,a=`${s}/`,l=e.caseSensitive?s:s.toLowerCase(),u=e.caseSensitive?a:a.toLowerCase();return{input:({url:c})=>{const d=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===l?c.pathname="/":d.startsWith(u)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=kl(["/",t,c.pathname]),c)}}function Zh(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Cv(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Ow(e,t){const{createMutableStore:s,createReadonlyStore:a,batch:l,init:u}=t,c=new Map,d=new Map,p=new Map,g=s(e.status),y=s(e.loadedAt),m=s(e.isLoading),b=s(e.isTransitioning),_=s(e.location),w=s(e.resolvedLocation),A=s(e.statusCode),R=s(e.redirect),O=s([]),D=s([]),j=s([]),L=a(()=>Uh(c,O.get())),Q=a(()=>Uh(d,D.get())),V=a(()=>Uh(p,j.get())),q=a(()=>O.get()[0]),K=a(()=>O.get().some(Y=>c.get(Y)?.get().status==="pending")),J=a(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:g.get()})),le=a(()=>({status:g.get(),loadedAt:y.get(),isLoading:m.get(),isTransitioning:b.get(),matches:L.get(),location:_.get(),resolvedLocation:w.get(),statusCode:A.get(),redirect:R.get()})),se=Da(64);function ye(Y){let oe=se.get(Y);return oe||(oe=a(()=>{const Re=O.get();for(const Oe of Re){const k=c.get(Oe);if(k&&k.routeId===Y)return k.get()}}),se.set(Y,oe)),oe}const Ce={status:g,loadedAt:y,isLoading:m,isTransitioning:b,location:_,resolvedLocation:w,statusCode:A,redirect:R,matchesId:O,pendingIds:D,cachedIds:j,matches:L,pendingMatches:Q,cachedMatches:V,firstId:q,hasPending:K,matchRouteDeps:J,matchStores:c,pendingMatchStores:d,cachedMatchStores:p,__store:le,getRouteMatchStore:ye,setMatches:Fe,setPending:Be,setCached:B};Fe(e.matches),u?.(Ce);function Fe(Y){Nh(Y,c,O,s,l)}function Be(Y){Nh(Y,d,D,s,l)}function B(Y){Nh(Y,p,j,s,l)}return Ce}function Uh(e,t){const s=[];for(const a of t){const l=e.get(a);l&&s.push(l.get())}return s}function Nh(e,t,s,a,l){const u=e.map(d=>d.id),c=new Set(u);l(()=>{for(const d of t.keys())c.has(d)||t.delete(d);for(const d of e){const p=t.get(d.id);if(!p){const g=a(d);g.routeId=d.routeId,t.set(d.id,g);continue}p.routeId=d.routeId,p.get()!==d&&p.set(d)}ZS(s.get(),u)||s.set(u)})}var Wh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Cw=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Wl=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),hs=(e,t,s=!0)=>{const a={...e.router.options.context??{}},l=s?t:t-1;for(let u=0;u<=l;u++){const c=e.matches[u];if(!c)continue;const d=e.router.getMatch(c.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},ey=(e,t)=>{if(!e.matches.length)return;const s=t.routeId,a=e.matches.findIndex(c=>c.routeId===e.router.routeTree.id),l=a>=0?a: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 d=e.matches[c];if(e.router.looseRoutesById[d.routeId].options.notFoundComponent)return c}return s?u:l},xr=(e,t,s)=>{if(!(!Mt(s)&&!ct(s)))throw Mt(s)&&s.redirectHandled&&!s.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=s,e.updateMatch(t.id,a=>
10({...a,status:Mt(s)?"redirected":ct(s)?"notFound":a.status==="pending"?"success":a.status,context:hs(e,t.index),isFetching:!1,error:s})),ct(s)&&!s.routeId&&(s.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Mt(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},xv=(e,t)=>{const s=e.router.getMatch(t);return!!(!s||s._nonReactive.dehydrated)},ty=(e,t,s)=>{const a=hs(e,s);e.updateMatch(t,l=>({...l,context:a}))},ba=(e,t,s,a)=>{const{id:l,routeId:u}=e.matches[t],c=e.router.looseRoutesById[u];if(s instanceof Promise)throw s;s.routerCode=a,e.firstBadMatchIndex??=t,xr(e,e.router.getMatch(l),s);try{c.options.onError?.(s)}catch(d){s=d,xr(e,e.router.getMatch(l),s)}e.updateMatch(l,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Mt(s)&&!ct(s)&&(e.serialError??=s)},kv=(e,t,s,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const l=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Wl(e,t)&&(s.options.loader||s.options.beforeLoad||Mv(s))&&typeof l=="number"&&l!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Wh(e)},l);a._nonReactive.pendingTimeout=u}},xw=(e,t,s)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;kv(e,t,s,a);const l=()=>{const u=e.router.getMatch(t);u.preload&&(u.status==="redirected"||u.status==="notFound")&&xr(e,u,u.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(l):l()},kw=(e,t,s,a)=>{const l=e.router.getMatch(t);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=fs(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:d}=l;c&&ba(e,s,c,"PARSE_PARAMS"),d&&ba(e,s,d,"VALIDATE_SEARCH"),kv(e,t,a,l);const p=new AbortController;let g=!1;const y=()=>{g||(g=!0,e.updateMatch(t,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},m=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{y(),m()});return}l._nonReactive.beforeLoadPromise=fs();const b={...hs(e,s,!1),...l.__routeContext},{search:_,params:w,cause:A}=l,R=Wl(e,t),O={search:_,abortController:p,params:w,preload:R,context:b,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:R?"preload":A,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},D=L=>{if(L===void 0){e.router.batch(()=>{y(),m()});return}(Mt(L)||ct(L))&&(y(),ba(e,s,L,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(t,Q=>({...Q,__beforeLoadContext:L})),m()})};let j;try{if(j=a.options.beforeLoad(O),Ma(j))return y(),j.catch(L=>{ba(e,s,L,"BEFORE_LOAD")}).then(D)}catch(L){y(),ba(e,s,L,"BEFORE_LOAD")}D(j)},jw=(e,t)=>{const{id:s,routeId:a}=e.matches[t],l=e.router.looseRoutesById[a],u=()=>d(),c=()=>kw(e,s,t,l),d=()=>{if(xv(e,s))return;const p=xw(e,s,l);return Ma(p)?p.then(c):c()};return u()},Mw=(e,t,s)=>{const a=e.router.getMatch(t);if(!a||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([s.options.head?.(l),s.options.scripts?.(l),s.options.headers?.(l)]).then(([u,c,d])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:d,scripts:c,styles:u?.styles}))},jv=(e,t,s,a,l)=>{const u=t[a-1],{params:c,loaderDeps:d,abortController:p,cause:g}=e.router.getMatch(s),y=hs(e,a),m=Wl(e,s);return{params:c,deps:d,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}},ny=async(e,t,s,a,l)=>{try{const u=e.router.getMatch(s);try{(!(wv??e.router.isServer)||u.ssr===!0)&&Ua(l);const c=l.options.loader,d=typeof c=="function"?c:c?.handler,p=d?.(jv(e,t,s,a,l)),g=!!d&&Ma(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"})),d){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:hs(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.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:hs(e,a)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,ct(c)&&await l.options.notFoundComponent?.preload?.(),xr(e,e.router.getMatch(s),c);try{l.options.onError?.(c)}catch(g){d=g,xr(e,e.router.getMatch(s),g)}!Mt(d)&&!ct(d)&&await Ua(l,["errorComponent"]),e.updateMatch(s,g=>
10({...g,error:d,context:hs(e,a),status:"error",isFetching:!1}))}}catch(u){const c=e.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),xr(e,c,u)}},Dw=async(e,t,s)=>{async function a(_,w,A,R,O){const D=Date.now()-w.updatedAt,j=_?O.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:O.options.staleTime??e.router.options.defaultStaleTime??0,L=O.options.shouldReload,Q=typeof L=="function"?L(jv(e,t,l,s,O)):L,{status:V,invalid:q}=R,K=D>=j&&(!!e.forceStaleReload||R.cause==="enter"||A!==void 0&&A!==R.id);c=V==="success"&&(q||(Q??K)),_&&O.options.preload===!1||(c&&!e.sync&&y?(d=!0,(async()=>{try{await ny(e,t,l,s,O);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 ny(e,t,l,s,O):ty(e,l,s))}const{id:l,routeId:u}=e.matches[s];let c=!1,d=!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(xv(e,l)){if(!e.router.getMatch(l))return e.matches[s];ty(e,l,s)}else{const _=e.router.getMatch(l),w=e.router.stores.matchesId.get()[s],A=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===u?w:e.router.stores.matches.get().find(O=>O.routeId===u)?.id,R=Wl(e,l);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const O=e.router.getMatch(l),D=O._nonReactive.error||O.error;D&&xr(e,O,D),O.status==="pending"&&await a(R,_,A,O,p)}else{const O=R&&!e.router.stores.matchStores.has(l),D=e.router.getMatch(l);D._nonReactive.loaderPromise=fs(),O!==D.preload&&e.updateMatch(l,j=>({...j,preload:O})),await a(R,_,A,D,p)}}const m=e.router.getMatch(l);d||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,d||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const b=d?m.isFetching:!1;return b!==m.isFetching||m.invalid!==!1?(e.updateMatch(l,_=>({..._,isFetching:b,invalid:!1})),e.router.getMatch(l)):m};async function ry(e){const t=e,s=[];Cw(t.router)&&Wh(t);let a;for(let b=0;b<t.matches.length;b++){try{const _=jw(t,b);Ma(_)&&await _}catch(_){if(Mt(_))throw _;if(ct(_))a=_;else if(!t.preload)throw _;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const l=t.firstBadMatchIndex??t.matches.length,u=a&&!t.preload?ey(t,a):void 0,c=a&&t.preload?0:u!==void 0?Math.min(u+1,l):l;let d,p;for(let b=0;b<c;b++)s.push(Dw(t,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const w=_.reason;if(Mt(w))throw w;ct(w)?d??=w:p??=w}if(p!==void 0)throw p}const g=d??(a&&!t.preload?a:void 0);let y=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!g&&a&&t.preload)return t.matches;if(g){const b=ey(t,g);b===void 0&&Dt();const _=t.matches[b],w=t.router.looseRoutesById[_.routeId],A=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&A&&(w.options.notFoundComponent=A),g.routeId=_.routeId;const R=_.routeId===t.router.routeTree.id;t.updateMatch(_.id,O=>({...O,...R?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),y=b,await Ua(w,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Ua(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:_,routeId:w}=t.matches[b],A=t.router.looseRoutesById[w];try{const R=Mw(t,_,A);if(R){const O=await R;t.updateMatch(_,D=>({...D,...O}))}}catch(R){console.error(`Error executing head for route ${w}:`,R)}}const m=Wh(t);if(Ma(m)&&await m,g)throw g;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function sy(e,t){const s=t.map(a=>
10e.options[a]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function Ua(e,t=jl){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:l,...u}=a.options;Object.assign(e.options,u),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const s=()=>e._componentsLoaded?void 0:t===jl?(()=>{if(e._componentsPromise===void 0){const a=sy(e,jl);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():sy(e,t);return e._lazyPromise?e._lazyPromise.then(s):s()}function Mv(e){for(const t of jl)if(e.options[t]?.preload)return!0;return!1}var jl=["component","errorComponent","pendingComponent","notFoundComponent"],jr="__TSR_index",iy="popstate",ay="beforeunload";function Uw(e){let t=e.getLocation();const s=new Set,a=c=>{t=e.getLocation(),s.forEach(d=>d({location:t,action:c}))},l=c=>{e.notifyOnIndexChange??!0?a(c):t=e.getLocation()},u=async({task:c,navigateOpts:d,...p})=>{if(d?.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=Pl(p.path,p.state);if(await m.blockerFn({currentLocation:t,nextLocation:b,action:p.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,d,p)=>{const g=t.state[jr];d=oy(g+1,d),u({task:()=>{e.pushState(c,d),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:d})},replace:(c,d,p)=>{const g=t.state[jr];d=oy(g,d),u({task:()=>{e.replaceState(c,d),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:d})},go:(c,d)=>{u({task:()=>{e.go(c),l({type:"GO",index:c})},navigateOpts:d,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:()=>t.state[jr]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,c]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function oy(e,t){t||(t={});const s=Rf();return{...t,key:s,__TSR_key:s,[jr]:e}}function Nw(e){const t=typeof document<"u"?window:void 0,s=t.history.pushState,a=t.history.replaceState;let l=[];const u=()=>l,c=K=>l=K,d=(K=>K),p=(()=>Pl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const K=Rf();t.history.replaceState({[jr]:0,key:K,__TSR_key:K},"")}let g=p(),y,m=!1,b=!1,_=!1,w=!1;const A=()=>g;let R,O;const D=()=>{R&&(q._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),q._ignoreSubscribers=!1,R=void 0,O=void 0,y=void 0)},j=(K,J,le)=>{const se=d(J);O||(y=g),g=Pl(J,le),R={href:se,state:le,isPush:R?.isPush||K==="push"},O||(O=Promise.resolve().then(()=>D()))},L=K=>{g=p(),q.notify({type:K})},Q=async()=>{if(b){b=!1;return}const K=p(),J=K.state[jr]-g.state[jr],le=J===1,se=J===-1,ye=!le&&!se||m;m=!1;const Ce=ye?"GO":se?"BACK":"FORWARD",Fe=ye?{type:"GO",index:J}:{type:se?"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,t.history.go(1),q.notify(Fe);return}}}g=p(),q.notify(Fe)},V=K=>{if(w){w=!1;return}let J=!1;const le=u();if(typeof document<"u"&&le.length)for(const se of le){const ye=se.enableBeforeUnload??!0;if(ye===!0){J=!0;break}if(typeof ye=="function"&&ye()===!0){J=!0;break}}if(J)return K.preventDefault(),K.returnValue=""},q=Uw({getLocation:A,getLength:()=>t.history.length,pushState:(K,J)=>j("push",K,J),replaceState:(K,J)=>j("replace",K,J),back:K=>(K&&(_=!0),w=!0,t.history.back()),forward:K=>{K&&(_=!0),w=!0,t.history.forward()},go:K=>{m=!0,t.history.go(K)},createHref:K=>d(K),flush:D,destroy:()=>{t.history.pushState=s,t.history.replaceState=a,t.removeEventListener(ay,V,{capture:!0}),t.removeEventListener(iy,Q)},onBlocked:()=>{y&&g!==y&&(g=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(ay,V,{capture:!0}),t.addEventListener(iy,Q),t.history.pushState=function(...K){const J=s.apply(t.history,K);return q._ignoreSubscribers||L("PUSH"),J},t.history.replaceState=function(...K){const J=a.apply(t.history,K);return q._ignoreSubscribers||L("REPLACE"),J},q}function Lw(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Pl(e,t){const s=Lw(e),a=s.indexOf("#"),l=s.indexOf("?"),u=Rf();return{href:s,pathname:s.substring(0,a>0?l>0?Math.min(a,l):a:l>0?l:s.length),hash:a>-1?s.substring(a):"",search:l>-1?s.slice(l,a===-1?void 0:a):"",state:t||{[jr]:0,key:u,__TSR_key:u}}}function Rf(){return(Math.random()+1).toString(36).substring(7)}function zw(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function fi(e,t){const s=t,a=e;return{fromLocation:s,toLocation:a,pathChanged:s?.pathname!==a.pathname,hrefChanged:s?.href!==a.href,hashChanged:s?.hash!==a.hash}}var Pw=class{constructor(e,t){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 a=this.options,l=this.basepath??a?.basepath??"/",u=this.basepath===void 0,c=a?.rewrite;if(this.options={...a,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=fw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Nw()),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=Da(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=Ow(Hw(this.latestLocation),y),vw(this)}let d=!1;const p=this.options.basepath??"/",g=this.options.rewrite;if(u||l!==p||c!==g){this.basepath=p;const y=[],m=Av(p);m&&m!=="/"&&y.push(Aw({basepath:p})),g&&y.push(g),this.rewrite=y.length===0?void 0:y.length===1?y[0]:Rw(y),this.history&&this.updateLatestLocation(),d=!0}d&&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=iw(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&ew(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,a)=>{const l={eventType:s,fn:a};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=s=>
10{this.subscribers.forEach(a=>{a.eventType===s.type&&a.fn(s)})},this.parseLocation=(s,a)=>{const l=({pathname:p,search:g,hash:y,href:m,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const O=this.options.parseSearch(g),D=this.options.stringifySearch(O);return{href:p+D+y,publicHref:p+D+y,pathname:ya(p).path,external:!1,searchStr:D,search:ts(a?.search,O),hash:ya(y.slice(1)).path,state:is(a?.state,b)}}const _=new URL(m,this.origin),w=Zh(this.rewrite,_),A=this.options.parseSearch(w.search),R=this.options.stringifySearch(A);return w.search=R,{href:w.href.replace(w.origin,""),publicHref:m,pathname:ya(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:R,search:ts(a?.search,A),hash:ya(w.hash.slice(1)).path,state:is(a?.state,b)}},u=l(s),{__tempLocation:c,__tempKey:d}=u.state;if(c&&(!d||d===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,a)=>hw({base:s,to:Ef(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,a,l)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:a},l):this.matchRoutesInternal(s,a),this.getMatchedRoutes=s=>qw({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const a=this.getMatch(s);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._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 a=this.stores.matchStores.get(s)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const a=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(c);u.from;const p=u.unsafeRelative==="path"?c.pathname:u.from??d.fullPath,g=this.resolvePathWithBase(p,"."),y=d.search,m=Object.assign(Object.create(null),d.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,Or(u.params,m)),w=this.getMatchedRoutes(b);let A=w.matchedRoutes;if((!w.foundRoute||w.foundRoute.path!=="/"&&w.routeParams["**"])&&this.options.notFoundRoute&&(A=[...A,this.options.notFoundRoute]),Object.keys(_).length>0)for(const le of A){const se=le.options.params?.stringify??le.options.stringifyParams;if(se)try{Object.assign(_,se(_))}catch{}}const R=s.leaveParams?b:ya(Jm({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=y;if(s._includeValidateSearch&&this.options.search?.strict){const le={};A.forEach(se=>{if(se.options.validateSearch)try{Object.assign(le,Ml(se.options.validateSearch,{...le,...O}))}catch{}}),O=le}O=Iw({search:O,dest:u,destRoutes:A,_includeValidateSearch:s._includeValidateSearch}),O=ts(y,O);const D=this.options.stringifySearch(O),j=u.hash===!0?c.hash:u.hash?Or(u.hash,c.hash):void 0,L=j?`#${j}`:"";let Q=u.state===!0?c.state:u.state?Or(u.state,c.state):{};Q=is(c.state,Q);const V=`${R}${D}${L}`;let q,K,J=!1;if(this.rewrite){const le=new URL(V,this.origin),se=Cv(this.rewrite,le);q=le.href.replace(le.origin,""),se.origin!==this.origin?(K=se.href,J=!0):K=se.pathname+se.search+se.hash}else q=XS(V),K=q;return{publicHref:K,href:q,pathname:R,search:O,searchStr:D,state:Q,hash:j??"",external:J,unmaskOnReload:u.unmaskOnReload}},l=(u={},c)=>{const d=a(u);let p=c?a(c):void 0;if(!p){const g=Object.create(null);if(this.options.routeMasks){const y=tw(d.pathname,this.processedTree);if(y){Object.assign(g,y.rawParams);const{from:m,params:b,..._}=y.route,w=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,Or(b,g));c={from:s.from,..._,params:w},p=a(c)}}}return p&&(d.maskedLocation=p),d};return s.mask?l(s,{from:s.from,...s.mask}):l(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:a,...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=kr(this.latestLocation.href)===kr(l.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=fs(()=>{d?.resolve(),d=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:a})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:a,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,href:d,...p}={})=>
10{if(d){const m=this.history.location.state.__TSR_index,b=Pl(d,{__TSR_index:s?m:m+1}),_=new URL(b.pathname,this.origin);p.to=Zh(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:a,hashScrollIntoView:l,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:s,reloadDocument:a,href:l,publicHref:u,...c})=>{let d=!1;if(l)try{new URL(`${l}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(s!==void 0||!l){const g=this.buildLocation({to:s,...c});l=l??g.publicHref,u=u??g.publicHref}const p=!d&&u?u:l;if(Ll(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),a=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(a)})},this.load=async s=>{let a,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=fi(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await ry({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,w=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),R=A.length,O=this.stores.matches.get();m=R?O.filter(L=>!this.stores.pendingMatchStores.has(L.id)):null;const D=new Set;for(const L of this.stores.pendingMatchStores.values())L.routeId&&D.add(L.routeId);const j=new Set;for(const L of this.stores.matchStores.values())L.routeId&&j.add(L.routeId);b=R?O.filter(L=>!D.has(L.routeId)):null,_=R?A.filter(L=>!j.has(L.routeId)):null,w=R?A.filter(L=>j.has(L.routeId)):O,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),R&&(this.stores.setMatches(A),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[A,R]of[[b,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(A)for(const O of A)this.looseRoutesById[O.routeId].options[R]?.(O)})})}})}catch(g){Mt(g)?(a=g,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):ct(g)&&(l=g);const y=a?a.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(a)})}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 d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(p=>p.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=s=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof a.types=="function"?a.types(fi(u,c)):a.types;if(d===!1){s();return}l={update:s,types:d}}else l=s;document.startViewTransition(l)}else s()},this.updateMatch=(s,a)=>{this.startTransition(()=>
10{const l=this.stores.pendingMatchStores.get(s);if(l){l.set(a);return}const u=this.stores.matchStores.get(s);if(u){u.set(a);return}const c=this.stores.cachedMatchStores.get(s);if(c){const d=a(c.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(g=>g!==s)):c.set(d)}})},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 a=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(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const a=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(a)try{const l=new URL(a);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&&Ll(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 a=s?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!a(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),a=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:a})},this.loadRouteChunk=Ua,this.preloadRoute=async s=>{const a=s._builtLocation??this.buildLocation(s);let l=this.matchRoutes(a,{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()]),d=l.filter(p=>!c.has(p.id));if(d.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...d])}try{return l=await ry({router:this,matches:l,location:a,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:a});ct(p)||console.error(p);return}},this.matchRoute=(s,a)=>{const l={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},u=this.buildLocation(l);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const c=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=nw(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!d||s.params&&!jt(d.rawParams,s.params,{partial:!0})?!1:a?.includeSearch??!0?jt(c.search,u.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Sw,parseSearch:e.parseSearch??_w,protocolAllowlist:e.protocolAllowlist??FS}),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:t,processedTree:s}){this.routesById=e,this.routesByPath=t,this.processedTree=s;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const s=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParam
10s:l,parsedParams:u}=s;let{matchedRoutes:c}=s,d=!1;(a?a.path!=="/"&&l["**"]:kr(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const p=d?Gw(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 w,A,R;{const Ce=_?.search??e.search,Fe=_?._strictSearch??void 0;try{const Be=Ml(b.options.validateSearch,{...Ce})??void 0;w={...Ce,...Be},A={...Fe,...Be},R=void 0}catch(Be){let B=Be;if(Be instanceof Bl||(B=new Bl(Be.message,{cause:Be})),t?.throwOnError)throw B;w=Ce,A={},R=B}}const O=b.options.loaderDeps?.({search:w})??"",D=O?JSON.stringify(O):"",{interpolatedPath:j,usedParams:L}=Jm({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),Q=b.id+j+D,V=this.getMatch(Q),q=y.get(b.id),K=V?._strictParams??L;let J;if(!V)try{ly(b,L,u,K)}catch(Ce){if(ct(Ce)||Mt(Ce)?J=Ce:J=new Bw(Ce.message,{cause:Ce}),t?.throwOnError)throw J}Object.assign(l,K);const le=q?"stay":"enter";let se;if(V)se={...V,cause:le,params:q?.params??l,_strictParams:K,search:ts(q?q.search:V.search,w),_strictSearch:A};else{const Ce=b.options.loader||b.options.beforeLoad||b.lazyFn||Mv(b)?"pending":"success";se={id:Q,ssr:b.options.ssr,index:m,routeId:b.id,params:q?.params??l,_strictParams:K,pathname:j,updatedAt:Date.now(),search:q?ts(q.search,w):w,_strictSearch:A,searchError:void 0,status:Ce,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:fs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:q?is(q.loaderDeps,O):O,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t?.preload||(se.globalNotFound=p===b.id),se.searchError=R;const ye=this.getParentContext(_);se.context={...ye,...se.__routeContext,...se.__beforeLoadContext},g[m]=se}for(let m=0;m<g.length;m++){const b=g[m],_=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),A=y.get(b.routeId);if(b.params=A?ts(A.params,l):l,!w){const R=g[m-1],O=this.getParentContext(R);if(_.options.context){const D={deps:b.loaderDeps,params:b.params,context:O??{},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(D)??void 0}b.context={...O,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:s,parsedParams:a}=this.getMatchedRoutes(e.pathname),l=ja(t),u={...e.search};for(const y of t)try{Object.assign(u,Ml(y.options.validateSearch,u))}catch{}const c=ja(this.stores.matchesId.get()),d=c&&this.stores.matchStores.get(c)?.get(),p=d&&d.routeId===l.id&&d.pathname===e.pathname;let g;if(p)g=d.params;else{const y=Object.assign(Object.create(null),s);for(const m of t)try{ly(m,s,a??{},y)}catch{}g=y}return{matchedRoutes:t,fullPath:l.fullPath,search:u,params:g}}},Bl=class extends Error{},Bw=class extends Error{};function Hw(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ml(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new Bl("Async validation not supported");if(s.issues)throw new Bl(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function qw({pathname:e,routesById:t,processedTree:s}){const a=Object.create(null),l=kr(e);let u,c;const d=rw(l,s,!0);return d&&(u=d.route,Object.assign(a,d.rawParams),c=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[t.__root__],routeParams:a,foundRoute:u,parsedParams:c}}function Iw({search:e,dest:t,destRoutes:s,_includeValidateSearch:a}){return $w(s)(e,t,a??!1)}function $w(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)l.options.search?.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:d})=>{let p=c;
10"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((y,m)=>m(y),c));const g=d(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,m)=>m(y),g):g};t.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:d})=>{const p=d(c);if(!t._includeValidateSearch)return p;try{return{...p,...Ml(l.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(u)}}const s=({search:l})=>{const u=t.dest;return u.search?u.search===!0?l:Or(u.search,l):{}};t.middlewares.push(s);const a=(l,u,c)=>{if(l>=c.length)return u;const d=c[l];return d({search:u,next:g=>a(l+1,g,c)})};return function(u,c,d){return t.dest=c,t._includeValidateSearch=d,a(0,u,t.middlewares)}}function Gw(e,t){if(e!=="root")for(let s=t.length-1;s>=0;s--){const a=t[s];if(a.children)return a.id}return cs}function ly(e,t,s,a){const l=e.options.params?.parse??e.options.parseParams;if(l)if(e.options.skipRouteOnParseError)for(const u in t)u in s&&(a[u]=s[u]);else{const u=l(a);Object.assign(a,u)}}var bn=Symbol.for("TSR_DEFERRED_PROMISE");function Vw(e,t){const s=e;return s[bn]||(s[bn]={status:"pending"},s.then(a=>{s[bn].status="success",s[bn].data=a}).catch(a=>{s[bn].status="error",s[bn].error={data:zw(a),__isServerError:!0}})),s}var Kw="Error preloading route! âï¸";function uy(e,t){if(e)return typeof e=="string"?e:e[t]}function Fw(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Yw(e){if(e.tag!=="link")return;const t=e.attrs?.rel,s=e.attrs?.href;if(typeof s=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return s}function Qw(e,t){const s=Yw(t);return!!s&&e?.inlineCss?.styles[s]!==void 0}var Dv=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=t=>{this.originalIndex=t.originalIndex;const s=this.options,a=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=cs:this.parentRoute||Dt();let l=a?cs:s?.path;l&&l!=="/"&&(l=Rv(l));const u=s?.id||l;let c=a?cs:kl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),c!=="__root__"&&(c=kl(["/",c]));const d=c==="__root__"?"/":kl([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=d,this._to=kr(d)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Tf({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Jw=class extends Dv{constructor(e){super(e)}};function Xw(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),s=t.state.__hashScrollIntoViewOptions??!0;if(s&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(s)}}}var Zw=(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))(Zw||{}),Yn=Symbol.asyncIterator,Uv=Symbol.hasInstance,di=Symbol.isConcatSpreadable,Qn=Symbol.iterator,Nv=Symbol.match,Lv=Symbol.matchAll,zv=Symbol.replace,Pv=Symbol.search,Bv=Symbol.species,Hv=Symbol.split,qv=Symbol.toPrimitive,pi=Symbol.toStringTag,Iv=Symbol.unscopables,$v={[Yn]:0,[Uv]:1,[di]:2,[Qn]:3,[Nv]:4,[Lv]:5,[zv]:6,[Pv]:7,[Bv]:8,[Hv]:9,[qv]:10,[pi]:11,[Iv]:12},Ww={0:Yn,1:Uv,2:di,3:Qn,4:Nv,5:Lv,6:zv,7:Pv,8:Bv,9:Hv,10:qv,11:pi,12:Iv},E=void 0,eE={2:!0,3:!1,1:E,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,t,s,a,l,u,c,d,p,g,y,m){return{t:e,i:t,s,c:a,m:l,p:u,e:c,a:d,f:p,b:g,o:y,l:m}}function Mr(e){return Te(2,E,e,E,E,E,E,E,E,E,E,E)}var Gv=Mr(2),Vv=Mr(3),rE=Mr(1),sE=Mr(0),iE=Mr(4),aE=Mr(5),oE=Mr(6),lE=Mr(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 E}}function Dr(e){let t="",s=0,a;for(let l=0,u=e.length;l<u;l++)a=uE(e[l]),a&&(t+=e.slice(s,l)+a,s=l+1);return s===0?t=e:t+=e.slice(s),t}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 Ur(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,cE)}var bl="__SEROVAL_REFS__",Kv=new Map,ci=new Map;function Fv(e){return Kv.has(e)}function hE(e){return ci.has(e)}function fE(e){if(Fv(e))return Kv.get(e);throw new $E(e)}function dE(e){if(hE(e))return ci.get(e);throw new GE(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,bl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,bl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,bl,{value:ci,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,bl,{value:ci,configurable:!0,writable:!1,enumerable:!1});function Af(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 t=tE[Af(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Yv(e,t){let s=pE(e),a=Object.getOwnPropertyNames(e);for(let l=0,u=a.length,c;
12l<u;l++)c=a[l],c!=="name"&&c!=="message"&&(c==="stack"?t&4&&(s=s||{},s[c]=e[c]):(s=s||{},s[c]=e[c]));return s}function Qv(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 aE;case Number.NEGATIVE_INFINITY:return oE}return e!==e?lE:Object.is(e,-0)?iE:Te(0,E,e,E,E,E,E,E,E,E,E,E)}function Jv(e){return Te(1,E,Dr(e),E,E,E,E,E,E,E,E,E)}function mE(e){return Te(3,E,""+e,E,E,E,E,E,E,E,E,E)}function yE(e){return Te(4,e,E,E,E,E,E,E,E,E,E,E)}function vE(e,t){let s=t.valueOf();return Te(5,e,s!==s?"":t.toISOString(),E,E,E,E,E,E,E,E,E)}function bE(e,t){return Te(6,e,E,Dr(t.source),t.flags,E,E,E,E,E,E,E)}function _E(e,t){return Te(17,e,$v[t],E,E,E,E,E,E,E,E,E)}function SE(e,t){return Te(18,e,Dr(fE(t)),E,E,E,E,E,E,E,E,E)}function wE(e,t,s){return Te(25,e,s,Dr(t),E,E,E,E,E,E,E,E)}function EE(e,t,s){return Te(9,e,E,E,E,E,E,s,E,E,Qv(t),E)}function TE(e,t){return Te(21,e,E,E,E,E,E,E,t,E,E,E)}function RE(e,t,s){return Te(15,e,E,t.constructor.name,E,E,E,E,s,t.byteOffset,E,t.length)}function AE(e,t,s){return Te(16,e,E,t.constructor.name,E,E,E,E,s,t.byteOffset,E,t.byteLength)}function OE(e,t,s){return Te(20,e,E,E,E,E,E,E,s,t.byteOffset,E,t.byteLength)}function CE(e,t,s){return Te(13,e,Af(t),E,Dr(t.message),s,E,E,E,E,E,E)}function xE(e,t,s){return Te(14,e,Af(t),E,Dr(t.message),s,E,E,E,E,E,E)}function kE(e,t){return Te(7,e,E,E,E,E,E,t,E,E,E,E)}function jE(e,t){return Te(28,E,E,E,E,E,E,[e,t],E,E,E,E)}function ME(e,t){return Te(30,E,E,E,E,E,E,[e,t],E,E,E,E)}function DE(e,t,s){return Te(31,e,E,E,E,E,E,s,t,E,E,E)}function UE(e,t){return Te(32,e,E,E,E,E,E,E,t,E,E,E)}function NE(e,t){return Te(33,e,E,E,E,E,E,E,t,E,E,E)}function LE(e,t){return Te(34,e,E,E,E,E,E,E,t,E,E,E)}function zE(e,t,s,a){return Te(35,e,s,E,E,E,E,t,E,E,E,a)}var PE={parsing:1,serialization:2,deserialization:3};function BE(e){return`Seroval Error (step: ${PE[e]})`}var HE=(e,t)=>BE(e),Xv=class extends Error{constructor(e,t){super(HE(e)),this.cause=t}},cy=class extends Xv{constructor(e){super("parsing",e)}},qE=class extends Xv{constructor(e){super("deserialization",e)}};function Jn(e){return`Seroval Error (specific: ${e})`}var eu=class extends Error{constructor(t){super(Jn(1)),this.value=t}},Zv=class extends Error{constructor(t){super(Jn(2))}},IE=class extends Error{constructor(e){super(Jn(3))}},Ka=class extends Error{constructor(e){super(Jn(4))}},$E=class extends Error{constructor(e){super(Jn(5)),this.value=e}},GE=class extends Error{constructor(e){super(Jn(6))}},VE=class extends Error{constructor(e){super(Jn(7))}},Nr=class extends Error{constructor(e){super(Jn(8))}},KE=class extends Error{constructor(t){super(Jn(9))}},FE=class{constructor(e,t){this.value=e,this.replacement=t}},tu=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,s)=>{e.s=t,e.f=s}),e},YE=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},QE=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};tu.toString();YE.toString();QE.toString();var JE=()=>{let e=[],t=[],s=!0,a=!1,l=0,u=(p,g,y)=>{for(y=0;y<l;y++)t[y]&&t[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[a?"return":"throw"](m):p.next(m)},d=(p,g)=>(s&&(g=l++,t[g]=p),c(p),()=>{s&&(t[g]=t[l],t[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>d(p),next:p=>{s&&(e.push(p),u(p,"next"))},throw:p=>{s&&(e.push(p),u(p,"throw"),s=!1,a=!1,t.length=0)},return:p=>{s&&(e.push(p),u(p,"return"),s=!1,a=!0,t.length=0)}}},XE=e=>t=>()=>{let s=0,a={[e]:()=>a,next:()=>{if(s>t.d)return{done:!0,value:void 0};let l=s++,u=t.v[l];if(l===t.t)throw u;return{done:l===t.d,value:u}}};return a},ZE=(e,t)=>s=>()=>{let a=0,l=-1,u=!1,c=[],d=[],p=(y=0,m=d.length)=>{for(;y<m;y++)d[y].s({done:!0,value:void 0})};s.on({next:y=>{let m=d.shift();m&&m.s({done:!1,value:y}),c.push(y)},throw:y=>{let m=d.shift();m&&m.f(y),p(),l=c.length,u=!0,c.push(y)},return:y=>{let m=d.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=a++;if(b>=c.length){let _=t();return d.push(_),_.p}return{done:!1,value:c[b]}}if(a>l)return{done:!0,value:void 0};let y=a++,m=c[y];if(y!==l)return{done:!1,value:m};if(u)throw m;return{done:!0,value:m}}};return g},Wv=e=>{let t=atob(e),s=t.length,a=new Uint8Array(s);for(let l=0;l<s;l++)a[l]=t.charCodeAt(l);return a.buffer};Wv.toString();
12function WE(e){return"__SEROVAL_SEQUENCE__"in e}function e0(e,t,s){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:s}}function eT(e){let t=[],s=-1,a=-1,l=e[Qn]();for(;;)try{let u=l.next();if(t.push(u.value),u.done){a=t.length-1;break}}catch(u){s=t.length,t.push(u)}return e0(t,s,a)}var tT=XE(Qn);function nT(e){return tT(e)}var rT={},sT={},iT={0:{},1:{},2:{},3:{},4:{},5:{}};function nu(e){return"__SEROVAL_STREAM__"in e}function ds(){return JE()}function aT(e){let t=ds(),s=e[Yn]();async function a(){try{let l=await s.next();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}var oT=ZE(Yn,tu);function lT(e){return oT(e)}async function uT(e){try{return[1,await e]}catch(t){return[0,t]}}function cT(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function Dl(e,t){e.marked.add(t)}function hT(e,t){let s=e.refs.size;return e.refs.set(t,s),s}function ru(e,t){let s=e.refs.get(t);return s!=null?(Dl(e,s),{type:1,value:yE(s)}):{type:0,value:hT(e,t)}}function Of(e,t){let s=ru(e,t);return s.type===1?s:Fv(t)?{type:2,value:SE(s.value,t)}:s}function os(e,t){let s=Of(e,t);if(s.type!==0)return s.value;if(t in $v)return _E(s.value,t);throw new eu(t)}function su(e,t){let s=ru(e,iT[t]);return s.type===1?s.value:Te(26,s.value,t,E,E,E,E,E,E,E,E,E)}function fT(e){let t=ru(e,rT);return t.type===1?t.value:Te(27,t.value,E,E,E,E,E,E,os(e,Qn),E,E,E)}function dT(e){let t=ru(e,sT);return t.type===1?t.value:Te(29,t.value,E,E,E,E,E,[su(e,1),os(e,Yn)],E,E,E,E)}function pT(e,t,s,a){return Te(s?11:10,e,E,E,E,a,E,E,E,E,Qv(t),E)}function gT(e,t,s,a){return Te(8,t,E,E,E,E,{k:s,v:a},E,su(e,0),E,E,E)}
12function mT(e,t,s){let a=new Uint8Array(s),l="";for(let u=0,c=a.length;u<c;u++)l+=String.fromCharCode(a[u]);return Te(19,t,Dr(btoa(l)),E,E,E,E,E,su(e,5),E,E,E)}function yT(e,t){return{base:cT(e,t),child:void 0}}var vT=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return it(this._p,this.depth,e)}};async function bT(e,t,s){let a=[];for(let l=0,u=s.length;l<u;l++)l in s?a[l]=await it(e,t,s[l]):a[l]=0;return a}async function _T(e,t,s,a){return EE(s,a,await bT(e,t,a))}async function Cf(e,t,s){let a=Object.entries(s),l=[],u=[];for(let c=0,d=a.length;c<d;c++)l.push(Dr(a[c][0])),u.push(await it(e,t,a[c][1]));return Qn in s&&(l.push(os(e.base,Qn)),u.push(jE(fT(e.base),await it(e,t,eT(s))))),Yn in s&&(l.push(os(e.base,Yn)),u.push(ME(dT(e.base),await it(e,t,aT(s))))),pi in s&&(l.push(os(e.base,pi)),u.push(Jv(s[pi]))),di in s&&(l.push(os(e.base,di)),u.push(s[di]?Gv:Vv)),{k:l,v:u}}async function Lh(e,t,s,a,l){return pT(s,a,l,await Cf(e,t,a))}async function ST(e,t,s,a){return TE(s,await it(e,t,a.valueOf()))}async function wT(e,t,s,a){return RE(s,a,await it(e,t,a.buffer))}async function ET(e,t,s,a){return AE(s,a,await it(e,t,a.buffer))}async function TT(e,t,s,a){return OE(s,a,await it(e,t,a.buffer))}async function hy(e,t,s,a){let l=Yv(a,e.base.features);return CE(s,a,l?await Cf(e,t,l):E)}async function RT(e,t,s,a){let l=Yv(a,e.base.features);return xE(s,a,l?await Cf(e,t,l):E)}async function AT(e,t,s,a){let l=[],u=[];for(let[c,d]of a.entries())l.push(await it(e,t,c)),u.push(await it(e,t,d));return gT(e.base,s,l,u)}async function OT(e,t,s,a){let l=[];for(let u of a.keys())l.push(await it(e,t,u));return kE(s,l)}async function t0(e,t,s,a){let l=e.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){let d=l[u];if(d.parse.async&&d.test(a))return wE(s,d.tag,await d.parse.async(a,new vT(e,t),{id:s}))}return E}async function CT(e,t,s,a){let[l,u]=await uT(a);return Te(12,s,l,E,E,E,E,E,await it(e,t,u),E,E,E)}function xT(e,t,s,a,l){let u=[],c=s.on({next:d=>{Dl(this.base,t),it(this,e,d).then(p=>{u.push(UE(t,p))},p=>{l(p),c()})},throw:d=>{Dl(this.base,t),it(this,e,d).then(p=>{u.push(NE(t,p)),a(u),c()},p=>{l(p),c()})},return:d=>{Dl(this.base,t),it(this,e,d).then(p=>{u.push(LE(t,p)),a(u),c()},p=>{l(p),c()})}})}async function kT(e,t,s,a){return DE(s,su(e.base,4),await new Promise(xT.bind(e,t,s,a)))}async function jT(e,t,s,a){let l=[];for(let u=0,c=a.v.length;u<c;u++)l[u]=await it(e,t,a.v[u]);return zE(s,l,a.t,a.d)}async function MT(e,t,s,a){if(Array.isArray(a))return _T(e,t,s,a);if(nu(a))return kT(e,t,s,a);if(WE(a))return jT(e,t,s,a);let l=a.constructor;if(l===FE)return it(e,t,a.replacement);let u=await t0(e,t,s,a);if(u)return u;switch(l){case Object:return Lh(e,t,s,a,!1);case E:return Lh(e,t,s,a,!0);case Date:return vE(s,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return hy(e,t,s,a);case Number:case Boolean:case String:case BigInt:return ST(e,t,s,a);case ArrayBuffer:return mT(e.base,s,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return wT(e,t,s,a);case DataView:return TT(e,t,s,a);case Map:return AT(e,t,s,a);case Set:return OT(e,t,s,a)}if(l===Promise||a instanceof Promise)return CT(e,t,s,a);let c=e.base.features;if(c&32&&l===RegExp)return bE(s,a);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return ET(e,t,s,a)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return RT(e,t,s,a);if(a instanceof Error)return hy(e,t,s,a);if(Qn in a||Yn in a)return Lh(e,t,s,a,!!l);throw new eu(a)}async function DT(e,t,s){let a=Of(e.base,s);if(a.type!==0)return a.value;let l=await t0(e,t,a.value,s);if(l)return l;throw new eu(s)}async function it(e,t,s){switch(typeof s){case"boolean":return s?Gv:Vv;case"undefined":return rE;case"string":return Jv(s);case"number":return gE(s);case"bigint":return mE(s);case"object":{if(s){let a=Of(e.base,s);return a.type===0?await MT(e,t+1,a.value,s):a.value}return sE}case"symbol":return os(e.base,s);case"function":return DT(e,t,s);default:throw new eu(s)}}async function UT(e,t){try{return await it(e,0,t)}catch(s){throw s instanceof cy?s:new cy(s)}}var NT=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(NT||{});function n0(e,t){for(let s=0,a=t.length;s<a;s++){let l=t[s];e.has(l)||(e.add(l),l.extends&&n0(e,l.extends))}}function r0(e){if(e){let t=new Set;return n0(t,e),[...t]}}function LT(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 s0(e,t){switch(t){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,t){var s;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(s=t.features)!=null?s:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||HT}}
12function IT(e){return{mode:2,base:qT(2,e),child:E}}var $T=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Le(this._p,this.depth,e)}};function i0(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Nr({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function GT(e,t,s){return i0(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,s),s}function VT(e,t,s){return i0(e.base,t),e.base.refs.set(t,s),s}function at(e,t,s){return e.mode===1?GT(e,t,s):VT(e,t,s)}function ef(e,t,s){if(Object.hasOwn(t,s))return t[s];throw new Nr(e)}function KT(e,t){return at(e,t.i,dE(Ur(t.s)))}function FT(e,t,s){let a=s.a,l=a.length,u=at(e,s.i,new Array(l));for(let c=0,d;c<l;c++)d=a[c],d&&(u[c]=Le(e,t,d));return s0(u,s.o),u}function YT(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 di:case pi:case Qn:return!0;default:return!1}}function fy(e,t,s){YT(t)?e[t]=s:Object.defineProperty(e,t,{value:s,configurable:!0,enumerable:!0,writable:!0})}function JT(e,t,s,a,l){if(typeof a=="string")fy(s,Ur(a),Le(e,t,l));else{let u=Le(e,t,a);switch(typeof u){case"string":fy(s,u,Le(e,t,l));break;case"symbol":QT(u)&&(s[u]=Le(e,t,l));break;default:throw new Nr(a)}}}function a0(e,t,s,a){let l=s.k;if(l.length>0)for(let u=0,c=s.v,d=l.length;u<d;u++)JT(e,t,a,l[u],c[u]);return a}function XT(e,t,s){let a=at(e,s.i,s.t===10?{}:Object.create(null));return a0(e,t,s.p,a),s0(a,s.o),a}function ZT(e,t){return at(e,t.i,new Date(t.s))}function WT(e,t){if(e.base.features&32){let s=Ur(t.c);if(s.length>BT)throw new Nr(t);return at(e,t.i,new RegExp(s,t.m))}throw new Zv(t)}function eR(e,t,s){let a=at(e,s.i,new Set);for(let l=0,u=s.a,c=u.length;l<c;l++)a.add(Le(e,t,u[l]));return a}function tR(e,t,s){let a=at(e,s.i,new Map);for(let l=0,u=s.e.k,c=s.e.v,d=u.length;l<d;l++)a.set(Le(e,t,u[l]),Le(e,t,c[l]));return a}function nR(e,t){if(t.s.length>zT)throw new Nr(t);return at(e,t.i,Wv(Ur(t.s)))}function rR(e,t,s){var a;let l=LT(s.c),u=Le(e,t,s.f),c=(a=s.b)!=null?a:0;if(c<0||c>u.byteLength)throw new Nr(s);return at(e,s.i,new l(u,c,s.l))}function sR(e,t,s){var a;let l=Le(e,t,s.f),u=(a=s.b)!=null?a:0;if(u<0||u>l.byteLength)throw new Nr(s);return at(e,s.i,new DataView(l,u,s.l))}function o0(e,t,s,a){if(s.p){let l=a0(e,t,s.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function iR(e,t,s){let a=at(e,s.i,new AggregateError([],Ur(s.m)));return o0(e,t,s,a)}function aR(e,t,s){let a=ef(s,nE,s.s),l=at(e,s.i,new a(Ur(s.m)));return o0(e,t,s,l)}function oR(e,t,s){let a=tu(),l=at(e,s.i,a.p),u=Le(e,t,s.f);return s.s?a.s(u):a.f(u),l}function lR(e,t,s){return at(e,s.i,Object(Le(e,t,s.f)))}function uR(e,t,s){let a=e.base.plugins;if(a){let l=Ur(s.c);for(let u=0,c=a.length;u<c;u++){let d=a[u];if(d.tag===l)return at(e,s.i,d.deserialize(s.s,new $T(e,t),{id:s.i}))}}throw new IE(s.c)}function cR(e,t){return at(e,t.i,at(e,t.s,tu()).p)}function hR(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.s(Le(e,t,s.a[1])),E;throw new Ka("Promise")}function fR(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.f(Le(e,t,s.a[1])),E;throw new Ka("Promise")}function dR(e,t,s){Le(e,t,s.a[0]);let a=Le(e,t,s.a[1]);return nT(a)}function pR(e,t,s){Le(e,t,s.a[0]);let a=Le(e,t,s.a[1]);return lT(a)}function gR(e,t,s){let a=at(e,s.i,ds()),l=s.a,u=l.length;if(u)for(let c=0;c<u;c++)Le(e,t,l[c]);return a}function mR(e,t,s){let a=e.base.refs.get(s.i);if(a&&nu(a))return a.next(Le(e,t,s.f)),E;throw new Ka("Stream")}function yR(e,t,s){let a=e.base.refs.get(s.i);if(a&&nu(a))return a.throw(Le(e,t,s.f)),E;throw new Ka("Stream")}function vR(e,t,s){let a=e.base.refs.get(s.i);if(a&&nu(a))return a.return(Le(e,t,s.f)),E;throw new Ka("Stream")}function bR(e,t,s){return Le(e,t,s.f),E}function _R(e,t,s){return Le(e,t,s.a[1]),E}function SR(e,t,s){let a=at(e,s.i,e0([],s.s,s.l));for(let l=0,u=s.a.length;l<u;l++)a.v[l]=Le(e,t,s.a[l]);return a}function Le(e,t,s){if(t>e.base.depthLimit)throw new KE(e.base.depthLimit);switch(t+=1,s.t){case 2:return ef(s,eE,s.s);case 0:return Number(s.s);case 1:return Ur(String(s.s));case 3:if(String(s.s).length>PT)throw new Nr(s);return BigInt(s.s);case 4:return e.base.refs.get(s.i);case 18:return KT(e,s);case 9:return FT(e,t,s);case 10:case 11:return XT(e,t,s);case 5:return ZT(e,s);case 6:return WT(e,s);case 7:return eR(e,t,s);case 8:return tR(e,t,s);
12case 19:return nR(e,s);case 16:case 15:return rR(e,t,s);case 20:return sR(e,t,s);case 14:return iR(e,t,s);case 13:return aR(e,t,s);case 12:return oR(e,t,s);case 17:return ef(s,Ww,s.s);case 21:return lR(e,t,s);case 25:return uR(e,t,s);case 22:return cR(e,s);case 23:return hR(e,t,s);case 24:return fR(e,t,s);case 28:return dR(e,t,s);case 30:return pR(e,t,s);case 31:return gR(e,t,s);case 32:return mR(e,t,s);case 33:return yR(e,t,s);case 34:return vR(e,t,s);case 27:return bR(e,t,s);case 29:return _R(e,t,s);case 35:return SR(e,t,s);default:throw new Zv(s)}}function wR(e,t){try{return Le(e,0,t)}catch(s){throw new qE(s)}}var ER=()=>T;ER.toString();function dy(e,t){let s=r0(t.plugins),a=IT({plugins:s,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return wR(a,e)}async function TR(e,t={}){let s=r0(t.plugins),a=yT(1,{plugins:s,disabledFeatures:t.disabledFeatures});return{t:await UT(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function RR(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,s,a){return{v:s.parse(e.toSerializable(t))}},async async(t,s,a){return{v:await s.parse(e.toSerializable(t))}},stream(t,s,a){return{v:s.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,s,a){return e.fromSerializable(s.deserialize(t.v))}}}var AR=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Hl=globalThis.Buffer,l0=!!Hl&&typeof Hl.from=="function";function u0(e){if(e.length===0)return"";if(l0)return Hl.from(e).toString("base64");const t=32768,s=[];for(let a=0;a<e.length;a+=t){const l=e.subarray(a,a+t);s.push(String.fromCharCode.apply(null,l))}return btoa(s.join(""))}function c0(e){if(e.length===0)return new Uint8Array(0);if(l0){const a=Hl.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),s=new Uint8Array(t.length);for(let a=0;a<t.length;a++)s[a]=t.charCodeAt(a);return s}var _a=Object.create(null),Sa=Object.create(null),OR=e=>new ReadableStream({start(t){e.on({next(s){try{t.enqueue(c0(s))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),CR=new TextEncoder,xR=e=>new ReadableStream({start(t){e.on({next(s){try{typeof s=="string"?t.enqueue(CR.encode(s)):t.enqueue(c0(s.$b64))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),kR="(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;i++)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 py(e){const t=ds(),s=e.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await s.read();if(a){t.return(void 0);break}t.next(u0(l))}}catch(a){t.throw(a)}finally{s.releaseLock()}})(),t}function gy(e){const t=ds(),s=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:u}=await s.read();if(l){try{const c=a.decode();c.length>0&&t.next(c)}catch{}t.return(void 0);break}try{const c=a.decode(u,{stream:!0});c.length>0&&t.next(c)}catch{t.next({$b64:u0(u)})}}}catch(l){t.throw(l)}finally{s.releaseLock()}})(),t}var MR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===_a},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return kR},deserialize(e,t,s){return _a}},{tag:"tss/RawStreamFactoryText",test(e){return e===Sa},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return jR},deserialize(e,t,s){return Sa}}],test(e){return e instanceof AR},parse:{sync(e,t,s){const a=e.hint==="text"?Sa:_a;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(ds())}},async async(e,t,s){const a=e.hint==="text"?Sa:_a,l=e.hint==="text"?gy(e.stream):py(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(l)}},stream(e,t,s){const a=e.hint==="text"?Sa:_a,l=e.hint==="text"?gy(e.stream):py(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(l)}}}
12,serialize(e,t,s){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,s){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?xR(a):OR(a)}};function DR(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,s,a){return e(typeof s?.deserialize=="function"?s.deserialize(t.streamId):t.streamId)}}}var UR={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},Tr={},h0=e=>new ReadableStream({start:t=>{e.on({next:s=>{try{t.enqueue(s)}catch{}},throw:s=>{t.error(s)},return:()=>{try{t.close()}catch{}}})}}),NR={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Tr},parse:{sync(){return Tr},async async(){return await Promise.resolve(Tr)},stream(){return Tr}},serialize(){return h0.toString()},deserialize(){return Tr}};function my(e){let t=ds(),s=e.getReader();async function a(){try{let l=await s.read();l.done?t.return(l.value):(t.next(l.value),await a())}catch(l){t.throw(l)}}return a().catch(()=>{}),t}var LR={tag:"seroval/plugins/web/ReadableStream",extends:[NR],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Tr),stream:t.parse(ds())}},async async(e,t){return{factory:await t.parse(Tr),stream:await t.parse(my(e))}},stream(e,t){return{factory:t.parse(Tr),stream:t.parse(my(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let s=t.deserialize(e.stream);return h0(s)}},zR=LR,PR=[UR,MR,zR];function BR(){return[...Sv()?.serializationAdapters?.map(RR)??[],...PR]}var yy=new TextDecoder,HR=new Uint8Array(0),vy=16*1024*1024,by=32*1024*1024,_y=1024,Sy=1e5;function qR(e){const t=new Map,s=new Map,a=new Set;let l=!1,u=null,c=0,d;const p=new ReadableStream({start(m){d=m},cancel(){l=!0;try{u?.cancel()}catch{}t.forEach(m=>{try{m.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),s.clear(),a.clear()}});function g(m){const b=s.get(m);if(b)return b;if(a.has(m))return new ReadableStream({start(w){w.close()}});if(s.size>=_y)throw new Error(`Too many raw streams in framed response (max ${_y})`);const _=new ReadableStream({start(w){t.set(m,w)},cancel(){a.add(m),t.delete(m),s.delete(m)}});return s.set(m,_),_}function y(m){return g(m),t.get(m)}return(async()=>{const m=e.getReader();u=m;const b=[];let _=0;function w(){if(_<9)return null;const R=b[0];if(R.length>=9)return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0};const O=new Uint8Array(9);let D=0,j=9;for(let L=0;L<b.length&&j>0;L++){const Q=b[L],V=Math.min(Q.length,j);O.set(Q.subarray(0,V),D),D+=V,j-=V}return{type:O[0],streamId:(O[1]<<24|O[2]<<16|O[3]<<8|O[4])>>>0,length:(O[5]<<24|O[6]<<16|O[7]<<8|O[8])>>>0}}function A(R){if(R===0)return HR;const O=new Uint8Array(R);let D=0,j=R;for(;j>0&&b.length>0;){const L=b[0];if(!L)break;const Q=Math.min(L.length,j);O.set(L.subarray(0,Q),D),D+=Q,j-=Q,Q===L.length?b.shift():b[0]=L.subarray(Q)}return _-=R,O}try{for(;;){const{done:R,value:O}=await m.read();if(l||R)break;if(O){if(_+O.length>by)throw new Error(`Framed response buffer exceeded ${by} bytes`);for(b.push(O),_+=O.length;;){const D=w();if(!D)break;const{type:j,streamId:L,length:Q}=D;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(Q>vy)throw new Error(`Frame payload too large: ${Q} bytes (max ${vy})`);const V=9+Q;if(_<V)break;if(++c>Sy)throw new Error(`Too many frames in framed response (max ${Sy})`);A(9);const q=A(Q);switch(j){case $n.JSON:try{d.enqueue(yy.decode(q))}catch{}break;case $n.CHUNK:{const K=y(L);K&&K.enqueue(q);break}case $n.END:{const K=y(L);if(a.add(L),K){try{K.close()}catch{}t.delete(L)}break}case $n.ERROR:{const K=y(L);if(a.add(L),K){const J=yy.decode(q);K.error(new Error(J)),t.delete(L)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}t.forEach(R=>{try{R.close()}catch{}}),t.clear()}catch(R){try{d.error(R)}catch{}t.forEach(O=>{try{O.error(R)}catch{}}),t.clear()}finally{try{m.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:p}}var Na=null;async function tf(e){e.length>0&&await Promise.allSettled(e)}var IR=Object.prototype.hasOwnProperty;
12function f0(e){for(const t in e)if(IR.call(e,t))return!0;return!1}async function $R(e,t,s){Na||(Na=BR());const a=t[0],l=a.fetch??s,u=a.data instanceof FormData?"formData":"payload",c=a.headers?new Headers(a.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${PS}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await d0(a);if(p!==void 0){const g=Ov({payload:p});e.includes("?")?e+=`&${g}`:e+=`?${g}`}}let d;if(a.method==="POST"){const p=await GR(a);p?.contentType&&c.set("content-type",p.contentType),d=p?.body}return await VR(async()=>l(e,{method:a.method,headers:c,signal:a.signal,body:d}))}async function d0(e){let t=!1;const s={};if(e.data!==void 0&&(t=!0,s.data=e.data),e.context&&f0(e.context)&&(t=!0,s.context=e.context),t)return p0(s)}async function p0(e){return JSON.stringify(await Promise.resolve(TR(e,{plugins:Na})))}async function GR(e){if(e.data instanceof FormData){let s;return e.context&&f0(e.context)&&(s=await p0(e.context)),s!==void 0&&e.data.set(zS,s),{body:e.data}}const t=await d0(e);if(t)return{body:t,contentType:"application/json"}}async function VR(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const s=t.headers.get("content-type");if(s||Dt(),t.headers.get("x-tss-serialized")){let a;if(s.includes("application/x-tss-framed")){if(qS(s),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:l,jsonChunks:u}=qR(t.body),c=[DR(l),...Na||[]],d=new Map;a=await KR({jsonStream:u,onMessage:p=>dy(p,{refs:d,plugins:c}),onError(p,g){console.error(p,g)}})}else if(s.includes("application/json")){const l=await t.json(),u=[];a=dy(l,{plugins:Na}),await tf(u)}if(a||Dt(),a instanceof Error)throw a;return a}if(s.includes("application/json")){const a=await t.json(),l=Tw(a);if(l)throw l;if(ct(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function KR({jsonStream:e,onMessage:t,onError:s}){const a=e.getReader(),{value:l,done:u}=await a.read();if(u||!l)throw new Error("Stream ended before first object");const c=JSON.parse(l);let d=!1;const p=(async()=>{try{for(;;){const{value:m,done:b}=await a.read();if(b)break;
12if(m)try{const _=[];try{t(JSON.parse(m))}finally{}await tf(_)}catch(_){s?.(`Invalid JSON: ${m}`,_)}}}catch(m){d||s?.("Stream processing error:",m)}})();let g;const y=[];try{g=t(c)}catch(m){throw d=!0,a.cancel().catch(()=>{}),m}return await tf(y),Promise.resolve(g).catch(()=>{d=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),g}function FR(e){const t="/_serverFn/"+e;return Object.assign((...l)=>{const u=Sv()?.serverFns?.fetch;return $R(t,l,u??fetch)},{url:t,serverFnMeta:{id:e},[Xh]:!0})}var YR={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Xh in e)?!1:!!e[Xh],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>FR(e)};function wy(e){return e.replaceAll("\0","/").replaceAll("�","/")}function QR(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function JR(e){window.$_TSR||Dt();const t=e.options.serializationAdapters;if(t?.length){const R=new Map;t.forEach(O=>{R.set(O.key,O.fromSerializable)}),window.$_TSR.t=R,window.$_TSR.buffer.forEach(O=>O())}window.$_TSR.initialized=!0,window.$_TSR.router||Dt();const s=window.$_TSR.router;s.matches.forEach(R=>{R.i=wy(R.i)}),s.lastMatchId&&(s.lastMatchId=wy(s.lastMatchId));const{manifest:a,dehydratedData:l,lastMatchId:u}=s;e.ssr={manifest:a};const c=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:c};const d=e.matchRoutes(e.stores.location.get()),p=Promise.all(d.map(R=>e.loadRouteChunk(e.looseRoutesById[R.routeId])));function g(R){const O=e.looseRoutesById[R.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(O){const D=fs();R._nonReactive.minPendingPromise=D,R._forcePending=!0,setTimeout(()=>{D.resolve(),e.updateMatch(R.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},O)}}function y(R){const O=e.looseRoutesById[R.routeId];O&&(O.options.ssr=R.ssr)}let m;d.forEach(R=>{const O=s.matches.find(D=>D.i===R.id);if(!O){R._nonReactive.dehydrated=!1,R.ssr=!1,y(R);return}QR(R,O),y(R),R._nonReactive.dehydrated=R.ssr!==!1,(R.ssr==="data-only"||R.ssr===!1)&&m===void 0&&(m=R.index,g(R))}),e.stores.setMatches(d),await e.options.hydrate?.(l);const b=e.stores.matches.get(),_=e.stores.location.get();await Promise.all(b.map(async R=>{try{const O=e.looseRoutesById[R.routeId],D=b[R.index-1]?.context??e.options.context;if(O.options.context){const V={deps:R.loaderDeps,params:R.params,context:D??{},location:_,navigate:q=>e.navigate({...q,_fromLocation:_}),buildLocation:e.buildLocation,cause:R.cause,abortController:R.abortController,preload:!1,matches:d,routeId:O.id};
12R.__routeContext=O.options.context(V)??void 0}R.context={...D,...R.__routeContext,...R.__beforeLoadContext};const j={ssr:e.options.ssr,matches:b,match:R,params:R.params,loaderData:R.loaderData},L=await O.options.head?.(j),Q=await O.options.scripts?.(j);R.meta=L?.meta,R.links=L?.links,R.headScripts=L?.scripts,R.styles=L?.styles,R.scripts=Q}catch(O){if(ct(O))R.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${R.routeId}`,O);else throw R.error=O,console.error(`Error during hydration for route ${R.routeId}:`,O),O}}));const w=d[d.length-1].id!==u;if(!d.some(R=>R.ssr===!1)&&!w)return d.forEach(R=>{R._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const A=Promise.resolve().then(()=>e.load()).catch(R=>{console.error("Error during router hydration:",R)});if(w){const R=d[1];R||Dt(),g(R),R._displayPending=!0,R._nonReactive.displayPendingPromise=A,A.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(R.id,O=>({...O,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var ql=re.use,Ta=typeof window<"u"?re.useLayoutEffect:re.useEffect;function zh(e){const t=re.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function XR(e,t,s={},a={}){re.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{t(u)},s);return l.observe(e.current),()=>{l.disconnect()}},[t,s,a.disabled,e])}function ZR(e){const t=re.useRef(null);return re.useImperativeHandle(e,()=>t.current,[]),t}function WR({promise:e}){if(ql)return ql(e);const t=Vw(e);if(t[bn].status==="pending")throw t;if(t[bn].status==="error")throw t[bn].error;return t[bn].data}function eA(e){const t=F.jsx(tA,{...e});return e.fallback?F.jsx(re.Suspense,{fallback:e.fallback,children:t}):t}function tA(e){const t=WR(e);return e.children(t)}function xf(e){const t=e.errorComponent??kf;return F.jsx(nA,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:a})=>s?re.createElement(t,{error:s,reset:a}):e.children})}var nA=class extends re.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const s=e.getResetKey();return t.error&&t.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function kf({error:e}){const[t,s]=re.useState(!1);return F.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[F.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[F.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),F.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(a=>!a),children:t?"Hide Error":"Show Error"})]}),F.jsx("div",{style:{height:".25rem"}}),t?F.jsx("div",{children:F.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?F.jsx("code",{children:e.message}):null})}):null]})}function rA({children:e,fallback:t=null}){return jf()?F.jsx(mi.Fragment,{children:e}):F.jsx(mi.Fragment,{children:t})}function jf(){return mi.useSyncExternalStore(sA,()=>!0,()=>!1)}function sA(){return()=>{}}var g0=re.createContext(null);function yt(e){return re.useContext(g0)}var iu=re.createContext(void 0),iA=re.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 aA({update:e,notify:t,unwatched:s}){return{link:a,unlink:l,propagate:u,checkDirty:c,shallowPropagate:d};function a(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 w=g.subsTail;if(w!==void 0&&w.version===m&&w.sub===y)return;const A=y.depsTail=g.subsTail={version:m,dep:g,sub:y,prevDep:b,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=A),b!==void 0?b.nextDep=A:y.deps=A,w!==void 0?w.nextSub=A:g.subs=A}function l(g,y=g.sub){const m=g.dep,b=g.prevDep,_=g.nextDep,w=g.nextSub,A=g.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,w!==void 0?w.prevSub=A:m.subsTail=A,A!==void 0?A.nextSub=w:(m.subs=w)===void 0&&s(m),_}function u(g){let y=g.nextSub,m;
12e: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&&t(b),_&1){const w=b.subs;if(w!==void 0){const A=(g=w).nextSub;A!==void 0&&(m={value:y,prev:m},y=A);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 w=g.dep,A=w.flags;if(y.flags&16)_=!0;else if((A&17)===17){if(e(w)){const R=w.subs;R.nextSub!==void 0&&d(R),_=!0}}else if((A&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(m={value:g,prev:m}),g=w.deps,y=w,++b;continue}if(!_){const R=g.nextDep;if(R!==void 0){g=R;continue}}for(;b--;){const R=y.subs,O=R.nextSub!==void 0;if(O?(g=m.value,m=m.prev):g=R,_){if(e(y)){O&&d(R),y=g.sub;continue}_=!1}else y.flags&=-33;y=g.sub;const D=g.nextDep;if(D!==void 0){g=D;continue e}}return _}while(!0)}function d(g){do{const y=g.sub,m=y.flags;(m&48)===32&&(y.flags=m|16,(m&6)===2&&t(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,t,s){const a=typeof e=="object",l=a?e:void 0;return{next:(a?e.next:e)?.bind(l),error:(a?e.error:t)?.bind(l),complete:(a?e.complete:s)?.bind(l)}}const nf=[];let Ul=0;const{link:Ey,unlink:lA,propagate:uA,checkDirty:m0,shallowPropagate:Ty}=aA({update(e){return e._update()},notify(e){nf[rf++]=e,e.flags&=~$e.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=$e.Mutable|$e.Dirty,Il(e))}});let _l=0,rf=0,yn,sf=0;function y0(e){try{++sf,e()}finally{--sf||v0()}}function Il(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=lA(s,e)}function v0(){if(!(sf>0)){for(;_l<rf;){const e=nf[_l];nf[_l++]=void 0,e.notify()}_l=0,rf=0}}function Ry(e,t){const s=typeof e=="function",a=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 yn!==void 0&&Ey(l,yn,Ul),l._snapshot},subscribe(u){const c=oA(u),d={current:!1},p=cA(()=>{l.get(),d.current?c.next?.(l._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=yn,d=t?.compare??Object.is;if(s)yn=l,++Ul,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?a(p):u;return p===void 0||!d(p,g)?(l._snapshot=g,!0):!1}finally{yn=c,s&&(l.flags&=~$e.RecursedCheck),Il(l)}}};return s?(l.flags=$e.Mutable|$e.Dirty,l.get=function(){const u=l.flags;if(u&$e.Dirty||u&$e.Pending&&m0(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&Ty(c)}}else u&$e.Pending&&(l.flags=u&~$e.Pending);return yn!==void 0&&Ey(l,yn,Ul),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(uA(c),Ty(c),v0())}},l}function cA(e){const t=()=>{const a=yn;yn=s,++Ul,s.depsTail=void 0,s.flags=$e.Watching|$e.RecursedCheck;try{return e()}finally{yn=a,s.flags&=~$e.RecursedCheck,Il(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:$e.Watching|$e.RecursedCheck,notify(){const a=this.flags;a&$e.Dirty||a&$e.Pending&&m0(this.deps,this)?t():this.flags=$e.Watching},stop(){this.flags=$e.None,this.depsTail=void 0,Il(this)}};return t(),s}var Ph={exports:{}},Bh={},Hh={exports:{}},qh={};var Ay;function hA(){if(Ay)return qh;Ay=1;var e=Va();function t(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var s=typeof Object.is=="function"?Object.is:t,a=e.useState,l=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(m,b){var _=b(),w=a({inst:{value:_,getSnapshot:b}}),A=w[0].inst,R=w[1];return u(function(){A.value=_,A.getSnapshot=b,p(A)&&R({inst:A})},[m,_,b]),l(function(){return p(A)&&R({inst:A}),m(function(){p(A)&&R({inst:A})})},[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:d;return qh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,qh}var Oy;function fA(){return Oy||(Oy=1,Hh.exports=hA()),Hh.exports}var Cy;function dA(){if(Cy)return Bh;Cy=1;var e=Va(),t=fA();function s(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var a=typeof Object.is=="function"?Object.is:s,l=t.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;return Bh.useSyncExternalStoreWithSelector=function(g,y,m,b,_){var w=u(null);if(w.current===null){var A={hasValue:!1,value:null};w.current=A}else A=w.current;
12w=d(function(){function O(V){if(!D){if(D=!0,j=V,V=b(V),_!==void 0&&A.hasValue){var q=A.value;if(_(q,V))return L=q}return L=V}if(q=L,a(j,V))return q;var K=b(V);return _!==void 0&&_(q,K)?(j=V,q):(j=V,L=K)}var D=!1,j,L,Q=m===void 0?null:m;return[function(){return O(y())},Q===null?void 0:function(){return O(Q())}]},[y,m,b,_]);var R=l(g,w[0],w[1]);return c(function(){A.hasValue=!0,A.value=R},[R]),p(R),R},Bh}var xy;function pA(){return xy||(xy=1,Ph.exports=dA()),Ph.exports}var gA=pA();function mA(e,t){return e===t}function rt(e,t,s=mA){const a=re.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(c);return d},[e]),l=re.useCallback(()=>e?.get(),[e]);return gA.useSyncExternalStoreWithSelector(a,l,l,t,s)}var yA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ps(e){const t=yt(),s=re.useContext(e.from?iA:iu),a=e.from??s,l=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,u=re.useRef(void 0);return rt(l??yA,c=>{if((e.shouldThrow??!0)&&!c&&Dt(),c===void 0)return;const d=e.select?e.select(c):c;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=is(u.current,d);return u.current=p,p}return d})}function b0(e){return ps({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function _0(e){const{select:t,...s}=e;return ps({...s,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function S0(e){return ps({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const s=e.strict===!1?t.params:t._strictParams;return e.select?e.select(s):s}})}function w0(e){return ps({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function E0(e){const t=yt();return re.useCallback(s=>t.navigate({...s,from:s.from??e?.from}),[e?.from,t])}function T0(e){return ps({...e,select:t=>e.select?e.select(t.context):t.context})}var vA=_v();function bA(e,t){const s=yt(),a=ZR(t),{activeProps:l,inactiveProps:u,activeOptions:c,to:d,preload:p,preloadDelay:g,preloadIntentProximity:y,hashScrollIntoView:m,replace:b,startTransition:_,resetScroll:w,viewTransition:A,children:R,target:O,disabled:D,style:j,className:L,onClick:Q,onBlur:V,onFocus:q,onMouseEnter:K,onMouseLeave:J,onTouchStart:le,ignoreBlocker:se,params:ye,search:Ce,hash:Fe,state:Be,mask:B,reloadDocument:Y,unsafeRelative:oe,from:Re,_fromLocation:Oe,...k}=e,$=jf(),X=re.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=rt(s.stores.location,ze=>ze,(ze,ht)=>ze.href===ht.href),ie=re.useMemo(()=>{const ze={_fromLocation:W,...X};return s.buildLocation(ze)},[s,W,X]),pe=ie.maskedLocation?ie.maskedLocation.publicHref:ie.publicHref,Se=ie.maskedLocation?ie.maskedLocation.external:ie.external,Ye=re.useMemo(()=>RA(pe,Se,s.history,D),[D,Se,pe,s.history]),Ue=re.useMemo(()=>{if(Ye?.external)return Ll(Ye.href,s.protocolAllowlist)?void 0:Ye.href;if(!AA(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),Ll(d,s.protocolAllowlist)?void 0:d}catch{}},[d,Ye,s.protocolAllowlist]),wn=re.useMemo(()=>{if(Ue)return!1;if(c?.exact){if(!cw(W.pathname,ie.pathname,s.basepath))return!1}else{const ze=zl(W.pathname,s.basepath),ht=zl(ie.pathname,s.basepath);if(!(ze.startsWith(ht)&&(ze.length===ht.length||ze[ht.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,Ue,$,ie.hash,ie.pathname,ie.search,s.basepath]),En=wn?Or(l,{})??_A:Ih,Xn=wn?Ih:Or(u,{})??Ih,_i=[L,En.className,Xn.className].filter(Boolean).join(" "),hn=(j||En.style||Xn.style)&&{...j,...En.style,...Xn.style},[Si,gs]=re.useState(!1),Xa=re.useRef(!1),Tn=e.reloadDocument||Ue?!1:p??s.options.defaultPreload,Lr=g??s.options.defaultPreloadDelay??0,tn=re.useCallback(()=>{s.preloadRoute({...X,_builtLocation:ie}).catch(ze=>{console.warn(ze),console.warn(Kw)})},[s,X,ie]);XR(a,re.useCallback(ze=>{ze?.isIntersecting&&tn()},[tn]),TA,{disabled:!!D||Tn!=="viewport"}),re.useEffect(()=>{Xa.current||!D&&Tn==="render"&&(tn(),Xa.current=!0)},[D,tn,Tn]);const wi=ze=>{const ht=ze.currentTarget.getAttribute("target"),fn=O!==void 0?O:ht;if(!D&&!OA(ze)&&!ze.defaultPrevented&&(!fn||fn==="_self")&&ze.button===0){ze.preventDefault(),vA.flushSync(()=>{gs(!0)});const ms=s.subscribe("onResolved",()=>{ms(),gs(!1)});s.navigate({...X,replace:b,resetScroll:w,hashScrollIntoView:m,startTransition:_,viewTransition:A,ignoreBlocker:se})}};if(Ue)return{...k,ref:a,href:Ue,...R&&{children:R},...O&&{target:O},...D&&{disabled:D},...j&&{style:j},...L&&{className:L},...Q&&{onClick:Q},...V&&{onBlur:V},...q&&{onFocus:q},...K&&{onMouseEnter:K},...J&&{onMouseLeave:J},...le&&{onTouchStart:le}};const Za=ze=>{if(D||Tn!=="intent")return;if(!Lr){tn();return}const ht=ze.currentTarget;if(wa.has(ht))return;const fn=setTimeout(()=>{wa.delete(ht),tn()},Lr);wa.set(ht,fn)},hu=ze=>{D||Tn!=="intent"||tn()},vt=ze=>{if(D||!Tn||!Lr)return;const ht=ze.currentTarget,fn=wa.get(ht);fn&&(clearTimeout(fn),wa.delete(ht))};return{...k,...En,...Xn,href:Ye?.href,ref:a,onClick:ti([Q,wi]),onBlur:ti([V,vt]),onFocus:ti([q,Za]),onMouseEnter:ti([K,Za]),onMouseLeave:ti([J,vt]),onTouchStart:ti([le,hu]),disabled:!!D,target:O,...hn&&{style:hn},..._i&&{className:_i},...D&&SA,...wn&&wA,...$&&Si&&EA}}var Ih={},_A={className:"active"},SA={role:"link","aria-disabled":!0},wA={"data-status":"active","aria-current":"page"},EA={"data-transitioning":"transitioning"},wa=new WeakMap,TA={rootMargin:"100px"},ti=e=>t=>{for(const s of e)if(s){if(t.defaultPrevented)return;s(t)}};function RA(e,t,s,a){if(!a)return t?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function AA(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Mf=re.forwardRef((e,t)=>
12{const{_asChild:s,...a}=e,{type:l,...u}=bA(a,t),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!s){const{disabled:d,...p}=u;return re.createElement("a",p,c)}return re.createElement(s,u,c)});function OA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var CA=class extends Dv{constructor(t){super(t),this.useMatch=s=>ps({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>T0({...s,from:this.id}),this.useSearch=s=>w0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>S0({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>_0({...s,from:this.id}),this.useLoaderData=s=>b0({...s,from:this.id}),this.useNavigate=()=>E0({from:this.fullPath}),this.Link=mi.forwardRef((s,a)=>F.jsx(Mf,{ref:a,from:this.fullPath,...s}))}};function xA(e){return new CA(e)}function kA(){return e=>MA(e)}var jA=class extends Jw{constructor(e){super(e),this.useMatch=t=>ps({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>T0({...t,from:this.id}),this.useSearch=t=>w0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>S0({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>_0({...t,from:this.id}),this.useLoaderData=t=>b0({...t,from:this.id}),this.useNavigate=()=>E0({from:this.fullPath}),this.Link=mi.forwardRef((t,s)=>F.jsx(Mf,{ref:s,from:this.fullPath,...t}))}};function MA(e){return new jA(e)}function Fa(e){return new DA(e,{silent:!0}).createRoute}var DA=class{constructor(e,t){this.path=e,this.createRoute=s=>{const a=xA(s);return a.isRoot=!1,a},this.silent=t?.silent}};function Ya(e,t){let s,a,l,u;const c=()=>(s||(s=e().then(p=>{s=void 0,a=p[t]}).catch(p=>{if(l=p,VS(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),d=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!a)if(ql)ql(c());else throw c();return re.createElement(a,g)};return d.preload=c,d}function UA(e){const t=yt(),s=`not-found-${rt(t.stores.location,a=>a.pathname)}-${rt(t.stores.status,a=>a)}`;return F.jsx(xf,{getResetKey:()=>s,onCatch:(a,l)=>{if(ct(a))e.onCatch?.(a,l);else throw a},errorComponent:({error:a})=>{if(ct(a))return e.fallback?.(a);throw a},children:e.children})}function NA(){return F.jsx("p",{children:"Not Found"})}function ai(e){return F.jsx(F.Fragment,{children:e.children})}function R0(e,t,s){return t.options.notFoundComponent?F.jsx(t.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?F.jsx(e.options.defaultNotFoundComponent,{...s}):F.jsx(NA,{})}function LA(e){return null}function zA(){return LA(yt()),null}var A0=re.memo(function({matchId:t}){const s=yt(),a=s.stores.matchStores.get(t);a||Dt();const l=rt(s.stores.loadedAt,c=>c),u=rt(a,c=>c);return F.jsx(PA,{router:s,matchId:t,resetKey:l,matchState:re.useMemo(()=>{const c=u.routeId,d=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:d}},[u._displayPending,u.routeId,u.ssr,s.routesById])})});function PA({router:e,matchId:t,resetKey:s,matchState:a}){const l=e.routesById[a.routeId],u=l.options.pendingComponent??e.options.defaultPendingComponent,c=u?F.jsx(u,{}):null,d=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=a.ssr===!1||a.ssr==="data-only",m=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||y))?re.Suspense:ai,b=d?xf:ai,_=g?UA:ai;return F.jsxs(l.isRoot?l.options.shellComponent??ai:ai,{children:[F.jsx(iu.Provider,{value:t,children:F.jsx(m,{fallback:c,children:F.jsx(b,{getResetKey:()=>s,errorComponent:d||kf,onCatch:(w,A)=>{if(ct(w))throw w.routeId??=a.routeId,w;p?.(w,A)},children:F.jsx(_,{fallback:w=>{if(w.routeId??=a.routeId,!g||w.routeId&&w.routeId!==a.routeId||!w.routeId&&
12!l.isRoot)throw w;return re.createElement(g,w)},children:y||a._displayPending?F.jsx(rA,{fallback:c,children:F.jsx(ky,{matchId:t})}):F.jsx(ky,{matchId:t})})})})}),a.parentRouteId===cs?F.jsxs(F.Fragment,{children:[F.jsx(BA,{resetKey:s}),e.options.scrollRestoration&&wv?F.jsx(zA,{}):null]}):null]})}function BA({resetKey:e}){const t=yt(),s=re.useRef(void 0);return Ta(()=>{const a=t.latestLocation.href;(s.current===void 0||s.current!==a)&&(t.emit({type:"onRendered",...fi(t.stores.location.get(),t.stores.resolvedLocation.get())}),s.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var ky=re.memo(function({matchId:t}){const s=yt(),a=(y,m)=>s.getMatch(y.id)?._nonReactive[m]??y._nonReactive[m],l=s.stores.matchStores.get(t);l||Dt();const u=rt(l,y=>y),c=u.routeId,d=s.routesById[c],p=re.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=re.useMemo(()=>{const y=d.options.component??s.options.defaultComponent;return y?F.jsx(y,{},p):F.jsx(O0,{})},[p,d.options.component,s.options.defaultComponent]);if(u._displayPending)throw a(u,"displayPendingPromise");if(u._forcePending)throw a(u,"minPendingPromise");if(u.status==="pending"){const y=d.options.pendingMinMs??s.options.defaultPendingMinMs;if(y){const m=s.getMatch(u.id);if(m&&!m._nonReactive.minPendingPromise){const b=fs();m._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),m._nonReactive.minPendingPromise=void 0},y)}}throw a(u,"loadPromise")}if(u.status==="notFound")return ct(u.error)||Dt(),R0(s,d,u.error);if(u.status==="redirected")throw Mt(u.error)||Dt(),a(u,"loadPromise");if(u.status==="error")throw u.error;return g}),O0=re.memo(function(){const t=yt(),s=re.useContext(iu);let a,l=!1,u;{const g=s?t.stores.matchStores.get(s):void 0;[a,l]=rt(g,y=>[y?.routeId,y?.globalNotFound??!1]),u=rt(t.stores.matchesId,y=>y[y.findIndex(m=>m===s)+1])}const c=a?t.routesById[a]:void 0,d=t.options.defaultPendingComponent?F.jsx(t.options.defaultPendingComponent,{}):null;if(l)return c||Dt(),R0(t,c,void 0);if(!u)return null;const p=F.jsx(A0,{matchId:u});return a===cs?F.jsx(re.Suspense,{fallback:d,children:p}):p});function HA(){const e=yt(),t=re.useRef({router:e,mounted:!1}),[s,a]=re.useState(!1),l=rt(e.stores.isLoading,m=>m),u=rt(e.stores.hasPending,m=>m),c=zh(l),d=l||s||u,p=zh(d),g=l||u,y=zh(g);return e.startTransition=m=>{a(!0),re.startTransition(()=>{m(),a(!1)})},re.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 kr(e.latestLocation.publicHref)!==kr(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{m()}},[e,e.history]),Ta(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),Ta(()=>{c&&!l&&e.emit({type:"onLoad",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,l]),Ta(()=>{y&&!g&&e.emit({type:"onBeforeRouteMount",...fi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[g,y,e]),Ta(()=>{if(p&&!d){const m=fi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),y0(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),m.hrefChanged&&Xw(e)}},[d,p,e]),null}function qA(){const e=yt(),t=e.routesById[cs].options.pendingComponent??e.options.defaultPendingComponent,s=t?F.jsx(t,{}):null,a=F.jsxs(typeof document<"u"&&e.ssr?ai:re.Suspense,{fallback:s,children:[F.jsx(HA,{}),F.jsx(IA,{})]});return e.options.InnerWrap?F.jsx(e.options.InnerWrap,{children:a}):a}function IA(){const e=yt(),t=rt(e.stores.firstId,l=>l),s=rt(e.stores.loadedAt,l=>l),a=t?F.jsx(A0,{matchId:t}):null;return F.jsx(iu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:F.jsx(xf,{getResetKey:()=>s,errorComponent:kf,onCatch:void 0,children:a})})}var $A=e=>({createMutableStore:Ry,createReadonlyStore:Ry,batch:y0}),GA=e=>new VA(e),VA=class extends Pw{constructor(e){super(e,$A)}};function KA({router:e,children:t,...s}){Object.keys(s).length>0&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const a=F.jsx(g0.Provider,{value:e,children:t});return e.options.Wrap?F.jsx(e.options.Wrap,{children:a}):a}function FA({router:e,...t}){return F.jsx(KA,{router:e,...t,children:F.jsx(qA,{})})}function C0(e){const{attrs:t,children:s,nonce:a}=e;switch(e.tag){case"title":return F.jsx("title",{...t,suppressHydrationWarning:!0,children:s});case"meta":return F.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return F.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,F.jsx("style",{...t,dangerouslySetInnerHTML:{__html:s},nonce:a});case"script":return F.jsx(YA,{attrs:t,children:s});default:return null}}function YA({attrs:e,children:t}){yt();const s=jf(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(re.useEffect(()=>{if(!a){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,d]of Object.entries(e))c!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&u.setAttribute(c,typeof d=="boolean"?"":String(d));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof t=="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(d=>{if(!(d instanceof HTMLScriptElement))return!1;const p=d.getAttribute("type")??"text/javascript",g=d.getAttribute("nonce")??void 0;return d.textContent===t&&p===l&&g===u}))return;const c=document.createElement("script");
12if(c.textContent=t,e)for(const[d,p]of Object.entries(e))d!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&c.setAttribute(d,typeof p=="boolean"?"":String(p));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[e,t,a]),a&&typeof t=="string")return F.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!s){if(e?.src)return F.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return F.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var QA=e=>{const t=yt(),s=t.options.ssr?.nonce,a=rt(t.stores.matches,g=>g.map(y=>y.meta).filter(Boolean),jt),l=re.useMemo(()=>{const g=[],y={};let m;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let w=_.length-1;w>=0;w--){const A=_[w];if(A)if(A.title)m||(m={tag:"title",children:A.title});else if("script:ld+json"in A)try{const R=JSON.stringify(A["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:JS(R)})}catch{}else{const R=A.name??A.property;if(R){if(y[R])continue;y[R]=!0}g.push({tag:"meta",attrs:{...A,nonce:s}})}}}return m&&g.push(m),s&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),g.reverse(),g},[a,s]),u=rt(t.stores.matches,g=>{const y=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),m=t.ssr?.manifest,b=g.map(_=>m?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?Qw(m,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:uy(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=rt(t.stores.matches,g=>{const y=[];return g.map(m=>t.looseRoutesById[m.routeId]).forEach(m=>t.ssr?.manifest?.routes[m.id]?.preloads?.filter(Boolean).forEach(b=>{const _=Fw(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:uy(e,"modulepreload")??_.crossOrigin,nonce:s}})})),y},jt),d=rt(t.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=rt(t.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 JA([...l,...c,...u,...d,...p],g=>JSON.stringify(g))};function JA(e,t){const s=new Set;return e.filter(a=>{const l=t(a);return s.has(l)?!1:(s.add(l),!0)})}function XA(e){const t=QA(e.assetCrossOrigin),s=yt().options.ssr?.nonce;return F.jsx(F.Fragment,{children:t.map(a=>re.createElement(C0,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:s}))})}var ZA=()=>{const e=yt(),t=e.options.ssr?.nonce,s=u=>{const c=[],d=e.ssr?.manifest;return d?(u.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>d.routes[p.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:t},children:g.children})})),c):[]},a=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:t},children:c})),l=rt(e.stores.matches,s,jt);return WA(e,rt(e.stores.matches,a,jt),l)};function WA(e,t,s){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const l=[...t,...s];return a&&l.unshift(a),F.jsx(F.Fragment,{children:l.map((u,c)=>re.createElement(C0,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}var ls=(e,t)=>{const s={type:"request",...t||e};return{options:s,middleware:a=>ls({},Object.assign(s,{middleware:a})),inputValidator:a=>ls({},Object.assign(s,{inputValidator:a})),client:a=>ls({},Object.assign(s,{client:a})),server:a=>ls({},Object.assign(s,{server:a}))}};function x0(e,t){for(let s=0,a=t.length;s<a;s++){const l=t[s];e.has(l)||(e.add(l),l.extends&&x0(e,l.extends))}}var e1=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const s=new Set;x0(s,t.serializationAdapters),t.serializationAdapters=Array.from(s)}return t},createMiddleware:ls});function au(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(s[a[l]]=e[a[l]]);return s}function t1(e,t,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}
12return new(s||(s=Promise))(function(u,c){function d(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(d,p)}g((a=a.apply(e,t||[])).next())})}const n1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Df extends Error{constructor(t,s="FunctionsError",a){super(t),this.name=s,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class r1 extends Df{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class jy extends Df{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class My extends Df{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var af;(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"})(af||(af={}));class s1{constructor(t,{headers:s={},customFetch:a,region:l=af.Any}={}){this.url=t,this.headers=s,this.region=l,this.fetch=n1(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return t1(this,arguments,void 0,function*(s,a={}){var l;let u,c;try{const{headers:d,method:p,body:g,signal:y,timeout:m}=a;let b={},{region:_}=a;_||(_=this.region);const w=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let A;g&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",A=g):typeof g=="string"?(b["Content-Type"]="text/plain",A=g):typeof FormData<"u"&&g instanceof FormData?A=g:(b["Content-Type"]="application/json",A=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?A=JSON.stringify(g):A=g;let R=y;m&&(c=new AbortController,u=setTimeout(()=>c.abort(),m),y?(R=c.signal,y.addEventListener("abort",()=>c.abort())):R=c.signal);const O=yield this.fetch(w.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:A,signal:R}).catch(Q=>{throw new r1(Q)}),D=O.headers.get("x-relay-error");if(D&&D==="true")throw new jy(O);if(!O.ok)throw new My(O);let j=((l=O.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),L;return j==="application/json"?L=yield O.json():j==="application/octet-stream"||j==="application/pdf"?L=yield O.blob():j==="text/event-stream"?L=O:j==="multipart/form-data"?L=yield O.formData():L=yield O.text(),{data:L,error:null,response:O}}catch(d){return{data:null,error:d,response:d instanceof My||d instanceof jy?d.context:void 0}}finally{u&&clearTimeout(u)}})}}const k0=3,Dy=e=>Math.min(1e3*2**e,3e4),i1=[520,503],j0=["GET","HEAD","OPTIONS"];var Uy=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 Ny(e,t){return new Promise(s=>{if(t?.aborted){s();return}const a=setTimeout(()=>{t?.removeEventListener("abort",l),s()},e);function l(){clearTimeout(a),s()}t?.addEventListener("abort",l)})}function a1(e,t,s,a){return!(!a||s>=k0||!j0.includes(e)||!i1.includes(t))}var o1=class{constructor(e){var t,s,a,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=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(s=e.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!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,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){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 a=this.fetch;let u=(async()=>{let c=0;for(;;){const g={};s.headers.forEach((m,b)=>{g[b]=m}),c>0&&(g["X-Retry-Count"]=String(c));let y;try{y=await a(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"||!j0.includes(s.method))throw m;if(s.retryEnabled&&c<k0){const b=Dy(c);c++,await Ny(b,s.signal);continue}throw m}if(a1(s.method,y.status,c,s.retryEnabled)){var d,p;const m=(d=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&d!==void 0?d:null,b=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:Dy(c);await y.text(),c++,await Ny(b,s.signal);continue}return await s.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var d;let p="",g="",y="";const m=c?.cause;if(m){var b,_,w,A;const D=(b=m?.message)!==null&&b!==void 0?b:"",j=(_=m?.code)!==null&&_!==void 0?_:"";p=`${(w=c?.name)!==null&&w!==void 0?w:"FetchError"}: ${c?.message}`,p+=` 13 14Caused by: ${(A=m?.name)!==null&&A!==void 0?A:"Error"}: ${D}`,j&&(p+=` (${j})`),m?.stack&&(p+=` 15${m.stack}`)}else{var R;p=(R=c?.stack)!==null&&R!==void 0?R:""}const O=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",g="Request was aborted (timeout or manual cancellation)",O>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${O} 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)",O>this.urlLengthLimit&&(g+=`. Your request URL is ${O} 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:`${(d=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:p,hint:g,code:y},data:null,count:null,status:0,statusText:""}})),u.then(e,t)}async processResponse(e){var t=this;let s=null,a=null,l=null,u=e.status,c=e.statusText;if(e.ok){var d,p;if(t.method!=="HEAD"){var g;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")a=b;else if(t.headers.get("Accept")&&(!((g=t.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text")))
15a=b;else try{a=JSON.parse(b)}catch{if(s={message:b},a=null,t.shouldThrowOnError)throw new Uy({message:b,details:"",hint:"",code:""})}}const y=(d=t.headers.get("Prefer"))===null||d===void 0?void 0:d.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])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(s={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await e.text();try{s=JSON.parse(y),Array.isArray(s)&&e.status===404&&(a=[],s=null,u=200,c="OK")}catch{e.status===404&&y===""?(u=204,c="No Content"):s={message:y}}if(s&&t.shouldThrowOnError)throw new Uy(s)}return{success:s===null,error:s,data:a,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},l1=class extends o1{throwOnError(){return super.throwOnError()}select(e){let t=!1;const s=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:s,foreignTable:a,referencedTable:l=a}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${e}.${t?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:s=t}={}){const a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:s,referencedTable:a=s}={}){const l=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${e}`),this.url.searchParams.set(u,`${t-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}explain({analyze:e=!1,verbose:t=!1,settings:s=!1,buffers:a=!1,wal:l=!1,format:u="text"}={}){var c;const d=[e?"analyze":null,t?"verbose":null,s?"settings":null,a?"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=${d};`),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 Ly=new RegExp("[,()]");var oi=class extends l1{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const s=Array.from(new Set(t)).map(a=>
15typeof a=="string"&&Ly.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}notIn(e,t){const s=Array.from(new Set(t)).map(a=>typeof a=="string"&&Ly.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${s})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:s,type:a}={}){let l="";a==="plain"?l="pl":a==="phrase"?l="ph":a==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(e,`${l}fts${u}.${t}`),this}match(e){return Object.entries(e).filter(([t,s])=>s!==void 0).forEach(([t,s])=>{this.url.searchParams.append(t,`eq.${s}`)}),this}not(e,t,s){return this.url.searchParams.append(e,`not.${t}.${s}`),this}or(e,{foreignTable:t,referencedTable:s=t}={}){const a=s?`${s}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,s){return this.url.searchParams.append(e,`${t}.${s}`),this}},u1=class{constructor(e,{headers:t={},schema:s,fetch:a,urlLengthLimit:l=8e3,retry:u}){this.url=e,this.headers=new Headers(t),this.schema=s,this.fetch=a,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:s=!1,count:a}=t??{},l=s?"HEAD":"GET";let u=!1;const c=(e??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:d,headers:p}=this.cloneRequestState();return d.searchParams.set("select",c),a&&p.append("Prefer",`count=${a}`),new oi({method:l,url:d,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:s=!0}={}){var a;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(t&&c.append("Prefer",`count=${t}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(d.length>0){const p=[...new Set(d)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new oi({method:l,url:u,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:s=!1,count:a,defaultToNull:l=!0}={}){var u;const c="POST",{url:d,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),t!==void 0&&d.searchParams.set("on_conflict",t),a&&p.append("Prefer",`count=${a}`),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}"`);d.searchParams.set("columns",y.join(","))}}return new oi({method:c,url:d,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:t}={}){var s;const a="PATCH",{url:l,headers:u}=this.cloneRequestState();return t&&u.append("Prefer",`count=${t}`),new oi({method:a,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 t;const s="DELETE",{url:a,headers:l}=this.cloneRequestState();return e&&l.append("Prefer",`count=${e}`),new oi({method:s,url:a,headers:l,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function La(e){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function c1(e,t){if(La(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(La(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h1(e){var t=c1(e,"string");return La(t)=="symbol"?t:t+""}function f1(e,t,s){return(t=h1(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function zy(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function Sl(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};
15t%2?zy(Object(s),!0).forEach(function(a){f1(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):zy(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var d1=class M0{constructor(t,{headers:s={},schema:a,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:d}={}){this.url=t,this.headers=new Headers(s),this.schemaName=a,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 w=()=>{clearTimeout(b),m.abort()};return _.addEventListener("abort",w,{once:!0}),p(g,Sl(Sl({},y),{},{signal:m.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",w)})}return p(g,Sl(Sl({},y),{},{signal:m.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=d}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new u1(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new M0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,s={},{head:a=!1,get:l=!1,count:u}={}){var c;let d;const p=new URL(`${this.url}/rpc/${t}`);let g;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),m=a&&Object.values(s).some(y);m?(d="POST",g=s):a||l?(d=a?"HEAD":"GET",Object.entries(s).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([_,w])=>{p.searchParams.append(_,w)})):(d="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 oi({method:d,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 t;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 a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.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"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.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,d=parseInt(c.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} 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 t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let s=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(s+=` 18 19Suggested solution: ${t.workaround}`),new Error(s)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const g1="2.108.2",m1=`realtime-js/${g1}`,y1="1.0.0",D0="2.0.0",v1=D0,b1=1e4,_1=100,Rr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},U0={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},of={connecting:"connecting",closing:"closing",closed:"closed"};class S1{constructor(t){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=t??[]}encode(t,s){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return s(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var s;return this._isArrayBuffer((s=t.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var s,a;const l=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(t){var s,a;const l=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(t,s,a){var l,u;
19const c=t.topic,d=(l=t.ref)!==null&&l!==void 0?l:"",p=(u=t.join_ref)!==null&&u!==void 0?u:"",g=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.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(d.length>255)throw new Error(`ref length ${d.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+d.length+c.length+g.length+m.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let w=new DataView(_),A=0;w.setUint8(A++,this.KINDS.userBroadcastPush),w.setUint8(A++,p.length),w.setUint8(A++,d.length),w.setUint8(A++,c.length),w.setUint8(A++,g.length),w.setUint8(A++,m.length),w.setUint8(A++,s),Array.from(p,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(d,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(c,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(g,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(m,O=>w.setUint8(A++,O.charCodeAt(0)));var R=new Uint8Array(_.byteLength+a.byteLength);return R.set(new Uint8Array(_),0),R.set(new Uint8Array(a),_.byteLength),R.buffer}decode(t,s){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return s(a)}if(typeof t=="string"){const a=JSON.parse(t),[l,u,c,d,p]=a;return s({join_ref:l,ref:u,topic:c,event:d,payload:p})}return s({})}_binaryDecode(t){const s=new DataView(t),a=s.getUint8(0),l=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,s,l)}_decodeUserBroadcast(t,s,a){const l=s.getUint8(1),u=s.getUint8(2),c=s.getUint8(3),d=s.getUint8(4);let p=this.HEADER_LENGTH+4;const g=a.decode(t.slice(p,p+l));p=p+l;const y=a.decode(t.slice(p,p+u));p=p+u;const m=a.decode(t.slice(p,p+c));p=p+c;const b=t.slice(p,t.byteLength),_=d===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,w={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(w.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var s;return t instanceof ArrayBuffer||((s=t?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(t,s){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>s.includes(a)))}}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 Py=(e,t,s={})=>{var a;const l=(a=s.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((u,c)=>(u[c]=w1(c,e,t,l),u),{}):{}},w1=(e,t,s,a)=>{const l=t.find(d=>d.name===e),u=l?.type,c=s[e];return u&&!a.includes(u)?N0(u,c):lf(c)},N0=(e,t)=>{if(e.charAt(0)==="_"){const s=e.slice(1,e.length);return A1(t,s)}switch(e){case Pe.bool:return E1(t);case Pe.float4:case Pe.float8:case Pe.int2:case Pe.int4:case Pe.int8:case Pe.numeric:case Pe.oid:return T1(t);case Pe.json:case Pe.jsonb:return R1(t);case Pe.timestamp:return O1(t);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 lf(t);default:return lf(t)}},lf=e=>e,E1=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},T1=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},R1=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},A1=(e,t)=>{if(typeof e!="string")return e;const s=e.length-1,a=e[s];if(e[0]==="{"&&a==="}"){let u;const c=e.slice(1,s);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(d=>N0(t,d))}return e},O1=e=>typeof e=="string"?e.replace(" ","T"):e,L0=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Ca=e=>typeof e=="function"?e:function(){return e},C1=typeof self<"u"?self:null,li=typeof window<"u"?window:null,vn=C1||li||globalThis,x1="2.0.0",k1=1e4,j1=1e3,_n={connecting:0,open:1,closing:2,closed:3},kt={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"},uf={longpoll:"longpoll",websocket:"websocket"},M1={complete:4},cf="base64url.bearer.phx.",wl=class{constructor(e,t,s,a){this.channel=e,this.event=t,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 19
19oks=[],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,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),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:t,_ref:s}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.callback(t))}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,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},z0=class{constructor(e,t){this.callback=e,this.timerCalc=t,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))}},D1=class{constructor(e,t,s){this.state=kt.closed,this.topic=e,this.params=Ca(t||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new wl(this,Vn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new z0(()=>{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=kt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=kt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=kt.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=kt.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 wl(this,Vn.leave,Ca({}),this.timeout).send(),this.state=kt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Vn.reply,(a,l)=>{this.trigger(this.replyEventName(l),a)})}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}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=kt.closed,this.bindings=[]}onClose(e){this.on(Vn.close,e)}onError(e){return this.on(Vn.error,t=>e(t))}on(e,t){let s=this.bindingRef++;return this.bindings.push({event:e,ref:s,callback:t}),s}off(e,t){this.bindings=this.bindings.filter(s=>!(s.event===e&&(typeof t>"u"||t===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,s=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new wl(this,e,function(){return t},s);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=kt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Vn.close,"leave")},s=new wl(this,Vn.leave,Ca({}),e);return s.receive("ok",()=>t()).receive("timeout",()=>t()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(e,t,s){return t}filterBindings(e,t,s){return!0}isMember(e,t,s,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:s,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=kt.joining,this.joinPush.resend(e))}trigger(e,t,s,a){let l=this.onMessage(e,t,s,a);if(t&&!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,t,s));for(let c=0;c<u.length;c++)u[c].callback(l,s,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===kt.closed}isErrored(){return this.state===kt.errored}isJoined(){return this.state===kt.joined}isJoining(){return this.state===kt.joining}isLeaving(){return this.state===kt.leaving}},$l=class{static request(e,t,s,a,l,u,c){if(vn.XDomainRequest){let d=new vn.XDomainRequest;return this.xdomainRequest(d,e,t,a,l,u,c)}else if(vn.XMLHttpRequest){let d=new vn.XMLHttpRequest;return this.xhrRequest(d,e,t,s,a,l,u,c)}else{if(vn.fetch&&vn.AbortController)return this.fetchRequest(e,t,s,a,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,s,a,l,u,c){let d={method:e,headers:s,body:a},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),d.signal=p.signal),vn.fetch(t,d).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,t,s,a,l,u,c){return e.timeout=l,e.open(t,s),e.onload=()=>{let d=this.parseJSON(e.responseText);c&&c(d)},u&&(e.ontimeout=u),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,s,a,l,u,c,d){e.open(t,s,!0),e.timeout=u;for(let[p,g]of Object.entries(a))e.setRequestHeader(p,g);return e.onerror=()=>d&&d(null),e.onreadystatechange=()=>{if(e.readyState===M1.complete&&d){let p=this.parseJSON(e.responseText);d(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,t){let s=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let l=t?`${t}[${a}]`:a,u=e[a];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let s=e.match(/\?/)?"&":"?";return`${e}${s}${this.serialize(t)}`}},U1=e=>{let t="",s=new Uint8Array(e),a=s.byteLength;for(let l=0;l<a;l++)t+=String.fromCharCode(s[l]);return btoa(t)},ni=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(cf)&&(this.authToken=atob(t[1].slice(cf.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(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=_n.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+uf.websocket),"$1/"+uf.longpoll)}endpointURL(){return $l.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,s){this.close(e,t,s),this.readyState=_n.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===_n.open||this.readyState===_n.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:s,token:a,messages:l}=t;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}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=_n.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=U1(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"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,s){for(let l of this.reqs)l.abort();this.readyState=_n.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,s,a,l){let u,c=()=>{this.reqs.delete(u),a()};u=$l.request(e,this.endpointURL(),t,s,this.timeout,c,d=>{this.reqs.delete(u),this.isActive()&&l(d)}),this.reqs.add(u)}},N1=class Ra{constructor(t,s={}){let a=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ra.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Ra.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],d()}),this.channel.on(a.diff,l=>{let{onJoin:u,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Ra.syncDiff(this.state,l,u,c),d())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Ra.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,s,a,l){let u=this.clone(t),c={},d={};return this.map(u,(p,g)=>{s[p]||(d[p]=g)}),this.map(s,(p,g)=>{let y=u[p];if(y){let m=g.metas.map(A=>A.phx_ref),b=y.metas.map(A=>A.phx_ref),_=g.metas.filter(A=>b.indexOf(A.phx_ref)<0),w=y.metas.filter(A=>m.indexOf(A.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),w.length>0&&(d[p]=this.clone(y),d[p].metas=w)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:d},a,l)}static syncDiff(t,s,a,l){let{joins:u,leaves:c}=this.clone(s);return a||(a=function(){}),l||(l=function(){}),this.map(u,(d,p)=>{let g=t[d];if(t[d]=this.clone(p),g){let y=t[d].metas.map(b=>b.phx_ref),m=g.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[d].metas.unshift(...m)}a(d,g,p)}),this.map(c,(d,p)=>{let g=t[d];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(d,g,p),g.metas.length===0&&delete t[d]}),t}static list(t,s){return s||(s=function(a,l){return l}),this.map(t,(a,l)=>s(a,l))}static map(t,s){return Object.getOwnPropertyNames(t).map(a=>s(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},El={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(s))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[s,a,l,u,c]=JSON.parse(e);return t({join_ref:s,ref:a,topic:l,event:u,payload:c})}},binaryEncode(e){let{join_ref:t,ref:s,event:a,topic:l,payload:u}=e,c=this.META_LENGTH+t.length+s.length+l.length+a.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(d),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,t.length),p.setUint8(g++,s.length),p.setUint8(g++,l.length),p.setUint8(g++,a.length),Array.from(t,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(a,m=>p.setUint8(g++,m.charCodeAt(0)));var y=new Uint8Array(d.byteLength+u.byteLength);return y.set(new Uint8Array(d),0),y.set(new Uint8Array(u),d.byteLength),y.buffer},binaryDecode(e){let t=new DataView(e),s=t.getUint8(0),a=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=t.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=s.decode(e.slice(c,c+a));c=c+a;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:d,ref:null,topic:p,event:g,payload:y}},decodeReply(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=t.getUint8(3),c=t.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(e.slice(d,d+a));d=d+a;let g=s.decode(e.slice(d,d+l));d=d+l;let y=s.decode(e.slice(d,d+u));d=d+u;let m=s.decode(e.slice(d,d+c));d=d+c;let b=e.slice(d,e.byteLength),_={status:m,response:b};return{join_ref:p,ref:g,topic:y,event:Vn.reply,payload:_}}
20,decodeBroadcast(e,t,s){let a=t.getUint8(1),l=t.getUint8(2),u=this.HEADER_LENGTH+2,c=s.decode(e.slice(u,u+a));u=u+a;let d=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:d,payload:p}}},L1=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||k1,this.transport=t.transport||vn.WebSocket||ni,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=vn&&vn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=El.encode.bind(El),this.defaultDecoder=El.decode.bind(El),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ni?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;li&&li.addEventListener&&(li.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),a=this.connectClock)}),li.addEventListener("pageshow",l=>{a===this.connectClock&&(a=null,this.connect())}),li.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>t.rejoinAfterMs?t.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>t.reconnectAfterMs?t.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Ca(t.params||{}),this.endPoint=`${e}/${uf.websocket}`,this.vsn=t.vsn||x1,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new z0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ni}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=$l.appendParams($l.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,t,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,s)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Ca(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ni?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(ni,this.longPollFallbackMs):this.transportConnect())}log(e,t,s){this.logger&&this.logger(e,t,s)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(l=>{l.ref===t&&(this.off([a]),e(Date.now()-s))});return!0}transportName(e){return e===ni?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${cf}${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=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let s=!1,a=!0,l,u,c=this.transportName(e),d=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,t),u=this.onError(p=>{this.log("transport","error",p),a&&!s&&(clearTimeout(this.fallbackTimer),d(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!a){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(d,t),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,t,s){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,s||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,s=1){if(s===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,s+1)},150*s)}waitForSocketClosed(e,t,s=1){if(s===5||e.readyState===_n.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,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 t=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",e,t,s),(t===this.transport||s>0)&&this.triggerChanError(e)}
20triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Vn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case _n.connecting:return"connecting";case _n.open:return"open";case _n.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([s])=>e.indexOf(s)===-1)}channel(e,t={}){let s=new D1(e,t,this);return this.channels.push(s),s}push(e){if(this.hasLogger()){let{topic:t,event:s,payload:a,ref:l,join_ref:u}=e;this.log("push",`${t} ${s} (${u}, ${l})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}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,t=>{let{topic:s,event:a,payload:l,ref:u,join_ref:c}=t;if(u&&u===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",d)}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} ${a} ${u&&"("+u+")"||""}`.trim(),l);for(let d=0;d<this.channels.length;d++){const p=this.channels[d];p.isMember(s,a,l,c)&&p.trigger(a,l,u,c)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([s,a])=>{try{a(...t)}catch(l){this.log("error",`error in ${e} callback`,l)}})}catch(s){this.log("error",`error triggering ${e} callbacks`,s)}}leaveOpenTopic(e){let t=this.channels.find(s=>s.topic===e&&(s.isJoined()||s.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class xa{constructor(t,s){const a=P1(s);this.presence=new N1(t.getChannel(),a),this.presence.onJoin((l,u,c)=>{const d=xa.onJoinPayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onLeave((l,u,c)=>{const d=xa.onLeavePayload(l,u,c);t.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return xa.transformState(this.presence.state)}static transformState(t){return t=z1(t),Object.getOwnPropertyNames(t).reduce((s,a)=>{const l=t[a];return s[a]=Nl(l),s},{})}static onJoinPayload(t,s,a){const l=By(s),u=Nl(a);return{event:"join",key:t,currentPresences:l,newPresences:u}}static onLeavePayload(t,s,a){const l=By(s),u=Nl(a);return{event:"leave",key:t,currentPresences:l,leftPresences:u}}}function Nl(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function z1(e){return JSON.parse(JSON.stringify(e))}function P1(e){return e?.events&&{events:e.events}}function By(e){return e?.metas?Nl(e):[]}var Hy;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Hy||(Hy={}));class B1{get state(){return this.presenceAdapter.state}constructor(t,s){this.channel=t,this.presenceAdapter=new xa(this.channel.channelAdapter,s)}}function H1(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const s=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${s}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class q1{constructor(t,s,a){const l=I1(a);this.channel=t.getSocket().channel(s,l),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,s){return this.channel.on(t,s)}off(t,s){this.channel.off(t,s)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,s,a){let l;try{l=this.channel.push(t,s,a)}catch{throw new Error(`tried to push '${t}' 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(t){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),t)}canPush(){return this.socket.isConnected()&&this.state===Rr.joined}isJoined(){return this.state===Rr.joined}isJoining(){return this.state===Rr.joining}isClosed(){return this.state===Rr.closed}isLeaving(){return this.state===Rr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}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 qy;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(qy||(qy={}));var hi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(hi||(hi={}));var Kn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Kn||(Kn={}));class ka{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}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(t,s={config:{}},a){var l,u;if(this.topic=t,this.params=s,this.socket=a,this.bindings={},this.subTopic=t.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,t,this.params),this.presence=new B1(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=L0(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(t,s=this.timeout){var a,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:p}}=this.params,g=(l=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[hi.PRESENCE]&&this.bindings[hi.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({},d),{enabled:y}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(Kn.CHANNEL_ERROR,H1(_))}),this._onClose(()=>t?.(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){t?.(Kn.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=Rr.errored;const w=Object.values(_).join(", ")||"error";t?.(Kn.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{t?.(Kn.TIMED_OUT)})}return this}_updatePostgresBindings(t,s){var a;const l=this.bindings.postgres_changes,u=(a=l?.length)!==null&&a!==void 0?a:0,c=[];for(let d=0;d<u;d++){const p=l[d],{filter:{event:g,schema:y,table:m,filter:b}}=p,_=t&&t[d];if(_&&_.event===g&&ka.isFilterValueEqual(_.schema,y)&&ka.isFilterValueEqual(_.table,m)&&ka.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=Rr.errored,s?.(Kn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Rr.errored&&s&&s(Kn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,s={}){return await this.send({type:"presence",event:"track",payload:t},s.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,s,a){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=t===hi.PRESENCE||t===hi.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,s,a)}async httpSend(t,s,a={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=s instanceof ArrayBuffer||ArrayBuffer.isView(s),c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":u?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&d.searchParams.set("private","true");const p={method:"POST",headers:c,body:u?s:JSON.stringify(s)},g=await this._fetchWithTimeout(d.toString(),p,(l=a.timeout)!==null&&l!==void 0?l:this.timeout);if(g.status===202)return{success:!0};if(g.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let y=g.statusText;try{const m=await g.json();y=m.error||m.message||y}catch{}return Promise.reject(new Error(y))}async send(t,s={}){var a,l;if(!this.channelAdapter.canPush()&&t.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}=t,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=s.timeout)!==null&&a!==void 0?a: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,d,p;const g=this.channelAdapter.push(t.type,t,s.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.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(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,s,a){const l=new AbortController,u=setTimeout(()=>l.abort(),a),c=await this.socket.fetch(t,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),c}_on(t,s,a){const l=t.toLocaleLowerCase(),u=this.channelAdapter.on(t,a),c={type:l,filter:s,callback:a,ref:u};return this.bindings[l]?this.bindings[l].push(c):this.bindings[l]=[c],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,s,a)=>{var l,u,c,d,p,g,y;const m=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,a))return!1;const b=(l=this.bindings[m])===null||l===void 0?void 0:l.find(_=>_.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in b){const _=b.id,w=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=s.ids)===null||c===void 0?void 0:c.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((d=s.data)===null||d===void 0?void 0:d.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(t,s){const{close:a,error:l,leave:u,join:c}=U0;return s&&[a,l,u,c].includes(t)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,s,a)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:c,commit_timestamp:d,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:d,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return s})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in t.bindings)for(const a of t.bindings[s])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,s){return(t??void 0)===(s??void 0)}_getPayloadRecords(t){const s={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(s.new=Py(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(s.old=Py(t.columns,t.old_record)),s}}class $1{constructor(t,s){this.socket=new L1(t,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(t){this.socket.heartbeatCallback=t}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(t,s,a,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{t(),u("ok")},s,a)})}push(t){this.socket.push(t)}log(t,s,a){this.socket.log(t,s,a)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==of.connecting}isDisconnecting(){return this.socket.connectionState()==of.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Iy={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(t){return e.has(t)?e.get(t):null},key(t){var s;return(s=Array.from(e.keys())[t])!==null&&s!==void 0?s:null},removeItem(t){e.delete(t)},setItem(t,s){e.set(t,String(s))}}}function F1(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return K1()}const Y1=` 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(t,s){var a;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 S1,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),!(!((a=s?.params)===null||a===void 0)&&a.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(t,l),this.httpEndpoint=L0(t),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(t){const s=t.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(t,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,s)}getChannels(){return this.channels}async removeChannel(t){const s=await t.unsubscribe();return s==="ok"&&t.teardown(),s}async removeAllChannels(){const t=this.channels.map(async a=>{const l=await a.unsubscribe();return a.teardown(),l}),s=await Promise.all(t);return await this.disconnect(),s}log(t,s,a){this.socketAdapter.log(t,s,a)}connectionState(){return this.socketAdapter.connectionState()||of.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,s={config:{}}){const a=`realtime:${t}`,l=this.getChannels().find(u=>u.topic===a);if(l)return l;{const u=new ka(`realtime:${t}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(s=>s.topic!==t.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(t=null){let s,a=!1;if(t)s=t,a=!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;a?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(U0.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${t}`,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(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(s,a)=>{s=="sent"&&this._setAuthSafely(),t&&t(s,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),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(t){let s;if(t)s=t;else{const a=new Blob([Y1],{type:"application/javascript"});s=URL.createObjectURL(a)}return s}_initializeOptions(t){var s,a,l,u,c,d,p,g,y,m,b,_;this.worker=(s=t?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const w={};w.timeout=(l=t?.timeout)!==null&&l!==void 0?l:b1,w.heartbeatIntervalMs=(u=t?.heartbeatIntervalMs)!==null&&u!==void 0?u:Iy.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=t?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=t?.heartbeatIntervalMs)!==null&&d!==void 0?d:Iy.HEARTBEAT_INTERVAL),w.transport=(p=t?.transport)!==null&&p!==void 0?p:p1.getWebSocketConstructor(),w.params=t?.params,w.logger=t?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),w.sessionStorage=(g=t?.sessionStorage)!==null&&g!==void 0?g:F1(),w.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(D=>G1[D-1]||V1);let A,R;const O=(m=t?.vsn)!==null&&m!==void 0?m:v1;switch(O){case y1:A=(D,j)=>j(JSON.stringify(D)),R=(D,j)=>j(JSON.parse(D));break;case D0:A=this.serializer.encode.bind(this.serializer),R=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=O,w.encode=(b=t?.encode)!==null&&b!==void 0?b:A,w.decode=(_=t?.decode)!==null&&_!==void 0?_:R,w.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var za=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function J1(e,t,s){const a=new URL(t,e);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&a.searchParams.set(l,u);return a.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 t=e.fetchImpl??globalThis.fetch;return{async request({method:s,path:a,query:l,body:u,headers:c}){const d=J1(e.baseUrl,a,l),p=await X1(e.auth),g=await t(d,{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,w=_?.error;throw new za(w?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function Tl(e){return e.join("�")}var W1=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Tl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const s={namespace:e.namespace,properties:t?.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/${Tl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Tl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Tl(e.namespace)}`}),!0}catch(t){if(t instanceof za&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(s){if(s instanceof za&&s.status===409)return;throw s}}};function ri(e){return e.join("�")}var eO=class{constructor(e,t="",s){this.client=e,this.prefix=t,this.accessDelegation=s}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables`,body:t,headers:s})).data.metadata}async updateTable(e,t){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ri(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(s){if(s instanceof za&&s.status===404)return!1;throw s}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(s){if(s instanceof za&&s.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw s}}},tO=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${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,t),this.tableOps=new eO(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}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,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}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,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Pa(e){"@babel/helpers - typeof";return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(e)}function nO(e,t){if(Pa(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(Pa(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rO(e){var t=nO(e,"string");return Pa(t)=="symbol"?t:t+""}function sO(e,t,s){return(t=rO(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function $y(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function ce(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?$y(Object(s),!0).forEach(function(a){sO(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):$y(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var ou=class extends Error{constructor(e,t="storage",s,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function lu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var hf=class extends ou{constructor(e,t,s,a="storage"){super(e,a,t,s),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=s}toJSON(){return ce({},super.toJSON())}},P0=class extends ou{constructor(e,t,s="storage"){super(e,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Gl(e,t,s){const a=ce({},e),l=t.toLowerCase();for(const u of Object.keys(a))u.toLowerCase()===l&&delete a[u];return a[l]=s,a}function iO(e){const t={};for(const[s,a]of Object.entries(e))t[s.toLowerCase()]=a;return t}const aO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),oO=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ff=e=>{if(Array.isArray(e))return e.map(s=>ff(s));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([s,a])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));t[l]=ff(a)}),t},lO=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Gy=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const s=t.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(e)},uO=async(e,t,s,a)=>{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 d=c?.statusCode||c?.code||u+"";t(new hf(Gy(c),u,d,a))}).catch(()=>{const c=u+"";t(new hf(l.statusText||`HTTP ${u} error`,u,c,a))})}else t(new P0(Gy(e),e,a))},cO=(e,t,s,a)=>{const l={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return ce(ce({},l),s);if(oO(a)){var u;const c=t?.headers||{};let d;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(d=g);l.headers=Gl(c,"Content-Type",(u=d)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(a)}else l.body=a;return t?.duplex&&(l.duplex=t.duplex),ce(ce({},l),s)};async function Ea(e,t,s,a,l,u,c){return new Promise((d,p)=>{e(s,cO(t,a,l,u)).then(g=>{if(!g.ok)throw g;if(a?.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=>d(g)).catch(g=>uO(g,p,a,c))})}function B0(e="storage"){return{get:async(t,s,a,l)=>Ea(t,"GET",s,a,l,void 0,e),post:async(t,s,a,l,u)=>Ea(t,"POST",s,l,u,a,e),put:async(t,s,a,l,u)=>Ea(t,"PUT",s,l,u,a,e),head:async(t,s,a,l)=>Ea(t,"HEAD",s,ce(ce({},a),{},{noResolveJson:!0}),l,void 0,e),remove:async(t,s,a,l,u)=>Ea(t,"DELETE",s,l,u,a,e)}}const hO=B0("storage"),{get:Ba,post:ln,put:df,head:fO,remove:Uf}=hO,$t=B0("vectors");var vi=class{constructor(e,t={},s,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=iO(t),this.fetch=aO(s),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Gl(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(lu(s))return{data:null,error:s};throw s}}};let H0;H0=Symbol.toStringTag;var dO=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[H0]="StreamDownloadBuilder",this.promise=null}
38then(e,t){return this.getPromise().then(e,t)}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 e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(lu(t))return{data:null,error:t};throw t}}};let q0;q0=Symbol.toStringTag;var pO=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[q0]="BlobDownloadBuilder",this.promise=null}asStream(){return new dO(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}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(t){if(e.shouldThrowOnError)throw t;if(lu(t))return{data:null,error:t};throw t}}};const gO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Vy={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var mO=class extends vi{constructor(e,t={},s,a){super(e,t,a,"storage"),this.bucketId=s}async uploadOrUpdate(e,t,s,a){var l=this;return l.handleOperation(async()=>{let u;const c=ce(ce({},Vy),a);let d=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,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,p&&(d["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")),a?.headers)for(const[b,_]of Object.entries(a.headers))d=Gl(d,b,_);const g=l._removeEmptyFolders(t),y=l._getFinalPath(g),m=await(e=="PUT"?df:ln)(l.fetch,`${l.url}/object/${y}`,u,ce({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:m.Id,fullPath:m.Key}})}async upload(e,t,s){return this.uploadOrUpdate("POST",e,t,s)}async uploadToSignedUrl(e,t,s,a){var l=this;const u=l._removeEmptyFolders(e),c=l._getFinalPath(u),d=new URL(l.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",t),l.handleOperation(async()=>{let p;const g=ce(ce({},Vy),a);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")),a?.headers)for(const[b,_]of Object.entries(a.headers))y=Gl(y,b,_);return{path:u,fullPath:(await df(l.fetch,d.toString(),p,ce({headers:y},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var s=this;return s.handleOperation(async()=>{let a=s._getFinalPath(e);const l=ce({},s.headers);t?.upsert&&(l["x-upsert"]="true");const u=await ln(s.fetch,`${s.url}/object/upload/sign/${a}`,{},{headers:l}),c=new URL(s.url+u.url),d=c.searchParams.get("token");if(!d)throw new ou("No token returned by API");return{signedUrl:c.toString(),path:e,token:d}})}async update(e,t,s){return this.uploadOrUpdate("PUT",e,t,s)}async move(e,t,s){var a=this;return a.handleOperation(async()=>await ln(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:s?.destinationBucket},{headers:a.headers}))}async copy(e,t,s){var a=this;return a.handleOperation(async()=>({path:(await ln(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
38stinationBucket:s?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,s){var a=this;return a.handleOperation(async()=>{let l=a._getFinalPath(e);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let c=await ln(a.fetch,`${a.url}/object/sign/${l}`,ce({expiresIn:t},u?{transform:s.transform}:{}),{headers:a.headers});const d=new URLSearchParams;s?.download&&d.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&d.set("cacheNonce",String(s.cacheNonce));const p=d.toString();return{signedUrl:encodeURI(`${a.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,s){var a=this;return a.handleOperation(async()=>{const l=await ln(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.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(d=>ce(ce({},d),{},{signedUrl:d.signedURL?encodeURI(`${a.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(e,t,s){const a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(l,t.transform),t?.cacheNonce!=null&&l.set("cacheNonce",String(t.cacheNonce));const u=l.toString(),c=this._getFinalPath(e),d=()=>Ba(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new pO(d,this.shouldThrowOnError)}async info(e){var t=this;const s=t._getFinalPath(e);return t.handleOperation(async()=>ff(await Ba(t.fetch,`${t.url}/object/info/${s}`,{headers:t.headers})))}async exists(e){var t=this;const s=t._getFinalPath(e);try{return await fO(t.fetch,`${t.url}/object/${s}`,{headers:t.headers}),{data:!0,error:null}}catch(l){if(t.shouldThrowOnError)throw l;if(lu(l)){var a;const u=l instanceof hf?l.status:l instanceof P0?(a=l.originalError)===null||a===void 0?void 0:a.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(e,t){const s=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const l=a.toString(),u=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${s}`)+(l?`?${l}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Uf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,s){var a=this;return a.handleOperation(async()=>{const l=ce(ce(ce({},gO),t),{},{prefix:e||""});return await ln(a.fetch,`${a.url}/object/list/${a.bucketId}`,l,{headers:a.headers},s)})}async listV2(e,t){var s=this;return s.handleOperation(async()=>{const a=ce({},e);return await ln(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,a,{headers:s.headers},t)})}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,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const yO="2.108.2",Qa={"X-Client-Info":`storage-js/${yO}`};var vO=class extends vi{constructor(e,t={},s,a){const l=new URL(e);a?.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({},Qa),t);super(u,c,s,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=t.listBucketOptionsToQueryString(e);return await Ba(t.fetch,`${t.url}/bucket${s}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ba(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var s=this;return s.handleOperation(async()=>await ln(s.fetch,`${s.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async updateBucket(e,t){var s=this;return s.handleOperation(async()=>await df(s.fetch,`${s.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await ln(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Uf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},bO=class extends vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Qa),t);super(a,l,s,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ln(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.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 a=s.toString(),l=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await Ba(t.fetch,l,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Uf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!lO(e))throw new ou("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()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(l,d),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},_O=class extends vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Qa),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var s=this;return s.handleOperation(async()=>await $t.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers})||{})}},SO=class extends vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Qa),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=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 t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},wO=class extends vi{constructor(e,t={},s){const a=e.replace(/\/$/,""),l=ce(ce({},Qa),{},{"Content-Type":"application/json"},t);super(a,l,s,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await $t.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},EO=class extends wO{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new TO(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,s=this;return t().call(s,e)}async getBucket(e){var t=()=>super.getBucket,s=this;return t().call(s,e)}async listBuckets(e={}){var t=()=>super.listBuckets,s=this;return t().call(s,e)}async deleteBucket(e){var t=()=>super.deleteBucket,s=this;return t().call(s,e)}},TO=class extends _O{constructor(e,t,s,a){super(e,t,a),this.vectorBucketName=s}async createIndex(e){var t=()=>super.createIndex,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,s=this;return t().call(s,s.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,s=this;return t().call(s,s.vectorBucketName,e)}index(e){return new RO(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},RO=class extends SO{constructor(e,t,s,a,l){super(e,t,l),this.vectorBucketName=s,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(e){var t=()=>super.getVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,s=this;return t().call(s,ce(ce({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},AO=class extends vO{constructor(e,t={},s,a){super(e,t,s,a)}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)}};const I0="2.108.2",Fn=30*1e3,Aa=3,$h=Aa*Fn,OO=2*Fn,CO="http://localhost:9999",xO="supabase.auth.token",kO={"X-Client-Info":`gotrue-js/${I0}`},pf="X-Supabase-Api-Version",$0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},jO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,MO=600*1e3;class Ha extends Error{constructor(t,s,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=a}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 DO extends Ha{constructor(t,s,a){super(t,s,a),this.name="AuthApiError",this.status=s,this.code=a}}function UO(e){return Z(e)&&e.name==="AuthApiError"}
38class cn extends Ha{constructor(t,s){super(t),this.name="AuthUnknownError",this.originalError=s}}class Sn extends Ha{constructor(t,s,a,l){super(t,a,l),this.name=s,this.status=a}}class ut extends Sn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Rl(e){return Z(e)&&e.name==="AuthSessionMissingError"}class si extends Sn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Al extends Sn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ol extends Sn{constructor(t,s=null){super(t,"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 Ky extends Sn{constructor(t,s=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class LO extends Sn{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 gf extends Sn{constructor(t,s){super(t,"AuthRetryableFetchError",s,void 0)}}function Fy(e){return Z(e)&&e.name==="AuthRetryableFetchError"}class Yy extends Sn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function zO(e){return Z(e)&&e.name==="AuthRefreshDiscardedError"}class Qy extends Sn{constructor(t,s,a){super(t,"AuthWeakPasswordError",s,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Vl extends Sn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Kl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Jy=` 39\r=`.split(""),PO=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Jy.length;t+=1)e[Jy[t].charCodeAt(0)]=-2;for(let t=0;t<Kl.length;t+=1)e[Kl[t].charCodeAt(0)]=t;return e})();function Xy(e,t,s){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Kl[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Kl[a]),t.queuedBits-=6}}function G0(e,t,s){const a=PO[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)s(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Zy(e){const t=[],s=c=>{t.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{qO(c,a,s)};for(let c=0;c<e.length;c+=1)G0(e.charCodeAt(c),l,u);return t.join("")}function BO(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function HO(e,t){for(let s=0;s<e.length;s+=1){let a=e.charCodeAt(s);if(a>55295&&a<=56319){const l=(a-55296)*1024&65535;a=(e.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}BO(a,t)}}function qO(e,t,s){if(t.utf8seq===0){if(e<=127){s(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&s(t.codepoint)}}function gi(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};for(let l=0;l<e.length;l+=1)G0(e.charCodeAt(l),s,a);return new Uint8Array(t)}function IO(e){const t=[];return HO(e,s=>t.push(s)),new Uint8Array(t)}function us(e){const t=[],s={queue:0,queuedBits:0},a=l=>{t.push(l)};return e.forEach(l=>
39Xy(l,s,a)),Xy(null,s,a),t.join("")}function $O(e){return Math.round(Date.now()/1e3)+e}function GO(){return Symbol("auth-callback")}const _t=()=>typeof window<"u"&&typeof document<"u",ns={tested:!1,writable:!1},V0=()=>{if(!_t())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ns.tested)return ns.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ns.tested=!0,ns.writable=!0}catch{ns.tested=!0,ns.writable=!1}return ns.writable};function VO(e){const t={},s=new URL(e);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEach((l,u)=>{t[u]=l})}catch{}return s.searchParams.forEach((a,l)=>{t[l]=a}),t}const K0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),KO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ui=async(e,t,s)=>{await e.setItem(t,JSON.stringify(s))},an=async(e,t)=>{const s=await e.getItem(t);if(!s)return null;try{return JSON.parse(s)}catch{return null}},Xe=async(e,t)=>{await e.removeItem(t)};class uu{constructor(){this.promise=new uu.promiseConstructor((t,s)=>{this.resolve=t,this.reject=s})}}uu.promiseConstructor=Promise;function Cl(e){const t=e.split(".");if(t.length!==3)throw new Vl("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!jO.test(t[a]))throw new Vl("JWT not in base64url format");return{header:JSON.parse(Zy(t[0])),payload:JSON.parse(Zy(t[1])),signature:gi(t[2]),raw:{header:t[0],payload:t[1]}}}async function FO(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function YO(e,t){return new Promise((a,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await e(u);if(!t(u,null,c)){a(c);return}}catch(c){if(!t(u,c)){l(c);return}}})()})}function QO(e){return("0"+e.toString(16)).substr(-2)}function JO(){const t=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*a));return l}return crypto.getRandomValues(t),Array.from(t,QO).join("")}async function XO(e){const s=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(a);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function ZO(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 XO(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function rs(e,t,s=!1){const a=JO();let l=a;s&&(l+="/recovery"),await ui(e,`${t}-code-verifier`,l);const u=await ZO(a);return[u,a===u?"plain":"s256"]}const WO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function eC(e){const t=e.headers.get(pf);if(!t||!t.match(WO))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function tC(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function nC(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 rC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Gn(e){if(!rC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function on(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:(t,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const a=s.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="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:(t,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:(t,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 sC(e,t){return new Proxy(e,{get:(s,a,l)=>{if(a==="__isInsecureUserWarningProxy")return!0;
39if(typeof a=="symbol"){const u=a.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,a,l)}return!t.value&&typeof a=="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."),t.value=!0),Reflect.get(s,a,l)}})}function Wy(e){return JSON.parse(JSON.stringify(e))}const ss=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},iC=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function ev(e){var t;if(!KO(e))throw new gf(ss(e),0);if(iC.includes(e.status))throw new gf(ss(e),e.status);let s;try{s=await e.json()}catch(u){throw new cn(ss(u),u)}let a;const l=eC(e);if(l&&l.getTime()>=$0["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?a=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(a=s.error_code),a){if(a==="weak_password")throw new Qy(ss(s),e.status,((t=s.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new ut}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 Qy(ss(s),e.status,s.weak_password.reasons);throw new DO(ss(s),e.status||500,a)}const aC=(e,t,s,a)=>{const l={method:e,headers:t?.headers||{}};return e==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),l.body=JSON.stringify(a),Object.assign(Object.assign({},l),s))};async function te(e,t,s,a){var l;const u=Object.assign({},a?.headers);u[pf]||(u[pf]=$0["2024-01-01"].name),a?.jwt&&(u.Authorization=`Bearer ${a.jwt}`);const c=(l=a?.query)!==null&&l!==void 0?l:{};a?.redirectTo&&(c.redirect_to=a.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await oC(e,t,s+d,{headers:u,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function oC(e,t,s,a,l,u){const c=aC(t,a,l,u);let d;try{d=await e(s,Object.assign({},c))}catch(p){throw console.error(p),new gf(ss(p),0)}if(d.ok||await ev(d),a?.noResolveJson)return d;try{return await d.json()}catch(p){await ev(p)}}function en(e){var t;let s=null;cC(e)&&(s=Object.assign({},e),e.expires_at||(s.expires_at=$O(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:s,user:a},error:null}}function tv(e){const t=en(e);return!t.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,a)=>s&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ar(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function lC(e){return{data:e,error:null}}function uC(e){const{action_link:t,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u}=e,c=au(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:t,email_otp:s,hashed_token:a,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:d,user:p},error:null}}function nv(e){return e}function cC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Vh=["global","local","others"];class hC{constructor({url:t="",headers:s={},fetch:a,experimental:l}){this.url=t,this.headers=s,this.fetch=K0(a),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(t,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:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Z(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,s={}){try{return await te(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:s}=t,a=au(t,["options"]),l=Object.assign(Object.assign({},a),s);return"newEmail"in a&&(l.new_email=a?.newEmail,delete l.newEmail),await te(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:uC,redirectTo:s?.redirectTo})}catch(s){if(Z(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(t){try{return await te(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ar})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async listUsers(t){var s,a,l,u,c,d,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:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:nv});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=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);g[`${R}Page`]=A}),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(t){Gn(t);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ar})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async updateUserById(t,s){Gn(t);try{return await te(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:s,headers:this.headers,xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,s=!1){Gn(t);try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:s},xform:Ar})}catch(a){if(Z(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){Gn(t.userId);try{const{data:s,error:a}=await te(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:a}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _deleteFactor(t){Gn(t.userId),Gn(t.id);try{return{data:await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listOAuthClients(t){var s,a,l,u,c,d,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:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(u=(l=t?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:nv});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=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);g[`${R}Page`]=A}),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(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getOAuthClient(t){try{return await te(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateOAuthClient(t,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await te(this.fetch,"DELET
39E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/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(t){try{const s={};return t?.type&&(s.type=t.type),await te(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:a=>{var l;return{data:{providers:(l=a?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(Z(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(t){try{return await te(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getCustomProvider(t){try{return await te(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateCustomProvider(t,s){try{return await te(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:s,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Z(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await te(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminListPasskeys(t){on(this.experimental),Gn(t.userId);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t.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(t){on(this.experimental),Gn(t.userId),Gn(t.passkeyId);try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}}function rv(e={}){return{getItem:t=>e[t]||null,setItem:(t,s)=>{e[t]=s},removeItem:t=>{delete e[t]}}}globalThis&&V0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class fC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function dC(){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 F0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function pC(e){return parseInt(e,16)}function gC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function mC(e){var t;const{chainId:s,domain:a,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:d,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(!a)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(!((t=e.statement)===null||t===void 0)&&t.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=F0(e.address),w=y?`${y}://${a}`:a,A=e.statement?`${e.statement} 41`:"",R=`${w} wants you to sign in with your Ethereum account: 42${_} 43 44${A}`;let O=`URI: ${m} 45Version: ${b} 46Chain ID: ${s}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;if(l&&(O+=` 49Expiration Time: ${l.toISOString()}`),d&&(O+=` 50Not Before: ${d.toISOString()}`),p&&(O+=` 51Request ID: ${p}`),g){let D=` 52Resources:`;
52for(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}`);D+=` 53- ${j}`}O+=D}return`${R} 54${O}`}class nt extends Error{constructor({message:t,code:s,cause:a,name:l}){var u;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(u=l??(a instanceof Error?a.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 Fl extends nt{constructor(t,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:t}),this.name="WebAuthnUnknownError",this.originalError=s}}function yC({error:e,options:t}){var s,a,l;const{publicKey:u}=t;if(!u)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new nt({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 nt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=u.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new nt({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 nt({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 nt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new nt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return u.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new nt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new nt({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(Y0(c)){if(u.rp.id!==c)return new nt({message:`The RP ID "${u.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new nt({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 nt({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 nt({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 nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function vC({error:e,options:t}){const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new nt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new nt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(Y0(a)){if(s.rpId!==a)return new nt({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new nt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
54ROR",cause:e})}return new nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class bC{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const mf=new bC;function sv(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:t,user:s,excludeCredentials:a}=e,l=au(e,["challenge","user","excludeCredentials"]),u=gi(t).buffer,c=Object.assign(Object.assign({},s),{id:gi(s.id).buffer}),d=Object.assign(Object.assign({},l),{challenge:u,user:c});if(a&&a.length>0){d.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const g=a[p];d.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:gi(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return d}function iv(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:t,allowCredentials:s}=e,a=au(e,["challenge","allowCredentials"]),l=gi(t).buffer,u=Object.assign(Object.assign({},a),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let c=0;c<s.length;c++){const d=s[c];u.allowCredentials[c]=Object.assign(Object.assign({},d),{id:gi(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return u}function av(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e;return{id:e.id,rawId:e.id,response:{attestationObject:us(new Uint8Array(e.response.attestationObject)),clientDataJSON:us(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function ov(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e,a=e.getClientExtensionResults(),l=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:us(new Uint8Array(l.authenticatorData)),clientDataJSON:us(new Uint8Array(l.clientDataJSON)),signature:us(new Uint8Array(l.signature)),userHandle:l.userHandle?us(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Y0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Yl(){var e,t;return!!(_t()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Q0(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Fl("Browser returned unexpected credential type",t)}:{data:null,error:new Fl("Empty credential response",t)}}catch(t){return{data:null,error:yC({error:t,options:e})}}}async function J0(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Fl("Browser returned unexpected credential type",t)}:{data:null,error:new Fl("Empty credential response",t)}}catch(t){return{data:null,error:vC({error:t,options:e})}}}const _C={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},SC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ql(...e){const t=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),a={};for(const l of e)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))a[u]=c;else if(s(c))a[u]=c;else if(t(c)){const d=a[u];t(d)?a[u]=Ql(d,c):a[u]=Ql(c)}else a[u]=c}return a}function wC(e,t){return Ql(_C,e,t||{})}function EC(e,t){return Ql(SC,e,t||{})}class TC{constructor(t){this.client=t,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(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:s,friendlyName:a,signal:l},u){var c;try{const{data:d,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:s});if(!d)return{data:null,error:p};const g=l??mf.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:y}=d.webauthn.credential_options.publicKey;if(!y.name){const m=a;if(m)y.name=`${y.id}:${m}`;else{const _=(await this.client.getUser()).data.user,w=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";y.name=`${y.id}:${w}`}}y.displayName||(y.displayName=y.name)}switch(d.webauthn.type){case"create":{const y=wC(d.webauthn.credential_options.publicKey,u?.create),{data:m,error:b}=await Q0({publicKey:y,signal:g});return m?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}case"request":{const y=EC(d.webauthn.credential_options.publicKey,u?.request),{data:m,error:b}=await J0(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:y,signal:g}));return m?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}}}catch(d){return Z(d)?{data:null,error:d}:{data:null,error:new cn("Unexpected error in challenge",d)}}}async _verify({challengeId:t,factorId:s,webauthn:a}){return this.client.mfa.verify({factorId:s,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Ha("rpId is required for WebAuthn authentication")};try{if(!Yl())return{data:null,error:new cn("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:t,webauthn:{rpId:s,rpOrigins:a},signal:l},{request:u});if(!c)return{data:null,error:d};const{webauthn:p}=c;return this._verify({factorId:t,challengeId:c.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:a,credential_response:p.credential_response}})}catch(c){return Z(c)?{data:null,error:c}:{data:null,error:new cn("Unexpected error in authenticate",c)}}}async _register({friendlyName:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new Ha("rpId is required for WebAuthn registration")};try{if(!Yl())return{data:null,error:new cn("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:t});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===t&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:d};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:s,rpOrigins:a},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:a,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 cn("Unexpected error in register",c)}}}}dC();const RC={url:CO,storageKey:xO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:kO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ii={};class qa{get jwks(){var t,s;return(s=(t=ii[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,s;return(s=(t=ii[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{cachedAt:t})}constructor(t){var s,a,l;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},RC),t);
54if(this.storageKey=u.storageKey,this.instanceID=(s=qa.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,qa.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&_t()){const c=`${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(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(a=u.experimental)!==null&&a!==void 0?a:{},this.admin=new hC({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=K0(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock!=null&&(this.lock=u.lock),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 TC(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?(u.storage?this.storage=u.storage:V0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=rv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=rv(this.memoryStorage)),_t()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c),(c.data.event==="TOKEN_REFRESHED"||c.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}u.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${I0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let s={},a="none";if(_t()&&(s=VO(window.location.href),this._isImplicitGrantCallback(s)?a="implicit":await this._isPKCECallback(s)&&(a="pkce")),_t()&&this.detectSessionInUrl&&a!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),NO(u)){const p=(t=u.details)===null||t===void 0?void 0:t.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:d}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="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 cn("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var s,a,l;try{const u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(s=t?.options)===null||s===void 0?void 0:s.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(l=t?.options)===null||l===void 0?void 0:l.captchaToken}},xform:en}),{data:c,error:d}=u;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});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(t){var s,a,l;try{let u;if("email"in t){const{email:y,password:m,options:b}=t;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await rs(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:w},xform:en})}else if("phone"in t){const{phone:y,password:m,options:b}=t;u=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:m,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:en})}else throw new Al("You must provide either an email or phone number and a password");const{data:c,error:d}=u;if(d||!c)return await Xe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});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 Xe(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(t){try{let s;if("email"in t){const{email:u,password:c,options:d}=t;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:d?.captchaToken}},xform:tv})}else if("phone"in t){const{phone:u,password:c,options:d}=t;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:d?.captchaToken}},xform:tv})}else throw new Al("You must provide either an email or phone number and a password");const{data:a,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a||!a.session||!a.user){const u=new si;return this._returnResult({data:{user:null,session:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:l})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(t){var s,a,l,u;return await this._handleProviderSignIn(t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=t.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:s}=t;switch(s){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(t){var s,a,l,u,c,d,p,g,y,m,b;let _,w;if("message"in t)_=t.message,w=t.signature;else{const{chain:A,wallet:R,statement:O,options:D}=t;let j;if(_t())if(typeof R=="object")j=R;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 R!="object"||!D?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=R}const L=new URL((s=D?.url)!==null&&s!==void 0?s:window.location.href),Q=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(!Q||Q.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");
54const V=F0(Q[0]);let q=(a=D?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!q){const J=await j.request({method:"eth_chainId"});q=pC(J)}const K={domain:L.host,address:V,statement:O,uri:L.href,version:"1",chainId:q,nonce:(l=D?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=D?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=D?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(p=D?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=D?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(y=D?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=mC(K),w=await j.request({method:"personal_sign",params:[gC(_),V]})}try{const{data:A,error:R}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:en});if(R)throw R;if(!A||!A.session||!A.user){const O=new si;return this._returnResult({data:{user:null,session:null},error:O})}return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:R})}catch(A){if(Z(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(t){var s,a,l,u,c,d,p,g,y,m,b,_;let w,A;if("message"in t)w=t.message,A=t.signature;else{const{chain:R,wallet:O,statement:D,options:j}=t;let L;if(_t())if(typeof O=="object")L=O;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 O!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");L=O}const Q=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:Q.host,uri:Q.href}),D?{statement:D}:null));let q;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")q=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)q=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in q&&"signature"in q&&(typeof q.signedMessage=="string"||q.signedMessage instanceof Uint8Array)&&q.signature instanceof Uint8Array)w=typeof q.signedMessage=="string"?q.signedMessage:new TextDecoder().decode(q.signedMessage),A=q.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");w=[`${Q.host} wants you to sign in with your Solana account:`,L.publicKey.toBase58(),...D?["",D,""]:[""],"Version: 1",`URI: ${Q.href}`,`Issued At: ${(l=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.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}`]:[],...!((d=j?.signInWithSolana)===null||d===void 0)&&d.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(q=>`- ${q}`)]:[]].join(` 55`);const V=await L.signMessage(new TextEncoder().encode(w),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=V}}try{const{data:R,error:O}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:us(A)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:en});if(O)throw O;if(!R||!R.session||!R.user){const D=new si;return this._returnResult({data:{user:null,session:null},error:D})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:O})}catch(R){if(Z(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async _exchangeCodeForSession(t){const s=await an(this.storage,`${this.storageKey}-code-verifier`),[a,l]=(s??"").split("/");try{if(!a&&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:t,code_verifier:a},xform:en});if(await Xe(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const d=new si;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}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 Xe(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(t){try{const{options:s,provider:a,token:l,access_token:u,nonce:c}=t,d=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:en}),{data:p,error:g}=d;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const y=new si;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(t){var s,a,l,u,c;try{if("email"in t){const{email:d,options:p}=t;let g=null,y=null;this.flowType==="pkce"&&([g,y]=await rs(this.storage,this.storageKey));const{error:m}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!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 t){const{phone:d,options:p}=t,{data:g,error:y}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,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 Al("You must provide either an email or phone number.")}catch(d){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(t){var s,a;try{let l,u;"options"in t&&(l=(s=t.options)===null||s===void 0?void 0:s.redirectTo,u=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:c,error:d}=await te(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:en});if(d)throw d;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(t.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(t){var s,a,l,u,c;try{let d=null,p=null;this.flowType==="pkce"&&([d,p]=await rs(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 t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(s=t.options)===null||s===void 0?void 0:s.redirectTo)!==null&&a!==void 0?a:void 0}),!((l=t?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:p}),headers:this.headers,xform:lC});return!((u=g.data)===null||u===void 0)&&u.url&&_t()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(d){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)throw a;if(!s)throw new ut;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(t){if(Z(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const s=`${this.url}/resend`;if("email"in t){const{email:a,type:l,options:u}=t;
55let c=null,d=null;this.flowType==="pkce"&&([c,d]=await rs(this.storage,this.storageKey));const{error:p}=await te(this.fetch,"POST",s,{headers:this.headers,body:{email:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:u?.emailRedirectTo});return p&&await Xe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in t){const{phone:a,type:l,options:u}=t,{data:c,error:d}=await te(this.fetch,"POST",s,{headers:this.headers,body:{phone:a,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new Al("You must provide either an email or phone number and a type")}catch(s){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,s){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await a,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=s();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await t(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const s=await an(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?t=s:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<$h:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const c=await an(this.userStorage,this.storageKey+"-user");c?.user?t.user=c.user:t.user=Gh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};t.user=sC(t.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:l,error:u}=await this._callRefreshToken(t.refresh_token);if(u){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const d=await an(this.storage,this.storageKey);if(d&&d.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:u})}return this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let s;return this.lock!=null?s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):s=await this._getUser(),s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(t){try{return t?await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ar}):await this._useSession(async s=>{var a,l,u;const{data:c,error:d}=s;if(d)throw d;return!(!((a=c.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ut}: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:Ar})})}catch(s){if(Z(s))return Rl(s)&&(await this._removeSession(),await Xe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(t,s={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,s)):await this._updateUser(t,s)}async _updateUser(t,s={}){try{return await this._useSession(async a=>{const{data:l,error:u}=a;if(u)throw u;if(!l.session)throw new ut;const c=l.session;let d=null,p=null;this.flowType==="pkce"&&t.email!=null&&([d,p]=await rs(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({},t),{code_challenge:d,code_challenge_method:p}),jwt:c.access_token,xform:Ar});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(a){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new ut;const s=Date.now()/1e3;let a=s,l=!0,u=null;const{payload:c}=Cl(t.access_token);if(c.exp&&(a=c.exp,l=a<=s),l){const{data:d,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!d)return{data:{user:null,session:null},error:null};u=d}else{const{data:d,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:t.access_token,refresh_token:t.refresh_token,user:d.user,token_type:"bearer",expires_in:a-s,expires_at:a},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(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async s=>{var a;if(!t){const{data:c,error:d}=s;
55if(d)throw d;t=(a=c.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new ut;const{data:l,error:u}=await this._callRefreshToken(t.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(t,s){var a;try{if(!_t())throw new Ol("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Ol(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new Ky("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ol("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Ky("No code detected.");const{data:j,error:L}=await this._exchangeCodeForSession(t.code);if(L)throw L;const Q=new URL(window.location.href);return Q.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Q.toString()),{data:{session:j.session,redirectType:(a=j.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:d,expires_in:p,expires_at:g,token_type:y}=t;if(!c||!p||!d||!y)throw new Ol("No session defined in URL");const m=Math.round(Date.now()/1e3),b=parseInt(p);let _=m+b;g&&(_=parseInt(g));const w=_-m;w*1e3<=Fn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const A=_-b;m-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,_,m):m-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,_,m);const{data:R,error:O}=await this._getUser(c);if(O)throw O;const D={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:d,token_type:y,user:R.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:D,redirectType:t.type},error:null})}catch(l){if(Z(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const s=await an(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&s)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async s=>{var a;const{data:l,error:u}=s;if(u&&!Rl(u))return this._returnResult({error:u});const c=(a=l.session)===null||a===void 0?void 0:a.access_token;if(c){const{error:d}=await this.admin.signOut(c,t);if(d&&!(UO(d)&&(d.status===404||d.status===401||d.status===403)||Rl(d)))return this._returnResult({error:d})}return t!=="others"&&(await this._removeSession(),await Xe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const s=GO(),a={id:s,callback:t,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,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)}):await this._emitInitialSession(s)))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async s=>{var a,l;try{const{data:{session:u},error:c}=s;if(c)throw c;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",t,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(t))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",u),Rl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(t,s={}){let a=null,l=null;this.flowType==="pkce"&&([a,l]=await rs(this.storage,this.storageKey,!0));try{return await te(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(u){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var t;try{const{data:s,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=s.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var s;try{const{data:a,error:l}=await this._useSession(async u=>{var c,d,p,g,y;const{data:m,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(c=t.options)===null||c===void 0?void 0:c.redirectTo,scopes:(d=t.options)===null||d===void 0?void 0:d.scopes,queryParams:(p=t.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 _t()&&!(!((s=t.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(Z(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async s=>{var a;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:c,provider:d,token:p,access_token:g,nonce:y}=t,m=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=u?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:d,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:_}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new si}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await Xe(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(t){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)throw c;return await te(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(l=(a=u.session)===null||a===void 0?void 0:a.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(t){const s="#_refreshAccessToken()";this._debug(s,"begin");try{const a=Date.now();return await YO(async l=>(l>0&&await FO(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:t},headers:this.headers,xform:en})),(l,u)=>{const c=200*Math.pow(2,l);return u&&Fy(u)&&Date.now()+c-a<Fn})}catch(a){if(this._debug(s,"error",a),Z(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(s,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,s){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",s,"url",a),_t()&&!s.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,s;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const l=await an(this.storage,this.storageKey);if(l&&this.userStorage){let c=await an(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await ui(this.userStorage,this.storageKey+"-user",c)),l.user=(t=c?.user)!==null&&t!==void 0?t:Gh()}else if(l&&!l.user&&!l.user){const c=await an(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await Xe(this.storage,this.storageKey+"-user"),await ui(this.storage,this.storageKey,l)):l.user=Gh()}if(this._debug(a,"session from storage",l),!this._isValidSession(l)){this._debug(a,"session is not valid"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<$h;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${$h}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(zO(c)?this._debug(a,"refresh discarded by commit guard",c):this._debug(a,"refresh failed",c))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(l.access_token);!d&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(a,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(a,"error",l),console.error(l);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var s,a;if(!t)throw new ut;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const l="#_callRefreshToken()";this._debug(l,"begin");try{this.refreshingDeferred=new uu;const u=await an(this.storage,this.storageKey),{data:c,error:d}=await this._refreshAccessToken(t);if(d)throw d;if(!c.session)throw new ut;const p=await an(this.storage,this.storageKey);if(u!==null&&(p===null||p.refresh_token!==u.refresh_token)){this._debug(l,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new Yy};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==y){this._debug(l,"commit guard (post-save): _removeSession ran during _saveSession, und
55oing write"),await Xe(this.storage,this.storageKey),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Yy};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const m={data:c.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(m),m}catch(u){if(this._debug(l,"error",u),Z(u)){const c={data:null,error:u};if(!Fy(u)){const d=await an(this.storage,this.storageKey);!!(d?.expires_at&&d.expires_at*1e3>Date.now())?this._debug(l,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:c,expiresAt:Date.now()+OO},(s=this.refreshingDeferred)===null||s===void 0||s.resolve(c),c}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(t,s,a=!0){const l=`#_notifyAllSubscribers(${t})`;this._debug(l,"begin",s,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:s});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(t,s)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let d=0;d<u.length;d+=1)console.error(u[d]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Xe(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},t),a=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&s.user&&await ui(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=Wy(l);await ui(this.storage,this.storageKey,u)}else{const l=Wy(s);await ui(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Xe(this.storage,this.storageKey),await Xe(this.storage,this.storageKey+"-code-verifier"),await Xe(this.storage,this.storageKey+"-user"),this.userStorage&&await Xe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&_t()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Fn);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);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 t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);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 dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-t)/Fn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Fn}ms, refresh threshold is ${Aa} ticks`),l<=Aa&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s
55)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof fC)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((a.expires_at*1e3-t)/Fn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Fn}ms, refresh threshold is ${Aa} ticks`),l<=Aa&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!_t()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const s=`#_onVisibilityChanged(${t})`;if(this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)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()});else{if(document.visibilityState!=="visible"){this._debug(s,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,s,a){const l=[`provider=${encodeURIComponent(s)}`];if(a?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&l.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[u,c]=await rs(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(d.toString())}if(a?.queryParams){const u=new URLSearchParams(a.queryParams);l.push(u.toString())}return a?.skipBrowserRedirect&&l.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${l.join("&")}`}async _unenroll(t){try{return await this._useSession(async s=>{var a;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await te(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(t){try{return await this._useSession(async s=>{var a,l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:g}=await te(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(a=u?.session)===null||a===void 0?void 0:a.access_token});return g?this._returnResult({data:null,error:g}):(t.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(t){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?av(t.webauthn.credential_response):ov(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:g}=await te(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:d,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});return g?this._returnResult({data:null,error:g}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:g}))})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challenge(t){const s=async()=>{try{return await this._useSession(async a=>{var l;const{data:u,error:c}=a;if(c)return this._returnResult({data:null,error:c});const d=await te(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(d.error)return d;const{data:p}=d;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:sv(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:iv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challengeAndVerify(t){const{data:s,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:s.id,code:t.code})}async _listFactors(){var t;const{data:{user:s},error:a}=await this.getUser();if(a)return{data:null,error:a};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(t=s?.factors)!==null&&t!==void 0?t:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(t){var s,a,l,u;if(t)try{const{payload:_}=Cl(t);let w=null;_.aal&&(w=_.aal);let A=w;const{data:{user:R},error:O}=await this.getUser(t);if(O)return this._returnResult({data:null,error:O});((a=(s=R?.factors)===null||s===void 0?void 0:s.filter(L=>L.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(A="aal2");const j=_.amr||[];return{data:{currentLevel:w,nextLevel:A,currentAuthenticationMethods:j},error:null}}catch(_){if(Z(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:d}
55=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Cl(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(t){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?await te(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new ut})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ut});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&_t()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:l},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ut});const c=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&_t()&&!s?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;return a?this._returnResult({data:null,error:a}):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 ut})})}catch(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;return l?this._returnResult({data:null,error:l}):a?(await te(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ut})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(t,s={keys:[]}){let a=s.keys.find(d=>d.kid===t);if(a)return a;const l=Date.now();if(a=this.jwks.keys.find(d=>d.kid===t),a&&this.jwks_cached_at+MO>l)return a;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,a=u.keys.find(d=>d.kid===t),!a)?null:a}async getClaims(t,s={}){try{let a=t;if(!a){const{data:_,error:w}
55=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});a=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:d,payload:p}}=Cl(a);if(!s?.allowExpired)try{tC(u.exp)}catch(_){throw new Vl(_ instanceof Error?_.message:"JWT validation failed")}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(a);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const y=nC(l.alg),m=await crypto.subtle.importKey("jwk",g,y,!0,["verify"]);if(!await crypto.subtle.verify(y,m,c,IO(`${d}.${p}`)))throw new Vl("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var s,a,l;on(this.experimental);try{if(!Yl())return this._returnResult({data:null,error:new cn("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const d=iv(u.options),p=(l=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&l!==void 0?l:mf.createNewAbortSignal(),{data:g,error:y}=await J0({publicKey:d,signal:p});if(y||!g)return this._returnResult({data:null,error:y??new cn("WebAuthn ceremony failed",null)});const m=ov(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(t){var s,a;on(this.experimental);try{if(!Yl())return this._returnResult({data:null,error:new cn("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=sv(l.options),d=(a=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&a!==void 0?a:mf.createNewAbortSignal(),{data:p,error:g}=await Q0({publicKey:c,signal:d});if(g||!p)return this._returnResult({data:null,error:g??new cn("WebAuthn ceremony failed",null)});const y=av(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(){on(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new ut});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(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){on(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ut});const{data:u,error:c}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.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(t){var s;on(this.experimental);try{const{data:a,error:l}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})}catch(a){if(Z(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){on(this.experimental);try{const{data:s,error:a}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:en});return a?this._returnResult({data:null,error:a}):(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(){on(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new ut});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(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){on(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ut});const{data:u,error:c}=await te(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.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(t){on(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!a)return this._returnResult({data:null,error:new ut});const{error:u}
55=await te(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.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}}}qa.nextInstanceID={};const AC=qa,OC="2.108.2";let Oa="",Jl;if(typeof Deno<"u"){var Kh;Oa="deno",Jl=(Kh=Deno.version)===null||Kh===void 0?void 0:Kh.deno}else if(typeof document<"u")Oa="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Oa="react-native";else{var Fh;Oa="node",Jl=typeof process<"u"?(Fh=process.version)===null||Fh===void 0?void 0:Fh.replace(/^v/,""):void 0}const X0=[`runtime=${Oa}`];Jl&&X0.push(`runtime-version=${Jl}`);const CC={"X-Client-Info":`supabase-js/${OC}; ${X0.join("; ")}`},xC={headers:CC},kC={schema:"public"},jC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},MC={},DC={enabled:!1,respectSamplingDecision:!0};function UC(e,t,s,a){function l(u){return u instanceof s?u:new s(function(c){c(u)})}return new(s||(s=Promise))(function(u,c){function d(y){try{g(a.next(y))}catch(m){c(m)}}function p(y){try{g(a.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(d,p)}g((a=a.apply(e,[])).next())})}let Yh=null;const NC="@opentelemetry/api";function LC(){return Yh===null&&(Yh=import(NC).catch(()=>null)),Yh}function zC(){return UC(this,void 0,void 0,function*(){try{const e=yield LC();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const s=t.traceparent;return s?{traceparent:s,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function PC(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[s,a,l,u]=t;if(s.length!==2||a.length!==32||l.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(s)||!c.test(a)||!c.test(l)||!c.test(u)||a==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:s,traceId:a,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function BC(e,t){if(!e||!t||t.length===0)return!1;let s;if(e instanceof URL)s=e;else try{s=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(HC(s.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(s.hostname))return!0}else if(typeof a=="function"&&a(s))return!0}catch{continue}return!1}function HC(e,t){if(t===e)return!0;if(t.startsWith("*.")){const s=t.slice(2);if(e.endsWith(s)&&(e===s||e.endsWith("."+s)))return!0}return!1}function qC(e){const t=[];try{const s=new URL(e);t.push(s.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Ia(e){"@babel/helpers - typeof";return Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(e)}function IC(e,t){if(Ia(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(Ia(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $C(e){var t=IC(e,"string");return Ia(t)=="symbol"?t:t+""}function GC(e,t,s){return(t=$C(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function lv(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,a)}return s}function Ke(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?lv(Object(s),!0).forEach(function(a){GC(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):lv(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}const VC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),KC=()=>Headers,FC=(e,t,s,a,l)=>{const u=VC(a),c=KC(),d=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,g=d?qC(t):null;return async(y,m)=>{var b;const _=(b=await s())!==null&&b!==void 0?b:e;let w=new c(m?.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${_}`),g){const A=await YC(y,g,p);A&&(A.traceparent&&!w.has("traceparent")&&w.set("traceparent",A.traceparent),A.tracestate&&!w.has("tracestate")&&w.set("tracestate",A.tracestate),A.baggage&&!w.has("baggage")&&w.set("baggage",A.baggage))}return u(y,Ke(Ke({},m),{},{headers:w}))}};async function YC(e,t,s){if(!BC(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await zC();if(!a||!a.traceparent)return null;if(s){const l=PC(a.traceparent);if(l&&!l.isSampled)return null}return a}function uv(e){return typeof e=="boolean"?{enabled:e}:e}function QC(e){return e.endsWith("/")?e:e+"/"}function JC(e,t){var s,a,l,u,c,d;const{db:p,auth:g,realtime:y,global:m}=e,{db:b,auth:_,realtime:w,global:A}=t,R=uv(e.tracePropagation),O=uv(t.tracePropagation),D={db:Ke(Ke({},b),p),auth:Ke(Ke({},_),g),realtime:Ke(Ke({},w),y),storage:{},global:Ke(Ke(Ke({},A),m),{},{headers:Ke(Ke({},(s=A?.headers)!==null&&s!==void 0?s:{}),(a=m?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(l=(u=R?.enabled)!==null&&u!==void 0?u:O?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(d=R?.respectSamplingDecision)!==null&&d!==void 0?d:O?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return e.accessToken?D.accessToken=e.accessToken:delete D.accessToken,D}function XC(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");
55if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(QC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var ZC=class extends AC{constructor(e){super(e)}},WC=class{constructor(e,t,s){var a,l;this.supabaseUrl=e,this.supabaseKey=t;const u=XC(e);if(!t)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`,d={db:kC,realtime:MC,auth:Ke(Ke({},jC),{},{storageKey:c}),global:xC,tracePropagation:DC},p=JC(s??{},d);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",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=FC(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),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 s1(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,t={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,s)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,s;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:l,storageKey:u,flowType:c,lock:d,debug:p,throwOnError:g,experimental:y,lockAcquireTimeout:m,skipAutoInitialize:b},_,w){const A={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ZC({url:this.authUrl.href,headers:Ke(Ke({},A),_),storageKey:u,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:l,flowType:c,lock:d,debug:p,throwOnError:g,experimental:y,fetch:w,lockAcquireTimeout:m,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(R=>R.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,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,s){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const ex=(e,t,s)=>new WC(e,t,s);function tx(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const s=t.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}tx()&&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 N
55ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function nx(e){return e.startsWith("sb_publishable_")||e.startsWith("sb_secret_")}function rx(e){return(t,s)=>{const a=new Headers(typeof Request<"u"&&t instanceof Request?t.headers:void 0);return s?.headers&&new Headers(s.headers).forEach((l,u)=>a.set(u,l)),nx(e)&&a.get("Authorization")===`Bearer ${e}`&&a.delete("Authorization"),a.set("apikey",e),fetch(t,{...s,headers:a})}}function sx(){const e="https://zxnrvxxcdujaftmnduaa.supabase.co",t="sb_publishable_8qb99kzH-tiawmB0LFj85Q_NAF1oXqi";return ex(e,t,{global:{fetch:rx(t)},auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let Qh;const Z0=new Proxy({},{get(e,t,s){return Qh||(Qh=sx()),Reflect.get(Qh,t,s)}}),ix=ls({type:"function"}).client(async({next:e})=>{const{data:t}=await Z0.auth.getSession(),s=t.session?.access_token;return e({headers:s?{Authorization:`Bearer ${s}`}:{}})}),ax=ls(),cv=e1(()=>({functionMiddleware:[ix],requestMiddleware:[ax]}));var cu=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(){}},ox=class extends cu{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}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(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},W0=new ox,lx={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ux=class{#e=lx;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},yf=new ux;function cx(e){setTimeout(e,0)}var hx=typeof window>"u"||"Deno"in globalThis;function un(){}function fx(e,t){return typeof e=="function"?e(t):e}function dx(e){return typeof e=="number"&&e>=0&&e!==1/0}function px(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vf(e,t){return typeof e=="function"?e(t):e}function gx(e,t){return typeof e=="function"?e(t):e}function hv(e,t){const{type:s="all",exact:a,fetchStatus:l,predicate:u,queryKey:c,stale:d}=e;if(c){if(a){if(t.queryHash!==Nf(c,t.options))return!1}else if(!Ga(t.queryKey,c))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||l&&l!==t.state.fetchStatus||u&&!u(t))}function fv(e,t){const{exact:s,status:a,predicate:l,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(s){if($a(t.options.mutationKey)!==$a(u))return!1}else if(!Ga(t.options.mutationKey,u))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function Nf(e,t){return(t?.queryKeyHashFn||$a)(e)}function $a(e){return JSON.stringify(e,(t,s)=>bf(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s)}function Ga(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>Ga(e[s],t[s])):!1}var mx=Object.prototype.hasOwnProperty;function eb(e,t,s=0){if(e===t)return e;if(s>500)return t;const a=dv(e)&&dv(t);if(!a&&!(bf(e)&&bf(t)))return t;const u=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),d=c.length,p=a?new Array(d):{};let g=0;for(let y=0;y<d;y++){const m=a?y:c[y],b=e[m],_=t[m];if(b===_){p[m]=b,(a?y<u:mx.call(e,m))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[m]=_;continue}const w=eb(b,_,s+1);p[m]=w,w===b&&g++}return u===d&&g===u?e:p}function dv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bf(e){if(!pv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!pv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function pv(e){return Object.prototype.toString.call(e)==="[object Object]"}function yx(e){return new Promise(t=>{yf.setTimeout(t,e)})}function vx(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?eb(e,t):t}function bx(e,t,s=0){const a=[...e,t];return s&&a.length>s?a.slice(1):a}function _x(e,t,s=0){const a=[t,...e];return s&&a.length>s?a.slice(0,-1):a}var Lf=Symbol();function tb(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Lf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sx(e,t,s){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=t(),a||(a=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),e}var nb=(()=>{let e=()=>hx;return{isServer(){return e()},setIsServer(t){e=t}}})();function wx(){let e,t;const s=new Promise((l,u)=>{e=l,t=u});s.status="pending",s.catch(()=>{});function a(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},s.reject=l=>{a({status:"rejected",reason:l}),t(l)},s}var Ex=cx;function Tx(){let e=[],t=0,s=d=>{d()},a=d=>{d()},l=Ex;const u=d=>{t?e.push(d):l(()=>{s(d)})},c=()=>{const d=e;e=[],d.length&&l(()=>{a(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;t++;try{p=d()}finally{t--,t||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{l=d}}}var wt=Tx(),Rx=class extends cu{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),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))}
vendor: 25,002 bytes, line 55
55setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Xl=new Rx;function Ax(e){return Math.min(1e3*2**e,3e4)}function rb(e){return(e??"online")==="online"?Xl.isOnline():!0}var _f=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function sb(e){let t=!1,s=0,a;const l=wx(),u=()=>l.status!=="pending",c=A=>{if(!u()){const R=new _f(A);b(R),e.onCancel?.(R)}},d=()=>{t=!0},p=()=>{t=!1},g=()=>W0.isFocused()&&(e.networkMode==="always"||Xl.isOnline())&&e.canRun(),y=()=>rb(e.networkMode)&&e.canRun(),m=A=>{u()||(a?.(),l.resolve(A))},b=A=>{u()||(a?.(),l.reject(A))},_=()=>new Promise(A=>{a=R=>{(u()||g())&&A(R)},e.onPause?.()}).then(()=>{a=void 0,u()||e.onContinue?.()}),w=()=>{if(u())return;let A;const R=s===0?e.initialPromise:void 0;try{A=R??e.fn()}catch(O){A=Promise.reject(O)}Promise.resolve(A).then(m).catch(O=>{if(u())return;const D=e.retry??(nb.isServer()?0:3),j=e.retryDelay??Ax,L=typeof j=="function"?j(s,O):j,Q=D===!0||typeof D=="number"&&s<D||typeof D=="function"&&D(s,O);if(t||!Q){b(O);return}s++,e.onFail?.(s,O),yx(L).then(()=>g()?void 0:_()).then(()=>{t?b(O):w()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:p,canStart:y,start:()=>(y()?w():_().then(w),l)}}var ib=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dx(this.gcTime)&&(this.#e=yf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(nb.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(yf.clearTimeout(this.#e),this.#e=void 0)}},Ox=class extends ib{#e;#n;#t;#s;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=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=mv(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.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=mv(this.options);t.data!==void 0&&(this.setState(gv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const s=vx(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(un).catch(un):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=>gx(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=>vf(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:!px(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.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(t=>t!==e),this.observers.length||(this.#r&&(this.#a||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,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.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 d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},l=()=>{const d=tb(this.options,t),g=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#a=!1,this.options.persister?this.options.persister(d,g,this):d(g)},c=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:l};return a(d),d})();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=sb({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof _f&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,p)=>{this.#o({type:"failed",failureCount:d,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 d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof _f){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(e){const t=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,...Cx(s.data,this.options),fetchMeta:e.meta??null};case"success":const a={...s,...gv(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;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=t(this.state),wt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function Cx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,a=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function yv(e){return{onFetch:(t,s)=>{const a=t.options,l=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const m=w=>{Sx(w,()=>t.signal,()=>y=!0)},b=tb(t.options,t.fetchOptions),_=async(w,A,R)=>{if(y)return Promise.reject();if(A==null&&w.pages.length)return Promise.resolve(w);const D=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:A,direction:R?"backward":"forward",meta:t.options.meta};return m(V),V})(),j=await b(D),{maxPages:L}=t.options,Q=R?_x:bx;return{pages:Q(w.pages,j,L),pageParams:Q(w.pageParams,A,L)}};if(l&&u.length){const w=l==="backward",A=w?xx:vv,R={pages:u,pageParams:c},O=A(a,R);d=await _(R,O,w)}else{const w=e??u.length;do{const A=p===0?c[0]??a.initialPageParam:vv(a,d);if(p>0&&A==null)break;d=await _(d,A),p++}while(p<w)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=g}}}function vv(e,{pages:t,pageParams:s}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,s[a],s):void 0}function xx(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var kx=class extends ib{#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||jx(),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(t=>t!==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 t=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=sb({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:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",l=!this.#s.canStart();try{if(a)t();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 t=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=t(this.state),wt.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function jx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mx=class extends cu{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,s){const a=new kx({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:s});return this.add(a),a}add(e){this.#e.add(e);const t=xl(e);if(typeof t=="string"){const s=this.#n.get(t);s?s.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=xl(e);if(typeof t=="string"){const s=this.#n.get(t);if(s)if(s.length>1){const a=s.indexOf(e);a!==-1&&s.splice(a,1)}else s[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=xl(e);if(typeof t=="string"){const a=this.#n.get(t)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=xl(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wt.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 t={exact:!0,...e};return this.getAll().find(s=>fv(t,s))}findAll(e={}){return this.getAll().filter(t=>fv(e,t))}notify(e){wt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return wt.batch(()=>Promise.all(e.map(t=>t.continue().catch(un))))}};function xl(e){return e.options.scope?.id}var Dx=class extends cu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const a=t.queryKey,l=t.queryHash??Nf(a,t);let u=this.get(l);return u||(u=new Ox({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(a)}),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 t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){wt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>hv(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>hv(e,s)):t}notify(e){wt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ux=class{#e;#n;#t;#s;#r;#i;#a;#l;constructor(e={}){this.#e=e.queryCache||new Dx,this.#n=e.mutationCache||new Mx,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=W0.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Xl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=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 t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),a=s.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(vf(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const a=s.data;return[t,a]})}setQueryData(e,t,s){const a=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(a.queryHash)?.state.data,c=fx(t,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return wt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;wt.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return wt.batch(()=>(s.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},a=wt.batch(()=>this.#e.findAll(e).map(l=>l.cancel(s)));return Promise.all(a).then(un).catch(un)}invalidateQueries(e,t={}){return wt.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},a=wt.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(un)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(un)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(vf(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(un).catch(un)}fetchInfiniteQuery(e){return e.behavior=yv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(un).catch(un)}ensureInfiniteQueryData(e){return e.behavior=yv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Xl.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,t){this.#s.set($a(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],s={};return t.forEach(a=>{Ga(e,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(e,t){this.#r.set($a(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(a=>{Ga(e,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Nf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Lf&&(t.enabled=!1),t}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()}},Nx=re.createContext(void 0),Lx=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),F.jsx(Nx.Provider,{value:e,children:t}));const zx="/assets/styles-B6oOWyrp.css";function Px(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function Bx(){return F.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:F.jsxs("div",{className:"max-w-md text-center",children:[F.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),F.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),F.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),F.jsx("div",{className:"mt-6",children:F.jsx(Mf,{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",children:"Go home"})})]})})}function Hx({error:e,reset:t}){console.error(e);const s=yt();return re.useEffect(()=>{Px(e,{boundary:"tanstack_root_error_component"})},[e]),F.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:F.jsxs("div",{className:"max-w-md text-center",children:[F.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),F.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."}),F.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[F.jsx("button",{onClick:()=>{s.invalidate(),t()},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",children:"Try again"}),F.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",children:"Go home"})]})]})})}const bi=kA()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Dan Business Club - Adhésion"},{name:"description",content:"Collects prospect information for a Judo club, sending inquiries to a designated email address."},{name:"author",content:"Lovable"},{property:"og:title",content:"Dan Business Club - Adhésion"},{property:"og:description",content:"Collects prospect information for a Judo club, sending inquiries to a designated email address."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:site",content:"@Lovable"},{name:"twitter:title",content:"Dan Business Club - Adhésion"},{name:"twitter:description",content:"Collects prospect information for a Judo club, sending inquiries to a designated email address."},{property:"og:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/c26f97df-6557-4bb6-abec-591cf71690e1/id-preview-a2ce2aff--b9e24975-277f-4084-b6ca-19eea2dfe84a.lovable.app-1781684868112.png"},{name:"twitter:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/c26f97df-6557-4bb6-abec-591cf71690e1/id-preview-a2ce2aff--b9e24975-277f-4084-b6ca-19eea2dfe84a.lovable.app-1781684868112.png"}],links:[{rel:"stylesheet",href:zx}]}),shellComponent:qx,component:Ix,notFoundComponent:Bx,errorComponent:Hx});function qx({children:e}){return F.jsxs("html",{lang:"en",children:[F.jsx("head",{children:F.jsx(XA,{})}),F.jsxs("body",{children:[e,F.jsx(ZA,{})]})]})}function Ix(){const{queryClient:e}=bi.useRouteContext();return F.jsx(Lx,{client:e,children:F.jsx(O0,{})})}const $x="modulepreload",Gx=function(e){return"/"+e},bv={},Ja=function(t,s,a){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]"),d=c?.nonce||c?.getAttribute("nonce");l=p(s.map(g=>{if(g=Gx(g),g in bv)return;bv[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":$x,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((_,w)=>{b.addEventListener("load",_),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return l.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return t().catch(u)})},Vx=()=>Ja(()=>import("./contact-BN6yoPHC.js"),[]),Kx=Fa("/contact")({head:()=>({meta:[{title:"Dan Business Club â Rejoignez le cercle"},{name:"description",content:"Le cercle exclusif des dirigeants et passionnés de judo. Rejoignez le Dan Business Club by France Judo."}]}),component:Ya(Vx,"component")}),Fx=()=>Ja(()=>import("./auth-FPboCxsP.js"),__vite__mapDeps([0,1])),Yx=Fa("/auth")({head:()=>({meta:[{title:"Admin â Dan Business Club"},{name:"robots",content:"noindex,nofollow"}]}),component:Ya(Fx,"component")}),Qx=()=>Ja(()=>import("./route-Cg8oFN7G.js"),[]),Jx=Fa("/_authenticated")({beforeLoad:async()=>{const{data:e,error:t}=await Z0.auth.getUser();if(t||!e.user)throw Tf({to:"/auth"});return{user:e.user}},component:Ya(Qx,"component")}),Xx=()=>Ja(()=>import("./index-BUnMLeIm.js"),[]),Zx=Fa("/")({head:()=>({meta:[{title:"Dan Business Club â Rejoignez le cercle"},{name:"description",content:"Le cercle exclusif des dirigeants et passionnés de judo. Rejoignez le Dan Business Club by France Judo."}]}),component:Ya(Xx,"component")}),Wx=()=>Ja(()=>
55import("./admin-DO1Hr63c.js"),__vite__mapDeps([2,1])),ek=Fa("/_authenticated/admin")({head:()=>({meta:[{title:"Admin â Dan Business Club"},{name:"robots",content:"noindex"}]}),component:Ya(Wx,"component")}),tk=Kx.update({id:"/contact",path:"/contact",getParentRoute:()=>bi}),nk=Yx.update({id:"/auth",path:"/auth",getParentRoute:()=>bi}),ab=Jx.update({id:"/_authenticated",getParentRoute:()=>bi}),rk=Zx.update({id:"/",path:"/",getParentRoute:()=>bi}),sk=ek.update({id:"/admin",path:"/admin",getParentRoute:()=>ab}),ik={AuthenticatedAdminRoute:sk},ak=ab._addFileChildren(ik),ok={IndexRoute:rk,AuthenticatedRouteRoute:ak,AuthRoute:nk,ContactRoute:tk},lk=bi._addFileChildren(ok),uk=()=>{const e=new Ux;return GA({routeTree:lk,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function ck(){const e=await uk();let t;if(cv){const s=await cv.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,t=s.serializationAdapters,e.options.defaultSsr=s.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(YR),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await JR(e),e}async function hk(){const e=await ck();return window.$_TSR?.h(),e}var Jh;function fk(){return Jh||(Jh=hk()),F.jsx(eA,{promise:Jh,children:e=>F.jsx(FA,{router:e})})}re.startTransition(()=>{LS.hydrateRoot(document,F.jsx(re.StrictMode,{children:F.jsx(fk,{})}))});export{Mf as L,O0 as O,dk as R,pk as T,yt as a,FR as b,ls as c,Sv as g,Mt as i,F as j,Tw as p,re as r,Z0 as s,E0 as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.