vendor: 3,202 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-06FE59lS.js","assets/PageShell-CFju-0a6.js","assets/useSiteContent-B8yfFcgI.js","assets/useQuery-AUGL08jU.js","assets/TourDatesList-mFIAnJe0.js","assets/createServerFn-BJkYcoZ2.js","assets/useHub-CH2W4ts5.js","assets/useLightbox-D23GJDlh.js","assets/usePhotos-BF8aueNe.js","assets/about-DULHUxOs.js","assets/auth-7D3vaIf5.js","assets/contact-DnwZglXD.js","assets/epk-CRDZ6D1Y.js","assets/ReleasesGrid-By7BG-K9.js","assets/journal-D3DKq0wg.js","assets/listening-Ddi1e6eK.js","assets/music-CB5EKG4F.js","assets/pager-CUbMcr-Z.js","assets/store-COZffCpG.js","assets/tour-CFdvQmEm.js","assets/admin-B2jz0C9o.js","assets/useAuth-CxP84Wvx.js","assets/adminhq-BOCiHITO.js","assets/store-admin-yk02z6Up.js","assets/adminhq.index-Dypuo464.js","assets/parts-CJoGnxIF.js","assets/adminhq.content-CA3zmJB2.js","assets/adminhq.photos-DqViZ1gx.js","assets/adminhq.promo-Bdmza8II.js","assets/adminhq.subscribers-BawMHE1k.js","assets/adminhq.team-B5vTJtOm.js"])))=>i.map(i=>d[i]); 2function RS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Lf={exports:{}},ya={};var sy;function OS(){if(sy)return ya;sy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(s,l,u){var c=null;if(u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),"key"in l){u={};for(var h in l)h!=="key"&&(u[h]=l[h])}else u=l;return l=u.ref,{$$typeof:t,type:s,key:c,ref:l!==void 0?l:null,props:u}}return ya.Fragment=e,ya.jsx=r,ya.jsxs=r,ya}var ay;function kS(){return ay||(ay=1,Lf.exports=OS()),Lf.exports}var J=kS(),Uf={exports:{}},pe={};var oy;function CS(){if(oy)return pe;oy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=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 S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function R(k,I,Y){this.props=k,this.context=I,this.refs=T,this.updater=Y||S}R.prototype.isReactComponent={},R.prototype.setState=function(k,I){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,I,"setState")},R.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function C(){}C.prototype=R.prototype;function D(k,I,Y){this.props=k,this.context=I,this.refs=T,this.updater=Y||S}var H=D.prototype=new C;H.constructor=D,E(H,R.prototype),H.isPureReactComponent=!0;var F=Array.isArray;function B(){}var j={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function W(k,I,Y){var te=Y.ref;return{$$typeof:t,type:k,key:I,ref:te!==void 0?te:null,props:Y}}
vendor: 18,573 bytes, lines 2-4
2function se(k,I){return W(k.type,I,k.props)}function K(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function G(k){var I={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Y){return I[Y]})}var Z=/\/+/g;function he(k,I){return typeof k=="object"&&k!==null&&k.key!=null?G(""+k.key):I.toString(36)}function re(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(B,B):(k.status="pending",k.then(function(I){k.status==="pending"&&(k.status="fulfilled",k.value=I)},function(I){k.status==="pending"&&(k.status="rejected",k.reason=I)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function M(k,I,Y,te,de){var ye=typeof k;(ye==="undefined"||ye==="boolean")&&(k=null);var ce=!1;if(k===null)ce=!0;else switch(ye){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(k.$$typeof){case t:case e:ce=!0;break;case y:return ce=k._init,M(ce(k._payload),I,Y,te,de)}}if(ce)return de=de(k),ce=te===""?"."+he(k,0):te,F(de)?(Y="",ce!=null&&(Y=ce.replace(Z,"$&/")+"/"),M(de,I,Y,"",function(dn){return dn})):de!=null&&(K(de)&&(de=se(de,Y+(de.key==null||k&&k.key===de.key?"":(""+de.key).replace(Z,"$&/")+"/")+ce)),I.push(de)),1;ce=0;var ke=te===""?".":te+":";if(F(k))for(var ze=0;ze<k.length;ze++)te=k[ze],ye=ke+he(te,ze),ce+=M(te,I,Y,ye,de);else if(ze=_(k),typeof ze=="function")for(k=ze.call(k),ze=0;!(te=k.next()).done;)te=te.value,ye=ke+he(te,ze++),ce+=M(te,I,Y,ye,de);else if(ye==="object"){if(typeof k.then=="function")return M(re(k),I,Y,te,de);throw I=String(k),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ce}function Q(k,I,Y){if(k==null)return k;var te=[],de=0;return M(k,te,"","",function(ye){return I.call(Y,ye,de++)}),te}function oe(k){if(k._status===-1){var I=k._result;I=I(),I.then(function(Y){(k._status===0||k._status===-1)&&(k._status=1,k._result=Y)},function(Y){(k._status===0||k._status===-1)&&(k._status=2,k._result=Y)}),k._status===-1&&(k._status=0,k._result=I)}if(k._status===1)return k._result.default;throw k._result}var Oe=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=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(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},_e={map:Q,forEach:function(k,I,Y){Q(k,function(){I.apply(this,arguments)},Y)},count:function(k){var I=0;return Q(k,function(){I++}),I},toArray:function(k){return Q(k,function(I){return I})||[]},only:function(k){if(!K(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return pe.Activity=m,pe.Children=_e,pe.Component=R,pe.Fragment=r,pe.Profiler=l,pe.PureComponent=D,pe.StrictMode=s,pe.Suspense=p,pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,pe.__COMPILER_RUNTIME={__proto__:null,c:function(k){return j.H.useMemoCache(k)}},pe.cache=function(k){return function(){return k.apply(null,arguments)}},pe.cacheSignal=function(){return null},pe.cloneElement=function(k,I,Y){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var te=E({},k.props),de=k.key;if(I!=null)for(ye in I.key!==void 0&&(de=""+I.key),I)!V.call(I,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&I.ref===void 0||(te[ye]=I[ye]);var ye=arguments.length-2;if(ye===1)te.children=Y;else if(1<ye){for(var ce=Array(ye),ke=0;ke<ye;ke++)ce[ke]=arguments[ke+2];te.children=ce}return W(k.type,de,te)},pe.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},pe.createElement=function(k,I,Y){var te,de={},ye=null;if(I!=null)for(te in I.key!==void 0&&(ye=""+I.key),I)V.call(I,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(de[te]=I[te]);var ce=arguments.length-2;if(ce===1)de.children=Y;else if(1<ce){for(var ke=Array(ce),ze=0;ze<ce;ze++)ke[ze]=arguments[ze+2];de.children=ke}if(k&&k.defaultProps)for(te in ce=k.defaultProps,ce)de[te]===void 0&&(de[te]=ce[te]);return W(k,ye,de)},pe.createRef=function(){return{current:null}},pe.forwardRef=function(k){return{$$typeof:h,render:k}},pe.isValidElement=K,pe.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:oe}},pe.memo=function(k,I){return{$$typeof:g,type:k,compare:I===void 0?null:I}},pe.startTransition=function(k){var I=j.T,Y={};j.T=Y;try{var te=k(),de=j.S;de!==null&&de(Y,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(B,Oe)}catch(ye){Oe(ye)}finally{I!==null&&Y.types!==null&&(I.types=Y.types),j.T=I}},pe.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},pe.use=function(k){return j.H.use(k)},pe.useActionState=function(k,I,Y){return j.H.useActionState(k,I,Y)},pe.useCallback=function(k,I){return j.H.useCallback(k,I)},pe.useContext=function(k){return j.H.useContext(k)},pe.useDebugValue=function(){},pe.useDeferredValue=function(k,I){return j.H.useDeferredValue(k,I)},pe.useEffect=function(k,I){return j.H.useEffect(k,I)},pe.useEffectEvent=function(k){return j.H.useEffectEvent(k)},pe.useId=function(){return j.H.useId()},pe.useImperativeHandle=function(k,I,Y){return j.H.useImperativeHandle(k,I,Y)},pe.useInsertionEffect=function(k,I){return j.H.useInsertionEffect(k,I)},pe.useLayoutEffect=function(k,I){return j.H.useLayoutEffect(k,I)},pe.useMemo=function(k,I){return j.H.useMemo(k,I)},pe.useOptimistic=function(k,I){return j.H.useOptimistic(k,I)},pe.useReducer=function(k,I,Y){return j.H.useReducer(k,I,Y)},pe.useRef=function(k){return j.H.useRef(k)},pe.useState=function(k){return j.H.useState(k)},pe.useSyncExternalStore=function(k,I,Y){return j.H.useSyncExternalStore(k,I,Y)},pe.useTransition=function(){return j.H.useTransition()},pe.version="19.2.5",pe}var ly;function Ja(){return ly||(ly=1,Uf.exports=CS()),Uf.exports}var ue=Ja();const nu=RS(ue);var Mf={exports:{}},va={},zf={exports:{}},Bf={};var uy;function DS(){return uy||(uy=1,(function(t){function e(M,Q){var oe=M.length;M.push(Q);e:for(;0<oe;){var Oe=oe-1>>>1,_e=M[Oe];if(0<l(_e,Q))M[Oe]=Q,M[oe]=_e,oe=Oe;else break e}}function r(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var Q=M[0],oe=M.pop();if(oe!==Q){M[0]=oe;e:for(var Oe=0,_e=M.length,k=_e>>>1;Oe<k;){var I=2*(Oe+1)-1,Y=M[I],te=I+1,de=M[te];if(0>l(Y,oe))te<_e&&0>l(de,Y)?(M[Oe]=de,M[te]=oe,Oe=te):(M[Oe]=Y,M[I]=oe,Oe=I);else if(te<_e&&0>l(de,oe))M[Oe]=de,M[te]=oe,Oe=te;else break e}}return Q}function l(M,Q){var oe=M.sortIndex-Q.sortIndex;return oe!==0?oe:M.id-Q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,h=c.now();t.unstable_now=function(){return c.now()-h}}var p=[],g=[],y=1,m=null,b=3,_=!1,S=!1,E=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function H(M){for(var Q=r(g);Q!==null;){if(Q.callback===null)s(g);else if(Q.startTime<=M)s(g),Q.sortIndex=Q.expirationTime,e(p,Q);else break;Q=r(g)}}function F(M){if(E=!1,H(M),!S)if(r(p)!==null)S=!0,B||(B=!0,G());else{var Q=r(g);Q!==null&&re(F,Q.startTime-M)}}var B=!1,j=-1,V=5,W=-1;function se(){return T?!0:!(t.unstable_now()-W<V)}function K(){if(T=!1,B){var M=t.unstable_now();W=M;var Q=!0;try{e:{S=!1,E&&(E=!1,C(j),j=-1),_=!0;var oe=b;try{t:{for(H(M),m=r(p);m!==null&&!(m.expirationTime>M&&se());){var Oe=m.callback;if(typeof Oe=="function"){m.callback=null,b=m.priorityLevel;var _e=Oe(m.expirationTime<=M);if(M=t.unstable_now(),typeof _e=="function"){m.callback=_e,H(M),Q=!0;break t}m===r(p)&&s(p),H(M)}else s(p);m=r(p)}if(m!==null)Q=!0;else{var k=r(g);k!==null&&re(F,k.startTime-M),Q=!1}}break e}finally{m=null,b=oe,_=!1}Q=void 0}}finally{Q?G():B=!1}}}var G;if(typeof D=="function")G=function(){D(K)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,he=Z.port2;Z.port1.onmessage=K,G=function(){he.postMessage(null)}}else G=function(){R(K,0)};function re(M,Q){j=R(function(){M(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(M){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var oe=b;b=Q;try{return M()}finally{b=oe}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(M,Q){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var oe=b;b=M;try{return Q()}finally{b=oe}},t.unstable_scheduleCallback=function(M,Q,oe){var Oe=t.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Oe+oe:Oe):oe=Oe,M){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=oe+_e,M={id:y++,callback:Q,priorityLevel:M,startTime:oe,expirationTime:_e,sortIndex:-1},oe>Oe?(M.sortIndex=oe,e(g,M),r(p)===null&&M===r(g)&&(E?(C(j),j=-1):E=!0,re(F,oe-Oe))):(M.sortIndex=_e,e(p,M),S||_||(S=!0,B||(B=!0,G()))),M},t.unstable_shouldYield=se,t.unstable_wrapCallback=function(M){var Q=b;return function(){var oe=b;b=Q;try{return M.apply(this,arguments)}finally{b=oe}}}})(Bf)),Bf}var cy;function xS(){return cy||(cy=1,zf.exports=DS()),zf.exports}var Pf={exports:{}},gt={};var fy;function jS(){if(fy)return gt;fy=1;var t=Ja();function e(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 r(){}var s={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,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=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,gt.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(e(299));return u(p,g,null,y)},gt.flushSync=function(p){var g=c.T,y=s.p;try{if(c.T=null,s.p=2,p)return p()}finally{c.T=g,s.p=y,s.d.f()}},gt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,s.d.C(p,g))},gt.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},gt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,m=h(y,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?s.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:_}):y==="script"&&s.d.X(p,{crossOrigin:m,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},gt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=h(g.as,g.crossOrigin);s.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&&s.d.M(p)},gt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=h(y,g.crossOrigin);s.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})}},gt.preloadModule=function(p,g){if(typeof p=="string")if(g){var y=h(g.as,g.crossOrigin);s.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 s.d.m(p)},gt.requestFormReset=function(p){s.d.r(p)},gt.unstable_batchedUpdates=function(p,g){return p(g)},gt.useFormState=function(p,g,y){return c.H.useFormState(p,g,y)},gt.useFormStatus=function(){return c.H.useHostTransitionStatus()},gt.version="19.2.5",gt}var hy;function NS(){if(hy)return Pf.exports;hy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Pf.exports=jS(),Pf.exports}var dy;function LS(){if(dy)return va;dy=1;var t=xS(),e=Ja(),r=NS();function s(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+i+" 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 i=n,a=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(a=i.return),n=i.return;while(n)}return i.tag===3?a:null}function c(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function h(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(s(188))}function g(n){var i=n.alternate;if(!i){if(i=u(n),i===null)throw Error(s(188));return i!==n?null:n}for(var a=n,o=i;;){var f=a.return;if(f===null)break;var d=f.alternate;if(d===null){if(o=f.return,o!==null){a=o;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===a)return p(f),n;if(d===o)return p(f),i;d=d.sibling}throw Error(s(188))}if(a.return!==o.return)a=f,o=d;else{for(var v=!1,w=f.child;w;){if(w===a){v=!0,a=f,o=d;break}if(w===o){v=!0,o=f,a=d;break}w=w.sibling}if(!v){for(w=d.child;w;){if(w===a){v=!0,a=d,o=f;break}if(w===o){v=!0,o=d,a=f;break}w=w.sibling}if(!v)throw Error(s(189))}}if(a.alternate!==o)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:i}function y(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=y(n),i!==null)return i;n=n.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),D=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function G(n){return n===null||typeof n!="object"?null:(n=K&&n[K]||n["@@iterator"],typeof n=="function"?n:null)}var Z=Symbol.for("react.client.reference");function he(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Z?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case F:return"Suspense";case B:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case D:return n.displayName||"Context";case C:return(n._context.displayName||"Context")+".Consumer";case H:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case j:return i=n.displayName||null,i!==null?i:he(n.type)||"Memo";case V:i=n._payload,n=n._init;try{return he(n(i))}catch{}}return null}var re=Array.isArray,M=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Oe=[],_e=-1;function k(n){return{current:n}}function I(n){0>_e||(n.current=Oe[_e],Oe[_e]=null,_e--)}function Y(n,i){_e++,Oe[_e]=n.current,n.current=i}var te=k(null),de=k(null),ye=k(null),ce=k(null);function ke(n,i){switch(Y(ye,i),Y(de,n),Y(te,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?km(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=km(i),n=Cm(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}I(te),Y(te,n)}function ze(){I(te),I(de),I(ye)}function dn(n){n.memoizedState!==null&&Y(ce,n);var i=te.current,a=Cm(i,n.type);i!==a&&(Y(de,n),Y(te,a))}function qi(n){de.current===n&&(I(te),I(de)),ce.current===n&&(I(ce),da._currentValue=oe)}var Rn,rd;function Ii(n){if(Rn===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);Rn=i&&i[1]||"",rd=-1<a.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Rn+n+rd}var mu=!1;function yu(n,i){if(!n||mu)return"";mu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(i){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(z){var U=z}Reflect.construct(n,[],$)}else{try{$.call()}catch(z){U=z}n.call($.prototype)}}else{try{throw Error()}catch(z){U=z}($=n())&&typeof $.catch=="function"&&$.catch(function(){})}}
vendor: 8,579 bytes, lines 4-9
4catch(z){if(z&&U&&typeof z.stack=="string")return[z.stack,U.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),v=d[0],w=d[1];if(v&&w){var A=v.split(` 5`),L=w.split(` 6`);for(f=o=0;o<A.length&&!A[o].includes("DetermineComponentFrameRoot");)o++;for(;f<L.length&&!L[f].includes("DetermineComponentFrameRoot");)f++;if(o===A.length||f===L.length)for(o=A.length-1,f=L.length-1;1<=o&&0<=f&&A[o]!==L[f];)f--;for(;1<=o&&0<=f;o--,f--)if(A[o]!==L[f]){if(o!==1||f!==1)do if(o--,f--,0>f||A[o]!==L[f]){var P=` 7`+A[o].replace(" at new "," at ");return n.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",n.displayName)),P}while(1<=o&&0<=f);break}}}finally{mu=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?Ii(a):""}function i_(n,i){switch(n.tag){case 26:case 27:case 5:return Ii(n.type);case 16:return Ii("Lazy");case 13:return n.child!==i&&i!==null?Ii("Suspense Fallback"):Ii("Suspense");case 19:return Ii("SuspenseList");case 0:case 15:return yu(n.type,!1);case 11:return yu(n.type.render,!1);case 1:return yu(n.type,!0);case 31:return Ii("Activity");default:return""}}function sd(n){try{var i="",a=null;do i+=i_(n,a),a=n,n=n.return;while(n);return i}catch(o){return` 8Error generating stack: `+o.message+` 9`+o.stack}}var vu=Object.prototype.hasOwnProperty,bu=t.unstable_scheduleCallback,_u=t.unstable_cancelCallback,r_=t.unstable_shouldYield,s_=t.unstable_requestPaint,xt=t.unstable_now,a_=t.unstable_getCurrentPriorityLevel,ad=t.unstable_ImmediatePriority,od=t.unstable_UserBlockingPriority,Za=t.unstable_NormalPriority,o_=t.unstable_LowPriority,ld=t.unstable_IdlePriority,l_=t.log,u_=t.unstable_setDisableYieldValue,As=null,jt=null;function ri(n){if(typeof l_=="function"&&u_(n),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(As,n)}catch{}}var Nt=Math.clz32?Math.clz32:h_,c_=Math.log,f_=Math.LN2;function h_(n){return n>>>=0,n===0?32:31-(c_(n)/f_|0)|0}var Wa=256,eo=262144,to=4194304;function $i(n){var i=n&42;if(i!==0)return i;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,i,a){var o=n.pendingLanes;if(o===0)return 0;var f=0,d=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var w=o&134217727;return w!==0?(o=w&~d,o!==0?f=$i(o):(v&=w,v!==0?f=$i(v):a||(a=w&~n,a!==0&&(f=$i(a))))):(w=o&~d,w!==0?f=$i(w):v!==0?f=$i(v):a||(a=o&~n,a!==0&&(f=$i(a)))),f===0?0:i!==0&&i!==f&&(i&d)===0&&(d=f&-f,a=i&-i,d>=a||d===32&&(a&4194048)!==0)?i:f}function Rs(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function d_(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 ud(){var n=to;return to<<=1,(to&62914560)===0&&(to=4194304),n}function wu(n){for(var i=[],a=0;31>a;a++)i.push(n);return i}function Os(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function p_(n,i,a,o,f,d){var v=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var w=n.entanglements,A=n.expirationTimes,L=n.hiddenUpdates;for(a=v&~a;0<a;){var P=31-Nt(a),$=1<<P;w[P]=0,A[P]=-1;var U=L[P];if(U!==null)for(L[P]=null,P=0;P<U.length;P++){var z=U[P];z!==null&&(z.lane&=-536870913)}a&=~$}o!==0&&cd(n,o,0),d!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=d&~(v&~i))}function cd(n,i,a){n.pendingLanes|=i,n.suspendedLanes&=~i;var o=31-Nt(i);n.entangledLanes|=i,n.entanglements[o]=n.entanglements[o]|1073741824|a&261930}function fd(n,i){var a=n.entangledLanes|=i;for(n=n.entanglements;a;){var o=31-Nt(a),f=1<<o;f&i|n[o]&i&&(n[o]|=i),a&=~f}}function hd(n,i){var a=i&-i;return a=(a&42)!==0?1:Su(a),(a&(n.suspendedLanes|i))!==0?0:a}function Su(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 Eu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function dd(){var n=Q.p;return n!==0?n:(n=window.event,n===void 0?32:Zm(n.type))}function pd(n,i){var a=Q.p;try{return Q.p=n,i()}finally{Q.p=a}}var si=Math.random().toString(36).slice(2),ct="__reactFiber$"+si,St="__reactProps$"+si,_r="__reactContainer$"+si,Tu="__reactEvents$"+si,g_="__reactListeners$"+si,m_="__reactHandles$"+si,gd="__reactResources$"+si,ks="__reactMarker$"+si;function Au(n){delete n[ct],delete n[St],delete n[Tu],delete n[g_],delete n[m_]}function wr(n){var i=n[ct];if(i)return i;for(var a=n.parentNode;a;){if(i=a[_r]||a[ct]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(n=Mm(n);n!==null;){if(a=n[ct])return a;n=Mm(n)}return i}n=a,a=n.parentNode}return null}function Sr(n){if(n=n[ct]||n[_r]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Cs(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(s(33))}function Er(n){var i=n[gd];return i||(i=n[gd]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function at(n){n[ks]=!0}var md=new Set,yd={};function Ki(n,i){Tr(n,i),Tr(n+"Capture",i)}function Tr(n,i){for(yd[n]=i,n=0;n<i.length;n++)md.add(i[n])}var y_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),vd={},bd={};function v_(n){return vu.call(bd,n)?!0:vu.call(vd,n)?!1:y_.test(n)?bd[n]=!0:(vd[n]=!0,!1)}function io(n,i,a){if(v_(i))if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var o=i.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+a)}}function ro(n,i,a){if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+a)}}function On(n,i,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(i,a,""+o)}}function It(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function _d(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function b_(n,i,a){var o=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,d=o.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return f.call(this)},set:function(v){a=""+v,d.call(this,v)}}),Object.defineProperty(n,i,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function Ru(n){if(!n._valueTracker){var i=_d(n)?"checked":"value";n._valueTracker=b_(n,i,""+n[i])}}function wd(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var a=i.getValue(),o="";return n&&(o=_d(n)?n.checked?"true":"false":n.value),n=o,n!==a?(i.setValue(n),!0):!1}
vendor: 4,644 bytes, line 9
9function so(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 __=/[\n"\\]/g;function $t(n){return n.replace(__,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Ou(n,i,a,o,f,d,v,w){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),i!=null?v==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+It(i)):n.value!==""+It(i)&&(n.value=""+It(i)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),i!=null?ku(n,v,It(i)):a!=null?ku(n,v,It(a)):o!=null&&n.removeAttribute("value"),f==null&&d!=null&&(n.defaultChecked=!!d),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.name=""+It(w):n.removeAttribute("name")}function Sd(n,i,a,o,f,d,v,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(n.type=d),i!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||i!=null)){Ru(n);return}a=a!=null?""+It(a):"",i=i!=null?""+It(i):a,w||i===n.value||(n.value=i),n.defaultValue=i}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,n.checked=w?n.checked:!!o,n.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Ru(n)}function ku(n,i,a){i==="number"&&so(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Ar(n,i,a,o){if(n=n.options,i){i={};for(var f=0;f<a.length;f++)i["$"+a[f]]=!0;for(a=0;a<n.length;a++)f=i.hasOwnProperty("$"+n[a].value),n[a].selected!==f&&(n[a].selected=f),f&&o&&(n[a].defaultSelected=!0)}else{for(a=""+It(a),i=null,f=0;f<n.length;f++){if(n[f].value===a){n[f].selected=!0,o&&(n[f].defaultSelected=!0);return}i!==null||n[f].disabled||(i=n[f])}i!==null&&(i.selected=!0)}}function Ed(n,i,a){if(i!=null&&(i=""+It(i),i!==n.value&&(n.value=i),a==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=a!=null?""+It(a):""}function Td(n,i,a,o){if(i==null){if(o!=null){if(a!=null)throw Error(s(92));if(re(o)){if(1<o.length)throw Error(s(93));o=o[0]}a=o}a==null&&(a=""),i=a}a=It(i),n.defaultValue=a,o=n.textContent,o===a&&o!==""&&o!==null&&(n.value=o),Ru(n)}function Rr(n,i){if(i){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=i;return}}n.textContent=i}var w_=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 Ad(n,i,a){var o=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":o?n.setProperty(i,a):typeof a!="number"||a===0||w_.has(i)?i==="float"?n.cssFloat=a:n[i]=(""+a).trim():n[i]=a+"px"}function Rd(n,i,a){if(i!=null&&typeof i!="object")throw Error(s(62));if(n=n.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||i!=null&&i.hasOwnProperty(o)||(o.indexOf("--")===0?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="");for(var f in i)o=i[f],i.hasOwnProperty(f)&&a[f]!==o&&Ad(n,f,o)}else for(var d in i)i.hasOwnProperty(d)&&Ad(n,d,i[d])}function Cu(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 S_=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"]]),E_=/^[\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 E_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function kn(){}var Du=null;function xu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Or=null,kr=null;function Od(n){var i=Sr(n);if(i&&(n=i.stateNode)){var a=n[St]||null;e:switch(n=i.stateNode,i.type){case"input":if(Ou(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+$t(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var o=a[i];if(o!==n&&o.form===n.form){var f=o[St]||null;if(!f)throw Error(s(90));Ou(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<a.length;i++)o=a[i],o.form===n.form&&wd(o)}break e;case"textarea":Ed(n,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&Ar(n,!!a.multiple,i,!1)}}}var ju=!1;function kd(n,i,a){if(ju)return n(i,a);ju=!0;try{var o=n(i);return o}finally{if(ju=!1,(Or!==null||kr!==null)&&(Yo(),Or&&(i=Or,n=kr,kr=Or=null,Od(i),n)))for(i=0;i<n.length;i++)Od(n[i])}}function Ds(n,i){var a=n.stateNode;if(a===null)return null;var o=a[St]||null;if(o===null)return null;a=o[i];e:switch(i){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(a&&typeof a!="function")throw Error(s(231,i,typeof a));return a}var Cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nu=!1;
vendor: 3,351 bytes, line 9
9if(Cn)try{var xs={};Object.defineProperty(xs,"passive",{get:function(){Nu=!0}}),window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch{Nu=!1}var ai=null,Lu=null,oo=null;function Cd(){if(oo)return oo;var n,i=Lu,a=i.length,o,f="value"in ai?ai.value:ai.textContent,d=f.length;for(n=0;n<a&&i[n]===f[n];n++);var v=a-n;for(o=1;o<=v&&i[a-o]===f[d-o];o++);return oo=f.slice(n,1<o?1-o:void 0)}function lo(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function uo(){return!0}function Dd(){return!1}function Et(n){function i(a,o,f,d,v){this._reactName=a,this._targetInst=f,this.type=o,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(a=n[w],this[w]=a?a(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?uo:Dd,this.isPropagationStopped=Dd,this}return m(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=uo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=uo)},persist:function(){},isPersistent:uo}),i}var Gi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=Et(Gi),js=m({},Gi,{view:0,detail:0}),T_=Et(js),Uu,Mu,Ns,fo=m({},js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bu,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!==Ns&&(Ns&&n.type==="mousemove"?(Uu=n.screenX-Ns.screenX,Mu=n.screenY-Ns.screenY):Mu=Uu=0,Ns=n),Uu)},movementY:function(n){return"movementY"in n?n.movementY:Mu}}),xd=Et(fo),A_=m({},fo,{dataTransfer:0}),R_=Et(A_),O_=m({},js,{relatedTarget:0}),zu=Et(O_),k_=m({},Gi,{animationName:0,elapsedTime:0,pseudoElement:0}),C_=Et(k_),D_=m({},Gi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),x_=Et(D_),j_=m({},Gi,{data:0}),jd=Et(j_),N_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L_={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"},U_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M_(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=U_[n])?!!i[n]:!1}function Bu(){return M_}var z_=m({},js,{key:function(n){if(n.key){var i=N_[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=lo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
9keydown"||n.type==="keyup"?L_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bu,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}}),B_=Et(z_),P_=m({},fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nd=Et(P_),H_=m({},js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bu}),q_=Et(H_),I_=m({},Gi,{propertyName:0,elapsedTime:0,pseudoElement:0}),$_=Et(I_),K_=m({},fo,{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}),G_=Et(K_),V_=m({},Gi,{newState:0,oldState:0}),F_=Et(V_),Y_=[9,13,27,32],Pu=Cn&&"CompositionEvent"in window,Ls=null;Cn&&"documentMode"in document&&(Ls=document.documentMode);var J_=Cn&&"TextEvent"in window&&!Ls,Ld=Cn&&(!Pu||Ls&&8<Ls&&11>=Ls),Ud=" ",Md=!1;function zd(n,i){switch(n){case"keyup":return Y_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Cr=!1;function Q_(n,i){switch(n){case"compositionend":return Bd(i);case"keypress":return i.which!==32?null:(Md=!0,Ud);case"textInput":return n=i.data,n===Ud&&Md?null:n;default:return null}}function X_(n,i){if(Cr)return n==="compositionend"||!Pu&&zd(n,i)?(n=Cd(),oo=Lu=ai=null,Cr=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ld&&i.locale!=="ko"?null:i.data;default:return null}}var Z_={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 i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!Z_[n.type]:i==="textarea"}function Hd(n,i,a,o){Or?kr?kr.push(o):kr=[o]:Or=o,i=tl(i,"onChange"),0<i.length&&(a=new co("onChange","change",null,a,o),n.push({event:a,listeners:i}))}var Us=null,Ms=null;function W_(n){Sm(n,0)}function ho(n){var i=Cs(n);if(wd(i))return n}function qd(n,i){if(n==="change")return i}var Id=!1;if(Cn){var Hu;if(Cn){var qu="oninput"in document;if(!qu){var $d=document.createElement("div");$d.setAttribute("oninput","return;"),qu=typeof $d.oninput=="function"}Hu=qu}else Hu=!1;Id=Hu&&(!document.documentMode||9<document.documentMode)}function Kd(){Us&&(Us.detachEvent("onpropertychange",Gd),Ms=Us=null)}function Gd(n){if(n.propertyName==="value"&&ho(Ms)){var i=[];Hd(i,Ms,n,xu(n)),kd(W_,i)}}function ew(n,i,a){n==="focusin"?(Kd(),Us=i,Ms=a,Us.attachEvent("onpropertychange",Gd)):n==="focusout"&&Kd()}function tw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ho(Ms)}function nw(n,i){if(n==="click")return ho(i)}function iw(n,i){if(n==="input"||n==="change")return ho(i)}function rw(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Lt=typeof Object.is=="function"?Object.is:rw;function zs(n,i){if(Lt(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var a=Object.keys(n),o=Object.keys(i);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var f=a[o];if(!vu.call(i,f)||!Lt(n[f],i[f]))return!1}return!0}function Vd(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Fd(n,i){var a=Vd(n);n=0;for(var o;a;){if(a.nodeType===3){if(o=n+a.textContent.length,n<=i&&o>=i)return{node:a,offset:i-n};n=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Vd(a)}}function Yd(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Yd(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Jd(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=so(n.document);i instanceof n.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)n=i.contentWindow;else break;i=so(n.document)}return i}function Iu(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var sw=Cn&&"documentMode"in document&&11>=document.documentMode,Dr=null,$u=null,Bs=null,Ku=!1;function Qd(n,i,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ku||Dr==null||Dr!==so(o)||(o=Dr,"selectionStart"in o&&Iu(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: 17,985 bytes, line 9
9sNode:o.focusNode,focusOffset:o.focusOffset}),Bs&&zs(Bs,o)||(Bs=o,o=tl($u,"onSelect"),0<o.length&&(i=new co("onSelect","select",null,i,a),n.push({event:i,listeners:o}),i.target=Dr)))}function Vi(n,i){var a={};return a[n.toLowerCase()]=i.toLowerCase(),a["Webkit"+n]="webkit"+i,a["Moz"+n]="moz"+i,a}var xr={animationend:Vi("Animation","AnimationEnd"),animationiteration:Vi("Animation","AnimationIteration"),animationstart:Vi("Animation","AnimationStart"),transitionrun:Vi("Transition","TransitionRun"),transitionstart:Vi("Transition","TransitionStart"),transitioncancel:Vi("Transition","TransitionCancel"),transitionend:Vi("Transition","TransitionEnd")},Gu={},Xd={};Cn&&(Xd=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);function Fi(n){if(Gu[n])return Gu[n];if(!xr[n])return n;var i=xr[n],a;for(a in i)if(i.hasOwnProperty(a)&&a in Xd)return Gu[n]=i[a];return n}var Zd=Fi("animationend"),Wd=Fi("animationiteration"),ep=Fi("animationstart"),aw=Fi("transitionrun"),ow=Fi("transitionstart"),lw=Fi("transitioncancel"),tp=Fi("transitionend"),np=new Map,Vu="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(" ");Vu.push("scrollEnd");function Wt(n,i){np.set(n,i),Ki(i,[n])}var po=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=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(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Kt=[],jr=0,Fu=0;function go(){for(var n=jr,i=Fu=jr=0;i<n;){var a=Kt[i];Kt[i++]=null;var o=Kt[i];Kt[i++]=null;var f=Kt[i];Kt[i++]=null;var d=Kt[i];if(Kt[i++]=null,o!==null&&f!==null){var v=o.pending;v===null?f.next=f:(f.next=v.next,v.next=f),o.pending=f}d!==0&&ip(a,f,d)}}function mo(n,i,a,o){Kt[jr++]=n,Kt[jr++]=i,Kt[jr++]=a,Kt[jr++]=o,Fu|=o,n.lanes|=o,n=n.alternate,n!==null&&(n.lanes|=o)}function Yu(n,i,a,o){return mo(n,i,a,o),yo(n)}function Yi(n,i){return mo(n,null,null,i),yo(n)}function ip(n,i,a){n.lanes|=a;var o=n.alternate;o!==null&&(o.lanes|=a);for(var f=!1,d=n.return;d!==null;)d.childLanes|=a,o=d.alternate,o!==null&&(o.childLanes|=a),d.tag===22&&(n=d.stateNode,n===null||n._visibility&1||(f=!0)),n=d,d=d.return;return n.tag===3?(d=n.stateNode,f&&i!==null&&(f=31-Nt(a),n=d.hiddenUpdates,o=n[f],o===null?n[f]=[i]:o.push(i),i.lane=a|536870912),d):null}function yo(n){if(50<aa)throw aa=0,rf=null,Error(s(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var Nr={};function uw(n,i,a,o){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,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 Ut(n,i,a,o){return new uw(n,i,a,o)}function Ju(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Dn(n,i){var a=n.alternate;return a===null?(a=Ut(n.tag,i,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=i,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,i=n.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function rp(n,i){n.flags&=65011714;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,i=a.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function vo(n,i,a,o,f,d){var v=0;if(o=n,typeof n=="function")Ju(n)&&(v=1);else if(typeof n=="string")v=pS(n,a,te.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=Ut(31,a,i,f),n.elementType=W,n.lanes=d,n;case E:return Ji(a.children,f,d,i);case T:v=8,f|=24;break;case R:return n=Ut(12,a,i,f|2),n.elementType=R,n.lanes=d,n;case F:return n=Ut(13,a,i,f),n.elementType=F,n.lanes=d,n;case B:return n=Ut(19,a,i,f),n.elementType=B,n.lanes=d,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case D:v=10;break e;case C:v=9;break e;case H:v=11;break e;case j:v=14;break e;case V:v=16,o=null;break e}v=29,a=Error(s(130,n===null?"null":typeof n,"")),o=null}return i=Ut(v,a,i,f),i.elementType=n,i.type=o,i.lanes=d,i}function Ji(n,i,a,o){return n=Ut(7,n,o,i),n.lanes=a,n}function Qu(n,i,a){return n=Ut(6,n,null,i),n.lanes=a,n}function sp(n){var i=Ut(18,null,null,0);return i.stateNode=n,i}function Xu(n,i,a){return i=Ut(4,n.children!==null?n.children:[],n.key,i),i.lanes=a,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var ap=new WeakMap;function Gt(n,i){if(typeof n=="object"&&n!==null){var a=ap.get(n);return a!==void 0?a:(i={value:n,source:i,stack:sd(i)},ap.set(n,i),i)}return{value:n,source:i,stack:sd(i)}}var Lr=[],Ur=0,bo=null,Ps=0,Vt=[],Ft=0,oi=null,pn=1,gn="";function xn(n,i){Lr[Ur++]=Ps,Lr[Ur++]=bo,bo=n,Ps=i}function op(n,i,a){Vt[Ft++]=pn,Vt[Ft++]=gn,Vt[Ft++]=oi,oi=n;var o=pn;n=gn;var f=32-Nt(o)-1;o&=~(1<<f),a+=1;var d=32-Nt(i)+f;if(30<d){var v=f-f%5;d=(o&(1<<v)-1).toString(32),o>>=v,f-=v,pn=1<<32-Nt(i)+f|a<<f|o,gn=d+n}else pn=1<<d|a<<f|o,gn=n}function Zu(n){n.return!==null&&(xn(n,1),op(n,1,0))}function Wu(n){for(;n===bo;)bo=Lr[--Ur],Lr[Ur]=null,Ps=Lr[--Ur],Lr[Ur]=null;for(;n===oi;)oi=Vt[--Ft],Vt[Ft]=null,gn=Vt[--Ft],Vt[Ft]=null,pn=Vt[--Ft],Vt[Ft]=null}function lp(n,i){Vt[Ft++]=pn,Vt[Ft++]=gn,Vt[Ft++]=oi,pn=i.id,gn=i.overflow,oi=n}var ft=null,He=null,Ee=!1,li=null,Yt=!1,ec=Error(s(519));function ui(n){var i=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hs(Gt(i,n)),ec}function up(n){var i=n.stateNode,a=n.type,o=n.memoizedProps;switch(i[ct]=n,i[St]=o,a){case"dialog":be("cancel",i),be("close",i);break;case"iframe":case"object":case"embed":be("load",i);break;case"video":case"audio":for(a=0;a<la.length;a++)be(la[a],i);break;case"source":be("error",i);break;case"img":case"image":case"link":be("error",i),be("load",i);break;case"details":be("toggle",i);break;case"input":be("invalid",i),Sd(i,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":be("invalid",i);break;case"textarea":be("invalid",i),Td(i,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||o.suppressHydrationWarning===!0||Rm(i.textContent,a)?(o.popover!=null&&(be("beforetoggle",i),be("toggle",i)),o.onScroll!=null&&be("scroll",i),o.onScrollEnd!=null&&be("scrollend",i),o.onClick!=null&&(i.onclick=kn),i=!0):i=!1,i||ui(n,!0)}function cp(n){for(ft=n.return;ft;)switch(ft.tag){case 5:case 31:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:ft=ft.return}}function Mr(n){if(n!==ft)return!1;if(!Ee)return cp(n),Ee=!0,!1;var i=n.tag,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||bf(n.type,n.memoizedProps)),a=!a),a&&He&&ui(n),cp(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));He=Um(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));He=Um(n)}else i===27?(i=He,Ei(n.type)?(n=Tf,Tf=null,He=n):He=i):He=ft?Qt(n.stateNode.nextSibling):null;return!0}function Qi(){He=ft=null,Ee=!1}function tc(){var n=li;return n!==null&&(Ot===null?Ot=n:Ot.push.apply(Ot,n),li=null),n}function Hs(n){li===null?li=[n]:li.push(n)}var nc=k(null),Xi=null,jn=null;function ci(n,i,a){Y(nc,i._currentValue),i._currentValue=a}function Nn(n){n._currentValue=nc.current,I(nc)}function ic(n,i,a){for(;n!==null;){var o=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,o!==null&&(o.childLanes|=i)):o!==null&&(o.childLanes&i)!==i&&(o.childLanes|=i),n===a)break;n=n.return}}function rc(n,i,a,o){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var d=f.dependencies;if(d!==null){var v=f.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=f;for(var A=0;A<i.length;A++)if(w.context===i[A]){d.lanes|=a,w=d.alternate,w!==null&&(w.lanes|=a),ic(d.return,a,n),o||(v=null);break e}d=w.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(s(341));v.lanes|=a,d=v.alternate,d!==null&&(d.lanes|=a),ic(v,a,n),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===n){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function zr(n,i,a,o){n=null;for(var f=i,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(s(387));if(v=v.memoizedProps,v!==null){var w=f.type;Lt(f.pendingProps.value,v.value)||(n!==null?n.push(w):n=[w])}}else if(f===ce.current){if(v=f.alternate,v===null)throw Error(s(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(da):n=[da])}f=f.return}n!==null&&rc(i,n,a,o),i.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 Zi(n){Xi=n,jn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function ht(n){return fp(Xi,n)}function wo(n,i){return Xi===null&&Zi(n),fp(n,i)}function fp(n,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},jn===null){if(n===null)throw Error(s(308));jn=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else jn=jn.next=i;return a}var cw=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(a,o){n.push(o)}};this.abort=function(){i.aborted=!0,n.forEach(function(a){return a()})}},fw=t.unstable_scheduleCallback,hw=t.unstable_NormalPriority,Ze={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sc(){return{controller:new cw,data:new Map,refCount:0}}function qs(n){n.refCount--,n.refCount===0&&fw(hw,function(){n.controller.abort()})}var Is=null,ac=0,Br=0,Pr=null;function dw(n,i){if(Is===null){var a=Is=[];ac=0,Br=cf(),Pr={status:"pending",value:void 0,then:function(o){a.push(o)}}}return ac++,i.then(hp,hp),i}function hp(){if(--ac===0&&Is!==null){Pr!==null&&(Pr.status="fulfilled");var n=Is;Is=null,Br=0,Pr=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function pw(n,i){var a=[],o={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return n.then(function(){o.status="fulfilled",o.value=i;for(var f=0;f<a.length;f++)(0,a[f])(i)},function(f){for(o.status="rejected",o.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),o}var dp=M.S;M.S=function(n,i){Qg=xt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&dw(n,i),dp!==null&&dp(n,i)};var Wi=k(null);function oc(){var n=Wi.current;return n!==null?n:Me.pooledCache}function So(n,i){i===null?Y(Wi,Wi.current):Y(Wi,i.pool)}function pp(){var n=oc();return n===null?null:{parent:Ze._currentValue,pool:n}}var Hr=Error(s(460)),lc=Error(s(474)),Eo=Error(s(542)),To={then:function(){}};function gp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function mp(n,i,a){switch(a=n[a],a===void 0?n.push(i):a!==i&&(i.then(kn,kn),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,vp(n),n;default:if(typeof i.status=="string")i.then(kn,kn);else{if(n=Me,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=i,n.status="pending",n.then(function(o){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=o}},function(o){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=o}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,vp(n),n}throw tr=i,Hr}}function er(n){try{var i=n._init;return i(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(tr=a,Hr):a}}var tr=null;function yp(){if(tr===null)throw Error(s(459));var n=tr;return tr=null,n}function vp(n){if(n===Hr||n===Eo)throw Error(s(483))}var qr=null,$s=0;function Ao(n){var i=$s;return $s+=1,qr===null&&(qr=[]),mp(qr,n,i)}function Ks(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Ro(n,i){throw i.$$typeof===b?Error(s(525)):(n=Object.prototype.toString.call(i),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function bp(n){function i(x,O){if(n){var N=x.deletions;N===null?(x.deletions=[O],x.flags|=16):N.push(O)}}function a(x,O){if(!n)return null;for(;O!==null;)i(x,O),O=O.sibling;return null}function o(x){for(var O=new Map;x!==null;)x.key!==null?O.set(x.key,x):O.set(x.index,x),x=x.sibling;return O}function f(x,O){return x=Dn(x,O),x.index=0,x.sibling=null,x}function d(x,O,N){return x.index=N,n?(N=x.alternate,N!==null?(N=N.index,N<O?(x.flags|=67108866,O):N):(x.flags|=67108866,O)):(x.flags|=1048576,O)}function v(x){return n&&x.alternate===null&&(x.flags|=67108866),x}function w(x,O,N,q){return O===null||O.tag!==6?(O=Qu(N,x.mode,q),O.return=x,O):(O=f(O,N),O.return=x,O)}function A(x,O,N,q){var ae=N.type;return ae===E?P(x,O,N.props.children,q,N.key):O!==null&&(O.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===V&&er(ae)===O.type)?(O=f(O,N.props),Ks(O,N),O.return=x,O):(O=vo(N.type,N.key,N.props,null,x.mode,q),Ks(O,N),O.return=x,O)}function L(x,O,N,q){return O===null||O.tag!==4||O.stateNode.containerInfo!==N.containerInfo||O.stateNode.implementation!==N.implementation?(O=Xu(N,x.mode,q),O.return=x,O):(O=f(O,N.children||[]),O.return=x,O)}function P(x,O,N,q,ae){return O===null||O.tag!==7?(O=Ji(N,x.mode,q,ae),O.return=x,O):(O=f(O,N),O.return=x,O)}function $(x,O,N){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Qu(""+O,x.mode,N),O.return=x,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case _:return N=vo(O.type,O.key,O.props,null,x.mode,N),Ks(N,O),N.return=x,N;case S:return O=Xu(O,x.mode,N),O.return=x,O;case V:return O=er(O),$(x,O,N)}if(re(O)||G(O))return O=Ji(O,x.mode,N,null),O.return=x,O;if(typeof O.then=="function")return $(x,Ao(O),N);if(O.$$typeof===D)return $(x,wo(x,O),N);Ro(x,O)}return null}function U(x,O,N,q){var ae=O!==null?O.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ae!==null?null:w(x,O,""+N,q);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _:return N.key===ae?A(x,O,N,q):null;case S:return N.key===ae?L(x,O,N,q):null;case V:return N=er(N),U(x,O,N,q)}if(re(N)||G(N))return ae!==null?null:P(x,O,N,q,null);if(typeof N.then=="function")return U(x,O,Ao(N),q);if(N.$$typeof===D)return U(x,O,wo(x,N),q);Ro(x,N)}return null}function z(x,O,N,q,ae){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return x=x.get(N)||null,w(O,x,""+q,ae);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return x=x.get(q.key===null?N:q.key)||null,A(O,x,q,ae);case S:return x=x.get(q.key===null?N:q.key)||null,L(O,x,q,ae);case V:return q=er(q),z(x,O,N,q,ae)}if(re(q)||G(q))return x=x.get(N)||null,P(O,x,q,ae,null);if(typeof q.then=="function")return z(x,O,N,Ao(q),ae);if(q.$$typeof===D)return z(x,O,N,wo(O,q),ae);Ro(O,q)}return null}function ee(x,O,N,q){for(var ae=null,Ae=null,ie=O,me=O=0,Se=null;ie!==null&&me<N.length;me++){ie.index>me?(Se=ie,ie=null):Se=ie.sibling;var Re=U(x,ie,N[me],q);if(Re===null){ie===null&&(ie=Se);break}n&&ie&&Re.alternate===null&&i(x,ie),O=d(Re,O,me),Ae===null?ae=Re:Ae.sibling=Re,Ae=Re,ie=Se}if(me===N.length)return a(x,ie),Ee&&xn(x,me),ae;if(ie===null){for(;me<N.length;me++)ie=$(x,N[me],q),ie!==null&&(O=d(ie,O,me),Ae===null?ae=ie:Ae.sibling=ie,Ae=ie);return Ee&&xn(x,me),ae}for(ie=o(ie);me<N.length;me++)Se=z(ie,x,me,N[me],q),Se!==null&&(n&&Se.alternate!==null&&ie.delete(Se.key===null?me:Se.key),O=d(Se,O,me),Ae===null?ae=Se:Ae.sibling=Se,Ae=Se);return n&&ie.forEach(function(ki){return i(x,ki)}),Ee&&xn(x,me),ae}function fe(x,O,N,q){if(N==null)throw Error(s(151));for(var ae=null,Ae=null,ie=O,me=O=0,Se=null,Re=N.next();ie!==null&&!Re.done;me++,Re=N.next()){ie.index>me?(Se=ie,ie=null):Se=ie.sibling;var ki=U(x,ie,Re.value,q);if(ki===null){ie===null&&(ie=Se);break}n&&ie&&ki.alternate===null&&i(x,ie),O=d(ki,O,me),Ae===null?ae=ki:Ae.sibling=ki,Ae=ki,ie=Se}if(Re.done)return a(x,ie),Ee&&xn(x,me),ae;if(ie===null){for(;!Re.done;me++,Re=N.next())Re=$(x,Re.value,q),Re!==null&&(O=d(Re,O,me),Ae===null?ae=Re:Ae.sibling=Re,Ae=Re);return Ee&&xn(x,me),ae}for(ie=o(ie);!Re.done;me++,Re=N.next())Re=z(ie,x,me,Re.value,q),Re!==null&&(n&&Re.alternate!==null&&ie.delete(Re.key===null?me:Re.key),O=d(Re,O,me),Ae===null?ae=Re:Ae.sibling=Re,Ae=Re);return n&&ie.forEach(function(AS){return i(x,AS)}),Ee&&xn(x,me),ae}function Le(x,O,N,q){if(typeof N=="object"&&N!==null&&N.type===E&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case _:e:{for(var ae=N.key;O!==null;
vendor: 4,183 bytes, line 9
9){if(O.key===ae){if(ae=N.type,ae===E){if(O.tag===7){a(x,O.sibling),q=f(O,N.props.children),q.return=x,x=q;break e}}else if(O.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===V&&er(ae)===O.type){a(x,O.sibling),q=f(O,N.props),Ks(q,N),q.return=x,x=q;break e}a(x,O);break}else i(x,O);O=O.sibling}N.type===E?(q=Ji(N.props.children,x.mode,q,N.key),q.return=x,x=q):(q=vo(N.type,N.key,N.props,null,x.mode,q),Ks(q,N),q.return=x,x=q)}return v(x);case S:e:{for(ae=N.key;O!==null;){if(O.key===ae)if(O.tag===4&&O.stateNode.containerInfo===N.containerInfo&&O.stateNode.implementation===N.implementation){a(x,O.sibling),q=f(O,N.children||[]),q.return=x,x=q;break e}else{a(x,O);break}else i(x,O);O=O.sibling}q=Xu(N,x.mode,q),q.return=x,x=q}return v(x);case V:return N=er(N),Le(x,O,N,q)}if(re(N))return ee(x,O,N,q);if(G(N)){if(ae=G(N),typeof ae!="function")throw Error(s(150));return N=ae.call(N),fe(x,O,N,q)}if(typeof N.then=="function")return Le(x,O,Ao(N),q);if(N.$$typeof===D)return Le(x,O,wo(x,N),q);Ro(x,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,O!==null&&O.tag===6?(a(x,O.sibling),q=f(O,N),q.return=x,x=q):(a(x,O),q=Qu(N,x.mode,q),q.return=x,x=q),v(x)):a(x,O)}return function(x,O,N,q){try{$s=0;var ae=Le(x,O,N,q);return qr=null,ae}catch(ie){if(ie===Hr||ie===Eo)throw ie;var Ae=Ut(29,ie,null,x.mode);return Ae.lanes=q,Ae.return=x,Ae}}}var nr=bp(!0),_p=bp(!1),fi=!1;function uc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cc(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function hi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function di(n,i,a){var o=n.updateQueue;if(o===null)return null;if(o=o.shared,(Ce&2)!==0){var f=o.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),o.pending=i,i=yo(n),ip(n,null,a),i}return mo(n,o,i,a),yo(n)}function Gs(n,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var o=i.lanes;o&=n.pendingLanes,a|=o,i.lanes=a,fd(n,a)}}function fc(n,i){var a=n.updateQueue,o=n.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var f=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?f=d=v:d=d.next=v,a=a.next}while(a!==null);d===null?f=d=i:d=d.next=i}else f=d=i;a={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=i:n.next=i,a.lastBaseUpdate=i}var hc=!1;function Vs(){if(hc){var n=Pr;if(n!==null)throw n}}function Fs(n,i,a,o){hc=!1;var f=n.updateQueue;fi=!1;var d=f.firstBaseUpdate,v=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var A=w,L=A.next;A.next=null,v===null?d=L:v.next=L,v=A;var P=n.alternate;P!==null&&(P=P.updateQueue,w=P.lastBaseUpdate,w!==v&&(w===null?P.firstBaseUpdate=L:w.next=L,P.lastBaseUpdate=A))}if(d!==null){var $=f.baseState;v=0,P=L=A=null,w=d;do{var U=w.lane&-536870913,z=U!==w.lane;if(z?(we&U)===U:(o&U)===U){U!==0&&U===Br&&(hc=!0),P!==null&&(P=P.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ee=n,fe=w;U=i;var Le=a;switch(fe.tag){case 1:if(ee=fe.payload,typeof ee=="function"){$=ee.call(Le,$,U);break e}$=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=fe.payload,U=typeof ee=="function"?ee.call(Le,$,U):ee,U==null)break e;$=m({},$,U);break e;case 2:fi=!0}}U=w.callback,U!==null&&(n.flags|=64,z&&(n.flags|=8192),z=f.callbacks,z===null?f.callbacks=[U]:z.push(U))}else z={lane:U,tag:w.tag,payload:w.payload,callback:w.callback,next:null},P===null?(L=P=z,A=$):P=P.next=z,v|=U;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;z=w,w=z.next,z.next=null,f.lastBaseUpdate=z,f.shared.pending=null}}while(!0);P===null&&(A=$),f.baseState=A,f.firstBaseUpdate=L,f.lastBaseUpdate=P,d===null&&(f.shared.lanes=0),vi|=v,n.lanes=v,n.memoizedState=$}}function wp(n,i){if(typeof n!="function")throw Error(s(191,n));n.call(i)}function Sp(n,i){var a=n.callbacks;
vendor: 7,812 bytes, line 9
9if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)wp(a[n],i)}var Ir=k(null),Oo=k(0);function Ep(n,i){n=In,Y(Oo,n),Y(Ir,i),In=n|i.baseLanes}function dc(){Y(Oo,In),Y(Ir,Ir.current)}function pc(){In=Oo.current,I(Ir),I(Oo)}var Mt=k(null),Jt=null;function pi(n){var i=n.alternate;Y(Ve,Ve.current&1),Y(Mt,n),Jt===null&&(i===null||Ir.current!==null||i.memoizedState!==null)&&(Jt=n)}function gc(n){Y(Ve,Ve.current),Y(Mt,n),Jt===null&&(Jt=n)}function Tp(n){n.tag===22?(Y(Ve,Ve.current),Y(Mt,n),Jt===null&&(Jt=n)):gi()}function gi(){Y(Ve,Ve.current),Y(Mt,Mt.current)}function zt(n){I(Mt),Jt===n&&(Jt=null),I(Ve)}var Ve=k(0);function ko(n){for(var i=n;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Sf(a)||Ef(a)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ln=0,ge=null,je=null,We=null,Co=!1,$r=!1,ir=!1,Do=0,Ys=0,Kr=null,gw=0;function $e(){throw Error(s(321))}function mc(n,i){if(i===null)return!1;for(var a=0;a<i.length&&a<n.length;a++)if(!Lt(n[a],i[a]))return!1;return!0}function yc(n,i,a,o,f,d){return Ln=d,ge=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=n===null||n.memoizedState===null?og:jc,ir=!1,d=a(o,f),ir=!1,$r&&(d=Rp(i,a,o,f)),Ap(n),d}function Ap(n){M.H=Xs;var i=je!==null&&je.next!==null;if(Ln=0,We=je=ge=null,Co=!1,Ys=0,Kr=null,i)throw Error(s(300));n===null||et||(n=n.dependencies,n!==null&&_o(n)&&(et=!0))}function Rp(n,i,a,o){ge=n;var f=0;do{if($r&&(Kr=null),Ys=0,$r=!1,25<=f)throw Error(s(301));if(f+=1,We=je=null,n.updateQueue!=null){var d=n.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}M.H=lg,d=i(a,o)}while($r);return d}function mw(){var n=M.H,i=n.useState()[0];return i=typeof i.then=="function"?Js(i):i,n=n.useState()[0],(je!==null?je.memoizedState:null)!==n&&(ge.flags|=1024),i}function vc(){var n=Do!==0;return Do=0,n}function bc(n,i,a){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~a}function _c(n){if(Co){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Co=!1}Ln=0,We=je=ge=null,$r=!1,Ys=Do=0,Kr=null}function vt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ge.memoizedState=We=n:We=We.next=n,We}function Fe(){if(je===null){var n=ge.alternate;n=n!==null?n.memoizedState:null}else n=je.next;var i=We===null?ge.memoizedState:We.next;if(i!==null)We=i,je=n;else{if(n===null)throw ge.alternate===null?Error(s(467)):Error(s(310));je=n,n={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},We===null?ge.memoizedState=We=n:We=We.next=n}return We}function xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Js(n){var i=Ys;return Ys+=1,Kr===null&&(Kr=[]),n=mp(Kr,n,i),i=ge,(We===null?i.memoizedState:We.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?og:jc),n}function jo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Js(n);if(n.$$typeof===D)return ht(n)}throw Error(s(438,String(n)))}function wc(n){var i=null,a=ge.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var o=ge.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(i={data:o.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=xo(),ge.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(n),o=0;o<n;o++)a[o]=se;return i.index++,a}function Un(n,i){return typeof i=="function"?i(n):i}function No(n){var i=Fe();return Sc(i,je,n)}function Sc(n,i,a){var o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=a;var f=n.baseQueue,d=o.pending;if(d!==null){if(f!==null){var v=f.next;f.next=d.next,d.next=v}i.baseQueue=f=d,o.pending=null}if(d=n.baseState,f===null)n.memoizedState=d;else{i=f.next;var w=v=null,A=null,L=i,P=!1;do{var $=L.lane&-536870913;if($!==L.lane?(we&$)===$:(Ln&$)===$){var U=L.revertLane;if(U===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),$===Br&&(P=!0);else if((Ln&U)===U){L=L.next,U===Br&&(P=!0);continue}else $={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(w=A=$,v=d):A=A.next=$,ge.lanes|=U,vi|=U;$=L.action,ir&&a(d,$),d=L.hasEagerState?L.eagerState:a(d,$)}else U={lane:$,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(w=A=U,v=d):A=A.next=U,ge.lanes|=$,vi|=$;L=L.next}while(L!==null&&L!==i);if(A===null?v=d:A.next=w,!Lt(d,n.memoizedState)&&(et=!0,P&&(a=Pr,a!==null)))throw a;n.memoizedState=d,n.baseState=v,n.baseQueue=A,o.lastRenderedState=d}return f===null&&(o.lanes=0),[n.memoizedState,o.dispatch]}function Ec(n){var i=Fe(),a=i.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var o=a.dispatch,f=a.pending,d=i.memoizedState;if(f!==null){a.pending=null;var v=f=f.next;do d=n(d,v.action),v=v.next;while(v!==f);Lt(d,i.memoizedState)||(et=!0),i.memoizedState=d,i.baseQueue===null&&(i.baseState=d),a.lastRenderedState=d}return[d,o]}function Op(n,i,a){var o=ge,f=Fe(),d=Ee;if(d){if(a===void 0)throw Error(s(407));a=a()}else a=i();var v=!Lt((je||f).memoizedState,a);if(v&&(f.memoizedState=a,et=!0),f=f.queue,Rc(Dp.bind(null,o,f,n),[n]),f.getSnapshot!==i||v||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,Gr(9,{destroy:void 0},Cp.bind(null,o,f,a,i),null),Me===null)throw Error(s(349));d||(Ln&127)!==0||kp(o,i,a)}return a}function kp(n,i,a){n.flags|=16384,n={getSnapshot:i,value:a},i=ge.updateQueue,i===null?(i=xo(),ge.updateQueue=i,i.stores=[n]):(a=i.stores,a===null?i.stores=[n]:a.push(n))}function Cp(n,i,a,o){i.value=a,i.getSnapshot=o,xp(i)&&jp(n)}function Dp(n,i,a){return a(function(){xp(i)&&jp(n)})}function xp(n){var i=n.getSnapshot;n=n.value;try{var a=i();return!Lt(n,a)}catch{return!0}}function jp(n){var i=Yi(n,2);i!==null&&kt(i,n,2)}function Tc(n){var i=vt();if(typeof n=="function"){var a=n;if(n=a(),ir){ri(!0);try{a()}finally{ri(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:n},i}function Np(n,i,a,o){return n.baseState=a,Sc(n,je,typeof o=="function"?o:Un)}function yw(n,i,a,o,f){if(Mo(n))throw Error(s(485));if(n=i.action,n!==null){var d={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};M.T!==null?a(!0):d.isTransition=!1,o(d),a=i.pending,a===null?(d.next=i.pending=d,Lp(i,d)):(d.next=a.next,i.pending=a.next=d)}}function Lp(n,i){var a=i.action,o=i.payload,f=n.state;if(i.isTransition){var d=M.T,v={};M.T=v;try{var w=a(f,o),A=M.S;A!==null&&A(v,w),Up(n,i,w)}catch(L){Ac(n,i,L)}finally{d!==null&&v.types!==null&&(d.types=v.types),M.T=d}}else try{d=a(f,o),Up(n,i,d)}catch(L){Ac(n,i,L)}}function Up(n,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){Mp(n,i,o)},function(o){return Ac(n,i,o)}):Mp(n,i,a)}function Mp(n,i,a){i.status="fulfilled",i.value=a,zp(i),n.state=a,i=n.pending,i!==null&&(a=i.next,a===i?n.pending=null:(a=a.next,i.next=a,Lp(n,a)))}function Ac(n,i,a){var o=n.pending;if(n.pending=null,o!==null){o=o.next;do i.status="rejected",i.reason=a,zp(i),i=i.next;while(i!==o)}n.action=null}function zp(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Bp(n,i){return i}
vendor: 6,659 bytes, line 9
9function Pp(n,i){if(Ee){var a=Me.formState;if(a!==null){e:{var o=ge;if(Ee){if(He){t:{for(var f=He,d=Yt;f.nodeType!==8;){if(!d){f=null;break t}if(f=Qt(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){He=Qt(f.nextSibling),o=f.data==="F!";break e}}ui(o)}o=!1}o&&(i=a[0])}}return a=vt(),a.memoizedState=a.baseState=i,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bp,lastRenderedState:i},a.queue=o,a=rg.bind(null,ge,o),o.dispatch=a,o=Tc(!1),d=xc.bind(null,ge,!1,o.queue),o=vt(),f={state:i,dispatch:null,action:n,pending:null},o.queue=f,a=yw.bind(null,ge,f,d,a),f.dispatch=a,o.memoizedState=n,[i,a,!1]}function Hp(n){var i=Fe();return qp(i,je,n)}function qp(n,i,a){if(i=Sc(n,i,Bp)[0],n=No(Un)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var o=Js(i)}catch(v){throw v===Hr?Eo:v}else o=i;i=Fe();var f=i.queue,d=f.dispatch;return a!==i.memoizedState&&(ge.flags|=2048,Gr(9,{destroy:void 0},vw.bind(null,f,a),null)),[o,d,n]}function vw(n,i){n.action=i}function Ip(n){var i=Fe(),a=je;if(a!==null)return qp(i,a,n);Fe(),i=i.memoizedState,a=Fe();var o=a.queue.dispatch;return a.memoizedState=n,[i,o,!1]}function Gr(n,i,a,o){return n={tag:n,create:a,deps:o,inst:i,next:null},i=ge.updateQueue,i===null&&(i=xo(),ge.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=n.next=n:(o=a.next,a.next=n,n.next=o,i.lastEffect=n),n}function $p(){return Fe().memoizedState}function Lo(n,i,a,o){var f=vt();ge.flags|=n,f.memoizedState=Gr(1|i,{destroy:void 0},a,o===void 0?null:o)}function Uo(n,i,a,o){var f=Fe();o=o===void 0?null:o;var d=f.memoizedState.inst;je!==null&&o!==null&&mc(o,je.memoizedState.deps)?f.memoizedState=Gr(i,d,a,o):(ge.flags|=n,f.memoizedState=Gr(1|i,d,a,o))}function Kp(n,i){Lo(8390656,8,n,i)}function Rc(n,i){Uo(2048,8,n,i)}function bw(n){ge.flags|=4;var i=ge.updateQueue;if(i===null)i=xo(),ge.updateQueue=i,i.events=[n];else{var a=i.events;a===null?i.events=[n]:a.push(n)}}function Gp(n){var i=Fe().memoizedState;return bw({ref:i,nextImpl:n}),function(){if((Ce&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}function Vp(n,i){return Uo(4,2,n,i)}function Fp(n,i){return Uo(4,4,n,i)}function Yp(n,i){if(typeof i=="function"){n=n();var a=i(n);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function Jp(n,i,a){a=a!=null?a.concat([n]):null,Uo(4,4,Yp.bind(null,i,n),a)}function Oc(){}function Qp(n,i){var a=Fe();i=i===void 0?null:i;var o=a.memoizedState;return i!==null&&mc(i,o[1])?o[0]:(a.memoizedState=[n,i],n)}function Xp(n,i){var a=Fe();i=i===void 0?null:i;var o=a.memoizedState;if(i!==null&&mc(i,o[1]))return o[0];if(o=n(),ir){ri(!0);try{n()}finally{ri(!1)}}return a.memoizedState=[o,i],o}function kc(n,i,a){return a===void 0||(Ln&1073741824)!==0&&(we&261930)===0?n.memoizedState=i:(n.memoizedState=a,n=Zg(),ge.lanes|=n,vi|=n,a)}function Zp(n,i,a,o){return Lt(a,i)?a:Ir.current!==null?(n=kc(n,a,o),Lt(n,i)||(et=!0),n):(Ln&42)===0||(Ln&1073741824)!==0&&(we&261930)===0?(et=!0,n.memoizedState=a):(n=Zg(),ge.lanes|=n,vi|=n,i)}function Wp(n,i,a,o,f){var d=Q.p;Q.p=d!==0&&8>d?d:8;var v=M.T,w={};M.T=w,xc(n,!1,i,a);try{var A=f(),L=M.S;if(L!==null&&L(w,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var P=pw(A,o);Qs(n,i,P,Ht(n))}else Qs(n,i,o,Ht(n))}catch($){Qs(n,i,{then:function(){},status:"rejected",reason:$},Ht())}finally{Q.p=d,v!==null&&w.types!==null&&(v.types=w.types),M.T=v}}function _w(){}function Cc(n,i,a,o){if(n.tag!==5)throw Error(s(476));var f=eg(n).queue;Wp(n,f,i,oe,a===null?_w:function(){return tg(n),a(o)})}function eg(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:oe},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:a},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function tg(n){var i=eg(n);i.next===null&&(i=n.alternate.memoizedState),Qs(n,i.next.queue,{},Ht())}function Dc(){return ht(da)}function ng(){return Fe().memoizedState}function ig(){return Fe().memoizedState}function ww(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var a=Ht();n=hi(a);var o=di(i,n,a);o!==null&&(kt(o,i,a),Gs(o,i,a)),i={cache:sc()},n.payload=i;return}i=i.return}}function Sw(n,i,a){var o=Ht();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mo(n)?sg(i,a):(a=Yu(n,i,a,o),a!==null&&(kt(a,n,o),ag(a,i,o)))}function rg(n,i,a){var o=Ht();Qs(n,i,a,o)}function Qs(n,i,a,o){var f={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Mo(n))sg(i,f);else{var d=n.alternate;if(n.lanes===0&&(d===null||d.lanes===0)&&(d=i.lastRenderedReducer,d!==null))try{var v=i.lastRenderedState,w=d(v,a);if(f.hasEagerState=!0,f.eagerState=w,Lt(w,v))return mo(n,i,f,0),Me===null&&go(),!1}catch{}if(a=Yu(n,i,f,o),a!==null)return kt(a,n,o),ag(a,i,o),!0}return!1}function xc(n,i,a,o){if(o={lane:2,revertLane:cf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Mo(n)){if(i)throw Error(s(479))}else i=Yu(n,a,o,2),i!==null&&kt(i,n,2)}function Mo(n){var i=n.alternate;return n===ge||i!==null&&i===ge}function sg(n,i){$r=Co=!0;var a=n.pending;a===null?i.next=i:(i.next=a.next,a.next=i),n.pending=i}function ag(n,i,a){if((a&4194048)!==0){var o=i.lanes;o&=n.pendingLanes,a|=o,i.lanes=a,fd(n,a)}}var Xs={readContext:ht,use:jo,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};Xs.useEffectEvent=$e;var og={readContext:ht,use:jo,useCallback:function(n,i){return vt().memoizedState=[n,i===void 0?null:i],n},useContext:ht,useEffect:Kp,useImperativeHandle:function(n,i,a){a=a!=null?a.concat([n]):null,Lo(4194308,4,Yp.bind(null,i,n),a)},useLayoutEffect:function(n,i){return Lo(4194308,4,n,i)},useInsertionEffect:function(n,i){Lo(4,2,n,i)},useMemo:function(n,i){var a=vt();i=i===void 0?null:i;var o=n();if(ir){ri(!0);try{n()}finally{ri(!1)}}return a.memoizedState=[o,i],o},useReducer:function(n,i,a){var o=vt();if(a!==void 0){var f=a(i);if(ir){ri(!0);try{a(i)}finally{ri(!1)}}}else f=i;return o.memoizedState=o.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},o.queue=n,n=n.dispatch=Sw.bind(null,ge,n),[o.memoizedState,n]}
vendor: 6,915 bytes, line 9
9,useRef:function(n){var i=vt();return n={current:n},i.memoizedState=n},useState:function(n){n=Tc(n);var i=n.queue,a=rg.bind(null,ge,i);return i.dispatch=a,[n.memoizedState,a]},useDebugValue:Oc,useDeferredValue:function(n,i){var a=vt();return kc(a,n,i)},useTransition:function(){var n=Tc(!1);return n=Wp.bind(null,ge,n.queue,!0,!1),vt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,a){var o=ge,f=vt();if(Ee){if(a===void 0)throw Error(s(407));a=a()}else{if(a=i(),Me===null)throw Error(s(349));(we&127)!==0||kp(o,i,a)}f.memoizedState=a;var d={value:a,getSnapshot:i};return f.queue=d,Kp(Dp.bind(null,o,d,n),[n]),o.flags|=2048,Gr(9,{destroy:void 0},Cp.bind(null,o,d,a,i),null),a},useId:function(){var n=vt(),i=Me.identifierPrefix;if(Ee){var a=gn,o=pn;a=(o&~(1<<32-Nt(o)-1)).toString(32)+a,i="_"+i+"R_"+a,a=Do++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=gw++,i="_"+i+"r_"+a.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:Dc,useFormState:Pp,useActionState:Pp,useOptimistic:function(n){var i=vt();i.memoizedState=i.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=xc.bind(null,ge,!0,a),a.dispatch=i,[n,i]},useMemoCache:wc,useCacheRefresh:function(){return vt().memoizedState=ww.bind(null,ge)},useEffectEvent:function(n){var i=vt(),a={impl:n};return i.memoizedState=a,function(){if((Ce&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},jc={readContext:ht,use:jo,useCallback:Qp,useContext:ht,useEffect:Rc,useImperativeHandle:Jp,useInsertionEffect:Vp,useLayoutEffect:Fp,useMemo:Xp,useReducer:No,useRef:$p,useState:function(){return No(Un)},useDebugValue:Oc,useDeferredValue:function(n,i){var a=Fe();return Zp(a,je.memoizedState,n,i)},useTransition:function(){var n=No(Un)[0],i=Fe().memoizedState;return[typeof n=="boolean"?n:Js(n),i]},useSyncExternalStore:Op,useId:ng,useHostTransitionStatus:Dc,useFormState:Hp,useActionState:Hp,useOptimistic:function(n,i){var a=Fe();return Np(a,je,n,i)},useMemoCache:wc,useCacheRefresh:ig};jc.useEffectEvent=Gp;var lg={readContext:ht,use:jo,useCallback:Qp,useContext:ht,useEffect:Rc,useImperativeHandle:Jp,useInsertionEffect:Vp,useLayoutEffect:Fp,useMemo:Xp,useReducer:Ec,useRef:$p,useState:function(){return Ec(Un)},useDebugValue:Oc,useDeferredValue:function(n,i){var a=Fe();return je===null?kc(a,n,i):Zp(a,je.memoizedState,n,i)},useTransition:function(){var n=Ec(Un)[0],i=Fe().memoizedState;return[typeof n=="boolean"?n:Js(n),i]},useSyncExternalStore:Op,useId:ng,useHostTransitionStatus:Dc,useFormState:Ip,useActionState:Ip,useOptimistic:function(n,i){var a=Fe();return je!==null?Np(a,je,n,i):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:wc,useCacheRefresh:ig};lg.useEffectEvent=Gp;function Nc(n,i,a,o){i=n.memoizedState,a=a(o,i),a=a==null?i:m({},i,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var Lc={enqueueSetState:function(n,i,a){n=n._reactInternals;var o=Ht(),f=hi(o);f.payload=i,a!=null&&(f.callback=a),i=di(n,f,o),i!==null&&(kt(i,n,o),Gs(i,n,o))},enqueueReplaceState:function(n,i,a){n=n._reactInternals;var o=Ht(),f=hi(o);f.tag=1,f.payload=i,a!=null&&(f.callback=a),i=di(n,f,o),i!==null&&(kt(i,n,o),Gs(i,n,o))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var a=Ht(),o=hi(a);o.tag=2,i!=null&&(o.callback=i),i=di(n,o,a),i!==null&&(kt(i,n,a),Gs(i,n,a))}};function ug(n,i,a,o,f,d,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(o,d,v):i.prototype&&i.prototype.isPureReactComponent?!zs(a,o)||!zs(f,d):!0}function cg(n,i,a,o){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,o),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,o),i.state!==n&&Lc.enqueueReplaceState(i,i.state,null)}function rr(n,i){var a=i;if("ref"in i){a={};for(var o in i)o!=="ref"&&(a[o]=i[o])}if(n=n.defaultProps){a===i&&(a=m({},a));for(var f in n)a[f]===void 0&&(a[f]=n[f])}return a}function fg(n){po(n)}function hg(n){console.error(n)}function dg(n){po(n)}function zo(n,i){try{var a=n.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(o){setTimeout(function(){throw o})}}function pg(n,i,a){try{var o=n.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Uc(n,i,a){return a=hi(a),a.tag=3,a.payload={element:null},a.callback=function(){zo(n,i)},a}function gg(n){return n=hi(n),n.tag=3,n}function mg(n,i,a,o){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var d=o.value;n.payload=function(){return f(d)},n.callback=function(){pg(i,a,o)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){pg(i,a,o),typeof f!="function"&&(bi===null?bi=new Set([this]):bi.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function Ew(n,i,a,o,f){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(i=a.alternate,i!==null&&zr(i,a,f,!0),a=Mt.current,a!==null){switch(a.tag){case 31:case 13:return Jt===null?Jo():a.alternate===null&&Ke===0&&(Ke=3),a.flags&=-257,a.flags|=65536,a.lanes=f,o===To?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([o]):i.add(o),of(n,o,f)),!1;case 22:return a.flags|=65536,o===To?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([o]):a.add(o)),of(n,o,f)),!1}throw Error(s(435,a.tag))}return of(n,o,f),Jo(),!1}if(Ee)return i=Mt.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,o!==ec&&(n=Error(s(422),{cause:o}),Hs(Gt(n,a)))):(o!==ec&&(i=Error(s(423),{cause:o}),Hs(Gt(i,a))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,o=Gt(o,a),f=Uc(n.stateNode,o,f),fc(n,f),Ke!==4&&(Ke=2)),!1;var d=Error(s(520),{cause:o});if(d=Gt(d,a),sa===null?sa=[d]:sa.push(d),Ke!==4&&(Ke=2),i===null)return!0;o=Gt(o,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,n=f&-f,a.lanes|=n,n=Uc(a.stateNode,o,n),fc(a,n),!1;case 1:if(i=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(bi===null||!bi.has(d))))return a.flags|=65536,f&=-f,a.lanes|=f,f=gg(f),mg(f,n,a,o),fc(a,f),!1}a=a.return}while(a!==null);return!1}var Mc=Error(s(461)),et=!1;function dt(n,i,a,o){i.child=n===null?_p(i,null,a,o):nr(i,n.child,a,o)}function yg(n,i,a,o,f){a=a.render;var d=i.ref;if("ref"in o){var v={};for(var w in o)w!=="ref"&&(v[w]=o[w])}else v=o;return Zi(i),o=yc(n,i,a,v,d,f),w=vc(),n!==null&&!et?(bc(n,i,f),Mn(n,i,f)):(Ee&&w&&Zu(i),i.flags|=1,dt(n,i,o,f),i.child)}function vg(n,i,a,o,f){if(n===null){var d=a.type;return typeof d=="function"&&!Ju(d)&&d.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=d,bg(n,i,d,o,f)):(n=vo(a.type,null,o,i,i.mode,f),n.ref=i.ref,n.return=i,i.child=n)}
vendor: 7,731 bytes, line 9
9if(d=n.child,!Kc(n,f)){var v=d.memoizedProps;if(a=a.compare,a=a!==null?a:zs,a(v,o)&&n.ref===i.ref)return Mn(n,i,f)}return i.flags|=1,n=Dn(d,o),n.ref=i.ref,n.return=i,i.child=n}function bg(n,i,a,o,f){if(n!==null){var d=n.memoizedProps;if(zs(d,o)&&n.ref===i.ref)if(et=!1,i.pendingProps=o=d,Kc(n,f))(n.flags&131072)!==0&&(et=!0);else return i.lanes=n.lanes,Mn(n,i,f)}return zc(n,i,a,o,f)}function _g(n,i,a,o){var f=o.children,d=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((i.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,n!==null){for(o=i.child=n.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~d}else o=0,i.child=null;return wg(n,i,d,a,o)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&So(i,d!==null?d.cachePool:null),d!==null?Ep(i,d):dc(),Tp(i);else return o=i.lanes=536870912,wg(n,i,d!==null?d.baseLanes|a:a,a,o)}else d!==null?(So(i,d.cachePool),Ep(i,d),gi(),i.memoizedState=null):(n!==null&&So(i,null),dc(),gi());return dt(n,i,f,a),i.child}function Zs(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function wg(n,i,a,o,f){var d=oc();return d=d===null?null:{parent:Ze._currentValue,pool:d},i.memoizedState={baseLanes:a,cachePool:d},n!==null&&So(i,null),dc(),Tp(i),n!==null&&zr(n,i,o,!0),i.childLanes=f,null}function Bo(n,i){return i=Ho({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Sg(n,i,a){return nr(i,n.child,null,a),n=Bo(i,i.pendingProps),n.flags|=2,zt(i),i.memoizedState=null,n}function Tw(n,i,a){var o=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Ee){if(o.mode==="hidden")return n=Bo(i,o),i.lanes=536870912,Zs(null,n);if(gc(i),(n=He)?(n=Lm(n,Yt),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:oi!==null?{id:pn,overflow:gn}:null,retryLane:536870912,hydrationErrors:null},a=sp(n),a.return=i,i.child=a,ft=i,He=null)):n=null,n===null)throw ui(i);return i.lanes=536870912,null}return Bo(i,o)}var d=n.memoizedState;if(d!==null){var v=d.dehydrated;if(gc(i),f)if(i.flags&256)i.flags&=-257,i=Sg(n,i,a);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(s(558));else if(et||zr(n,i,a,!1),f=(a&n.childLanes)!==0,et||f){if(o=Me,o!==null&&(v=hd(o,a),v!==0&&v!==d.retryLane))throw d.retryLane=v,Yi(n,v),kt(o,n,v),Mc;Jo(),i=Sg(n,i,a)}else n=d.treeContext,He=Qt(v.nextSibling),ft=i,Ee=!0,li=null,Yt=!1,n!==null&&lp(i,n),i=Bo(i,o),i.flags|=4096;return i}return n=Dn(n.child,{mode:o.mode,children:o.children}),n.ref=i.ref,i.child=n,n.return=i,n}function Po(n,i){var a=i.ref;if(a===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(n===null||n.ref!==a)&&(i.flags|=4194816)}}function zc(n,i,a,o,f){return Zi(i),a=yc(n,i,a,o,void 0,f),o=vc(),n!==null&&!et?(bc(n,i,f),Mn(n,i,f)):(Ee&&o&&Zu(i),i.flags|=1,dt(n,i,a,f),i.child)}function Eg(n,i,a,o,f,d){return Zi(i),i.updateQueue=null,a=Rp(i,o,a,f),Ap(n),o=vc(),n!==null&&!et?(bc(n,i,d),Mn(n,i,d)):(Ee&&o&&Zu(i),i.flags|=1,dt(n,i,a,d),i.child)}function Tg(n,i,a,o,f){if(Zi(i),i.stateNode===null){var d=Nr,v=a.contextType;typeof v=="object"&&v!==null&&(d=ht(v)),d=new a(o,d),i.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Lc,i.stateNode=d,d._reactInternals=i,d=i.stateNode,d.props=o,d.state=i.memoizedState,d.refs={},uc(i),v=a.contextType,d.context=typeof v=="object"&&v!==null?ht(v):Nr,d.state=i.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Nc(i,a,v,o),d.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Lc.enqueueReplaceState(d,d.state,null),Fs(i,o,d,f),Vs(),d.state=i.memoizedState),typeof d.componentDidMount=="function"&&(i.flags|=4194308),o=!0}else if(n===null){d=i.stateNode;var w=i.memoizedProps,A=rr(a,w);d.props=A;var L=d.context,P=a.contextType;v=Nr,typeof P=="object"&&P!==null&&(v=ht(P));var $=a.getDerivedStateFromProps;P=typeof $=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=i.pendingProps!==w,P||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||L!==v)&&cg(i,d,o,v),fi=!1;var U=i.memoizedState;d.state=U,Fs(i,o,d,f),Vs(),L=i.memoizedState,w||U!==L||fi?(typeof $=="function"&&(Nc(i,a,$,o),L=i.memoizedState),(A=fi||ug(i,a,A,o,U,L,v))?(P||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(i.flags|=4194308)):(typeof d.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=o,i.memoizedState=L),d.props=o,d.state=L,d.context=v,o=A):(typeof d.componentDidMount=="function"&&(i.flags|=4194308),o=!1)}else{d=i.stateNode,cc(n,i),v=i.memoizedProps,P=rr(a,v),d.props=P,$=i.pendingProps,U=d.context,L=a.contextType,A=Nr,typeof L=="object"&&L!==null&&(A=ht(L)),w=a.getDerivedStateFromProps,(L=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==$||U!==A)&&cg(i,d,o,A),fi=!1,U=i.memoizedState,d.state=U,Fs(i,o,d,f),Vs();var z=i.memoizedState;v!==$||U!==z||fi||n!==null&&n.dependencies!==null&&_o(n.dependencies)?(typeof w=="function"&&(Nc(i,a,w,o),z=i.memoizedState),(P=fi||ug(i,a,P,o,U,z,A)||n!==null&&n.dependencies!==null&&_o(n.dependencies))?(L||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,z,A),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,z,A)),typeof d.componentDidUpdate=="function"&&(i.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(i.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(i.flags|=1024),i.memoizedProps=o,i.memoizedState=z),d.props=o,d.state=z,d.context=A,o=P):(typeof d.componentDidUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(i.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&U===n.memoizedState||(i.flags|=1024),o=!1)}return d=o,Po(n,i),o=(i.flags&128)!==0,d||o?(d=i.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:d.render(),i.flags|=1,n!==null&&o?(i.child=nr(i,n.child,null,f),i.child=nr(i,null,a,f)):dt(n,i,a,f),i.memoizedState=d.state,n=i.child):n=Mn(n,i,f),n}function Ag(n,i,a,o){return Qi(),i.flags|=256,dt(n,i,a,o),i.child}var Bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(n){return{baseLanes:n,cachePool:pp()}}function Hc(n,i,a){return n=n!==null?n.childLanes&~a:0,i&&(n|=Pt),n}function Rg(n,i,a){var o=i.pendingProps,f=!1,d=(i.flags&128)!==0,v;if((v=d)||(v=n!==null&&n.memoizedState===null?!1:(Ve.current&2)!==0),v&&(f=!0,i.flags&=-129),v=(i.flags&32)!==0,i.flags&=-33,n===null){if(Ee){if(f?pi(i):gi(),(n=He)?(n=Lm(n,Yt),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:oi!==null?{id:pn,overflow:gn}:null,retryLane:536870912,hydrationErrors:null}
vendor: 6,366 bytes, line 9
9,a=sp(n),a.return=i,i.child=a,ft=i,He=null)):n=null,n===null)throw ui(i);return Ef(n)?i.lanes=32:i.lanes=536870912,null}var w=o.children;return o=o.fallback,f?(gi(),f=i.mode,w=Ho({mode:"hidden",children:w},f),o=Ji(o,f,a,null),w.return=i,o.return=i,w.sibling=o,i.child=w,o=i.child,o.memoizedState=Pc(a),o.childLanes=Hc(n,v,a),i.memoizedState=Bc,Zs(null,o)):(pi(i),qc(i,w))}var A=n.memoizedState;if(A!==null&&(w=A.dehydrated,w!==null)){if(d)i.flags&256?(pi(i),i.flags&=-257,i=Ic(n,i,a)):i.memoizedState!==null?(gi(),i.child=n.child,i.flags|=128,i=null):(gi(),w=o.fallback,f=i.mode,o=Ho({mode:"visible",children:o.children},f),w=Ji(w,f,a,null),w.flags|=2,o.return=i,w.return=i,o.sibling=w,i.child=o,nr(i,n.child,null,a),o=i.child,o.memoizedState=Pc(a),o.childLanes=Hc(n,v,a),i.memoizedState=Bc,i=Zs(null,o));else if(pi(i),Ef(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var L=v.dgst;v=L,o=Error(s(419)),o.stack="",o.digest=v,Hs({value:o,source:null,stack:null}),i=Ic(n,i,a)}else if(et||zr(n,i,a,!1),v=(a&n.childLanes)!==0,et||v){if(v=Me,v!==null&&(o=hd(v,a),o!==0&&o!==A.retryLane))throw A.retryLane=o,Yi(n,o),kt(v,n,o),Mc;Sf(w)||Jo(),i=Ic(n,i,a)}else Sf(w)?(i.flags|=192,i.child=n.child,i=null):(n=A.treeContext,He=Qt(w.nextSibling),ft=i,Ee=!0,li=null,Yt=!1,n!==null&&lp(i,n),i=qc(i,o.children),i.flags|=4096);return i}return f?(gi(),w=o.fallback,f=i.mode,A=n.child,L=A.sibling,o=Dn(A,{mode:"hidden",children:o.children}),o.subtreeFlags=A.subtreeFlags&65011712,L!==null?w=Dn(L,w):(w=Ji(w,f,a,null),w.flags|=2),w.return=i,o.return=i,o.sibling=w,i.child=o,Zs(null,o),o=i.child,w=n.child.memoizedState,w===null?w=Pc(a):(f=w.cachePool,f!==null?(A=Ze._currentValue,f=f.parent!==A?{parent:A,pool:A}:f):f=pp(),w={baseLanes:w.baseLanes|a,cachePool:f}),o.memoizedState=w,o.childLanes=Hc(n,v,a),i.memoizedState=Bc,Zs(n.child,o)):(pi(i),a=n.child,n=a.sibling,a=Dn(a,{mode:"visible",children:o.children}),a.return=i,a.sibling=null,n!==null&&(v=i.deletions,v===null?(i.deletions=[n],i.flags|=16):v.push(n)),i.child=a,i.memoizedState=null,a)}function qc(n,i){return i=Ho({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function Ho(n,i){return n=Ut(22,n,null,i),n.lanes=0,n}function Ic(n,i,a){return nr(i,n.child,null,a),n=qc(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Og(n,i,a){n.lanes|=i;var o=n.alternate;o!==null&&(o.lanes|=i),ic(n.return,i,a)}function $c(n,i,a,o,f,d){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:f,treeForkCount:d}:(v.isBackwards=i,v.rendering=null,v.renderingStartTime=0,v.last=o,v.tail=a,v.tailMode=f,v.treeForkCount=d)}function kg(n,i,a){var o=i.pendingProps,f=o.revealOrder,d=o.tail;o=o.children;var v=Ve.current,w=(v&2)!==0;if(w?(v=v&1|2,i.flags|=128):v&=1,Y(Ve,v),dt(n,i,o,a),o=Ee?Ps:0,!w&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Og(n,a,i);else if(n.tag===19)Og(n,a,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(a=i.child,f=null;a!==null;)n=a.alternate,n!==null&&ko(n)===null&&(f=a),a=a.sibling;a=f,a===null?(f=i.child,i.child=null):(f=a.sibling,a.sibling=null),$c(i,!1,f,a,d,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=i.child,i.child=null;f!==null;){if(n=f.alternate,n!==null&&ko(n)===null){i.child=f;break}n=f.sibling,f.sibling=a,a=f,f=n}$c(i,!0,a,null,d,o);break;case"together":$c(i,!1,null,null,void 0,o);break;default:i.memoizedState=null}return i.child}function Mn(n,i,a){if(n!==null&&(i.dependencies=n.dependencies),vi|=i.lanes,(a&i.childLanes)===0)if(n!==null){if(zr(n,i,a,!1),(a&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(s(153));if(i.child!==null){for(n=i.child,a=Dn(n,n.pendingProps),i.child=a,a.return=i;n.sibling!==null;)n=n.sibling,a=a.sibling=Dn(n,n.pendingProps),a.return=i;a.sibling=null}return i.child}function Kc(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&_o(n)))}function Aw(n,i,a){switch(i.tag){case 3:ke(i,i.stateNode.containerInfo),ci(i,Ze,n.memoizedState.cache),Qi();break;case 27:case 5:dn(i);break;case 4:ke(i,i.stateNode.containerInfo);break;case 10:ci(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,gc(i),null;break;case 13:var o=i.memoizedState;if(o!==null)return o.dehydrated!==null?(pi(i),i.flags|=128,null):(a&i.child.childLanes)!==0?Rg(n,i,a):(pi(i),n=Mn(n,i,a),n!==null?n.sibling:null);pi(i);break;case 19:var f=(n.flags&128)!==0;if(o=(a&i.childLanes)!==0,o||(zr(n,i,a,!1),o=(a&i.childLanes)!==0),f){if(o)return kg(n,i,a);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Y(Ve,Ve.current),o)break;return null;case 22:return i.lanes=0,_g(n,i,a,i.pendingProps);case 24:ci(i,Ze,n.memoizedState.cache)}return Mn(n,i,a)}function Cg(n,i,a){if(n!==null)if(n.memoizedProps!==i.pendingProps)et=!0;else{if(!Kc(n,a)&&(i.flags&128)===0)return et=!1,Aw(n,i,a);et=(n.flags&131072)!==0}else et=!1,Ee&&(i.flags&1048576)!==0&&op(i,Ps,i.index);switch(i.lanes=0,i.tag){case 16:e:{var o=i.pendingProps;if(n=er(i.elementType),i.type=n,typeof n=="function")Ju(n)?(o=rr(n,o),i.tag=1,i=Tg(null,i,n,o,a)):(i.tag=0,i=zc(null,i,n,o,a));else{if(n!=null){var f=n.$$typeof;if(f===H){i.tag=11,i=yg(null,i,n,o,a);break e}else if(f===j){i.tag=14,i=vg(null,i,n,o,a);break e}}throw i=he(n)||n,Error(s(306,i,""))}}return i;case 0:return zc(n,i,i.type,i.pendingProps,a);case 1:return o=i.type,f=rr(o,i.pendingProps),Tg(n,i,o,f,a);case 3:e:{if(ke(i,i.stateNode.containerInfo),n===null)throw Error(s(387));o=i.pendingProps;var d=i.memoizedState;f=d.element,cc(n,i),Fs(i,o,null,a);var v=i.memoizedState;if(o=v.cache,ci(i,Ze,o),o!==d.cache&&rc(i,[Ze],a,!0),Vs(),o=v.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:v.cache},i.updateQueue.baseState=d,i.memoizedState=d,i.flags&256){i=Ag(n,i,o,a);break e}else if(o!==f){f=Gt(Error(s(424)),i),Hs(f),i=Ag(n,i,o,a);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,He=Qt(n.firstChild),ft=i,Ee=!0,li=null,Yt=!0,a=_p(i,null,o,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Qi(),o===f){i=Mn(n,i,a);break e}
vendor: 5,099 bytes, line 9
9dt(n,i,o,a)}i=i.child}return i;case 26:return Po(n,i),n===null?(a=Hm(i.type,null,i.pendingProps,null))?i.memoizedState=a:Ee||(a=i.type,n=i.pendingProps,o=nl(ye.current).createElement(a),o[ct]=i,o[St]=n,pt(o,a,n),at(o),i.stateNode=o):i.memoizedState=Hm(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return dn(i),n===null&&Ee&&(o=i.stateNode=zm(i.type,i.pendingProps,ye.current),ft=i,Yt=!0,f=He,Ei(i.type)?(Tf=f,He=Qt(o.firstChild)):He=f),dt(n,i,i.pendingProps.children,a),Po(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Ee&&((f=o=He)&&(o=tS(o,i.type,i.pendingProps,Yt),o!==null?(i.stateNode=o,ft=i,He=Qt(o.firstChild),Yt=!1,f=!0):f=!1),f||ui(i)),dn(i),f=i.type,d=i.pendingProps,v=n!==null?n.memoizedProps:null,o=d.children,bf(f,d)?o=null:v!==null&&bf(f,v)&&(i.flags|=32),i.memoizedState!==null&&(f=yc(n,i,mw,null,null,a),da._currentValue=f),Po(n,i),dt(n,i,o,a),i.child;case 6:return n===null&&Ee&&((n=a=He)&&(a=nS(a,i.pendingProps,Yt),a!==null?(i.stateNode=a,ft=i,He=null,n=!0):n=!1),n||ui(i)),null;case 13:return Rg(n,i,a);case 4:return ke(i,i.stateNode.containerInfo),o=i.pendingProps,n===null?i.child=nr(i,null,o,a):dt(n,i,o,a),i.child;case 11:return yg(n,i,i.type,i.pendingProps,a);case 7:return dt(n,i,i.pendingProps,a),i.child;case 8:return dt(n,i,i.pendingProps.children,a),i.child;case 12:return dt(n,i,i.pendingProps.children,a),i.child;case 10:return o=i.pendingProps,ci(i,i.type,o.value),dt(n,i,o.children,a),i.child;case 9:return f=i.type._context,o=i.pendingProps.children,Zi(i),f=ht(f),o=o(f),i.flags|=1,dt(n,i,o,a),i.child;case 14:return vg(n,i,i.type,i.pendingProps,a);case 15:return bg(n,i,i.type,i.pendingProps,a);case 19:return kg(n,i,a);case 31:return Tw(n,i,a);case 22:return _g(n,i,a,i.pendingProps);case 24:return Zi(i),o=ht(Ze),n===null?(f=oc(),f===null&&(f=Me,d=sc(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=a),f=d),i.memoizedState={parent:o,cache:f},uc(i),ci(i,Ze,f)):((n.lanes&a)!==0&&(cc(n,i),Fs(i,null,null,a),Vs()),f=n.memoizedState,d=i.memoizedState,f.parent!==o?(f={parent:o,cache:o},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),ci(i,Ze,o)):(o=d.cache,ci(i,Ze,o),o!==f.cache&&rc(i,[Ze],a,!0))),dt(n,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(s(156,i.tag))}function zn(n){n.flags|=4}function Gc(n,i,a,o,f){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(nm())n.flags|=8192;else throw tr=To,lc}else n.flags&=-16777217}function Dg(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Gm(i))if(nm())n.flags|=8192;else throw tr=To,lc}function qo(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?ud():536870912,n.lanes|=i,Jr|=i)}function Ws(n,i){if(!Ee)switch(n.tailMode){case"hidden":i=n.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:o.sibling=null}}function qe(n){var i=n.alternate!==null&&n.alternate.child===n.child,a=0,o=0;if(i)for(var f=n.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=o,n.childLanes=a,i}function Rw(n,i,a){var o=i.pendingProps;switch(Wu(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(i),null;case 1:return qe(i),null;case 3:return a=i.stateNode,o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Nn(Ze),ze(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(Mr(i)?zn(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,tc())),qe(i),null;case 26:var f=i.type,d=i.memoizedState;return n===null?(zn(i),d!==null?(qe(i),Dg(i,d)):(qe(i),Gc(i,f,null,o,a))):d?d!==n.memoizedState?(zn(i),qe(i),Dg(i,d)):(qe(i),i.flags&=-16777217):(n=n.memoizedProps,n!==o&&zn(i),qe(i),Gc(i,f,n,o,a)),null;case 27:if(qi(i),a=ye.current,f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==o&&zn(i);else{if(!o){if(i.stateNode===null)throw Error(s(166));return qe(i),null}n=te.current,Mr(i)?up(i):(n=zm(f,o,a),i.stateNode=n,zn(i))}return qe(i),null;case 5:if(qi(i),f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==o&&zn(i);else{if(!o){if(i.stateNode===null)throw Error(s(166));return qe(i),null}if(d=te.current,Mr(i))up(i);else{var v=nl(ye.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;
vendor: 24,322 bytes, line 9
9case"select":d=typeof o.is=="string"?v.createElement("select",{is:o.is}):v.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?v.createElement(f,{is:o.is}):v.createElement(f)}}d[ct]=i,d[St]=o;e:for(v=i.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===i)break e;for(;v.sibling===null;){if(v.return===null||v.return===i)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}i.stateNode=d;e:switch(pt(d,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&zn(i)}}return qe(i),Gc(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,a),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==o&&zn(i);else{if(typeof o!="string"&&i.stateNode===null)throw Error(s(166));if(n=ye.current,Mr(i)){if(n=i.stateNode,a=i.memoizedProps,o=null,f=ft,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}n[ct]=i,n=!!(n.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||Rm(n.nodeValue,a)),n||ui(i,!0)}else n=nl(n).createTextNode(o),n[ct]=i,i.stateNode=n}return qe(i),null;case 31:if(a=i.memoizedState,n===null||n.memoizedState!==null){if(o=Mr(i),a!==null){if(n===null){if(!o)throw Error(s(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[ct]=i}else Qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;qe(i),n=!1}else a=tc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return i.flags&256?(zt(i),i):(zt(i),null);if((i.flags&128)!==0)throw Error(s(558))}return qe(i),null;case 13:if(o=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=Mr(i),o!==null&&o.dehydrated!==null){if(n===null){if(!f)throw Error(s(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[ct]=i}else Qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;qe(i),f=!1}else f=tc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(zt(i),i):(zt(i),null)}return zt(i),(i.flags&128)!==0?(i.lanes=a,i):(a=o!==null,n=n!==null&&n.memoizedState!==null,a&&(o=i.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==f&&(o.flags|=2048)),a!==n&&a&&(i.child.flags|=8192),qo(i,i.updateQueue),qe(i),null);case 4:return ze(),n===null&&pf(i.stateNode.containerInfo),qe(i),null;case 10:return Nn(i.type),qe(i),null;case 19:if(I(Ve),o=i.memoizedState,o===null)return qe(i),null;if(f=(i.flags&128)!==0,d=o.rendering,d===null)if(f)Ws(o,!1);else{if(Ke!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(d=ko(n),d!==null){for(i.flags|=128,Ws(o,!1),n=d.updateQueue,i.updateQueue=n,qo(i,n),i.subtreeFlags=0,n=a,a=i.child;a!==null;)rp(a,n),a=a.sibling;return Y(Ve,Ve.current&1|2),Ee&&xn(i,o.treeForkCount),i.child}n=n.sibling}o.tail!==null&&xt()>Vo&&(i.flags|=128,f=!0,Ws(o,!1),i.lanes=4194304)}else{if(!f)if(n=ko(d),n!==null){if(i.flags|=128,f=!0,n=n.updateQueue,i.updateQueue=n,qo(i,n),Ws(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!Ee)return qe(i),null}else 2*xt()-o.renderingStartTime>Vo&&a!==536870912&&(i.flags|=128,f=!0,Ws(o,!1),i.lanes=4194304);o.isBackwards?(d.sibling=i.child,i.child=d):(n=o.last,n!==null?n.sibling=d:i.child=d,o.last=d)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=xt(),n.sibling=null,a=Ve.current,Y(Ve,f?a&1|2:a&1),Ee&&xn(i,o.treeForkCount),n):(qe(i),null);case 22:case 23:return zt(i),pc(),o=i.memoizedState!==null,n!==null?n.memoizedState!==null!==o&&(i.flags|=8192):o&&(i.flags|=8192),o?(a&536870912)!==0&&(i.flags&128)===0&&(qe(i),i.subtreeFlags&6&&(i.flags|=8192)):qe(i),a=i.updateQueue,a!==null&&qo(i,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==a&&(i.flags|=2048),n!==null&&I(Wi),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),Nn(Ze),qe(i),null;case 25:return null;case 30:return null}throw Error(s(156,i.tag))}function Ow(n,i){switch(Wu(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Nn(Ze),ze(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return qi(i),null;case 31:if(i.memoizedState!==null){if(zt(i),i.alternate===null)throw Error(s(340));Qi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(zt(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(s(340));Qi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return I(Ve),null;case 4:return ze(),null;case 10:return Nn(i.type),null;case 22:case 23:return zt(i),pc(),n!==null&&I(Wi),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Nn(Ze),null;case 25:return null;default:return null}}function xg(n,i){switch(Wu(i),i.tag){case 3:Nn(Ze),ze();break;case 26:case 27:case 5:qi(i);break;case 4:ze();break;case 31:i.memoizedState!==null&&zt(i);break;case 13:zt(i);break;case 19:I(Ve);break;case 10:Nn(i.type);break;case 22:case 23:zt(i),pc(),n!==null&&I(Wi);break;case 24:Nn(Ze)}}function ea(n,i){try{var a=i.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var f=o.next;a=f;do{if((a.tag&n)===n){o=void 0;var d=a.create,v=a.inst;o=d(),v.destroy=o}a=a.next}while(a!==f)}}catch(w){xe(i,i.return,w)}}function mi(n,i,a){try{var o=i.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var d=f.next;o=d;do{if((o.tag&n)===n){var v=o.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,f=i;var A=a,L=w;try{L()}catch(P){xe(f,A,P)}}}o=o.next}while(o!==d)}}catch(P){xe(i,i.return,P)}}function jg(n){var i=n.updateQueue;if(i!==null){var a=n.stateNode;try{Sp(i,a)}catch(o){xe(n,n.return,o)}}}function Ng(n,i,a){a.props=rr(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(o){xe(n,i,o)}}function ta(n,i){try{var a=n.ref;if(a!==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 a=="function"?n.refCleanup=a(o):a.current=o}}catch(f){xe(n,i,f)}}function mn(n,i){var a=n.ref,o=n.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(f){xe(n,i,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){xe(n,i,f)}else a.current=null}function Lg(n){var i=n.type,a=n.memoizedProps,o=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(f){xe(n,n.return,f)}}function Vc(n,i,a){try{var o=n.stateNode;Jw(o,n.type,a,i),o[St]=i}catch(f){xe(n,n.return,f)}}function Ug(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ei(n.type)||n.tag===4}function Fc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Ug(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&&Ei(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 Yc(n,i,a){var o=n.tag;if(o===5||o===6)n=n.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(n),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=kn));else if(o!==4&&(o===27&&Ei(n.type)&&(a=n.stateNode,i=null),n=n.child,n!==null))for(Yc(n,i,a),n=n.sibling;n!==null;)Yc(n,i,a),n=n.sibling}function Io(n,i,a){var o=n.tag;if(o===5||o===6)n=n.stateNode,i?a.insertBefore(n,i):a.appendChild(n);else if(o!==4&&(o===27&&Ei(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(Io(n,i,a),n=n.sibling;n!==null;)Io(n,i,a),n=n.sibling}function Mg(n){var i=n.stateNode,a=n.memoizedProps;try{for(var o=n.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);pt(i,o,a),i[ct]=n,i[St]=a}catch(d){xe(n,n.return,d)}}var Bn=!1,tt=!1,Jc=!1,zg=typeof WeakSet=="function"?WeakSet:Set,ot=null;function kw(n,i){if(n=n.containerInfo,yf=ul,n=Jd(n),Iu(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var f=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var v=0,w=-1,A=-1,L=0,P=0,$=n,U=null;t:for(;;){for(var z;$!==a||f!==0&&$.nodeType!==3||(w=v+f),$!==d||o!==0&&$.nodeType!==3||(A=v+o),$.nodeType===3&&(v+=$.nodeValue.length),(z=$.firstChild)!==null;)U=$,$=z;for(;;){if($===n)break t;if(U===a&&++L===f&&(w=v),U===d&&++P===o&&(A=v),(z=$.nextSibling)!==null)break;$=U,U=$.parentNode}$=z}a=w===-1||A===-1?null:{start:w,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(vf={focusedElem:n,selectionRange:a},ul=!1,ot=i;ot!==null;)if(i=ot,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,ot=n;else for(;ot!==null;){switch(i=ot,d=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(a=0;a<n.length;a++)f=n[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&d!==null){n=void 0,a=i,f=d.memoizedProps,d=d.memoizedState,o=a.stateNode;try{var ee=rr(a.type,f);n=o.getSnapshotBeforeUpdate(ee,d),o.__reactInternalSnapshotBeforeUpdate=n}catch(fe){xe(a,a.return,fe)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,a=n.nodeType,a===9)wf(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":wf(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(s(163))}if(n=i.sibling,n!==null){n.return=i.return,ot=n;break}ot=i.return}}function Bg(n,i,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:Hn(n,a),o&4&&ea(5,a);break;case 1:if(Hn(n,a),o&4)if(n=a.stateNode,i===null)try{n.componentDidMount()}catch(v){xe(a,a.return,v)}else{var f=rr(a.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(f,i,n.__reactInternalSnapshotBeforeUpdate)}catch(v){xe(a,a.return,v)}}o&64&&jg(a),o&512&&ta(a,a.return);break;case 3:if(Hn(n,a),o&64&&(n=a.updateQueue,n!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{Sp(n,i)}catch(v){xe(a,a.return,v)}}break;case 27:i===null&&o&4&&Mg(a);case 26:case 5:Hn(n,a),i===null&&o&4&&Lg(a),o&512&&ta(a,a.return);break;case 12:Hn(n,a);break;case 31:Hn(n,a),o&4&&qg(n,a);break;case 13:Hn(n,a),o&4&&Ig(n,a),o&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=zw.bind(null,a),iS(n,a))));break;case 22:if(o=a.memoizedState!==null||Bn,!o){i=i!==null&&i.memoizedState!==null||tt,f=Bn;var d=tt;Bn=o,(tt=i)&&!d?qn(n,a,(a.subtreeFlags&8772)!==0):Hn(n,a),Bn=f,tt=d}break;case 30:break;default:Hn(n,a)}}function Pg(n){var i=n.alternate;i!==null&&(n.alternate=null,Pg(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Au(i)),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,Tt=!1;function Pn(n,i,a){for(a=a.child;a!==null;)Hg(n,i,a),a=a.sibling}function Hg(n,i,a){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(As,a)}catch{}switch(a.tag){case 26:tt||mn(a,i),Pn(n,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||mn(a,i);var o=Ie,f=Tt;Ei(a.type)&&(Ie=a.stateNode,Tt=!1),Pn(n,i,a),ca(a.stateNode),Ie=o,Tt=f;break;case 5:tt||mn(a,i);case 6:if(o=Ie,f=Tt,Ie=null,Pn(n,i,a),Ie=o,Tt=f,Ie!==null)if(Tt)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(a.stateNode)}catch(d){xe(a,i,d)}else try{Ie.removeChild(a.stateNode)}catch(d){xe(a,i,d)}break;case 18:Ie!==null&&(Tt?(n=Ie,jm(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),is(n)):jm(Ie,a.stateNode));break;case 4:o=Ie,f=Tt,Ie=a.stateNode.containerInfo,Tt=!0,Pn(n,i,a),Ie=o,Tt=f;break;case 0:case 11:case 14:case 15:mi(2,a,i),tt||mi(4,a,i),Pn(n,i,a);break;case 1:tt||(mn(a,i),o=a.stateNode,typeof o.componentWillUnmount=="function"&&Ng(a,i,o)),Pn(n,i,a);break;case 21:Pn(n,i,a);break;case 22:tt=(o=tt)||a.memoizedState!==null,Pn(n,i,a),tt=o;break;default:Pn(n,i,a)}}function qg(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{is(n)}catch(a){xe(i,i.return,a)}}}function Ig(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{is(n)}catch(a){xe(i,i.return,a)}}function Cw(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new zg),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new zg),i;default:throw Error(s(435,n.tag))}}function $o(n,i){var a=Cw(n);i.forEach(function(o){if(!a.has(o)){a.add(o);var f=Bw.bind(null,n,o);o.then(f,f)}})}function At(n,i){var a=i.deletions;if(a!==null)for(var o=0;o<a.length;o++){var f=a[o],d=n,v=i,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(Ei(w.type)){Ie=w.stateNode,Tt=!1;break e}break;case 5:Ie=w.stateNode,Tt=!1;break e;case 3:case 4:Ie=w.stateNode.containerInfo,Tt=!0;break e}w=w.return}if(Ie===null)throw Error(s(160));Hg(d,v,f),Ie=null,Tt=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)$g(i,n),i=i.sibling}var en=null;function $g(n,i){var a=n.alternate,o=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:At(i,n),Rt(n),o&4&&(mi(3,n,n.return),ea(3,n),mi(5,n,n.return));break;case 1:At(i,n),Rt(n),o&512&&(tt||a===null||mn(a,a.return)),o&64&&Bn&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var f=en;if(At(i,n),Rt(n),o&512&&(tt||a===null||mn(a,a.return)),o&4){var d=a!==null?a.memoizedState:null;if(o=n.memoizedState,a===null)if(o===null)if(n.stateNode===null){e:{o=n.type,a=n.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":d=f.getElementsByTagName("title")[0],(!d||d[ks]||d[ct]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(o),f.head.insertBefore(d,f.querySelector("head > title"))),pt(d,o,a),d[ct]=n,at(d),o=d;break e;case"link":var v=$m("link","href",f).get(o+(a.href||""));if(v){for(var w=0;w<v.length;w++)if(d=v[w],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(w,1);break t}}d=f.createElement(o),pt(d,o,a),f.head.appendChild(d);break;case"meta":if(v=$m("meta","content",f).get(o+(a.content||""))){for(w=0;w<v.length;w++)if(d=v[w],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(w,1);break t}}d=f.createElement(o),pt(d,o,a),f.head.appendChild(d);break;default:throw Error(s(468,o))}d[ct]=n,at(d),o=d}n.stateNode=o}else Km(f,n.type,n.stateNode);else n.stateNode=Im(f,o,n.memoizedProps);else d!==o?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,o===null?Km(f,n.type,n.stateNode):Im(f,o,n.memoizedProps)):o===null&&n.stateNode!==null&&Vc(n,n.memoizedProps,a.memoizedProps)}break;case 27:At(i,n),Rt(n),o&512&&(tt||a===null||mn(a,a.return)),a!==null&&o&4&&Vc(n,n.memoizedProps,a.memoizedProps);break;case 5:if(At(i,n),Rt(n),o&512&&(tt||a===null||mn(a,a.return)),n.flags&32){f=n.stateNode;try{Rr(f,"")}catch(ee){xe(n,n.return,ee)}}o&4&&n.stateNode!=null&&(f=n.memoizedProps,Vc(n,f,a!==null?a.memoizedProps:f)),o&1024&&(Jc=!0);break;case 6:if(At(i,n),Rt(n),o&4){if(n.stateNode===null)throw Error(s(162));o=n.memoizedProps,a=n.stateNode;try{a.nodeValue=o}catch(ee){xe(n,n.return,ee)}}break;case 3:if(sl=null,f=en,en=il(i.containerInfo),At(i,n),en=f,Rt(n),o&4&&a!==null&&a.memoizedState.isDehydrated)try{is(i.containerInfo)}catch(ee){xe(n,n.return,ee)}Jc&&(Jc=!1,Kg(n));break;case 4:o=en,en=il(n.stateNode.containerInfo),At(i,n),Rt(n),en=o;break;case 12:At(i,n),Rt(n);break;case 31:At(i,n),Rt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,$o(n,o)));break;case 13:At(i,n),Rt(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Go=xt()),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,$o(n,o)));break;case 22:f=n.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,L=Bn,P=tt;if(Bn=L||f,tt=P||A,At(i,n),tt=P,Bn=L,Rt(n),o&8192)e:for(i=n.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(a===null||A||Bn||tt||sr(n)),a=null,i=n;;){if(i.tag===5||i.tag===26){if(a===null){A=a=i;try{if(d=A.stateNode,f)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=A.stateNode;var $=A.memoizedProps.style,U=$!=null&&$.hasOwnProperty("display")?$.display:null;w.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ee){xe(A,A.return,ee)}}}else if(i.tag===6){if(a===null){A=i;try{A.stateNode.nodeValue=f?"":A.memoizedProps}catch(ee){xe(A,A.return,ee)}}}else if(i.tag===18){if(a===null){A=i;try{var z=A.stateNode;f?Nm(z,!0):Nm(A.stateNode,!1)}catch(ee){xe(A,A.return,ee)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;a===i&&(a=null),i=i.return}a===i&&(a=null),i.sibling.return=i.return,i=i.sibling}o&4&&(o=n.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,$o(n,a))));break;case 19:At(i,n),Rt(n),o&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,$o(n,o)));break;case 30:break;case 21:break;default:At(i,n),Rt(n)}}function Rt(n){var i=n.flags;if(i&2){try{for(var a,o=n.return;o!==null;){if(Ug(o)){a=o;break}o=o.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var f=a.stateNode,d=Fc(n);Io(n,d,f);break;case 5:var v=a.stateNode;a.flags&32&&(Rr(v,""),a.flags&=-33);var w=Fc(n);Io(n,w,v);break;case 3:case 4:var A=a.stateNode.containerInfo,L=Fc(n);Yc(n,L,A);break;default:throw Error(s(161))}}catch(P){xe(n,n.return,P)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Kg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Kg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function Hn(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Bg(n,i.alternate,i),i=i.sibling}function sr(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:mi(4,i,i.return),sr(i);break;case 1:mn(i,i.return);var a=i.stateNode;typeof a.componentWillUnmount=="function"&&Ng(i,i.return,a),sr(i);break;case 27:ca(i.stateNode);case 26:case 5:mn(i,i.return),sr(i);break;case 22:i.memoizedState===null&&sr(i);break;case 30:sr(i);break;default:sr(i)}n=n.sibling}}function qn(n,i,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var o=i.alternate,f=n,d=i,v=d.flags;switch(d.tag){case 0:case 11:case 15:qn(f,d,a),ea(4,d);break;case 1:if(qn(f,d,a),o=d,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(L){xe(o,o.return,L)}if(o=d,f=o.updateQueue,f!==null){var w=o.stateNode;try{var A=f.shared.hiddenCallbacks;if(A!==null)for(f.shared.hiddenCallbacks=null,f=0;f<A.length;f++)wp(A[f],w)}catch(L){xe(o,o.return,L)}}a&&v&64&&jg(d),ta(d,d.return);break;case 27:Mg(d);case 26:case 5:qn(f,d,a),a&&o===null&&v&4&&Lg(d),ta(d,d.return);break;case 12:qn(f,d,a);break;case 31:qn(f,d,a),a&&v&4&&qg(f,d);break;case 13:qn(f,d,a),a&&v&4&&Ig(f,d);break;case 22:d.memoizedState===null&&qn(f,d,a),ta(d,d.return);break;case 30:break;default:qn(f,d,a)}i=i.sibling}}function Qc(n,i){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&qs(a))}function Xc(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&qs(n))}function tn(n,i,a,o){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Gg(n,i,a,o),i=i.sibling}function Gg(n,i,a,o){var f=i.flags;switch(i.tag){case 0:case 11:case 15:tn(n,i,a,o),f&2048&&ea(9,i);break;case 1:tn(n,i,a,o);break;case 3:tn(n,i,a,o),f&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&qs(n)));break;case 12:if(f&2048){tn(n,i,a,o),n=i.stateNode;try{var d=i.memoizedProps,v=d.id,w=d.onPostCommit;typeof w=="function"&&w(v,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(A){xe(i,i.return,A)}}else tn(n,i,a,o);break;case 31:tn(n,i,a,o);break;case 13:tn(n,i,a,o);break;case 23:break;case 22:d=i.stateNode,v=i.alternate,i.memoizedState!==null?d._visibility&2?tn(n,i,a,o):na(n,i):d._visibility&2?tn(n,i,a,o):(d._visibility|=2,Vr(n,i,a,o,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Qc(v,i);break;case 24:tn(n,i,a,o),f&2048&&Xc(i.alternate,i);break;default:tn(n,i,a,o)}}function Vr(n,i,a,o,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var d=n,v=i,w=a,A=o,L=v.flags;switch(v.tag){case 0:case 11:case 15:Vr(d,v,w,A,f),ea(8,v);break;case 23:break;case 22:var P=v.stateNode;v.memoizedState!==null?P._visibility&2?Vr(d,v,w,A,f):na(d,v):(P._visibility|=2,Vr(d,v,w,A,f)),f&&L&2048&&Qc(v.alternate,v);break;case 24:Vr(d,v,w,A,f),f&&L&2048&&Xc(v.alternate,v);break;default:Vr(d,v,w,A,f)}i=i.sibling}}function na(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=n,o=i,f=o.flags;switch(o.tag){case 22:na(a,o),f&2048&&Qc(o.alternate,o);break;case 24:na(a,o),f&2048&&Xc(o.alternate,o);break;default:na(a,o)}i=i.sibling}}var ia=8192;function Fr(n,i,a){if(n.subtreeFlags&ia)for(n=n.child;n!==null;)Vg(n,i,a),n=n.sibling}function Vg(n,i,a){switch(n.tag){case 26:Fr(n,i,a),n.flags&ia&&n.memoizedState!==null&&gS(a,en,n.memoizedState,n.memoizedProps);break;case 5:Fr(n,i,a);break;case 3:case 4:var o=en;en=il(n.stateNode.containerInfo),Fr(n,i,a),en=o;break;case 22:n.memoizedState===null&&(o=n.alternate,o!==null&&o.memoizedState!==null?(o=ia,ia=16777216,Fr(n,i,a),ia=o):Fr(n,i,a));break;default:Fr(n,i,a)}}function Fg(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function ra(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var o=i[a];ot=o,Jg(o,n)}Fg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Yg(n),n=n.sibling}function Yg(n){switch(n.tag){case 0:case 11:case 15:ra(n),n.flags&2048&&mi(9,n,n.return);break;case 3:ra(n);break;case 12:ra(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,Ko(n)):ra(n);break;default:ra(n)}}function Ko(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var o=i[a];ot=o,Jg(o,n)}Fg(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:mi(8,i,i.return),Ko(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,Ko(i));break;default:Ko(i)}n=n.sibling}}function Jg(n,i){for(;ot!==null;){var a=ot;switch(a.tag){case 0:case 11:case 15:mi(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:qs(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,ot=o;else e:for(a=n;ot!==null;){o=ot;var f=o.sibling,d=o.return;if(Pg(o),o===a){ot=null;break e}if(f!==null){f.return=d,ot=f;break e}ot=d}}}var Dw={getCacheForType:function(n){var i=ht(Ze),a=i.data.get(n);return a===void 0&&(a=n(),i.data.set(n,a)),a}
vendor: 20,991 bytes, line 9
9,cacheSignal:function(){return ht(Ze).controller.signal}},xw=typeof WeakMap=="function"?WeakMap:Map,Ce=0,Me=null,ve=null,we=0,De=0,Bt=null,yi=!1,Yr=!1,Zc=!1,In=0,Ke=0,vi=0,ar=0,Wc=0,Pt=0,Jr=0,sa=null,Ot=null,ef=!1,Go=0,Qg=0,Vo=1/0,Fo=null,bi=null,rt=0,_i=null,Qr=null,$n=0,tf=0,nf=null,Xg=null,aa=0,rf=null;function Ht(){return(Ce&2)!==0&&we!==0?we&-we:M.T!==null?cf():dd()}function Zg(){if(Pt===0)if((we&536870912)===0||Ee){var n=eo;eo<<=1,(eo&3932160)===0&&(eo=262144),Pt=n}else Pt=536870912;return n=Mt.current,n!==null&&(n.flags|=32),Pt}function kt(n,i,a){(n===Me&&(De===2||De===9)||n.cancelPendingCommit!==null)&&(Xr(n,0),wi(n,we,Pt,!1)),Os(n,a),((Ce&2)===0||n!==Me)&&(n===Me&&((Ce&2)===0&&(ar|=a),Ke===4&&wi(n,we,Pt,!1)),yn(n))}function Wg(n,i,a){if((Ce&6)!==0)throw Error(s(327));var o=!a&&(i&127)===0&&(i&n.expiredLanes)===0||Rs(n,i),f=o?Lw(n,i):af(n,i,!0),d=o;do{if(f===0){Yr&&!o&&wi(n,i,0,!1);break}else{if(a=n.current.alternate,d&&!jw(a)){f=af(n,i,!1),d=!1;continue}if(f===2){if(d=i,n.errorRecoveryDisabledLanes&d)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){i=v;e:{var w=n;f=sa;var A=w.current.memoizedState.isDehydrated;if(A&&(Xr(w,v).flags|=256),v=af(w,v,!1),v!==2){if(Zc&&!A){w.errorRecoveryDisabledLanes|=d,ar|=d,f=4;break e}d=Ot,Ot=f,d!==null&&(Ot===null?Ot=d:Ot.push.apply(Ot,d))}f=v}if(d=!1,f!==2)continue}}if(f===1){Xr(n,0),wi(n,i,0,!0);break}e:{switch(o=n,d=f,d){case 0:case 1:throw Error(s(345));case 4:if((i&4194048)!==i)break;case 6:wi(o,i,Pt,!yi);break e;case 2:Ot=null;break;case 3:case 5:break;default:throw Error(s(329))}if((i&62914560)===i&&(f=Go+300-xt(),10<f)){if(wi(o,i,Pt,!yi),no(o,0,!0)!==0)break e;$n=i,o.timeoutHandle=Dm(em.bind(null,o,a,Ot,Fo,ef,i,Pt,ar,Jr,yi,d,"Throttled",-0,0),f);break e}em(o,a,Ot,Fo,ef,i,Pt,ar,Jr,yi,d,null,-0,0)}}break}while(!0);yn(n)}function em(n,i,a,o,f,d,v,w,A,L,P,$,U,z){if(n.timeoutHandle=-1,$=i.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:kn},Vg(i,d,$);var ee=(d&62914560)===d?Go-xt():(d&4194048)===d?Qg-xt():0;if(ee=mS($,ee),ee!==null){$n=d,n.cancelPendingCommit=ee(lm.bind(null,n,i,d,a,o,f,v,w,A,P,$,null,U,z)),wi(n,d,v,!L);return}}lm(n,i,d,a,o,f,v,w,A)}function jw(n){for(var i=n;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var f=a[o],d=f.getSnapshot;f=f.value;try{if(!Lt(d(),f))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function wi(n,i,a,o){i&=~Wc,i&=~ar,n.suspendedLanes|=i,n.pingedLanes&=~i,o&&(n.warmLanes|=i),o=n.expirationTimes;for(var f=i;0<f;){var d=31-Nt(f),v=1<<d;o[d]=-1,f&=~v}a!==0&&cd(n,a,i)}function Yo(){return(Ce&6)===0?(oa(0),!1):!0}function sf(){if(ve!==null){if(De===0)var n=ve.return;else n=ve,jn=Xi=null,_c(n),qr=null,$s=0,n=ve;for(;n!==null;)xg(n.alternate,n),n=n.return;ve=null}}function Xr(n,i){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,Zw(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),$n=0,sf(),Me=n,ve=a=Dn(n.current,null),we=i,De=0,Bt=null,yi=!1,Yr=Rs(n,i),Zc=!1,Jr=Pt=Wc=ar=vi=Ke=0,Ot=sa=null,ef=!1,(i&8)!==0&&(i|=i&32);var o=n.entangledLanes;if(o!==0)for(n=n.entanglements,o&=i;0<o;){var f=31-Nt(o),d=1<<f;i|=n[f],o&=~d}return In=i,go(),a}function tm(n,i){ge=null,M.H=Xs,i===Hr||i===Eo?(i=yp(),De=3):i===lc?(i=yp(),De=4):De=i===Mc?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Bt=i,ve===null&&(Ke=1,zo(n,Gt(i,n.current)))}function nm(){var n=Mt.current;return n===null?!0:(we&4194048)===we?Jt===null:(we&62914560)===we||(we&536870912)!==0?n===Jt:!1}function im(){var n=M.H;return M.H=Xs,n===null?Xs:n}function rm(){var n=M.A;return M.A=Dw,n}function Jo(){Ke=4,yi||(we&4194048)!==we&&Mt.current!==null||(Yr=!0),(vi&134217727)===0&&(ar&134217727)===0||Me===null||wi(Me,we,Pt,!1)}function af(n,i,a){var o=Ce;Ce|=2;var f=im(),d=rm();(Me!==n||we!==i)&&(Fo=null,Xr(n,i)),i=!1;var v=Ke;e:do try{if(De!==0&&ve!==null){var w=ve,A=Bt;switch(De){case 8:sf(),v=6;break e;case 3:case 2:case 9:case 6:Mt.current===null&&(i=!0);var L=De;if(De=0,Bt=null,Zr(n,w,A,L),a&&Yr){v=0;break e}break;default:L=De,De=0,Bt=null,Zr(n,w,A,L)}}Nw(),v=Ke;break}catch(P){tm(n,P)}while(!0);return i&&n.shellSuspendCounter++,jn=Xi=null,Ce=o,M.H=f,M.A=d,ve===null&&(Me=null,we=0,go()),v}function Nw(){for(;ve!==null;)sm(ve)}function Lw(n,i){var a=Ce;Ce|=2;var o=im(),f=rm();Me!==n||we!==i?(Fo=null,Vo=xt()+500,Xr(n,i)):Yr=Rs(n,i);e:do try{if(De!==0&&ve!==null){i=ve;var d=Bt;t:switch(De){case 1:De=0,Bt=null,Zr(n,i,d,1);break;case 2:case 9:if(gp(d)){De=0,Bt=null,am(i);break}i=function(){De!==2&&De!==9||Me!==n||(De=7),yn(n)},d.then(i,i);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:gp(d)?(De=0,Bt=null,am(i)):(De=0,Bt=null,Zr(n,i,d,7));break;case 5:var v=null;switch(ve.tag){case 26:v=ve.memoizedState;case 5:case 27:var w=ve;if(v?Gm(v):w.stateNode.complete){De=0,Bt=null;var A=w.sibling;if(A!==null)ve=A;else{var L=w.return;L!==null?(ve=L,Qo(L)):ve=null}break t}}De=0,Bt=null,Zr(n,i,d,5);break;case 6:De=0,Bt=null,Zr(n,i,d,6);break;case 8:sf(),Ke=6;break e;default:throw Error(s(462))}}Uw();break}catch(P){tm(n,P)}while(!0);return jn=Xi=null,M.H=o,M.A=f,Ce=a,ve!==null?0:(Me=null,we=0,go(),Ke)}function Uw(){for(;ve!==null&&!r_();)sm(ve)}function sm(n){var i=Cg(n.alternate,n,In);n.memoizedProps=n.pendingProps,i===null?Qo(n):ve=i}function am(n){var i=n,a=i.alternate;switch(i.tag){case 15:case 0:i=Eg(a,i,i.pendingProps,i.type,void 0,we);break;case 11:i=Eg(a,i,i.pendingProps,i.type.render,i.ref,we);break;case 5:_c(i);default:xg(a,i),i=ve=rp(i,In),i=Cg(a,i,In)}n.memoizedProps=n.pendingProps,i===null?Qo(n):ve=i}function Zr(n,i,a,o){jn=Xi=null,_c(i),qr=null,$s=0;var f=i.return;try{if(Ew(n,f,i,a,we)){Ke=1,zo(n,Gt(a,n.current)),ve=null;return}}catch(d){if(f!==null)throw ve=f,d;Ke=1,zo(n,Gt(a,n.current)),ve=null;return}i.flags&32768?(Ee||o===1?n=!0:Yr||(we&536870912)!==0?n=!1:(yi=n=!0,(o===2||o===9||o===3||o===6)&&(o=Mt.current,o!==null&&o.tag===13&&(o.flags|=16384))),om(i,n)):Qo(i)}function Qo(n){var i=n;do{if((i.flags&32768)!==0){om(i,yi);return}n=i.return;var a=Rw(i.alternate,i,In);if(a!==null){ve=a;return}if(i=i.sibling,i!==null){ve=i;return}ve=i=n}while(i!==null);Ke===0&&(Ke=5)}function om(n,i){do{var a=Ow(n.alternate,n);if(a!==null){a.flags&=32767,ve=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(n=n.sibling,n!==null)){ve=n;return}ve=n=a}while(n!==null);Ke=6,ve=null}function lm(n,i,a,o,f,d,v,w,A){n.cancelPendingCommit=null;do Xo();while(rt!==0);if((Ce&6)!==0)throw Error(s(327));if(i!==null){if(i===n.current)throw Error(s(177));if(d=i.lanes|i.childLanes,d|=Fu,p_(n,a,d,v,w,A),n===Me&&(ve=Me=null,we=0),Qr=i,_i=n,$n=a,tf=d,nf=f,Xg=o,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Pw(Za,function(){return dm(),null})):(n.callbackNode=null,n.callbackPriority=0),o=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,f=Q.p,Q.p=2,v=Ce,Ce|=4;try{kw(n,i,a)}finally{Ce=v,Q.p=f,M.T=o}}rt=1,um(),cm(),fm()}}function um(){if(rt===1){rt=0;var n=_i,i=Qr,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var o=Q.p;Q.p=2;var f=Ce;Ce|=4;try{$g(i,n);var d=vf,v=Jd(n.containerInfo),w=d.focusedElem,A=d.selectionRange;if(v!==w&&w&&w.ownerDocument&&Yd(w.ownerDocument.documentElement,w)){if(A!==null&&Iu(w)){var L=A.start,P=A.end;if(P===void 0&&(P=L),"selectionStart"in w)w.selectionStart=L,w.selectionEnd=Math.min(P,w.value.length);else{var $=w.ownerDocument||document,U=$&&$.defaultView||window;if(U.getSelection){var z=U.getSelection(),ee=w.textContent.length,fe=Math.min(A.start,ee),Le=A.end===void 0?fe:Math.min(A.end,ee);!z.extend&&fe>Le&&(v=Le,Le=fe,fe=v);var x=Fd(w,fe),O=Fd(w,Le);if(x&&O&&(z.rangeCount!==1||z.anchorNode!==x.node||z.anchorOffset!==x.offset||z.focusNode!==O.node||z.focusOffset!==O.offset)){var N=$.createRange();N.setStart(x.node,x.offset),z.removeAllRanges(),fe>Le?(z.addRange(N),z.extend(O.node,O.offset)):(N.setEnd(O.node,O.offset),z.addRange(N))}}}}for($=[],z=w;z=z.parentNode;)z.nodeType===1&&$.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<$.length;w++){var q=$[w];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}ul=!!yf,vf=yf=null}finally{Ce=f,Q.p=o,M.T=a}}n.current=i,rt=2}}function cm(){if(rt===2){rt=0;var n=_i,i=Qr,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var o=Q.p;Q.p=2;var f=Ce;Ce|=4;try{Bg(n,i.alternate,i)}finally{Ce=f,Q.p=o,M.T=a}}rt=3}}function fm(){if(rt===4||rt===3){rt=0,s_();var n=_i,i=Qr,a=$n,o=Xg;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?rt=5:(rt=0,Qr=_i=null,hm(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(bi=null),Eu(a),i=i.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(As,i,void 0,(i.current.flags&128)===128)}catch{}if(o!==null){i=M.T,f=Q.p,Q.p=2,M.T=null;try{for(var d=n.onRecoverableError,v=0;v<o.length;v++){var w=o[v];d(w.value,{componentStack:w.stack})}}finally{M.T=i,Q.p=f}}($n&3)!==0&&Xo(),yn(n),f=n.pendingLanes,(a&261930)!==0&&(f&42)!==0?n===rf?aa++:(aa=0,rf=n):aa=0,oa(0)}}function hm(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,qs(i)))}function Xo(){return um(),cm(),fm(),dm()}function dm(){if(rt!==5)return!1;var n=_i,i=tf;tf=0;var a=Eu($n),o=M.T,f=Q.p;try{Q.p=32>a?32:a,M.T=null,a=nf,nf=null;var d=_i,v=$n;if(rt=0,Qr=_i=null,$n=0,(Ce&6)!==0)throw Error(s(331));var w=Ce;if(Ce|=4,Yg(d.current),Gg(d,d.current,v,a),Ce=w,oa(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(As,d)}catch{}return!0}finally{Q.p=f,M.T=o,hm(n,i)}}function pm(n,i,a){i=Gt(a,i),i=Uc(n.stateNode,i,2),n=di(n,i,2),n!==null&&(Os(n,2),yn(n))}function xe(n,i,a){if(n.tag===3)pm(n,n,a);else for(;i!==null;){if(i.tag===3){pm(i,n,a);break}else if(i.tag===1){var o=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(bi===null||!bi.has(o))){n=Gt(a,n),a=gg(2),o=di(i,a,2),o!==null&&(mg(a,o,i,n),Os(o,2),yn(o));break}}i=i.return}}function of(n,i,a){var o=n.pingCache;if(o===null){o=n.pingCache=new xw;var f=new Set;o.set(i,f)}else f=o.get(i),f===void 0&&(f=new Set,o.set(i,f));f.has(a)||(Zc=!0,f.add(a),n=Mw.bind(null,n,i,a),i.then(n,n))}function Mw(n,i,a){var o=n.pingCache;o!==null&&o.delete(i),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,Me===n&&(we&a)===a&&(Ke===4||Ke===3&&(we&62914560)===we&&300>xt()-Go?(Ce&2)===0&&Xr(n,0):Wc|=a,Jr===we&&(Jr=0)),yn(n)}function gm(n,i){i===0&&(i=ud()),n=Yi(n,i),n!==null&&(Os(n,i),yn(n))}function zw(n){var i=n.memoizedState,a=0;i!==null&&(a=i.retryLane),gm(n,a)}function Bw(n,i){var a=0;switch(n.tag){case 31:case 13:var o=n.stateNode,f=n.memoizedState;f!==null&&(a=f.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(i),gm(n,a)}function Pw(n,i){return bu(n,i)}var Zo=null,Wr=null,lf=!1,Wo=!1,uf=!1,Si=0;function yn(n){n!==Wr&&n.next===null&&(Wr===null?Zo=Wr=n:Wr=Wr.next=n),Wo=!0,lf||(lf=!0,qw())}function oa(n,i){if(!uf&&Wo){uf=!0;do for(var a=!1,o=Zo;o!==null;){if(n!==0){var f=o.pendingLanes;if(f===0)var d=0;else{var v=o.suspendedLanes,w=o.pingedLanes;d=(1<<31-Nt(42|n)+1)-1,d&=f&~(v&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,bm(o,d))}else d=we,d=no(o,o===Me?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Rs(o,d)||(a=!0,bm(o,d));o=o.next}while(a);uf=!1}}function Hw(){mm()}function mm(){Wo=lf=!1;var n=0;Si!==0&&Xw()&&(n=Si);for(var i=xt(),a=null,o=Zo;o!==null;){var f=o.next,d=ym(o,i);d===0?(o.next=null,a===null?Zo=f:a.next=f,f===null&&(Wr=a)):(a=o,(n!==0||(d&3)!==0)&&(Wo=!0)),o=f}rt!==0&&rt!==5||oa(n),Si!==0&&(Si=0)}function ym(n,i){for(var a=n.suspendedLanes,o=n.pingedLanes,f=n.expirationTimes,d=n.pendingLanes&-62914561;0<d;){var v=31-Nt(d),w=1<<v,A=f[v];A===-1?((w&a)===0||(w&o)!==0)&&(f[v]=d_(w,i)):A<=i&&(n.expiredLanes|=w),d&=~w}if(i=Me,a=we,a=no(n,n===i?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o=n.callbackNode,a===0||n===i&&(De===2||De===9)||n.cancelPendingCommit!==null)return o!==null&&o!==null&&_u(o),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Rs(n,a)){if(i=a&-a,i===n.callbackPriority)return i;switch(o!==null&&_u(o),Eu(a)){case 2:case 8:a=od;break;case 32:a=Za;break;case 268435456:a=ld;break;default:a=Za}return o=vm.bind(null,n),a=bu(a,o),n.callbackPriority=i,n.callbackNode=a,i}return o!==null&&o!==null&&_u(o),n.callbackPriority=2,n.callbackNode=null,2}function vm(n,i){if(rt!==0&&rt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Xo()&&n.callbackNode!==a)return null;var o=we;return o=no(n,n===Me?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),o===0?null:(Wg(n,o,i),ym(n,xt()),n.callbackNode!=null&&n.callbackNode===a?vm.bind(null,n):null)}function bm(n,i){if(Xo())return null;Wg(n,i,!0)}function qw(){Ww(function(){(Ce&6)!==0?bu(ad,Hw):mm()})}function cf(){if(Si===0){var n=Br;n===0&&(n=Wa,Wa<<=1,(Wa&261888)===0&&(Wa=256)),Si=n}return Si}function _m(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ao(""+n)}function wm(n,i){var a=i.ownerDocument.createElement("input");return a.name=i.name,a.value=i.value,n.id&&a.setAttribute("form",n.id),i.parentNode.insertBefore(a,i),n=new FormData(n),a.parentNode.removeChild(a),n}function Iw(n,i,a,o,f){if(i==="submit"&&a&&a.stateNode===f){var d=_m((f[St]||null).action),v=o.submitter;v&&(i=(i=v[St]||null)?_m(i.formAction):v.getAttribute("formAction"),i!==null&&(d=i,v=null));var w=new co("action","action",null,o,f);n.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Si!==0){var A=v?wm(f,v):new FormData(f);Cc(a,{pending:!0,data:A,method:f.method,action:d},null,A)}}else typeof d=="function"&&(w.preventDefault(),A=v?wm(f,v):new FormData(f),Cc(a,{pending:!0,data:A,method:f.method,action:d},d,A))},currentTarget:f}]})}}for(var ff=0;ff<Vu.length;ff++){var hf=Vu[ff],$w=hf.toLowerCase(),Kw=hf[0].toUpperCase()+hf.slice(1);Wt($w,"on"+Kw)}Wt(Zd,"onAnimationEnd"),Wt(Wd,"onAnimationIteration"),Wt(ep,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(aw,"onTransitionRun"),Wt(ow,"onTransitionStart"),Wt(lw,"onTransitionCancel"),Wt(tp,"onTransitionEnd"),Tr("onMouseEnter",["mouseout","mouseover"]),Tr("onMouseLeave",["mouseout","mouseover"]),Tr("onPointerEnter",["pointerout","pointerover"]),Tr("onPointerLeave",["pointerout","pointerover"]),Ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ki("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var la="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(" "),Gw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(la));function Sm(n,i){i=(i&4)!==0;for(var a=0;a<n.length;a++){var o=n[a],f=o.event;o=o.listeners;e:{var d=void 0;if(i)for(var v=o.length-1;0<=v;v--){var w=o[v],A=w.instance,L=w.currentTarget;if(w=w.listener,A!==d&&f.isPropagationStopped())break e;d=w,f.currentTarget=L;try{d(f)}catch(P){po(P)}f.currentTarget=null,d=A}else for(v=0;v<o.length;v++){if(w=o[v],A=w.instance,L=w.currentTarget,w=w.listener,A!==d&&f.isPropagationStopped())break e;d=w,f.currentTarget=L;try{d(f)}catch(P){po(P)}f.currentTarget=null,d=A}}}}function be(n,i){var a=i[Tu];a===void 0&&(a=i[Tu]=new Set);var o=n+"__bubble";a.has(o)||(Em(i,n,2,!1),a.add(o))}function df(n,i,a){var o=0;i&&(o|=4),Em(a,n,o,i)}var el="_reactListening"+Math.random().toString(36).slice(2);function pf(n){if(!n[el]){n[el]=!0,md.forEach(function(a){a!=="selectionchange"&&(Gw.has(a)||df(a,!1,n),df(a,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[el]||(i[el]=!0,df("selectionchange",!1,i))}}function Em(n,i,a,o){switch(Zm(i)){case 2:var f=bS;break;case 8:f=_S;break;default:f=Cf}a=f.bind(null,i,a,n),f=void 0,!Nu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),o?f!==void 0?n.addEventListener(i,a,{capture:!0,passive:f}):n.addEventListener(i,a,!0):f!==void 0?n.addEventListener(i,a,{passive:f}):n.addEventListener(i,a,!1)}function gf(n,i,a,o,f){var d=o;if((i&1)===0&&(i&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var w=o.stateNode.containerInfo;if(w===f)break;if(v===4)for(v=o.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;w!==null;){if(v=wr(w),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){o=d=v;continue e}w=w.parentNode}}o=o.return}kd(function(){var L=d,P=xu(a),$=[];e:{var U=np.get(n);if(U!==void 0){var z=co,ee=n;switch(n){case"keypress":if(lo(a)===0)break e;case"keydown":case"keyup":z=B_;break;case"focusin":ee="focus",z=zu;break;case"focusout":ee="blur",z=zu;break;case"beforeblur":case"afterblur":z=zu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=xd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=R_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=q_;break;case Zd:case Wd:case ep:z=C_;break;case tp:z=$_;break;case"scroll":case"scrollend":z=T_;break;case"wheel":z=G_;break;case"copy":case"cut":case"paste":z=x_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Nd;break;case"toggle":case"beforetoggle":z=F_}var fe=(i&4)!==0,Le=!fe&&(n==="scroll"||n==="scrollend"),x=fe?U!==null?U+"Capture":null:U;fe=[];for(var O=L,N;O!==null;){var q=O;if(N=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||N===null||x===null||(q=Ds(O,x),q!=null&&fe.push(ua(O,q,N))),Le)break;O=O.return}0<fe.length&&(U=new z(U,ee,null,a,P),$.push({event:U,listeners:fe}))}}if((i&7)===0){e:{if(U=n==="mouseover"||n==="pointerover",z=n==="mouseout"||n==="pointerout",U&&a!==Du&&(ee=a.relatedTarget||a.fromElement)&&(wr(ee)||ee[_r]))break e;if((z||U)&&(U=P.window===P?P:(U=P.ownerDocument)?U.defaultView||U.parentWindow:window,z?(ee=a.relatedTarget||a.toElement,z=L,ee=ee?wr(ee):null,ee!==null&&(Le=u(ee),fe=ee.tag,ee!==Le||fe!==5&&fe!==27&&fe!==6)&&(ee=null)):(z=null,ee=L),z!==ee)){if(fe=xd,q="onMouseLeave",x="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(fe=Nd,q="onPointerLeave",x="onPointerEnter",O="pointer"),Le=z==null?U:Cs(z),N=ee==null?U:Cs(ee),U=new fe(q,O+"leave",z,a,P),U.target=Le,U.relatedTarget=N,q=null,wr(P)===L&&(fe=new fe(x,O+"enter",ee,a,P),fe.target=N,fe.relatedTarget=Le,q=fe),Le=q,z&&ee)t:{for(fe=Vw,x=z,O=ee,N=0,q=x;q;q=fe(q))N++;q=0;for(var ae=O;ae;ae=fe(ae))q++;for(;0<N-q;)x=fe(x),N--;for(;0<q-N;)O=fe(O),q--;for(;N--;){if(x===O||O!==null&&x===O.alternate){fe=x;break t}x=fe(x),O=fe(O)}fe=null}else fe=null;z!==null&&Tm($,U,z,fe,!1),ee!==null&&Le!==null&&Tm($,Le,ee,fe,!0)}}e:{if(U=L?Cs(L):window,z=U.nodeName&&U.nodeName.toLowerCase(),z==="select"||z==="input"&&U.type==="file")var Ae=qd;else if(Pd(U))if(Id)Ae=iw;else{Ae=tw;var ie=ew}else z=U.nodeName,!z||z.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&Cu(L.elementType)&&(Ae=qd):Ae=nw;if(Ae&&(Ae=Ae(n,L))){Hd($,Ae,a,P);break e}ie&&ie(n,U,L),n==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&ku(U,"number",U.value)}switch(ie=L?Cs(L):window,n){case"focusin":(Pd(ie)||ie.contentEditable==="true")&&(Dr=ie,$u=L,Bs=null);break;case"focusout":Bs=$u=Dr=null;break;case"mousedown":Ku=!0;break;case"contextmenu":case"mouseup":case"dragend":Ku=!1,Qd($,a,P);break;case"selectionchange":if(sw)break;case"keydown":case"keyup":Qd($,a,P)}var me;if(Pu)e:{switch(n){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Cr?zd(n,a)&&(Se="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Se="onCompositionStart");Se&&(Ld&&a.locale!=="ko"&&(Cr||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Cr&&(me=Cd()):(ai=P,Lu="value"in ai?ai.value:ai.textContent,Cr=!0)),ie=tl(L,Se),0<ie.length&&(Se=new jd(Se,n,null,a,P),$.pu
vendor: 5,764 bytes, lines 9-10
9sh({event:Se,listeners:ie}),me?Se.data=me:(me=Bd(a),me!==null&&(Se.data=me)))),(me=J_?Q_(n,a):X_(n,a))&&(Se=tl(L,"onBeforeInput"),0<Se.length&&(ie=new jd("onBeforeInput","beforeinput",null,a,P),$.push({event:ie,listeners:Se}),ie.data=me)),Iw($,n,L,a,P)}Sm($,i)})}function ua(n,i,a){return{instance:n,listener:i,currentTarget:a}}function tl(n,i){for(var a=i+"Capture",o=[];n!==null;){var f=n,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=Ds(n,a),f!=null&&o.unshift(ua(n,f,d)),f=Ds(n,i),f!=null&&o.push(ua(n,f,d))),n.tag===3)return o;n=n.return}return[]}function Vw(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Tm(n,i,a,o,f){for(var d=i._reactName,v=[];a!==null&&a!==o;){var w=a,A=w.alternate,L=w.stateNode;if(w=w.tag,A!==null&&A===o)break;w!==5&&w!==26&&w!==27||L===null||(A=L,f?(L=Ds(a,d),L!=null&&v.unshift(ua(a,L,A))):f||(L=Ds(a,d),L!=null&&v.push(ua(a,L,A)))),a=a.return}v.length!==0&&n.push({event:i,listeners:v})}var Fw=/\r\n?/g,Yw=/\u0000|\uFFFD/g;function Am(n){return(typeof n=="string"?n:""+n).replace(Fw,` 10`).replace(Yw,"")}function Rm(n,i){return i=Am(i),Am(n)===i}function Ne(n,i,a,o,f,d){switch(a){case"children":typeof o=="string"?i==="body"||i==="textarea"&&o===""||Rr(n,o):(typeof o=="number"||typeof o=="bigint")&&i!=="body"&&Rr(n,""+o);break;case"className":ro(n,"class",o);break;case"tabIndex":ro(n,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ro(n,a,o);break;case"style":Rd(n,o,d);break;case"data":if(i!=="object"){ro(n,"data",o);break}case"src":case"href":if(o===""&&(i!=="a"||a!=="href")){n.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(a);break}o=ao(""+o),n.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(i!=="input"&&Ne(n,i,"name",f.name,f,null),Ne(n,i,"formEncType",f.formEncType,f,null),Ne(n,i,"formMethod",f.formMethod,f,null),Ne(n,i,"formTarget",f.formTarget,f,null)):(Ne(n,i,"encType",f.encType,f,null),Ne(n,i,"method",f.method,f,null),Ne(n,i,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){n.removeAttribute(a);break}o=ao(""+o),n.setAttribute(a,o);break;case"onClick":o!=null&&(n.onclick=kn);break;case"onScroll":o!=null&&be("scroll",n);break;case"onScrollEnd":o!=null&&be("scrollend",n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(s(60));n.innerHTML=a}}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}a=ao(""+o),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(a,""+o):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":o===!0?n.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?n.setAttribute(a,o):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?n.setAttribute(a,o):n.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?n.removeAttribute(a):n.setAttribute(a,o);break;case"popover":be("beforetoggle",n),be("toggle",n),io(n,"popover",o);break;case"xlinkActuate":On(n,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":On(n,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":On(n,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":On(n,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":On(n,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":On(n,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":On(n,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":On(n,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":On(n,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":io(n,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=S_.get(a)||a,io(n,a,o))}}function mf(n,i,a,o,f,d){switch(a){case"style":Rd(n,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(s(60));n.innerHTML=a}}break;
vendor: 5,964 bytes, line 10
10case"children":typeof o=="string"?Rr(n,o):(typeof o=="number"||typeof o=="bigint")&&Rr(n,""+o);break;case"onScroll":o!=null&&be("scroll",n);break;case"onScrollEnd":o!=null&&be("scrollend",n);break;case"onClick":o!=null&&(n.onclick=kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),i=a.slice(2,f?a.length-7:void 0),d=n[St]||null,d=d!=null?d[a]:null,typeof d=="function"&&n.removeEventListener(i,d,f),typeof o=="function")){typeof d!="function"&&d!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(i,o,f);break e}a in n?n[a]=o:o===!0?n.setAttribute(a,""):io(n,a,o)}}}function pt(n,i,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",n),be("load",n);var o=!1,f=!1,d;for(d in a)if(a.hasOwnProperty(d)){var v=a[d];if(v!=null)switch(d){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,i));default:Ne(n,i,d,v,a,null)}}f&&Ne(n,i,"srcSet",a.srcSet,a,null),o&&Ne(n,i,"src",a.src,a,null);return;case"input":be("invalid",n);var w=d=v=f=null,A=null,L=null;for(o in a)if(a.hasOwnProperty(o)){var P=a[o];if(P!=null)switch(o){case"name":f=P;break;case"type":v=P;break;case"checked":A=P;break;case"defaultChecked":L=P;break;case"value":d=P;break;case"defaultValue":w=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(s(137,i));break;default:Ne(n,i,o,P,a,null)}}Sd(n,d,w,A,L,v,f,!1);return;case"select":be("invalid",n),o=v=d=null;for(f in a)if(a.hasOwnProperty(f)&&(w=a[f],w!=null))switch(f){case"value":d=w;break;case"defaultValue":v=w;break;case"multiple":o=w;default:Ne(n,i,f,w,a,null)}i=d,a=v,n.multiple=!!o,i!=null?Ar(n,!!o,i,!1):a!=null&&Ar(n,!!o,a,!0);return;case"textarea":be("invalid",n),d=f=o=null;for(v in a)if(a.hasOwnProperty(v)&&(w=a[v],w!=null))switch(v){case"value":o=w;break;case"defaultValue":f=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(s(91));break;default:Ne(n,i,v,w,a,null)}Td(n,o,f,d);return;case"option":for(A in a)a.hasOwnProperty(A)&&(o=a[A],o!=null)&&(A==="selected"?n.selected=o&&typeof o!="function"&&typeof o!="symbol":Ne(n,i,A,o,a,null));return;case"dialog":be("beforetoggle",n),be("toggle",n),be("cancel",n),be("close",n);break;case"iframe":case"object":be("load",n);break;case"video":case"audio":for(o=0;o<la.length;o++)be(la[o],n);break;case"image":be("error",n),be("load",n);break;case"details":be("toggle",n);break;case"embed":case"source":case"link":be("error",n),be("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(L in a)if(a.hasOwnProperty(L)&&(o=a[L],o!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,i));default:Ne(n,i,L,o,a,null)}return;default:if(Cu(i)){for(P in a)a.hasOwnProperty(P)&&(o=a[P],o!==void 0&&mf(n,i,P,o,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(o=a[w],o!=null&&Ne(n,i,w,o,a,null))}function Jw(n,i,a,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,v=null,w=null,A=null,L=null,P=null;for(z in a){var $=a[z];if(a.hasOwnProperty(z)&&$!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":A=$;default:o.hasOwnProperty(z)||Ne(n,i,z,null,o,$)}}for(var U in o){var z=o[U];if($=a[U],o.hasOwnProperty(U)&&(z!=null||$!=null))switch(U){case"type":d=z;break;case"name":f=z;break;case"checked":L=z;break;case"defaultChecked":P=z;break;case"value":v=z;break;case"defaultValue":w=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(137,i));break;default:z!==$&&Ne(n,i,U,z,o,$)}}Ou(n,v,w,A,L,P,d,f);return;case"select":z=v=w=U=null;for(d in a)if(A=a[d],a.hasOwnProperty(d)&&A!=null)switch(d){case"value":break;case"multiple":z=A;default:o.hasOwnProperty(d)||Ne(n,i,d,null,o,A)}for(f in o)if(d=o[f],A=a[f],o.hasOwnProperty(f)&&(d!=null||A!=null))switch(f){case"value":U=d;break;case"defaultValue":w=d;break;case"multiple":v=d;default:d!==A&&Ne(n,i,f,d,o,A)}i=w,a=v,o=z,U!=null?Ar(n,!!a,U,!1):!!o!=!!a&&(i!=null?Ar(n,!!a,i,!0):Ar(n,!!a,a?[]:"",!1));return;case"textarea":z=U=null;for(w in a)if(f=a[w],a.hasOwnProperty(w)&&f!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ne(n,i,w,null,o,f)}for(v in o)if(f=o[v],d=a[v],o.hasOwnProperty(v)&&(f!=null||d!=null))switch(v){case"value":U=f;break;case"defaultValue":z=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==d&&Ne(n,i,v,f,o,d)}Ed(n,U,z);return;case"option":for(var ee in a)U=a[ee],a.hasOwnProperty(ee)&&U!=null&&!o.hasOwnProperty(ee)&&(ee==="selected"?n.selected=!1:Ne(n,i,ee,null,o,U));for(A in o)U=o[A],z=a[A],o.hasOwnProperty(A)&&U!==z&&(U!=null||z!=null)&&(A==="selected"?n.selected=U&&typeof U!="function"&&typeof U!="symbol":Ne(n,i,A,U,o,z));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 fe in a)U=a[fe],a.hasOwnProperty(fe)&&U!=null&&!o.hasOwnProperty(fe)&&Ne(n,i,fe,null,o,U);for(L in o)if(U=o[L],z=a[L],o.hasOwnProperty(L)&&U!==z&&(U!=null||z!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,i));break;default:Ne(n,i,L,U,o,z)}return;default:if(Cu(i)){for(var Le in a)U=a[Le],a.hasOwnProperty(Le)&&U!==void 0&&!o.hasOwnProperty(Le)&&mf(n,i,Le,void 0,o,U);for(P in o)U=o[P],z=a[P],!o.hasOwnProperty(P)||U===z||U===void 0&&z===void 0||mf(n,i,P,U,o,z);return}}for(var x in a)U=a[x],a.hasOwnProperty(x)&&U!=null&&!o.hasOwnProperty(x)&&Ne(n,i,x,null,o,U);for($ in o)U=o[$],z=a[$],!o.hasOwnProperty($)||U===z||U==null&&z==null||Ne(n,i,$,U,o,z)}
vendor: 9,638 bytes, line 10
10function Om(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Qw(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var f=a[o],d=f.transferSize,v=f.initiatorType,w=f.duration;if(d&&w&&Om(v)){for(v=0,w=f.responseEnd,o+=1;o<a.length;o++){var A=a[o],L=A.startTime;if(L>w)break;var P=A.transferSize,$=A.initiatorType;P&&Om($)&&(A=A.responseEnd,v+=P*(A<w?1:(w-L)/(A-L)))}if(--o,i+=8*(d+v)/(f.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var yf=null,vf=null;function nl(n){return n.nodeType===9?n:n.ownerDocument}function km(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 Cm(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function bf(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var _f=null;function Xw(){var n=window.event;return n&&n.type==="popstate"?n===_f?!1:(_f=n,!0):(_f=null,!1)}var Dm=typeof setTimeout=="function"?setTimeout:void 0,Zw=typeof clearTimeout=="function"?clearTimeout:void 0,xm=typeof Promise=="function"?Promise:void 0,Ww=typeof queueMicrotask=="function"?queueMicrotask:typeof xm<"u"?function(n){return xm.resolve(null).then(n).catch(eS)}:Dm;function eS(n){setTimeout(function(){throw n})}function Ei(n){return n==="head"}function jm(n,i){var a=i,o=0;do{var f=a.nextSibling;if(n.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(o===0){n.removeChild(f),is(i);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")ca(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,ca(a);for(var d=a.firstChild;d;){var v=d.nextSibling,w=d.nodeName;d[ks]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=v}}else a==="body"&&ca(n.ownerDocument.body);a=f}while(a);is(i)}function Nm(n,i){var a=n;n=0;do{var o=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=o}while(a)}function wf(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":wf(a),Au(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function tS(n,i,a,o){for(;n.nodeType===1;){var f=a;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!o&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(o){if(!n[ks])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(d=n.getAttribute("rel"),d==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(d!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(d=n.getAttribute("src"),(d!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===d)return n}else return n;if(n=Qt(n.nextSibling),n===null)break}return null}function nS(n,i,a){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Qt(n.nextSibling),n===null))return null;return n}function Lm(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Qt(n.nextSibling),n===null))return null;return n}function Sf(n){return n.data==="$?"||n.data==="$~"}function Ef(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function iS(n,i){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||a.readyState!=="loading")i();else{var o=function(){i(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),n._reactRetry=o}}function Qt(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var Tf=null;function Um(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(i===0)return Qt(n.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}n=n.nextSibling}return null}function Mm(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return n;i--}else a!=="/$"&&a!=="/&"||i++}n=n.previousSibling}return null}function zm(n,i,a){switch(i=nl(a),n){case"html":if(n=i.documentElement,!n)throw Error(s(452));return n;case"head":if(n=i.head,!n)throw Error(s(453));return n;case"body":if(n=i.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function ca(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Au(n)}var Xt=new Map,Bm=new Set;function il(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Kn=Q.d;Q.d={f:rS,r:sS,D:aS,C:oS,L:lS,m:uS,X:fS,S:cS,M:hS};function rS(){var n=Kn.f(),i=Yo();return n||i}function sS(n){var i=Sr(n);i!==null&&i.tag===5&&i.type==="form"?tg(i):Kn.r(n)}var es=typeof document>"u"?null:document;function Pm(n,i,a){var o=es;if(o&&typeof i=="string"&&i){var f=$t(i);f='link[rel="'+n+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),Bm.has(f)||(Bm.add(f),n={rel:n,crossOrigin:a,href:i},o.querySelector(f)===null&&(i=o.createElement("link"),pt(i,"link",n),at(i),o.head.appendChild(i)))}}function aS(n){Kn.D(n),Pm("dns-prefetch",n,null)}function oS(n,i){Kn.C(n,i),Pm("preconnect",n,i)}function lS(n,i,a){Kn.L(n,i,a);var o=es;if(o&&n&&i){var f='link[rel="preload"][as="'+$t(i)+'"]';i==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+$t(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+$t(a.imageSizes)+'"]')):f+='[href="'+$t(n)+'"]';var d=f;switch(i){case"style":d=ts(n);break;case"script":d=ns(n)}Xt.has(d)||(n=m({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:n,as:i},a),Xt.set(d,n),o.querySelector(f)!==null||i==="style"&&o.querySelector(fa(d))||i==="script"&&o.querySelector(ha(d))||(i=o.createElement("link"),pt(i,"link",n),at(i),o.head.appendChild(i)))}}function uS(n,i){Kn.m(n,i);var a=es;if(a&&n){var o=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+$t(o)+'"][href="'+$t(n)+'"]',d=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ns(n)}if(!Xt.has(d)&&(n=m({rel:"modulepreload",href:n},i),Xt.set(d,n),a.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ha(d)))return}o=a.createElement("link"),pt(o,"link",n),at(o),a.head.appendChild(o)}}}function cS(n,i,a){Kn.S(n,i,a);var o=es;if(o&&n){var f=Er(o).hoistableStyles,d=ts(n);i=i||"default";var v=f.get(d);if(!v){var w={loading:0,preload:null};if(v=o.querySelector(fa(d)))w.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":i},a),(a=Xt.get(d))&&Af(n,a);var A=v=o.createElement("link");at(A),pt(A,"link",n),A._p=new Promise(function(L,P){A.onload=L,A.onerror=P}),A.addEventListener("load",function(){w.loading|=1}),A.addEventListener("error",function(){w.loading|=2}),w.loading|=4,rl(v,i,o)}v={type:"stylesheet",instance:v,count:1,state:w},f.set(d,v)}}}function fS(n,i){Kn.X(n,i);var a=es;if(a&&n){var o=Er(a).hoistableScripts,f=ns(n),d=o.get(f);d||(d=a.querySelector(ha(f)),d||(n=m({src:n,async:!0},i),(i=Xt.get(f))&&Rf(n,i),d=a.createElement("script"),at(d),pt(d,"link",n),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function hS(n,i){Kn.M(n,i);var a=es;if(a&&n){var o=Er(a).hoistableScripts,f=ns(n),d=o.get(f);d||(d=a.querySelector(ha(f)),d||(n=m({src:n,async:!0,type:"module"},i),(i=Xt.get(f))&&Rf(n,i),d=a.createElement("script"),at(d),pt(d,"link",n),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function Hm(n,i,a,o){var f=(f=ye.current)?il(f):null;if(!f)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(i=ts(a.href),a=Er(f).hoistableStyles,o=a.get(i),o||(o={type:"style",instance:null,count:0,state:null},a.set(i,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=ts(a.href);var d=Er(f).hoistableStyles,v=d.get(n);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}}
vendor: 4,212 bytes, line 10
10,d.set(n,v),(d=f.querySelector(fa(n)))&&!d._p&&(v.instance=d,v.state.loading=5),Xt.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xt.set(n,a),d||dS(f,n,a,v.state))),i&&o===null)throw Error(s(528,""));return v}if(i&&o!==null)throw Error(s(529,""));return null;case"script":return i=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=ns(a),a=Er(f).hoistableScripts,o=a.get(i),o||(o={type:"script",instance:null,count:0,state:null},a.set(i,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function ts(n){return'href="'+$t(n)+'"'}function fa(n){return'link[rel="stylesheet"]['+n+"]"}function qm(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function dS(n,i,a,o){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?o.loading=1:(i=n.createElement("link"),o.preload=i,i.addEventListener("load",function(){return o.loading|=1}),i.addEventListener("error",function(){return o.loading|=2}),pt(i,"link",a),at(i),n.head.appendChild(i))}function ns(n){return'[src="'+$t(n)+'"]'}function ha(n){return"script[async]"+n}function Im(n,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var o=n.querySelector('style[data-href~="'+$t(a.href)+'"]');if(o)return i.instance=o,at(o),o;var f=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(n.ownerDocument||n).createElement("style"),at(o),pt(o,"style",f),rl(o,a.precedence,n),i.instance=o;case"stylesheet":f=ts(a.href);var d=n.querySelector(fa(f));if(d)return i.state.loading|=4,i.instance=d,at(d),d;o=qm(a),(f=Xt.get(f))&&Af(o,f),d=(n.ownerDocument||n).createElement("link"),at(d);var v=d;return v._p=new Promise(function(w,A){v.onload=w,v.onerror=A}),pt(d,"link",o),i.state.loading|=4,rl(d,a.precedence,n),i.instance=d;case"script":return d=ns(a.src),(f=n.querySelector(ha(d)))?(i.instance=f,at(f),f):(o=a,(f=Xt.get(d))&&(o=m({},a),Rf(o,f)),n=n.ownerDocument||n,f=n.createElement("script"),at(f),pt(f,"link",o),n.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(s(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(o=i.instance,i.state.loading|=4,rl(o,a.precedence,n));return i.instance}function rl(n,i,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,d=f,v=0;v<o.length;v++){var w=o[v];if(w.dataset.precedence===i)d=w;else if(d!==f)break}d?d.parentNode.insertBefore(n,d.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(n,i.firstChild))}function Af(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Rf(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var sl=null;function $m(n,i,a){if(sl===null){var o=new Map,f=sl=new Map;f.set(a,o)}else f=sl,o=f.get(a),o||(o=new Map,f.set(a,o));if(o.has(n))return o;for(o.set(n,null),a=a.getElementsByTagName(n),f=0;f<a.length;f++){var d=a[f];if(!(d[ks]||d[ct]||n==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(i)||"";v=n+v;var w=o.get(v);w?w.push(d):o.set(v,[d])}}return o}function Km(n,i,a){n=n.ownerDocument||n,n.head.insertBefore(a,i==="title"?n.querySelector("head > title"):null)}function pS(n,i,a){if(a===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Gm(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function gS(n,i,a,o){if(a.type==="stylesheet"&&(typeof o.media!="str
10ing"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=ts(o.href),d=i.querySelector(fa(f));if(d){i=d._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=al.bind(n),i.then(n,n)),a.state.loading|=4,a.instance=d,at(d);return}d=i.ownerDocument||i,o=qm(o),(f=Xt.get(f))&&Af(o,f),d=d.createElement("link"),at(d);var v=d;v._p=new Promise(function(w,A){v.onload=w,v.onerror=A}),pt(d,"link",o),a.instance=d}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=al.bind(n),i.addEventListener("load",a),i.addEventListener("error",a))}}var Of=0;function mS(n,i){return n.stylesheets&&n.count===0&&ll(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var o=setTimeout(function(){if(n.stylesheets&&ll(n,n.stylesheets),n.unsuspend){var d=n.unsuspend;n.unsuspend=null,d()}},6e4+i);0<n.imgBytes&&Of===0&&(Of=62500*Qw());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&ll(n,n.stylesheets),n.unsuspend)){var d=n.unsuspend;n.unsuspend=null,d()}},(n.imgBytes>Of?50:800)+i);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(o),clearTimeout(f)}}: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,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,ol=new Map,i.forEach(yS,n),ol=null,al.call(n))}function yS(n,i){if(!(i.state.loading&4)){var a=ol.get(n);if(a)var o=a.get(null);else{a=new Map,ol.set(n,a);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var v=f[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),o=v)}o&&a.set(null,o)}f=i.instance,v=f.getAttribute("data-precedence"),d=a.get(v)||o,d===o&&a.set(null,f),a.set(v,f),this.count++,o=al.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),d?d.parentNode.insertBefore(f,d.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),i.state.loading|=4}}var da={$$typeof:D,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function vS(n,i,a,o,f,d,v,w,A){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=wu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wu(0),this.hiddenUpdates=wu(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Vm(n,i,a,o,f,d,v,w,A,L,P,$){return n=new vS(n,i,a,v,A,L,P,$,w),i=1,d===!0&&(i|=24),d=Ut(3,null,null,i),n.current=d,d.stateNode=n,i=sc(),i.refCount++,n.pooledCache=i,i.refCount++,d.memoizedState={element:o,isDehydrated:a,cache:i},uc(d),n}function Fm(n){return n?(n=Nr,n):Nr}function Ym(n,i,a,o,f,d){f=Fm(f),o.context===null?o.context=f:o.pendingContext=f,o=hi(i),o.payload={element:a},d=d===void 0?null:d,d!==null&&(o.callback=d),a=di(n,o,i),a!==null&&(kt(a,n,i),Gs(a,n,i))}function Jm(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<i?a:i}}function kf(n,i){Jm(n,i),(n=n.alternate)&&Jm(n,i)}function Qm(n){if(n.tag===13||n.tag===31){var i=Yi(n,67108864);i!==null&&kt(i,n,67108864),kf(n,67108864)}}function Xm(n){if(n.tag===13||n.tag===31){var i=Ht();i=Su(i);var a=Yi(n,i);a!==null&&kt(a,n,i),kf(n,i)}}var ul=!0;function bS(n,i,a,o){var f=M.T;M.T=null;var d=Q.p;try{Q.p=2,Cf(n,i,a,o)}finally{Q.p=d,M.T=f}}function _S(n,i,a,o){var f=M.T;M.T=null;var d=Q.p;try{Q.p=8,Cf(n,i,a,o)}finally{Q.p=d,M.T=f}}function Cf(n,i,a,o){if(ul){var f=Df(o);if(f===null)gf(n,i,o,cl,a),Wm(n,o);else if(SS(f,n,i,a,o))o.stopPropagation();else if(Wm(n,o),i&4&&-1<wS.indexOf(n)){for(;f!==null;){var d=Sr(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=$i(d.pe
vendor: 8,525 bytes, line 10
10ndingLanes);if(v!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var A=1<<31-Nt(v);w.entanglements[1]|=A,v&=~A}yn(d),(Ce&6)===0&&(Vo=xt()+500,oa(0))}}break;case 31:case 13:w=Yi(d,2),w!==null&&kt(w,d,2),Yo(),kf(d,2)}if(d=Df(o),d===null&&gf(n,i,o,cl,a),d===f)break;f=d}f!==null&&o.stopPropagation()}else gf(n,i,o,null,a)}}function Df(n){return n=xu(n),xf(n)}var cl=null;function xf(n){if(cl=null,n=wr(n),n!==null){var i=u(n);if(i===null)n=null;else{var a=i.tag;if(a===13){if(n=c(i),n!==null)return n;n=null}else if(a===31){if(n=h(i),n!==null)return n;n=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return cl=n,null}function Zm(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(a_()){case ad:return 2;case od:return 8;case Za:case o_:return 32;case ld:return 268435456;default:return 32}default:return 32}}var jf=!1,Ti=null,Ai=null,Ri=null,pa=new Map,ga=new Map,Oi=[],wS="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 Wm(n,i){switch(n){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Ai=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":pa.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ga.delete(i.pointerId)}}function ma(n,i,a,o,f,d){return n===null||n.nativeEvent!==d?(n={blockedOn:i,domEventName:a,eventSystemFlags:o,nativeEvent:d,targetContainers:[f]},i!==null&&(i=Sr(i),i!==null&&Qm(i)),n):(n.eventSystemFlags|=o,i=n.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),n)}function SS(n,i,a,o,f){switch(i){case"focusin":return Ti=ma(Ti,n,i,a,o,f),!0;case"dragenter":return Ai=ma(Ai,n,i,a,o,f),!0;case"mouseover":return Ri=ma(Ri,n,i,a,o,f),!0;case"pointerover":var d=f.pointerId;return pa.set(d,ma(pa.get(d)||null,n,i,a,o,f)),!0;case"gotpointercapture":return d=f.pointerId,ga.set(d,ma(ga.get(d)||null,n,i,a,o,f)),!0}return!1}function ey(n){var i=wr(n.target);if(i!==null){var a=u(i);if(a!==null){if(i=a.tag,i===13){if(i=c(a),i!==null){n.blockedOn=i,pd(n.priority,function(){Xm(a)});return}}else if(i===31){if(i=h(a),i!==null){n.blockedOn=i,pd(n.priority,function(){Xm(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function fl(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var a=Df(n.nativeEvent);if(a===null){a=n.nativeEvent;var o=new a.constructor(a.type,a);Du=o,a.target.dispatchEvent(o),Du=null}else return i=Sr(a),i!==null&&Qm(i),n.blockedOn=a,!1;i.shift()}return!0}function ty(n,i,a){fl(n)&&a.delete(i)}function ES(){jf=!1,Ti!==null&&fl(Ti)&&(Ti=null),Ai!==null&&fl(Ai)&&(Ai=null),Ri!==null&&fl(Ri)&&(Ri=null),pa.forEach(ty),ga.forEach(ty)}function hl(n,i){n.blockedOn===i&&(n.blockedOn=null,jf||(jf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ES)))}var dl=null;function ny(n){dl!==n&&(dl=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){dl===n&&(dl=null);for(var i=0;i<n.length;i+=3){var a=n[i],o=n[i+1],f=n[i+2];if(typeof o!="function"){if(xf(o||a)===null)continue;break}var d=Sr(a);d!==null&&(n.splice(i,3),i-=3,Cc(d,{pending:!0,data:f,method:a.method,action:o},o,f))}}))}function is(n){function i(A){return hl(A,n)}Ti!==null&&hl(Ti,n),Ai!==null&&hl(Ai,n),Ri!==null&&hl(Ri,n),pa.forEach(i),ga.forEach(i);for(var a=0;a<Oi.length;a++){var o=Oi[a];o.blockedOn===n&&(o.blockedOn=null)}for(;0<Oi.length&&(a=Oi[0],a.blockedOn===null);)ey(a),a.blockedOn===null&&Oi.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var f=a[o],d=a[o+1],v=f[St]||null;if(typeof d=="function")v||ny(a);else if(v){var w=null;if(d&&d.hasAttribute("formAction")){if(f=d,v=d[St]||null)w=v.formAction;else if(xf(f)!==null)continue}else w=v.action;typeof w=="function"?a[o+1]=w:(a.splice(o,3),o-=3),ny(a)}}}function iy(){function n(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function Nf(n){this._internalRoot=n}pl.prototype.render=Nf.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(s(409));var a=i.current,o=Ht();Ym(a,o,n,i,null,null)},pl.prototype.unmount=Nf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ym(n.current,2,null,n,null,null),Yo(),i[_r]=null}};function pl(n){this._internalRoot=n}pl.prototype.unstable_scheduleHydration=function(n){if(n){var i=dd();n={blockedOn:null,target:n,priority:i};for(var a=0;a<Oi.length&&i!==0&&i<Oi[a].priority;a++);Oi.splice(a,0,n),a===0&&ey(n)}};var ry=e.version;if(ry!=="19.2.5")throw Error(s(527,ry,"19.2.5"));Q.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=g(i),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:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gl.isDisabled&&gl.supportsFiber)try{As=gl.inject(TS),jt=gl}catch{}}return va.createRoot=function(n,i){if(!l(n))throw Error(s(299));var a=!1,o="",f=fg,d=hg,v=dg;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(d=i.onCaughtError),i.onRecoverableError!==void 0&&(v=i.onRecoverableError)),i=Vm(n,1,!1,null,null,a,o,null,f,d,v,iy),n[_r]=i.current,pf(n),new Nf(i)},va.hydrateRoot=function(n,i,a){if(!l(n))throw Error(s(299));var o=!1,f="",d=fg,v=hg,w=dg,A=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),i=Vm(n,1,!0,i,a??null,o,f,A,d,v,w,iy),i.context=Fm(null),a=i.current,o=Ht(),o=Su(o),f=hi(o),f.callback=null,di(a,f,o),a=o,i.current.lanes=a,Os(i,a),yn(i),n[_r]=i.current,pf(n),new pl(i)},va.version="19.2.5",va}var py;function US(){if(py)return Mf.exports;py=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Mf.exports=LS(),Mf.exports}
10var MS=US(),zS="__TSS_CONTEXT",oh=Symbol.for("TSS_SERVER_FUNCTION"),_j=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),BS="application/x-tss-framed",Kv=()=>window.__TSS_START_OPTIONS__;function gr(t){return t?.isNotFound===!0}function Nh(t){t.statusCode=t.statusCode||t.code||307;const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const r=new Response(null,{status:t.statusCode,headers:e});if(r.options=t,t.throw)throw r;return r}function Gv(t){return t instanceof Response&&!!t.options}function PS(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return Nh(t)}function HS(t){return t.replaceAll("\0","/").replaceAll("�","/").replace(/~([~0r])/g,(e,r)=>r==="0"?"\0":r==="r"?"�":r)}const gy=!1;function Mi(t){return t[t.length-1]}function Vv(t,e){return typeof t=="function"?t(e):t}const Lh=Object.prototype.hasOwnProperty;function Fv(t){for(const e in t)if(Lh.call(t,e))return!0;return!1}const Nl=()=>Object.create(null),rs=(t,e)=>Li(t,e,!0);function Li(t,e,r,s=0){if(t===e)return t;if(s++>500)return e;const l=Array.isArray(t)&&Array.isArray(e);if(!l&&!(ql(t)&&ql(e)))return e;const u=Object.keys(t),c=u.length,h=Object.keys(e),p=h.length;if(l?c!==t.length||p!==e.length||c&&Mi(u)!==`${c-1}`||p&&Mi(h)!==`${p-1}`:c!==Object.getOwnPropertyNames(t).length||p!==Object.getOwnPropertyNames(e).length||Object.getOwnPropertySymbols(e).length)return e;let g=0,y,m,b;if(l){for(;g<p&&(b=g,m=t[b],y=e[b],y=m===y?m:typeof m=="object"?Li(m,y,r,s):y,y===m);g++);if(g===p&&c===p)return t}else{let S=c===p,E=!0;for(;g<p;g++){b=h[g],m=t[b];const T=e[b];y=m===T?m:typeof m=="object"?Li(m,T,r,s):T,S&&=y===m&&(u[g]===b||Lh.call(t,b)),E&&=Object.is(y,T),u[g]=y}if(S)return Object.getOwnPropertySymbols(t).length?e:t;if(E)return e}const _=l?h.fill(0):r?Nl():{};for(let S=0;S<p;S++)b=l?S:h[S],l?(m=t[b],S>g&&(y=e[b],y=m===y?m:typeof m=="object"?Li(m,y,r,s):y),_[b]=S<g?m:y):_[b]=u[S];return _}function ql(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function hn(t,e,r,s){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let l=0,u=t.length;l<u;l++){const c=t[l],h=e[l];
10if(c!==h&&!hn(c,h,r,s))return!1}return!0}if(ql(t)&&ql(e)){if(r){for(const u in e)if((s||e[u]!==void 0)&&!hn(t[u],e[u],r,s))return!1;return!0}let l=0;if(s)l=Object.keys(t).length;else for(const u in t)t[u]!==void 0&&l++;for(const u in e)if((s||e[u]!==void 0)&&(l--===0||!hn(t[u],e[u],r,s)))return!1;return l===0}return!1}function qS(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}const IS=/[\x00-\x1f\x7f"<>`{}]/g;function $S(t){return t.replace(IS,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function my(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return $S(e)}const KS=["http:","https:","mailto:","tel:"];function ja(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const Yv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Jv(t,e){if(!t)return!1;if(Yv.test(t))return!0;const r=ja(t);return r?!e.has(r):!1}const GS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},VS=/[&><\u2028\u2029]/g;function FS(t){return t.replace(VS,e=>GS[e])}function ba(t){if(!t)return t;let e=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const r=/%25|%5C/gi;let s=0,l;for(e="";(l=r.exec(t))!==null;)e+=my(t.slice(s,l.index))+l[0],s=r.lastIndex;e+=my(s?t.slice(s):t)}return e}function YS(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function JS(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function bs(t){return t.replace(/\/{2,}/g,"/")}function Qv(t){return t==="/"?t:t.replace(/^\/+/,"")}function Sn(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/+$/,""):t}function Xv(t){return Sn(Qv(t))}function yy(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function vy(t,e,r="never",s){if(e.includes("//")&&(e=bs(e)),e.startsWith("/"))return e.length===1||r==="preserve"?e:r==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;const l=e===".";let u;if(s){u=l?t:t+"\0"+e;const g=s.get(u);if(g)return g}let c;if(l)c=t.split("/");else{for(t.includes("//")&&(t=bs(t)),c=t.split("/");c.length>1&&Mi(c)==="";)c.pop();const g=e.split("/");for(let y=0,m=g.length;y<m;y++){const b=g[y];
10b===""?y?y===m-1&&c.push(b):c=[b]:b===".."?c.length>1?c.pop():c=[""]:b==="."||c.push(b)}}c.length>1&&(Mi(c)===""?r==="never"&&c.pop():r==="always"&&c.push(""));const h=c.join("/"),p=(l?bs(h):h)||"/";return u&&s&&s.set(u,p),p}function QS(t){const e=new Map(t.map(s=>[encodeURIComponent(s),s])),r=new RegExp([...e.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return s=>s.replace(r,l=>e.get(l)??l)}function XS(t){return t==null||t===""}function ZS(t,e,r){if(typeof e!="string")return""+(e??void 0);const s=t==="_splat";if(s&&(!e||/^[a-zA-Z0-9\-._~!/]*$/.test(e)))return e;let l=encodeURIComponent(e);return s&&(l=l.replaceAll("%2F","/")),r?r(l):l}function by(t,e,r,s,l){const u=t.endsWith("/")?"/":"";let c="";for(const h of e){if(typeof h=="string"){c+=h;continue}const[p,g,y,m]=h,b=p===2,_=b&&m!==void 0?m+u:m;let S=r[g];if(!(p===3&&S==null)){if(l&&(l[g]=S,b&&(l["*"]=S)),b&&XS(S)){if(y==="/"&&!_)continue;S=""}c+=y+ZS(g,S,s)+(_||"")}}return c+u||"/"}function Il(t){const e=new Map;let r,s;return{get(l){const u=e.get(l);if(u)return u.visited=!0,u.value},set(l,u){const c=e.get(l);if(c){c.value=u;return}if(e.size>=t){let p=r?.next().value;for(;!p||p.visited;)p?p.visited=!1:r=e.values(),p=r.next().value;p===s&&(r=void 0),e.delete(p.key)}const h={key:l,value:u,visited:!1};s=h,e.set(l,h)},clear(){e.clear(),r=void 0,s=void 0}}}function Na(){throw new Error("Invariant failed")}const Ni=4,Zv=5;function WS(t){const e=t.names;if(e)return e;const r=[];for(const s of t)typeof s!="string"&&r.push(s[1]);return t.names=r}function eE(t,e,r){const s=t.substring(e,r);if(s.charCodeAt(0)===36)return s.length===1?[2,"_splat","",void 0]:[1,s.substring(1),"",""];const l=s.indexOf("{");if(l>=0){const u=s.indexOf("}",l),c=s.charCodeAt(l+1)===45,h=l+(c?3:2);if(u>=0&&s.charCodeAt(h-1)===36&&(!c||h<u)){const p=s.substring(h,u);return[c?3:p?1:2,p||"_splat",s.substring(0,l),t.substring(e+u+1,p?r:t.length)]}}return s}function La(t,e,r,s,l,u){let c=r;const h=e.fullPath??e.from,p=e.options,g=h.length,y=h.endsWith("/")?g-1:g,m=p?.caseSensitive??t,b=p?.params?.parse??p?.parseParams;let _,S=u?r-1:0;if(!s||h.includes("$")){_=u?.slice()??[];const R=Mi(_);R&&typeof R!="string"&&R[0]===2&&(_[_.length-1]=[R[0],R[1],R[2],R[3]===void 0?void 0:R[3]+h.substring(r-(h[r-2]==="/"?2:1),y)],S=g)}for(;c<g;){const R=c,C=h.indexOf("/",R);let D=C===-1?g:C;const H=eE(h,R,D);c=D+1;let F;if(typeof H=="string"){if(!s)continue;let B=H,j;m?j=s.static??=new Map:(B=H.toLowerCase(),j=s.staticInsensitive??=new Map);const V=j.get(B);if(V)F=V;else{const W=cr(s);F=W,j.set(B,W)}}else{const B=H[0];let j=H[2],V=H[3]??"";if(B===2&&(D=g,c=D+1),_&&S<D&&(S<R-1&&_.push(h.substring(S,R-1)),H[2]="/"+j,B===2&&H[3]!==void 0&&y<g&&(H[3]=V.slice(0,-1)),_.push(H),S=D),!s)continue;const W=m&&!!(j||V);m||(j=j.toLowerCase(),V=V.toLowerCase());const se=B===1?s.dynamic??=[]:B===3?s.optional??=[]:s.wildcard??=[],K=B!==2&&!b&&se.find(G=>!G.parse&&G.caseSensitive===W&&G.prefix===j&&G.suffix===V);if(K)F=K;else{const G=cr(s,B,W,j,V);F=G,se.push(G),se.length===2&&l?.push(se)}}s=F}_&&S<y&&_.push(h.substring(S,y));const E=_?.slice();if(!s)return E;if(b&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){const R=cr(s,Zv);(s.pathless??=[]).push(R),s=R}const T=(e.path||!e.children)&&!e.isRoot;if(T&&y<g){const R=cr(s,Ni);s.index=R,s=R}return s.parse=b??null,s.priority=p?.params?.priority??0,s.route||(s.data=E,T&&(s.route=e)),[s,c,E]}function Wv(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function cr(t,e=0,r,s,l){return{kind:e,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:r,prefix:s,suffix:l}}function tE(t,e){const r=cr(),s=[];function l(u,c,h,p){const[g,y,m]=La(!1,u,c,h,s,p);if(u.children)for(const b of u.children)l(b,y,g,m)}for(const u of t)l(u,1,r);for(const u of s)u.sort(Wv);e.masksTree=r,e.flatCache=Il(1e3)}function nE(t,e){t||="/";const r=e.flatCache.get(t);if(r!==void 0)return r;const s=Uh(t,e.masksTree);return e.flatCache.set(t,s),s}function iE(t,e,r,s,l){t||="/",s||="/";const u=e?`case\0${t}`:t;let c=l.singleCache.get(u);return c||(c=cr(),La(e,{from:t},1,c),l.singleCache.set(u,c)),Uh(s,c,r)}function rE(t,e,r=!1){const s=r?t:`nofuzz\0${t}`,l=e.matchCache.get(s);if(l!==void 0)return l;t||="/";let u;
10try{u=Uh(t,e.segmentTree,r)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=t0(u.route)),e.matchCache.set(s,u),u}function sE(t,e=!1){const r=cr(),s=[],l={},u={};let c=0;function h(p,g,y,m){if(p.init(c),p.id in l&&Na(),l[p.id]=p,c!==0&&p.path){const E=Sn(p.fullPath);(!u[E]||p.fullPath.endsWith("/"))&&(u[E]=p)}c++;const[b,_,S]=La(e,p,g,y,s,m);if(p._interpolation=S,p.children)for(const E of p.children)h(E,_,b,S)}h(t,1,r);for(const p of s)p.sort(Wv);return{processedTree:{segmentTree:r,singleCache:Il(1e3),matchCache:Il(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Uh(t,e,r=!1){const s=t.split("/"),l=oE(t,s,e,r);if(!l)return null;const[u]=e0(t,s,l);return{route:l.node.route,rawParams:u}}function e0(t,e,r){const s=aE(r.node),l=r.node.data&&WS(r.node.data),u=Object.create(null);let c=r.extract?.part??0,h=r.extract?.node??0,p=r.extract?.path??0,g=r.extract?.param??0;for(;h<s.length;c++,h++,p++){const y=s[h];if(y.kind===Ni)break;if(y.kind===Zv){c--,p--;continue}const m=e[c],b=p;if(m&&(p+=m.length),y.kind===1||y.kind===3){const _=l[g++];if(y.kind===3&&r.skipped&1<<h){c--,p=b-1;continue}const S=y.suffix||y.prefix?m.substring(y.prefix.length,m.length-y.suffix.length):m;(S||y.kind===1)&&(u[_]=decodeURIComponent(S))}else if(y.kind===2){const _=y,S=t.substring(b+_.prefix.length,t.length-_.suffix.length),E=decodeURIComponent(S);u["*"]=E,u._splat=E;break}}return r.rawParams&&Object.assign(u,r.rawParams),[u,{part:c,node:h,path:p,param:g}]}function t0(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function aE(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function oE(t,e,r,s){if(t==="/"&&r.index)return{node:r.index,skipped:0};const l=!Mi(e),u=l&&t!=="/",c=e.length-(l?1:0),h=[{node:r,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,g=null;for(;h.length;){const y=h.pop(),{node:m,index:b,skipped:_,statics:S,dynamics:E,optionals:T}=y;let{extract:R,rawParams:C}=y;if(m.kind===2&&m.route&&!yl(g,y))continue;if(m.parse){if(!_y(t,e,y))continue;C=y.rawParams,R=y.extract}s&&m.route&&m.kind!==Ni&&yl(p,y)&&(p=y);const D=b===c;if(D&&(m.route&&(!u||m.kind===Ni||m.kind===2)&&yl(g,y)&&(g=y),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const H=D?void 0:e[b];let F;if(D&&m.index){const B={node:m.index,index:b,skipped:_,statics:S,dynamics:E,optionals:T,extract:R,rawParams:C};let j=!0;if(m.index.parse&&(_y(t,e,B)||(j=!1)),j){if(!E&&!T&&!_&&lE(S,c))return B;yl(g,B)&&(g=B)}}if(m.wildcard)for(let B=m.wildcard.length-1;B>=0;B--){const j=m.wildcard[B],{prefix:V,suffix:W}=j;if(!(V&&(D||!(j.caseSensitive?H:F??=H.toLowerCase()).startsWith(V)))){if(W){if(D)continue;const se=e.slice(b).join("/"),K=se.slice(-W.length);if((j.caseSensitive?K:K.toLowerCase())!==W||se.length-W.length<V.length)continue}h.push({node:j,index:c,skipped:_,statics:S,dynamics:E,optionals:T,extract:R,rawParams:C})}}if(m.optional){const B=_|1<<m.depth+1;for(let j=m.optional.length-1;j>=0;j--){const V=m.optional[j];h.push({node:V,index:b,skipped:B,statics:S,dynamics:E,optionals:T,extract:R,rawParams:C})}if(!D)for(let j=m.optional.length-1;j>=0;j--){const V=m.optional[j],{prefix:W,suffix:se}=V;if(W||se){const K=V.caseSensitive?H:F??=H.toLowerCase();if(W&&!K.startsWith(W)||se&&K.indexOf(se,K.length-se.length)<W.length)continue}h.push({node:V,index:b+1,skipped:_,statics:S,dynamics:E,optionals:T+ml(c,b),extract:R,rawParams:C})}}if(!D&&m.dynamic&&H)for(let B=m.dynamic.length-1;B>=0;B--){const j=m.dynamic[B],{prefix:V,suffix:W}=j;if(V||W){const se=j.caseSensitive?H:F??=H.toLowerCase();if(V&&!se.startsWith(V)||W&&se.indexOf(W,se.length-W.length)<V.length)continue}h.push({node:j,index:b+1,skipped:_,statics:S,dynamics:E+ml(c,b),optionals:T,extract:R,rawParams:C})}if(!D&&m.staticInsensitive){const B=m.staticInsensitive.get(F??=H.toLowerCase());B&&h.push({node:B,index:b+1,skipped:_,statics:S+ml(c,b),dynamics:E,optionals:T,extract:R,rawParams:C})}if(!D&&m.static){const B=m.static.get(H);B&&h.push({node:B,index:b+1,skipped:_,statics:S+ml(c,b),dynamics:E,optionals:T,extract:R,rawParams:C})}if(m.pathless)for(let B=m.pathless.length-1;B>=0;B--){const j=m.pathless[B];h.push({node:j,index:b,skipped:_,statics:S,dynamics:E,optionals:T,extract:R,rawParams:C})}}if(g)return g;if(s&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=e[b].length;const m=y===t.length?"/":t.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(m),p}return null}function ml(t,e){return 2**(t-e-1)}function lE(t,e){return t===2**(e-1)-1}function _y(t,e,r){let s,l;try{[s,l]=e0(t,e,r)}catch{return null}if(r.rawParams=s,r.extract=l,!r.node.parse)return!0;try{if(r.node.parse(s)===!1)return null}catch{}return!0}function yl(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===Ni)>(t.node.kind===Ni)||e.node.kind===Ni==(t.node.kind===Ni)&&e.node.depth>
10t.node.depth))):!0}function uE(){try{return sessionStorage}catch{return}}const cE="tsr-scroll-restoration-v1_3",n0=uE();function fE(){try{return JSON.parse(n0?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const ss=fE(),wy="data-scroll-restoration-id",hE=t=>t.state.__TSR_key||t.href;function dE(t){const e=t.getAttribute(wy);if(e)return`[${wy}="${e}"]`;let r="",s=t,l;for(;l=s.parentNode;){let u=1,c=s;for(;c=c.previousElementSibling;)u++;const h=`${s.localName}:nth-child(${u})`;r=r?`${h} > ${r}`:h,s=l}return r}let vl=!1;const Ll="window";function lh(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function Sy(t){const e=new Set;for(const r of t){if(r===Ll)continue;const s=lh(r);s&&e.add(s)}return e}function pE(t,e){const r=t.options.scrollRestoration,s=t._scroll;r&&(s.e=!0);const l=t.options.getScrollRestorationKey||hE,u=new Set,c=h=>{const p=ss[h]||={};for(const g of u)g===document?p[Ll]={scrollX,scrollY}:g.isConnected&&(p[dE(g)]={scrollX:g.scrollLeft,scrollY:g.scrollTop})};r&&!s.s&&(s.s=!0,vl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{vl||u.add(h.target)},!0),t.subscribe("onBeforeLoad",h=>{h.fromLocation&&c(l(h.fromLocation)),u.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",c(l(t.stores.resolvedLocation.get()??t.stores.location.get()));try{n0?.setItem(cE,JSON.stringify(ss))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!s.r&&(s.r=!0,t.subscribe("onRendered",h=>{const p=t.options.scrollRestorationBehavior,g=t.options.scrollToTopSelectors,y=s.n,m=s.h;let b;if(u.clear(),s.n=!0,s.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const _=l(h.toLocation),S=h.fromLocation&&l(h.fromLocation);if(s.e&&S&&S!==_){const E=ss[S];if(E){let T=ss[_];for(const R in E){if(R===Ll){if(y)continue}else{const C=lh(R);if(!C||y&&g&&(b??=Sy(g),b.has(C)))continue}T||(T=ss[_]={}),T[R]??=E[R]}}}vl=!0;try{const E=h.toLocation.hash,T=h.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(y){!E&&g&&(b??=Sy(g));const C=E&&T&&m,D=s.e?ss[_]:void 0;if(D)for(const H in D){const{scrollX:F,scrollY:B}=D[H];if(H===Ll){if(C)continue;scrollTo({top:B,left:F,behavior:p}),R=!0}else{const j=lh(H);j&&(j.scrollLeft=F,j.scrollTop=B,b?.delete(j))}}if(!E){const H={top:0,left:0,behavior:p};if(R||scrollTo(H),b)for(const F of b)F.scrollTo(H)}}!R&&E&&T&&document.getElementById(E)?.scrollIntoView(T)}finally{vl=!1}}))}function i0(t,e=String){let r;for(const s in t){const l=t[s];l!==void 0&&(r||=new URLSearchParams).set(s,e(l))}return r?r.toString():""}function Hf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function gE(t){const e=new URLSearchParams(t),r=Object.create(null);for(const[s,l]of e.entries()){const u=r[s];u==null?r[s]=Hf(l):Array.isArray(u)?u.push(Hf(l)):r[s]=[u,Hf(l)]}return r}const r0=/^(?:\s|["[{\d-]|fa|nu|tr)/,mE=vE(JSON.parse),yE=bE(JSON.stringify,JSON.parse);function vE(t){const e=t===JSON.parse;return r=>{r[0]==="?"&&(r=r.substring(1));const s=gE(r);for(const l in s){const u=s[l];if(typeof u=="string"){if(e&&!r0.test(u))continue;try{s[l]=t(u)}catch{}}}return s}}function bE(t,e){const r=e===JSON.parse;function s(l){if(l&&typeof l=="object")try{return t(l)}catch{}else if(e&&typeof l=="string"){if(r&&!r0.test(l))return l;try{return e(l),t(l)}catch{}}return l}return l=>{const u=i0(l,s);return u?`?${u}`:""}}const _s="__root__";function _E(t,e,r){const s=Xv(t),l=`/${s}`,u=e?l:l.toLowerCase(),c=`${u}/`,h={input:({url:p})=>{const g=e?p.pathname:p.pathname.toLowerCase();return g===u?p.pathname="/":g.startsWith(c)&&(p.pathname=p.pathname.slice(l.length)),p},output:({url:p})=>(p.pathname=bs(`/${s}${p.pathname}`),p)};return r?{input:({url:p})=>uh(r,h.input({url:p})),output:({url:p})=>h.output({url:s0(r,p)})}:h}function uh(t,e){const r=t?.input?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function s0(t,e){const r=t?.output?.({url:e});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return e}function wE(t,e){const{createMutableStore:r,createReadonlyStore:s,batch:l}=e,u=new Map,c=r("idle"),h=r(t),p=r(void 0),g=r([]),y=s(()=>g.get().map(E=>u.get(E).get())),m=s(()=>({status:c.get(),isLoading:c.get()==="pending",matches:y.get(),location:h.get(),resolvedLocation:p.get()}));function b(E){let T=u.get(E);return T||(T=r(void 0),u.set(E,T)),T}const _={status:c,location:h,resolvedLocation:p,ids:g,matches:y,by
10Route:u,__store:m,getMatchStore:b,setMatches:S};function S(E){const T=g.get(),R=E.map(C=>C.routeId);l(()=>{JS(T,R)||g.set(R);for(const C of T)R.includes(C)||u.get(C).set(()=>{});for(const C of E){const D=b(C.routeId);D.get()!==C&&D.set(C)}})}return _}var Ui="__TSR_index",Ey="popstate",Ty="beforeunload",SE=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Ul(t){const e=SE.exec(t);return e?"/"+t.slice(e[0].length):t}function a0(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,e=>` 11\r`.includes(e)?"":encodeURIComponent(e))),Ul(t)}function EE(t){let e=t.getLocation();const r=new Set,s=c=>{e=t.getLocation(),r.forEach(h=>h({location:e,action:c}))},l=c=>{t.notifyOnIndexChange??!0?s(c):e=t.getLocation()},u=async({task:c,navigateOpts:h,...p})=>{if(h?.ignoreBlocker??!1){c();return}const g=t.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const m of g){const b=$l(p.path,p.state);if(await m.blockerFn({currentLocation:e,nextLocation:b,action:p.type})){t.onBlocked?.();return}}c()};return{get location(){return e},get length(){return t.getLength()},subscribers:r,subscribe:c=>(r.add(c),()=>{r.delete(c)}),push:(c,h,p)=>{const g=e.state[Ui];h=Ay(g+1,h),u({task:()=>{t.pushState(c,h),s({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:c,state:h})},replace:(c,h,p)=>{const g=e.state[Ui];h=Ay(g,h),u({task:()=>{t.replaceState(c,h),s({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:c,state:h})},go:(c,h)=>{u({task:()=>{t.go(c,h?.ignoreBlocker??!1),l({type:"GO",index:c})},navigateOpts:h,type:"GO"})},back:c=>{u({task:()=>{t.back(c?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{t.forward(c?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>e.state[Ui]!==0,createHref:c=>t.createHref(c),block:c=>{if(!t.setBlockers)return()=>{};const h=t.getBlockers?.()??[];return t.setBlockers([...h,c]),()=>{const p=t.getBlockers?.()??[];t.setBlockers?.(p.filter(g=>g!==c))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:s,_getBlockers:()=>t.getBlockers?.()??[]}}function Ay(t,e){const r=Mh();return{...e,key:r,__TSR_key:r,[Ui]:t}}function TE(t){const e=typeof document<"u"?window:void 0,r=e.history.pushState,s=e.history.replaceState;let l=[];const u=()=>l,c=j=>l=j,h=j=>a0(j),p=(()=>$l(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const j=Mh();e.history.replaceState({[Ui]:0,key:j,__TSR_key:j},"")}let g=p(),y,m=!1,b=!1,_=!1,S=!1;const E=()=>g;let T;const R=()=>{T&&(B._ignoreSubscribers=!0,(T[2]?e.history.pushState:e.history.replaceState)(T[1],"",T[0]),B._ignoreSubscribers=!1,T=void 0,y=void 0)},C=(j,V,W)=>{const se=!!T;se||(y=g),g=$l(V,W),T=[g.href,W,T?.[2]||j],se||queueMicrotask(()=>R())},D=j=>{g=p(),B.notify({type:j})},H=async()=>{if(S=!1,b){b=!1;return}const j=p(),V=j.state[Ui]-g.state[Ui],W=V===1,se=V===-1,K=!W&&!se||m;m=!1;const G=K?"GO":se?"BACK":"FORWARD",Z=K?{type:"GO",index:V}:{type:se?"BACK":"FORWARD"};if(_)_=!1;else{const he=u();if(typeof document<"u"&&he.length){for(const re of he)if(await re.blockerFn({currentLocation:g,nextLocation:j,action:G})){b=!0,e.history.go(-V),B.notify(Z);return}}}g=p(),B.notify(Z)},F=j=>{if(S){S=!1;return}let V=!1;const W=u();if(typeof document<"u"&&W.length)for(const se of W){const K=se.enableBeforeUnload??!0;if(K===!0){V=!0;break}if(typeof K=="function"&&K()===!0){V=!0;break}}if(V)return j.preventDefault(),j.returnValue=""},B=EE({getLocation:E,getLength:()=>e.history.length,pushState:(j,V)=>C(!0,j,V),replaceState:(j,V)=>C(!1,j,V),back:j=>(j&&(_=!0,S=!0),e.history.back()),forward:j=>{j&&(_=!0,S=!0),e.history.forward()},go:(j,V)=>{m=!0,V&&(_=!0,S=!0),e.history.go(j)},createHref:j=>h(j),flush:R,destroy:()=>{e.history.pushState=r,e.history.replaceState=s,e.removeEventListener(Ty,F,{capture:!0}),e.removeEventListener(Ey,H)},onBlocked:()=>{y&&g!==y&&(g=y)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return B._ignoreNextBeforeUnload=j=>{S=!1;try{j=new URL(j,e.document.baseURI).href,S=/^https?:/.test(j)&&(!j.includes("#")||j.split("#")[0]!==e.location.href.split("#")[0])}catch{}},e.addEventListener(Ty,F,{capture:!0}),e.addEventListener(Ey,H),e.history.pushState=function(...j){const V=r.apply(e.history,j);return B._ignoreSubscribers||D("PUSH"),V},e.history.replaceState=function(...j){const V=s.apply(e.history,j);return B._ignoreSubscribers||D("REPLACE"),V},B}function $l(t,e){const r=a0(t),s=r.indexOf("#"),l=r.indexOf("?");if(!e){const u=Mh();e={[Ui]:0,key:u,__TSR_key:u}}return{href:r,pathname:r.substring(0,s>0?l>0?Math.min(s,l):s:l>0?l:r.length),hash:s>-1?r.substring(s):"",search:l>-1?r.slice(l,s===-1?void 0:s):"",state:e}}function Mh(){return(Math.random()+1).toString(36).substring(7)}function qf(t,e){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==e||!!t.username||!!t.password}function If(t){return t.pathname+t.search+t.hash}function Ry(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function AE(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function iu(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}
11function Oy({key:t,__TSR_key:e,__TSR_index:r,__hashScrollIntoViewOptions:s,...l}){return l}function o0(t){return t.findIndex(e=>e.status==="error"||e.status==="notFound"||e._notFound)+1}function RE(t,e,r,s,l,u){s&&(e=e.slice(0,s)),l&&(r=r.slice(0,l));for(const c of e){if(u&&t._tx!==u)return;r.some(h=>h.routeId===c.routeId)||t.routesById[c.routeId].options.onLeave?.(c)}for(const c of r){if(u&&t._tx!==u)return;t.routesById[c.routeId].options[e.some(h=>h.routeId===c.routeId)?"onStay":"onEnter"]?.(c)}}var OE=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async r=>(r(),!1),this.update=r=>{const s=this.options;this.options={...s,...r},this.isServer=this.options.isServer??gy??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=TE()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const l=this.options.basepath??"/",u=this.options.rewrite,c=this.basepath!==l||s?.rewrite!==u||s?.caseSensitive!==this.options.caseSensitive;if(c&&(this.basepath=l,this.rewrite=l!=="/"&&Xv(l)?_E(l,this.options.caseSensitive,u):u),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||gy){this.routeTree=this.options.routeTree;let h;h=this.buildRouteTree(),this.setRoutes(h)}if(this.stores)c&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=wE(this.latestLocation,h),pE(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=sE(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&tE(this.options.routeMasks,r.processedTree),{...r,resolvePathCache:Il(1e3)}},this.subscribe=(r,s)=>{const l={eventType:r,fn:s};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=r=>{for(const s of this.subscribers)if(s.eventType===r.type)try{s.fn(r)}catch(l){console.error(l)}},this.parseLocation=(r,s)=>{const l=({pathname:p,search:g,hash:y,href:m},b)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const T=this.options.parseSearch(g),R=this.options.stringifySearch(T);return{href:p+R+y,publicHref:p+R+y,pathname:ba(p),external:!1,searchStr:R,search:rs(s?.search,T),hash:ba(y.slice(1)),state:Li(s?.state,b)}}const _=uh(this.rewrite,new URL(m,this.origin)),S=this.options.parseSearch(_.search),E=this.options.stringifySearch(S);return _.search=E,{href:_.href.replace(_.origin,""),publicHref:m,pathname:ba(Ul(_.pathname)),external:!!this.rewrite&&qf(_,this.origin),searchStr:E,search:rs(s?.search,S),hash:ba(_.hash.slice(1)),state:Li(s?.state,b)}},u=l(r,r.state),{__tempLocation:c,__tempKey:h}=u.state;if(c&&(!h||h===this.tempLocationKey)){const p=l(c,{...c.state,__tempLocation:void 0,key:u.state.key,__TSR_key:u.state.__TSR_key});return p.maskedLocation=u,p}return u},this.matchRoutes=(r,s,l)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:s},l):this.matchRoutesInternal(r,s),this.getMatchedRoutes=r=>{const s=Object.create(null),l=rE(Sn(r),this.processedTree,!0);return l&&Object.assign(s,l.rawParams),[l?.branch||[this.routesById.__root__],s,l?.route]},this.buildLocation=r=>{{const c=this.staticLocations.get(r);if(c)return c}let s=!1;const l=(c={})=>{if(c.href){const he=$l(c.href,{});c={...c,to:uh(this.rewrite,new URL(he.pathname,this.origin)).pathname,search:this.options.parseSearch(he.search),hash:he.hash.slice(1)}}const h=c._fromLocation||this._pendingLocation||this.latestLocation;let p;const g=()=>(s=!0,h),y=()=>(s=!0,p??=this.matchRoutesLightweight(h)),m=c.to?`${c.to}`:".",b=vy(m[0]==="/"?"":c.unsafeRelative==="path"?g().pathname:c.from??y()[1],m,this.options.trailingSlash,this.resolvePathCache),_=this.routesByPath[Sn(b)],S=b.includes("$");let E;if(_)E=_._branch??=t0(_);else if(S)E=[];else{const[he,re,M]=this.getMatchedRoutes(b);E=he,this.options.notFoundRoute&&(!M||M.path!=="/"&&re["**"])&&(E=[...E,this.options.notFoundRoute])}const T=S?_?._interpolation??La(!1,{fullPath:b},0):void 0;let R;for(const he of E){const re=he.options.params?.stringify??he.options.stringifyParams;if(re){const M=y()[3];if(R??=$f(c.params,M),!Fv(R))break;R===M&&(R=Object.assign(Nl(),R));try{Object.assign(R,re(R))}catch{}}}R??=$f(c.params,CE(c.params,T)?y()[3]:Kf);
11const C=r.leaveParams?b:Ul(ba(T?by(b,T,R,this.pathParamsDecoder):b)),D=DE(E,r._includeValidateSearch),H=()=>{let he=y()[2];if(r._includeValidateSearch&&this.options.search?.strict){const re={};E.forEach(M=>{if(M.options.validateSearch)try{Object.assign(re,Ml(M.options.validateSearch,{...re,...he}))}catch{}}),he=re}return he},F=D.length?xE(D,H(),c):c.search===!0?H():typeof c.search=="function"?c.search(H()):c.search||Kf,B=this.options.stringifySearch(F),j=c.hash===!0?g().hash:typeof c.hash=="function"?c.hash(g().hash):c.hash||void 0,V=j?`#${j}`:"",W=c.state?c.state===!0?g().state:typeof c.state=="function"?c.state(g().state):c.state:Kf,se=`${C}${B}${V}`;let K,G,Z=!1;if(this.rewrite){const he=new URL(se,this.origin),re=he.origin,M=s0(this.rewrite,he);K=If(he),qf(M,re)?(G=M.href,Z=!0):G=Ul(If(M))}else K=YS(se),G=K;return{publicHref:G,href:K,pathname:C,search:F,searchStr:B,state:W,hash:j??"",external:Z,unmaskOnReload:c.unmaskOnReload}},u=l(r);if(r.mask)u.maskedLocation=l({from:r.from,...r.mask});else if(this.options.routeMasks){const c=nE(u.pathname,this.processedTree);if(c){const h=Object.assign(Nl(),c.rawParams),{from:p,params:g,...y}=c.route,m=$f(g,h);u.maskedLocation=l({from:r.from,...y,params:m})}}return!s&&r._fromLocation&&!u.maskedLocation&&this.staticLocations.set(r,u),u},this.commitLocation=async({viewTransition:r,ignoreBlocker:s,...l})=>{const u=l.maskedLocation??l;if(u.external)return ky(this,u.publicHref,{replace:l.replace,ignoreBlocker:s});let c;const h=Sn(this.latestLocation.href)===Sn(l.href)&&hn(Oy(l.state),Oy(this.latestLocation.state)),p=this._commitPromise;let g;const y=new Promise(m=>{g=m});if(y.resolve=()=>{g(),p?.resolve()},this._commitPromise=y,h)this.load();else{let{maskedLocation:m,hashScrollIntoView:b,..._}=l;m&&(_={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{..._,search:_.searchStr,state:{..._.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(_.unmaskOnReload??this.options.unmaskOnReload??!1)&&(_.state.__tempKey=this.tempLocationKey)),_.state={..._.state,__hashScrollIntoViewOptions:b??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=r,c=l.replace?"REPLACE":"PUSH",this.history[c==="REPLACE"?"replace":"push"](_.publicHref,_.state,{ignoreBlocker:s}),this.history.subscribers.size||this.load({action:{type:c}})}return this._scroll.n=l.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:r,resetScroll:s,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:c,...h}={})=>{const p=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=p;const g=this.commitLocation({...p,viewTransition:u,replace:r,resetScroll:s,hashScrollIntoView:l,ignoreBlocker:c});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),g},this.navigate=async({to:r,reloadDocument:s,href:l,publicHref:u,...c})=>{const h=l?ja(l):void 0;if(h||s){if(r!==void 0||!l){const g=this.buildLocation({to:r,...c}),y=g.maskedLocation??g;l??=y.publicHref,u??=y.publicHref}return ky(this,!h&&u?u:l,c)}return this.buildAndCommitLocation({...c,href:l,to:r,_isNavigate:!0})},this.load=async r=>{this.updateLatestLocation(),r?.action&&(this._scroll.h=r.action.type==="PUSH"||r.action.type==="REPLACE"),await PE(this,r)},this.startViewTransition=r=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document.startViewTransition=="function"){let l;if(typeof s=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),h=typeof s.types=="function"?s.types(iu(u,c)):s.types;if(h===!1)return r();l={update:r,types:h}}else l=r;return document.startViewTransition(l).updateCallbackDone}return r()},this.invalidate=r=>{const s=this._committed,l=r?.filter,u=this._preloads,c=new Set,h=y=>{(!l||l(y))&&c.add(y.id)};s.forEach(h),this._cache.forEach(h),u?.forEach(y=>y.forEach(h)),this._tx?.[3].forEach(h);const p=[];for(const[y,m]of u??[])m.some(b=>c.has(b.id))&&(u.delete(y),p.push(y));const g=y=>{if(c.has(y.id)){const m=this.routesById[y.routeId],b={...y,invalid:!0,...(r?.forcePending||y.status==="error"||y.status==="notFound")&&Ry(m)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,b}return y};this._committed=s.map(g);for(const[y,m]of this._cache)c.has(y)&&(m.invalid=!0,r?.forcePending&&(m.status="pending"));for(const y of c){const m=this._flights?.get(y);this._flights?.delete(y),m&&!m[2]&&p.push(m[1])}for(const y of p)y.abort();return this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.resolveRedirect=r=>{const s=r.options;let l=r.headers.get("Location")||s.href;if(!l){const c=this.buildLocation(s);l=(c.maskedLocation??c).publicHref||"/"}let u;if(Yv.test(l)||(u=ja(l))&&!this.protocolAllowlist.has(u))throw new Error("Redirect blocked: unsafe protocol");if(u==="http:"||u==="https:"){const c=new URL(l);c.pathname.startsWith("//")?l=c.href:qf(c,this.origin)||(l=If(c),u=void 0)}return u&&(s.reloadDocument=!0),s.href=l,r.headers.set("Location",l),r},this.clearCache=r=>{const s=this._cache,l=this._preloads,u=r?.filter,c=[],h=[];for(const[g,y]of s)(!u||u(y))&&(h.push(g),c.push(y));const p=[];for(const[g,y]of l??[])(!u||y.some(u))&&(p.push(g),c.push(...y));for(const g of h)s.delete(g);for(const g of p)l.delete(g);for(const g of c){const y=g._flight;g._flight=void 0,y&&!--y[2]&&(this._flights?.get(g.id)===y&&this._flights.delete(g.id),p.push(y[1]))}for(const g of p)g.abort()},this.loadRouteChunk=Zn,this.preloadRoute=r=>HE(this,r),this.matchRoute=(r,s)=>{const l={...r,to:r.to?vy(r.from||"",r.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:r.params||{}
11,leaveParams:!0},u=this.buildLocation(l),c=this.stores.status.get()==="pending";if(s?.pending&&!c)return!1;const h=s?.pending??!c?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=iE(u.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,h.pathname,this.processedTree);return!p||r.params&&!hn(p.rawParams,r.params,!0)?!1:s?.includeSearch??!0?hn(h.search,u.search,!0)?p.rawParams:!1:p.rawParams},this.getStoreConfig=e,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=QS(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??yE,parseSearch:t.parseSearch??mE,protocolAllowlist:t.protocolAllowlist??KS}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const e=this.options.notFoundRoute;e&&(e.init(99999999999),this.routesById[e.id]!==e&&(e._interpolation=La(!1,e,0)),this.routesById[e.id]=e)}matchRoutesInternal(t,e){const[r,s,l]=this.getMatchedRoutes(t.pathname);let u=r,c=!1;(l?l.path!=="/"&&s["**"]:Sn(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:c=!0);const h=c?jE(this.options.notFoundMode,u):void 0,p=new Array(u.length),g=this._committed,y=(b,_)=>{const S=g[_];return S?.routeId===b.id?S:b===this.options.notFoundRoute?g.find(E=>E.routeId===b.id):void 0};let m;for(let b=0;b<u.length;b++){const _=u[b],S=p[b-1];let E,T,R;{const Z=S?.search??t.search,he=S?._strictSearch??void 0;try{const re=Ml(_.options.validateSearch,{...Z})??void 0;E={...Z,...re},T={...he,...re}}catch(re){let M=re;if(re instanceof Kl||(M=new Kl(re.message,{cause:re})),e?.throwOnError)throw M;E=Z,T={},R=M}}let C="",D="";try{C=_.options.loaderDeps?.({search:E})??"",D=C&&JSON.stringify(C)||""}catch(Z){if(e?.throwOnError)throw Z;R??=Z}const H=Nl(),F=_._interpolation?by(_.fullPath,_._interpolation,s,this.pathParamsDecoder,H):_.fullPath,B=_.id+F+D,j=y(_,b),V=this._cache.get(B)??(j?.id===B?j:void 0);m=V?._strictParams??Object.assign(H,m);let W;if(!V)try{Cy(_,m)}catch(Z){if(gr(Z)||Gv(Z)?W=Z:W=new kE(Z.message,{cause:Z}),e?.throwOnError)throw W}const se=j?"stay":"enter";let K;if(V)K={...V,cause:se,search:rs(j?j.search:V.search,E),_strictSearch:T,searchError:R};else{const Z=Ry(_)?"pending":"success";K={id:B,ssr:_.options.ssr,index:b,routeId:_.id,params:j?.params??m,_strictParams:m,pathname:F,updatedAt:Date.now(),search:j?rs(j.search,E):E,_strictSearch:T,searchError:R,status:Z,isFetching:!1,error:void 0,paramsError:W,context:{},abortController:e?._controller??new AbortController,cause:se,loaderDeps:j?Li(j.loaderDeps,C):C,invalid:!1,preload:!1,staticData:_.options.staticData||{},fullPath:_.fullPath}}const G=h===_.id;K._notFound&&!G&&(K.error=void 0),K._notFound=G,p[b]=K}for(let b=0;b<p.length;b++){const _=p[b];_.params=_.cause==="stay"?rs(_.params,m):m,e?._controller&&(_.context={})}return p}matchRoutesLightweight(t){const e=Mi(this.stores.ids.get()),r=e?this.stores.byRoute.get(e).get():void 0,s=r?.id,l=this.lightweightCache.get(t);if(l&&l[0]===s)return l[1];const[u,c]=this.getMatchedRoutes(t.pathname),h=Mi(u),p={...t.search};for(const b of u)try{Object.assign(p,Ml(b.options.validateSearch,p))}catch{}const g=r&&r.routeId===h.id&&r.pathname===t.pathname;let y;if(g)y=r.params;else{const b=c;for(const _ of u)try{Cy(_,b)}catch{}y=b}const m=[u,h.fullPath,p,y];return this.lightweightCache.set(t,[s,m]),m}};async function ky(t,e,{replace:r,ignoreBlocker:s}){if(!Jv(e,t.protocolAllowlist)){if(!s){const l=t.history._getBlockers();for(const u of l)if(u?.blockerFn&&await u.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:r?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(e),r?window.location.replace(e):window.location.href=e}}var Kl=class extends Error{},kE=class extends Error{};function Ml(t,e){if(t==null)return{};if("~standard"in t){const r=t["~standard"].validate(e);if(r instanceof Promise)throw new Kl("Async validation not supported");if(r.issues)throw new Kl(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function $f(t,e){if(t===void 0||t===!0)return e;const r=Object.create(null);return t===!1||t===null?r:typeof t=="function"?(Object.assign(r,e),Object.assign(r,t(r))):Object.assign(r,e,t)}function CE(t,e){return typeof t=="function"?!0:!e||t===!1||t===null?!1:t===void 0||t===!0||e.some(r=>typeof r!="string"&&!Lh.call(t,r[1]))}const Kf=Object.freeze({});function DE(t,e){const r=[];for(let s=0;s<t.length;s++){const l=t[s].options;if("search"in l)l.search?.middlewares&&r.push(...l.search.middlewares);else if(l.preSearchFilters||l.postSearchFilters){const c=({search:h,next:p})=>{const g=p(l.preSearchFilters?l.preSearchFilters.reduce((y,m)=>m(y),h):h);return l.postSearchFilters?l.postSearchFilters.reduce((y,m)=>m(y),g):g};r.push(c)}const u=l.validateSearch;if(e&&u){const c=({search:h,next:p,meta:g})=>{const y=p(h);try{const m=Ml(u,y);if(g&&m)for(const b in m)b in y||(g.defaulted||=new Map).set(b,m[b]);return{...y,...m}}catch{}return y};r.push(c)}}return r}function xE(t,e,r){const s=(l,u,c)=>{if(l>=t.length){if(!r.search)return{};if(r.search===!0)return u;const p=Vv(r.search,u);return c&&(c.explicit=p),p}const h=(p,g)=>{if(g){const y=c||{};return{search:s(l+1,p,y),meta:y}}return s(l+1,p,c)};return t[l]({search:u,next:h,meta:c})};return s(0,e)}function jE(t,e){if(t!=="root"){let r;for(let s=e.length-1;s>=0;s--){const l=e[s];if(l.options.notFoundComponent)return l.id;r||=l.children&&l.id}if(r)return r}return _s}function Cy(t,e){const r=t.options.params?.parse??t.options.parseParams;r&&Object.assign(e,r(e))}function ch(t,e){return t.options[e]?.preload?.()}function NE(t,e){const r=ch(t,"component");let s=ch(t,"pendingComponent");return e&&(s?s=s.then(e):e()),r&&s?Promise.all([r,s]).then(()=>{}):r??s}function Zn(t,e,r){const s=()=>e===!1?void 0:e?ch(t,e):NE(t,r),l=t._lazy;if(l)return l===!0?s():l.then(s);if(!t.lazyFn)return s();const u=t.lazyFn().then(c=>{{const{id:h,...p}=c.options;Object.assign(t.options,p),t._lazy=!0}},c=>{throw t._lazy=void 0,c});return t._lazy=u,u.then(s)}function zh(t){const e=t.findIndex(r=>r.status!=="success"||r._notFound)+1;return e&&e<t.length?t.slice(0,e):t}function l0(t){let e=t.length;for(let r=0;r<e;r++){const s=t[r];
11if(s._assetEnd!==void 0){e=Math.min(e,Math.max(r+1,s._assetEnd));continue}if(s.status!=="success"||s._notFound){e=r+1;break}}return e<t.length?t.slice(0,e):t}const En=0,Wn=1,ru=2,_t=3,zi=[4];function Ua(t){return typeof t[0]=="number"}function ei(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((r,s)=>{const l=()=>s(e);e.addEventListener("abort",l,{once:!0}),Promise.resolve(t).then(r,s).then(()=>e.removeEventListener("abort",l))})}function fn(t,e){return t.routesById[e.routeId]}function Ma(t,e,r){return Gv(t)?[_t,t]:gr(t)?(t.routeId||=r,[ru,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[Wn,t]):[En,t]}function Bh(t,e){let r=Ma(e,!0,t.id);if(r[0]!==Wn)return r;try{t.options.onError?.(r[1])}catch(s){r=Ma(s,!0,t.id)}return r}function Oa(t,e,r,s,l){return l[0].signal.aborted?zi:qh(t,e,r,Bh(r,s),l)}async function LE(t,e,r,s,l,u){const[c,h]=e,p=r[0].signal,g=!!r[3];for(let y=r[6]??0;y<s;y++){const m=h[y],b=fn(t,m);m.abortController=r[0];const _=h[y-1]?.context??t.options.context??{},S={params:m.params,location:c,navigate:C=>t.navigate({...C,_fromLocation:c}),buildLocation:t.buildLocation,cause:g?"preload":m.cause,abortController:r[0],preload:g,matches:h,routeId:b.id};try{const C=m._ctx||=b.options.context?b.options.context({...S,deps:m.loaderDeps,context:_})||{}:void 0;m.context={..._,...C}}catch(C){return Xn(t,m),[y,Oa(t,e,b,C,r)]}if(p.aborted)return[y,zi];const E=m.paramsError??m.searchError;if(E!==void 0)return Xn(t,m),[y,Oa(t,e,b,E,r)];const T=b.options.beforeLoad;if(!T)continue;const R=m.status;y>=u&&(m.status="pending",r[7]?.());try{za(t,m,"beforeLoad",r[0]);const C=T({...S,search:m.search,context:m.context,...t.options.additionalContext}),D=await(typeof C?.then=="function"?ei(C,p):C);if(p.aborted)return[y,zi];const H=qh(t,e,b,Ma(D,!1,b.id),r);if(H[0]!==En)return Xn(t,m),[y,H];m.context={...m.context,...D}}catch(C){return Xn(t,m),[y,Oa(t,e,b,C,r)]}finally{m.status=R,za(t,m,!1,r[0])}}l()}function Ph(t,e,r){if(!(!r||--r[2])){if(t._flights?.get(e.id)===r){const s=t._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(e)&&s[3].some(l=>l.id===e.id)&&s[3].some(l=>l.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return r[1]}}function Xn(t,e){const r=e._flight;e._flight=void 0,Ph(t,e,r)?.abort()}function yt(t,e,r,s){const l=[];for(const u of e)if(!r?.includes(u)){const c=u._flight;if(u._flight=void 0,s&&c?.[2]===1&&t._flights?.get(u.id)===c&&r?.some(h=>h.id===u.id))c[2]=0;else{const h=Ph(t,u,c);h&&l.push(h)}}for(const u of l)u.abort()}function Hh(t){for(const e of t){const r=e._flight;r&&r[2]++}}function za(t,e,r,s){if(e.isFetching=r,s&&t._tx?.[0]!==s)return;const l=t.stores.byRoute.get(e.routeId),u=l?.get();u?.id===e.id&&l.set({...u,isFetching:r})}function u0(t,e,r,s,l,u,c){const h=e[0];return{params:r.params,location:h,navigate:p=>t.navigate({...p,_fromLocation:h}),cause:c?"preload":r.cause,abortController:l,preload:c,deps:r.loaderDeps,parentMatchPromise:u,context:r.context,route:s,...t.options.additionalContext}}async function Dy(t,e,r,s,l,u,c){const h=c[0],p=h.signal;if(p.aborted)return zi;if(!l)return[En,void 0];let g=r._flight;za(t,r,"loader",h);try{if(!g){const y=new AbortController;g=[Promise.resolve().then(()=>l(u0(t,e,r,s,y,u,!!c[3]))).then(m=>Ma(m,!1,s.id),m=>Ma(m,!0,s.id)).then(m=>(m[0]!==En&&t._flights?.get(r.id)===g&&(t._flights.delete(r.id),g[2]||y.abort()),m[0]===Wn&&g[2]?Bh(s,m[1]):m)),y,1],(t._flights??=new Map).set(r.id,g)}return r._flight=g,r.abortController=g[1],qh(t,e,s,await ei(g[0],p),c)}catch(y){if(y!==p||!p.aborted)throw y;return Xn(t,r),zi}finally{za(t,r,!1,h)}}function xy(t,e,r){e[0]!==_t&&(t.status="success",t.error=void 0,e[0]===En?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=r):t.invali
11d=!0)}function c0(t,e,r){const s=t._cache.get(e.id);if(s!==r||t._committed.some(u=>u.id===e.id&&u._flight===e._flight))return;const l={...e,_notFound:void 0,context:{}};l._flight&&l._flight[2]++,t._cache.set(e.id,l),s&&Xn(t,s)}function jy(t,e){return e[0]===Wn||e[0]===ru?{...t,status:e[0]===Wn?"error":"notFound",error:e[1],_flight:void 0}:t}function UE(t,e,r,s,l,u,c){const h=e[1][r],p=fn(t,h),g=!!u[3],y=t._cache.get(h.id);let m,b=!1,_;try{if(h.status==="success"&&(m=p.options.shouldReload,typeof m=="function"&&(m=m(u0(t,e,h,p,u[0],l,g))),u[0].signal.aborted&&(_=zi)),!_)if(h.status!=="success")b=!0;else{const G=g||h.preload?p.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:p.options.staleTime??t.options.defaultStaleTime??0;b=!!(h.invalid||m||m===void 0&&Date.now()-h.updatedAt>=G&&(u[5]||h.cause==="enter"||u[2].some(Z=>Z.routeId===h.routeId&&Z.id!==h.id)))}}catch(G){h.invalid=!0,Xn(t,h),_=Oa(t,e,p,G,u)}const S=p.options.loader,E=typeof S=="function",T=E?S:S?.handler,R=!g||p.options.preload!==!1;let C=R&&S?t._flights?.get(h.id):void 0;C===h._flight||_?C=void 0:C&&!b&&!g&&m===void 0?b=!0:b||(C=void 0);const D=!!(S&&b&&h.status==="success"&&!g&&!u[4]&&((E?void 0:S.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),H=b&&R,F=H&&!D&&(h.status!=="success"||!!S),B=r>=c?u[7]:void 0,j=p.lazyFn&&p._lazy!==!0?B:void 0;if(H&&!S&&(h.invalid=!1,h.updatedAt=Date.now()),C&&C[2]++,F){const G=h._flight;h._flight=C,Ph(t,h,G)?.abort(),r>=c&&(h.status="pending"),B?.()}H||(h.isFetching=!1);const V=!_&&F?Dy(t,e,h,p,T,l,u).then(G=>(xy(h,G,g),G[0]===En&&(S&&!u[0].signal.aborted&&c0(t,h,y),r>=c&&(h.status="pending")),G)):Promise.resolve(_??[En,h.loaderData]),W=(async()=>{try{const Z=Zn(p,void 0,j);Z&&await ei(Z,u[0].signal)}catch(Z){if(!e[1].some((he,re)=>re<=r&&(he.status==="error"||he.status==="notFound"||he._notFound)))return[r,Oa(t,e,p,Z,u)]}const G=await V;F&&G[0]===En&&h.status==="pending"&&!u[0].signal.aborted&&(h.status="success",B?.())})();if(s.push([r,V,W]),!D)return V.then(G=>jy(h,G));const se={...h,status:"pending",preload:!1,_flight:C};h.invalid=!1,h.isFetching="loader";const K=Dy(t,e,se,p,T,l,u).then(G=>(h.isFetching=!1,xy(se,G,!1),G));return(e[2]??=[]).push([r,K,W,se]),K.then(G=>jy(se,G))}async function fh(t,e,r,s,l=0){const u=r?.[1][1];let c=u?.routeId?e.findIndex(h=>h.routeId===u.routeId):r?.[0]??e.length-1;c<0&&(c=0);for(let h=c;h>=0;h--){const p=fn(t,e[h]);try{const g=Zn(p,!1);g&&await ei(g,s)}catch(g){if(g===s&&s.aborted)throw g}if(p.options.notFoundComponent)return h}return u?.routeId?c:l}function pr(t,e){e[2]&&(yt(t,e[2].map(r=>r[3])),e[2]=void 0)}async function Ny(t,e,r,s){let l;try{await Promise.all(t.map(u=>u[1].then(async c=>{const h=u[0];if(!(s&&h>=await s)){if(c[0]>=_t)throw[h,c];!l&&c[0]!==En&&(l=[h,c],await Promise.all((r??[]).map(p=>{if(!(p[0]<=h))return p[1].then(g=>{if(g[0]===_t)throw[p[0],g]})})))}})))}catch(u){return u}return e??l}function qh(t,e,r,s,l,u){for(;s[0]===_t;){const c=s[1],h=c.options;try{if((h.href||c.headers.has("Location"))&&(t.resolveRedirect(c),h.reloadDocument)||(h.reloadDocument?l[3]:l[1]>=20))return s;const p=t.buildLocation({...h,_fromLocation:e[0],_includeValidateSearch:!0}),g=p.maskedLocation??p;if(g.external){const y=c.clone();return y.options={...h},y.headers.set("Location",g.publicHref),t.resolveRedirect(y),l[3]?[_t,y]:[_t,y,g]}return[_t,c,p]}catch(p){s=u?[Wn,p]:Bh(r,p),u=!0}}return s}async function f0(t,e,r,s,l,u){const c=e[1];let h=await l,p=!1;const g=c.findIndex(_=>_._notFound),y=_=>_[1][0]===ru?fh(t,c,_,s.signal):_[0];let m=g<0?c.length:g;if((h?.[1][0]??0)>=_t)m=0;else if(h){m=h[2]??=await y(h);for(const _ of r){if(_[0]>=m)break;const S=await _[1];if(S[0]!==En&&S[0]<_t&&!("loaderData"in c[_[0]])){h=[_[0],S],m=h[2]=await y(h);break}}}for(const _ of r){if(_[0]>=m)break;const S=await _[2];if(S){h=S;break}}if((h?.[1][0]??0)>=_t){const _=h[1];if(_[0]!==_t||_[1].options.reloadDocument||_[2])return pr(t,e),_;p=!0,h=[0,[Wn,new Error("Too many redirects")]]}const b=h?h[2]??await y(h):g;if(b>=0){const _=h?.[1],S=_?.[0],E=c[b],T=_?.[1],R=()=>{_&&(E._notFound=void 0,S===Wn?E.status="error":(T.routeId=E.routeId,E.routeId===t.routeTree.id?(E.status="success",E._notFound=!0):E.status="notFound"),E.error=T,E.isFetching=!1)};R(),_||u?.();const C=fn(t,E);try{await ei(_?Promise.resolve().then(()=>Zn(C,S===Wn?"errorComponent":"notFoundComponent")):Promise.all([Zn(C),Zn(C,"notFoundComponent")]),s.signal)}catch(D){if(D===s.signal&&s.signal.aborted)return pr(t,e),zi}_?p&&(s.abort(),await Promise.all([...r.map(D=>D[1]),...r.map(D=>D[2]),...(e[2]??[]).map(D=>D[1])]),pr(t,e),yt(t,c),R()):E.status="success"}return e}async function Ih(t,e,r,s=0,l=e[1].length){const u=e[1];for(let c=s;c<l;c++){const h=u[c],p=fn(t,h).options;if(p.head||p.scripts)try{const g={ssr:t.options.ssr,matches:u,match:h,params:h.params,loaderData:h.loaderData},[y,m]=await ei(Promise.all([p.head?.(g),p.scripts?.(g)]),r);h.meta=y?.meta,h.links=y?.links,h.headScripts=y?.scripts,h.styles=y?.styles,h.scripts=m}catch(g){if(g===r&&r.aborted)break;console.error(g)}if(h.status!=="success"||h._notFound)break}return e}async function h0(t,e,r,s){const l=[e,r],u=s[0].signal;let c;try{const h=t.stores.matches.get();let p=r.findIndex(R=>R._notFound);if(t.options.notFoundMode!=="root"&&p>=0){const R=await fh(t,r,void 0,u,p);r[p]._notFound=void 0,r[R]._notFound=!0,p=R}let g=p<0?r.length:p+1,y=0;for(;y<g&&y!==p;){const R=r[y],C=s[2][y],D=h[y];if(C?.id!==R.id||C.status!=="success"||R.preload||D?.id!==R.id||D.status!=="success"||(y++,C._notFound||D._notFound))break}const m=[],b=s[6]??0;let _=b?Promise.resolve(r[b-1]):void 0;const S=()=>{for(let R=b;R<g&&!u.aborted;R++)_=UE(t,l,R,m,_,s,y)},E=await LE(t,l,s,g,S,y);if(E){if(s[4]=!0,g=E[0],E[1][0]===ru){const R=await fh(t,r,E,u);E[2]=R,g=Math.min(g,R+1)}else E[1][0]>=_t&&(g=0);
11S()}if(!u.aborted&&!s[3]){const R=[];for(const[C,D]of t._flights??[])D[2]||(t._flights.delete(C),R.push(D[1]));for(const C of R)C.abort()}const T=f0(t,l,m,s[0],Ny(m,E,l[2]),s[7]);l[2]?.length&&(l[3]=Ny(l[2],void 0,void 0,T.then(R=>Ua(R)?0:zh(r).length,()=>0))),c=await T}catch(h){if(pr(t,l),h===u&&u.aborted)return zi;throw h}return Ua(c)?c:Ih(t,c,u,s[6]===r.length?s[6]:0)}function hh(t,e){if(t._tx!==e)return;const r=e[3],s=t.stores.matches.get();let l=t._pending;for(let u=0;u<r.length;u++){const c=r[u],h=c.status==="success"&&!c._notFound,p=s[u]?.id===c.id&&s[u]?.status==="pending";if(h&&!p)continue;const g=fn(t,c),y=h||c.invalid?0:g.options.pendingMs??t.options.defaultPendingMs,m=g.options.pendingComponent??t.options.defaultPendingComponent;if(!m||typeof y!="number"||y===1/0){l&&(l[0]=e,l[2]=0,l[4]=!0);return}const b=g.options.pendingMinMs??t.options.defaultPendingMinMs??0;let _=!1;if(l?.[1]===c.id?(_=l[0]!==e,l[0]=e):(clearTimeout(l?.[3]),t._pending=l=void 0),l||(t._pending=l=[e,c.id,p?Date.now()+b:e[4]+y,void 0,p||void 0,m]),l[4]&&!_&&l[5]===m)return;if(l[5]=m,!l[4]){clearTimeout(l[3]);const T=l[2]-Date.now();if(T>0){l[3]=setTimeout(()=>hh(t,e),T);return}l[2]=0}const S=r.map(T=>({...T,_flight:void 0}));S[u].status="pending";const E=l[4]=t.startTransition(()=>t.stores.setMatches(S),S).then(T=>(T&&t._pending===l&&l[4]===E&&!l[2]&&(l[2]=Date.now()+b),T));return}}function _a(t,e){const r=t._pending;(t._tx===e||!t._tx?.[3].some(s=>s.id===r?.[1]))&&(clearTimeout(r?.[3]),t._pending=void 0)}async function Ly(t,e){const r=t._pending;if(!r)return;clearTimeout(r[3]);const s=r[2]-Date.now();if(!r[4]||s<=0||!zh(e[3]).some(u=>u.id===r[1]))return;let l;try{await ei(new Promise(u=>{l=setTimeout(u,s)}),e[0].signal)}catch{}clearTimeout(l)}function d0(t,e){t._committed=e,t.stores.setMatches(e)}function ME(t,e,r,s){const l=t._committed,u=t._lifecycleEnd,c=t._cache;for(const y of r)y.preload=!1,s&&(y._assetEnd=void 0);const h=zh(r).length,p=new Map;{const y=Date.now(),m=new Set;for(let b=0;b<r.length;b++){const _=r[b];(b<h||_.status==="success")&&m.add(_.id)}for(const b of[...l,...c.values()]){if(b.status!=="success"||m.has(b.id))continue;const _=fn(t,b);!_.options.loader||y-b.updatedAt>=(b.preload?_.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:_.options.gcTime??t.options.defaultGcTime??3e5)||p.set(b.id,c.get(b.id)===b?b:{...b,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=p;const g=t._lifecycleEnd=o0(r);d0(t,r),yt(t,[...c.values(),...l].filter(y=>y._flight&&p.get(y.id)!==y),r),RE(t,l,r,u,g,e)}async function bl(t,e){let r=t._tx;for(;r&&r!==e;)e=r,await r[5],r=t._tx}function p0(t,e,r){const s=r[1].options,l=r[2];if(!l)return t.navigate({...s,replace:!0,ignoreBlocker:!0});if(s.reloadDocument)return t.navigate({href:(l.maskedLocation??l).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});l._redirects=e[1]+1,t._pendingLocation=l;const u=t.commitLocation({...l,viewTransition:s.viewTransition,replace:!0,resetScroll:s.resetScroll,hashScrollIntoView:s.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===l&&(t._pendingLocation=void 0)}),u}async function zE(t,e,r,s,l){const u=r.map(p=>({...p}));Hh(u);for(const p of s)Xn(t,u[p[0]]),u[p[0]]=p[3];const c=[e[2],u];let h;try{h=await f0(t,c,s,e[0],l)}catch(p){throw yt(t,u),p}if(Ua(h)){yt(t,u),h[0]===_t&&t._tx===e&&t._committed===r&&await p0(t,e,h);return}if(await Ih(t,h,e[0].signal),t._tx!==e||t._committed!==r){yt(t,u);return}for(const p of u){const g=t._cache.get(p.id);g?._flight&&g._flight===p._flight&&(t._cache.delete(p.id),Xn(t,g))}d0(t,u),yt(t,r,u)}async function BE(t,e,r,s,l,u){const c=await h0(t,e[2],e[3],[e[0],e[1],t._committed,void 0,l,r,u,s]);if(Ua(c)){const m=c[0]===_t&&t._tx===e;if((!m||c[1].options.reloadDocument)&&_a(t,e),yt(t,e[3]),e[3]=[],!m)return;if(t._tx!==e){_a(t,e);return}await p0(t,e,c);return}const h=c[1];if(t._tx===e&&await Ly(t,e),t._tx!==e){_a(t,e),yt(t,h),pr(t,c);return}const p=e[2],g=iu(p,t.stores.resolvedLocation.get()),y=c[2];await t.startViewTransition(async()=>{if(t._tx===e&&await Ly(t,e),t._tx!==e){_a(t,e),yt(t,h),pr(t,c);return}const m=()=>{_a(t,e),ME(t,e,h,u),t._tx===e&&(t.emit({type:"onLoad",...g}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...g}))},b=await t.startTransition(m,h);if(t._tx!==e){pr(t,c);return}y?.length&&zE(t,e,h,y,c[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(p),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...g}),b&&t._tx===e&&t.emit({type:"onRendered",...g})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function PE(t,e){const r=t._tx,s=t.stores.resolvedLocation.get(),l=s??t.stores.location.get(),u=t.latestLocation,c=t._pendingLocation,h=c?.href===u.href?c._redirects??0:0,p=t._handoff,g=p?.[0](),y=new AbortController,m=t._preflight;if(t._preflight=y,g||p?.[1](),m?.abort(),!y.signal.aborted){const H=iu(u,s);t.emit({type:"onBeforeNavigate",...H}),y.signal.aborted||t.emit({type:"onBeforeLoad",...H})}if(y.signal.aborted){await bl(t,r);return}const b=l.href===u.href;let _=y;const S=t.matchRoutes(u,{_controller:y});Hh(S);const E=g?p[1](S):void 0;if(E?_=g:g?.abort(),y.signal.aborted){yt(t,S),await bl(t,r);return}t._preflight=void 0;let T;const R=()=>BE(t,D,b,()=>hh(t,D),e?.sync,E),C=e?.sync?new Promise(H=>T=H):Promise.resolve().then(R),D=[_,h,u,S,Date.now(),C.then(()=>bl(t,D))];if(t._tx=D,r){for(const H of t.stores.matches.get()){if(t._tx!==D)break;H.isFetching&&za(t,H,!1)}r[0].abort(),yt(t,r[3],D[3],!0)}if(t._tx!==D){yt(t,D[3]),D[3]=[],T?.(),await bl(t,D);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(u)}),(E||!t._committed.length&&S[0]?.status!=="success"&&!S.some(H=>H._notFound))&&hh(t,D),T?.(R()),await D[5]}async function HE(t,e){let r=t.buildLocation(e);for(let s=0;;s++){const l=t._committed,u=new AbortController;let c,h,p;try{try{c=t.matchRoutes(r,{_controller:u}),Hh(c),h=(t._preloads??=new Map).set(u,c),p=await h0(t,r,c,[u,s,l,!0])}finally{h&&(h=h.delete(u),yt(t,c)),u.abort()}if(!Ua(p))return p[1];if(!h||p.length<3)return;r=p[2]}catch(g){gr(g)||console.error(g);return}}}async function qE(t){const e=window.$_TSR,r=t.options.serializationAdapters;r?.length&&(e.t=new Map(r.map(K=>[K.key,K.fromSerializable])),e.buffer.forEach(K=>K())),e.initialized=!0;const s=e.router;t.ssr={manifest:s.manifest},t.options.ssr={nonce:document.querySelector('meta[property="csp-nonce"]')?.content};const l=s.matches,u=new AbortController,c=t._preflight;t._preflight=u,c?.abort();const h=()=>t._preflight===u;let p,g,y,m;try{if(await ei(t.options.hydrate?.(s.dehydratedData),u.signal),!h())return;const K=t.history.location;y=K.href,m=K.state,t.updateLatestLocation(),p=t.latestLocation,t.stores.location.set(p),g=t.matchRoutes(p,{_controller:u})}catch(K){if(h()&&(t._preflight=void 0),u.abort(K),K!==u.signal)throw K}if(!h())return;const b=[];let _,S=0;const E=K=>{S=Math.min(S,K+1);
11const G=b.splice(K);for(const Z of G)fn(t,Z).options.loader&&(Z.status==="success"||!Z.invalid&&"loaderData"in Z)&&c0(t,{...Z,status:"success",error:void 0,preload:!0},t._cache.get(Z.id));yt(t,G)},T=l.length>g.length?g.findIndex(K=>K._notFound)+1:l.length;let R=!1;for(let K=0;K<T;K++){const G=g[K],Z=l[K];if(typeof Z.i!="string"||HS(Z.i)!==G.id){_??=K;break}S=K+1;const he=fn(t,G);if(("l"in Z||Z.s==="success"&&Z.e===void 0&&he.options.loader)&&(G.loaderData=Z.l),G.status=Z.s,G.ssr=Z.ssr,he.options.ssr=G.ssr,G.updatedAt=Z.u,G.error=Z.e,G._notFound||=Z.g,G.status==="error"||G.status==="notFound"||G._notFound){R=!0,b.push(G),(G.ssr===!1||G.ssr==="data-only")&&(_??=K);break}if(G.status==="pending"){_??=K;break}b.push(G),G.ssr==="data-only"&&(_??=K)}!R&&b.length===T&&T<g.length&&(_=T);const C=b.map(async K=>{try{const G=fn(t,K);return await(K._notFound?Promise.all([Zn(G),Zn(G,"notFoundComponent")]):Zn(G,K.status==="error"?"errorComponent":K.status==="notFound"?"notFoundComponent":void 0)),!0}catch{return!1}});let D=0;try{for(;D<C.length&&await ei(C[D],u.signal);)D++}catch{return}if(!h())return;D<b.length&&E(D);const H=Math.max(_===b.length?b.length+1:b.length,D<C.length?D:S);for(let K=0;K<H;K++){const G=g[K],Z=fn(t,G),he=g[K-1]?.context??t.options.context??{};let re;if(Z.options.context){try{re=G._ctx=Z.options.context({deps:G.loaderDeps,params:G.params,context:he,location:p,navigate:M=>t.navigate({...M,_fromLocation:p}),buildLocation:t.buildLocation,cause:G.cause,abortController:u,preload:!1,matches:g,routeId:Z.id})||{}}catch{if(!h())return;if(G.status!=="error"&&G.status!=="notFound"&&!G._notFound){_=Math.min(_??K,K),E(K);break}}if(!h())return}G.context={...he,...re,...b[K]&&l[K].b}}if(await Ih(t,[p,g],u.signal,0,S),!h())return;const F=_!==void 0||b.length<T,B=R&&b.length===T?g:b;let j=F?g:B,V;if(F&&_!==void 0){const K=j[_];V=K.ssr==="data-only"&&S>_+1?S:void 0,j=j.slice(),j[_]={...K,status:"pending",ssr:K.ssr==="data-only"?"data-only":!1,_assetEnd:V}}const W=()=>{const K=t.history.location;return F&&!t._tx&&K.href===y&&K.state===m&&t._committed===B&&B.length&&!u.signal.aborted?u:void 0},se=[W,K=>{if(t._handoff!==se)return;t._handoff=void 0;const G=B.length;if(!K||!W()||B.some((re,M)=>re.id!==K[M]?.id)){u.abort();return}let Z=V;if(Z!==void 0){for(let re=G;re<Z;re++)if(g[re]?.id!==K[re]?.id){Z=re>_+1?re:void 0;break}}const he=B.map(re=>({...re}));Z!==void 0&&(he[_]._assetEnd=Z),yt(t,K.splice(0,G,...he));for(let re=G;re<K.length;re++){const M=K[re],Q=g[re];Q?.id===M.id&&Q._ctx&&(M._ctx=Q._ctx),M.abortController=u}return G}];t._committed=B,t._lifecycleEnd=o0(B),t._handoff=se,t._preflight=void 0,t.batch(()=>{t.stores.setMatches(j),t.stores.status.set("idle"),F||t.stores.resolvedLocation.set(t.stores.location.get())})}const ti=Symbol.asyncIterator,g0=Symbol.hasInstance,ws=Symbol.isConcatSpreadable,ni=Symbol.iterator,m0=Symbol.match,y0=Symbol.matchAll,v0=Symbol.replace,b0=Symbol.search,_0=Symbol.species,w0=Symbol.split,S0=Symbol.toPrimitive,Ss=Symbol.toStringTag,E0=Symbol.unscopables,T0={[ti]:0,[g0]:1,[ws]:2,[ni]:3,[m0]:4,[y0]:5,[v0]:6,[b0]:7,[_0]:8,[w0]:9,[S0]:10,[Ss]:11,[E0]:12},IE={0:ti,1:g0,2:ws,3:ni,4:m0,5:y0,6:v0,7:b0,8:_0,9:w0,10:S0,11:Ss,12:E0},$E={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},KE={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},GE={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Te(t,e,r,s,l,u,c,h,p,g,y,m){return{t,i:e,s:r,c:s,m:l,p:u,e:c,a:h,f:p,b:g,o:y,l:m}}function Pi(t){return Te(2,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const A0=Pi(2),R0=Pi(3),VE=Pi(1),FE=Pi(0),YE=Pi(4),JE=Pi(5),QE=Pi(6),XE=Pi(7),ZE=64,WE=/[\x00-\x07\x0b\x0e-\x1f<\u2028\u2029\ud800-\udfff]/;function eT(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 12`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function mr(t){if(t.length>=ZE&&!WE.test(t))return JSON.stringify(t).slice(1,-1);let e="",r=0,s;for(let l=0,u=t.length;l<u;l++)s=eT(t[l]),s&&(e+=t.slice(r,l)+s,r=l+1);return r===0?e=t:e+=t.slice(r),e}function tT(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 13`;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 t}}function Hi(t){return typeof t=="string"&&!t.includes("\\")?t:t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,tT)}
13const nT={parsing:1,serialization:2,deserialization:3};function iT(t){return`Seroval Error (step: ${nT[t]})`}const rT=(t,e)=>iT(t);var O0=class extends Error{constructor(t,e){super(rT(t)),this.cause=e}},Uy=class extends O0{constructor(t){super("parsing",t)}},sT=class extends O0{constructor(t){super("deserialization",t)}};function ii(t){return`Seroval Error (specific: ${t})`}var yr=class extends Error{constructor(t){super(ii(1)),this.value=t}},$h=class extends Error{constructor(t){super(ii(2))}},aT=class extends Error{constructor(t){super(ii(3))}},su=class extends Error{constructor(t){super(ii(4))}},oT=class extends Error{constructor(t){super(ii(5)),this.value=t}},lT=class extends Error{constructor(t){super(ii(6))}},uT=class extends Error{constructor(t){super(ii(7))}},ut=class extends Error{constructor(t){super(ii(8))}},k0=class extends Error{constructor(t){super(ii(9))}};const _l="__SEROVAL_REFS__",C0=new Map,gs=new Map;function D0(t){return C0.has(t)}function cT(t){return gs.has(t)}function fT(t){if(D0(t))return C0.get(t);throw new oT(t)}function hT(t){if(cT(t))return gs.get(t);throw new lT(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,_l,{value:gs,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,_l,{value:gs,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,_l,{value:gs,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,_l,{value:gs,configurable:!0,writable:!1,enumerable:!1});function Kh(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function dT(t){const e=KE[Kh(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function x0(t,e){let r=dT(t);const s=Object.getOwnPropertyNames(t);for(let l=0,u=s.length,c;l<u;l++)c=s[l],c!=="name"&&c!=="message"&&(c==="stack"?e&4&&(r=r||{},r[c]=t[c]):(r=r||{},r[c]=t[c]));return r}function j0(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function pT(t){switch(t){case Number.POSITIVE_INFINITY:return JE;case Number.NEGATIVE_INFINITY:return QE}return t!==t?XE:Object.is(t,-0)?YE:Te(0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function N0(t){return Te(1,void 0,mr(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function gT(t){return Te(3,void 0,""+t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function mT(t){return Te(4,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function yT(t,e){const r=e.valueOf();return Te(5,t,r!==r?"":e.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Ci(t,e,r){return Te(36,t,r.toString(),e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function vT(t,e){return Te(6,t,void 0,mr(e.source),e.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function bT(t,e){return Te(17,t,T0[e],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function _T(t,e){return Te(18,t,mr(fT(e)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function wT(t,e,r){return Te(25,t,r,mr(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ST(t,e,r){return Te(9,t,void 0,void 0,void 0,void 0,void 0,r,void 0,void 0,j0(e),void 0)}function ET(t,e){return Te(21,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}const Gh=1e6;function TT(t,e,r){if(e.length>Gh)throw new yr(e);return Te(15,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.length)}function AT(t,e,r){if(e.length>Gh)throw new yr(e);return Te(16,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.length)}function RT(t,e,r){if(e.byteLength>Gh)throw new yr(e);return Te(20,t,void 0,void 0,void 0,void 0,void 0,void 0,r,e.byteOffset,void 0,e.byteLength)}function OT(t,e,r){return Te(13,t,Kh(e),void 0,mr(e.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function kT(t,e,r){return Te(14,t,Kh(e),void 0,mr(e.message),r,void 0,void 0,void 0,void 0,void 0,void 0)}function CT(t,e){return Te(7,t,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,void 0)}function DT(t,e){return Te(28,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function xT(t,e){return Te(30,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function jT(t,e,r){return Te(31,t,void 0,void 0,void 0,void 0,void 0,r,e,void 0,void 0,void 0)}function NT(t,e){return Te(32,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function LT(t,e){return Te(33,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function UT(t,e){return Te(34,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function MT(t,e,r,s){return Te(35,t,r,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,s)}var zT=class{constructor(t,e){this.value=t,this.replacement=e}};const Vh=()=>{const t={p:0,s:0,f:0};return t.p=new Promise((e,r)=>{t.s=e,t.f=r}),t},BT=t=>e=>()=>{let r=0;const s={[t](){return s},next(){if(r>e.d)return{done:!0,value:void 0};const l=r++,u=e.v[l];if(l===e.t)throw u;return{done:l===e.d,value:u}}};return s},PT=(t,e)=>r=>()=>{let s=0,l=-1,u=!1;const c=[],h=[],p={finalize(y=0,m=h.length){for(;y<m;y++)h[y].s({done:!0,value:void 0})}};r.on({next(y){const m=h.shift();m&&m.s({done:!1,value:y}),c.push(y)},throw(y){const m=h.shift();m&&m.f(y),p.finalize(),l=c.length,u=!0,c.push(y)},return(y){const m=h.shift();m&&m.s({done:!0,value:y}),p.finalize(),l=c.length,c.push(y)}});const g={[t](){return g},next(){if(l===-1){const b=s++;if(b>=c.length){const _=e();return h.push(_),_.p}return{done:!1,value:c[b]}}if(s>l)return{done:!0,value:void 0};const y=s++,m=c[y];if(y!==l)return{done:!1,value:m};if(u)throw m;return{done:!0,value:m}}};return g},HT=t=>{const e=atob(t),r=e.length,s=new Uint8Array(r);for(let l=0;l<r;l++)s[l]=e.charCodeAt(l);return s.buffer};var L0=class{constructor(t,e,r){this.v=t,this.t=e,this.d=r}};function U0(t){return t instanceof L0}function M0(t,e,r){return new L0(t,e,r)}function qT(t){const e=[];let r=-1,s=-1;const l=t[ni]();for(;;)try{const u=l.next();if(e.push(u.value),u.done){s=e.length-1;break}}catch(u){r=e.length,s=r,e.push(u);break}return M0(e,r,s)}const IT=BT(ni);function $T(t){return IT(t)}const KT={},GT={},VT={0:{},1:{},2:{},3:{}
13,4:{},5:{}};function z0(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function FT(t,e){z0(t,e),e.add(t)}function wa(t,e,r){z0(t,e),e.set(t,r)}function ms(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function Ue(t,e){return t.get(ms(t,e))}function as(t,e,r){return t.set(ms(t,e),r),r}var ys=new WeakMap,Vn=new WeakMap,Fn=new WeakMap,zl=new WeakMap,rn=new WeakMap,Sa=new WeakSet,B0=class{constructor(){FT(this,Sa),wa(this,ys,[]),wa(this,Vn,[]),wa(this,Fn,!0),wa(this,zl,!1),wa(this,rn,0)}on(t){let e=Ue(Fn,this),r=0;if(e){for(;r<Ue(rn,this)&&Ue(Vn,this)[r];r++);if(r===Ue(rn,this)){var s;as(rn,this,(s=Ue(rn,this),s++,s))}Ue(Vn,this)[r]=t}return ms(Sa,this,YT).call(this,t),()=>{if(Ue(Fn,this)&&e){for(e=!1,Ue(Vn,this)[r]=void 0;Ue(rn,this)>0&&!Ue(Vn,this)[Ue(rn,this)-1];){var l;as(rn,this,(l=Ue(rn,this),l--,l))}Ue(Vn,this).length=Ue(rn,this)}}}next(t){Ue(Fn,this)&&(Ue(ys,this).push(t),ms(Sa,this,Gf).call(this,t,"next"))}throw(t){Ue(Fn,this)&&(Ue(ys,this).push(t),ms(Sa,this,Gf).call(this,t,"throw"),as(Fn,this,!1),as(zl,this,!1),Ue(Vn,this).length=0)}return(t){Ue(Fn,this)&&(Ue(ys,this).push(t),ms(Sa,this,Gf).call(this,t,"return"),as(Fn,this,!1),as(zl,this,!0),Ue(Vn,this).length=0)}};function Gf(t,e){for(let s=0;s<Ue(rn,this);s++){var r;(r=Ue(Vn,this)[s])===null||r===void 0||r[e](t)}}function YT(t){for(let e=0,r=Ue(ys,this).length;e<r;e++){const s=Ue(ys,this)[e];!Ue(Fn,this)&&e===r-1?t[Ue(zl,this)?"return":"throw"](s):t.next(s)}}function Fh(t){return t instanceof B0}function Qa(){return new B0}function JT(t,e){const r=Qa(),s=t[ti]();let l=!1,u=!1;async function c(){try{for(;!l;){const h=await s.next();if(h.done){u=!0,r.return(h.value);break}r.next(h.value)}}catch(h){u=!0,r.throw(h)}}return c().catch(()=>{}),r}const QT=PT(ti,Vh);function XT(t){return QT(t)}async function ZT(t){try{return[1,await t]}catch(e){return[0,e]}}function WT(t,e){var r;return{plugins:e.plugins,mode:t,marked:new Set,features:127^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3,compactArrayBufferViews:(r=e.compactArrayBufferViews)!==null&&r!==void 0?r:!1}}function Bl(t,e){t.marked.add(e)}function eA(t,e){const r=t.refs.size;return t.refs.set(e,r),r}function au(t,e){const r=t.refs.get(e);return r!=null?(Bl(t,r),{type:1,value:mT(r)}):{type:0,value:eA(t,e)}}function Yh(t,e){const r=au(t,e);return r.type===1?r:D0(e)?{type:2,value:_T(r.value,e)}:r}function fr(t,e){const r=Yh(t,e);if(r.type!==0)return r.value;if(e in T0)return bT(r.value,e);throw new yr(e)}function ou(t,e){const r=au(t,VT[e]);return r.type===1?r.value:Te(26,r.value,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function tA(t){const e=au(t,KT);return e.type===1?e.value:Te(27,e.value,void 0,void 0,void 0,void 0,void 0,void 0,fr(t,ni),void 0,void 0,void 0)}function nA(t){const e=au(t,GT);return e.type===1?e.value:Te(29,e.value,void 0,void 0,void 0,void 0,void 0,[ou(t,1),fr(t,ti)],void 0,void 0,void 0,void 0)}function iA(t,e,r,s){return Te(r?11:10,t,void 0,void 0,void 0,s,void 0,void 0,void 0,void 0,j0(e),void 0)}function rA(t,e,r,s){return Te(8,e,void 0,void 0,void 0,void 0,{k:r,v:s},void 0,ou(t,0),void 0,void 0,void 0)}function Jh(t,e){if(!t.compactArrayBufferViews)return e;const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice().buffer,s=e.constructor;return new s(r)}function sA(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");const e=new Uint8Array(t);if(typeof e.toBase64=="function")return e.toBase64();let r="";for(let s=0,l=e.length;s<l;s++)r+=String.fromCharCode(e[s]);return btoa(r)}function aA(t,e,r){return Te(19,e,sA(r),void 0,void 0,void 0,void 0,void 0,ou(t,5),void 0,void 0,void 0)}function oA(t,e){return{base:WT(t,e),child:void 0}}var lA=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return st(this._p,this.depth,t)}};async function uA(t,e,r){const s=[];for(let l=0,u=r.length;l<u;l++)l in r?s[l]=await st(t,e,r[l]):s[l]=0;return s}async function cA(t,e,r,s){return ST(r,s,await uA(t,e,s))}async function Qh(t,e,r){const s=Object.entries(r),l=[],u=[];for(let c=0,h=s.length;c<h;
13c++)l.push(mr(s[c][0])),u.push(await st(t,e,s[c][1]));return ni in r&&(l.push(fr(t.base,ni)),u.push(DT(tA(t.base),await st(t,e,qT(r))))),ti in r&&(l.push(fr(t.base,ti)),u.push(xT(nA(t.base),await st(t,e,JT(r))))),Ss in r&&(l.push(fr(t.base,Ss)),u.push(N0(r[Ss]))),ws in r&&(l.push(fr(t.base,ws)),u.push(r[ws]?A0:R0)),{k:l,v:u}}async function Vf(t,e,r,s,l){return iA(r,s,l,await Qh(t,e,s))}async function fA(t,e,r,s){return ET(r,await st(t,e,s.valueOf()))}async function hA(t,e,r,s){return s=Jh(t.base,s),TT(r,s,await st(t,e,s.buffer))}async function dA(t,e,r,s){return s=Jh(t.base,s),AT(r,s,await st(t,e,s.buffer))}async function pA(t,e,r,s){return s=Jh(t.base,s),RT(r,s,await st(t,e,s.buffer))}async function My(t,e,r,s){const l=x0(s,t.base.features);return OT(r,s,l?await Qh(t,e,l):void 0)}async function gA(t,e,r,s){const l=x0(s,t.base.features);return kT(r,s,l?await Qh(t,e,l):void 0)}async function mA(t,e,r,s){const l=[],u=[];for(const[c,h]of s.entries())l.push(await st(t,e,c)),u.push(await st(t,e,h));return rA(t.base,r,l,u)}async function yA(t,e,r,s){const l=[];for(const u of s.keys())l.push(await st(t,e,u));return CT(r,l)}async function P0(t,e,r,s){const l=t.base.plugins;if(l)for(let u=0,c=l.length;u<c;u++){const h=l[u];if(h.parse.async&&h.test(s))return wT(r,h.tag,await h.parse.async(s,new lA(t,e),{id:r}))}}async function vA(t,e,r,s){const[l,u]=await ZT(s);return Te(12,r,l,void 0,void 0,void 0,void 0,void 0,await st(t,e,u),void 0,void 0,void 0)}function bA(t,e,r,s,l){const u=[],c=r.on({next:h=>{Bl(this.base,e),st(this,t,h).then(p=>{u.push(NT(e,p))},p=>{l(p),c()})},throw:h=>{Bl(this.base,e),st(this,t,h).then(p=>{u.push(LT(e,p)),s(u),c()},p=>{l(p),c()})},return:h=>{Bl(this.base,e),st(this,t,h).then(p=>{u.push(UT(e,p)),s(u),c()},p=>{l(p),c()})}})}async function _A(t,e,r,s){return jT(r,ou(t.base,4),await new Promise(bA.bind(t,e,r,s)))}async function wA(t,e,r,s){const l=[];for(let u=0,c=s.v.length;u<c;u++)l[u]=await st(t,e,s.v[u]);return MT(r,l,s.t,s.d)}async function SA(t,e,r,s){if(Array.isArray(s))return cA(t,e,r,s);if(Fh(s))return _A(t,e,r,s);if(U0(s))return wA(t,e,r,s);let l=s.constructor;if(l!==void 0&&typeof l!="function"){const h=Object.getPrototypeOf(s);l=h===null?void 0:h.constructor}if(l===zT)return st(t,e,s.replacement);const u=await P0(t,e,r,s);if(u)return u;switch(l){case Object:return Vf(t,e,r,s,!1);case void 0:return Vf(t,e,r,s,!0);case Date:return yT(r,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return My(t,e,r,s);case Number:case Boolean:case String:case BigInt:return fA(t,e,r,s);case ArrayBuffer:return aA(t.base,r,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return hA(t,e,r,s);case DataView:return pA(t,e,r,s);case Map:return mA(t,e,r,s);case Set:return yA(t,e,r,s)}if(l===Promise||s instanceof Promise)return vA(t,e,r,s);const c=t.base.features;if(c&32&&l===RegExp)return vT(r,s);if(c&16)switch(l){case BigInt64Array:case BigUint64Array:return dA(t,e,r,s)}if(c&1&&typeof AggregateError<"u"&&(l===AggregateError||s instanceof AggregateError))return gA(t,e,r,s);if(c&64&&typeof Temporal<"u")switch(l){case Temporal.Instant:return Ci(r,0,s);case Temporal.Duration:return Ci(r,1,s);case Temporal.PlainDate:return Ci(r,2,s);case Temporal.PlainDateTime:return Ci(r,3,s);case Temporal.PlainMonthDay:return Ci(r,4,s);case Temporal.PlainTime:return Ci(r,5,s);case Temporal.PlainYearMonth:return Ci(r,6,s);case Temporal.ZonedDateTime:return Ci(r,7,s)}if(s instanceof Error)return My(t,e,r,s);if(ni in s||ti in s)return Vf(t,e,r,s,!!l);throw new yr(s)}async function EA(t,e,r){const s=Yh(t.base,r);if(s.type!==0)return s.value;const l=await P0(t,e,s.value,r);if(l)return l;throw new yr(r)}async function st(t,e,r){if(e>=t.base.depthLimit)throw new k0(t.base.depthLimit);switch(typeof r){case"boolean":return r?A0:R0;case"undefined":return VE;case"string":return N0(r);case"number":return pT(r);case"bigint":return gT(r);case"object":if(r){const s=Yh(t.base,r);return s.type===0?await SA(t,e+1,s.value,r):s.value}return FE;case"symbol":return fr(t.base,r);case"function":return EA(t,e,r);default:throw new yr(r)}}async function TA(t,e){try{return await st(t,0,e)}catch(r){throw r instanceof Uy?r:new Uy(r)}}function H0(t,e){for(let r=0,s=e.length;r<s;r++){const l=e[r];t.has(l)||(t.add(l),l.extends&&H0(t,l.extends))}}function q0(t){if(t){const e=new Set;return H0(e,t),[...e]}}function AA(t){switch(t){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 uT(t)}
13}function RA(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function OA(t){switch(t){case ti:case ws:case Ss:case ni:return!0;default:return!1}}const kA=1e6,CA=512,DA=1e4,xA=2e4;function I0(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}const jA=1e3;function NA(t,e){var r,s;const l=(r=e.maxBase64Length)!==null&&r!==void 0?r:kA;if(!Number.isSafeInteger(l)||l<0)throw new RangeError("maxBase64Length must be a non-negative safe integer");const u=e.refs||new Map;return"types"in u||Object.assign(u,{types:new Map}),{mode:t,plugins:e.plugins,refs:u,features:(s=e.features)!==null&&s!==void 0?s:127^(e.disabledFeatures||0),depthLimit:e.depthLimit||jA,maxBase64Length:l}}function LA(t){return{mode:2,base:NA(2,t),child:void 0}}var UA=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return Pe(this._p,this.depth,t)}};function $0(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new ut({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function K0(t){return!!t&&(typeof t=="object"||typeof t=="function")&&"then"in t&&typeof t.then=="function"}function MA(t,e,r){return $0(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,r),r}function zA(t,e,r){return $0(t.base,e),t.base.refs.set(e,r),r}function it(t,e,r){return t.mode===1?MA(t,e,r):zA(t,e,r)}function dh(t,e,r){if(Object.hasOwn(e,r))return e[r];throw new ut(t)}function BA(t,e){return it(t,e.i,hT(Hi(e.s)))}function Bi(t,e){if(!Array.isArray(e))throw new ut(t)}function PA(t,e,r){const s=r.a;Bi(r,s);const l=s.length,u=it(t,r.i,new Array(l));for(let c=0,h;c<l;c++)h=s[c],h&&(u[c]=Pe(t,e,h));return I0(u,r.o),u}function zy(t,e,r){RA(e)?t[e]=r:Object.defineProperty(t,e,{value:r,configurable:!0,enumerable:!0,writable:!0})}function HA(t,e,r,s,l){if(typeof s=="string")zy(r,Hi(s),Pe(t,e,l));else{const u=Pe(t,e,s);switch(typeof u){case"string":zy(r,u,Pe(t,e,l));break;case"symbol":OA(u)&&(r[u]=Pe(t,e,l));break;default:throw new ut(s)}}}function G0(t,e,r){t.base.refs.types.set(e,r)}function lu(t,e,r,s){if(t.base.refs.types.get(r)!==s)throw new ut(e)}function V0(t,e,r,s){const l=r.k;if(Bi(r,l),Bi(r,r.v),l.length>0)for(let u=0,c=r.v,h=l.length;u<h;u++)HA(t,e,s,l[u],c[u]);return s}function qA(t,e,r){const s=it(t,r.i,r.t===10?{}:Object.create(null));return V0(t,e,r.p,s),I0(s,r.o),s}function IA(t,e){return it(t,e.i,new Date(e.s))}function $A(t,e){if(!(t.base.features&64))throw new $h(e);let r;switch(e.c){case 0:r=Temporal.Instant.from(e.s);break;case 1:r=Temporal.Duration.from(e.s);break;case 2:r=Temporal.PlainDate.from(e.s);break;case 3:r=Temporal.PlainDateTime.from(e.s);break;case 4:r=Temporal.PlainMonthDay.from(e.s);break;case 5:r=Temporal.PlainTime.from(e.s);break;case 6:r=Temporal.PlainYearMonth.from(e.s);break;case 7:r=Temporal.ZonedDateTime.from(e.s);break;default:throw new ut(e)}return it(t,e.i,r)}function KA(t,e){if(t.base.features&32){const r=Hi(e.c);if(r.length>xA)throw new ut(e);return it(t,e.i,new RegExp(r,e.m))}throw new $h(e)}function GA(t,e,r){const s=it(t,r.i,new Set);Bi(r,r.a);for(let l=0,u=r.a,c=u.length;l<c;l++)s.add(Pe(t,e,u[l]));return s}function VA(t,e,r){const s=it(t,r.i,new Map);Bi(r,r.e.k),Bi(r,r.e.v);for(let l=0,u=r.e.k,c=r.e.v,h=u.length;l<h;l++)s.set(Pe(t,e,u[l]),Pe(t,e,c[l]));return s}function FA(t,e){if(typeof e.s!="string")throw new ut(e);if(e.s.length>t.base.maxBase64Length)throw new RangeError("ArrayBuffer exceeds maxBase64Length ("+t.base.maxBase64Length+")");const r=Hi(e.s);let s;if(r.length<CA||typeof Buffer>"u")s=HT(r);else{const l=atob(r);s=new ArrayBuffer(l.length),Buffer.from(s).write(l,"latin1")}return it(t,e.i,s)}function YA(t,e,r){var s;const l=AA(r.c),u=Pe(t,e,r.f);if(!(u instanceof ArrayBuffer))throw new ut(r);const c=(s=r.b)!==null&&s!==void 0?s:0;if(c<0||c>u.byteLength)throw new ut(r);return it(t,r.i,new l(u,c,r.l))}function JA(t,e,r){var s;const l=Pe(t,e,r.f);if(!(l instanceof ArrayBuffer))throw new ut(r);const u=(s=r.b)!==null&&s!==void 0?s:0;if(u<0||u>l.byteLength)throw new ut(r);return it(t,r.i,new DataView(l,u,r.l))}function F0(t,e,r,s){if(r.p){const l=V0(t,e,r.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(l))}return s}function QA(t,e,r){return F0(t,e,r,it(t,r.i,new AggregateError([],Hi(r.m))))}function XA(t,e,r){const s=dh(r,GE,r.s);return F0(t,e,r,it(t,r.i,new s(Hi(r.m))))}function ZA(t,e,r){const s=Vh(),l=it(t,r.i,s.p),u=Pe(t,e,r.f);if(K0(u))throw new ut(r.f);return r.s?s.s(u):s.f(u),l}function WA(t,e,r){return it(t,r.i,Object(Pe(t,e,r.f)))}function eR(t,e,r){const s=t.base.plugins;if(s){const l=Hi(r.c);for(let u=0,c=s.length;u<c;u++){const h=s[u];if(h.tag===l)return it(t,r.i,h.deserialize(r.s,new UA(t,e),{id:r.i}))}}throw new aT(r.c)}function tR(t,e){const r=it(t,e.i,it(t,e.s,Vh()).p);return G0(t,e.s,22),r}function nR(t,e,r){const s=t.base.refs.get(r.i);if(s){lu(t,r,r.i,22);const l=Pe(t,e,r.a[1]);if(K0(l))throw new ut(r.a[1]);r.t===23?s.s(l):s.f(l);return}throw new su("Promise")}function iR(t,e,r){Pe(t,e,r.a[0]);const s=Pe(t,e,r.a[1]);if(!U0(s))throw new ut(r.a[1]);return $T(s)}function rR(t,e,r){Pe(t,e,r.a[0]);const s=Pe(t,e,r.a[1]);if(!Fh(s))throw new ut(r.a[1]);return XT(s)}function sR(t,e,r){const s=it(t,r.i,Qa());G0(t,r.i,31);const l=r.a;Bi(r,l);const u=l.length;if(u)for(let c=0;c<u;c++)Pe(t,e,l[c]);return s}function aR(t,e,r){const s=t.base.refs.get(r.i);if(s){lu(t,r,r.i,31),s.next(Pe(t,e,r.f));return}throw new su("Stream")}function oR(t,e,r){const s=t.base.refs.get(r.i);if(s){lu(t,r,r.i,31),s.throw(Pe(t,e,r.f));return}throw new su("Stream")}function lR(t,e,r){const s=t.base.refs.get(r.i);if(s){lu(t,r,r.i,31),s.return(Pe(t,e,r.f));return}throw new su("Stream")}function uR(t,e,r){Pe(t,e,r.f)}function cR(t,e,r){Pe(t,e,r.a[1])}function By(t,e){return Number.isInteger(t)&&t>=-1&&t<e}function fR(t,e,r){Bi(r,r.a);const s=r.a.length;if(!(By(r.s,s)&&By(r.l,s)))throw new ut(r);const l=it(t,r.i,M0([],r.s,r.l));for(let u=0;u<s;u++)l.v[u]=Pe(t,e,r.a[u]);return l}function Pe(t,e,r){if(e>t.base.depthLimit)throw new k0(t.base.depthLimit);switch(e+=1,r.t){case 2:return dh(r,$E,r.s);case 0:return Number(r.s);case 1:return Hi(String(r.s));case 3:if(String(r.s).length>DA)throw new ut(r);return BigInt(r.s);case 4:return t.base.refs.get(r.i);case 18:return BA(t,r);case 9:return PA(t,e,r);case 10:case 11:return qA(t,e,r);case 5:return IA(t,r);case 6:return KA(t,r);case 7:return GA(t,e,r);case 8:return VA(t,e,r);case 19:return FA(t,r);case 16:case 15:return YA(t,e,r);case 20:return JA(t,e,r);case 14:return QA(t,e,r);case 13:return XA(t,e,r);case 12:return ZA(t,e,r);case 17:return dh(r,IE,r.s);case 21:return WA(t,e,r);case 25:return eR(t,e,r);case 22:return tR(t,r);case 23:case 24:return nR(t,e,r);case 28:return iR(t,e,r);case 30:return rR(t,e,r);case 31:return sR(t,e,r);case 32:return aR(t,e,r);case 33:return oR(t,e,r);case 34:return lR(t,e,r);case 27:return uR(t,e,r);case 29:return cR(t,e,r);case 35:return fR(t,e,r);case 36:return $A(t,r);default:throw new $h(r)}
13}function hR(t,e){try{return Pe(t,0,e)}catch(r){throw new sT(r)}}function dR(t,e){const r=q0(e.plugins);return hR(LA({maxBase64Length:e.maxBase64Length,plugins:r,refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit}),t)}async function pR(t,e={}){const r=q0(e.plugins),s=oA(1,{compactArrayBufferViews:e.compactArrayBufferViews,plugins:r,disabledFeatures:e.disabledFeatures});return{t:await TA(s,t),f:s.base.features,m:Array.from(s.base.marked)}}function gR(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,r){return{v:r.parse(t.toSerializable(e))}},async async(e,r){return{v:await r.parse(t.toSerializable(e))}},stream(e,r){return{v:r.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,r){return t.fromSerializable(r.deserialize(e.v))}}}const mR={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}};var yR=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}};function Y0(t){const e=[];for(let r=0;r<t.length;r+=32768)e.push(String.fromCharCode.apply(null,t.subarray(r,r+32768)));return btoa(e.join(""))}function J0(t){const e=atob(t),r=new Uint8Array(e.length);for(let s=0;s<e.length;s++)r[s]=e.charCodeAt(s);return r}const vR=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});function bR(t){try{return"t"+vR.decode(t)}catch{return"b"+Y0(t)}}const _R=new TextEncoder;function wR(t){const e=t.slice(1);return t[0]==="t"?_R.encode(e):J0(e)}function SR(t,e,r){r?.throwIfAborted();const s=Qa(),l=t.getReader();let u=!0;const c=()=>{u=!1,r?.removeEventListener("abort",p),l.releaseLock()},h=g=>u?(l.cancel(g).catch(()=>{}),c(),!0):!1,p=()=>{h(r.reason)&&s.throw(r.reason)};return r?.addEventListener("abort",p),(async()=>{try{for(;u;){const{done:g,value:y}=await l.read();if(!u)return;if(g){c(),s.return(void 0);return}s.next(e(y))}}catch(g){h(g)&&s.throw(g)}})(),[s,h]}function ER(t,e){let r,s=!1;return new ReadableStream({start(l){const u=t.on({next(c){if(!s)try{l.enqueue(e(c))}catch(h){s=!0;const p=r;r=void 0,p?.(),l.error(h)}},throw(c){s||(s=!0,r=void 0,l.error(c))},return(){s||(s=!0,r=void 0,l.close())}});s?u():r=u},cancel(){const l=r;r=void 0,l?.()}})}function Q0(t){return{tag:"tss/RawStream",test:e=>e instanceof yR,parse:{async:async(e,r)=>{const s=await r.parse(e.hint==="text"),[l]=SR(e.stream,e.hint==="text"?bR:Y0,t);return{text:s,stream:await r.parse(l)}}},serialize:void 0,deserialize:void 0}}const TR=Q0(),AR={tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(t,e){return ER(e.deserialize(t.stream),e.deserialize(t.text)?wR:J0)}},Di={},X0=t=>new ReadableStream({start(e){t.on({next(r){try{e.enqueue(r)}catch{}},throw(r){e.error(r)},return(){try{e.close()}catch{}}})}}),RR={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===Di},parse:{sync(){return Di},async async(){return await Promise.resolve(Di)},stream(){return Di}},serialize(){return X0.toString()},deserialize(){return Di}};async function OR(t,e){try{for(;;){const r=await e.read();if(r.done){t.return(r.value),e.releaseLock();break}t.next(r.value)}}catch(r){e.releaseLock(),t.throw(r)}}function kR(t){t.cancel().catch(()=>{}),t.releaseLock()}function Py(t){const e=Qa(),r=t.getReader(),s=kR.bind(null,r);return OR(e,r).catch(s),[e,s]}const CR={tag:"seroval/plugins/web/ReadableStream",extends:[RR],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(Di),stream:e.parse(Qa())}},async async(t,e){return{factory:await e.parse(Di),stream:await e.parse(Py(t)[0])}},stream(t,e){const[r,s]=Py(t);return e.addCleanup(s),{factory:e.parse(Di),stream:e.parse(r)}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){const r=e.deserialize(t.stream);if(!r||typeof r!="object"||!Fh(r))throw new Error("Expected a stream source.");return X0(r)}};function Z0(t){return[mR,t?Q0(t):TR,CR]}const DR=Z0();[...DR];function xR(t){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(e,r){return t(r.deserialize(e.streamId))}}}function jR(t){return[...Kv()?.serializationAdapters?.map(gR)??[],...t]}
13function W0(t){return jR(Z0(t))}var Hy=new TextDecoder,vn=new Uint8Array,NR=new ByteLengthQueuingStrategy({highWaterMark:0});function LR(t){const e=t.getReader(),r=new Map;let s=0,l,u;const c=()=>{l?.(),l=void 0},h=(m,b)=>{const _=m[1];m[1]=!1,_&&(b===1?_.close():_.error(b[0]))},p=new ReadableStream({start(m){u=m},pull:c,cancel(m){const b=[m===void 0?new Error("Framed response cancelled"):m];s=b,c(),e.cancel(m).catch(()=>{});for(const _ of r.values())h(_,b)}});function g(m){const b=r.get(m);if(b)return b;if(r.size>=1024)throw new Error("Too many raw streams");let _;const S=[new ReadableStream({start(E){_=E},cancel(){S[1]!==!1&&(S[1]=null)}},NR),_];return r.set(m,S),s!==0&&h(S,s),S}function y(m){if(m===0||m>>>0!==m)throw new RangeError("Invalid raw stream ID");return g(m)[0]}return(async()=>{let m=vn,b=0;async function _(){for(;b===m.byteLength;){m=vn,b=0;const E=await e.read();if(s!==0||E.done)return!1;m=E.value}return!0}async function S(E,T){if(E===0)return vn;if(!await _()){if(T)return;throw new Error("Incomplete frame")}if(m.byteLength-b>=E){const D=m.subarray(b,b+E);return b+=E,b===m.byteLength&&(m=vn,b=0),D}const R=new Uint8Array(E);let C=0;for(;C<E;){if(!await _())throw new Error("Incomplete frame");const D=Math.min(E-C,m.byteLength-b);R.set(m.subarray(b,b+D),C),b+=D,C+=D}return b===m.byteLength&&(m=vn,b=0),R}try{for(;s===0;){let E=await S(9,!0);if(s!==0)return;if(!E){for(const F of r.values())if(F[1])throw new Error("Incomplete raw stream");s=1,u.close();return}const T=E[0],R=(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,C=(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0;if(E=vn,T>3||T===0!=(R===0)||C>16777216||T===2&&C!==0)throw new Error("Invalid frame");const D=T===0?void 0:g(R);if(D?.[1]===!1)throw new Error("Raw stream already ended");let H=await S(C);if(s!==0)return;if(!D){const F=Hy.decode(H);for(H=vn,u.enqueue(F);s===0&&u.desiredSize<=0;)await new Promise(B=>{l=B});continue}if(T===1){const F=D[1];if(F){if(-F.desiredSize>134217728){F.error(new Error(`Raw stream ${R} has too many unread bytes`)),D[1]=null,H=vn;continue}const B=H.byteLength*4<H.buffer.byteLength?H.slice():H;H=vn,F.enqueue(B)}}else h(D,T===2?1:[new Error(Hy.decode(H))])}}catch(E){if(s===0){const T=[E];s=T,e.cancel(E).catch(()=>{}),u.error(E);for(const R of r.values())h(R,T)}}finally{m=vn,e.releaseLock()}})(),[p,y]}const _n=Symbol.for("TSR_DEFERRED_PROMISE");function UR(t,e){const r=t;return r[_n]||(r[_n]={status:"pending"},r.then(s=>{r[_n].status="success",r[_n].data=s}).catch(s=>{r[_n].status="error",r[_n].error={data:AE(s),__isServerError:!0}})),r}const MR="Error preloading route! âï¸";function eb(t,e){if(t)return typeof t=="string"?t:t[e]}function zR(t){return t?.scriptFormat??"module"}function BR(t,e,r){const s=PR(e),l=eb(r,"script")??s.crossOrigin;return{...zR(t)==="iife"?{rel:"preload",as:"script"}:{rel:"modulepreload"},href:s.href,...l?{crossOrigin:l}:{}}}function PR(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function wl(t,e){if(e.length===0)return;if(e.length===1){t.push(e[0]);return}const r=new Set;for(const s of e){const l=JSON.stringify(s);r.has(l)||(r.add(l),t.push(s))}}function HR(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function qR(t,e,r,s){const l=l0(t),u=[],c=[];for(const h of l)for(const p of Array.isArray(h.scripts)?h.scripts:[]){if(!p)continue;const{children:g,...y}=p;u.push({tag:"script",attrs:{...y,...s,nonce:r},children:g})}if(e)for(const h of l)for(const p of e.routes[h.routeId]?.scripts??[])c.push({tag:"script",attrs:{...p.attrs,nonce:r},children:p.children});return[u,c]}function IR([t,e],r){return[...t,...e]}var tb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;const r=this.options,s=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=_s:this.parentRoute||Na();let l=s?_s:r?.path;l&&l!=="/"&&(l=Qv(l));const u=r?.id||l,c=s?_s:bs((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(u??""));l==="__root__"&&(l="/");const h=c==="__root__"?"/":l===void 0?this.parentRoute.fullPath:bs(this.parentRoute.fullPath+"/"+l);this._path=l,this._id=c,this._fullPath=h,this._to=Sn(h)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Nh({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},$R=class extends tb{constructor(t){super(t)}};var Ba;function ph(t,e,r){try{return dR(t,e)}catch(s){throw ib(r),s}}async function nb(t){t.length>0&&(await Promise.allSettled(t),t.length=0)}function ib(t){for(const e of t)e.catch(()=>{});t.length=0}var KR=Object.prototype.hasOwnProperty;function rb(t){for(const e in t)if(KR.call(t,e))return!0;return!1}async function GR(t,e,r){Ba||(Ba=W0());const s=e[0],l=s.fetch??r,u=s.data instanceof FormData,c=new Headers(s.headers);if(c.set("x-tsr-serverFn","true"),u||c.set("accept",`${BS}, application/x-ndjson, application/json`),s.method==="GET"){if(u)throw new Error("FormData is not supported with GET requests");const p=await sb(s);if(p!==void 0){const g=i0({payload:p});t.includes("?")?t+=`&${g}`:t+=`?${g}`}}let h;return s.method==="POST"&&(h=await VR(s),typeof h=="string"&&c.set("content-type","application/json")),FR(()=>l(t,{method:s.method,headers:c,signal:s.signal,body:h}))}
13async function sb(t){let e;return t.data!==void 0&&(e={data:t.data}),t.context&&rb(t.context)&&((e??={}).context=t.context),e?ab(e,t.signal):void 0}async function ab(t,e){e?.throwIfAborted();let r;try{r=await pR(t,{plugins:e?W0(e):Ba})}finally{e?.throwIfAborted()}return JSON.stringify(r)}async function VR(t){if(t.data instanceof FormData){let e;return t.context&&rb(t.context)&&(e=await ab(t.context,t.signal)),e!==void 0&&t.data.set(zS,e),t.data}return sb(t)}async function FR(t){let e;try{e=await t()}catch(s){if(s instanceof Response)e=s;else throw s}if(e.headers.get("x-tss-raw")==="true")return e;const r=e.headers.get("content-type");if(r||Na(),e.headers.get("x-tss-serialized")){let s;if(r.includes("application/x-tss-framed")){const l=/;\s*v=(\d+)/.exec(r)?.[1];if(l&&+l!=1)throw new Error(`Unsupported framed protocol version ${l}`);if(!e.body)throw new Error("No response body for framed response");const[u,c]=LR(e.body);s=await YR(u,[xR(c),...Ba])}else if(r.includes("application/json")){const l=await e.json(),u=[];s=ph(l,{plugins:Ba},u),await nb(u)}if(s||Na(),s instanceof Error)throw s;return s}if(r.includes("application/json")){const s=await e.json(),l=PS(s);if(l)throw l;if(gr(s))throw s;return s}if(!e.ok)throw new Error(await e.text());return e}async function YR(t,e){const r=t.getReader(),s={refs:new Map,plugins:e},l=h=>{r.cancel(h).catch(()=>{})};let u;const c=[];try{const h=await r.read();if(h.done)throw new Error("Stream ended before first object");u=ph(JSON.parse(h.value),s,c)}catch(h){throw l(h),r.releaseLock(),h}return(async()=>{const h=[];try{for(;;){const p=await r.read();if(p.done)return;ph(JSON.parse(p.value),s,h),ib(h)}}catch(p){l(p),console.error("Stream processing error:",p)}finally{r.releaseLock()}})(),await nb(c),u}function JR(t){const e="/_serverFn/"+t;return Object.assign((...l)=>{const u=Kv()?.serverFns?.fetch;return GR(e,l,u??fetch)},{url:e,serverFnMeta:{id:t},[oh]:!0})}var QR={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(oh in t)?!1:!!t[oh],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>JR(t)},Gl=ue.use,ob=ue.useLayoutEffect;function XR({promise:t}){if(Gl)return Gl(t);const e=UR(t);if(e[_n].status==="pending")throw e;if(e[_n].status==="error")throw e[_n].error;return e[_n].data}function ZR(t){const e=J.jsx(WR,{...t});return t.fallback?J.jsx(ue.Suspense,{fallback:t.fallback,children:e}):e}function WR(t){const e=XR(t);return t.children(e)}var Xh=class extends ue.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,e){const r=t.getResetKey();return e.error&&e.resetKey!==r?{resetKey:r,error:0}:{resetKey:r}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){const t=this.state.error;return t?ue.createElement(this.props.errorComponent??e1,{error:t[0],reset:this.reset}):this.props.children}};function e1({error:t}){const[e,r]=ue.useState(!1);return J.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[J.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[J.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),J.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(s=>!s),children:e?"Hide Error":"Show Error"})]}),J.jsx("div",{style:{height:".25rem"}}),e?J.jsx("div",{children:J.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?J.jsx("code",{children:t.message}):null})}):null]})}var qy=()=>!0,t1=()=>!1;function n1({children:t,fallback:e=null}){return J.jsx(nu.Fragment,{children:Zh()?t:e})}function Zh(t=!0){return nu.useSyncExternalStore(i1,qy,t?t1:qy)}function i1(){return()=>{}}var lb=ue.createContext(null);function wt(t){return ue.useContext(lb)}var Wh=ue.createContext(void 0),r1=ue.createContext(void 0);function s1({update:t,notify:e,unwatched:r}){return{link:s,unlink:l,propagate:u,checkDirty:c,shallowPropagate:h};function s(g,y,m){const b=y.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===g){_.version=m,y.depsTail=_;return}const S=g.subsTail;if(S!==void 0&&S.version===m&&S.sub===y)return;const E=y.depsTail=g.subsTail={version:m,dep:g,sub:y,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=E),b!==void 0?b.nextDep=E:y.deps=E,S!==void 0?S.nextSub=E:g.subs=E}function l(g,y=g.sub){const m=g.dep,b=g.prevDep,_=g.nextDep,S=g.nextSub,E=g.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,S!==void 0?S.prevSub=E:m.subsTail=E,E!==void 0?E.nextSub=S:(m.subs=S)===void 0&&r(m),_}function u(g){let y=g.nextSub,m;
13e: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&&e(b),_&1){const S=b.subs;if(S!==void 0){const E=(g=S).nextSub;E!==void 0&&(m={value:y,prev:m},y=E);continue}}if((g=y)!==void 0){y=g.nextSub;continue}for(;m!==void 0;)if(g=m.value,m=m.prev,g!==void 0){y=g.nextSub;continue e}break}while(!0)}function c(g,y){let m,b=0,_=!1;e:do{const S=g.dep,E=S.flags;if(y.flags&16)_=!0;else if((E&17)===17){if(t(S)){const T=S.subs;T.nextSub!==void 0&&h(T),_=!0}}else if((E&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(m={value:g,prev:m}),g=S.deps,y=S,++b;continue}if(!_){const T=g.nextDep;if(T!==void 0){g=T;continue}}for(;b--;){const T=y.subs,R=T.nextSub!==void 0;if(R?(g=m.value,m=m.prev):g=T,_){if(t(y)){R&&h(T),y=g.sub;continue}_=!1}else y.flags&=-33;y=g.sub;const C=g.nextDep;if(C!==void 0){g=C;continue e}}return _}while(!0)}function h(g){do{const y=g.sub,m=y.flags;(m&48)===32&&(y.flags=m|16,(m&6)===2&&e(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 a1(t,e,r){const s=typeof t=="object",l=s?t:void 0;return{next:(s?t.next:t)?.bind(l),error:(s?t.error:e)?.bind(l),complete:(s?t.complete:r)?.bind(l)}}const gh=[];let Pl=0;const{link:Iy,unlink:o1,propagate:l1,checkDirty:ub,shallowPropagate:$y}=s1({update(t){return t._update()},notify(t){gh[mh++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,Vl(t))}});let Sl=0,mh=0,an,yh=0;function u1(t){try{++yh,t()}finally{--yh||cb()}}function Vl(t){const e=t.depsTail;let r=e!==void 0?e.nextDep:t.deps;for(;r!==void 0;)r=o1(r,t)}function cb(){if(!(yh>0)){for(;Sl<mh;){const t=gh[Sl];gh[Sl++]=void 0,t.notify()}Sl=0,mh=0}}function Ky(t,e){const r=typeof t=="function",s=t,l={_snapshot:r?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?0:1,get(){return an!==void 0&&Iy(l,an,Pl),l._snapshot},subscribe(u){const c=a1(u),h={current:!1},p=c1(()=>{l.get(),h.current?(an=void 0,c.next?.(l._snapshot)):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const c=an,h=e?.compare??Object.is;if(r)an=l,++Pl,l.depsTail=void 0;else if(u===void 0)return!1;r&&(l.flags=5);try{const p=l._snapshot,g=typeof u=="function"?u(p):u===void 0&&r?s(p):u;return p===void 0||!h(p,g)?(l._snapshot=g,!0):!1}finally{an=c,r&&(l.flags&=-5),Vl(l)}}};return r?(l.flags=17,l.get=function(){const u=l.flags;if(u&16||u&32&&ub(l.deps,l)){if(l._update()){const c=l.subs;c!==void 0&&$y(c)}}else u&32&&(l.flags=u&-33);return an!==void 0&&Iy(l,an,Pl),l._snapshot}):l.set=function(u){if(l._update(u)){const c=l.subs;c!==void 0&&(l1(c),$y(c),cb())}},l}function c1(t){const e=()=>{const s=an;an=r,++Pl,r.depsTail=void 0,r.flags=6;try{return t()}finally{an=s,r.flags&=-5,Vl(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const s=this.flags;s&16||s&32&&ub(this.deps,this)?e():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Vl(this)}};return e(),r}var Ff={exports:{}},Yf={},Jf={exports:{}},Qf={};var Gy;function f1(){if(Gy)return Qf;Gy=1;var t=Ja();function e(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var r=typeof Object.is=="function"?Object.is:e,s=t.useState,l=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function h(m,b){var _=b(),S=s({inst:{value:_,getSnapshot:b}}),E=S[0].inst,T=S[1];return u(function(){E.value=_,E.getSnapshot=b,p(E)&&T({inst:E})},[m,_,b]),l(function(){return p(E)&&T({inst:E}),m(function(){p(E)&&T({inst:E})})},[m]),c(_),_}function p(m){var b=m.getSnapshot;m=m.value;try{var _=b();return!r(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:h;return Qf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Qf}var Vy;
13function h1(){return Vy||(Vy=1,Jf.exports=f1()),Jf.exports}var Fy;function d1(){if(Fy)return Yf;Fy=1;var t=Ja(),e=h1();function r(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var s=typeof Object.is=="function"?Object.is:r,l=e.useSyncExternalStore,u=t.useRef,c=t.useEffect,h=t.useMemo,p=t.useDebugValue;return Yf.useSyncExternalStoreWithSelector=function(g,y,m,b,_){var S=u(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=h(function(){function R(B){if(!C){if(C=!0,D=B,B=b(B),_!==void 0&&E.hasValue){var j=E.value;if(_(j,B))return H=j}return H=B}if(j=H,s(D,B))return j;var V=b(B);return _!==void 0&&_(j,V)?(D=B,j):(D=B,H=V)}var C=!1,D,H,F=m===void 0?null:m;return[function(){return R(y())},F===null?void 0:function(){return R(F())}]},[y,m,b,_]);var T=l(g,S[0],S[1]);return c(function(){E.hasValue=!0,E.value=T},[T]),p(T),T},Yf}var Yy;function p1(){return Yy||(Yy=1,Ff.exports=d1()),Ff.exports}var g1=p1();function m1(t,e){return t===e}function Tn(t,e=s=>s,r){const s=r?.compare??m1,l=ue.useCallback(c=>{const{unsubscribe:h}=t.subscribe(c);return h},[t]),u=ue.useCallback(()=>t.get(),[t]);return g1.useSyncExternalStoreWithSelector(l,u,u,e,s)}var Jy={};function y1(t,e){const r=ue.useRef();return s=>{const l=t?.select?t.select(s):s;return t?.structuralSharing??e.options.defaultStructuralSharing?r.current=Li(r.current,l):l}}function vr(t){const e=wt(),r=ue.useContext(t.from?r1:Wh),s=t.from??r,l=e.stores.getMatchStore(s),u=y1(t,e),c=Tn(l,h=>h?u(h):Jy);if(c!==Jy)return c;(t.shouldThrow??!0)&&Na()}function fb(t){return vr({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function hb(t){const{select:e,...r}=t;return vr({...r,select:s=>e?e(s.loaderDeps):s.loaderDeps})}function db(t){return vr({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const r=t.strict===!1?e.params:e._strictParams;return t.select?t.select(r):r}})}function pb(t){return vr({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function gb(t){const e=wt();return ue.useCallback(r=>e.navigate({...r,from:r.from??t?.from}),[t?.from,e])}function mb(t){return vr({...t,select:e=>t.select?t.select(e.context):e.context})}function v1(...t){const e=ue.useRef(t),r=e.current;return t.forEach((s,l)=>{hn(r[l],s,!1,!0)||(r[l]=s)}),e.current}function El(t,e){t.preloadRoute(e).catch(r=>{console.warn(r),console.warn(MR)})}var b1={compare:(t,e)=>t[0]===e[0]&&t[1]===e[1]};function _1(t,e){const r=typeof t=="string"&&ja(t);if(r)return e.has(r)?t:null}function w1(t,e,r,s,l){const u=yy(t.pathname,s),c=yy(e.pathname,s);return(r?.exact?u!==c:!(u.startsWith(c)&&(u.length===c.length||u[c.length]==="/")))||(r?.includeSearch??!0)&&!hn(t.search,e.search,!r?.exact,r?.explicitUndefined)?!1:r?.includeHash?l&&t.hash===e.hash:!0}function S1(t,e,r){const s=wt(),l=ue.useRef(null),u=ue.useCallback(ce=>{if(l.current=ce,typeof e=="function")return e(ce);e&&(e.current=ce)},[e]),{activeOptions:c,to:h,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:m,startTransition:b,resetScroll:_,viewTransition:S,ignoreBlocker:E,disabled:T,target:R,onClick:C,onBlur:D,onFocus:H,onMouseEnter:F,onMouseLeave:B,onTouchStart:j}=t,V=Zh(!!c?.includeHash),[W,se,K]=v1(t.search,t.params,c),[G,Z]=ue.useMemo(()=>[t,{...t}],[s,t.from,t._fromLocation,t.hash,t.to,W,se,t.state,t.mask,t.unsafeRelative]),he=ue.useMemo(()=>{const ce=_1(h,s.protocolAllowlist);if(ce!==void 0){const dn=[ce??void 0];return()=>dn}let ke,ze;return dn=>{G._fromLocation||(Z._fromLocation=dn);const qi=s.buildLocation(Z),Rn=O1(qi,s,T);return(!ke||ke[0]!==Rn)&&(ke=[Rn,!(T||Rn&&!ja(Rn))&&void 0],ze=[Rn,!0]),ke[1]!==void 0&&w1(dn,qi,K,s.basepath,V)?ze:ke}},[K,T,V,G,Z,s,h]),[re,M]=Tn(s.stores.location,he,b1),Q=M===void 0&&re,oe=T||re===void 0,Oe=ue.useRef(!1),_e=t.reloadDocument||Q||oe?!1:p??s.options.defaultPreload,k=g??s.options.defaultPreloadDelay??0,I=ue.useCallback(ce=>{const ke=ce?.isIntersecting;if(!(ke??_e==="intent")){ke===!1&&Xf(l);return}if(!k){El(s,G);return}ka.has(l)||ka.set(l,setTimeout(()=>{ka.delete(l),El(s,G)},k))},[s,G,l,_e,k]);ue.useEffect(()=>{if(!_e)return;_e==="render"&&!Oe.current&&(Oe.current=!0,El(s,G));let ce=!0,ke;return _e==="viewport"&&l.current&&typeof IntersectionObserver=="function"&&(ke=new IntersectionObserver(ze=>{ce&&I(ze.pop())},{rootMargin:"100px"}),ke.observe(l.current)),()=>{ce=!1,ke?.disconnect(),Xf(l)}},[s,G,_e,I,l]);const Y=A1(t,r);if(Y.ref=e?u:l,Q)return Y.href=Q,Y;const te=ce=>{const ke=R??ce.currentTarget.getAttribute("target");!oe&&!(ce.metaKey||ce.altKey||ce.ctrlKey||ce.shiftKey)&&!ce.defaultPrevented&&(!ke||ke==="_self")&&ce.button===0&&(ce.preventDefault(),s.navigate({...G,replace:m,resetScroll:_,hashScrollIntoView:y,startTransition:b,viewTransition:S,ignoreBlocker:E}))},de=()=>{_e==="intent"&&El(s,G)},ye=()=>{_e==="intent"&&Xf(l)};return Y.onClick=os(C,te),Y.onBlur=os(D,ye),Y.onFocus=os(H,I),Y.onMouseEnter=os(F,I),Y.onMouseLeave=os(B,ye),Y.onTouchStart=
13os(j,de),R1(Y,t,M,re,oe,r)}var E1={},T1={className:"active"},yb=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function A1(t,e){const r={};for(const s in t)yb.has(s)||s==="type"&&e!==void 0||s==="disabled"&&e==="a"||(r[s]=t[s]);return r}function R1(t,e,r,s,l,u){const{activeProps:c,inactiveProps:h,className:p,style:g,target:y}=e,m=Vv(r?c:h,{})??(r?T1:E1);Object.assign(t,m),t.href=s,u!=="a"&&(t.disabled=l),t.target=y;const b=m.style;(g||b)&&(t.style=g&&b?{...g,...b}:g||b);const _=m.className;return(p||_)&&(t.className=p?_?`${p} ${_}`:p:_),l&&(t.role="link",t["aria-disabled"]=!0),r&&(t["data-status"]="active",t["aria-current"]="page"),t}var ka=new WeakMap,Xf=t=>{clearTimeout(ka.get(t)),ka.delete(t)},os=(t,e)=>t?r=>r.defaultPrevented||(t(r),r.defaultPrevented||e(r)):e;function O1(t,e,r){if(r)return;const s=t.maskedLocation??t,l=s.external?s.publicHref:e.history.createHref(s.publicHref)||"/";if(!((s.external||l!==s.publicHref)&&Jv(l,e.protocolAllowlist)))return l}var ed=ue.memo(ue.forwardRef((t,e)=>{const r=t._asChild||"a",s=S1(t,e,r),l=typeof t.children=="function"?t.children({isActive:s["data-status"]==="active"}):t.children;return ue.createElement(r,s,l)}),k1);function k1(t,e){let r=0;for(const s in e)if(r++,t[s]!==e[s]&&(!yb.has(s)||!hn(t[s],e[s],!1,!0)))return!1;for(const s in t)r--;return r===0}var C1=class extends tb{constructor(e){super(e),this.useMatch=r=>vr({...r,from:this.id}),this.useRouteContext=r=>mb({...r,from:this.id}),this.useSearch=r=>pb({...r,from:this.id}),this.useParams=r=>db({...r,from:this.id}),this.useLoaderDeps=r=>hb({...r,from:this.id}),this.useLoaderData=r=>fb({...r,from:this.id}),this.useNavigate=()=>gb({from:this.fullPath}),this.Link=nu.forwardRef((r,s)=>J.jsx(ed,{ref:s,from:this.fullPath,...r}))}};function D1(t){return new C1(t)}function x1(){return t=>N1(t)}var j1=class extends $R{constructor(t){super(t),this.useMatch=e=>vr({...e,from:this.id}),this.useRouteContext=e=>mb({...e,from:this.id}),this.useSearch=e=>pb({...e,from:this.id}),this.useParams=e=>db({...e,from:this.id}),this.useLoaderDeps=e=>hb({...e,from:this.id}),this.useLoaderData=e=>fb({...e,from:this.id}),this.useNavigate=()=>gb({from:this.fullPath}),this.Link=nu.forwardRef((e,r)=>J.jsx(ed,{ref:r,from:this.fullPath,...e}))}};function N1(t){return new j1(t)}function Je(t){return e=>{const r=D1(e);return r.isRoot=!1,r}}function Qe(t,e){let r,s,l;const u=()=>(r||(l=void 0,r=t().then(h=>{r=void 0,c.preload=void 0,s=h[e]}).catch(h=>{r=void 0,l=h})),r),c=function(p){if(l){if(qS(l)&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${l.message}`;if(!sessionStorage.getItem(g))throw sessionStorage.setItem(g,"1"),window.location.reload(),new Promise(()=>{})}throw l}if(!s)if(Gl)Gl(u());else throw u();return ue.createElement(s,p)};return c.preload=u,c}function L1(t){const e=wt(),r=`not-found-${Tn(e.stores.location,s=>s.pathname)}-${Tn(e.stores.status)}`;return J.jsx(Xh,{getResetKey:()=>r,onCatch:(s,l)=>{if(gr(s))t.onCatch?.(s,l);else throw s},errorComponent:({error:s})=>{if(gr(s))return t.fallback?.(s);throw s},children:t.children})}function U1(){return J.jsx("p",{children:"Not Found"})}function vb(t,e,r){return e.options.notFoundComponent?J.jsx(e.options.notFoundComponent,{...r}):t.options.defaultNotFoundComponent?J.jsx(t.options.defaultNotFoundComponent,{...r}):J.jsx(U1,{})}function uu(t,e){const r=e?.options.pendingComponent??t.options.defaultPendingComponent;return r?J.jsx(r,{}):null}var M1=(t,e)=>t[0]===e[0]&&t[1]===e[1],bb=(t,e,r)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||r===!1||r==="data-only"||!t.ssr,_b=ue.memo(function({routeId:e}){const r=wt();return J.jsx(z1,{router:r,match:Tn(r.stores.getMatchStore(e))})});function z1({router:t,match:e}){const r=t.routesById[e.routeId],s=uu(t,r),l=r.options.errorComponent??t.options.defaultErrorComponent,u=r.options.onCatch??t.options.defaultOnCatch,c=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,h=e.ssr===!1||e.ssr==="data-only",p=bb(t,r,e.ssr)&&(r.options.wrapInSuspense??s??(r.options.errorComponent?.preload||h));let g=J.jsx(B1,{match:e});h&&(g=J.jsx(n1,{fallback:s,children:g})),c&&(g=J.jsx(L1,{fallback:b=>{if(b.routeId??=e.routeId,b.routeId!==e.routeId)throw b;return ue.createElement(c,b)},children:g})),l&&(g=J.jsx(Xh,{getResetKey:()=>e,errorComponent:l,onCatch:(b,_)=>{if(gr(b))throw b.routeId??=e.routeId,b;u?.(b,_)},children:g})),p&&(g=J.jsx(ue.Suspense,{fallback:s,children:g}));const y=null,m=r.isRoot?r.options.shellComponent:void 0;
13return J.jsx(Wh.Provider,{value:e.routeId,children:m?J.jsxs(m,{children:[g,y]}):J.jsxs(J.Fragment,{children:[g,y]})})}var B1=ue.memo(function({match:e}){const r=wt(),s=e.routeId,l=r.routesById[s],u=ue.useMemo(()=>{const h=(l.options.remountDeps??r.options.defaultRemountDeps)?.({routeId:s,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return h?JSON.stringify(h):void 0},[s,e.loaderDeps,e._strictParams,e._strictSearch,l.options.remountDeps,r.options.defaultRemountDeps]),c=ue.useMemo(()=>{const h=l.options.component??r.options.defaultComponent;return h?J.jsx(h,{},u):J.jsx(wb,{})},[u,l.options.component,r.options.defaultComponent]);if(e.status==="pending"){if(r.ssr&&!bb(r,l,e.ssr))return c;if(r._tx)throw r._tx[5];return uu(r,l)}if(e.status==="notFound")return vb(r,l,e.error);if(e.status==="error")throw e.error;return c}),wb=ue.memo(function(){const e=wt(),r=ue.useContext(Wh);let s,l,u;{const h=e.stores.getMatchStore(r);[s,l]=Tn(h,p=>[!!p._notFound,p.error],{compare:M1}),u=Tn(e.stores.ids,p=>p[p.indexOf(r)+1])}if(s)return vb(e,e.routesById[r],l);if(!u)return null;const c=J.jsx(_b,{routeId:u});return r===_s?J.jsx(ue.Suspense,{fallback:uu(e),children:c}):c});function Sb(t,e){const r=t[1];t.length=0,r?.(e)}function P1({t}){const e=wt(),r=e._rendered??=[];return e.startTransition=(s,l)=>new Promise(u=>{Sb(r,!1),r.push(l,u),t(e),ue.startTransition(s)}),ob(()=>{const s=e.history.subscribe(e.load);e.updateLatestLocation();const l=e.latestLocation,u=e.buildLocation({to:l.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Sn(l.publicHref)!==Sn(u.publicHref))return e.commitLocation({...u,replace:!0,ignoreBlocker:!0}),s;const c=e.stores.resolvedLocation.get();return c?.href===l.href&&c.state.__TSR_key===l.state.__TSR_key?r.push(e.stores.matches.get(),h=>{h&&e.emit({type:"onRendered",...iu(c,c)})}):e._tx||e.load({sync:!0}).catch(console.error),s},[e,e.history]),null}function H1(){const t=wt(),e=t.routesById[_s],r=uu(t,e),s=J.jsxs(J.Fragment,{children:[J.jsx(P1,{t:ue.useState()[1]}),t.ssr?J.jsx(Qy,{}):J.jsx(ue.Suspense,{fallback:r,children:J.jsx(Qy,{})})]});return t.options.InnerWrap?J.jsx(t.options.InnerWrap,{children:s}):s}function Qy(){const t=wt(),e=t._rendered,r=Tn(t.stores.matches,c=>e[0]??c),s=r[0],l=s?.routeId;ob(()=>{e[0]===r&&Sb(e,!0)},[e,r]);const u=l?J.jsx(_b,{routeId:l}):null;return t.options.disableGlobalCatchBoundary?u:J.jsx(Xh,{getResetKey:()=>s,onCatch:void 0,children:u})}var q1=t=>({createMutableStore:Ky,createReadonlyStore:Ky,batch:u1}),I1=t=>new $1(t),$1=class extends OE{constructor(t){super(t,q1)}};function K1({router:t,children:e,...r}){Fv(r)&&t.update({...t.options,...r,context:{...t.options.context,...r.context}});const s=J.jsx(lb.Provider,{value:t,children:e});return t.options.Wrap?J.jsx(t.options.Wrap,{children:s}):s}function G1({router:t,...e}){return J.jsx(K1,{router:t,...e,children:J.jsx(H1,{})})}function Xy(t,e){if(e)for(const[r,s]of Object.entries(e))r!=="suppressHydrationWarning"&&s!==void 0&&s!==!1&&t.setAttribute(r,typeof s=="boolean"?"":String(s))}function Eb(t){const{attrs:e,children:r,nonce:s,preventScriptHoist:l}=t,u=ue.useMemo(()=>r===void 0?void 0:{__html:r},[r]);switch(t.tag){case"title":return J.jsx("title",{...e,suppressHydrationWarning:!0,children:r});
13case"meta":return J.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return J.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:s,suppressHydrationWarning:!0});case"style":return t.inlineCss,J.jsx("style",{...e,dangerouslySetInnerHTML:u,nonce:s});case"script":return J.jsx(V1,{attrs:e,preventScriptHoist:l,children:r});default:return null}}function V1({attrs:t,children:e,preventScriptHoist:r}){wt();const s=Zh(),l=ue.useMemo(()=>e===void 0?void 0:{__html:e},[e]),u=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(ue.useEffect(()=>{if(!u){if(t?.src){const c=document.createElement("a");c.href=t.src;const h=c.href;for(const g of document.scripts)if(g.src===h)return;const p=document.createElement("script");return Xy(p,t),document.head.appendChild(p),()=>p.remove()}if(typeof e=="string"){const c=typeof t?.type=="string"?t.type:"text/javascript",h=typeof t?.nonce=="string"?t.nonce:void 0;for(const g of document.scripts){if(g.hasAttribute("src"))continue;const y=g.getAttribute("type")??"text/javascript",m=g.getAttribute("nonce")??void 0;if(g.textContent===e&&y===c&&m===h)return}const p=document.createElement("script");return p.textContent=e,Xy(p,t),document.head.appendChild(p),()=>p.remove()}}},[t,e,u]),u&&typeof e=="string")return J.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:l});if(!s){if(t?.src)return J.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return J.jsx("script",{...t,dangerouslySetInnerHTML:l,suppressHydrationWarning:!0})}return null}function F1(t,e,r,s){r=l0(r);const l=r.map(E=>E.meta).filter(E=>E!==void 0),u=[],c={};let h;for(let E=l.length-1;E>=0;E--){const T=l[E];for(let R=T.length-1;R>=0;R--){const C=T[R];if(C)if(C.title)h||(h={tag:"title",children:C.title});else if("script:ld+json"in C)try{const D=JSON.stringify(C["script:ld+json"]);u.push({tag:"script",attrs:{type:"application/ld+json"},children:FS(D)})}catch{}else{const D=C.name??C.property;if(D){if(c[D])continue;c[D]=!0}u.push({tag:"meta",attrs:{...C,nonce:e}})}}}h&&u.push(h),e&&u.push({tag:"meta",attrs:{property:"csp-nonce",content:e}}),u.reverse();const p=r.flatMap(E=>E.links??[]).filter(E=>E!==void 0).map(E=>({tag:"link",attrs:{...E,nonce:e}})),g=t.ssr?.manifest,y=[];g&&(r.forEach(E=>{g.routes[E.routeId]?.css?.forEach(T=>{const R=HR(T);y.push({tag:"link",attrs:{rel:"stylesheet",...R,crossOrigin:eb(s,"stylesheet")??R.crossOrigin,suppressHydrationWarning:!0,nonce:e}})})}),g.inlineStyle&&y.push({tag:"style",attrs:{...g.inlineStyle.attrs,nonce:e},children:g.inlineStyle.children,inlineCss:!0}));const m=[];g&&r.forEach(E=>{g.routes[E.routeId]?.preloads?.forEach(T=>{m.push({tag:"link",attrs:{...BR(g,T,s),nonce:e}})})});const b=r.flatMap(E=>E.styles??[]).filter(E=>E!==void 0).map(({children:E,...T})=>({tag:"style",attrs:{...T,nonce:e},children:E})),_=r.flatMap(E=>E.headScripts??[]).filter(E=>E!==void 0).map(({children:E,...T})=>({tag:"script",attrs:{...T,nonce:e},children:E})),S=[];return wl(S,u),S.push(...m),wl(S,p),S.push(...y),wl(S,b),wl(S,_),S}var Y1=t=>{const e=wt(),r=e.options.ssr?.nonce,s=ue.useCallback(l=>F1(e,r,l,t),[t,r,e]);return Tn(e.stores.matches,s,{compare:hn})};function J1(t){const e=Y1(t.assetCrossOrigin),r=wt().options.ssr?.nonce;return J.jsx(J.Fragment,{children:e.map(s=>ue.createElement(Eb,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:r}))})}var Q1={suppressHydrationWarning:!0},X1=()=>{const t=wt(),e=t.options.ssr?.nonce,r=l=>{const u=qR(l,t.ssr?.manifest,e,Q1);for(const c of u[1])if(typeof c.attrs?.src=="string"){const h=c;h.preventScriptHoist=!0}return u},s=l=>IR(r(l));return Z1(Tn(t.stores.matches,s,{compare:hn}))};function Z1(t){return J.jsx(J.Fragment,{children:t.map((e,r)=>ue.createElement(Eb,{...e,key:`tsr-scripts-${e.tag}-${r}`}))})}var hr=(t,e)=>{const r={type:"request",...e||t},s=l=>hr({},Object.assign(r,{validator:l,inputValidator:l}));return{options:r,middleware:l=>hr({},Object.assign(r,{middleware:l})),validator:s,inputValidator:s,client:l=>hr({},Object.assign(r,{client:l})),server:l=>hr({},Object.assign(r,{server:l}))}};function Tb(t,e){for(let r=0,s=e.length;r<s;r++){const l=e[r];t.has(l)||(t.add(l),l.extends&&Tb(t,l.extends))}}var W1=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const r=new Set;Tb(r,e.serializationAdapters),e.serializationAdapters=Array.from(r)}return e},createMiddleware:hr});function cu(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(t);l<s.length;l++)e.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(t,s[l])&&(r[s[l]]=t[s[l]]);return r}function eO(t,e,r,s){function l(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function h(y){try{g(s.next(y))}catch(m){c(m)}}function p(y){try{g(s.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(h,p)}g((s=s.apply(t,e||[])).next())})}const tO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);
13class td extends Error{constructor(e,r="FunctionsError",s){super(e),this.name=r,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class nO extends td{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Zy extends td{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Wy extends td{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var vh;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(vh||(vh={}));class iO{constructor(e,{headers:r={},customFetch:s,region:l=vh.Any}={}){this.url=e,this.headers=r,this.region=l,this.fetch=tO(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return eO(this,arguments,void 0,function*(r,s={}){var l;let u,c;try{const{headers:h,method:p,body:g,signal:y,timeout:m}=s;let b={},{region:_}=s;_||(_=this.region);const S=new URL(`${this.url}/${r}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let E;const T=!!h&&Object.keys(h).some(B=>B.toLowerCase()==="content-type");g&&!T?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",E=g):typeof g=="string"?(b["Content-Type"]="text/plain",E=g):typeof FormData<"u"&&g instanceof FormData?E=g:(b["Content-Type"]="application/json",E=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?E=JSON.stringify(g):E=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 C=yield this.fetch(S.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),h),body:E,signal:R}).catch(B=>{throw new nO(B)}),D=C.headers.get("x-relay-error");if(D&&D==="true")throw new Zy(C);if(!C.ok)throw new Wy(C);let H=((l=C.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),F;return H==="application/json"?F=yield C.json():H==="application/octet-stream"||H==="application/pdf"?F=yield C.blob():H==="text/event-stream"?F=C:H==="multipart/form-data"?F=yield C.formData():F=yield C.text(),{data:F,error:null,response:C}}catch(h){return{data:null,error:h,response:h instanceof Wy||h instanceof Zy?h.context:void 0}}finally{u&&clearTimeout(u)}})}}const Ab=3,ev=t=>Math.min(1e3*2**t,3e4),rO=[520,503],Rb=["GET","HEAD","OPTIONS"];var tv=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
13de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function nv(t,e){return new Promise(r=>{if(e?.aborted){r();return}const s=setTimeout(()=>{e?.removeEventListener("abort",l),r()},t);function l(){clearTimeout(s),r()}e?.addEventListener("abort",l)})}function sO(t,e,r,s){return!(!s||r>=Ab||!Rb.includes(t)||!rO.includes(e))}var aO=class{constructor(t){var e,r,s,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(s=t.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(l=t.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u=t.retry)!==null&&u!==void 0?u:!0,t.fetch?this.fetch=t.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(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=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 s=this.fetch;let u=(async()=>{let c=0;for(;;){const g={};r.headers.forEach((m,b)=>{g[b]=m}),c>0&&(g["X-Retry-Count"]=String(c));let y;try{y=await s(r.url.toString(),{method:r.method,headers:g,body:JSON.stringify(r.body,(m,b)=>typeof b=="bigint"?b.toString():b),signal:r.signal})}catch(m){if(m?.name==="AbortError"||m?.code==="ABORT_ERR"||!Rb.includes(r.method))throw m;if(r.retryEnabled&&c<Ab){const b=ev(c);c++,await nv(b,r.signal);continue}throw m}if(sO(r.method,y.status,c,r.retryEnabled)){var h,p;const m=(h=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&h!==void 0?h:null,b=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:ev(c);await y.text(),c++,await nv(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var h;let p="",g="",y="";const m=c?.cause;if(m){var b,_,S,E;const C=(b=m?.message)!==null&&b!==void 0?b:"",D=(_=m?.code)!==null&&_!==void 0?_:"";p=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,p+=` 14 15Caused by: ${(E=m?.name)!==null&&E!==void 0?E:"Error"}: ${C}`,D&&(p+=` (${D})`),m?.stack&&(p+=` 16${m.stack}`)}else{var T;p=(T=c?.stack)!==null&&T!==void 0?T:""}const R=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(y="",g="Request was aborted (timeout or manual cancellation)",R>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${R} 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)",R>this.urlLengthLimit&&(g+=`. Your request URL is ${R} 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:`${(h=c?.name)!==null&&h!==void 0?h:"FetchError"}: ${c?.message}`,details:p,hint:g,code:y},data:null,count:null,status:0,statusText:""}})),u.then(t,e)}async processResponse(t){var e=this;
16let r=null,s=null,l=null,u=t.status,c=t.statusText;if(t.ok){var h,p;if(e.method!=="HEAD"){var g;const b=await t.text();if(b!=="")if(e.headers.get("Accept")==="text/csv")s=b;else if(e.headers.get("Accept")&&(!((g=e.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text")))s=b;else try{s=JSON.parse(b)}catch{if(r={message:b},s=null,e.shouldThrowOnError)throw new tv({message:b,details:"",hint:"",code:""})}}const y=(h=e.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),m=(p=t.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&m&&m.length>1&&(l=parseInt(m[1])),e.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(r={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,l=null,u=406,c="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{const y=await t.text();try{r=JSON.parse(y),Array.isArray(r)&&t.status===404&&(s=[],r=null,u=200,c="OK")}catch{t.status===404&&y===""?(u=204,c="No Content"):r={message:y}}if(r&&e.shouldThrowOnError)throw new tv(r)}return{success:r===null,error:r,data:s,count:l,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},oO=class extends aO{throwOnError(){return super.throwOnError()}select(t){let e=!1;const r=(t??"*").split("").map(s=>/\s/.test(s)&&!e?"":(s==='"'&&(e=!e),s)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:s,referencedTable:l=s}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:s=r}={}){const l=typeof s>"u"?"offset":`${s}.offset`,u=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(l,`${t}`),this.url.searchParams.set(u,`${e-t+1}`),this}abortSignal(t){return this.signal=t,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:t=!1,verbose:e=!1,settings:r=!1,buffers:s=!1,wal:l=!1,format:u="text"}={}){var c;const h=[t?"analyze":null,e?"verbose":null,r?"settings":null,s?"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=${h};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const iv=new RegExp("[,()]");var hs=class extends oO{throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(s=>typeof s=="string"&&iv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(s=>typeof s=="string"&&iv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:s}={}){let l="";s==="plain"?l="pl":s==="phrase"?l="ph":s==="websearch"&&(l="w");const u=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${l}fts${u}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>
16r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},lO=class{constructor(t,{headers:e={},schema:r,fetch:s,urlLengthLimit:l=8e3,retry:u}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=s,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:s}=e??{},l=r?"HEAD":"GET";let u=!1;const c=(t??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:h,headers:p}=this.cloneRequestState();return h.searchParams.set("select",c),s&&p.append("Prefer",`count=${s}`),new hs({method:l,url:h,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var s;const l="POST",{url:u,headers:c}=this.cloneRequestState();if(e&&c.append("Prefer",`count=${e}`),r||c.append("Prefer","missing=default"),Array.isArray(t)){const h=t.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(h.length>0){const p=[...new Set(h)].map(g=>`"${g}"`);u.searchParams.set("columns",p.join(","))}}return new hs({method:l,url:u,headers:c,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:s,defaultToNull:l=!0}={}){var u;const c="POST",{url:h,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&h.searchParams.set("on_conflict",e),s&&p.append("Prefer",`count=${s}`),l||p.append("Prefer","missing=default"),Array.isArray(t)){const g=t.reduce((y,m)=>y.concat(Object.keys(m)),[]);if(g.length>0){const y=[...new Set(g)].map(m=>`"${m}"`);h.searchParams.set("columns",y.join(","))}}return new hs({method:c,url:h,headers:p,schema:this.schema,body:t,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const s="PATCH",{url:l,headers:u}=this.cloneRequestState();return e&&u.append("Prefer",`count=${e}`),new hs({method:s,url:l,headers:u,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:s,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new hs({method:r,url:s,headers:l,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Pa(t){"@babel/helpers - typeof";return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pa(t)}function uO(t,e){if(Pa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,e);if(Pa(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cO(t){var e=uO(t,"string");return Pa(e)=="symbol"?e:e+""}function fO(t,e,r){return(e=cO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,s)}return r}function Tl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rv(Object(r),!0).forEach(function(s){fO(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rv(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}var hO=class Ob{constructor(e,{headers:r={},schema:s,fetch:l,timeout:u,urlLengthLimit:c=8e3,retry:h}={}){this.url=e,this.headers=new Headers(r),this.schemaName=s,this.urlLengthLimit=c;const p=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,y)=>{const m=new AbortController,b=setTimeout(()=>m.abort(),u),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(g,y);const S=()=>{clearTimeout(b),m.abort()};return _.addEventListener("abort",S,{once:!0}),p(g,Tl(Tl({},y),{},{signal:m.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return p(g,Tl(Tl({},y),{},{signal:m.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=h}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new lO(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Ob(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:s=!1,get:l=!1,count:u}={}){var c;let h;const p=new URL(`${this.url}/rpc/${e}`);let g;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),m=s&&Object.values(r).some(y);m?(h="POST",g=r):s||l?(h=s?"HEAD":"GET",Object.entries(r).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}
16`]).forEach(([_,S])=>{p.searchParams.append(_,S)})):(h="POST",g=r);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 hs({method:h,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 dO{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const s=typeof global<"u"?global:void 0;if(s&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};if(typeof globalThis<"u"&&typeof r.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"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}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 e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 17 18Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const pO="2.110.1",gO=`realtime-js/${pO}`,mO="1.0.0",kb="2.0.0",yO=kb,vO=1e4,bO=100,xi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Cb={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},bh={connecting:"connecting",closing:"closing",closed:"closed"};class _O{constructor(e){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=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,s;const l=(s=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(e){var r,s;const l=(s=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&s!==void 0?s:{},c=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(e,r,s){var l,u;const c=e.topic,h=(l=e.ref)!==null&&l!==void 0?l:"",p=(u=e.join_ref)!==null&&u!==void 0?u:"",g=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.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(h.length>255)throw new Error(`ref length ${h.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+h.length+c.length+g.length+m.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),E=0;S.setUint8(E++,this.KINDS.userBroadcastPush),S.setUint8(E++,p.length),S.setUint8(E++,h.length),S.setUint8(E++,c.length),S.setUint8(E++,g.length),S.setUint8(E++,m.length),S.setUint8(E++,r),Array.from(p,R=>S.setUint8(E++,R.charCodeAt(0))),Array.from(h,R=>S.setUint8(E++,R.charCodeAt(0))),Array.from(c,R=>S.setUint8(E++,R.charCodeAt(0))),Array.from(g,R=>S.setUint8(E++,R.charCodeAt(0))),Array.from(m,R=>S.setUint8(E++,R.charCodeAt(0)));var T=new Uint8Array(_.byteLength+s.byteLength);
18return T.set(new Uint8Array(_),0),T.set(new Uint8Array(s),_.byteLength),T.buffer}decode(e,r){if(this._isArrayBuffer(e)){let s=this._binaryDecode(e);return r(s)}if(typeof e=="string"){const s=JSON.parse(e),[l,u,c,h,p]=s;return r({join_ref:l,ref:u,topic:c,event:h,payload:p})}return r({})}_binaryDecode(e){const r=new DataView(e),s=r.getUint8(0),l=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,r,l)}_decodeUserBroadcast(e,r,s){const l=r.getUint8(1),u=r.getUint8(2),c=r.getUint8(3),h=r.getUint8(4);let p=this.HEADER_LENGTH+4;const g=s.decode(e.slice(p,p+l));p=p+l;const y=s.decode(e.slice(p,p+u));p=p+u;const m=s.decode(e.slice(p,p+c));p=p+c;const b=e.slice(p,e.byteLength),_=h===this.JSON_ENCODING?JSON.parse(s.decode(b)):b,S={type:this.BROADCAST_EVENT,event:y,payload:_};return c>0&&(S.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([s])=>r.includes(s)))}}var Be;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Be||(Be={}));const sv=(t,e,r={})=>{var s;const l=(s=r.skipTypes)!==null&&s!==void 0?s:[];return e?Object.keys(e).reduce((u,c)=>(u[c]=wO(c,t,e,l),u),{}):{}},wO=(t,e,r,s)=>{const l=e.find(h=>h.name===t),u=l?.type,c=r[t];return u&&!s.includes(u)?Db(u,c):_h(c)},Db=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return AO(e,r)}switch(t){case Be.bool:return SO(e);case Be.float4:case Be.float8:case Be.int2:case Be.int4:case Be.int8:case Be.numeric:case Be.oid:return EO(e);case Be.json:case Be.jsonb:return TO(e);case Be.timestamp:return RO(e);case Be.abstime:case Be.date:case Be.daterange:case Be.int4range:case Be.int8range:case Be.money:case Be.reltime:case Be.text:case Be.time:case Be.timestamptz:case Be.timetz:case Be.tsrange:case Be.tstzrange:return _h(e);default:return _h(e)}},_h=t=>t,SO=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},EO=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},TO=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},AO=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,s=t[r];if(t[0]==="{"&&s==="}"){let u;const c=t.slice(1,r);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(h=>Db(e,h))}return t},RO=t=>typeof t=="string"?t.replace(" ","T"):t,xb=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Ca=t=>typeof t=="function"?t:function(){return t},OO=typeof self<"u"?self:null,ds=typeof window<"u"?window:null,bn=OO||ds||globalThis,kO="2.0.0",CO=1e4,DO=1e3,wn={connecting:0,open:1,closing:2,closed:3},Ct={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Yn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},wh={longpoll:"longpoll",websocket:"websocket"},xO={complete:4},Sh="base64url.bearer.phx.",Al=class{constructor(t,e,r,s){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,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,j
vendor: 8,439 bytes, line 18
18oin_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(s=>s.status===t).forEach(s=>s.callback(e))}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,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},jb=class{constructor(t,e){this.callback=t,this.timerCalc=e,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))}},jO=class{constructor(t,e,r){this.state=Ct.closed,this.topic=t,this.params=Ca(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Al(this,Yn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new jb(()=>{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=Ct.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=Ct.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ct.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=Ct.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 Al(this,Yn.leave,Ca({}),this.timeout).send(),this.state=Ct.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Yn.reply,(s,l)=>{this.trigger(this.replyEventName(l),s)})}join(t=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=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ct.closed,this.bindings=[]}onClose(t){this.on(Yn.close,t)}onError(t){return this.on(Yn.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new Al(this,t,function(){return e},r);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ct.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Yn.close,"leave")},r=new Al(this,Yn.leave,Ca({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,s){return this.topic!==t?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ct.joining,this.joinPush.resend(t))}trigger(t,e,r,s){let l=this.onMessage(t,e,r,s);if(e&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===t&&this.filterBindings(c,e,r));for(let c=0;c<u.length;c++)u[c].callback(l,r,s||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===Ct.closed}isErrored(){return this.state===Ct.errored}isJoined(){return this.state===Ct.joined}isJoining(){return this.state===Ct.joining}isLeaving(){return this.state===Ct.leaving}},Fl=class{static request(t,e,r,s,l,u,c){if(bn.XDomainRequest){let h=new bn.XDomainRequest;return this.xdomainRequest(h,t,e,s,l,u,c)}else if(bn.XMLHttpRequest){let h=new bn.XMLHttpRequest;return this.xhrRequest(h,t,e,r,s,l,u,c)}else{if(bn.fetch&&bn.AbortController)return this.fetchRequest(t,e,r,s,l,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,s,l,u,c){let h={method:t,headers:r,body:s},p=null;return l&&(p=new AbortController,setTimeout(()=>p.abort(),l),h.signal=p.signal),bn.fetch(e,h).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(t,e,r,s,l,u,c){return t.timeout=l,t.open(e,r),t.onload=()=>{let h=this.parseJSON(t.responseText);c&&c(h)},u&&(t.ontimeout=u),t.onprogress=()=>{},t.send(s),t}static xhrRequest(t,e,r,s,l,u,c,h){t.open(e,r,!0),t.timeout=u;for(let[p,g]of Object.entries(s))t.setRequestHeader(p,g);return t.onerror=()=>h&&h(null),t.onreadystatechange=()=>{if(t.readyState===xO.complete&&h){let p=this.parseJSON(t.responseText);h(p)}},c&&(t.ontimeout=c),t.send(l),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let l=e?`${e}[${s}]`:s,u=t[s];typeof u=="object"?r.push(this.serialize(u,l)):r.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},NO=t=>{let e="",r=new Uint8Array(t),s=r.byteLength;for(let l=0;l<s;l++)e+=String.fromCharCode(r[l]);return btoa(e)},ls=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Sh)&&(this.authToken=atob(e[1].slice(Sh.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(t),this.readyState=wn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+wh.websocket),"$1/"+wh.longpoll)}endpointURL(){return Fl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=wn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===wn.open||this.readyState===wn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:s,messages:l}=e;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else r=0;switch(r){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=wn.open,this.onopen({}),this.poll();break;
18case 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 ${r}`)}})}send(t){typeof t!="string"&&(t=NO(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 19`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let l of this.reqs)l.abort();this.readyState=wn.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(t,e,r,s,l){let u,c=()=>{this.reqs.delete(u),s()};u=Fl.request(t,this.endpointURL(),e,r,this.timeout,c,h=>{this.reqs.delete(u),this.isActive()&&l(h)}),this.reqs.add(u)}},LO=class Ta{constructor(e,r={}){let s=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,l=>{let{onJoin:u,onLeave:c,onSync:h}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ta.syncState(this.state,l,u,c),this.pendingDiffs.forEach(p=>{this.state=Ta.syncDiff(this.state,p,u,c)}),this.pendingDiffs=[],h()}),this.channel.on(s.diff,l=>{let{onJoin:u,onLeave:c,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Ta.syncDiff(this.state,l,u,c),h())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Ta.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,s,l){let u=this.clone(e),c={},h={};return this.map(u,(p,g)=>
19{r[p]||(h[p]=g)}),this.map(r,(p,g)=>{let y=u[p];if(y){let m=g.metas.map(E=>E.phx_ref),b=y.metas.map(E=>E.phx_ref),_=g.metas.filter(E=>b.indexOf(E.phx_ref)<0),S=y.metas.filter(E=>m.indexOf(E.phx_ref)<0);_.length>0&&(c[p]=g,c[p].metas=_),S.length>0&&(h[p]=this.clone(y),h[p].metas=S)}else c[p]=g}),this.syncDiff(u,{joins:c,leaves:h},s,l)}static syncDiff(e,r,s,l){let{joins:u,leaves:c}=this.clone(r);return s||(s=function(){}),l||(l=function(){}),this.map(u,(h,p)=>{let g=e[h];if(e[h]=this.clone(p),g){let y=e[h].metas.map(b=>b.phx_ref),m=g.metas.filter(b=>y.indexOf(b.phx_ref)<0);e[h].metas.unshift(...m)}s(h,g,p)}),this.map(c,(h,p)=>{let g=e[h];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(h,g,p),g.metas.length===0&&delete e[h]}),e}static list(e,r){return r||(r=function(s,l){return l}),this.map(e,(s,l)=>r(s,l))}static map(e,r){return Object.getOwnPropertyNames(e).map(s=>r(s,e[s]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Rl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,s,l,u,c]=JSON.parse(t);return e({join_ref:r,ref:s,topic:l,event:u,payload:c})}},binaryEncode(t){let{join_ref:e,ref:r,event:s,topic:l,payload:u}=t,c=this.META_LENGTH+e.length+r.length+l.length+s.length,h=new ArrayBuffer(this.HEADER_LENGTH+c),p=new DataView(h),g=0;p.setUint8(g++,this.KINDS.push),p.setUint8(g++,e.length),p.setUint8(g++,r.length),p.setUint8(g++,l.length),p.setUint8(g++,s.length),Array.from(e,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(r,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(l,m=>p.setUint8(g++,m.charCodeAt(0))),Array.from(s,m=>p.setUint8(g++,m.charCodeAt(0)));var y=new Uint8Array(h.byteLength+u.byteLength);return y.set(new Uint8Array(h),0),y.set(new Uint8Array(u),h.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,s);case this.KINDS.reply:return this.decodeReply(t,e,s);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,s)}},decodePush(t,e,r){let s=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,h=r.decode(t.slice(c,c+s));c=c+s;let p=r.decode(t.slice(c,c+l));c=c+l;let g=r.decode(t.slice(c,c+u));c=c+u;let y=t.slice(c,t.byteLength);return{join_ref:h,ref:null,topic:p,event:g,payload:y}},decodeReply(t,e,r){let s=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),c=e.getUint8(4),h=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(t.slice(h,h+s));h=h+s;let g=r.decode(t.slice(h,h+l));h=h+l;let y=r.decode(t.slice(h,h+u));h=h+u;let m=r.decode(t.slice(h,h+c));h=h+c;let b=t.slice(h,t.byteLength),_={status:m,response:b};return{join_ref:p,ref:g,topic:y,event:Yn.reply,payload:_}},decodeBroadcast(t,e,r){let s=e.getUint8(1),l=e.getUint8(2),u=this.HEADER_LENGTH+2,c=r.decode(t.slice(u,u+s));u=u+s;let h=r.decode(t.slice(u,u+l));u=u+l;let p=t.slice(u,t.byteLength);return{join_ref:null,ref:null,topic:c,event:h,payload:p}}},UO=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||CO,this.transport=e.transport||bn.WebSocket||ls,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=bn&&bn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Rl.encode.bind(Rl),this.defaultDecoder=Rl.decode.bind(Rl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ls?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;ds&&ds.addEventListener&&(ds.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),s=this.connectClock)}),ds.addEventListener("pageshow",l=>{s===this.connectClock&&(s=null,this.connect())}),ds.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>e.rejoinAfterMs?e.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>e.reconnectAfterMs?e.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(l,u,c)=>{console.log(`${l}: ${u}`,c)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Ca(e.params||{}),this.endPoint=`${t}/${wh.websocket}`,this.vsn=e.vsn||kO,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new jb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return ls}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.
vendor: 4,337 bytes, line 19
19close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Fl.appendParams(Fl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Ca(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ls?this.connectWithFallback(ls,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let s=this.onMessage(l=>{l.ref===e&&(this.off([s]),t(Date.now()-r))});return!0}transportName(t){return t===ls?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Sh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,s=!0,l,u,c=this.transportName(t),h=p=>{this.log("transport",`falling back to ${c}...`,p),this.off([l,u]),s=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return h("memorized");this.fallbackTimer=setTimeout(h,e),u=this.onError(p=>{this.log("transport","error",p),s&&!r&&(clearTimeout(this.fallbackTimer),h(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!s){let p=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,e),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(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),DO,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const s=this.conn;this.waitForBufferDone(s,()=>{e?s.close(e,r||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
19,this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===wn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Yn.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case wn.connecting:return"connecting";case wn.open:return"open";case wn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new jO(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:s,ref:l,join_ref:u}=t;this.log("push",`${e} ${r} (${u}, ${l})`,s)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}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(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:s,payload:l,ref:u,join_ref:c}=e;if(u&&u===this.pendingHeartbeatRef){const h=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",h)}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||""} ${r} ${s} ${u&&"("+u+")"||""}`.trim(),l);for(let h=0;h<this.channels.length;h++){const p=this.channels[h];p.isMember(r,s,l,c)&&p.trigger(s,l,u,c)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,s])=>{try{s(...e)}catch(l){this.log("error",`error in ${t} callback`,l)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class Da{constructor(e,r){const s=zO(r);this.presence=new LO(e.getChannel(),s),this.presence.onJoin((l,u,c)=>{const h=Da.onJoinPayload(l,u,c);e.getChannel().trigger("presence",h)}),this.presence.onLeave((l,u,c)=>{const h=Da.onLeavePayload(l,u,c);e.getChannel().trigger("presence",h)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Da.transformState(this.presence.state)}static transformState(e){return e=MO(e),Object.getOwnPropertyNames(e).reduce((r,s)=>{const l=e[s];return r[s]=Hl(l),r},{})}static onJoinPayload(e,r,s){const l=av(r),u=Hl(s);return{event:"join",key:e,currentPresences:l,newPresences:u}}static onLeavePayload(e,r,s){const l=av(r),u=Hl(s);return{event:"leave",key:e,currentPresences:l,leftPresences:u}}}function Hl(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function MO(t){return JSON.parse(JSON.stringify(t))}function zO(t){return t?.events&&{events:t.events}}function av(t){return t?.metas?Hl(t):[]}var ov;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(ov||(ov={}));class BO{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new Da(this.channel.channelAdapter,r)}}function PO(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
19if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class HO{constructor(e,r,s){const l=qO(s);this.channel=e.getSocket().channel(r,l),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,s){let l;try{l=this.channel.push(e,r,s)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>bO){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(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===xi.joined}isJoined(){return this.state===xi.joined}isJoining(){return this.state===xi.joining}isClosed(){return this.state===xi.closed}isLeaving(){return this.state===xi.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function qO(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const IO=/[,()"\\]/,$O=t=>IO.test(t)||t!==t.trim(),KO=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,lv=t=>{const e=t===null?"null":String(t);return $O(e)?KO(e):e},GO=t=>t===null?"null":String(t),VO=(t,e)=>{if(t==="in"){const r=Array.isArray(e)?e:[e];if(r.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(r)).map(l=>lv(l)).join(",")})`}return t==="is"?`is.${GO(e)}`:`${t}.${lv(e)}`};class FO{constructor(){this.filters=[]}add(e,r,s,l=!1){const u=l?"not.":"";return this.filters.push(`${e}=${u}${VO(r,s)}`),this}eq(e,r){return this.add(e,"eq",r)}neq(e,r){return this.add(e,"neq",r)}gt(e,r){return this.add(e,"gt",r)}gte(e,r){return this.add(e,"gte",r)}lt(e,r){return this.add(e,"lt",r)}lte(e,r){return this.add(e,"lte",r)}in(e,r){return this.add(e,"in",r)}like(e,r){return this.add(e,"like",r)}ilike(e,r){return this.add(e,"ilike",r)}match(e,r){return this.add(e,"match",r)}imatch(e,r){return this.add(e,"imatch",r)}is(e,r){return this.add(e,"is",r)}isDistinct(e,r){return this.add(e,"isdistinct",r)}not(e,r,s){return this.add(e,r,s,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var uv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(uv||(uv={}));var vs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(vs||(vs={}));var Jn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Jn||(Jn={}));class xa{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}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(e,r={config:{}},s){var l,u;if(this.topic=e,this.params=r,this.socket=s,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new HO(this.socket.socketAdapter,e,this.params),this.presence=new BO(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=xb(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(e,r=this.timeout){var s,l,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:h,private:p}}=this.params,g=(l=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(_=>_.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[vs.PRESENCE]&&this.bindings[vs.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({},h),{enabled:y}),postgres_changes:g,private:p};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(Jn.CHANNEL_ERROR,PO(_))}),this._onClose(()=>e?.(Jn.CLOSED)),this.updateJoinPayload(Object.assign({config:b},m)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:_})=>
19{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(Jn.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=xi.errored;const S=Object.values(_).join(", ")||"error";e?.(Jn.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{e?.(Jn.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var s;const l=this.bindings.postgres_changes,u=(s=l?.length)!==null&&s!==void 0?s:0,c=[];for(let h=0;h<u;h++){const p=l[h],{filter:{event:g,schema:y,table:m,filter:b}}=p,_=e&&e[h];if(_&&_.event===g&&xa.isFilterValueEqual(_.schema,y)&&xa.isFilterValueEqual(_.table,m)&&xa.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=xi.errored,r?.(Jn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=xi.errored&&r&&r(Jn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,s){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=e===vs.PRESENCE||e===vs.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,s)}async httpSend(e,r,s={}){var l;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=r instanceof ArrayBuffer||ArrayBuffer.isView(r),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 h=new URL(this.broadcastEndpointURL);h.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&h.searchParams.set("private","true");const p={method:"POST",headers:c,body:u?r:JSON.stringify(r)},g=await this._fetchWithTimeout(h.toString(),p,(l=s.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(e,r={}){var s,l;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
19in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=e,h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(s=r.timeout)!==null&&s!==void 0?s: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,h,p;const g=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((p=(h=(c=this.params)===null||c===void 0?void 0:c.config)===null||h===void 0?void 0:h.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(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,s){const l=new AbortController,u=setTimeout(()=>l.abort(),s),c=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:l.signal}));return clearTimeout(u),c}_on(e,r,s){const l=e.toLocaleLowerCase(),u=r?.filter;(u instanceof FO||typeof u=="object"&&u!==null&&typeof u.build=="function")&&(r=Object.assign(Object.assign({},r),{filter:u.build()}));const c=this.channelAdapter.on(e,s),h={type:l,filter:r,callback:s,ref:c};return this.bindings[l]?this.bindings[l].push(h):this.bindings[l]=[h],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,s)=>{var l,u,c,h,p,g,y;const m=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,s))return!1;const b=(l=this.bindings[m])===null||l===void 0?void 0:l.find(_=>_.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in b){const _=b.id,S=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=r.ids)===null||c===void 0?void 0:c.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((h=r.data)===null||h===void 0?void 0:h.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=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===m})}_notThisChannelEvent(e,r){const{close:s,error:l,leave:u,join:c}=Cb;return r&&[s,l,u,c].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,s)=>{if(typeof r=="object"&&"ids"in r){const l=r.data,{schema:u,table:c,commit_timestamp:h,type:p,errors:g}=l;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:h,eventType:p,new:{},old:{},errors:g}),this._getPayloadRecords(l))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const s of e.bindings[r])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=sv(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=sv(e.columns,e.old_record)),r}}class YO{constructor(e,r){this.socket=new UO(e,r)}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(e){this.socket.heartbeatCallback=e}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(e,r,s,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{e(),u("ok")},r,s)})}push(e){this.socket.push(e)}log(e,r,s){this.socket.log(e,r,s)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==bh.connecting}isDisconnecting(){return this.socket.connectionState()==bh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const cv={HEARTBEAT_INTERVAL:25e3},JO=[1e3,2e3,5e3,1e4],QO=1e4;function XO(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function ZO(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return XO()}const WO=` 20 addEventListener("message", (e) => { 21 if (e.data.event === "start") { 22 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 23 } 24 });`;class ek{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(e,r){var s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
24,this.ref=0,this.serializer=new _O,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),!(!((s=r?.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const l=this._initializeOptions(r);this.socketAdapter=new YO(e,l),this.httpEndpoint=xb(e),this.fetch=this._resolveFetch(r?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const r=e.message;throw new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async s=>{const l=await s.unsubscribe();return s.teardown(),l}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,s){this.socketAdapter.log(e,r,s)}connectionState(){return this.socketAdapter.connectionState()||bh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const s=`realtime:${e}`,l=this.getChannels().find(u=>u.topic===s);if(l)return l;{const u=new xa(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.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}
24this._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(e=null){let r,s=!1;if(e)r=e,s=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),r=this.accessTokenValue}else r=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(l=>{const u={access_token:r,version:gO};r&&l.updateJoinPayload(u),l.joinedOnce&&l.channelAdapter.isJoined()&&l.channelAdapter.push(Cb.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,s)=>{r!=="disconnected"&&(r=="sent"&&this._setAuthSafely(),e&&e(r,s))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.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(e){let r;if(e)r=e;else{const s=new Blob([WO],{type:"application/javascript"});r=URL.createObjectURL(s)}return r}_initializeOptions(e){var r,s,l,u,c,h,p,g,y,m,b,_;this.worker=(r=e?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(s=e?.accessToken)!==null&&s!==void 0?s:null;const S={};S.timeout=(l=e?.timeout)!==null&&l!==void 0?l:vO,S.heartbeatIntervalMs=(u=e?.heartbeatIntervalMs)!==null&&u!==void 0?u:cv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=e?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((h=e?.heartbeatIntervalMs)!==null&&h!==void 0?h:cv.HEARTBEAT_INTERVAL),S.transport=(p=e?.transport)!==null&&p!==void 0?p:dO.getWebSocketConstructor(),S.params=e?.params,S.logger=e?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),S.sessionStorage=(g=e?.sessionStorage)!==null&&g!==void 0?g:ZO(),S.reconnectAfterMs=(y=e?.reconnectAfterMs)!==null&&y!==void 0?y:(C=>JO[C-1]||QO);let E,T;const R=(m=e?.vsn)!==null&&m!==void 0?m:yO;switch(R){case mO:E=(C,D)=>D(JSON.stringify(C)),T=(C,D)=>D(JSON.parse(C));break;case kb:E=this.serializer.encode.bind(this.serializer),T=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=R,S.encode=(b=e?.encode)!==null&&b!==void 0?b:E,S.decode=(_=e?.decode)!==null&&_!==void 0?_:T,S.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
24var Ha=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function tk(t,e,r){const s=new URL(e,t);if(r)for(const[l,u]of Object.entries(r))u!==void 0&&s.searchParams.set(l,u);return s.toString()}async function nk(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function ik(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:s,query:l,body:u,headers:c}){const h=tk(t.baseUrl,s,l),p=await nk(t.auth),g=await e(h,{method:r,headers:{...u?{"Content-Type":"application/json"}:{},...p,...c},body:u?JSON.stringify(u):void 0}),y=await g.text(),m=(g.headers.get("content-type")||"").includes("application/json"),b=m&&y?JSON.parse(y):y;if(!g.ok){const _=m?b:void 0,S=_?.error;throw new Ha(S?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:S?.type,icebergCode:S?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function Ol(t){return t.join("�")}var rk=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Ol(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ol(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ol(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ol(t.namespace)}`}),!0}catch(e){if(e instanceof Ha&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof Ha&&r.status===409)return;throw r}}};function us(t){return t.join("�")}var sk=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${us(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${us(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${us(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${us(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${us(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${us(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof Ha&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof Ha&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},ak=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=ik({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new rk(this.client,e),this.tableOps=new sk(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
24async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function qa(t){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qa(t)}function ok(t,e){if(qa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,e);if(qa(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function lk(t){var e=ok(t,"string");return qa(e)=="symbol"?e:e+""}function uk(t,e,r){return(e=lk(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,s)}return r}function le(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fv(Object(r),!0).forEach(function(s){uk(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fv(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}var fu=class extends Error{constructor(t,e="storage",r,s){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function hu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Eh=class extends fu{constructor(t,e,r,s="storage"){super(t,s,e,r),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return le({},super.toJSON())}},Nb=class extends fu{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Yl(t,e,r){const s=le({},t),l=e.toLowerCase();for(const u of Object.keys(s))u.toLowerCase()===l&&delete s[u];return s[l]=r,s}function ck(t){const e={};for(const[r,s]of Object.entries(t))e[r.toLowerCase()]=s;return e}const fk=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),hk=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Th=t=>{if(Array.isArray(t))return t.map(r=>Th(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,s])=>{const l=r.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));e[l]=Th(s)}),e},dk=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),hv=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},pk=async(t,e,r,s)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const l=t;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(c=>{const h=c?.statusCode||c?.code||u+"";e(new Eh(hv(c),u,h,s))}).catch(()=>{const c=u+"";e(new Eh(l.statusText||`HTTP ${u}
24 error`,u,c,s))})}else e(new Nb(hv(t),t,s))},gk=(t,e,r,s)=>{const l={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!s)return le(le({},l),r);if(hk(s)){var u;const c=e?.headers||{};let h;for(const[p,g]of Object.entries(c))p.toLowerCase()==="content-type"&&(h=g);l.headers=Yl(c,"Content-Type",(u=h)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(s)}else l.body=s;return e?.duplex&&(l.duplex=e.duplex),le(le({},l),r)};async function Ea(t,e,r,s,l,u,c){return new Promise((h,p)=>{t(r,gk(e,s,l,u)).then(g=>{if(!g.ok)throw g;if(s?.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=>h(g)).catch(g=>pk(g,p,s,c))})}function Lb(t="storage"){return{get:async(e,r,s,l)=>Ea(e,"GET",r,s,l,void 0,t),post:async(e,r,s,l,u)=>Ea(e,"POST",r,l,u,s,t),put:async(e,r,s,l,u)=>Ea(e,"PUT",r,l,u,s,t),head:async(e,r,s,l)=>Ea(e,"HEAD",r,le(le({},s),{},{noResolveJson:!0}),l,void 0,t),remove:async(e,r,s,l,u)=>Ea(e,"DELETE",r,l,u,s,t)}}const mk=Lb("storage"),{get:Ia,post:on,put:Ah,head:yk,remove:$a}=mk,qt=Lb("vectors");var Ts=class{constructor(t,e={},r,s="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=ck(e),this.fetch=fk(r),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Yl(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(hu(r))return{data:null,error:r};throw r}}};let Ub;Ub=Symbol.toStringTag;var vk=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Ub]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(hu(e))return{data:null,error:e};throw e}}};let Mb;Mb=Symbol.toStringTag;var bk=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Mb]="BlobDownloadBuilder",this.promise=null}asStream(){return new vk(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(hu(e))return{data:null,error:e};throw e}}};const Zf={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},dv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var _k=class extends Ts{constructor(t,e={},r,s){super(t,e,s,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,s){var l=this;return l.handleOperation(async()=>{let u;const c=le(le({},dv),s);let h=le(le({},l.headers),t==="POST"&&{"x-upsert":String(c.upsert)});const p=c.metadata;if(typeof Blob<"u"&&r instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),p&&u.append("metadata",l.encodeMetadata(p)),u.append("",r)):typeof FormData<"u"&&r instanceof FormData?(u=r,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),p&&!u.has("metadata")&&u.append("metadata",l.encodeMetadata(p))):(u=r,h["cache-control"]=`max-age=${c.cacheControl}`,h["content-type"]=c.contentType,p&&(h["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")),s?.headers)for(const[b,_]of Object.entries(s.headers))h=Yl(h,b,_);const g=l._removeEmptyFolders(e),y=l._getFinalPath(g),m=await(t=="PUT"?Ah:on)(l.fetch,`${l.url}/object/${y}`,u,le({headers:h},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:m.Id,fullPath:m.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}
24async uploadToSignedUrl(t,e,r,s){var l=this;const u=l._removeEmptyFolders(t),c=l._getFinalPath(u),h=new URL(l.url+`/object/upload/sign/${c}`);return h.searchParams.set("token",e),l.handleOperation(async()=>{let p;const g=le(le({},dv),s);let y=le(le({},l.headers),{"x-upsert":String(g.upsert)});const m=g.metadata;if(typeof Blob<"u"&&r instanceof Blob?(p=new FormData,p.append("cacheControl",g.cacheControl),m&&p.append("metadata",l.encodeMetadata(m)),p.append("",r)):typeof FormData<"u"&&r instanceof FormData?(p=r,p.has("cacheControl")||p.append("cacheControl",g.cacheControl),m&&!p.has("metadata")&&p.append("metadata",l.encodeMetadata(m))):(p=r,y["cache-control"]=`max-age=${g.cacheControl}`,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")),s?.headers)for(const[b,_]of Object.entries(s.headers))y=Yl(y,b,_);return{path:u,fullPath:(await Ah(l.fetch,h.toString(),p,le({headers:y},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(t);const l=le({},r.headers);e?.upsert&&(l["x-upsert"]="true");const u=await on(r.fetch,`${r.url}/object/upload/sign/${s}`,{},{headers:l}),c=new URL(r.url+u.url),h=c.searchParams.get("token");if(!h)throw new fu("No token returned by API");return{signedUrl:c.toString(),path:t,token:h}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var s=this;return s.handleOperation(async()=>await on(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:s.headers}))}async copy(t,e,r){var s=this;return s.handleOperation(async()=>({path:(await on(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r?.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(t,e,r){var s=this;return s.handleOperation(async()=>{let l=s._getFinalPath(t);const u=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let c=await on(s.fetch,`${s.url}/object/sign/${l}`,le({expiresIn:e},u?{transform:r.transform}:{}),{headers:s.headers});const h=new URLSearchParams;r?.download&&h.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&h.set("cacheNonce",String(r.cacheNonce));const p=h.toString();return{signedUrl:encodeURI(`${s.url}${c.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(t,e,r){var s=this;return s.handleOperation(async()=>{const l=await on(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:e,paths:t},{headers:s.headers}),u=new URLSearchParams;r?.download&&u.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&u.set("cacheNonce",String(r.cacheNonce));const c=u.toString();return l.map(h=>le(le({},h),{},{signedUrl:h.signedURL?encodeURI(`${s.url}${h.signedURL}${c?`&${c}`:""}`):null}))})}download(t,e,r){const s=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(l,e.transform),e?.cacheNonce!=null&&l.set("cacheNonce",String(e.cacheNonce));const u=l.toString(),c=this._getFinalPath(t),h=()=>Ia(this.fetch,`${this.url}/${s}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new bk(h,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Th(await Ia(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await yk(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(l){if(e.shouldThrowOnError)throw l;if(hu(l)){var s;const u=l instanceof Eh?l.status:l instanceof Nb?(s=l.originalError)===null||s===void 0?void 0:s.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(t,e){const r=this._getFinalPath(t),s=new URLSearchParams;e?.download&&s.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(s,e.transform),e?.cacheNonce!=null&&s.set("cacheNonce",String(e.cacheNonce));const l=s.toString(),u=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${r}`)+(l?`?${l}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await $a(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,r){var s=this;return s.handleOperation(async()=>{const l=s._getFinalPath(t),u=new URLSearchParams;e?.transformations&&u.set("transformations","true");const c=u.toString();return await $a(s.fetch,`${s.url}/cdn/${l}${c?`?${c}`:""}`,{},{headers:s.headers},r)})}async list(t,e,r){var s=this;return s.handleOperation(async()=>{const l=e?.sortBy?le(le({},Zf.sortBy),e.sortBy):Zf.sortBy,u=le(le(le({},Zf),e),{},{sortBy:l,prefix:t||""});return await on(s.fetch,`${s.url}/object/list/${s.bucketId}`,u,{headers:s.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const s=le({},t);return await on(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,s,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
24ity",e.quality.toString()),t}};const wk="2.110.1",Xa={"X-Client-Info":`storage-js/${wk}`};var Sk=class extends Ts{constructor(t,e={},r,s){const l=new URL(t);s?.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=le(le({},Xa),e);super(u,c,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await Ia(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Ia(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await on(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await Ah(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await on(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await $a(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async purgeBucketCache(t,e,r){var s=this;return s.handleOperation(async()=>{const l=new URLSearchParams;e?.transformations&&l.set("transformations","true");const u=l.toString();return await $a(s.fetch,`${s.url}/cdn/${t}${u?`?${u}`:""}`,{},{headers:s.headers},r)})}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},Ek=class extends Ts{constructor(t,e={},r){const s=t.replace(/\/$/,""),l=le(le({},Xa),e);super(s,l,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await on(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;t?.limit!==void 0&&r.set("limit",t.limit.toString()),t?.offset!==void 0&&r.set("offset",t.offset.toString()),t?.sortColumn&&r.set("sortColumn",t.sortColumn),t?.sortOrder&&r.set("sortOrder",t.sortOrder),t?.search&&r.set("search",t.search);const s=r.toString(),l=s?`${e.url}/bucket?${s}`:`${e.url}/bucket`;return await Ia(e.fetch,l,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await $a(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!dk(t))throw new fu("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 r=new ak({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(r,{get(l,u){const c=l[u];return typeof c!="function"?c:async(...h)=>{try{return{data:await c.apply(l,h),error:null}}catch(p){if(s)throw p;return{data:null,error:p}}}}})}},Tk=class extends Ts{constructor(t,e={},r){const s=t.replace(/\/$/,""),l=le(le({},Xa),{},{"Content-Type":"application/json"},e);super(s,l,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await qt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await qt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},Ak=class extends Ts{constructor(t,e={},r){const s=t.replace(/\/$/,""),l=le(le({},Xa),{},{"Content-Type":"application/json"},e);super(s,l,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
24if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},Rk=class extends Ts{constructor(t,e={},r){const s=t.replace(/\/$/,""),l=le(le({},Xa),{},{"Content-Type":"application/json"},e);super(s,l,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await qt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},Ok=class extends Rk{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new kk(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},kk=class extends Tk{constructor(t,e,r,s){super(t,e,s),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,le(le({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,le(le({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new Ck(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},Ck=class extends Ak{constructor(t,e,r,s,l){super(t,e,l),this.vectorBucketName=r,this.indexName=s}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,le(le({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,le(le({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,le(le({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,le(le({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,le(le({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},Dk=class extends Sk{constructor(t,e={},r,s){super(t,e,r,s)}from(t){return new _k(this.url,this.headers,t,this.fetch)}get vectors(){return new Ok(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Ek(this.url+"/iceberg",this.headers,this.fetch)}};const zb="2.110.1",Qn=30*1e3,Aa=3,Wf=Aa*Qn,xk=2*Qn,jk="http://localhost:9999",Nk="supabase.auth.token",Lk={"X-Client-Info":`gotrue-js/${zb}`},Rh="X-Supabase-Api-Version",Bb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Uk=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Mk=600*1e3;class Ka extends Error{constructor(e,r,s){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function X(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}
24class zk extends Ka{constructor(e,r,s){super(e,r,s),this.name="AuthApiError",this.status=r,this.code=s}}function Bk(t){return X(t)&&t.name==="AuthApiError"}class un extends Ka{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class An extends Ka{constructor(e,r,s,l){super(e,s,l),this.name=r,this.status=s}}class lt extends An{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function kl(t){return X(t)&&t.name==="AuthSessionMissingError"}class cs extends An{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Cl extends An{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Dl extends An{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function Pk(t){return X(t)&&t.name==="AuthImplicitGrantRedirectError"}class pv extends An{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class Hk extends An{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 Oh extends An{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function gv(t){return X(t)&&t.name==="AuthRetryableFetchError"}class mv extends An{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function qk(t){return X(t)&&t.name==="AuthRefreshDiscardedError"}class yv extends An{constructor(e,r,s){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Jl extends An{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ql="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),vv=` 25\r=`.split(""),Ik=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<vv.length;e+=1)t[vv[e].charCodeAt(0)]=-2;for(let e=0;e<Ql.length;e+=1)t[Ql[e].charCodeAt(0)]=e;return t})();function bv(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;r(Ql[s]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;r(Ql[s]),e.queuedBits-=6}}function Pb(t,e,r){const s=Ik[t];if(s>-1)for(e.queue=e.queue<<6|s,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function _v(t){const e=[],r=c=>{e.push(String.fromCodePoint(c))},s={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=c=>{Gk(c,s,r)};for(let c=0;c<t.length;c+=1)Pb(t.charCodeAt(c),l,u);return e.join("")}function $k(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function Kk(t,e){for(let r=0;r<t.length;r+=1){let s=t.charCodeAt(r);if(s>55295&&s<=56319){const l=(s-55296)*1024&65535;s=(t.charCodeAt(r+1)-56320&65535|l)+65536,r+=1}$k(s,e)}}function Gk(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let s=1;s<6;s+=1)if((t>>7-s&1)===0){e.utf8seq=s;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function Es(t){const e=[],r={queue:0,queuedBits:0},s=l=>{e.push(l)};for(let l=0;l<t.length;l+=1)Pb(t.charCodeAt(l),r,s);return new Uint8Array(e)}function Vk(t){const e=[];return Kk(t,r=>e.push(r)),new Uint8Array(e)}function dr(t){const e=[],r={queue:0,queuedBits:0},s=l=>{e.push(l)};return t.forEach(l=>bv(l,r,s)),bv(null,r,s),e.join("")}function Fk(t){return Math.round(Date.now()/1e3)+t}function Yk(){return Symbol("auth-callback")}const mt=()=>typeof window<"u"&&typeof document<"u",or={tested:!1,writable:!1},Hb=()=>{if(!mt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(or.tested)return or.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),or.tested=!0,or.writable=!0}catch{or.tested=!0,or.writable=!1}return or.writable};function Jk(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
25h((l,u)=>{e[u]=l})}catch{}return r.searchParams.forEach((s,l)=>{e[l]=s}),e}const qb=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Qk=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",ps=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},nn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Ye=async(t,e)=>{await t.removeItem(e)};class du{constructor(){this.promise=new du.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}du.promiseConstructor=Promise;function xl(t){const e=t.split(".");if(e.length!==3)throw new Jl("Invalid JWT structure");for(let s=0;s<e.length;s++)if(!Uk.test(e[s]))throw new Jl("JWT not in base64url format");return{header:JSON.parse(_v(e[0])),payload:JSON.parse(_v(e[1])),signature:Es(e[2]),raw:{header:e[0],payload:e[1]}}}async function Xk(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function Zk(t,e){return new Promise((s,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await t(u);if(!e(u,null,c)){s(c);return}}catch(c){if(!e(u,c)){l(c);return}}})()})}function Wk(t){return("0"+t.toString(16)).substr(-2)}function eC(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=r.length;let l="";for(let u=0;u<56;u++)l+=r.charAt(Math.floor(Math.random()*s));return l}return crypto.getRandomValues(e),Array.from(e,Wk).join("")}async function tC(t){const r=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",r),l=new Uint8Array(s);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function nC(t){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."),t;const r=await tC(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function lr(t,e,r=!1){const s=eC();let l=s;r&&(l+="/recovery"),await ps(t,`${e}-code-verifier`,l);const u=await nC(s);return[u,s===u?"plain":"s256"]}const iC=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function rC(t){const e=t.headers.get(Rh);if(!e||!e.match(iC))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function sC(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function aC(t){switch(t){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 oC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Gn(t){if(!oC.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function sn(t){if(!t.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 eh(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const s=r.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function lC(t,e){return new Proxy(t,{get:(r,s,l)=>{if(s==="__isInsecureUserWarningProxy")return!0;
25if(typeof s=="symbol"){const u=s.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,s,l)}return!e.value&&typeof s=="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."),e.value=!0),Reflect.get(r,s,l)}})}function wv(t){return JSON.parse(JSON.stringify(t))}const ur=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},uC=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Sv(t){var e;if(!Qk(t))throw new Oh(ur(t),0);if(uC.includes(t.status))throw new Oh(ur(t),t.status);let r;try{r=await t.json()}catch(u){throw new un(ur(u),u)}let s;const l=rC(t);if(l&&l.getTime()>=Bb["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?s=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(s=r.error_code),s){if(s==="weak_password")throw new yv(ur(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(s==="session_not_found")throw new lt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new yv(ur(r),t.status,r.weak_password.reasons);throw new zk(ur(r),t.status||500,s)}const cC=(t,e,r,s)=>{const l={method:t,headers:e?.headers||{}};return t==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),l.body=JSON.stringify(s),Object.assign(Object.assign({},l),r))};async function ne(t,e,r,s){var l;const u=Object.assign({},s?.headers);u[Rh]||(u[Rh]=Bb["2024-01-01"].name),s?.jwt&&(u.Authorization=`Bearer ${s.jwt}`);const c=(l=s?.query)!==null&&l!==void 0?l:{};s?.redirectTo&&(c.redirect_to=s.redirectTo);const h=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",p=await fC(t,e,r+h,{headers:u,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(p):{data:Object.assign({},p),error:null}}async function fC(t,e,r,s,l,u){const c=cC(e,s,l,u);let h;try{h=await t(r,Object.assign({},c))}catch(p){throw console.error(p),new Oh(ur(p),0)}if(h.ok||await Sv(h),s?.noResolveJson)return h;try{return await h.json()}catch(p){await Sv(p)}}function Zt(t){var e;let r=null;pC(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=Fk(t.expires_in)));const s=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:r,user:s},error:null}}function Ev(t){const e=Zt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,s)=>r&&typeof s=="string",!0)&&(e.data.weak_password=t.weak_password),e}function ji(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function hC(t){return{data:t,error:null}}function dC(t){const{action_link:e,email_otp:r,hashed_token:s,redirect_to:l,verification_type:u}=t,c=cu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:e,email_otp:r,hashed_token:s,redirect_to:l,verification_type:u},p=Object.assign({},c);return{data:{properties:h,user:p},error:null}}function Tv(t){return t}function pC(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const th=["global","local","others"];class gC{constructor({url:e="",headers:r={},fetch:s,experimental:l}){this.url=e,this.headers=r,this.fetch=qb(s),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)}}async signOut(e,r=th[0]){if(th.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${th.join(", ")}`);try{return await ne(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(s){if(X(s))return{data:null,error:s};throw s}}async inviteUserByEmail(e,r={}){try{return await ne(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ji})}catch(s){if(X(s))return{data:{user:null},error:s};throw s}}async generateLink(e){try{const{options:r}=e,s=cu(e,["options"]),l=Object.assign(Object.assign({},s),r);return"newEmail"in s&&(l.new_email=s?.newEmail,delete l.newEmail),await ne(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:dC,redirectTo:r?.redirectTo})}catch(r){if(X(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ji})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,s,l,u,c,h,p;try{const g={nextPage:null,lastPage:0,total:0},y=await ne(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Tv});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=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const E=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),T=JSON.parse(S.split(";")[1].split("=")[1]);g[`${T}Page`]=E}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(X(g))return{data:{users:[]},error:g};throw g}}async getUserById(e){Gn(e);try{return await ne(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ji})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}
25async updateUserById(e,r){Gn(e);try{return await ne(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:ji})}catch(s){if(X(s))return{data:{user:null},error:s};throw s}}async deleteUser(e,r=!1){Gn(e);try{return await ne(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:ji})}catch(s){if(X(s))return{data:{user:null},error:s};throw s}}async _listFactors(e){Gn(e.userId);try{const{data:r,error:s}=await ne(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:r,error:s}}catch(r){if(X(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Gn(e.userId),Gn(e.id);try{return{data:await ne(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(X(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,s,l,u,c,h,p;try{const g={nextPage:null,lastPage:0,total:0},y=await ne(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:Tv});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=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(S=>{const E=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),T=JSON.parse(S.split(";")[1].split("=")[1]);g[`${T}Page`]=E}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},m),g),error:null}}catch(g){if(X(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await ne(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await ne(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(X(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(e){try{return await ne(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(X(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e?.type&&(r.type=e.type),await ne(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:s=>{var l;return{data:{providers:(l=s?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(r){if(X(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await ne(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await ne(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await ne(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(X(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(e){try{return await ne(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(X(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){sn(this.experimental),Gn(e.userId);try{return await ne(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){sn(this.experimental),Gn(e.userId),Gn(e.passkeyId);
25try{return await ne(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(X(r))return{data:null,error:r};throw r}}}function Av(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}globalThis&&Hb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class mC extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function yC(){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 Ib(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function vC(t){return parseInt(t,16)}function bC(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,s=>s.toString(16).padStart(2,"0")).join("")}function _C(t){var e;const{chainId:r,domain:s,expirationTime:l,issuedAt:u=new Date,nonce:c,notBefore:h,requestId:p,resources:g,scheme:y,uri:m,version:b}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!s)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(!((e=t.statement)===null||e===void 0)&&e.includes(` 26`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=Ib(t.address),S=y?`${y}://${s}`:s,E=t.statement?`${t.statement} 27`:"",T=`${S} wants you to sign in with your Ethereum account: 28${_} 29 30${E}`;let R=`URI: ${m} 31Version: ${b} 32Chain ID: ${r}${c?` 33Nonce: ${c}`:""} 34Issued At: ${u.toISOString()}`;if(l&&(R+=` 35Expiration Time: ${l.toISOString()}`),h&&(R+=` 36Not Before: ${h.toISOString()}`),p&&(R+=` 37Request ID: ${p}`),g){let C=` 38Resources:`;for(const D of g){if(!D||typeof D!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${D}`);C+=` 39- ${D}`}R+=C}return`${T} 40${R}`}class nt extends Error{constructor({message:e,code:r,cause:s,name:l}){var u;super(e,{cause:s}),this.__isWebAuthnError=!0,this.name=(u=l??(s instanceof Error?s.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Xl extends nt{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function wC({error:t,options:e}){var r,s,l;const{publicKey:u}=e;if(!u)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new nt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=u.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new nt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((s=u.authenticatorSelection)===null||s===void 0?void 0:s.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:t});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:t})}else{if(t.name==="InvalidStateError")return new nt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new nt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return u.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new nt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new nt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const c=window.location.hostname;if($b(c)){if(u.rp.id!==c)return new nt({message:`The RP ID "${u.rp.id}
40" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.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:t})}else if(t.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:t})}return new nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function SC({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new nt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new nt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if($b(s)){if(r.rpId!==s)return new nt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new nt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.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_ERROR",cause:t})}return new nt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class EC{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const kh=new EC;function Rv(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:s}=t,l=cu(t,["challenge","user","excludeCredentials"]),u=Es(e).buffer,c=Object.assign(Object.assign({},r),{id:Es(r.id).buffer}),h=Object.assign(Object.assign({},l),{challenge:u,user:c});if(s&&s.length>0){h.excludeCredentials=new Array(s.length);for(let p=0;p<s.length;p++){const g=s[p];h.excludeCredentials[p]=Object.assign(Object.assign({},g),{id:Es(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return h}function Ov(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,s=cu(t,["challenge","allowCredentials"]),l=Es(e).buffer,u=Object.assign(Object.assign({},s),{challenge:l});if(r&&r.length>0){u.allowCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const h=r[c];u.allowCredentials[c]=Object.assign(Object.assign({},h),{id:Es(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return u}function kv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:dr(new Uint8Array(t.response.attestationObject)),clientDataJSON:dr(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Cv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,s=t.getClientExtensionResults(),l=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:dr(new Uint8Array(l.authenticatorData)),clientDataJSON:dr(new Uint8Array(l.clientDataJSON)),signature:dr(new Uint8Array(l.signature)),userHandle:l.userHandle?dr(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function $b(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Zl(){var t,e;return!!(mt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Kb(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Xl("Browser returned unexpected credential type",e)}:{data:null,error:new Xl("Empty credential response",e)}}catch(e){return{data:null,error:wC({error:e,options:t})}}}async function Gb(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Xl("Browser returned unexpected credential type",e)}:{data:null,error:new Xl("Empty credential response",e)}}catch(e){return{data:null,error:SC({error:e,options:t})}}}const TC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},AC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Wl(...t){const e=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),r=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),s={};for(const l of t)if(l)for(const u in l){const c=l[u];if(c!==void 0)if(Array.isArray(c))s[u]=c;else if(r(c))s[u]=c;else if(e(c)){const h=s[u];
40e(h)?s[u]=Wl(h,c):s[u]=Wl(c)}else s[u]=c}return s}function RC(t,e){return Wl(TC,t,e||{})}function OC(t,e){return Wl(AC,t,e||{})}class kC{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:s,signal:l},u){var c;try{const{data:h,error:p}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!h)return{data:null,error:p};const g=l??kh.createNewAbortSignal();if(h.webauthn.type==="create"){const{user:y}=h.webauthn.credential_options.publicKey;if(!y.name){const m=s;if(m)y.name=`${y.id}:${m}`;else{const _=(await this.client.getUser()).data.user,S=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(h.webauthn.type){case"create":{const y=RC(h.webauthn.credential_options.publicKey,u?.create),{data:m,error:b}=await Kb({publicKey:y,signal:g});return m?{data:{factorId:e,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}case"request":{const y=OC(h.webauthn.credential_options.publicKey,u?.request),{data:m,error:b}=await Gb(Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:y,signal:g}));return m?{data:{factorId:e,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:m}},error:null}:{data:null,error:b}}}}catch(h){return X(h)?{data:null,error:h}:{data:null,error:new un("Unexpected error in challenge",h)}}}async _verify({challengeId:e,factorId:r,webauthn:s}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:s})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!r)return{data:null,error:new Ka("rpId is required for WebAuthn authentication")};try{if(!Zl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:h}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:s},signal:l},{request:u});if(!c)return{data:null,error:h};const{webauthn:p}=c;return this._verify({factorId:e,challengeId:c.challengeId,webauthn:{type:p.type,rpId:r,rpOrigins:s,credential_response:p.credential_response}})}catch(c){return X(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in authenticate",c)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!r)return{data:null,error:new Ka("rpId is required for WebAuthn registration")};try{if(!Zl())return{data:null,error:new un("Browser does not support WebAuthn",null)};const{data:c,error:h}=await this._enroll({friendlyName:e});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===e&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:h};const{data:p,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:r,rpOrigins:s},signal:l},{create:u});return p?this._verify({factorId:c.id,challengeId:p.challengeId,webauthn:{rpId:r,rpOrigins:s,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:g}}catch(c){return X(c)?{data:null,error:c}:{data:null,error:new un("Unexpected error in register",c)}}}}yC();const CC={url:jk,storageKey:Nk,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Lk,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},fs={};class Ga{get jwks(){var e,r;return(r=(e=fs[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){fs[this.storageKey]=Object.assign(Object.assign({},fs[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=fs[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){fs[this.storageKey]=Object.assign(Object.assign({},fs[this.storageKey]),{cachedAt:e})}constructor(e){var r,s,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._pendingInitNotifications=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({},CC),e);if(this.storageKey=u.storageKey,this.instanceID=(r=Ga.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Ga.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&mt()){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=(s=u.experimental)!==null&&s!==void 0?s:{},this.admin=new gC({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=qb(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCu
40stomAuthorizationHeader,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 kC(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:Hb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Av(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=Av(this.memoryStorage)),mt()&&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(h){this._debug("#broadcastChannel","error",h)}})}u.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${zb}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){var e;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const r=await this.initializePromise,s=(e=this._pendingInitNotifications)!==null&&e!==void 0?e:[];this._pendingInitNotifications=null;for(const l of s)await this._notifyAllSubscribers(l.event,l.session,l.broadcast);return r}async _initialize(){var e;try{let r={},s="none";if(mt()&&(r=Jk(window.location.href),this._isImplicitGrantCallback(r)?s="implicit":await this._isPKCECallback(r)&&(s="pkce")),mt()&&this.detectSessionInUrl&&s!=="none"){const{data:l,error:u}=await this._getSessionFromURL(r,s);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),Pk(u)){const p=(e=u.details)===null||e===void 0?void 0:e.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:h}=l;return this._debug("#_initialize()","detected session in URL",c,"redirect type",h),await this._saveSession(c),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return X(r)?this._returnResult({error:r}):this._returnResult({error:new un("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,s,l;try{const u=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(l=e?.options)===null||l===void 0?void 0:l.captchaToken}},xform:Zt}),{data:c,error:h}=u;if(h||!c)return this._returnResult({data:{user:null,session:null},error:h});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(X(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(e){var r,s,l;try{let u;if("email"in e){const{email:y,password:m,options:b}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await lr(this.storage,this.storageKey)),u=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:m,data:(r=b?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:S},xform:Zt})}else if("phone"in e){const{phone:y,password:m,options:b}=e;u=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:m,data:(s=b?.data)!==null&&s!==void 0?s:{},channel:(l=b?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:Zt})}else throw new Cl("You must provide either an email or phone number and a password");const{data:c,error:h}=u;if(h||!c)return await Ye(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});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 Ye(this.storage,`${this.storageKey}-code-verifier`),X(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(e){try{let r;if("email"in e){const{email:u,password:c,options:h}=e;r=await ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Ev})}else if("phone"in e){const{phone:u,password:c,options:h}=e;r=await ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Ev})}else throw new Cl("You must provide either an email or phone number and a password");const{data:s,error:l}=r;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!s||!s.session||!s.user){const u=new cs;return this._returnResult({data:{user:null,session:null},error:u})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:l})}catch(r){if(X(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,s,l,u;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=e.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,s,l,u,c,h,p,g,y,m,b;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:E,wallet:T,statement:R,options:C}=e;let D;if(mt())if(typeof T=="object")D=T;else{const W=window;if("ethereum"in W&&typeof W.ethereum=="object"&&"request"in W.ethereum&&typeof W.ethereum.request=="function")D=W.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 T!="object"||!C?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");D=T}const H=new URL((r=C?.url)!==null&&r!==void 0?r:window.location.href),F=await D.request({method:"eth_requestAccounts"}).then(W=>W).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!F||F.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const B=Ib(F[0]);let j=(s=C?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!j){const W=await D.request({method:"eth_chainId"});j=vC(W)}const V={domain:H.host,address:B,statement:R,uri:H.href,version:"1",chainId:j,nonce:(l=C?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(c=(u=C?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(h=C?.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(p=C?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(g=C?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(y=C?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=_C(V),S=await D.request({method:"personal_sign",params:[bC(_),B]})}try{const{data:E,error:T}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((m=e.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Zt});if(T)throw T;if(!E||!E.session||!E.user){const R=new cs;return this._returnResult({data:{user:null,session:null},error:R})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:T})}
40catch(E){if(X(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async signInWithSolana(e){var r,s,l,u,c,h,p,g,y,m,b,_;let S,E;if("message"in e)S=e.message,E=e.signature;else{const{chain:T,wallet:R,statement:C,options:D}=e;let H;if(mt())if(typeof R=="object")H=R;else{const B=window;if("solana"in B&&typeof B.solana=="object"&&("signIn"in B.solana&&typeof B.solana.signIn=="function"||"signMessage"in B.solana&&typeof B.solana.signMessage=="function"))H=B.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 R!="object"||!D?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");H=R}const F=new URL((r=D?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in H&&H.signIn){const B=await H.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},D?.signInWithSolana),{version:"1",domain:F.host,uri:F.href}),C?{statement:C}:null));let j;if(Array.isArray(B)&&B[0]&&typeof B[0]=="object")j=B[0];else if(B&&typeof B=="object"&&"signedMessage"in B&&"signature"in B)j=B;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)S=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),E=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in H)||typeof H.signMessage!="function"||!("publicKey"in H)||typeof H!="object"||!H.publicKey||!("toBase58"in H.publicKey)||typeof H.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${F.host} wants you to sign in with your Solana account:`,H.publicKey.toBase58(),...C?["",C,""]:[""],"Version: 1",`URI: ${F.href}`,`Issued At: ${(l=(s=D?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=D?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${D.signInWithSolana.notBefore}`]:[],...!((c=D?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${D.signInWithSolana.expirationTime}`]:[],...!((h=D?.signInWithSolana)===null||h===void 0)&&h.chainId?[`Chain ID: ${D.signInWithSolana.chainId}`]:[],...!((p=D?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${D.signInWithSolana.nonce}`]:[],...!((g=D?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${D.signInWithSolana.requestId}`]:[],...!((m=(y=D?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||m===void 0)&&m.length?["Resources",...D.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(` 41`);const B=await H.signMessage(new TextEncoder().encode(S),"utf8");if(!B||!(B instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");E=B}}try{const{data:T,error:R}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:dr(E)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:Zt});if(R)throw R;if(!T||!T.session||!T.user){const C=new cs;return this._returnResult({data:{user:null,session:null},error:C})}
41return T.session&&(await this._saveSession(T.session),await this._notifyAllSubscribers("SIGNED_IN",T.session)),this._returnResult({data:Object.assign({},T),error:R})}catch(T){if(X(T))return this._returnResult({data:{user:null,session:null},error:T});throw T}}async _exchangeCodeForSession(e){const r=await nn(this.storage,`${this.storageKey}-code-verifier`),[s,l]=(r??"").split("/");try{if(!s&&this.flowType==="pkce")throw new Hk;const{data:u,error:c}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:Zt});if(await Ye(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const h=new cs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}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 Ye(this.storage,`${this.storageKey}-code-verifier`),X(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(e){try{const{options:r,provider:s,token:l,access_token:u,nonce:c}=e,h=await ne(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:l,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:Zt}),{data:p,error:g}=h;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!p||!p.session||!p.user){const y=new cs;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(r){if(X(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,s,l,u,c;try{if("email"in e){const{email:h,options:p}=e;let g=null,y=null;this.flowType==="pkce"&&([g,y]=await lr(this.storage,this.storageKey));const{error:m}=await ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,data:(r=p?.data)!==null&&r!==void 0?r:{},create_user:(s=p?.shouldCreateUser)!==null&&s!==void 0?s:!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 e){const{phone:h,options:p}=e,{data:g,error:y}=await ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,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 Cl("You must provide either an email or phone number.")}catch(h){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),X(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(e){var r,s;try{let l,u;"options"in e&&(l=(r=e.options)===null||r===void 0?void 0:r.redirectTo,u=(s=e.options)===null||s===void 0?void 0:s.captchaToken);const{data:c,error:h}=await ne(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:Zt});if(h)throw h;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(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:g,session:p},error:null})}catch(l){if(X(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(e){var r,s,l,u,c;try{let h=null,p=null;this.flowType==="pkce"&&([h,p]=await lr(this.storage,this.storageKey));const g=await ne(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&s!==void 0?s:void 0}),!((l=e?.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:p}),headers:this.headers,xform:hC});return!((u=g.data)===null||u===void 0)&&u.url&&mt()&&!(!((c=e.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(h){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),X(h))return this._returnResult({data:null,error:h});throw h}}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 e=>{const{data:{session:r},error:s}=e;if(s)throw s;if(!r)throw new lt;const{error:l}=await ne(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:s,type:l,options:u}=e;let c=null,h=null;this.flowType==="pkce"&&([c,h]=await lr(this.storage,this.storageKey));const{error:p}=await ne(this.fetch,"POST",r,{headers:this.headers,body:{email:s,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:h},redirectTo:u?.emailRedirectTo});return p&&await Ye(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in e){const{phone:s,type:l,options:u}=e,{data:c,error:h}=await ne(this.fetch,"POST",r,{headers:this.headers,body:{phone:s,type:l,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:h})}throw new Cl("You must provide either an email or phone number and a type")}catch(r){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),X(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await s,await r()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=r();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}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 e=null;const r=await nn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
41id"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=e.expires_at?e.expires_at*1e3-Date.now()<Wf:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.userStorage){const c=await nn(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=eh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};e.user=lC(e.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:l,error:u}=await this._callRefreshToken(e.refresh_token);if(u){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const h=await nn(this.storage,this.storageKey);if(h&&h.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},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(e){if(e)return await this._getUser(e);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await ne(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ji}):await this._useSession(async r=>{var s,l,u;const{data:c,error:h}=r;if(h)throw h;return!(!((s=c.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new lt}:await ne(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:ji})})}catch(r){if(X(r))return kl(r)&&(await this._removeSession(),await Ye(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r)):await this._updateUser(e,r)}async _updateUser(e,r={}){try{return await this._useSession(async s=>{const{data:l,error:u}=s;if(u)throw u;if(!l.session)throw new lt;const c=l.session;let h=null,p=null;this.flowType==="pkce"&&e.email!=null&&([h,p]=await lr(this.storage,this.storageKey));const{data:g,error:y}=await ne(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:h,code_challenge_method:p}),jwt:c.access_token,xform:ji});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(s){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),X(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new lt;const r=Date.now()/1e3;let s=r,l=!0,u=null;const{payload:c}=xl(e.access_token);if(c.exp&&(s=c.exp,l=s<=r),l){const{data:h,error:p}=await this._callRefreshToken(e.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!h)return{data:{user:null,session:null},error:null};u=h}else{const{data:h,error:p}=await this._getUser(e.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});u={access_token:e.access_token,refresh_token:e.refresh_token,user:h.user,token_type:"bearer",expires_in:s-r,expires_at:s},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(r){if(X(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async r=>{var s;if(!e){const{data:c,error:h}=r;if(h)throw h;e=(s=c.session)!==null&&s!==void 0?s:void 0}if(!e?.refresh_token)throw new lt;const{data:l,error:u}=await this._callRefreshToken(e.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(r){if(X(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var s;try{if(!mt())throw new Dl("No browser detected.");
41if(e.error||e.error_description||e.error_code)throw new Dl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new pv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Dl("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new pv("No code detected.");const{data:D,error:H}=await this._exchangeCodeForSession(e.code);if(H)throw H;const F=new URL(window.location.href);return F.searchParams.delete("code"),window.history.replaceState(window.history.state,"",F.toString()),{data:{session:D.session,redirectType:(s=D.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:c,refresh_token:h,expires_in:p,expires_at:g,token_type:y}=e;if(!c||!p||!h||!y)throw new Dl("No session defined in URL");const m=Math.round(Date.now()/1e3),b=parseInt(p);let _=m+b;g&&(_=parseInt(g));const S=_-m;S*1e3<=Qn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const E=_-b;m-E>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",E,_,m):m-E<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",E,_,m);const{data:T,error:R}=await this._getUser(c);if(R)throw R;const C={provider_token:l,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:h,token_type:y,user:T.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:C,redirectType:e.type},error:null})}catch(l){if(X(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){const r=await nn(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var s;const{data:l,error:u}=r;if(u&&!kl(u))return this._returnResult({error:u});const c=(s=l.session)===null||s===void 0?void 0:s.access_token;if(c){const{error:h}=await this.admin.signOut(c,e);if(h&&!(Bk(h)&&(h.status===404||h.status===401||h.status===403)||kl(h)))return this._returnResult({error:h})}return e!=="others"&&(await this._removeSession(),await Ye(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=Yk(),s={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,s),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async r=>{var s,l;try{const{data:{session:u},error:c}=r;if(c)throw c;await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",e,"session",u)}catch(u){await((l=this.stateChangeEmitters.get(e))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",u),kl(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(e,r={}){let s=null,l=null;this.flowType==="pkce"&&([s,l]=await lr(this.storage,this.storageKey,!0));try{return await ne(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:l,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(u){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),X(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var e;try{const{data:r,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:s,error:l}=await this._useSession(async u=>{var c,h,p,g,y;const{data:m,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(c=e.options)===null||c===void 0?void 0:c.redirectTo,scopes:(h=e.options)===null||h===void 0?void 0:h.scopes,queryParams:(p=e.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await ne(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 mt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(s?.url),this._returnResult({data:{provider:e.provider,url:s?.url},error:null})}catch(s){if(X(s))return this._returnResult({data:{provider:e.provider,url:null},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var s;try{const{error:l,data:{session:u}}=r;if(l)throw l;const{options:c,provider:h,token:p,access_token:g,nonce:y}=e,m=await ne(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=u?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:h,id_token:p,access_token:g,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:Zt}),{data:b,error:_}=m;return _?this._returnResult({data:{user:null,session:null},error:_}
41):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new cs}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(l){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),X(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var s,l;const{data:u,error:c}=r;if(c)throw c;return await ne(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(l=(s=u.session)===null||s===void 0?void 0:s.access_token)!==null&&l!==void 0?l:void 0})})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const s=Date.now();return await Zk(async l=>(l>0&&await Xk(200*Math.pow(2,l-1)),this._debug(r,"refreshing attempt",l),await ne(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Zt})),(l,u)=>{const c=200*Math.pow(2,l);return u&&gv(u)&&Date.now()+c-s<Qn})}catch(s){if(this._debug(r,"error",s),X(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",s),mt()&&!r.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e,r;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const l=await nn(this.storage,this.storageKey);if(l&&this.userStorage){let c=await nn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:l.user},await ps(this.userStorage,this.storageKey+"-user",c)),l.user=(e=c?.user)!==null&&e!==void 0?e:eh()}else if(l&&!l.user&&!l.user){const c=await nn(this.storage,this.storageKey+"-user");c&&c?.user?(l.user=c.user,await Ye(this.storage,this.storageKey+"-user"),await ps(this.storage,this.storageKey,l)):l.user=eh()}if(this._debug(s,"session from storage",l),!this._isValidSession(l)){this._debug(s,"session is not valid"),l!==null&&await this._removeSession();return}const u=((r=l.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Wf;if(this._debug(s,`session has${u?"":" not"} expired with margin of ${Wf}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:c}=await this._callRefreshToken(l.refresh_token);c&&(qk(c)?this._debug(s,"refresh discarded by commit guard",c):this._debug(s,"refresh failed",c))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:h}=await this._getUser(l.access_token);!h&&c?.user?(l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(s,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(s,"error",l),console.error(l);return}finally{this._debug(s,"end")}}async _callRefreshToken(e){var r,s;if(!e)throw new lt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&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 du;const u=await nn(this.storage,this.storageKey),{data:c,error:h}=await this._refreshAccessToken(e);if(h)throw h;if(!c.session)throw new lt;const p=await nn(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 mv};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
41oing write"),await Ye(this.storage,this.storageKey),this.userStorage&&await Ye(this.userStorage,this.storageKey+"-user");const b={data:null,error:new mv};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),X(u)){const c={data:null,error:u};if(!gv(u)){const h=await nn(this.storage,this.storageKey);!!(h?.expires_at&&h.expires_at*1e3>Date.now())?this._debug(l,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:c,expiresAt:Date.now()+xk},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(c),c}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(e,r,s=!0){if(this._pendingInitNotifications!==null&&s){this._pendingInitNotifications.push({event:e,session:r,broadcast:s});return}const l=`#_notifyAllSubscribers(${e})`;this._debug(l,"begin",r,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:r});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(e,r)}catch(p){u.push(p)}});if(await Promise.all(c),u.length>0){for(let h=0;h<u.length;h+=1)console.error(u[h]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Ye(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),s=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&r.user&&await ps(this.userStorage,this.storageKey+"-user",{user:r.user});const l=Object.assign({},r);delete l.user;const u=wv(l);await ps(this.storage,this.storageKey,u)}else{const l=wv(r);await ps(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Ye(this.storage,this.storageKey),await Ye(this.storage,this.storageKey+"-code-verifier"),await Ye(this.storage,this.storageKey+"-user"),this.userStorage&&await Ye(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&mt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Qn);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.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 e=Date.now();try{return await this._useSession(async r=>{const{data:{session:s}}=r;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((s.expires_at*1e3-e)/Qn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Qn}ms, refresh threshold is ${Aa} ticks`),l<=Aa&&await this._callRefreshToken(s.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof mC)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async r=>{const{data:{session:s}}=r;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((s.expires_at*1e3-e)/Qn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${Qn}ms, refresh threshold is ${Aa} ticks`),l<=Aa&&await this._callRefreshToken(s.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!mt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
41{if(document.visibilityState!=="visible"){this._debug(r,"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(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,s){const l=[`provider=${encodeURIComponent(r)}`];if(s?.redirectTo&&l.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s?.scopes&&l.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[u,c]=await lr(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});l.push(h.toString())}if(s?.queryParams){const u=new URLSearchParams(s.queryParams);l.push(u.toString())}return s?.skipBrowserRedirect&&l.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${l.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var s;const{data:l,error:u}=r;return u?this._returnResult({data:null,error:u}):await ne(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(s=l?.session)===null||s===void 0?void 0:s.access_token})})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var s,l;const{data:u,error:c}=r;if(c)return this._returnResult({data:null,error:c});const h=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:p,error:g}=await ne(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(s=u?.session)===null||s===void 0?void 0:s.access_token});return g?this._returnResult({data:null,error:g}):(e.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(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){const r=async()=>{try{return await this._useSession(async s=>{var l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const h=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?kv(e.webauthn.credential_response):Cv(e.webauthn.credential_response)})}:{code:e.code}),{data:p,error:g}=await ne(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:h,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(s){if(X(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(e){const r=async()=>{try{return await this._useSession(async s=>{var l;const{data:u,error:c}=s;if(c)return this._returnResult({data:null,error:c});const h=await ne(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(h.error)return h;const{data:p}=h;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:Rv(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:Ov(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(e){const{data:r,error:s}=await this._challenge({factorId:e.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:s}=await this.getUser();if(s)return{data:null,error:s};const l={all:[],phone:[],totp:[],webauthn:[]};for(const u of(e=r?.factors)!==null&&e!==void 0?e:[])l.all.push(u),u.status==="verified"&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,s,l,u;if(e)try{const{payload:_}=xl(e);let S=null;_.aal&&(S=_.aal);let E=S;const{data:{user:T},error:R}=await this.getUser(e);if(R)return this._returnResult({data:null,error:R});((s=(r=T?.factors)===null||r===void 0?void 0:r.filter(H=>H.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(E="aal2");const D=_.amr||[];return{data:{currentLevel:S,nextLevel:E,currentAuthenticationMethods:D},error:null}}catch(_){if(X(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:h}
41=await this.getSession();if(h)return this._returnResult({data:null,error:h});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=xl(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(e){try{return await this._useSession(async r=>{const{data:{session:s},error:l}=r;return l?this._returnResult({data:null,error:l}):s?await ne(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:s.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new lt})})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async s=>{const{data:{session:l},error:u}=s;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new lt});const c=await ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});return c.data&&c.data.redirect_url&&mt()&&!r?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(e,r){try{return await this._useSession(async s=>{const{data:{session:l},error:u}=s;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new lt});const c=await ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return c.data&&c.data.redirect_url&&mt()&&!r?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:s}=e;return s?this._returnResult({data:null,error:s}):r?await ne(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new lt})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:s},error:l}=r;return l?this._returnResult({data:null,error:l}):s?(await ne(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new lt})})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let s=r.keys.find(h=>h.kid===e);if(s)return s;const l=Date.now();if(s=this.jwks.keys.find(h=>h.kid===e),s&&this.jwks_cached_at+Mk>l)return s;const{data:u,error:c}=await ne(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,s=u.keys.find(h=>h.kid===e),!s)?null:s}async getClaims(e,r={}){try{let s=e;if(!s){const{data:_,error:S}
41=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});s=_.session.access_token}const{header:l,payload:u,signature:c,raw:{header:h,payload:p}}=xl(s);if(!r?.allowExpired)try{sC(u.exp)}catch(_){throw new Jl(_ 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,r?.keys?{keys:r.keys}:r?.jwks);if(!g){const{error:_}=await this.getUser(s);if(_)throw _;return{data:{claims:u,header:l,signature:c},error:null}}const y=aC(l.alg),m=await crypto.subtle.importKey("jwk",g,y,!0,["verify"]);if(!await crypto.subtle.verify(y,m,c,Vk(`${h}.${p}`)))throw new Jl("Invalid JWT signature");return{data:{claims:u,header:l,signature:c},error:null}}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(e){var r,s,l;sn(this.experimental);try{if(!Zl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const h=Ov(u.options),p=(l=(s=e?.options)===null||s===void 0?void 0:s.signal)!==null&&l!==void 0?l:kh.createNewAbortSignal(),{data:g,error:y}=await Gb({publicKey:h,signal:p});if(y||!g)return this._returnResult({data:null,error:y??new un("WebAuthn ceremony failed",null)});const m=Cv(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:m})}catch(u){if(X(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(e){var r,s;sn(this.experimental);try{if(!Zl())return this._returnResult({data:null,error:new un("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyRegistration();if(u||!l)return this._returnResult({data:null,error:u});const c=Rv(l.options),h=(s=(r=e?.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:kh.createNewAbortSignal(),{data:p,error:g}=await Kb({publicKey:c,signal:h});if(g||!p)return this._returnResult({data:null,error:g??new un("WebAuthn ceremony failed",null)});const y=kv(p);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:y})}catch(l){if(X(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){sn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new lt});const{data:l,error:u}=await ne(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){sn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:s},error:l}=r;if(l)return this._returnResult({data:null,error:l});if(!s)return this._returnResult({data:null,error:new lt});const{data:u,error:c}=await ne(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;sn(this.experimental);try{const{data:s,error:l}=await ne(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e?.options)===null||r===void 0?void 0:r.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:s,error:null})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(e){sn(this.experimental);try{const{data:r,error:s}=await ne(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Zt});return s?this._returnResult({data:null,error:s}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){sn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new lt});const{data:l,error:u}=await ne(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){sn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:s},error:l}=r;if(l)return this._returnResult({data:null,error:l});if(!s)return this._returnResult({data:null,error:new lt});const{data:u,error:c}=await ne(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:e.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){sn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:s},error:l}=r;if(l)return this._returnResult({data:null,error:l});if(!s)return this._returnResult({data:null,error:new lt});const{error:u}
41=await ne(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}}Ga.nextInstanceID={};const DC=Ga,xC="2.110.1";let Ra="",eu;if(typeof Deno<"u"){var nh;Ra="deno",eu=(nh=Deno.version)===null||nh===void 0?void 0:nh.deno}else if(typeof document<"u")Ra="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ra="react-native";else{var ih;Ra="node",eu=typeof process<"u"?(ih=process.version)===null||ih===void 0?void 0:ih.replace(/^v/,""):void 0}const Vb=[`runtime=${Ra}`];eu&&Vb.push(`runtime-version=${eu}`);const jC={"X-Client-Info":`supabase-js/${xC}; ${Vb.join("; ")}`},NC={headers:jC},LC={schema:"public"},UC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},MC={},zC={enabled:!1,respectSamplingDecision:!0};function BC(t,e,r,s){function l(u){return u instanceof r?u:new r(function(c){c(u)})}return new(r||(r=Promise))(function(u,c){function h(y){try{g(s.next(y))}catch(m){c(m)}}function p(y){try{g(s.throw(y))}catch(m){c(m)}}function g(y){y.done?u(y.value):l(y.value).then(h,p)}g((s=s.apply(t,[])).next())})}let rh=null;const PC="@opentelemetry/api";function HC(){return rh===null&&(rh=import(PC).catch(()=>null)),rh}function qC(){return BC(this,void 0,void 0,function*(){try{const t=yield HC();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function IC(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,s,l,u]=e;if(r.length!==2||s.length!==32||l.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(r)||!c.test(s)||!c.test(l)||!c.test(u)||s==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:r,traceId:s,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function $C(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const s of e)try{if(typeof s=="string"){if(KC(r.hostname,s))return!0}else if(s instanceof RegExp){if(s.test(r.hostname))return!0}else if(typeof s=="function"&&s(r))return!0}catch{continue}return!1}function KC(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function GC(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function Va(t){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Va(t)}function VC(t,e){if(Va(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,e);if(Va(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function FC(t){var e=VC(t,"string");return Va(e)=="symbol"?e:e+""}function YC(t,e,r){return(e=FC(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,s)}return r}function Ge(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dv(Object(r),!0).forEach(function(s){YC(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dv(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}const JC=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),QC=()=>Headers,XC=(t,e,r,s,l)=>{const u=JC(s),c=QC(),h=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,g=h?GC(e):null;return async(y,m)=>{var b;const _=(b=await r())!==null&&b!==void 0?b:t;let S=new c(m?.headers);if(S.has("apikey")||S.set("apikey",t),S.has("Authorization")||S.set("Authorization",`Bearer ${_}`),g){const E=await ZC(y,g,p);E&&(E.traceparent&&!S.has("traceparent")&&S.set("traceparent",E.traceparent),E.tracestate&&!S.has("tracestate")&&S.set("tracestate",E.tracestate),E.baggage&&!S.has("baggage")&&S.set("baggage",E.baggage))}return u(y,Ge(Ge({},m),{},{headers:S}))}};async function ZC(t,e,r){if(!$C(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const s=await qC();if(!s||!s.traceparent)return null;if(r){const l=IC(s.traceparent);if(l&&!l.isSampled)return null}return s}function xv(t){return typeof t=="boolean"?{enabled:t}:t}function WC(t){return t.endsWith("/")?t:t+"/"}function e2(t,e){var r,s,l,u,c,h;const{db:p,auth:g,realtime:y,global:m}=t,{db:b,auth:_,realtime:S,global:E}=e,T=xv(t.tracePropagation),R=xv(e.tracePropagation),C={db:Ge(Ge({},b),p),auth:Ge(Ge({},_),g),realtime:Ge(Ge({},S),y),storage:{},global:Ge(Ge(Ge({},E),m),{},{headers:Ge(Ge({},(r=E?.headers)!==null&&r!==void 0?r:{}),(s=m?.headers)!==null&&s!==void 0?s:{})}),tracePropagation:{enabled:(l=(u=T?.enabled)!==null&&u!==void 0?u:R?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(c=(h=T?.respectSamplingDecision)!==null&&h!==void 0?h:R?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return t.accessToken?C.accessToken=t.accessToken:delete C.accessToken,C}function t2(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");
41if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(WC(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var n2=class extends DC{constructor(t){super(t)}},i2=class{constructor(t,e,r){var s,l;this.supabaseUrl=t,this.supabaseKey=e;const u=t2(t);if(!e)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`,h={db:LC,realtime:MC,auth:Ge(Ge({},UC),{},{storageKey:c}),global:NC,tracePropagation:zC},p=e2(r??{},h);if(this.settings=p,this.storageKey=(s=p.auth.storageKey)!==null&&s!==void 0?s:"",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=XC(e,t,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(Ge({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 hO(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 Dk(this.storageUrl.href,this.headers,this.fetch,r?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new iO(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:s}=await t.auth.getSession();return(e=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:s,userStorage:l,storageKey:u,flowType:c,lock:h,debug:p,throwOnError:g,experimental:y,lockAcquireTimeout:m,skipAutoInitialize:b},_,S){const E={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new n2({url:this.authUrl.href,headers:Ge(Ge({},E),_),storageKey:u,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:s,userStorage:l,flowType:c,lock:h,debug:p,throwOnError:g,experimental:y,fetch:S,lockAcquireTimeout:m,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(T=>T.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new ek(this.realtimeUrl.href,Ge(Ge({},t),{},{params:Ge(Ge({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const r2=(t,e,r)=>new i2(t,e,r);function s2(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=20:!1}s2()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
41ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function a2(){if(typeof window>"u")return;const t=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(T=>t===T||t.endsWith("."+T)),s="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",l=r?t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+s+")(?:-dev)?(?=\\.|$)","i"))?.[1]??t.match(new RegExp("^("+s+")(?=[.-])","i"))?.[1]:void 0,u=window.parent&&window.parent!==window;if(!l||!u)return localStorage;const c=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),h=c?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,p=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),g=p&&h.test(p)?[p]:c?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",m=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(T,R,C)=>new Promise(D=>{const H=b();let F=!1,B;const j=se=>{F||(F=!0,clearTimeout(B),window.removeEventListener("message",V),D(se))},V=se=>{if(g.indexOf(se.origin)<0)return;const K=se.data;K&&K.type===y&&K.requestId===H&&j(K)};window.addEventListener("message",V);const W={type:T,requestId:H,projectId:l,key:R};C!==void 0&&(W.value=C);for(const se of g)window.parent.postMessage(W,se);B=setTimeout(()=>j(null),m)});let S=!0;const E=250;return{getItem:async T=>{let R=await _("lovable-preview-auth:get",T);return!R&&S&&(await new Promise(C=>setTimeout(C,E)),R=await _("lovable-preview-auth:get",T)),S=!1,R&&R.ok&&typeof R.value=="string"?R.value===""?(localStorage.removeItem(T),null):R.value:localStorage.getItem(T)},setItem:(T,R)=>(localStorage.setItem(T,R),_("lovable-preview-auth:set",T,R).then(C=>{C&&C.ok&&typeof C.value=="string"&&localStorage.getItem(T)===R&&(C.value===""?localStorage.removeItem(T):localStorage.setItem(T,C.value))})),removeItem:T=>(localStorage.removeItem(T),_("lovable-preview-auth:remove",T).then(()=>{}))}}function o2(t){return t.startsWith("sb_publishable_")||t.startsWith("sb_secret_")}function l2(t){return(e,r)=>{const s=new Headers(typeof Request<"u"&&e instanceof Request?e.headers:void 0);return r?.headers&&new Headers(r.headers).forEach((l,u)=>s.set(u,l)),o2(t)&&s.get("Authorization")===`Bearer ${t}`&&s.delete("Authorization"),s.set("apikey",t),fetch(e,{...r,headers:s})}}function u2(){const t="https://txhuyobxemchkhbuyakn.supabase.co",e="sb_publishable_6VO9343yLBF-clgygyCkKw_2HQt97On";return r2(t,e,{global:{fetch:l2(e)},auth:{storage:a2(),persistSession:!0,autoRefreshToken:!0}})}let sh;const Fb=new Proxy({},{get(t,e,r){return sh||(sh=u2()),Reflect.get(sh,e,r)}}),c2=hr({type:"function"}).client(async({next:t})=>{const{data:e}=await Fb.auth.getSession(),r=e.session?.access_token;return t({headers:r?{Authorization:`Bearer ${r}`}:{}})}),f2=hr(),jv=W1(()=>({functionMiddleware:[c2],requestMiddleware:[f2]}));var pu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},h2=class extends pu{#e;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Yb=new h2,d2={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},p2=class{#e=d2;#n=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Ch=new p2;function g2(t){setTimeout(t,0)}var m2=typeof window>"u"||"Deno"in globalThis;function ln(){}function y2(t,e){return typeof t=="function"?t(e):t}function v2(t){return typeof t=="number"&&t>=0&&t!==1/0}function b2(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Dh(t,e){return typeof t=="function"?t(e):t}function _2(t,e){return typeof t=="function"?t(e):t}function Nv(t,e){const{type:r="all",exact:s,fetchStatus:l,predicate:u,queryKey:c,stale:h}=t;if(c){if(s){if(e.queryHash!==nd(c,e.options))return!1}else if(!Ya(e.queryKey,c))return!1}if(r!=="all"){const p=e.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||l&&l!==e.state.fetchStatus||u&&!u(e))}function Lv(t,e){const{exact:r,status:s,predicate:l,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(r){if(Fa(e.options.mutationKey)!==Fa(u))return!1}else if(!Ya(e.options.mutationKey,u))return!1}return!(s&&e.state.status!==s||l&&!l(e))}
vendor: 22,791 bytes, line 41
41function nd(t,e){return(e?.queryKeyHashFn||Fa)(t)}function Fa(t){return JSON.stringify(t,(e,r)=>xh(r)?Object.keys(r).sort().reduce((s,l)=>(s[l]=r[l],s),{}):r)}function Ya(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Ya(t[r],e[r])):!1}var w2=Object.prototype.hasOwnProperty;function Jb(t,e,r=0){if(t===e)return t;if(r>500)return e;const s=Uv(t)&&Uv(e);if(!s&&!(xh(t)&&xh(e)))return e;const u=(s?t:Object.keys(t)).length,c=s?e:Object.keys(e),h=c.length,p=s?new Array(h):{};let g=0;for(let y=0;y<h;y++){const m=s?y:c[y],b=t[m],_=e[m];if(b===_){p[m]=b,(s?y<u:w2.call(t,m))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[m]=_;continue}const S=Jb(b,_,r+1);p[m]=S,S===b&&g++}return u===h&&g===u?t:p}function Sj(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Uv(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function xh(t){if(!Mv(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Mv(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Mv(t){return Object.prototype.toString.call(t)==="[object Object]"}function S2(t){return new Promise(e=>{Ch.setTimeout(e,t)})}function E2(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Jb(t,e):e}function T2(t,e,r=0){const s=[...t,e];return r&&s.length>r?s.slice(1):s}function A2(t,e,r=0){const s=[e,...t];return r&&s.length>r?s.slice(0,-1):s}var id=Symbol();function Qb(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===id?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Ej(t,e){return typeof t=="function"?t(...e):!!t}function R2(t,e,r){let s=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??=e(),s||(s=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),t}var Xb=(()=>{let t=()=>m2;return{isServer(){return t()},setIsServer(e){t=e}}})();function O2(){let t,e;const r=new Promise((l,u)=>{t=l,e=u});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),t(l)},r.reject=l=>{s({status:"rejected",reason:l}),e(l)},r}var k2=g2;function C2(){let t=[],e=0,r=h=>{h()},s=h=>{h()},l=k2;const u=h=>{e?t.push(h):l(()=>{r(h)})},c=()=>{const h=t;t=[],h.length&&l(()=>{s(()=>{h.forEach(p=>{r(p)})})})};return{batch:h=>{let p;e++;try{p=h()}finally{e--,e||c()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{l=h}}}var bt=C2(),D2=class extends pu{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#e}},tu=new D2;function x2(t){return Math.min(1e3*2**t,3e4)}function Zb(t){return(t??"online")==="online"?tu.isOnline():!0}var jh=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Wb(t){let e=!1,r=0,s;const l=O2(),u=()=>l.status!=="pending",c=E=>{if(!u()){const T=new jh(E);b(T),t.onCancel?.(T)}},h=()=>{e=!0},p=()=>{e=!1},g=()=>Yb.isFocused()&&(t.networkMode==="always"||tu.isOnline())&&t.canRun(),y=()=>Zb(t.networkMode)&&t.canRun(),m=E=>{u()||(s?.(),l.resolve(E))},b=E=>{u()||(s?.(),l.reject(E))},_=()=>new Promise(E=>{s=T=>{(u()||g())&&E(T)},t.onPause?.()}).then(()=>{s=void 0,u()||t.onContinue?.()}),S=()=>{if(u())return;let E;const T=r===0?t.initialPromise:void 0;try{E=T??t.fn()}catch(R){E=Promise.reject(R)}Promise.resolve(E).then(m).catch(R=>{if(u())return;const C=t.retry??(Xb.isServer()?0:3),D=t.retryDelay??x2,H=typeof D=="function"?D(r,R):D,F=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,R);if(e||!F){b(R);return}r++,t.onFail?.(r,R),S2(H).then(()=>g()?void 0:_()).then(()=>{e?b(R):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(s?.(),l),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?S():_().then(S),l)}}var e_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),v2(this.gcTime)&&(this.#e=Ch.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Xb.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ch.clearTimeout(this.#e),this.#e=void 0)}},j2=class extends e_{#e;#n;#t;#r;#i;#s;#a;constructor(t){super(),this.#a=!1,this.#s=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#t=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=Bv(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#s,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Bv(this.options);e.data!==void 0&&(this.setState(zv(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,e){const r=E2(this.state.data,t,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(ln).catch(ln):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>_2(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===id||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Dh(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!b2(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#i&&(this.#a||this.#l()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:t}))}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(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},l=()=>{const h=Qb(this.options,e),g=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return s(y),y})();return this.#a=!1,this.options.persister?this.options.persister(h,g,this):h(g)},c=(()=>{const h={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:l};return s(h),h})();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.#i=Wb({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:h=>{h instanceof jh&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(h,p)=>{this.#o({type:"failed",failureCount:h,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 h=await this.#i.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#t.config.onSuccess?.(h,this),this.#t.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof jh){if(h.silent)return this.#i.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#o({type:"error",error:h}),this.#t.config.onError?.(h,this),this.#t.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#o(t){const e=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...N2(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...zv(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?s:void 0,s;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=e(this.state),bt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function N2(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zb(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function zv(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Bv(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,s=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function Pv(t){return{onFetch:(e,r)=>{const s=e.options,l=e.fetchOptions?.meta?.fetchMore?.direction,u=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const m=S=>{R2(S,()=>e.signal,()=>y=!0)},b=Qb(e.options,e.fetchOptions),_=async(S,E,T)=>{if(y)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const C=(()=>{const B={client:e.client,queryKey:e.queryKey,pageParam:E,direction:T?"backward":"forward",meta:e.options.meta};return m(B),B})(),D=await b(C),{maxPages:H}=e.options,F=T?A2:T2;return{pages:F(S.pages,D,H),pageParams:F(S.pageParams,E,H)}};if(l&&u.length){const S=l==="backward",E=S?L2:Hv,T={pages:u,pageParams:c},R=E(s,T);h=await _(T,R,S)}else{const S=t??u.length;do{const E=p===0?c[0]??s.initialPageParam:Hv(s,h);if(p>0&&E==null)break;h=await _(h,E),p++}while(p<S)}return h};e.options.persister?e.fetchFn=()=>e.options.persister?.(g,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=g}}}function Hv(t,{pages:e,pageParams:r}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,r[s],r):void 0}function L2(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var U2=class extends e_{#e;#n;#t;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||M2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(e=>e!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Wb({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#i({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const s=this.state.status==="pending",l=!this.#r.canStart();try{if(s)e();else{this.#i({type:"pending",variables:t,isPaused:l}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,r);const c=await this.options.onMutate?.(t,r);c!==this.state.context&&this.#i({type:"pending",context:c,variables:t,isPaused:l})}const u=await this.#r.start();return await this.#t.config.onSuccess?.(u,t,this.state.context,this,r),await this.options.onSuccess?.(u,t,this.state.context,r),await this.#t.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,t,this.state.context,r),this.#i({type:"success",data:u}),u}catch(u){try{await this.#t.config.onError?.(u,t,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#t.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:u}),u}finally{this.#t.runNext(this)}}#i(t){const e=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),bt.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function M2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var z2=class extends pu{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,e,r){const s=new U2({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(e),state:r});return this.add(s),s}add(t){this.#e.add(t);const e=jl(t);if(typeof e=="string"){const r=this.#n.get(e);r?r.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=jl(t);if(typeof e=="string"){const r=this.#n.get(e);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=jl(t);if(typeof e=="string"){const s=this.#n.get(e)?.find(l=>l.state.status==="pending");return!s||s===t}else return!0}runNext(t){const e=jl(t);return typeof e=="string"?this.#n.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(r=>Lv(e,r))}findAll(t={}){return this.getAll().filter(e=>Lv(t,e))}notify(t){bt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return bt.batch(()=>Promise.all(t.map(e=>e.continue().catch(ln))))}};function jl(t){return t.options.scope?.id}var B2=class extends pu{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,r){const s=e.queryKey,l=e.queryHash??nd(s,e);let u=this.get(l);return u||(u=new j2({client:t,queryKey:s,queryHash:l,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){bt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(r=>Nv(e,r))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(r=>Nv(t,r)):e}notify(t){bt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){bt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){bt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},P2=class{#e;#n;#t;#r;#i;#s;#a;#l;constructor(t={}){this.#e=t.queryCache||new B2,this.#n=t.mutationCache||new z2,this.#t=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=Yb.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=tu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=this.#e.build(this,e),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Dh(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:r})=>{const s=r.data;return[e,s]})}setQueryData(t,e,r){const s=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(s.queryHash)?.state.data,c=y2(e,u);if(c!==void 0)return this.#e.build(this,s).setData(c,{...r,manual:!0})}setQueriesData(t,e,r){return bt.batch(()=>this.#e.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,r)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;bt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=this.#e;return bt.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},s=bt.batch(()=>this.#e.findAll(t).map(l=>l.cancel(r)));return Promise.all(s).then(ln).catch(ln)}invalidateQueries(t,e={}){return bt.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},s=bt.batch(()=>this.#e.findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,r);return r.throwOnError||(u=u.catch(ln)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(ln)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=this.#e.build(this,e);return r.isStaleByTime(Dh(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ln).catch(ln)}fetchInfiniteQuery(t){return t.behavior=Pv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ln).catch(ln)}ensureInfiniteQueryData(t){return t.behavior=Pv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return tu.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(t){this.#t=t}setQueryDefaults(t,e){this.#r.set(Fa(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],r={};return e.forEach(s=>{Ya(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,e){this.#i.set(Fa(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],r={};return e.forEach(s=>{Ya(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=nd(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===id&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#t.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},t_=ue.createContext(void 0),Tj=t=>{const e=ue.useContext(t_);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},H2=({client:t,children:e})=>(ue.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),J.jsx(t_.Provider,{value:t,children:e}));const q2="/assets/styles-3BkNm9uO.css";function I2(t,e={}){typeof window>"u"||window.__lovableEvents?.captureException?.(t,{source:"react_error_boundary",route:window.location.pathname,...e},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}
41function $2(){return J.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:J.jsxs("div",{className:"max-w-md text-center",children:[J.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),J.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),J.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),J.jsx("div",{className:"mt-6",children:J.jsx(ed,{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 K2({error:t,reset:e}){console.error(t);const r=wt();return ue.useEffect(()=>{I2(t,{boundary:"tanstack_root_error_component"})},[t]),J.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:J.jsxs("div",{className:"max-w-md text-center",children:[J.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),J.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."}),J.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[J.jsx("button",{onClick:()=>{r.invalidate(),e()},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"}),J.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 Dt=x1()({head:()=>({links:[{rel:"stylesheet",href:q2},{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"},{rel:"manifest",href:"/manifest.webmanifest"},{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Big+Shoulders+Stencil+Display:wght@500;600;700;800;900&family=Stardos+Stencil:wght@400;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Yellowtail&family=Cinzel:wght@400;500;600;700&display=swap"}],meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Kirk Diamond"},{name:"description",content:"Official site of 3X JUNO Award-winning reggae artist, songwriter, and performer creating conscious music that inspires unity, culture, and positive change."},{name:"author",content:"Kirk Diamond"},{name:"theme-color",content:"#0B3B2E"},{name:"apple-mobile-web-app-capable",content:"yes"},{name:"apple-mobile-web-app-status-bar-style",content:"black-translucent"},{name:"apple-mobile-web-app-title",content:"Kirk AdminHQ"},{property:"og:type",content:"music.musician"},{name:"twitter:card",content:"summary_large_image"},{property:"og:title",content:"Kirk Diamond"},{name:"twitter:title",content:"Kirk Diamond"},{property:"og:description",content:"Official site of 3X JUNO Award-winning reggae artist, songwriter, and performer creating conscious music that inspires unity, culture, and positive change."},{name:"twitter:description",content:"Official site of 3X JUNO Award-winning reggae artist, songwriter, and performer creating conscious music that inspires unity, culture, and positive change."},{property:"og:image",content:"https://storage.googleapis.com/gpt-engineer-file-uploads/al8tieNgWUOv1UNkvmsrkAfgCzi1/social-images/social-1783978967162-IMG_3059.webp"},{name:"twitter:image",content:"https://storage.googleapis.com/gpt-engineer-file-uploads/al8tieNgWUOv1UNkvmsrkAfgCzi1/social-images/social-1783978967162-IMG_3059.webp"}]}),shellComponent:G2,component:V2,notFoundComponent:$2,errorComponent:K2});function G2({children:t}){return J.jsxs("html",{lang:"en",children:[J.jsx("head",{children:J.jsx(J1,{})}),J.jsxs("body",{children:[t,J.jsx(X1,{})]})]})}function V2(){const{queryClient:t}=Dt.useRouteContext();
vendor: 6,581 bytes, line 41
41return J.jsx(H2,{client:t,children:J.jsx(wb,{})})}const F2="modulepreload",Y2=function(t){return"/"+t},qv={},Xe=function(e,r,s){let l=Promise.resolve();if(r&&r.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]"),h=c?.nonce||c?.getAttribute("nonce");l=p(r.map(g=>{if(g=Y2(g),g in qv)return;qv[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":F2,y||(b.as="script"),b.crossOrigin="",b.href=g,h&&b.setAttribute("nonce",h),document.head.appendChild(b),y)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return l.then(c=>{for(const h of c||[])h.status==="rejected"&&u(h.reason);return e().catch(u)})},J2="/__l5e/assets-v1/a045c60b-e896-4b9d-b6e7-99e8574af3ff/run-for-cover-cover.jpg",Q2={url:J2},X2="/__l5e/assets-v1/d4331c3b-3d46-4ea9-ab88-9d56d0eaccc1/dont-say-no-cover.png",Iv={url:X2},Z2="/__l5e/assets-v1/0c12cb23-e260-4662-b655-7e8ce516eba7/gold-kirk-logo.png",W2={url:Z2},eD="/__l5e/assets-v1/2c574cec-5f5c-4726-8647-6ad40f284efa/contact-photo.jpg",tD={url:eD},nD="/__l5e/assets-v1/94fcfb01-2252-4818-99b0-85276a271a1c/kd-portrait-white.png",iD={url:nD},rD="/__l5e/assets-v1/8344a422-c226-4cf0-9bb3-22c12c3c2d0f/kd-studio-sepia.jpg",sD={url:rD},aD="/__l5e/assets-v1/56c2af15-91cf-45f9-83ae-70e0734c0cb7/kd-crowd-lights.jpg",oD={url:aD},lD="/__l5e/assets-v1/89a8c648-8171-4697-868f-c07f512f2a5a/kd-graffiti.jpg",uD={url:lD},cD="/__l5e/assets-v1/301ef310-0b1b-493c-af70-0663c48d9197/kd-black-portrait.jpg",fD={url:cD},hD="/__l5e/assets-v1/f639b4be-706b-4dfb-8abc-aec116a5188e/kd-coat-full.jpg",dD={url:hD},pD="/__l5e/assets-v1/5d537c3b-8c76-4c8d-a00a-cbb5bdccda7d/kd-coat-profile.jpg",gD={url:pD},mD="/__l5e/assets-v1/bff841fd-3c3f-4a38-948b-bf4e58c9338d/kd-coat-white.jpg",yD={url:mD},vD="/__l5e/assets-v1/26010b4f-974f-4412-ab34-f66d6e0791ce/kd-black-jacket.jpg",bD={url:vD},_D="/__l5e/assets-v1/3a3fd4c4-fbc6-4c42-b16d-4f95793d3a84/kd-experience-tour-poster.png",wD={url:_D},SD="/__l5e/assets-v1/70a523ae-3975-4bf4-a34d-31aefdc2d06d/kd-leggends.png",ED={url:SD},TD="/__l5e/assets-v1/6c3c31c7-8012-4b2b-9189-d9b93107ec1f/kd-fans-kids.jpg",AD={url:TD},RD="/__l5e/assets-v1/a03d81f4-baf0-445f-a038-55c29bf4f39e/kd-junos-2026.jpg",OD={url:RD},kD="/__l5e/assets-v1/465e4296-572b-4fba-bdbf-a7a5bf3fe735/kd-collage-new1.jpg",CD={url:kD},DD="/__l5e/assets-v1/289e1f3f-0ad3-4174-9f46-7f6dead8a617/kd-collage-new2.jpg",xD={url:DD},jD="/__l5e/assets-v1/ece8808c-3c2f-4387-b1ad-3fafdeed95f8/kd-collage-new3.jpg",ND={url:jD},LD="/__l5e/assets-v1/c5f89dc2-10ad-46e9-9c35-d38bfb3de2b9/too-ruff.jpg",UD={url:LD},MD="/__l5e/assets-v1/70403fe6-d039-4608-8e73-9bc4c5fad44f/reggae-party.jpg",zD={url:MD},BD="/__l5e/assets-v1/c5432101-7d42-497e-9bae-66d9a83fd6ab/deh-yah.jpg",PD={url:BD},HD="/__l5e/assets-v1/f831289a-32fc-4bcf-a8d3-8c38a9eed128/dread.jpg",qD={url:HD},ID="/__l5e/assets-v1/54f4a736-26e7-4078-afe4-c42acdf9bd75/bring-it-good-cover.jpg",$D={url:ID},KD="/__l5e/assets-v1/41527fe5-54c2-4a00-ab19-331de26fe827/as-i-would-say-cover.jpg",GD={url:KD},VD="/__l5e/assets-v1/4a8a9070-c181-4d95-97af-bbad31d84262/love-inna-we-heart-cover.jpg",FD={url:VD},YD="/__l5e/assets-v1/28749204-a5c3-400f-91a6-91ad6165b7b1/greater-ep-cover.jpg",JD={url:YD},QD="/__l5e/assets-v1/981c3a36-61ae-436a-8cdc-9d2c725ec447/kaya-stage.jpg",XD={url:QD},ZD="/__l5e/assets-v1/413fc629-409b-4932-ae4d-ec3acdac436f/kaya-group.jpg",WD={url:ZD},ex="/__l5e/assets-v1/e0d4f5f8-d0b0-4752-af66-4eabb82856e7/kirk-hero-portrait.jpg",tx={url:ex},cn={artist:"Kirk Diamond",header_logo_image:W2.url,artist_logo_alt:"Kirk Diamond",site_url:"https://kirkdiamondmusic.com",background_mode:"velvet",featured_cover:Iv.url,featured_title:"Don't Say No",featured_date_text:"Out October 20th",featured_subline:"New single feat. Kryz Mrk",featured_release_date:"2026-10-20T00:00:00-04:00",primary_cta_text:"Listen / Stream",primary_cta_url:"http://distrokid.com/hyperfollow/kirkdiamondxkryzmrk/dont-say-no/",watch_url:"",featured_video_url:"",credibility_bullets:["Featured on BBC 1Xtra, ET Canada & CBC Music","Toronto Jazz Festival â Headliner (2024)","Luminato â Quincy Jones Tribute (with Grammy winner Larnell Lewis)"],store_url:"https://kirkdiamondmusic.com/store",booking_email:"[email protected]",info_email:"[email protected]",socials:{instagram:"https://instagram.com/kirkdiamond",youtube:"https://youtube.com/@kirkdiamond?feature=shared",spotify:"https://open.spotify.com/artist/kirkdiamond"},tour_embed_url:"https://ahryelhq.com/#tour",music_links:[{label:"Spotify",url:"https://open.spotify.com/artist/kirkdiamond"},{label:"Apple Music",url:""},{label:"YouTube",url:"https://youtube.com/@kirkdiamond?feature=shared"},{label:"SoundCloud",url:""}],releases:[{title:"Don't Say No",artwork:Iv.url,links:[{label:"Pre-save",url:"http://distrokid.com/hyperfollow/kirkdiamondxkryzmrk/dont-say-no/"}]},{title:"Run For Cover",artwork:Q2.url,links:[{label:"Listen",url:"https://ampl.ink/Xx2Gb"}]},{title:"Deh Yah",artwork:PD.url,links:[{label:"Watch",url:"https://www.youtube.com/watch?v=rnyHYM7xM2E"}]},{title:"As I Would Say",artwork:GD.url,links:[{label:"Stream",url:"https://distrokid.com/hyperfollow/kirkdiamondxfinn/as-i-would-say?ref=release"},{label:"Watch",url:"https://www.youtube.com/watch?v=EFv76JIbytI"}]},{title:"Dread (Album)",artwork:qD.url,links:[{label:"Stream",url:"https://distrokid.com/hyperfollow/kirkdiamondandfinn/dread?ref=release"}]},{title:"Bring It Good (feat. Tiffanie Malvo)",artwork:$D.url,links:[{label:"Stream",url:"https://distrokid.com/hyperfollow/kirkdiamondandfinn/bring-it-good-feat-tiffanie-malvo?ref=release"},{label:"Watch",url:"https://youtu.be/Y2ucw7ijBBc"}]},{title:"Reggae Party (feat. Kairo McLean)",artwork:zD.url,links:[{label:"Stream",url:"https://distrokid.com/hyperfollow/kirkdiamondxfinn/reggae-party-feat-kairo-mclean?ref=release"},{label:"Watch",url:"https://www.youtube.com/watch?v=ESP5W3I-Tok"}]},{title:"Too Ruff",artwork:UD.url,links:[{label:"Stream",url:"https://distrokid.com/hyperfollow/kirkdiamondandfinn/too-ruff?ref=release"},{label:"Watch",url:"https://www.youtube.com/watch?v=xnjxyK9Kqyc"}
41]},{title:"Greater (EP)",artwork:JD.url,links:[{label:"Spotify",url:"https://open.spotify.com/album/4lr3w8yvyUmqO3Rt22rdE8?si=NLpdqD2SQJKIVNP425xFJA&utm_source=copy-link"},{label:"Apple Music",url:"https://music.apple.com/ca/album/greater/1236543487"}]},{title:"Love Inna We Heart",artwork:FD.url,links:[{label:"Watch",url:"https://www.youtube.com/watch?v=TX-4QRcL7GI"}]}],bio:["Kirk Diamond is a three-time Juno Awardâwinning singer, songwriter, producer, and cultural force whose music connects reggae, Caribbean culture, and the global soundscape. Born in Jamaica and raised in Canada, Diamond has carved out a distinctive place in reggae through a sound and message rooted in culture, consciousness, and the human experience.",`A seven-time Juno nominee, Diamond's body of work reflects both artistic ambition and cultural conviction. His 2023 album DREAD earned him his third Juno Award in 2024, while its lead single, "Reggae Party," also received a Juno Award. His songwriting extends beyond his own catalogue, including co-writing "Mudda Dey" for soca artist Patrice Roberts, while "Bring It Good" was featured in the film When Morning Comes.`,"Diamond's influence extends beyond music. He is the recipient of the 2020 International Vigor Award, and in 2022, the City of Brampton named a park in his honourâan unprecedented distinction for a reggae artist. His career has also taken him to some of the most significant cultural stages in Canada, including Luminato, the Canadian Songwriters Hall of Fame, and the TD Toronto Jazz Festival, where he headlined a stage in 2024 alongside a festival lineup featuring artists such as André 3000, Lake Street Dive, Hiatus Kaiyote, Cory Henry, and Al Di Meola.","His international presence continues to grow. In 2025, Diamond performed at the Kumnandi Ehkaya Music Festival in Botswana, connecting Caribbean and African musical traditions through performance and collaboration. In 2026, he brought his music to Rotterdam, Netherlands, and performed at the inaugural Kaya Fest Canada, further establishing himself as an artist capable of carrying reggae and Caribbean culture into diverse international spaces.","Known for a commanding live presence, Diamond brings more than music to the stage. His performances blend reggae, dancehall, dub, storytelling, and cultural commentary, creating an experience grounded in identity, resilience, justice, love, spirituality, and connection.","Now entering a new chapter, Kirk Diamond is expanding his creative reach across the Caribbean, Africa, Europe, the United States, and beyond. With new music, international collaborations, and a growing global audience, he continues to build a career that honours where he comes from while refusing to be confined by it."],highlights:["3à JUNO Award winner, 7à JUNO nominee","2020 International Vigor Award recipient","Park named in his honour by the City of Brampton (2022)",'DREAD (2023) â Juno Award-winning album; "Reggae Party" also won a Juno',"2026 â New Skool Rules, Rotterdam, Netherlands","2026 â Kaya Fest Canada","2026 â Reggae on the Mountain","2025 â Kumnandi Ehkaya Music Festival, Botswana","2024 â TD Toronto Jazz Festival â Stage Headliner","2024 â Luminato","2024 â Canadian Songwriters Hall of Fame"],press_quotes:[{quote:"Featured among the best Canadian reggae songs â a defining voice of the country's modern reggae wave.",source:"CBC Music",url:"https://www.cbc.ca/music/best-canadian-reggae-songs-1.7464414"},{quote:"A three-time JUNO winner whose sound bridges Jamaican roots and a global stage.",source:"The JUNO Awards",url:""},{quote:"Kirk Diamond's bright vocals bind the album together into an exciting and self-contained sonic experience.",source:"Reggaeville",url:"https://www.reggaeville.com/artist-details/kirk-diamond/releases/mode/review/release/kirk-diamond-x-finn-dread/"}],epk_url:"",tour_hero_image:oD.url,tour_poster:wD.url,contact_photo:tD.url,about_feature_photo:sD.url,home_hero_portrait:tx.url,home_gallery:[{image:dD.url,alt:"Kirk Diamond full-length portrait"},{image:gD.url,alt:"Kirk Diamond profile portrait"},{image:yD.url,alt:"Kirk Diamond editorial portrait on white"},{image:bD.url,alt:"Kirk Diamond in black jacket"}],photos:[{image:iD.url,category:"about",order:1,alt:"Kirk Diamond portrait"},{image:uD.url,category:"about",order:2,alt:"Kirk Diamond against graffiti w
41all"},{image:fD.url,category:"about",order:3,alt:"Kirk Diamond studio portrait"},{image:OD.url,category:"about",order:4,alt:"Kirk Diamond on the JUNO Awards red carpet",focal:"50% 8%"},{image:ED.url,category:"about",order:5,alt:"Kirk Diamond at the Léggends event"},{image:AD.url,category:"about",order:6,alt:"Kirk Diamond meeting young fans"},{image:CD.url,category:"about",order:7,alt:"Kirk Diamond portrait",focal:"50% 25%"},{image:xD.url,category:"about",order:8,alt:"Kirk Diamond candid moment",focal:"50% 30%"},{image:ND.url,category:"about",order:9,alt:"Kirk Diamond live",focal:"50% 30%"}],journal:{eyebrow:"Behind The Movement",headline:"JOURNAL",intro:"Video moments, studio notes, and road diaries â collected like a scrapbook.",entries:[{title:"Kaya Fest Toronto",date:"Toronto, 2026",youtube_url:"https://youtu.be/fnuTXHPF8Cg?feature=shared",blurb:"Kirk Diamond on stage at Kaya Fest Toronto 2026. Backstage with Jesse Royal, Lila Ike, Tobe, Jully Black, and Exco Levi.",photos:[{url:XD.url,alt:"Kirk Diamond performing on stage at Kaya Fest Toronto",focal:"50% 40%"},{url:WD.url,alt:"Jesse Royal, Lila Ike, Tobe, Jully Black, Kirk Diamond, Exco Levi backstage at Kaya Fest",focal:"50% 30%"}]}]}},n_=()=>Date.now()>=new Date(cn.featured_release_date).getTime(),Aj=()=>n_()?"Out now":cn.featured_date_text,Rj=()=>n_()?"Listen / Stream":"Pre-save",nx=()=>Xe(()=>import("./index-06FE59lS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),ix=Je()({head:()=>({meta:[{title:"Kirk Diamond â Official Site | 3X JUNO Reggae Artist"},{name:"description",content:"Official site of 3X JUNO Award-winning reggae artist Kirk Diamond. New single 'Don't Say No' feat. Kryz Mrk â out October 20th. Tour dates, music, merch, and bio."},{name:"keywords",content:"Kirk Diamond, reggae, Toronto reggae, JUNO Awards, Don't Say No, Kryz Mrk, Jamaican reggae, conscious reggae"},{property:"og:title",content:"Kirk Diamond â Official Site"},{property:"og:description",content:"3X JUNO Award-winning reggae artist. New music, tour dates & merch."},{property:"og:type",content:"music.musician"},{property:"og:url",content:"https://kirkdiamondmusic.com/"},{property:"og:site_name",content:"Kirk Diamond"},{property:"og:image",content:`${cn.site_url}${cn.featured_cover}`},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"MusicGroup",name:"Kirk Diamond",url:"https://kirkdiamondmusic.com/",genre:"Reggae",sameAs:[cn.socials?.instagram,cn.socials?.youtube,cn.socials?.spotify].filter(Boolean)})}]}),component:Qe(nx,"component")}),rx=()=>Xe(()=>import("./route-C6oRK_l3.js"),[]),sx=Je()({beforeLoad:async()=>{const{data:t,error:e}=await Fb.auth.getUser();if(e||!t.user)throw Nh({to:"/auth"});return{user:t.user}},component:Qe(rx,"component")}),ax=()=>Xe(()=>import("./about-DULHUxOs.js"),__vite__mapDeps([9,1,2,3,7,8,6,5])),ox=Je()({head:()=>({meta:[{title:"About & Press â Kirk Diamond"},{name:"description",content:"The story of Kirk Diamond â JUNO-recognized reggae artist bridging Jamaican roots with a global stage. Bio, press quotes, and EPK."},{property:"og:title",content:"About Kirk Diamond"},{property:"og:description",content:"From Jamaican roots to the world stage â the story so far."},{property:"og:type",content:"profile"},{property:"og:url",content:"https://kirkdiamondmusic.com/about"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/about"}]}),component:Qe(ax,"component")}),lx=()=>Xe(()=>import("./auth-7D3vaIf5.js"),__vite__mapDeps([10,1,2,3])),ux=Je()({head:()=>({meta:[{title:"Sign In â Kirk Diamond Admin"},{name:"robots",content:"noindex,nofollow"}]}),component:Qe(lx,"component")}),cx=()=>Xe(()=>import("./contact-DnwZglXD.js"),__vite__mapDeps([11,1,2,3,7,8])),fx=Je()({head:()=>({meta:[{title:"Contact â Kirk Diamond | Booking & Press"},{name:"description",content:"Booking, press and general enquiries for Kirk Diamond. Direct contact and social links."},{property:"og:title",content:"Contact Kirk Diamond"},{property:"og:description",content:"Booking, press, and general enquiries."},{property:"og:type",content:"website"},{property:"og:url",content:"https://kirkdiamondmusic.com/contact"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/contact"}]}),component:Qe(cx,"component")}),$v="https://us.chat-img.sintra.ai/8b2d7c7b-09fd-428b-b409-33a1ac5fe53f/da868103-47fa-4193-9e14-b2f3cf4e3580/IMG_3059.jpeg",hx=()=>Xe(()=>import("./epk-CRDZ6D1Y.js"),__vite__mapDeps([12,1,2,3,13,7])),dx=Je()({head:()=>({meta:[{title:"EPK â Kirk Diamond | Electronic Press Kit"},{name:"description",content:"Official Electronic Press Kit for Kirk Diamond â 3à JUNO winner. Bio, highlights, releases, videos, press photos, and booking contact."},{property:"og:title",content:"Kirk Diamond â EPK"},{property:"og:description",content:"Press-ready bio, releases, videos, photos, and booking info for Kirk Diamond."},{property:"og:type",content:"profile"},{property:"og:url",content:"https://kirkdiamondmusic.com/epk"},{property:"og:image",content:$v},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:$v}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/epk"}]}),component:Qe(hx,"component")}),px=()=>Xe(()=>import("./journal-D3DKq0wg.js"),__vite__mapDeps([14,1,2,3,7,6,5])),gx=Je()({head:()=>({meta:[{title:"Journal â Kirk Diamond | Behind The Movement"},{name:"description",content:"Behind-the-scenes video journal from Kirk Diamond. YouTube moments, road diaries, and studio notes."},{property:"og:title",content:"Kirk Diamond â Journal"},{property:"og:description",content:"Video moments, road diaries, and studio notes."},{property:"og:type",content:"website"},{property:"og:url",content:"https://kirkdiamondmusic.com/journal"},{property:"og:image",content:`${cn.site_url}${cn.featured_cover}`},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/journal"}]}),component:Qe(px,"component")}),mx=()=>Xe(()=>import("./listening-Ddi1e6eK.js"),__vite__mapDeps([15,1,2,3])),yx=Je()({head:()=>({meta:[{title:"Private Listening â Kirk Diamond"},{name:"description",content:"Invite-only listening session."},{name:"robots",content:"noindex, nofollow"}]}),component:Qe(mx,"component")}),vx=()=>Xe(()=>import("./music-CB5EKG4F.js"),__vite__mapDeps([16,1,2,3,13,6,5])),bx=Je()({head:()=>({meta:[{title:"Music â Kirk Diamond | Stream Reggae Singles & Albums"},{name:"description",content:"Stream Kirk Diamond on Spotify, Apple Music and YouTube. New single 'Don't Say No' feat. Kryz Mrk â out October 20th. Releases, videos, and full discography."},{property:"og:title",content:"Kirk Diamond â Music"},{property:"og:description",content:"Listen, watch, and follow the catalogue."},{property:"og:type",content:"music.album"},{property:"og:url",content:"https://kirkdiamondmusic.com/music"},{property:"og:image",content:`${cn.site_url}${cn.featured_cover}`},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/music"}]}),component:Qe(vx,"component")}),_x=()=>Xe(()=>import("./pager-CUbMcr-Z.js"),__vite__mapDeps([17,5,1,2,3,6])),wx=Je()({validateSearch:t=>({return:typeof t.return=="string"&&t.return.startsWith("/")&&!t.return.startsWith("//")?t.return:null}),head:()=>({meta:[{title:"Pager â Kirk Diamond | The Direct Line"},{name:"description",content:"Get on Pager: first call on Kirk Diamond tickets, drops and private moments. No spam, just the real updates."},{property:"og:title",content:"Pager â Kirk Diamond"},{property:"og:description",content:"First call on tickets, drops, and private moments."},{property:"og:type",content:"website"},{property:"og:url",content:"https://kirkdiamondmusic.com/pager"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/pager"}]}),component:Qe(_x,"component")}),Sx=()=>Xe(()=>
41import("./store-COZffCpG.js"),__vite__mapDeps([18,3,1,2,7,6,5])),Ex=Je()({head:()=>({meta:[{title:"Store â Kirk Diamond | Official Merch & Music"},{name:"description",content:"Official Kirk Diamond merch, music, and tickets. Shop tees, vinyl, and more."},{property:"og:title",content:"Store â Kirk Diamond"},{property:"og:description",content:"Official merch, music and tickets from Kirk Diamond."},{property:"og:type",content:"website"},{property:"og:url",content:"https://kirkdiamondmusic.com/store"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/store"}]}),component:Qe(Sx,"component")}),Tx=()=>Xe(()=>import("./tour-CFdvQmEm.js"),__vite__mapDeps([19,1,2,3,4,5,6,7,8])),Ax=Je()({head:()=>({meta:[{title:"Tour Dates â Kirk Diamond | Live Reggae Shows"},{name:"description",content:"Upcoming Kirk Diamond tour dates and live performances. Tickets, venues, and booking for every show."},{property:"og:title",content:"Kirk Diamond â Tour Dates"},{property:"og:description",content:"Catch Kirk Diamond live. Full list of upcoming shows."},{property:"og:type",content:"website"},{property:"og:url",content:"https://kirkdiamondmusic.com/tour"}],links:[{rel:"canonical",href:"https://kirkdiamondmusic.com/tour"}]}),component:Qe(Tx,"component")}),Rx=()=>Xe(()=>import("./admin-B2jz0C9o.js"),__vite__mapDeps([20,3,1,2,21])),Ox=Je()({head:()=>({meta:[{title:"Photo Management â Kirk Diamond"},{name:"robots",content:"noindex,nofollow"}]}),component:Qe(Rx,"component")}),kx=()=>Xe(()=>import("./adminhq-BOCiHITO.js"),__vite__mapDeps([22,1,2,3,21])),Cx=Je()({head:()=>({meta:[{title:"AdminHQ â Kirk Diamond"},{name:"robots",content:"noindex,nofollow"}]}),component:Qe(kx,"component")}),Dx=()=>Xe(()=>import("./store-admin-yk02z6Up.js"),__vite__mapDeps([23,3,1,2,21])),xx=Je()({head:()=>({meta:[{title:"Store â Kirk Diamond Admin"},{name:"robots",content:"noindex,nofollow"}]}),component:Qe(Dx,"component")}),jx=()=>Xe(()=>import("./adminhq.index-Dypuo464.js"),__vite__mapDeps([24,25,3,5,2])),Nx=Je()({component:Qe(jx,"component")}),Lx=()=>Xe(()=>import("./adminhq.content-CA3zmJB2.js"),__vite__mapDeps([26,25,3,5,2])),Ux=Je()({component:Qe(Lx,"component")}),Mx=()=>Xe(()=>import("./adminhq.photos-DqViZ1gx.js"),__vite__mapDeps([27,25,3,5,2])),zx=Je()({component:Qe(Mx,"component")}),Bx=()=>Xe(()=>import("./adminhq.promo-Bdmza8II.js"),__vite__mapDeps([28,3,21])),Px=Je()({component:Qe(Bx,"component")}),Hx=()=>Xe(()=>import("./adminhq.subscribers-BawMHE1k.js"),__vite__mapDeps([29,25,3,5,2])),qx=Je()({component:Qe(Hx,"component")}),Ix=()=>Xe(()=>import("./adminhq.team-B5vTJtOm.js"),__vite__mapDeps([30,25,3,5,2,21])),$x=Je()({component:Qe(Ix,"component")}),Kx=ix.update({id:"/",path:"/",getParentRoute:()=>Dt}),gu=sx.update({id:"/_authenticated",getParentRoute:()=>Dt}),Gx=ox.update({id:"/about",path:"/about",getParentRoute:()=>Dt}),Vx=ux.update({id:"/auth",path:"/auth",getParentRoute:()=>Dt}),Fx=fx.update({id:"/contact",path:"/contact",getParentRoute:()=>Dt}),Yx=dx.update({id:"/epk",path:"/epk",getParentRoute:()=>Dt}),Jx=gx.update({id:"/journal",path:"/journal",getParentRoute:()=>Dt}),Qx=yx.update({id:"/listening",path:"/listening",getParentRoute:()=>Dt}),Xx=bx.update({id:"/music",path:"/music",getParentRoute:()=>Dt}),Zx=wx.update({id:"/pager",path:"/pager",getParentRoute:()=>Dt}),Wx=Ex.update({id:"/store",path:"/store",getParentRoute:()=>Dt}),ej=Ax.update({id:"/tour",path:"/tour",getParentRoute:()=>Dt}),tj=Ox.update({id:"/admin",path:"/admin",getParentRoute:()=>gu}),br=Cx.update({id:"/adminhq",path:"/adminhq",getParentRoute:()=>gu}),nj=xx.update({id:"/store-admin",path:"/store-admin",getParentRoute:()=>gu}),ij=Nx.update({id:"/",path:"/",getParentRoute:()=>br}),rj=Ux.update({id:"/content",path:"/content",getParentRoute:()=>br}),sj=zx.update({id:"/photos",path:"/photos",getParentRoute:()=>br}),aj=Px.update({id:"/promo",path:"/promo",getParentRoute:()=>br}),oj=qx.update({id:"/subscribers",path:"/subscribers",getParentRoute:()=>br}),lj=$x.update({id:"/team",path:"/team",getParentRoute:()=>br}),uj={AuthenticatedAdminhqContentRoute:rj,AuthenticatedAdminhqPhotosRoute:sj,AuthenticatedAdminhqPromoRoute:aj,AuthenticatedAdminhqSubscribersRoute:oj,AuthenticatedAdminhqTeamRoute:lj,AuthenticatedAdminhqIndexRoute:ij},cj=br._addFileChildren(uj),fj={AuthenticatedAdminRoute:tj,AuthenticatedAdminhqRoute:cj,AuthenticatedStoreAdminRoute:nj},hj=gu._addFileChildren(fj),dj={IndexRoute:Kx,AuthenticatedRouteRoute:hj,AboutRoute:Gx,AuthRoute:Vx,ContactRoute:Fx,EpkRoute:Yx,JournalRoute:Jx,ListeningRoute:Qx,MusicRoute:Xx,PagerRoute:Zx,StoreRoute:Wx,TourRoute:ej},pj=Dt._addFileChildren(dj),gj=()=>{const t=new P2;return I1({routeTree:pj,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function mj(){const t=await gj();let e;if(jv){const r=await jv.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,e=r.serializationAdapters,t.options.defaultSsr=r.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(QR),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.ids.get().length||await qE(t),t}var yj=mj;function vj(){return yj().finally(()=>window.$_TSR?.h())}var ah;function bj(){return ah||(ah=vj()),J.jsx(ZR,{promise:ah,children:t=>J.jsx(G1,{router:t})})}ue.startTransition(()=>{MS.hydrateRoot(document,J.jsx(ue.StrictMode,{children:J.jsx(bj,{})}))});export{Ch as A,Yb as B,N2 as C,E2 as D,bt as E,Ej as F,$v as H,ed as L,wb as O,pu as S,_j as T,Aj as a,Fb as b,JR as c,Tj as d,wt as e,Rj as f,Tn as g,y1 as h,n_ as i,J as j,W2 as k,hr as l,Gv as m,Kv as n,O2 as o,PS as p,_2 as q,ue as r,cn as s,Sj as t,gb as u,Dh as v,ln as w,Xb as x,v2 as y,b2 as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.