vendor: 14,460 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/subscribe-CvZBSyK5.js","assets/SiteShell-kCcS0yoN.js","assets/input-tZmWCgOg.js","assets/index-CfEHCert.js","assets/label-DeEFItEl.js","assets/button-BADxCDgT.js","assets/checkbox-CAOyr4UT.js","assets/check-cHy2DRLh.js","assets/createLucideIcon-D3-zlZlW.js","assets/index-BJLmsfMY.js","assets/search-CAt_eT6e.js","assets/search-xds84yyw.js","assets/reset-password-DaQCG1gq.js","assets/privacy-policy-DOxQHNGi.js","assets/site-pages-B7NjgP9w.js","assets/login-D6cDpPAK.js","assets/forgot-password-CPPG9Wq0.js","assets/contact-DQigaj48.js","assets/textarea-DJcvk7Da.js","assets/admin-BjwjVO5l.js","assets/AdminLayout-BEe8rhTT.js","assets/auth-Crn_huWm.js","assets/about-Db7VPeSd.js","assets/index-CPGmtZfT.js","assets/topics.index-DSa0SLub.js","assets/press-releases.index-CeXWO7y5.js","assets/organizations.index-ChmfcavW.js","assets/useSuspenseQuery-BSs7Nuon.js","assets/guests.index-CmoEUffb.js","assets/episodes.index-CUc3bqQd.js","assets/topics._slug-BrYSd5Yn.js","assets/press-releases._slug-YDZrc-3V.js","assets/index-Clm7_ety.js","assets/press-releases._slug-C5vvswB0.js","assets/organizations._slug-J2TapNCJ.js","assets/guests._slug-FVUNr2JR.js","assets/episodes._slug-DkPJumEr.js","assets/download-B6wGO4Td.js","assets/category._slug-BvFE5vtC.js","assets/admin.index-BZFtCDuy.js","assets/admin.topics-5asa9zpA.js","assets/dialog-7Xkf8qGe.js","assets/index-Cs3FG-20.js","assets/x-ILz4g1zj.js","assets/auth-middleware-Da7qzYmC.js","assets/content-generation.functions-CNcbEIyw.js","assets/admin.social-BI32XdL1.js","assets/admin.settings-1TEWrcIU.js","assets/admin.publications-w1ub3kcW.js","assets/admin.pages-BTA0HLTS.js","assets/admin.organizations-JATssyV8.js","assets/CrudTable-gSTwb8-5.js","assets/alert-dialog-u_JCqpR8.js","assets/ImageUpload-BnXJw_oC.js","assets/admin.incoming-drafts-yJoS1kuu.js","assets/admin.guests-PE_K18sD.js","assets/admin.episodes-Bwn00yGq.js","assets/admin.episode-emails-CW4DJOaV.js","assets/episode-email.functions-Bd8Xs6SW.js","assets/admin.categories-BYjggK0_.js","assets/admin.articles-1LYH0lR4.js","assets/admin.graphics.index-DgY3NW_i.js","assets/admin.graphics._id-BhEgUpYC.js","assets/admin.export._id-CHalOWvh.js","assets/MarkdownEditor-DA3JHolY.js","assets/MarkdownEditor-lNAsOZKS.css","assets/admin.pages._slug-aRqJvUO5.js","assets/admin.episodes.new-DhKrg1Kp.js","assets/admin.episodes._id-B4i85f_a.js"])))=>i.map(i=>d[i]); 2function AS(e,t){for(var s=0;s<t.length;s++){const a=t[s];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const c=Object.getOwnPropertyDescriptor(a,o);c&&Object.defineProperty(e,o,c.get?c:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var iM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function g0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oM(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function a(){var o=!1;try{o=this instanceof a}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(s,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),s}var ah={exports:{}},Qi={};var vy;function OS(){if(vy)return Qi;vy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:c}}return Qi.Fragment=t,Qi.jsx=s,Qi.jsxs=s,Qi}var by;function xS(){return by||(by=1,ah.exports=OS()),ah.exports}var X=xS(),ih={exports:{}},ye={};var _y;function CS(){if(_y)return ye;_y=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,R={};function A(C,q,F){this.props=C,this.context=q,this.refs=R,this.updater=F||w}A.prototype.isReactComponent={},A.prototype.setState=function(C,q){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,q,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function j(){}j.prototype=A.prototype;function k(C,q,F){this.props=C,this.context=q,this.refs=R,this.updater=F||w}var D=k.prototype=new j;D.constructor=k,E(D,A.prototype),D.isPureReactComponent=!0;var Q=Array.isArray;function G(){}var I={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function J(C,q,F){var Z=F.ref;return{$$typeof:e,type:C,key:q,ref:Z!==void 0?Z:null,props:F}}function re(C,q){return J(C.type,q,C.props)}function se(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function fe(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(F){return q[F]})}var ge=/\/+/g;function Ke(C,q){return typeof C=="object"&&C!==null&&C.key!=null?fe(""+C.key):q.toString(36)}function Le(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(G,G):(C.status="pending",C.then(function(q){C.status==="pending"&&(C.status="fulfilled",C.value=q)},function(q){C.status==="pending"&&(C.status="rejected",C.reason=q)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,q,F,Z,ee){var ue=typeof C;(ue==="undefined"||ue==="boolean")&&(C=null);var Ee=!1;if(C===null)Ee=!0;else switch(ue){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(C.$$typeof){case e:case t:Ee=!0;break;case y:return Ee=C._init,L(Ee(C._payload),q,F,Z,ee)}}if(Ee)return ee=ee(C),Ee=Z===""?"."+Ke(C,0):Z,Q(ee)?(F="",Ee!=null&&(F=Ee.replace(ge,"$&/")+"/"),L(ee,q,F,"",function(Bt){return Bt})):ee!=null&&(se(ee)&&(ee=re(ee,F+(ee.key==null||C&&C.key===ee.key?"":(""+ee.key).replace(ge,"$&/")+"/")+Ee)),q.push(ee)),1;Ee=0;var pe=Z===""?".":Z+":";if(Q(C))for(var je=0;je<C.length;je++)Z=C[je],ue=pe+Ke(Z,je),Ee+=L(Z,q,F,ue,ee);else if(je=_(C),typeof je=="function")for(C=je.call(C),je=0;!(Z=C.next()).done;)Z=Z.value,ue=pe+Ke(Z,je++),Ee+=L(Z,q,F,ue,ee);else if(ue==="object"){if(typeof C.then=="function")return L(Le(C),q,F,Z,ee);throw q=String(C),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Y(C,q,F){if(C==null)return C;var Z=[],ee=0;return L(C,Z,"","",function(ue){return q.call(F,ue,ee++)}),Z}function oe(C){if(C._status===-1){var q=C._result;q=q(),q.then(function(F){(C._status===0||C._status===-1)&&(C._status=1,C._result=F)},function(F){(C._status===0||C._status===-1)&&(C._status=2,C._result=F)}),C._status===-1&&(C._status=0,C._result=q)}if(C._status===1)return C._result.default;throw C._result}var Te=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ve={map:Y,forEach:function(C,q,F){Y(C,function(){q.apply(this,arguments)},F)},count:function(C){var q=0;return Y(C,function(){q++}),q},toArray:function(C){return Y(C,function(q){return q})||[]},only:function(C){if(!se(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ye.Activity=g,ye.Children=ve,ye.Component=A,ye.Fragment=s,ye.Profiler=o,ye.PureComponent=k,ye.StrictMode=a,ye.Suspense=p,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ye.__COMPILER_RUNTIME={__proto__:null,c:function(C){return I.H.useMemoCache(C)}},ye.cache=function(C){return function(){return C.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(C,q,F){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var Z=E({},C.props),ee=C.key;if(q!=null)for(ue in q.key!==void 0&&(ee=""+q.key),q)!$.call(q,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&q.ref===void 0||(Z[ue]=q[ue]);var ue=arguments.length-2;if(ue===1)Z.children=F;else if(1<ue){for(var Ee=Array(ue),pe=0;pe<ue;pe++)Ee[pe]=arguments[pe+2];Z.children=Ee}return J(C.type,ee,Z)},ye.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},ye.createElement=function(C,q,F){var Z,ee={},ue=null;if(q!=null)for(Z in q.key!==void 0&&(ue=""+q.key),q)$.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=q[Z]);var Ee=arguments.length-2;if(Ee===1)ee.children=F;else if(1<Ee){for(var pe=Array(Ee),je=0;je<Ee;je++)pe[je]=arguments[je+2];ee.children=pe}if(C&&C.defaultProps)for(Z in Ee=C.defaultProps,Ee)ee[Z]===void 0&&(ee[Z]=Ee[Z]);return J(C,ue,ee)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(C){return{$$typeof:h,render:C}},ye.isValidElement=se,ye.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:oe}},ye.memo=function(C,q){return{$$typeof:m,type:C,compare:q===void 0?null:q}},ye.startTransition=function(C){var q=I.T,F={};I.T=F;try{var Z=C(),ee=I.S;ee!==null&&ee(F,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(G,Te)}catch(ue){Te(ue)}finally{q!==null&&F.types!==null&&(q.types=F.types),I.T=q}},ye.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ye.use=function(C){return I.H.use(C)},ye.useActionState=function(C,q,F){return I.H.useActionState(C,q,F)},ye.useCallback=function(C,q){return I.H.useCallback(C,q)},ye.useContext=function(C){return I.H.useContext(C)},ye.useDebugValue=function(){},ye.useDeferredValue=function(C,q){return I.H.useDeferredValue(C,q)},ye.useEffect=function(C,q){return I.H.useEffect(C,q)},ye.useEffectEvent=function(C){return I.H.useEffectEvent(C)},ye.useId=function(){return I.H.useId()},ye.useImperativeHandle=function(C,q,F){return I.H.useImperativeHandle(C,q,F)},ye.useInsertionEffect=function(C,q){return I.H.useInsertionEffect(C,q)},ye.useLayoutEffect=function(C,q){return I.H.useLayoutEffect(C,q)},ye.useMemo=function(C,q){return I.H.useMemo(C,q)},ye.useOptimistic=function(C,q){return I.H.useOptimistic(C,q)},ye.useReducer=function(C,q,F){return I.H.useReducer(C,q,F)},ye.useRef=function(C){return I.H.useRef(C)},ye.useState=function(C){return I.H.useState(C)},ye.useSyncExternalStore=function(C,q,F){return I.H.useSyncExternalStore(C,q,F)},ye.useTransition=function(){return I.H.useTransition()},ye.version="19.2.5",ye}var wy;function To(){return wy||(wy=1,ih.exports=CS()),ih.exports}var ne=To();const W=g0(ne),lM=AS({__proto__:null,default:W},[ne]);var oh={exports:{}},Ji={},lh={exports:{}},ch={};var Sy;function kS(){return Sy||(Sy=1,(function(e){function t(L,Y){var oe=L.length;L.push(Y);e:for(;0<oe;){var Te=oe-1>>>1,ve=L[Te];if(0<o(ve,Y))L[Te]=Y,L[oe]=ve,oe=Te;else break e}}function s(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var Y=L[0],oe=L.pop();if(oe!==Y){L[0]=oe;e:for(var Te=0,ve=L.length,C=ve>>>1;Te<C;){var q=2*(Te+1)-1,F=L[q],Z=q+1,ee=L[Z];if(0>o(F,oe))Z<ve&&0>o(ee,F)?(L[Te]=ee,L[Z]=oe,Te=Z):(L[Te]=F,L[q]=oe,Te=q);else if(Z<ve&&0>o(ee,oe))L[Te]=ee,L[Z]=oe,Te=Z;else break e}}return Y}function o(L,Y){var oe=L.sortIndex-Y.sortIndex;return oe!==0?oe:L.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();e.unstable_now=function(){return u.now()-h}}var p=[],m=[],y=1,g=null,b=3,_=!1,w=!1,E=!1,R=!1,A=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function D(L){for(var Y=s(m);Y!==null;){if(Y.callback===null)a(m);else if(Y.startTime<=L)a(m),Y.sortIndex=Y.expirationTime,t(p,Y);else break;Y=s(m)}}function Q(L){if(E=!1,D(L),!w)if(s(p)!==null)w=!0,G||(G=!0,fe());else{var Y=s(m);Y!==null&&Le(Q,Y.startTime-L)}}var G=!1,I=-1,$=5,J=-1;function re(){return R?!0:!(e.unstable_now()-J<$)}function se(){if(R=!1,G){var L=e.unstable_now();J=L;var Y=!0;try{e:{w=!1,E&&(E=!1,j(I),I=-1),_=!0;var oe=b;try{t:{for(D(L),g=s(p);g!==null&&!(g.expirationTime>L&&re());){var Te=g.callback;if(typeof Te=="function"){g.callback=null,b=g.priorityLevel;var ve=Te(g.expirationTime<=L);if(L=e.unstable_now(),typeof ve=="function"){g.callback=ve,D(L),Y=!0;break t}g===s(p)&&a(p),D(L)}else a(p);g=s(p)}if(g!==null)Y=!0;else{var C=s(m);C!==null&&Le(Q,C.startTime-L),Y=!1}}break e}finally{g=null,b=oe,_=!1}Y=void 0}}finally{Y?fe():G=!1}}}var fe;if(typeof k=="function")fe=function(){k(se)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Ke=ge.port2;ge.port1.onmessage=se,fe=function(){Ke.postMessage(null)}}else fe=function(){A(se,0)};function Le(L,Y){I=A(function(){L(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<L?Math.floor(1e3/L):
vendor: 8,803 bytes, line 2
25},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(L){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var oe=b;b=Y;try{return L()}finally{b=oe}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(L,Y){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var oe=b;b=L;try{return Y()}finally{b=oe}},e.unstable_scheduleCallback=function(L,Y,oe){var Te=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Te+oe:Te):oe=Te,L){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=oe+ve,L={id:y++,callback:Y,priorityLevel:L,startTime:oe,expirationTime:ve,sortIndex:-1},oe>Te?(L.sortIndex=oe,t(m,L),s(p)===null&&L===s(m)&&(E?(j(I),I=-1):E=!0,Le(Q,oe-Te))):(L.sortIndex=ve,t(p,L),w||_||(w=!0,G||(G=!0,fe()))),L},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(L){var Y=b;return function(){var oe=b;b=Y;try{return L.apply(this,arguments)}finally{b=oe}}}})(ch)),ch}var Ey;function PS(){return Ey||(Ey=1,lh.exports=kS()),lh.exports}var uh={exports:{}},Lt={};var Ry;function jS(){if(Ry)return Lt;Ry=1;var e=To();function t(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(t(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Lt.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return c(p,m,null,y)},Lt.flushSync=function(p){var m=u.T,y=a.p;try{if(u.T=null,a.p=2,p)return p()}finally{u.T=m,a.p=y,a.d.f()}},Lt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},Lt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Lt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,_=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:_}):y==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Lt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=h(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},Lt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin);a.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Lt.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=h(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},Lt.requestFormReset=function(p){a.d.r(p)},Lt.unstable_batchedUpdates=function(p,m){return p(m)},Lt.useFormState=function(p,m,y){return u.H.useFormState(p,m,y)},Lt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Lt.version="19.2.5",Lt}var Ty;function y0(){if(Ty)return uh.exports;Ty=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),uh.exports=jS(),uh.exports}var Ay;function MS(){if(Ay)return Ji;Ay=1;var e=PS(),t=To(),s=y0();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function u(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function h(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(a(188))}function m(n){var r=n.alternate;if(!r){if(r=c(n),r===null)throw Error(a(188));return r!==n?null:n}for(var i=n,l=r;;){var d=i.return;if(d===null)break;var f=d.alternate;if(f===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===i)return p(d),n;if(f===l)return p(d),r;f=f.sibling}throw Error(a(188))}if(i.return!==l.return)i=d,l=f;else{for(var v=!1,S=d.child;S;){if(S===i){v=!0,i=d,l=f;break}if(S===l){v=!0,l=d,i=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===i){v=!0,i=f,l=d;break}if(S===l){v=!0,l=f,i=d;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==l)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function fe(n){return n===null||typeof n!="object"?null:(n=se&&n[se]||n["@@iterator"],typeof n=="function"?n:null)}var ge=Symbol.for("react.client.reference");function Ke(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ge?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case A:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case G:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case k:return n.displayName||"Context";case j:return(n._context.displayName||"Context")+".Consumer";case D:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case I:return r=n.displayName||null,r!==null?r:Ke(n.type)||"Memo";case $:r=n._payload,n=n._init;try{return Ke(n(r))}catch{}}return null}var Le=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Te=[],ve=-1;function C(n){return{current:n}}function q(n){0>ve||(n.current=Te[ve],Te[ve]=null,ve--)}function F(n,r){ve++,Te[ve]=n.current,n.current=r}var Z=C(null),ee=C(null),ue=C(null),Ee=C(null);function pe(n,r){switch(F(ue,r),F(ee,n),F(Z,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?$g(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=$g(r),n=Hg(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q(Z),F(Z,n)}function je(){q(Z),q(ee),q(ue)}function Bt(n){n.memoizedState!==null&&F(Ee,n);var r=Z.current,i=Hg(r,n.type);
vendor: 9,473 bytes, lines 2-9
2r!==i&&(F(ee,n),F(Z,i))}function $t(n){ee.current===n&&(q(Z),q(ee)),Ee.current===n&&(q(Ee),Gi._currentValue=oe)}var Ut,fr;function Ht(n){if(Ut===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Ut=r&&r[1]||"",fr=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Ut+n+fr}var pr=!1;function Xn(n,r){if(!n||pr)return"";pr=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(B){var z=B}Reflect.construct(n,[],K)}else{try{K.call()}catch(B){z=B}n.call(K.prototype)}}else{try{throw Error()}catch(B){z=B}(K=n())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(B){if(B&&z&&typeof B.stack=="string")return[B.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var x=v.split(` 5`),U=S.split(` 6`);for(d=l=0;l<x.length&&!x[l].includes("DetermineComponentFrameRoot");)l++;for(;d<U.length&&!U[d].includes("DetermineComponentFrameRoot");)d++;if(l===x.length||d===U.length)for(l=x.length-1,d=U.length-1;1<=l&&0<=d&&x[l]!==U[d];)d--;for(;1<=l&&0<=d;l--,d--)if(x[l]!==U[d]){if(l!==1||d!==1)do if(l--,d--,0>d||x[l]!==U[d]){var H=` 7`+x[l].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=l&&0<=d);break}}}finally{pr=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?Ht(i):""}function Un(n,r){switch(n.tag){case 26:case 27:case 5:return Ht(n.type);case 16:return Ht("Lazy");case 13:return n.child!==r&&r!==null?Ht("Suspense Fallback"):Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return Xn(n.type,!1);case 11:return Xn(n.type.render,!1);case 1:return Xn(n.type,!0);case 31:return Ht("Activity");default:return""}}function gn(n){try{var r="",i=null;do r+=Un(n,i),i=n,n=n.return;while(n);return r}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var Et=Object.prototype.hasOwnProperty,an=e.unstable_scheduleCallback,mr=e.unstable_cancelCallback,gt=e.unstable_shouldYield,zn=e.unstable_requestPaint,yt=e.unstable_now,Be=e.unstable_getCurrentPriorityLevel,tt=e.unstable_ImmediatePriority,yn=e.unstable_UserBlockingPriority,Zn=e.unstable_NormalPriority,ri=e.unstable_LowPriority,Wn=e.unstable_IdlePriority,Co=e.log,As=e.unstable_setDisableYieldValue,gr=null,zt=null;function Cn(n){if(typeof Co=="function"&&As(n),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(gr,n)}catch{}}var Dt=Math.clz32?Math.clz32:In,Yc=Math.log,ai=Math.LN2;function In(n){return n>>>=0,n===0?32:31-(Yc(n)/ai|0)|0}var Xr=256,Zr=262144,yr=4194304;function Bn(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function me(n,r,i){var l=n.pendingLanes;if(l===0)return 0;var d=0,f=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=l&134217727;return S!==0?(l=S&~f,l!==0?d=Bn(l):(v&=S,v!==0?d=Bn(v):i||(i=S&~n,i!==0&&(d=Bn(i))))):(S=l&~f,S!==0?d=Bn(S):v!==0?d=Bn(v):i||(i=l&~n,i!==0&&(d=Bn(i)))),d===0?0:r!==0&&r!==d&&(r&f)===0&&(f=d&-d,i=r&-r,f>=i||f===32&&(i&4194048)!==0)?r:d}function Je(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function vt(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nt(){var n=yr;return yr<<=1,(yr&62914560)===0&&(yr=4194304),n}function Os(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function We(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function qt(n,r,i,l,d,f){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,x=n.expirationTimes,U=n.hiddenUpdates;for(i=v&~i;0<i;){var H=31-Dt(i),K=1<<H;S[H]=0,x[H]=-1;var z=U[H];if(z!==null)for(U[H]=null,H=0;H<z.length;H++){var B=z[H];B!==null&&(B.lane&=-536870913)}i&=~K}l!==0&&vr(n,l,0),f!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=f&~(v&~r))}function vr(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var l=31-Dt(r);n.entangledLanes|=r,n.entanglements[l]=n.entanglements[l]|1073741824|i&261930}function Vt(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var l=31-Dt(i),d=1<<l;d&r|n[l]&r&&(n[l]|=r),i&=~d}}function Gt(n,r){var i=r&-r;return i=(i&42)!==0?1:Wr(i),(i&(n.suspendedLanes|r))!==0?0:i}function Wr(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 kn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Qc(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:dy(n.type))}function Of(n,r){var i=Y.p;try{return Y.p=n,r()}finally{Y.p=i}}var xs=Math.random().toString(36).slice(2),Rt="__reactFiber$"+xs,Kt="__reactProps$"+xs,ea="__reactContainer$"+xs,Jc="__reactEvents$"+xs,m_="__reactListeners$"+xs,g_="__reactHandles$"+xs,xf="__reactResources$"+xs,ii="__reactMarker$"+xs;function Xc(n){delete n[Rt],delete n[Kt],delete n[Jc],delete n[m_],delete n[g_]}function ta(n){var r=n[Rt];if(r)return r;for(var i=n.parentNode;i;){if(r=i[ea]||i[Rt]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=Qg(n);n!==null;){if(i=n[Rt])return i;n=Qg(n)}return r}n=i,i=n.parentNode}return null}function na(n){if(n=n[Rt]||n[ea]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function oi(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function sa(n){var r=n[xf];return r||(r=n[xf]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function bt(n){n[ii]=!0}var Cf=new Set,kf={};function br(n,r){ra(n,r),ra(n+"Capture",r)}function ra(n,r){for(kf[n]=r,n=0;n<r.length;n++)Cf.add(r[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]*$"),Pf={},jf={};function v_(n){return Et.call(jf,n)?!0:Et.call(Pf,n)?!1:y_.test(n)?jf[n]=!0:(Pf[n]=!0,!1)}function ko(n,r,i){if(v_(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function Po(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function es(n,r,i,l){if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+l)}}function vn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Mf(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function b_(n,r,i){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,f=l.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,f.call(this,v)}}),Object.defineProperty(n,r,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Zc(n){if(!n._valueTracker){var r=Mf(n)?"checked":"value";n._valueTracker=b_(n,r,""+n[r])}}function Df(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return n&&(l=Mf(n)?n.checked?"true":"false":n.value),n=l,n!==i?(r.setValue(n),!0):!1}
vendor: 4,644 bytes, line 9
9function jo(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 bn(n){return n.replace(__,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Wc(n,r,i,l,d,f,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),r!=null?v==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+vn(r)):n.value!==""+vn(r)&&(n.value=""+vn(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?eu(n,v,vn(r)):i!=null?eu(n,v,vn(i)):l!=null&&n.removeAttribute("value"),d==null&&f!=null&&(n.defaultChecked=!!f),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+vn(S):n.removeAttribute("name")}function Nf(n,r,i,l,d,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),r!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||r!=null)){Zc(n);return}i=i!=null?""+vn(i):"",r=r!=null?""+vn(r):i,S||r===n.value||(n.value=r),n.defaultValue=r}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=S?n.checked:!!l,n.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Zc(n)}function eu(n,r,i){r==="number"&&jo(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function aa(n,r,i,l){if(n=n.options,r){r={};for(var d=0;d<i.length;d++)r["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=r.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&l&&(n[i].defaultSelected=!0)}else{for(i=""+vn(i),r=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}r!==null||n[d].disabled||(r=n[d])}r!==null&&(r.selected=!0)}}function Lf(n,r,i){if(r!=null&&(r=""+vn(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+vn(i):""}function Uf(n,r,i,l){if(r==null){if(l!=null){if(i!=null)throw Error(a(92));if(Le(l)){if(1<l.length)throw Error(a(93));l=l[0]}i=l}i==null&&(i=""),r=i}i=vn(r),n.defaultValue=i,l=n.textContent,l===i&&l!==""&&l!==null&&(n.value=l),Zc(n)}function ia(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}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 zf(n,r,i){var l=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":l?n.setProperty(r,i):typeof i!="number"||i===0||w_.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function If(n,r,i){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in r)l=r[d],r.hasOwnProperty(d)&&i[d]!==l&&zf(n,d,l)}else for(var f in r)r.hasOwnProperty(f)&&zf(n,f,r[f])}function tu(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 Mo(n){return E_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ts(){}var nu=null;function su(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var oa=null,la=null;function Bf(n){var r=na(n);if(r&&(n=r.stateNode)){var i=n[Kt]||null;e:switch(n=r.stateNode,r.type){case"input":if(Wc(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+bn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==n&&l.form===n.form){var d=l[Kt]||null;if(!d)throw Error(a(90));Wc(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(r=0;r<i.length;r++)l=i[r],l.form===n.form&&Df(l)}break e;case"textarea":Lf(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&aa(n,!!i.multiple,r,!1)}}}var ru=!1;function $f(n,r,i){if(ru)return n(r,i);ru=!0;try{var l=n(r);return l}finally{if(ru=!1,(oa!==null||la!==null)&&(_l(),oa&&(r=oa,n=la,la=oa=null,Bf(r),n)))for(r=0;r<n.length;r++)Bf(n[r])}}function li(n,r){var i=n.stateNode;if(i===null)return null;var l=i[Kt]||null;if(l===null)return null;i=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(a(231,r,typeof i));return i}var ns=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),au=!1;if(ns)try{var ci={};Object.defineProperty(ci,"passive",{get:function(){au=!0}}),window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch{au=!1}var Cs=null,iu=null,Do=null;function Hf(){if(Do)return Do;var n,r=iu,i=r.length,l,d="value"in Cs?Cs.value:Cs.textContent,f=d.length;for(n=0;n<i&&r[n]===d[n];n++);var v=i-n;for(l=1;l<=v&&r[i-l]===d[f-l];l++);return Do=d.slice(n,1<l?1-l:void 0)}function No(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Lo(){return!0}function qf(){return!1}function Ft(n){function r(i,l,d,f,v){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Lo:qf,this.isPropagationStopped=qf,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Lo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Lo)},persist:function(){},isPersistent:Lo}),r}var _r={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uo=Ft(_r),ui=g({},_r,{view:0,detail:0}),R_=Ft(ui),ou,lu,di,zo=g({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,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!==di&&(
vendor: 1,454 bytes, line 9
9di&&n.type==="mousemove"?(ou=n.screenX-di.screenX,lu=n.screenY-di.screenY):lu=ou=0,di=n),ou)},movementY:function(n){return"movementY"in n?n.movementY:lu}}),Vf=Ft(zo),T_=g({},zo,{dataTransfer:0}),A_=Ft(T_),O_=g({},ui,{relatedTarget:0}),cu=Ft(O_),x_=g({},_r,{animationName:0,elapsedTime:0,pseudoElement:0}),C_=Ft(x_),k_=g({},_r,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),P_=Ft(k_),j_=g({},_r,{data:0}),Gf=Ft(j_),M_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D_={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"},N_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L_(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=N_[n])?!!r[n]:!1}function uu(){return L_}var U_=g({},ui,{key:function(n){if(n.key){var r=M_[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=No(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
9keydown"||n.type==="keyup"?D_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(n){return n.type==="keypress"?No(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?No(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),z_=Ft(U_),I_=g({},zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kf=Ft(I_),B_=g({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),$_=Ft(B_),H_=g({},_r,{propertyName:0,elapsedTime:0,pseudoElement:0}),q_=Ft(H_),V_=g({},zo,{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_=Ft(V_),K_=g({},_r,{newState:0,oldState:0}),F_=Ft(K_),Y_=[9,13,27,32],du=ns&&"CompositionEvent"in window,hi=null;ns&&"documentMode"in document&&(hi=document.documentMode);var Q_=ns&&"TextEvent"in window&&!hi,Ff=ns&&(!du||hi&&8<hi&&11>=hi),Yf=" ",Qf=!1;function Jf(n,r){switch(n){case"keyup":return Y_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xf(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ca=!1;function J_(n,r){switch(n){case"compositionend":return Xf(r);case"keypress":return r.which!==32?null:(Qf=!0,Yf);case"textInput":return n=r.data,n===Yf&&Qf?null:n;default:return null}}function X_(n,r){if(ca)return n==="compositionend"||!du&&Jf(n,r)?(n=Hf(),Do=iu=Cs=null,ca=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ff&&r.locale!=="ko"?null:r.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 Zf(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!Z_[n.type]:r==="textarea"}function Wf(n,r,i,l){oa?la?la.push(l):la=[l]:oa=l,r=Ol(r,"onChange"),0<r.length&&(i=new Uo("onChange","change",null,i,l),n.push({event:i,listeners:r}))}var fi=null,pi=null;function W_(n){Ng(n,0)}function Io(n){var r=oi(n);if(Df(r))return n}function ep(n,r){if(n==="change")return r}var tp=!1;if(ns){var hu;if(ns){var fu="oninput"in document;if(!fu){var np=document.createElement("div");np.setAttribute("oninput","return;"),fu=typeof np.oninput=="function"}hu=fu}else hu=!1;tp=hu&&(!document.documentMode||9<document.documentMode)}function sp(){fi&&(fi.detachEvent("onpropertychange",rp),pi=fi=null)}function rp(n){if(n.propertyName==="value"&&Io(pi)){var r=[];Wf(r,pi,n,su(n)),$f(W_,r)}}function ew(n,r,i){n==="focusin"?(sp(),fi=r,pi=i,fi.attachEvent("onpropertychange",rp)):n==="focusout"&&sp()}function tw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Io(pi)}function nw(n,r){if(n==="click")return Io(r)}function sw(n,r){if(n==="input"||n==="change")return Io(r)}function rw(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var on=typeof Object.is=="function"?Object.is:rw;function mi(n,r){if(on(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!Et.call(r,d)||!on(n[d],r[d]))return!1}return!0}function ap(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ip(n,r){var i=ap(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=r&&l>=r)return{node:i,offset:r-n};n=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ap(i)}}function op(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?op(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function lp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=jo(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=jo(n.document)}return r}function pu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var aw=ns&&"documentMode"in document&&11>=document.documentMode,ua=null,mu=null,gi=null,gu=!1;function cp(n,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;gu||ua==null||ua!==jo(l)||(l=ua,"selectionStart"in l&&pu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focu
vendor: 17,783 bytes, line 9
9sNode:l.focusNode,focusOffset:l.focusOffset}),gi&&mi(gi,l)||(gi=l,l=Ol(mu,"onSelect"),0<l.length&&(r=new Uo("onSelect","select",null,r,i),n.push({event:r,listeners:l}),r.target=ua)))}function wr(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var da={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionrun:wr("Transition","TransitionRun"),transitionstart:wr("Transition","TransitionStart"),transitioncancel:wr("Transition","TransitionCancel"),transitionend:wr("Transition","TransitionEnd")},yu={},up={};ns&&(up=document.createElement("div").style,"AnimationEvent"in window||(delete da.animationend.animation,delete da.animationiteration.animation,delete da.animationstart.animation),"TransitionEvent"in window||delete da.transitionend.transition);function Sr(n){if(yu[n])return yu[n];if(!da[n])return n;var r=da[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in up)return yu[n]=r[i];return n}var dp=Sr("animationend"),hp=Sr("animationiteration"),fp=Sr("animationstart"),iw=Sr("transitionrun"),ow=Sr("transitionstart"),lw=Sr("transitioncancel"),pp=Sr("transitionend"),mp=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 Pn(n,r){mp.set(n,r),br(r,[n])}var Bo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},_n=[],ha=0,bu=0;function $o(){for(var n=ha,r=bu=ha=0;r<n;){var i=_n[r];_n[r++]=null;var l=_n[r];_n[r++]=null;var d=_n[r];_n[r++]=null;var f=_n[r];if(_n[r++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}f!==0&&gp(i,d,f)}}function Ho(n,r,i,l){_n[ha++]=n,_n[ha++]=r,_n[ha++]=i,_n[ha++]=l,bu|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function _u(n,r,i,l){return Ho(n,r,i,l),qo(n)}function Er(n,r){return Ho(n,null,null,r),qo(n)}function gp(n,r,i){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i);for(var d=!1,f=n.return;f!==null;)f.childLanes|=i,l=f.alternate,l!==null&&(l.childLanes|=i),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(d=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,d&&r!==null&&(d=31-Dt(i),n=f.hiddenUpdates,l=n[d],l===null?n[d]=[r]:l.push(r),r.lane=i|536870912),f):null}function qo(n){if(50<zi)throw zi=0,Cd=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var fa={};function cw(n,r,i,l){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(n,r,i,l){return new cw(n,r,i,l)}function wu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ss(n,r){var i=n.alternate;return i===null?(i=ln(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function yp(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Vo(n,r,i,l,d,f){var v=0;if(l=n,typeof n=="function")wu(n)&&(v=1);else if(typeof n=="string")v=pS(n,i,Z.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case J:return n=ln(31,i,r,d),n.elementType=J,n.lanes=f,n;case E:return Rr(i.children,d,f,r);case R:v=8,d|=24;break;case A:return n=ln(12,i,r,d|2),n.elementType=A,n.lanes=f,n;case Q:return n=ln(13,i,r,d),n.elementType=Q,n.lanes=f,n;case G:return n=ln(19,i,r,d),n.elementType=G,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:v=10;break e;case j:v=9;break e;case D:v=11;break e;case I:v=14;break e;case $:v=16,l=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),l=null}return r=ln(v,i,r,d),r.elementType=n,r.type=l,r.lanes=f,r}function Rr(n,r,i,l){return n=ln(7,n,l,r),n.lanes=i,n}function Su(n,r,i){return n=ln(6,n,null,r),n.lanes=i,n}function vp(n){var r=ln(18,null,null,0);return r.stateNode=n,r}function Eu(n,r,i){return r=ln(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var bp=new WeakMap;function wn(n,r){if(typeof n=="object"&&n!==null){var i=bp.get(n);return i!==void 0?i:(r={value:n,source:r,stack:gn(r)},bp.set(n,r),r)}return{value:n,source:r,stack:gn(r)}}var pa=[],ma=0,Go=null,yi=0,Sn=[],En=0,ks=null,$n=1,Hn="";function rs(n,r){pa[ma++]=yi,pa[ma++]=Go,Go=n,yi=r}function _p(n,r,i){Sn[En++]=$n,Sn[En++]=Hn,Sn[En++]=ks,ks=n;var l=$n;n=Hn;var d=32-Dt(l)-1;l&=~(1<<d),i+=1;var f=32-Dt(r)+d;if(30<f){var v=d-d%5;f=(l&(1<<v)-1).toString(32),l>>=v,d-=v,$n=1<<32-Dt(r)+d|i<<d|l,Hn=f+n}else $n=1<<f|i<<d|l,Hn=n}function Ru(n){n.return!==null&&(rs(n,1),_p(n,1,0))}function Tu(n){for(;n===Go;)Go=pa[--ma],pa[ma]=null,yi=pa[--ma],pa[ma]=null;for(;n===ks;)ks=Sn[--En],Sn[En]=null,Hn=Sn[--En],Sn[En]=null,$n=Sn[--En],Sn[En]=null}function wp(n,r){Sn[En++]=$n,Sn[En++]=Hn,Sn[En++]=ks,$n=r.id,Hn=r.overflow,ks=n}var Tt=null,Ye=null,Pe=!1,Ps=null,Rn=!1,Au=Error(a(519));function js(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vi(wn(r,n)),Au}function Sp(n){var r=n.stateNode,i=n.type,l=n.memoizedProps;switch(r[Rt]=n,r[Kt]=l,i){case"dialog":Oe("cancel",r),Oe("close",r);break;case"iframe":case"object":case"embed":Oe("load",r);break;case"video":case"audio":for(i=0;i<Bi.length;i++)Oe(Bi[i],r);break;case"source":Oe("error",r);break;case"img":case"image":case"link":Oe("error",r),Oe("load",r);break;case"details":Oe("toggle",r);break;case"input":Oe("invalid",r),Nf(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Oe("invalid",r);break;case"textarea":Oe("invalid",r),Uf(r,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||l.suppressHydrationWarning===!0||Ig(r.textContent,i)?(l.popover!=null&&(Oe("beforetoggle",r),Oe("toggle",r)),l.onScroll!=null&&Oe("scroll",r),l.onScrollEnd!=null&&Oe("scrollend",r),l.onClick!=null&&(r.onclick=ts),r=!0):r=!1,r||js(n,!0)}function Ep(n){for(Tt=n.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Tt=Tt.return}}function ga(n){if(n!==Tt)return!1;if(!Pe)return Ep(n),Pe=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Vd(n.type,n.memoizedProps)),i=!i),i&&Ye&&js(n),Ep(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ye=Yg(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Ye=Yg(n)}else r===27?(r=Ye,Ks(n.type)?(n=Qd,Qd=null,Ye=n):Ye=r):Ye=Tt?An(n.stateNode.nextSibling):null;return!0}function Tr(){Ye=Tt=null,Pe=!1}function Ou(){var n=Ps;return n!==null&&(Xt===null?Xt=n:Xt.push.apply(Xt,n),Ps=null),n}function vi(n){Ps===null?Ps=[n]:Ps.push(n)}var xu=C(null),Ar=null,as=null;function Ms(n,r,i){F(xu,r._currentValue),r._currentValue=i}function is(n){n._currentValue=xu.current,q(xu)}function Cu(n,r,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),n===i)break;n=n.return}}function ku(n,r,i,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var f=d.dependencies;if(f!==null){var v=d.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=d;for(var x=0;x<r.length;x++)if(S.context===r[x]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),Cu(f.return,i,n),l||(v=null);break e}f=S.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(a(341));v.lanes|=i,f=v.alternate,f!==null&&(f.lanes|=i),Cu(v,i,n),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===n){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function ya(n,r,i,l){n=null;for(var d=r,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=d.type;on(d.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(d===Ee.current){if(v=d.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(Gi):n=[Gi])}d=d.return}n!==null&&ku(r,n,i,l),r.flags|=262144}function Ko(n){for(n=n.firstContext;n!==null;){if(!on(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Or(n){Ar=n,as=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function At(n){return Rp(Ar,n)}function Fo(n,r){return Ar===null&&Or(n),Rp(n,r)}function Rp(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},as===null){if(n===null)throw Error(a(308));as=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else as=as.next=r;return i}var uw=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,l){n.push(l)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},dw=e.unstable_scheduleCallback,hw=e.unstable_NormalPriority,ot={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pu(){return{controller:new uw,data:new Map,refCount:0}}function bi(n){n.refCount--,n.refCount===0&&dw(hw,function(){n.controller.abort()})}var _i=null,ju=0,va=0,ba=null;function fw(n,r){if(_i===null){var i=_i=[];ju=0,va=Nd(),ba={status:"pending",value:void 0,then:function(l){i.push(l)}}}return ju++,r.then(Tp,Tp),r}function Tp(){if(--ju===0&&_i!==null){ba!==null&&(ba.status="fulfilled");var n=_i;_i=null,va=0,ba=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function pw(n,r){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){l.status="fulfilled",l.value=r;for(var d=0;d<i.length;d++)(0,i[d])(r)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var Ap=L.S;L.S=function(n,r){cg=yt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&fw(n,r),Ap!==null&&Ap(n,r)};var xr=C(null);function Mu(){var n=xr.current;return n!==null?n:Ve.pooledCache}function Yo(n,r){r===null?F(xr,xr.current):F(xr,r.pool)}function Op(){var n=Mu();return n===null?null:{parent:ot._currentValue,pool:n}}var _a=Error(a(460)),Du=Error(a(474)),Qo=Error(a(542)),Jo={then:function(){}};function xp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Cp(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(ts,ts),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Pp(n),n;default:if(typeof r.status=="string")r.then(ts,ts);else{if(n=Ve,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(l){if(r.status==="pending"){var d=r;d.status="fulfilled",d.value=l}},function(l){if(r.status==="pending"){var d=r;d.status="rejected",d.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Pp(n),n}throw kr=r,_a}}function Cr(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(kr=i,_a):i}}var kr=null;function kp(){if(kr===null)throw Error(a(459));var n=kr;return kr=null,n}function Pp(n){if(n===_a||n===Qo)throw Error(a(483))}var wa=null,wi=0;function Xo(n){var r=wi;return wi+=1,wa===null&&(wa=[]),Cp(wa,n,r)}function Si(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Zo(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function jp(n){function r(M,P){if(n){var N=M.deletions;N===null?(M.deletions=[P],M.flags|=16):N.push(P)}}function i(M,P){if(!n)return null;for(;P!==null;)r(M,P),P=P.sibling;return null}function l(M){for(var P=new Map;M!==null;)M.key!==null?P.set(M.key,M):P.set(M.index,M),M=M.sibling;return P}function d(M,P){return M=ss(M,P),M.index=0,M.sibling=null,M}function f(M,P,N){return M.index=N,n?(N=M.alternate,N!==null?(N=N.index,N<P?(M.flags|=67108866,P):N):(M.flags|=67108866,P)):(M.flags|=1048576,P)}function v(M){return n&&M.alternate===null&&(M.flags|=67108866),M}function S(M,P,N,V){return P===null||P.tag!==6?(P=Su(N,M.mode,V),P.return=M,P):(P=d(P,N),P.return=M,P)}function x(M,P,N,V){var ce=N.type;return ce===E?H(M,P,N.props.children,V,N.key):P!==null&&(P.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===$&&Cr(ce)===P.type)?(P=d(P,N.props),Si(P,N),P.return=M,P):(P=Vo(N.type,N.key,N.props,null,M.mode,V),Si(P,N),P.return=M,P)}function U(M,P,N,V){return P===null||P.tag!==4||P.stateNode.containerInfo!==N.containerInfo||P.stateNode.implementation!==N.implementation?(P=Eu(N,M.mode,V),P.return=M,P):(P=d(P,N.children||[]),P.return=M,P)}function H(M,P,N,V,ce){return P===null||P.tag!==7?(P=Rr(N,M.mode,V,ce),P.return=M,P):(P=d(P,N),P.return=M,P)}function K(M,P,N){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Su(""+P,M.mode,N),P.return=M,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _:return N=Vo(P.type,P.key,P.props,null,M.mode,N),Si(N,P),N.return=M,N;case w:return P=Eu(P,M.mode,N),P.return=M,P;case $:return P=Cr(P),K(M,P,N)}if(Le(P)||fe(P))return P=Rr(P,M.mode,N,null),P.return=M,P;if(typeof P.then=="function")return K(M,Xo(P),N);if(P.$$typeof===k)return K(M,Fo(M,P),N);Zo(M,P)}return null}function z(M,P,N,V){var ce=P!==null?P.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ce!==null?null:S(M,P,""+N,V);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _:return N.key===ce?x(M,P,N,V):null;case w:return N.key===ce?U(M,P,N,V):null;case $:return N=Cr(N),z(M,P,N,V)}if(Le(N)||fe(N))return ce!==null?null:H(M,P,N,V,null);if(typeof N.then=="function")return z(M,P,Xo(N),V);if(N.$$typeof===k)return z(M,P,Fo(M,N),V);Zo(M,N)}return null}function B(M,P,N,V,ce){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return M=M.get(N)||null,S(P,M,""+V,ce);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return M=M.get(V.key===null?N:V.key)||null,x(P,M,V,ce);case w:return M=M.get(V.key===null?N:V.key)||null,U(P,M,V,ce);case $:return V=Cr(V),B(M,P,N,V,ce)}if(Le(V)||fe(V))return M=M.get(N)||null,H(P,M,V,ce,null);if(typeof V.then=="function")return B(M,P,N,Xo(V),ce);if(V.$$typeof===k)return B(M,P,N,Fo(P,V),ce);Zo(P,V)}return null}function ae(M,P,N,V){for(var ce=null,Me=null,le=P,_e=P=0,Ce=null;le!==null&&_e<N.length;_e++){le.index>_e?(Ce=le,le=null):Ce=le.sibling;var De=z(M,le,N[_e],V);if(De===null){le===null&&(le=Ce);break}n&&le&&De.alternate===null&&r(M,le),P=f(De,P,_e),Me===null?ce=De:Me.sibling=De,Me=De,le=Ce}if(_e===N.length)return i(M,le),Pe&&rs(M,_e),ce;if(le===null){for(;_e<N.length;_e++)le=K(M,N[_e],V),le!==null&&(P=f(le,P,_e),Me===null?ce=le:Me.sibling=le,Me=le);return Pe&&rs(M,_e),ce}for(le=l(le);_e<N.length;_e++)Ce=B(le,M,_e,N[_e],V),Ce!==null&&(n&&Ce.alternate!==null&&le.delete(Ce.key===null?_e:Ce.key),P=f(Ce,P,_e),Me===null?ce=Ce:Me.sibling=Ce,Me=Ce);return n&&le.forEach(function(Xs){return r(M,Xs)}),Pe&&rs(M,_e),ce}function de(M,P,N,V){if(N==null)throw Error(a(151));for(var ce=null,Me=null,le=P,_e=P=0,Ce=null,De=N.next();le!==null&&!De.done;_e++,De=N.next()){le.index>_e?(Ce=le,le=null):Ce=le.sibling;var Xs=z(M,le,De.value,V);if(Xs===null){le===null&&(le=Ce);break}n&&le&&Xs.alternate===null&&r(M,le),P=f(Xs,P,_e),Me===null?ce=Xs:Me.sibling=Xs,Me=Xs,le=Ce}if(De.done)return i(M,le),Pe&&rs(M,_e),ce;if(le===null){for(;!De.done;_e++,De=N.next())De=K(M,De.value,V),De!==null&&(P=f(De,P,_e),Me===null?ce=De:Me.sibling=De,Me=De);return Pe&&rs(M,_e),ce}for(le=l(le);!De.done;_e++,De=N.next())De=B(le,M,_e,De.value,V),De!==null&&(n&&De.alternate!==null&&le.delete(De.key===null?_e:De.key),P=f(De,P,_e),Me===null?ce=De:Me.sibling=De,Me=De);return n&&le.forEach(function(TS){return r(M,TS)}
vendor: 4,389 bytes, line 9
9),Pe&&rs(M,_e),ce}function qe(M,P,N,V){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 ce=N.key;P!==null;){if(P.key===ce){if(ce=N.type,ce===E){if(P.tag===7){i(M,P.sibling),V=d(P,N.props.children),V.return=M,M=V;break e}}else if(P.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===$&&Cr(ce)===P.type){i(M,P.sibling),V=d(P,N.props),Si(V,N),V.return=M,M=V;break e}i(M,P);break}else r(M,P);P=P.sibling}N.type===E?(V=Rr(N.props.children,M.mode,V,N.key),V.return=M,M=V):(V=Vo(N.type,N.key,N.props,null,M.mode,V),Si(V,N),V.return=M,M=V)}return v(M);case w:e:{for(ce=N.key;P!==null;){if(P.key===ce)if(P.tag===4&&P.stateNode.containerInfo===N.containerInfo&&P.stateNode.implementation===N.implementation){i(M,P.sibling),V=d(P,N.children||[]),V.return=M,M=V;break e}else{i(M,P);break}else r(M,P);P=P.sibling}V=Eu(N,M.mode,V),V.return=M,M=V}return v(M);case $:return N=Cr(N),qe(M,P,N,V)}if(Le(N))return ae(M,P,N,V);if(fe(N)){if(ce=fe(N),typeof ce!="function")throw Error(a(150));return N=ce.call(N),de(M,P,N,V)}if(typeof N.then=="function")return qe(M,P,Xo(N),V);if(N.$$typeof===k)return qe(M,P,Fo(M,N),V);Zo(M,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,P!==null&&P.tag===6?(i(M,P.sibling),V=d(P,N),V.return=M,M=V):(i(M,P),V=Su(N,M.mode,V),V.return=M,M=V),v(M)):i(M,P)}return function(M,P,N,V){try{wi=0;var ce=qe(M,P,N,V);return wa=null,ce}catch(le){if(le===_a||le===Qo)throw le;var Me=ln(29,le,null,M.mode);return Me.lanes=V,Me.return=M,Me}}}var Pr=jp(!0),Mp=jp(!1),Ds=!1;function Nu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lu(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ns(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ls(n,r,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ue&2)!==0){var d=l.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),l.pending=r,r=qo(n),gp(n,null,i),r}return Ho(n,l,r,i),qo(n)}function Ei(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var l=r.lanes;l&=n.pendingLanes,i|=l,r.lanes=i,Vt(n,i)}}function Uu(n,r){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?d=f=v:f=f.next=v,i=i.next}while(i!==null);f===null?d=f=r:f=f.next=r}else d=f=r;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var zu=!1;function Ri(){if(zu){var n=ba;if(n!==null)throw n}}function Ti(n,r,i,l){zu=!1;var d=n.updateQueue;Ds=!1;var f=d.firstBaseUpdate,v=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var x=S,U=x.next;x.next=null,v===null?f=U:v.next=U,v=x;var H=n.alternate;H!==null&&(H=H.updateQueue,S=H.lastBaseUpdate,S!==v&&(S===null?H.firstBaseUpdate=U:S.next=U,H.lastBaseUpdate=x))}if(f!==null){var K=d.baseState;v=0,H=U=x=null,S=f;do{var z=S.lane&-536870913,B=z!==S.lane;if(B?(xe&z)===z:(l&z)===z){z!==0&&z===va&&(zu=!0),H!==null&&(H=H.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=n,de=S;z=r;var qe=i;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){K=ae.call(qe,K,z);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,z=typeof ae=="function"?ae.call(qe,K,z):ae,z==null)break e;K=g({},K,z);break e;case 2:Ds=!0}}z=S.callback,z!==null&&(n.flags|=64,B&&(n.flags|=8192),B=d.callbacks,B===null?d.callbacks=[z]:B.push(z))}else B={lane:z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},H===null?(U=H=B,x=K):H=H.next=B,v|=z;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;B=S,S=B.next,B.next=null,d.lastBaseUpdate=B,d.shared.pending=null}}while(!0);H===null&&(x=K),d.baseState=x,d.firstBaseUpdate=U,d.lastBaseUpdate=H,f===null&&(d.shared.lanes=0),$s|=v,n.lanes=v,n.memoizedState=K}}function Dp(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Np(n,r){var i=n.callbacks;
vendor: 5,288 bytes, line 9
9if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Dp(i[n],r)}var Sa=C(null),Wo=C(0);function Lp(n,r){n=ms,F(Wo,n),F(Sa,r),ms=n|r.baseLanes}function Iu(){F(Wo,ms),F(Sa,Sa.current)}function Bu(){ms=Wo.current,q(Sa),q(Wo)}var cn=C(null),Tn=null;function Us(n){var r=n.alternate;F(at,at.current&1),F(cn,n),Tn===null&&(r===null||Sa.current!==null||r.memoizedState!==null)&&(Tn=n)}function $u(n){F(at,at.current),F(cn,n),Tn===null&&(Tn=n)}function Up(n){n.tag===22?(F(at,at.current),F(cn,n),Tn===null&&(Tn=n)):zs()}function zs(){F(at,at.current),F(cn,cn.current)}function un(n){q(cn),Tn===n&&(Tn=null),q(at)}var at=C(0);function el(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Fd(i)||Yd(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var os=0,be=null,$e=null,lt=null,tl=!1,Ea=!1,jr=!1,nl=0,Ai=0,Ra=null,mw=0;function nt(){throw Error(a(321))}function Hu(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!on(n[i],r[i]))return!1;return!0}function qu(n,r,i,l,d,f){return os=f,be=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,L.H=n===null||n.memoizedState===null?_m:rd,jr=!1,f=i(l,d),jr=!1,Ea&&(f=Ip(r,i,l,d)),zp(n),f}function zp(n){L.H=Ci;var r=$e!==null&&$e.next!==null;if(os=0,lt=$e=be=null,tl=!1,Ai=0,Ra=null,r)throw Error(a(300));n===null||ct||(n=n.dependencies,n!==null&&Ko(n)&&(ct=!0))}function Ip(n,r,i,l){be=n;var d=0;do{if(Ea&&(Ra=null),Ai=0,Ea=!1,25<=d)throw Error(a(301));if(d+=1,lt=$e=null,n.updateQueue!=null){var f=n.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}L.H=wm,f=r(i,l)}while(Ea);return f}function gw(){var n=L.H,r=n.useState()[0];return r=typeof r.then=="function"?Oi(r):r,n=n.useState()[0],($e!==null?$e.memoizedState:null)!==n&&(be.flags|=1024),r}function Vu(){var n=nl!==0;return nl=0,n}function Gu(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function Ku(n){if(tl){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}tl=!1}os=0,lt=$e=be=null,Ea=!1,Ai=nl=0,Ra=null}function It(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?be.memoizedState=lt=n:lt=lt.next=n,lt}function it(){if($e===null){var n=be.alternate;n=n!==null?n.memoizedState:null}else n=$e.next;var r=lt===null?be.memoizedState:lt.next;if(r!==null)lt=r,$e=n;else{if(n===null)throw be.alternate===null?Error(a(467)):Error(a(310));$e=n,n={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},lt===null?be.memoizedState=lt=n:lt=lt.next=n}return lt}function sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oi(n){var r=Ai;return Ai+=1,Ra===null&&(Ra=[]),n=Cp(Ra,n,r),r=be,(lt===null?r.memoizedState:lt.next)===null&&(r=r.alternate,L.H=r===null||r.memoizedState===null?_m:rd),n}function rl(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Oi(n);if(n.$$typeof===k)return At(n)}throw Error(a(438,String(n)))}function Fu(n){var r=null,i=be.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var l=be.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(d){return d.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=sl(),be.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),l=0;l<n;l++)i[l]=re;return r.index++,i}function ls(n,r){return typeof r=="function"?r(n):r}function al(n){var r=it();return Yu(r,$e,n)}function Yu(n,r,i){var l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var d=n.baseQueue,f=l.pending;if(f!==null){if(d!==null){var v=d.next;d.next=f.next,f.next=v}r.baseQueue=d=f,l.pending=null}if(f=n.baseState,d===null)n.memoizedState=f;else{r=d.next;var S=v=null,x=null,U=r,H=!1;do{var K=U.lane&-536870913;if(K!==U.lane?(xe&K)===K:(os&K)===K){var z=U.revertLane;if(z===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),K===va&&(H=!0);else if((os&z)===z){U=U.next,z===va&&(H=!0);continue}else K={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},x===null?(S=x=K,v=f):x=x.next=K,be.lanes|=z,$s|=z;K=U.action,jr&&i(f,K),f=U.hasEagerState?U.eagerState:i(f,K)}else z={lane:K,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},x===null?(S=x=z,v=f):x=x.next=z,be.lanes|=K,$s|=K;U=U.next}while(U!==null&&U!==r);if(x===null?v=f:x.next=S,!on(f,n.memoizedState)&&(ct=!0,H&&(i=ba,i!==null)))throw i;n.memoizedState=f,n.baseState=v,n.baseQueue=x,l.lastRenderedState=f}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function Qu(n){var r=it(),i=r.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;
vendor: 5,778 bytes, line 9
9var l=i.dispatch,d=i.pending,f=r.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do f=n(f,v.action),v=v.next;while(v!==d);on(f,r.memoizedState)||(ct=!0),r.memoizedState=f,r.baseQueue===null&&(r.baseState=f),i.lastRenderedState=f}return[f,l]}function Bp(n,r,i){var l=be,d=it(),f=Pe;if(f){if(i===void 0)throw Error(a(407));i=i()}else i=r();var v=!on(($e||d).memoizedState,i);if(v&&(d.memoizedState=i,ct=!0),d=d.queue,Zu(qp.bind(null,l,d,n),[n]),d.getSnapshot!==r||v||lt!==null&<.memoizedState.tag&1){if(l.flags|=2048,Ta(9,{destroy:void 0},Hp.bind(null,l,d,i,r),null),Ve===null)throw Error(a(349));f||(os&127)!==0||$p(l,r,i)}return i}function $p(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=be.updateQueue,r===null?(r=sl(),be.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function Hp(n,r,i,l){r.value=i,r.getSnapshot=l,Vp(r)&&Gp(n)}function qp(n,r,i){return i(function(){Vp(r)&&Gp(n)})}function Vp(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!on(n,i)}catch{return!0}}function Gp(n){var r=Er(n,2);r!==null&&Zt(r,n,2)}function Ju(n){var r=It();if(typeof n=="function"){var i=n;if(n=i(),jr){Cn(!0);try{i()}finally{Cn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},r}function Kp(n,r,i,l){return n.baseState=i,Yu(n,$e,typeof l=="function"?l:ls)}function yw(n,r,i,l,d){if(ll(n))throw Error(a(485));if(n=r.action,n!==null){var f={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};L.T!==null?i(!0):f.isTransition=!1,l(f),i=r.pending,i===null?(f.next=r.pending=f,Fp(r,f)):(f.next=i.next,r.pending=i.next=f)}}function Fp(n,r){var i=r.action,l=r.payload,d=n.state;if(r.isTransition){var f=L.T,v={};L.T=v;try{var S=i(d,l),x=L.S;x!==null&&x(v,S),Yp(n,r,S)}catch(U){Xu(n,r,U)}finally{f!==null&&v.types!==null&&(f.types=v.types),L.T=f}}else try{f=i(d,l),Yp(n,r,f)}catch(U){Xu(n,r,U)}}function Yp(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Qp(n,r,l)},function(l){return Xu(n,r,l)}):Qp(n,r,i)}function Qp(n,r,i){r.status="fulfilled",r.value=i,Jp(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,Fp(n,i)))}function Xu(n,r,i){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=i,Jp(r),r=r.next;while(r!==l)}n.action=null}function Jp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Xp(n,r){return r}function Zp(n,r){if(Pe){var i=Ve.formState;if(i!==null){e:{var l=be;if(Pe){if(Ye){t:{for(var d=Ye,f=Rn;d.nodeType!==8;){if(!f){d=null;break t}if(d=An(d.nextSibling),d===null){d=null;break t}}f=d.data,d=f==="F!"||f==="F"?d:null}if(d){Ye=An(d.nextSibling),l=d.data==="F!";break e}}js(l)}l=!1}l&&(r=i[0])}}return i=It(),i.memoizedState=i.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xp,lastRenderedState:r},i.queue=l,i=ym.bind(null,be,l),l.dispatch=i,l=Ju(!1),f=sd.bind(null,be,!1,l.queue),l=It(),d={state:r,dispatch:null,action:n,pending:null},l.queue=d,i=yw.bind(null,be,d,f,i),d.dispatch=i,l.memoizedState=n,[r,i,!1]}function Wp(n){var r=it();return em(r,$e,n)}function em(n,r,i){if(r=Yu(n,r,Xp)[0],n=al(ls)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=Oi(r)}catch(v){throw v===_a?Qo:v}else l=r;r=it();var d=r.queue,f=d.dispatch;return i!==r.memoizedState&&(be.flags|=2048,Ta(9,{destroy:void 0},vw.bind(null,d,i),null)),[l,f,n]}function vw(n,r){n.action=r}function tm(n){var r=it(),i=$e;if(i!==null)return em(r,i,n);it(),r=r.memoizedState,i=it();var l=i.queue.dispatch;return i.memoizedState=n,[r,l,!1]}function Ta(n,r,i,l){return n={tag:n,create:i,deps:l,inst:r,next:null},r=be.updateQueue,r===null&&(r=sl(),be.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,r.lastEffect=n),n}function nm(){return it().memoizedState}function il(n,r,i,l){var d=It();be.flags|=n,d.memoizedState=Ta(1|r,{destroy:void 0},i,l===void 0?null:l)}function ol(n,r,i,l){var d=it();l=l===void 0?null:l;var f=d.memoizedState.inst;$e!==null&&l!==null&&Hu(l,$e.memoizedState.deps)?d.memoizedState=Ta(r,f,i,l):(be.flags|=n,d.memoizedState=Ta(1|r,f,i,l))}function sm(n,r){il(8390656,8,n,r)}function Zu(n,r){ol(2048,8,n,r)}function bw(n){be.flags|=4;var r=be.updateQueue;if(r===null)r=sl(),be.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function rm(n){var r=it().memoizedState;return bw({ref:r,nextImpl:n}),function(){if((Ue&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function am(n,r){return ol(4,2,n,r)}function im(n,r){return ol(4,4,n,r)}function om(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function lm(n,r,i){i=i!=null?i.concat([n]):null,ol(4,4,om.bind(null,r,n),i)}function Wu(){}function cm(n,r){var i=it();r=r===void 0?null:r;var l=i.memoizedState;return r!==null&&Hu(r,l[1])?l[0]:(i.memoizedState=[n,r],n)}function um(n,r){var i=it();r=r===void 0?null:r;var l=i.memoizedState;if(r!==null&&Hu(r,l[1]))return l[0];if(l=n(),jr){Cn(!0);try{n()}finally{Cn(!1)}}return i.memoizedState=[l,r],l}function ed(n,r,i){return i===void 0||(os&1073741824)!==0&&(xe&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=dg(),be.lanes|=n,$s|=n,i)}function dm(n,r,i,l){return on(i,r)?i:Sa.current!==null?(n=ed(n,i,l),on(n,r)||(ct=!0),n):(os&42)===0||(os&1073741824)!==0&&(xe&261930)===0?(ct=!0,n.memoizedState=i):(n=dg(),be.lanes|=n,$s|=n,r)}function hm(n,r,i,l,d){var f=Y.p;Y.p=f!==0&&8>f?f:8;var v=L.T,S={};L.T=S,sd(n,!1,r,i);try{var x=d(),U=L.S;if(U!==null&&U(S,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var H=
vendor: 4,745 bytes, line 9
9pw(x,l);xi(n,r,H,fn(n))}else xi(n,r,l,fn(n))}catch(K){xi(n,r,{then:function(){},status:"rejected",reason:K},fn())}finally{Y.p=f,v!==null&&S.types!==null&&(v.types=S.types),L.T=v}}function _w(){}function td(n,r,i,l){if(n.tag!==5)throw Error(a(476));var d=fm(n).queue;hm(n,d,r,oe,i===null?_w:function(){return pm(n),i(l)})}function fm(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:oe},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function pm(n){var r=fm(n);r.next===null&&(r=n.alternate.memoizedState),xi(n,r.next.queue,{},fn())}function nd(){return At(Gi)}function mm(){return it().memoizedState}function gm(){return it().memoizedState}function ww(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=fn();n=Ns(i);var l=Ls(r,n,i);l!==null&&(Zt(l,r,i),Ei(l,r,i)),r={cache:Pu()},n.payload=r;return}r=r.return}}function Sw(n,r,i){var l=fn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},ll(n)?vm(r,i):(i=_u(n,r,i,l),i!==null&&(Zt(i,n,l),bm(i,r,l)))}function ym(n,r,i){var l=fn();xi(n,r,i,l)}function xi(n,r,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(ll(n))vm(r,d);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var v=r.lastRenderedState,S=f(v,i);if(d.hasEagerState=!0,d.eagerState=S,on(S,v))return Ho(n,r,d,0),Ve===null&&$o(),!1}catch{}if(i=_u(n,r,d,l),i!==null)return Zt(i,n,l),bm(i,r,l),!0}return!1}function sd(n,r,i,l){if(l={lane:2,revertLane:Nd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ll(n)){if(r)throw Error(a(479))}else r=_u(n,i,l,2),r!==null&&Zt(r,n,2)}function ll(n){var r=n.alternate;return n===be||r!==null&&r===be}function vm(n,r){Ea=tl=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function bm(n,r,i){if((i&4194048)!==0){var l=r.lanes;l&=n.pendingLanes,i|=l,r.lanes=i,Vt(n,i)}}var Ci={readContext:At,use:rl,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};Ci.useEffectEvent=nt;var _m={readContext:At,use:rl,useCallback:function(n,r){return It().memoizedState=[n,r===void 0?null:r],n},useContext:At,useEffect:sm,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,il(4194308,4,om.bind(null,r,n),i)},useLayoutEffect:function(n,r){return il(4194308,4,n,r)},useInsertionEffect:function(n,r){il(4,2,n,r)},useMemo:function(n,r){var i=It();r=r===void 0?null:r;var l=n();if(jr){Cn(!0);try{n()}finally{Cn(!1)}}return i.memoizedState=[l,r],l},useReducer:function(n,r,i){var l=It();if(i!==void 0){var d=i(r);if(jr){Cn(!0);try{i(r)}finally{Cn(!1)}}}else d=r;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=Sw.bind(null,be,n),[l.memoizedState,n]},useRef:function(n){var r=It();return n={current:n},r.memoizedState=n},useState:function(n){n=Ju(n);var r=n.queue,i=ym.bind(null,be,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:Wu,useDeferredValue:function(n,r){var i=It();return ed(i,n,r)},useTransition:function(){var n=Ju(!1);return n=hm.bind(null,be,n.queue,!0,!1),It().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var l=be,d=It();if(Pe){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Ve===null)throw Error(a(349));(xe&127)!==0||$p(l,r,i)}d.memoizedState=i;var f={value:i,getSnapshot:r};return d.queue=f,sm(qp.bind(null,l,f,n),[n]),l.flags|=2048,Ta(9,{destroy:void 0},Hp.bind(null,l,f,i,r),null),i},useId:function(){var n=It(),r=Ve.identifierPrefix;if(Pe){var i=Hn,l=$n;i=(l&~(1<<32-Dt(l)-1)).toString(32)+i,r="_"+r+"R_"+i,i=nl++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=mw++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:nd,useFormState:Zp,useActionState:Zp,useOptimistic:function(n){var r=It();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=sd.bind(null,be,!0,i),i.dispatch=r,[n,r]},useMemoCache:Fu,useCacheRefresh:function(){return It().memoizedState=ww.bind(null,be)},useEffectEvent:function(n){var r=It(),i={impl:n}
vendor: 5,111 bytes, line 9
9;return r.memoizedState=i,function(){if((Ue&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},rd={readContext:At,use:rl,useCallback:cm,useContext:At,useEffect:Zu,useImperativeHandle:lm,useInsertionEffect:am,useLayoutEffect:im,useMemo:um,useReducer:al,useRef:nm,useState:function(){return al(ls)},useDebugValue:Wu,useDeferredValue:function(n,r){var i=it();return dm(i,$e.memoizedState,n,r)},useTransition:function(){var n=al(ls)[0],r=it().memoizedState;return[typeof n=="boolean"?n:Oi(n),r]},useSyncExternalStore:Bp,useId:mm,useHostTransitionStatus:nd,useFormState:Wp,useActionState:Wp,useOptimistic:function(n,r){var i=it();return Kp(i,$e,n,r)},useMemoCache:Fu,useCacheRefresh:gm};rd.useEffectEvent=rm;var wm={readContext:At,use:rl,useCallback:cm,useContext:At,useEffect:Zu,useImperativeHandle:lm,useInsertionEffect:am,useLayoutEffect:im,useMemo:um,useReducer:Qu,useRef:nm,useState:function(){return Qu(ls)},useDebugValue:Wu,useDeferredValue:function(n,r){var i=it();return $e===null?ed(i,n,r):dm(i,$e.memoizedState,n,r)},useTransition:function(){var n=Qu(ls)[0],r=it().memoizedState;return[typeof n=="boolean"?n:Oi(n),r]},useSyncExternalStore:Bp,useId:mm,useHostTransitionStatus:nd,useFormState:tm,useActionState:tm,useOptimistic:function(n,r){var i=it();return $e!==null?Kp(i,$e,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Fu,useCacheRefresh:gm};wm.useEffectEvent=rm;function ad(n,r,i,l){r=n.memoizedState,i=i(l,r),i=i==null?r:g({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var id={enqueueSetState:function(n,r,i){n=n._reactInternals;var l=fn(),d=Ns(l);d.payload=r,i!=null&&(d.callback=i),r=Ls(n,d,l),r!==null&&(Zt(r,n,l),Ei(r,n,l))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var l=fn(),d=Ns(l);d.tag=1,d.payload=r,i!=null&&(d.callback=i),r=Ls(n,d,l),r!==null&&(Zt(r,n,l),Ei(r,n,l))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=fn(),l=Ns(i);l.tag=2,r!=null&&(l.callback=r),r=Ls(n,l,i),r!==null&&(Zt(r,n,i),Ei(r,n,i))}};function Sm(n,r,i,l,d,f,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,f,v):r.prototype&&r.prototype.isPureReactComponent?!mi(i,l)||!mi(d,f):!0}function Em(n,r,i,l){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==n&&id.enqueueReplaceState(r,r.state,null)}function Mr(n,r){var i=r;if("ref"in r){i={};for(var l in r)l!=="ref"&&(i[l]=r[l])}if(n=n.defaultProps){i===r&&(i=g({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function Rm(n){Bo(n)}function Tm(n){console.error(n)}function Am(n){Bo(n)}function cl(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function Om(n,r,i){try{var l=n.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function od(n,r,i){return i=Ns(i),i.tag=3,i.payload={element:null},i.callback=function(){cl(n,r)},i}function xm(n){return n=Ns(n),n.tag=3,n}function Cm(n,r,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var f=l.value;n.payload=function(){return d(f)},n.callback=function(){Om(r,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Om(r,i,l),typeof d!="function"&&(Hs===null?Hs=new Set([this]):Hs.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function Ew(n,r,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=i.alternate,r!==null&&ya(r,i,d,!0),i=cn.current,i!==null){switch(i.tag){case 31:case 13:return Tn===null?wl():i.alternate===null&&st===0&&(st=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===Jo?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([l]):r.add(l),jd(n,l,d)),!1;case 22:return i.flags|=65536,l===Jo?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([l]):i.add(l)),jd(n,l,d)),!1}throw Error(a(435,i.tag))}return jd(n,l,d),wl(),!1}if(Pe)return r=cn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=d,l!==Au&&(n=Error(a(422),{cause:l}),vi(wn(n,i)))):(l!==Au&&(r=Error(a(423),{cause:l}),vi(wn(r,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=wn(l,i),d=od(n.stateNode,l,d),Uu(n,d),st!==4&&(st=2)),!1;var f=Error(a(520),{cause:l});if(f=wn(f,i),Ui===null?Ui=[f]:Ui.push(f),st!==4&&(st=2),r===null)return!0;l=wn(l,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=od(i.stateNode,l,n),Uu(i,n),!1;case 1:if(r=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Hs===null||!Hs.has(f))))return i.flags|=65536,d&=-d,i.lanes|=d,d=xm(d),Cm(d,n,i,l),Uu(i,d),!1}i=i.return}while(i!==null);return!1}var ld=Error(a(461)),ct=!1;function Ot(n,r,i,l){r.child=n===null?Mp(r,null,i,l):Pr(r,n.child,i,l)}
vendor: 9,318 bytes, line 9
9function km(n,r,i,l,d){i=i.render;var f=r.ref;if("ref"in l){var v={};for(var S in l)S!=="ref"&&(v[S]=l[S])}else v=l;return Or(r),l=qu(n,r,i,v,f,d),S=Vu(),n!==null&&!ct?(Gu(n,r,d),cs(n,r,d)):(Pe&&S&&Ru(r),r.flags|=1,Ot(n,r,l,d),r.child)}function Pm(n,r,i,l,d){if(n===null){var f=i.type;return typeof f=="function"&&!wu(f)&&f.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=f,jm(n,r,f,l,d)):(n=Vo(i.type,null,l,r,r.mode,d),n.ref=r.ref,n.return=r,r.child=n)}if(f=n.child,!gd(n,d)){var v=f.memoizedProps;if(i=i.compare,i=i!==null?i:mi,i(v,l)&&n.ref===r.ref)return cs(n,r,d)}return r.flags|=1,n=ss(f,l),n.ref=r.ref,n.return=r,r.child=n}function jm(n,r,i,l,d){if(n!==null){var f=n.memoizedProps;if(mi(f,l)&&n.ref===r.ref)if(ct=!1,r.pendingProps=l=f,gd(n,d))(n.flags&131072)!==0&&(ct=!0);else return r.lanes=n.lanes,cs(n,r,d)}return cd(n,r,i,l,d)}function Mm(n,r,i,l){var d=l.children,f=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(f=f!==null?f.baseLanes|i:i,n!==null){for(l=r.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~f}else l=0,r.child=null;return Dm(n,r,f,i,l)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Yo(r,f!==null?f.cachePool:null),f!==null?Lp(r,f):Iu(),Up(r);else return l=r.lanes=536870912,Dm(n,r,f!==null?f.baseLanes|i:i,i,l)}else f!==null?(Yo(r,f.cachePool),Lp(r,f),zs(),r.memoizedState=null):(n!==null&&Yo(r,null),Iu(),zs());return Ot(n,r,d,i),r.child}function ki(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Dm(n,r,i,l,d){var f=Mu();return f=f===null?null:{parent:ot._currentValue,pool:f},r.memoizedState={baseLanes:i,cachePool:f},n!==null&&Yo(r,null),Iu(),Up(r),n!==null&&ya(n,r,l,!0),r.childLanes=d,null}function ul(n,r){return r=hl({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Nm(n,r,i){return Pr(r,n.child,null,i),n=ul(r,r.pendingProps),n.flags|=2,un(r),r.memoizedState=null,n}function Rw(n,r,i){var l=r.pendingProps,d=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Pe){if(l.mode==="hidden")return n=ul(r,l),r.lanes=536870912,ki(null,n);if($u(r),(n=Ye)?(n=Fg(n,Rn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ks!==null?{id:$n,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},i=vp(n),i.return=r,r.child=i,Tt=r,Ye=null)):n=null,n===null)throw js(r);return r.lanes=536870912,null}return ul(r,l)}var f=n.memoizedState;if(f!==null){var v=f.dehydrated;if($u(r),d)if(r.flags&256)r.flags&=-257,r=Nm(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(ct||ya(n,r,i,!1),d=(i&n.childLanes)!==0,ct||d){if(l=Ve,l!==null&&(v=Gt(l,i),v!==0&&v!==f.retryLane))throw f.retryLane=v,Er(n,v),Zt(l,n,v),ld;wl(),r=Nm(n,r,i)}else n=f.treeContext,Ye=An(v.nextSibling),Tt=r,Pe=!0,Ps=null,Rn=!1,n!==null&&wp(r,n),r=ul(r,l),r.flags|=4096;return r}return n=ss(n.child,{mode:l.mode,children:l.children}),n.ref=r.ref,r.child=n,n.return=r,n}function dl(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function cd(n,r,i,l,d){return Or(r),i=qu(n,r,i,l,void 0,d),l=Vu(),n!==null&&!ct?(Gu(n,r,d),cs(n,r,d)):(Pe&&l&&Ru(r),r.flags|=1,Ot(n,r,i,d),r.child)}function Lm(n,r,i,l,d,f){return Or(r),r.updateQueue=null,i=Ip(r,l,i,d),zp(n),l=Vu(),n!==null&&!ct?(Gu(n,r,f),cs(n,r,f)):(Pe&&l&&Ru(r),r.flags|=1,Ot(n,r,i,f),r.child)}function Um(n,r,i,l,d){if(Or(r),r.stateNode===null){var f=fa,v=i.contextType;typeof v=="object"&&v!==null&&(f=At(v)),f=new i(l,f),r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=id,r.stateNode=f,f._reactInternals=r,f=r.stateNode,f.props=l,f.state=r.memoizedState,f.refs={},Nu(r),v=i.contextType,f.context=typeof v=="object"&&v!==null?At(v):fa,f.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(ad(r,i,v,l),f.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&id.enqueueReplaceState(f,f.state,null),Ti(r,l,f,d),Ri(),f.state=r.memoizedState),typeof f.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(n===null){f=r.stateNode;var S=r.memoizedProps,x=Mr(i,S);f.props=x;var U=f.context,H=i.contextType;v=fa,typeof H=="object"&&H!==null&&(v=At(H));var K=i.getDerivedStateFromProps;H=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||U!==v)&&Em(r,f,l,v),Ds=!1;var z=r.memoizedState;f.state=z,Ti(r,l,f,d),Ri(),U=r.memoizedState,S||z!==U||Ds?(typeof K=="function"&&(ad(r,i,K,l),U=r.memoizedState),(x=Ds||Sm(r,i,x,l,z,U,v))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(r.flags|=4194308)):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=U),f.props=l,f.state=U,f.context=v,l=x):(typeof f.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{f=r.stateNode,Lu(n,r),v=r.memoizedProps,H=Mr(i,v),f.props=H,K=r.pendingProps,z=f.context,U=i.contextType,x=fa,typeof U=="object"&&U!==null&&(x=At(U)),S=i.getDerivedStateFromProps,(U=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==K||z!==x)&&Em(r,f,l,x),Ds=!1,z=r.memoizedState,f.state=z,Ti(r,l,f,d),Ri();var B=r.memoizedState;v!==K||z!==B||Ds||n!==null&&n.dependencies!==null&&Ko(n.dependencies)?(typeof S=="function"&&(ad(r,i,S,l),B=r.memoizedState),(H=Ds||Sm(r,i,H,l,z,B,x)||n!==null&&n.dependencies!==null&&Ko(n.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,B,x),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,B,x)),typeof f.componentDidUpdate=="function"&&(r.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=B),f.props=l,f.state=B,f.context=x,l=H):(typeof f.componentDidUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&z===n.memoizedState||(r.flags|=1024),l=!1)}return f=l,dl(n,r),l=(r.flags&128)!==0,f||l?(f=r.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:f.render(),r.flags|=1,n!==null&&l?(r.child=Pr(r,n.child,null,d),r.child=Pr(r,null,i,d)):Ot(n,r,i,d),r.memoizedState=f.state,n=r.child):n=cs(n,r,d),n}function zm(n,r,i,l){return Tr(),r.flags|=256,Ot(n,r,i,l),r.child}var ud={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dd(n){return{baseLanes:n,cachePool:Op()}}function hd(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=hn),n}function Im(n,r,i){var l=r.pendingProps,d=!1,f=(r.flags&128)!==0,v;if((v=f)||(v=n!==null&&n.memoizedState===null?!1:(at.current&2)!==0),v&&(d=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(Pe){if(d?Us(r):zs(),(n=Ye)?(n=Fg(n,Rn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ks!==null?{id:$n,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},i=vp(n),i.return=r,r.child=i,Tt=r,Ye=null)):n=null,n===null)throw js(r);return Yd(n)?r.lanes=32:r.lanes=536870912,null}var S=l.children;return l=l.fallback,d?(zs(),d=r.mode,S=hl({mode:"hidden",children:S},d),l=Rr(l,d,i,null),S.return=r,l.return=r,S.sibling=l,r.child=S,l=r.child,l.memoizedState=dd(i),l.childLanes=hd(n,v,i),r.memoizedState=ud,ki(null,l)):(Us(r),fd(r,S))}var x=n.memoizedState;if(x!==null&&(S=x.dehydrated,S!==null)){if(f)r.flags&256?(Us(r),r.flags&=-257,r=pd(n,r,i)):r.memoizedState!==null?(zs(),r.child=n.child,r.flags|=128,r=null):(zs(),S=l.fallback,d=r.mode,l=hl({mode:"visible",children:l.children},d),S=Rr(S,d,i,null),S.flags|=2,l.return=r,S.return=r,l.sibling=S,r.child=l,Pr(r,n.child,null,i),l=r.child,l.memoizedState=dd(i),l.childLanes=hd(n,v,i),r.memoizedState=ud,r=ki(null,l));else if(Us(r),Yd(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var U=v.dgst;v=U,l=Error(a(419)),l.stack="",l.digest=v,vi({value:l,source:null,stack:null}),r=pd(n,r,i)}else if(ct||ya(n,r,i,!1),v=(i&n.childLanes)!==0,ct||v){if(v=Ve,v!==null&&(l=Gt(v,i),l!==0&&l!==x.retryLane))throw x.retryLane=l,Er(n,l),Zt(v,n,l),ld;
vendor: 5,385 bytes, line 9
9Fd(S)||wl(),r=pd(n,r,i)}else Fd(S)?(r.flags|=192,r.child=n.child,r=null):(n=x.treeContext,Ye=An(S.nextSibling),Tt=r,Pe=!0,Ps=null,Rn=!1,n!==null&&wp(r,n),r=fd(r,l.children),r.flags|=4096);return r}return d?(zs(),S=l.fallback,d=r.mode,x=n.child,U=x.sibling,l=ss(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,U!==null?S=ss(U,S):(S=Rr(S,d,i,null),S.flags|=2),S.return=r,l.return=r,l.sibling=S,r.child=l,ki(null,l),l=r.child,S=n.child.memoizedState,S===null?S=dd(i):(d=S.cachePool,d!==null?(x=ot._currentValue,d=d.parent!==x?{parent:x,pool:x}:d):d=Op(),S={baseLanes:S.baseLanes|i,cachePool:d}),l.memoizedState=S,l.childLanes=hd(n,v,i),r.memoizedState=ud,ki(n.child,l)):(Us(r),i=n.child,n=i.sibling,i=ss(i,{mode:"visible",children:l.children}),i.return=r,i.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=i,r.memoizedState=null,i)}function fd(n,r){return r=hl({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function hl(n,r){return n=ln(22,n,null,r),n.lanes=0,n}function pd(n,r,i){return Pr(r,n.child,null,i),n=fd(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Bm(n,r,i){n.lanes|=r;var l=n.alternate;l!==null&&(l.lanes|=r),Cu(n.return,r,i)}function md(n,r,i,l,d,f){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:f}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=d,v.treeForkCount=f)}function $m(n,r,i){var l=r.pendingProps,d=l.revealOrder,f=l.tail;l=l.children;var v=at.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,F(at,v),Ot(n,r,l,i),l=Pe?yi:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Bm(n,i,r);else if(n.tag===19)Bm(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(i=r.child,d=null;i!==null;)n=i.alternate,n!==null&&el(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=r.child,r.child=null):(d=i.sibling,i.sibling=null),md(r,!1,d,i,f,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=r.child,r.child=null;d!==null;){if(n=d.alternate,n!==null&&el(n)===null){r.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}md(r,!0,i,null,f,l);break;case"together":md(r,!1,null,null,void 0,l);break;default:r.memoizedState=null}return r.child}function cs(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),$s|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(ya(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,i=ss(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=ss(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function gd(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Ko(n)))}function Tw(n,r,i){switch(r.tag){case 3:pe(r,r.stateNode.containerInfo),Ms(r,ot,n.memoizedState.cache),Tr();break;case 27:case 5:Bt(r);break;case 4:pe(r,r.stateNode.containerInfo);break;case 10:Ms(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,$u(r),null;break;case 13:var l=r.memoizedState;if(l!==null)return l.dehydrated!==null?(Us(r),r.flags|=128,null):(i&r.child.childLanes)!==0?Im(n,r,i):(Us(r),n=cs(n,r,i),n!==null?n.sibling:null);Us(r);break;case 19:var d=(n.flags&128)!==0;if(l=(i&r.childLanes)!==0,l||(ya(n,r,i,!1),l=(i&r.childLanes)!==0),d){if(l)return $m(n,r,i);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),F(at,at.current),l)break;return null;case 22:return r.lanes=0,Mm(n,r,i,r.pendingProps);case 24:Ms(r,ot,n.memoizedState.cache)}return cs(n,r,i)}function Hm(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)ct=!0;else{if(!gd(n,i)&&(r.flags&128)===0)return ct=!1,Tw(n,r,i);ct=(n.flags&131072)!==0}else ct=!1,Pe&&(r.flags&1048576)!==0&&_p(r,yi,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(n=Cr(r.elementType),r.type=n,typeof n=="function")wu(n)?(l=Mr(n,l),r.tag=1,r=Um(null,r,n,l,i)):(r.tag=0,r=cd(null,r,n,l,i));else{if(n!=null){var d=n.$$typeof;if(d===D){r.tag=11,r=km(null,r,n,l,i);break e}else if(d===I){r.tag=14,r=Pm(null,r,n,l,i);break e}}throw r=Ke(n)||n,Error(a(306,r,""))}}return r;case 0:return cd(n,r,r.type,r.pendingProps,i);case 1:return l=r.type,d=Mr(l,r.pendingProps),Um(n,r,l,d,i);case 3:e:{if(pe(r,r.stateNode.containerInfo),n===null)throw Error(a(387));l=r.pendingProps;var f=r.memoizedState;d=f.element,Lu(n,r),Ti(r,l,null,i);var v=r.memoizedState;if(l=v.cache,Ms(r,ot,l),l!==f.cache&&ku(r,[ot],i,!0),Ri(),l=v.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){r=zm(n,r,l,i);break e}else if(l!==d){d=wn(Error(a(424)),r),vi(d),r=zm(n,r,l,i);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ye=An(n.firstChild),Tt=r,Pe=!0,Ps=null,Rn=!0,i=Mp(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Tr(),l===d){r=cs(n,r,i);break e}Ot(n,r,l,i)}r=r.child}return r;case 26:return dl(n,r),n===null?(i=Wg(r.type,null,r.pendingProps,null))?r.memoizedState=i:Pe||(i=r.type,n=r.pen
vendor: 4,917 bytes, line 9
9dingProps,l=xl(ue.current).createElement(i),l[Rt]=r,l[Kt]=n,xt(l,i,n),bt(l),r.stateNode=l):r.memoizedState=Wg(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Bt(r),n===null&&Pe&&(l=r.stateNode=Jg(r.type,r.pendingProps,ue.current),Tt=r,Rn=!0,d=Ye,Ks(r.type)?(Qd=d,Ye=An(l.firstChild)):Ye=d),Ot(n,r,r.pendingProps.children,i),dl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Pe&&((d=l=Ye)&&(l=tS(l,r.type,r.pendingProps,Rn),l!==null?(r.stateNode=l,Tt=r,Ye=An(l.firstChild),Rn=!1,d=!0):d=!1),d||js(r)),Bt(r),d=r.type,f=r.pendingProps,v=n!==null?n.memoizedProps:null,l=f.children,Vd(d,f)?l=null:v!==null&&Vd(d,v)&&(r.flags|=32),r.memoizedState!==null&&(d=qu(n,r,gw,null,null,i),Gi._currentValue=d),dl(n,r),Ot(n,r,l,i),r.child;case 6:return n===null&&Pe&&((n=i=Ye)&&(i=nS(i,r.pendingProps,Rn),i!==null?(r.stateNode=i,Tt=r,Ye=null,n=!0):n=!1),n||js(r)),null;case 13:return Im(n,r,i);case 4:return pe(r,r.stateNode.containerInfo),l=r.pendingProps,n===null?r.child=Pr(r,null,l,i):Ot(n,r,l,i),r.child;case 11:return km(n,r,r.type,r.pendingProps,i);case 7:return Ot(n,r,r.pendingProps,i),r.child;case 8:return Ot(n,r,r.pendingProps.children,i),r.child;case 12:return Ot(n,r,r.pendingProps.children,i),r.child;case 10:return l=r.pendingProps,Ms(r,r.type,l.value),Ot(n,r,l.children,i),r.child;case 9:return d=r.type._context,l=r.pendingProps.children,Or(r),d=At(d),l=l(d),r.flags|=1,Ot(n,r,l,i),r.child;case 14:return Pm(n,r,r.type,r.pendingProps,i);case 15:return jm(n,r,r.type,r.pendingProps,i);case 19:return $m(n,r,i);case 31:return Rw(n,r,i);case 22:return Mm(n,r,i,r.pendingProps);case 24:return Or(r),l=At(ot),n===null?(d=Mu(),d===null&&(d=Ve,f=Pu(),d.pooledCache=f,f.refCount++,f!==null&&(d.pooledCacheLanes|=i),d=f),r.memoizedState={parent:l,cache:d},Nu(r),Ms(r,ot,d)):((n.lanes&i)!==0&&(Lu(n,r),Ti(r,null,null,i),Ri()),d=n.memoizedState,f=r.memoizedState,d.parent!==l?(d={parent:l,cache:l},r.memoizedState=d,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=d),Ms(r,ot,l)):(l=f.cache,Ms(r,ot,l),l!==d.cache&&ku(r,[ot],i,!0))),Ot(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function us(n){n.flags|=4}function yd(n,r,i,l,d){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(mg())n.flags|=8192;else throw kr=Jo,Du}else n.flags&=-16777217}function qm(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ry(r))if(mg())n.flags|=8192;else throw kr=Jo,Du}function fl(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Nt():536870912,n.lanes|=r,Ca|=r)}function Pi(n,r){if(!Pe)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Qe(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(r)for(var d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=i,r}function Aw(n,r,i){var l=r.pendingProps;switch(Tu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(r),null;case 1:return Qe(r),null;case 3:return i=r.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),is(ot),je(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(ga(r)?us(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Ou())),Qe(r),null;case 26:var d=r.type,f=r.memoizedState;return n===null?(us(r),f!==null?(Qe(r),qm(r,f)):(Qe(r),yd(r,d,null,l,i))):f?f!==n.memoizedState?(us(r),Qe(r),qm(r,f)):(Qe(r),r.flags&=-16777217):(n=n.memoizedProps,n!==l&&us(r),Qe(r),yd(r,d,n,l,i)),null;case 27:if($t(r),i=ue.current,d=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&us(r);else{if(!l){if(r.stateNode===null)throw Error(a(166));return Qe(r),null}n=Z.current,ga(r)?Sp(r):(n=Jg(d,l,i),r.stateNode=n,us(r))}return Qe(r),null;case 5:if($t(r),d=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&us(r);else{if(!l){if(r.stateNode===null)throw Error(a(166));return Qe(r),null}if(f=Z.current,ga(r))Sp(r);else{var v=xl(ue.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>
9",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}f[Rt]=r,f[Kt]=l;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=f;e:switch(xt(f,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&us(r)}}return Qe(r),yd(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==l&&us(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(a(166));if(n=ue.current,ga(r)){if(n=r.stateNode,i=r.memoizedProps,l=null,d=Tt,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[Rt]=r,n=!!(n.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Ig(n.nodeValue,i)),n||js(r,!0)}else n=xl(n).createTextNode(l),n[Rt]=r,r.stateNode=n}return Qe(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(l=ga(r),i!==null){if(n===null){if(!l)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Rt]=r}else Tr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Qe(r),n=!1}else i=Ou(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(un(r),r):(un(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Qe(r),null;case 13:if(l=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=ga(r),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(a(318));if(d=r.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Rt]=r}else Tr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Qe(r),d=!1}else d=Ou(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return r.flags&256?(un(r),r):(un(r),null)}return un(r),(r.flags&128)!==0?(r.lanes=i,r):(i=l!==null,n=n!==null&&n.memoizedState!==null,i&&(l=r.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==d&&(l.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),fl(r,r.updateQueue),Qe(r),null);case 4:return je(),n===null&&Id(r.stateNode.containerInfo),Qe(r),null;case 10:return is(r.type),Qe(r),null;case 19:if(q(at),l=r.memoizedState,l===null)return Qe(r),null;if(d=(r.flags&128)!==0,f=l.rendering,f===null)if(d)Pi(l,!1);else{if(st!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(f=el(n),f!==null){for(r.flags|=128,Pi(l,!1),n=f.updateQueue,r.updateQueue=n,fl(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)yp(i,n),i=i.sibling;return F(at,at.current&1|2),Pe&&rs(r,l.treeForkCount),r.child}n=n.sibling}l.tail!==null&&yt()>vl&&(r.flags|=128,d=!0,Pi(l,!1),r.lanes=4194304)}else{if(!d)if(n=el(f),n!==null){if(r.flags|=128,d=!0,n=n.updateQueue,r.updateQueue=n,fl(r,n),Pi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Pe)return Qe(r),null}else 2*yt()-l.renderingStartTime>vl&&i!==536870912&&(r.flags|=128,d=!0,Pi(l,!1),r.lanes=4194304);l.isBackwards?(f.sibling=r.child,r.child=f):(n=l.last,n!==null?n.sibling=f:r.child=f,l.last=f)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=yt(),n.sibling=null,i=at.current,F(at,d?i&1|2:i&1),Pe&&rs(r,l.treeForkCount),n):(Qe(r),null);case 22:case 23:return un(r),Bu(),l=r.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(i&536870912)!==0&&(r.flags&128)===0&&(Qe(r),r.subtreeFlags&6&&(r.flags|=8192)):Qe(r),i=r.updateQueue,i!==null&&fl(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==i&&(r.flags|=2048),n!==null&&q(xr),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),is(ot),Qe(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function Ow(n,r){switch(Tu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return is(ot),je(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return $t(r),null;case 31:if(r.memoizedState!==null){if(un(r),r.alternate===null)throw Error(a(340));Tr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(un(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Tr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return q(at),null;case 4:return je(),null;case 10:return is(r.type),null;case 22:case 23:return un(r),Bu(),n!==null&&q(xr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return is(ot),null;case 25:return null;default:return null}}function Vm(n,r){switch(Tu(r),r.tag){case 3:is(ot),je();break;case 26:case 27:case 5:$t(r);break;case 4:je();break;case 31:r.memoizedState!==null&&un(r);break;case 13:un(r);break;case 19:q(at);break;case 10:is(r.type);break;case 22:case 23:un(r),Bu(),n!==null&&q(xr);break;case 24:is(ot)}}function ji(n,r){try{var i=r.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var d=l.next;i=d;do{if((i.tag&n)===n){l=void 0;var f=i.create,v=i.inst;l=f(),v.destroy=l}i=i.next}while(i!==d)}}catch(S){Ie(r,r.return,S)}}function Is(n,r,i){try{var l=r.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var f=d.next;l=f;do{if((l.tag&n)===n){var v=l.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,d=r;var x=i,U=S;try{U()}catch(H){Ie(d,x,H)}}}l=l.next}while(l!==f)}}catch(H){Ie(r,r.return,H)}}function Gm(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{Np(r,i)}catch(l){Ie(n,n.return,l)}}}function Km(n,r,i){i.props=Mr(n.type,n.memoizedProps),i.state=n.memoizedState;
vendor: 18,568 bytes, line 9
9try{i.componentWillUnmount()}catch(l){Ie(n,r,l)}}function Mi(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof i=="function"?n.refCleanup=i(l):i.current=l}}catch(d){Ie(n,r,d)}}function qn(n,r){var i=n.ref,l=n.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){Ie(n,r,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ie(n,r,d)}else i.current=null}function Fm(n){var r=n.type,i=n.memoizedProps,l=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(d){Ie(n,n.return,d)}}function vd(n,r,i){try{var l=n.stateNode;Qw(l,n.type,i,r),l[Kt]=r}catch(d){Ie(n,n.return,d)}}function Ym(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ks(n.type)||n.tag===4}function bd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Ym(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&&Ks(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 _d(n,r,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=ts));else if(l!==4&&(l===27&&Ks(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(_d(n,r,i),n=n.sibling;n!==null;)_d(n,r,i),n=n.sibling}function pl(n,r,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(l!==4&&(l===27&&Ks(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(pl(n,r,i),n=n.sibling;n!==null;)pl(n,r,i),n=n.sibling}function Qm(n){var r=n.stateNode,i=n.memoizedProps;try{for(var l=n.type,d=r.attributes;d.length;)r.removeAttributeNode(d[0]);xt(r,l,i),r[Rt]=n,r[Kt]=i}catch(f){Ie(n,n.return,f)}}var ds=!1,ut=!1,wd=!1,Jm=typeof WeakSet=="function"?WeakSet:Set,_t=null;function xw(n,r){if(n=n.containerInfo,Hd=Nl,n=lp(n),pu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var v=0,S=-1,x=-1,U=0,H=0,K=n,z=null;t:for(;;){for(var B;K!==i||d!==0&&K.nodeType!==3||(S=v+d),K!==f||l!==0&&K.nodeType!==3||(x=v+l),K.nodeType===3&&(v+=K.nodeValue.length),(B=K.firstChild)!==null;)z=K,K=B;for(;;){if(K===n)break t;if(z===i&&++U===d&&(S=v),z===f&&++H===l&&(x=v),(B=K.nextSibling)!==null)break;K=z,z=K.parentNode}K=B}i=S===-1||x===-1?null:{start:S,end:x}}else i=null}i=i||{start:0,end:0}}else i=null;for(qd={focusedElem:n,selectionRange:i},Nl=!1,_t=r;_t!==null;)if(r=_t,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,_t=n;else for(;_t!==null;){switch(r=_t,f=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)d=n[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,i=r,d=f.memoizedProps,f=f.memoizedState,l=i.stateNode;try{var ae=Mr(i.type,d);n=l.getSnapshotBeforeUpdate(ae,f),l.__reactInternalSnapshotBeforeUpdate=n}catch(de){Ie(i,i.return,de)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)Kd(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Kd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,_t=n;break}_t=r.return}}function Xm(n,r,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:fs(n,i),l&4&&ji(5,i);break;case 1:if(fs(n,i),l&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){Ie(i,i.return,v)}else{var d=Mr(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(d,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Ie(i,i.return,v)}}l&64&&Gm(i),l&512&&Mi(i,i.return);break;case 3:if(fs(n,i),l&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Np(n,r)}catch(v){Ie(i,i.return,v)}}break;case 27:r===null&&l&4&&Qm(i);case 26:case 5:fs(n,i),r===null&&l&4&&Fm(i),l&512&&Mi(i,i.return);break;case 12:fs(n,i);break;case 31:fs(n,i),l&4&&eg(n,i);break;case 13:fs(n,i),l&4&&tg(n,i),l&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=Uw.bind(null,i),sS(n,i))));break;case 22:if(l=i.memoizedState!==null||ds,!l){r=r!==null&&r.memoizedState!==null||ut,d=ds;var f=ut;ds=l,(ut=r)&&!f?ps(n,i,(i.subtreeFlags&8772)!==0):fs(n,i),ds=d,ut=f}break;case 30:break;default:fs(n,i)}}function Zm(n){var r=n.alternate;r!==null&&(n.alternate=null,Zm(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Xc(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Xe=null,Yt=!1;function hs(n,r,i){for(i=i.child;i!==null;)Wm(n,r,i),i=i.sibling}function Wm(n,r,i){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(gr,i)}catch{}switch(i.tag){case 26:ut||qn(i,r),hs(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ut||qn(i,r);var l=Xe,d=Yt;Ks(i.type)&&(Xe=i.stateNode,Yt=!1),hs(n,r,i),Hi(i.stateNode),Xe=l,Yt=d;break;case 5:ut||qn(i,r);case 6:if(l=Xe,d=Yt,Xe=null,hs(n,r,i),Xe=l,Yt=d,Xe!==null)if(Yt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(i.stateNode)}catch(f){Ie(i,r,f)}else try{Xe.removeChild(i.stateNode)}catch(f){Ie(i,r,f)}break;case 18:Xe!==null&&(Yt?(n=Xe,Gg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Ua(n)):Gg(Xe,i.stateNode));break;case 4:l=Xe,d=Yt,Xe=i.stateNode.containerInfo,Yt=!0,hs(n,r,i),Xe=l,Yt=d;break;case 0:case 11:case 14:case 15:Is(2,i,r),ut||Is(4,i,r),hs(n,r,i);break;case 1:ut||(qn(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Km(i,r,l)),hs(n,r,i);break;case 21:hs(n,r,i);break;case 22:ut=(l=ut)||i.memoizedState!==null,hs(n,r,i),ut=l;break;default:hs(n,r,i)}}function eg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ua(n)}catch(i){Ie(r,r.return,i)}}}function tg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ua(n)}catch(i){Ie(r,r.return,i)}}function Cw(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Jm),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Jm),r;default:throw Error(a(435,n.tag))}}function ml(n,r){var i=Cw(n);r.forEach(function(l){if(!i.has(l)){i.add(l);var d=zw.bind(null,n,l);l.then(d,d)}})}function Qt(n,r){var i=r.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],f=n,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Ks(S.type)){Xe=S.stateNode,Yt=!1;break e}break;case 5:Xe=S.stateNode,Yt=!1;break e;case 3:case 4:Xe=S.stateNode.containerInfo,Yt=!0;break e}S=S.return}if(Xe===null)throw Error(a(160));Wm(f,v,d),Xe=null,Yt=!1,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)ng(r,n),r=r.sibling}var jn=null;function ng(n,r){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Qt(r,n),Jt(n),l&4&&(Is(3,n,n.return),ji(3,n),Is(5,n,n.return));break;case 1:Qt(r,n),Jt(n),l&512&&(ut||i===null||qn(i,i.return)),l&64&&ds&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var d=jn;if(Qt(r,n),Jt(n),l&512&&(ut||i===null||qn(i,i.return)),l&4){var f=i!==null?i.memoizedState:null;if(l=n.memoizedState,i===null)if(l===null)if(n.stateNode===null){e:{l=n.type,i=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":f=d.getElementsByTagName("title")[0],(!f||f[ii]||f[Rt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=d.createElement(l),d.head.insertBefore(f,d.querySelector("head > title"))),xt(f,l,i),f[Rt]=n,bt(f),l=f;break e;case"link":var v=ny("link","href",d).get(l+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}f=d.createElement(l),xt(f,l,i),d.head.appendChild(f);break;case"meta":if(v=ny("meta","content",d).get(l+(i.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}f=d.createElement(l),xt(f,l,i),d.head.appendChild(f);break;default:throw Error(a(468,l))}f[Rt]=n,bt(f),l=f}n.stateNode=l}else sy(d,n.type,n.stateNode);else n.stateNode=ty(d,l,n.memoizedProps);else f!==l?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,l===null?sy(d,n.type,n.stateNode):ty(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&vd(n,n.memoizedProps,i.memoizedProps)}break;case 27:Qt(r,n),Jt(n),l&512&&(ut||i===null||qn(i,i.return)),i!==null&&l&4&&vd(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Qt(r,n),Jt(n),l&512&&(ut||i===null||qn(i,i.return)),n.flags&32){d=n.stateNode;try{ia(d,"")}catch(ae){Ie(n,n.return,ae)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,vd(n,d,i!==null?i.memoizedProps:d)),l&1024&&(wd=!0);break;case 6:if(Qt(r,n),Jt(n),l&4){if(n.stateNode===null)throw Error(a(162));l=n.memoizedProps,i=n.stateNode;try{i.nodeValue=l}catch(ae){Ie(n,n.return,ae)}}break;case 3:if(Pl=null,d=jn,jn=Cl(r.containerInfo),Qt(r,n),jn=d,Jt(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Ua(r.containerInfo)}catch(ae){Ie(n,n.return,ae)}wd&&(wd=!1,sg(n));break;case 4:l=jn,jn=Cl(n.stateNode.containerInfo),Qt(r,n),Jt(n),jn=l;break;case 12:Qt(r,n),Jt(n);break;case 31:Qt(r,n),Jt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,ml(n,l)));break;case 13:Qt(r,n),Jt(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(yl=yt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,ml(n,l)));break;case 22:d=n.memoizedState!==null;var x=i!==null&&i.memoizedState!==null,U=ds,H=ut;if(ds=U||d,ut=H||x,Qt(r,n),ut=H,ds=U,Jt(n),l&8192)e:for(r=n.stateNode,r._visibility=d?r._visibility&-2:r._visibility|1,d&&(i===null||x||ds||ut||Dr(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){x=i=r;try{if(f=x.stateNode,d)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=x.stateNode;var K=x.memoizedProps.style,z=K!=null&&K.hasOwnProperty("display")?K.display:null;S.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ae){Ie(x,x.return,ae)}}}else if(r.tag===6){if(i===null){x=r;try{x.stateNode.nodeValue=d?"":x.memoizedProps}catch(ae){Ie(x,x.return,ae)}}}else if(r.tag===18){if(i===null){x=r;try{var B=x.stateNode;d?Kg(B,!0):Kg(x.stateNode,!1)}catch(ae){Ie(x,x.return,ae)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}l&4&&(l=n.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,ml(n,i))));break;case 19:Qt(r,n),Jt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,ml(n,l)));break;case 30:break;case 21:break;default:Qt(r,n),Jt(n)}}function Jt(n){var r=n.flags;if(r&2){try{for(var i,l=n.return;l!==null;){if(Ym(l)){i=l;break}l=l.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var d=i.stateNode,f=bd(n);pl(n,f,d);break;case 5:var v=i.stateNode;i.flags&32&&(ia(v,""),i.flags&=-33);var S=bd(n);pl(n,S,v);break;case 3:case 4:var x=i.stateNode.containerInfo,U=bd(n);_d(n,U,x);break;default:throw Error(a(161))}}catch(H){Ie(n,n.return,H)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function sg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;sg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function fs(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Xm(n,r.alternate,r),r=r.sibling}function Dr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Is(4,r,r.return),Dr(r);break;case 1:qn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&Km(r,r.return,i),Dr(r);break;case 27:Hi(r.stateNode);case 26:case 5:qn(r,r.return),Dr(r);break;case 22:r.memoizedState===null&&Dr(r);break;case 30:Dr(r);break;default:Dr(r)}n=n.sibling}}function ps(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var l=r.alternate,d=n,f=r,v=f.flags;switch(f.tag){case 0:case 11:case 15:ps(d,f,i),ji(4,f);break;case 1:if(ps(d,f,i),l=f,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(U){Ie(l,l.return,U)}if(l=f,d=l.updateQueue,d!==null){var S=l.stateNode;try{var x=d.shared.hiddenCallbacks;if(x!==null)for(d.shared.hiddenCallbacks=null,d=0;d<x.length;d++)Dp(x[d],S)}catch(U){Ie(l,l.return,U)}}i&&v&64&&Gm(f),Mi(f,f.return);break;case 27:Qm(f);case 26:case 5:ps(d,f,i),i&&l===null&&v&4&&Fm(f),Mi(f,f.return);break;case 12:ps(d,f,i);break;case 31:ps(d,f,i),i&&v&4&&eg(d,f);break;case 13:ps(d,f,i),i&&v&4&&tg(d,f);break;case 22:f.memoizedState===null&&ps(d,f,i),Mi(f,f.return);break;case 30:break;default:ps(d,f,i)}r=r.sibling}}function Sd(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&bi(i))}function Ed(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&bi(n))}function Mn(n,r,i,l){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)rg(n,r,i,l),r=r.sibling}function rg(n,r,i,l){var d=r.flags;switch(r.tag){case 0:case 11:case 15:Mn(n,r,i,l),d&2048&&ji(9,r);break;case 1:Mn(n,r,i,l);break;case 3:Mn(n,r,i,l),d&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&bi(n)));break;case 12:if(d&2048){Mn(n,r,i,l),n=r.stateNode;try{var f=r.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(x){Ie(r,r.return,x)}}else Mn(n,r,i,l);break;case 31:Mn(n,r,i,l);break;case 13:Mn(n,r,i,l);break;case 23:break;case 22:f=r.stateNode,v=r.alternate,r.memoizedState!==null?f._visibility&2?Mn(n,r,i,l):Di(n,r):f._visibility&2?Mn(n,r,i,l):(f._visibility|=2,Aa(n,r,i,l,(r.subtreeFlags&10256)!==0||!1)),d&2048&&Sd(v,r);break;case 24:Mn(n,r,i,l),d&2048&&Ed(r.alternate,r);break;default:Mn(n,r,i,l)}}function Aa(n,r,i,l,d){for(d=d&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var f=n,v=r,S=i,x=l,U=v.flags;switch(v.tag){case 0:case 11:case 15:Aa(f,v,S,x,d),ji(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?Aa(f,v,S,x,d):Di(f,v):(H._visibility|=2,Aa(f,v,S,x,d)),d&&U&2048&&Sd(v.alternate,v);break;case 24:Aa(f,v,S,x,d),d&&U&2048&&Ed(v.alternate,v);break;default:Aa(f,v,S,x,d)}r=r.sibling}}function Di(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,l=r,d=l.flags;switch(l.tag){case 22:Di(i,l),d&2048&&Sd(l.alternate,l);break;case 24:Di(i,l),d&2048&&Ed(l.alternate,l);break;default:Di(i,l)}r=r.sibling}}var Ni=8192;function Oa(n,r,i){if(n.subtreeFlags&Ni)for(n=n.child;n!==null;)ag(n,r,i),n=n.sibling}function ag(n,r,i){switch(n.tag){case 26:Oa(n,r,i),n.flags&Ni&&n.memoizedState!==null&&mS(i,jn,n.memoizedState,n.memoizedProps);break;case 5:Oa(n,r,i);break;case 3:case 4:var l=jn;jn=Cl(n.stateNode.containerInfo),Oa(n,r,i),jn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Ni,Ni=16777216,Oa(n,r,i),Ni=l):Oa(n,r,i));break;default:Oa(n,r,i)}}function ig(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Li(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];_t=l,lg(l,n)}ig(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)og(n),n=n.sibling}function og(n){switch(n.tag){case 0:case 11:case 15:Li(n),n.flags&2048&&Is(9,n,n.return);break;case 3:Li(n);break;case 12:Li(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,gl(n)):Li(n);break;default:Li(n)}}function gl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];_t=l,lg(l,n)}ig(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Is(8,r,r.return),gl(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,gl(r));break;default:gl(r)}n=n.sibling}}function lg(n,r){for(;_t!==null;){var i=_t;switch(i.tag){case 0:case 11:case 15:Is(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:bi(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,_t=l;else e:for(i=n;_t!==null;){l=_t;var d=l.sibling,f=l.return;if(Zm(l),l===i){_t=null;break e}if(d!==null){d.return=f,_t=d;break e}_t=f}}}var kw={getCacheForType:function(n){var r=At(ot),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i},cacheSignal:function(){return At(ot).controller.signal}},Pw=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Ve=null,Ae=null,xe=0,ze=0,dn=null,Bs=!1,xa=!1,Rd=!1,ms=0,st=0,$s=0,Nr=0,Td=0,hn=0,Ca=0,Ui=null,Xt=null,Ad=!1,yl=0,cg=0,vl=1/0,bl=null,Hs=null,ft=0,qs=null,ka=null,gs=0,Od=0,xd=null,ug=null,zi=0,Cd=null;function fn(){return(Ue&2)!==0&&xe!==0?xe&-xe:L.T!==null?Nd():Qc()}function dg(){if(hn===0)if((xe&536870912)===0||Pe){var n=Zr;
vendor: 14,460 bytes, line 9
9Zr<<=1,(Zr&3932160)===0&&(Zr=262144),hn=n}else hn=536870912;return n=cn.current,n!==null&&(n.flags|=32),hn}function Zt(n,r,i){(n===Ve&&(ze===2||ze===9)||n.cancelPendingCommit!==null)&&(Pa(n,0),Vs(n,xe,hn,!1)),We(n,i),((Ue&2)===0||n!==Ve)&&(n===Ve&&((Ue&2)===0&&(Nr|=i),st===4&&Vs(n,xe,hn,!1)),Vn(n))}function hg(n,r,i){if((Ue&6)!==0)throw Error(a(327));var l=!i&&(r&127)===0&&(r&n.expiredLanes)===0||Je(n,r),d=l?Dw(n,r):Pd(n,r,!0),f=l;do{if(d===0){xa&&!l&&Vs(n,r,0,!1);break}else{if(i=n.current.alternate,f&&!jw(i)){d=Pd(n,r,!1),f=!1;continue}if(d===2){if(f=r,n.errorRecoveryDisabledLanes&f)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var S=n;d=Ui;var x=S.current.memoizedState.isDehydrated;if(x&&(Pa(S,v).flags|=256),v=Pd(S,v,!1),v!==2){if(Rd&&!x){S.errorRecoveryDisabledLanes|=f,Nr|=f,d=4;break e}f=Xt,Xt=d,f!==null&&(Xt===null?Xt=f:Xt.push.apply(Xt,f))}d=v}if(f=!1,d!==2)continue}}if(d===1){Pa(n,0),Vs(n,r,0,!0);break}e:{switch(l=n,f=d,f){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Vs(l,r,hn,!Bs);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(d=yl+300-yt(),10<d)){if(Vs(l,r,hn,!Bs),me(l,0,!0)!==0)break e;gs=r,l.timeoutHandle=qg(fg.bind(null,l,i,Xt,bl,Ad,r,hn,Nr,Ca,Bs,f,"Throttled",-0,0),d);break e}fg(l,i,Xt,bl,Ad,r,hn,Nr,Ca,Bs,f,null,-0,0)}}break}while(!0);Vn(n)}function fg(n,r,i,l,d,f,v,S,x,U,H,K,z,B){if(n.timeoutHandle=-1,K=r.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ts},ag(r,f,K);var ae=(f&62914560)===f?yl-yt():(f&4194048)===f?cg-yt():0;if(ae=gS(K,ae),ae!==null){gs=f,n.cancelPendingCommit=ae(wg.bind(null,n,r,f,i,l,d,v,S,x,H,K,null,z,B)),Vs(n,f,v,!U);return}}wg(n,r,f,i,l,d,v,S,x)}function jw(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],f=d.getSnapshot;d=d.value;try{if(!on(f(),d))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Vs(n,r,i,l){r&=~Td,r&=~Nr,n.suspendedLanes|=r,n.pingedLanes&=~r,l&&(n.warmLanes|=r),l=n.expirationTimes;for(var d=r;0<d;){var f=31-Dt(d),v=1<<f;l[f]=-1,d&=~v}i!==0&&vr(n,i,r)}function _l(){return(Ue&6)===0?(Ii(0),!1):!0}function kd(){if(Ae!==null){if(ze===0)var n=Ae.return;else n=Ae,as=Ar=null,Ku(n),wa=null,wi=0,n=Ae;for(;n!==null;)Vm(n.alternate,n),n=n.return;Ae=null}}function Pa(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,Zw(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),gs=0,kd(),Ve=n,Ae=i=ss(n.current,null),xe=r,ze=0,dn=null,Bs=!1,xa=Je(n,r),Rd=!1,Ca=hn=Td=Nr=$s=st=0,Xt=Ui=null,Ad=!1,(r&8)!==0&&(r|=r&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=r;0<l;){var d=31-Dt(l),f=1<<d;r|=n[d],l&=~f}return ms=r,$o(),i}function pg(n,r){be=null,L.H=Ci,r===_a||r===Qo?(r=kp(),ze=3):r===Du?(r=kp(),ze=4):ze=r===ld?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,dn=r,Ae===null&&(st=1,cl(n,wn(r,n.current)))}function mg(){var n=cn.current;return n===null?!0:(xe&4194048)===xe?Tn===null:(xe&62914560)===xe||(xe&536870912)!==0?n===Tn:!1}function gg(){var n=L.H;return L.H=Ci,n===null?Ci:n}function yg(){var n=L.A;return L.A=kw,n}function wl(){st=4,Bs||(xe&4194048)!==xe&&cn.current!==null||(xa=!0),($s&134217727)===0&&(Nr&134217727)===0||Ve===null||Vs(Ve,xe,hn,!1)}function Pd(n,r,i){var l=Ue;Ue|=2;var d=gg(),f=yg();(Ve!==n||xe!==r)&&(bl=null,Pa(n,r)),r=!1;var v=st;e:do try{if(ze!==0&&Ae!==null){var S=Ae,x=dn;switch(ze){case 8:kd(),v=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(r=!0);var U=ze;if(ze=0,dn=null,ja(n,S,x,U),i&&xa){v=0;break e}break;default:U=ze,ze=0,dn=null,ja(n,S,x,U)}}Mw(),v=st;break}catch(H){pg(n,H)}while(!0);return r&&n.shellSuspendCounter++,as=Ar=null,Ue=l,L.H=d,L.A=f,Ae===null&&(Ve=null,xe=0,$o()),v}function Mw(){for(;Ae!==null;)vg(Ae)}function Dw(n,r){var i=Ue;Ue|=2;var l=gg(),d=yg();Ve!==n||xe!==r?(bl=null,vl=yt()+500,Pa(n,r)):xa=Je(n,r);e:do try{if(ze!==0&&Ae!==null){r=Ae;var f=dn;t:switch(ze){case 1:ze=0,dn=null,ja(n,r,f,1);break;case 2:case 9:if(xp(f)){ze=0,dn=null,bg(r);break}r=function(){ze!==2&&ze!==9||Ve!==n||(ze=7),Vn(n)},f.then(r,r);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:xp(f)?(ze=0,dn=null,bg(r)):(ze=0,dn=null,ja(n,r,f,7));break;case 5:var v=null;switch(Ae.tag){case 26:v=Ae.memoizedState;case 5:case 27:var S=Ae;if(v?ry(v):S.stateNode.complete){ze=0,dn=null;var x=S.sibling;if(x!==null)Ae=x;else{var U=S.return;U!==null?(Ae=U,Sl(U)):Ae=null}break t}}ze=0,dn=null,ja(n,r,f,5);break;case 6:ze=0,dn=null,ja(n,r,f,6);break;case 8:kd(),st=6;break e;default:throw Error(a(462))}}Nw();break}catch(H){pg(n,H)}while(!0);return as=Ar=null,L.H=l,L.A=d,Ue=i,Ae!==null?0:(Ve=null,xe=0,$o(),st)}function Nw(){for(;Ae!==null&&!gt();)vg(Ae)}function vg(n){var r=Hm(n.alternate,n,ms);n.memoizedProps=n.pendingProps,r===null?Sl(n):Ae=r}function bg(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=Lm(i,r,r.pendingProps,r.type,void 0,xe);break;case 11:r=Lm(i,r,r.pendingProps,r.type.render,r.ref,xe);break;case 5:Ku(r);default:Vm(i,r),r=Ae=yp(r,ms),r=Hm(i,r,ms)}n.memoizedProps=n.pendingProps,r===null?Sl(n):Ae=r}function ja(n,r,i,l){as=Ar=null,Ku(r),wa=null,wi=0;var d=r.return;try{if(Ew(n,d,r,i,xe)){st=1,cl(n,wn(i,n.current)),Ae=null;return}}catch(f){if(d!==null)throw Ae=d,f;st=1,cl(n,wn(i,n.current)),Ae=null;return}r.flags&32768?(Pe||l===1?n=!0:xa||(xe&536870912)!==0?n=!1:(Bs=n=!0,(l===2||l===9||l===3||l===6)&&(l=cn.current,l!==null&&l.tag===13&&(l.flags|=16384))),_g(r,n)):Sl(r)}function Sl(n){var r=n;do{if((r.flags&32768)!==0){_g(r,Bs);return}n=r.return;var i=Aw(r.alternate,r,ms);if(i!==null){Ae=i;return}if(r=r.sibling,r!==null){Ae=r;return}Ae=r=n}while(r!==null);st===0&&(st=5)}function _g(n,r){do{var i=Ow(n.alternate,n);if(i!==null){i.flags&=32767,Ae=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){Ae=n;return}Ae=n=i}while(n!==null);st=6,Ae=null}function wg(n,r,i,l,d,f,v,S,x){n.cancelPendingCommit=null;do El();while(ft!==0);if((Ue&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(f=r.lanes|r.childLanes,f|=bu,qt(n,i,f,v,S,x),n===Ve&&(Ae=Ve=null,xe=0),ka=r,qs=n,gs=i,Od=f,xd=d,ug=l,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Iw(Zn,function(){return Ag(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,d=Y.p,Y.p=2,v=Ue,Ue|=4;try{xw(n,r,i)}finally{Ue=v,Y.p=d,L.T=l}}ft=1,Sg(),Eg(),Rg()}}function Sg(){if(ft===1){ft=0;var n=qs,r=ka,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=L.T,L.T=null;var l=Y.p;Y.p=2;var d=Ue;Ue|=4;try{ng(r,n);var f=qd,v=lp(n.containerInfo),S=f.focusedElem,x=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&op(S.ownerDocument.documentElement,S)){if(x!==null&&pu(S)){var U=x.start,H=x.end;if(H===void 0&&(H=U),"selectionStart"in S)S.selectionStart=U,S.selectionEnd=Math.min(H,S.value.length);else{var K=S.ownerDocument||document,z=K&&K.defaultView||window;if(z.getSelection){var B=z.getSelection(),ae=S.textContent.length,de=Math.min(x.start,ae),qe=x.end===void 0?de:Math.min(x.end,ae);!B.extend&&de>qe&&(v=qe,qe=de,de=v);var M=ip(S,de),P=ip(S,qe);if(M&&P&&(B.rangeCount!==1||B.anchorNode!==M.node||B.anchorOffset!==M.offset||B.focusNode!==P.node||B.focusOffset!==P.offset)){var N=K.createRange();N.setStart(M.node,M.offset),B.removeAllRanges(),de>qe?(B.addRange(N),B.extend(P.node,P.offset)):(N.setEnd(P.node,P.offset),B.addRange(N))}}}}for(K=[],B=S;B=B.parentNode;)B.nodeType===1&&K.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var V=K[S];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Nl=!!Hd,qd=Hd=null}finally{Ue=d,Y.p=l,L.T=i}}n.current=r,ft=2}}function Eg(){if(ft===2){ft=0;var n=qs,r=ka,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=L.T,L.T=null;var l=Y.p;Y.p=2;var d=Ue;Ue|=4;try{Xm(n,r.alternate,r)}finally{Ue=d,Y.p=l,L.T=i}}ft=3}}function Rg(){if(ft===4||ft===3){ft=0,zn();var n=qs,r=ka,i=gs,l=ug;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?ft=5:(ft=0,ka=qs=null,Tg(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(Hs=null),kn(i),r=r.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(gr,r,void 0,(r.current.flags&128)===128)}catch{}if(l!==null){r=L.T,d=Y.p,Y.p=2,L.T=null;try{for(var f=n.onRecoverableError,v=0;v<l.length;v++){var S=l[v];f(S.value,{componentStack:S.stack})}}finally{L.T=r,Y.p=d}}(gs&3)!==0&&El(),Vn(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===Cd?zi++:(zi=0,Cd=n):zi=0,Ii(0)}}function Tg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,bi(r)))}function El(){return Sg(),Eg(),Rg(),Ag()}function Ag(){if(ft!==5)return!1;var n=qs,r=Od;Od=0;var i=kn(gs),l=L.T,d=Y.p;try{Y.p=32>i?32:i,L.T=null,i=xd,xd=null;var f=qs,v=gs;if(ft=0,ka=qs=null,gs=0,(Ue&6)!==0)throw Error(a(331));var S=Ue;if(Ue|=4,og(f.current),rg(f,f.current,v,i),Ue=S,Ii(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(gr,f)}catch{}return!0}finally{Y.p=d,L.T=l,Tg(n,r)}}function Og(n,r,i){r=wn(i,r),r=od(n.stateNode,r,2),n=Ls(n,r,2),n!==null&&(We(n,2),Vn(n))}function Ie(n,r,i){if(n.tag===3)Og(n,n,i);else for(;r!==null;){if(r.tag===3){Og(r,n,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hs===null||!Hs.has(l))){n=wn(i,n),i=xm(2),l=Ls(r,i,2),l!==null&&(Cm(i,l,r,n),We(l,2),Vn(l));break}}r=r.return}}function jd(n,r,i){var l=n.pingCache;if(l===null){l=n.pingCache=new Pw;var d=new Set;l.set(r,d)}else d=l.get(r),d===void 0&&(d=new Set,l.set(r,d));d.has(i)||(Rd=!0,d.add(i),n=Lw.bind(null,n,r,i),r.then(n,n))}function Lw(n,r,i){var l=n.pingCache;l!==null&&l.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ve===n&&(xe&i)===i&&(st===4||st===3&&(xe&62914560)===xe&&300>yt()-yl?(Ue&2)===0&&Pa(n,0):Td|=i,Ca===xe&&(Ca=0)),Vn(n)}function xg(n,r){r===0&&(r=Nt()),n=Er(n,r),n!==null&&(We(n,r),Vn(n))}function Uw(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),xg(n,i)}function zw(n,r){var i=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(r),xg(n,i)}function Iw(n,r){return an(n,r)}var Rl=null,Ma=null,Md=!1,Tl=!1,Dd=!1,Gs=0;function Vn(n){n!==Ma&&n.next===null&&(Ma===null?Rl=Ma=n:Ma=Ma.next=n),Tl=!0,Md||(Md=!0,$w())}function Ii(n,r){if(!Dd&&Tl){Dd=!0;do for(var i=!1,l=Rl;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var f=0;else{var v=l.suspendedLanes,S=l.pingedLanes;f=(1<<31-Dt(42|n)+1)-1,f&=d&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,jg(l,f))}else f=xe,f=me(l,l===Ve?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Je(l,f)||(i=!0,jg(l,f));l=l.next}while(i);Dd=!1}}function Bw(){Cg()}function Cg(){Tl=Md=!1;var n=0;Gs!==0&&Xw()&&(n=Gs);for(var r=yt(),i=null,l=Rl;l!==null;){var d=l.next,f=kg(l,r);f===0?(l.next=null,i===null?Rl=d:i.next=d,d===null&&(Ma=i)):(i=l,(n!==0||(f&3)!==0)&&(Tl=!0)),l=d}ft!==0&&ft!==5||Ii(n),Gs!==0&&(Gs=0)}function kg(n,r){for(var i=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var v=31-Dt(f),S=1<<v,x=d[v];x===-1?((S&i)===0||(S&l)!==0)&&(d[v]=vt(S,r)):x<=r&&(n.expiredLanes|=S),f&=~S}if(r=Ve,i=xe,i=me(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,i===0||n===r&&(ze===2||ze===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&mr(l),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Je(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(l!==null&&mr(l),kn(i)){case 2:case 8:i=yn;break;case 32:i=Zn;break;case 268435456:i=Wn;break;default:i=Zn}return l=Pg.bind(null,n),i=an(i,l),n.callbackPriority=r,n.callbackNode=i,r}return l!==null&&l!==null&&mr(l),n.callbackPriority=2,n.callbackNode=null,2}function Pg(n,r){if(ft!==0&&ft!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(El()&&n.callbackNode!==i)return null;var l=xe;return l=me(n,n===Ve?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(hg(n,l,r),kg(n,yt()),n.callbackNode!=null&&n.callbackNode===i?Pg.bind(null,n):null)}function jg(n,r){if(El())return null;hg(n,r,!0)}function $w(){Ww(function(){(Ue&6)!==0?an(tt,Bw):Cg()})}function Nd(){if(Gs===0){var n=va;n===0&&(n=Xr,Xr<<=1,(Xr&261888)===0&&(Xr=256)),Gs=n}return Gs}function Mg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Mo(""+n)}function Dg(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function Hw(n,r,i,l,d){if(r==="submit"&&i&&i.stateNode===d){var f=Mg((d[Kt]||null).action),v=l.submitter;v&&(r=(r=v[Kt]||null)?Mg(r.formAction):v.getAttribute("formAction"),r!==null&&(f=r,v=null));var S=new Uo("action","action",null,l,d);n.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Gs!==0){var x=v?Dg(d,v):new FormData(d);td(i,{pending:!0,data:x,method:d.method,action:f},null,x)}}else typeof f=="function"&&(S.preventDefault(),x=v?Dg(d,v):new FormData(d),td(i,{pending:!0,data:x,method:d.method,action:f},f,x))},currentTarget:d}]})}}for(var Ld=0;Ld<vu.length;Ld++){var Ud=vu[Ld],qw=Ud.toLowerCase(),Vw=Ud[0].toUpperCase()+Ud.slice(1);Pn(qw,"on"+Vw)}Pn(dp,"onAnimationEnd"),Pn(hp,"onAnimationIteration"),Pn(fp,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(iw,"onTransitionRun"),Pn(ow,"onTransitionStart"),Pn(lw,"onTransitionCancel"),Pn(pp,"onTransitionEnd"),ra("onMouseEnter",["mouseout","mouseover"]),ra("onMouseLeave",["mouseout","mouseover"]),ra("onPointerEnter",["pointerout","pointerover"]),ra("onPointerLeave",["pointerout","pointerover"]),br("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),br("onSelect","focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange".split(" ")),br("onBeforeInput",["compositionend","keypress","textInput","paste"]),br("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),br("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),br("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bi="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(Bi));function Ng(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],d=l.event;l=l.listeners;e:{var f=void 0;if(r)for(var v=l.length-1;0<=v;v--){var S=l[v],x=S.instance,U=S.currentTarget;if(S=S.listener,x!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=U;try{f(d)}catch(H){Bo(H)}d.currentTarget=null,f=x}else for(v=0;v<l.length;v++){if(S=l[v],x=S.instance,U=S.currentTarget,S=S.listener,x!==f&&d.isPropagationStopped())break e;f=S,d.currentTarget=U;try{f(d)}catch(H){Bo(H)}d.currentTarget=null,f=x}}}}function Oe(n,r){var i=r[Jc];i===void 0&&(i=r[Jc]=new Set);var l=n+"__bubble";i.has(l)||(Lg(r,n,2,!1),i.add(l))}function zd(n,r,i){var l=0;r&&(l|=4),Lg(i,n,l,r)}var Al="_reactListening"+Math.random().toString(36).slice(2);function Id(n){if(!n[Al]){n[Al]=!0,Cf.forEach(function(i){i!=="selectionchange"&&(Gw.has(i)||zd(i,!1,n),zd(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Al]||(r[Al]=!0,zd("selectionchange",!1,r))}}function Lg(n,r,i,l){switch(dy(r)){case 2:var d=bS;break;case 8:d=_S;break;default:d=eh}i=d.bind(null,r,i,n),d=void 0,!au||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(r,i,{capture:!0,passive:d}):n.addEventListener(r,i,!0):d!==void 0?n.addEventListener(r,i,{passive:d}):n.addEventListener(r,i,!1)}function Bd(n,r,i,l,d){var f=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var S=l.stateNode.containerInfo;if(S===d)break;if(v===4)for(v=l.return;v!==null;){var x=v.tag;if((x===3||x===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;S!==null;){if(v=ta(S),v===null)return;if(x=v.tag,x===5||x===6||x===26||x===27){l=f=v;continue e}S=S.parentNode}}l=l.return}$f(function(){var U=f,H=su(i),K=[];e:{var z=mp.get(n);if(z!==void 0){var B=Uo,ae=n;switch(n){case"keypress":if(No(i)===0)break e;case"keydown":case"keyup":B=z_;break;case"focusin":ae="focus",B=cu;break;case"focusout":ae="blur",B=cu;break;case"beforeblur":case"afterblur":B=cu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Vf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=A_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=$_;break;case dp:case hp:case fp:B=C_;break;case pp:B=q_;break;case"scroll":case"scrollend":B=R_;break;case"wheel":B=G_;break;case"copy":case"cut":case"paste":B=P_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Kf;break;case"toggle":case"beforetoggle":B=F_}var de=(r&4)!==0,qe=!de&&(n==="scroll"||n==="scrollend"),M=de?z!==null?z+"Capture":null:z;de=[];for(var P=U,N;P!==null;){var V=P;if(N=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||N===null||M===null||(V=li(P,M),V!=null&&de.push($i(P,V,N))),qe)break;P=P.return}0<de.length&&(z=new B(z,ae,null,i,H),K.push({event:z,listeners:de}))}}if((r&7)===0){e:{if(z=n==="mouseover"||n==="pointerover",B=n==="mouseout"||n==="pointerout",z&&i!==nu&&(ae=i.relatedTarget||i.fromElement)&&(ta(ae)||ae[ea]))break e;if((B||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,B?(ae=i.relatedTarget||i.toElement,B=U,ae=ae?ta(ae):null,ae!==null&&(qe=c(ae),de=ae.tag,ae!==qe||de!==5&&de!==27&&de!==6)&&(ae=null)):(B=null,ae=U),B!==ae)){if(de=Vf,V="onMouseLeave",M="onMouseEnter",P="mouse",(n==="pointerout"||n==="pointerover")&&(de=Kf,V="onPointerLeave",M="onPointerEnter",P="pointer"),qe=B==null?z:oi(B),N=ae==null?z:oi(ae),z=new de(V,P+"leave",B,i,H),z.target=qe,z.relatedTarget=N,V=null,ta(H)===U&&(de=new de(M,P+"enter",ae,i,H),de.target=N,de.relatedTarget=qe,V=de),qe=V,B&&ae)t:{for(de=Kw,M=B,P=ae,N=0,V=M;V;V=de(V))N++;V=0;for(var ce=P;ce;ce=de(ce))V++;for(;0<N-V;)M=de(M),N--;for(;0<V-N;)P=de(P),V--;for(;N--;){if(M===P||P!==null&&M===P.alternate){de=M;break t}M=de(M),P=de(P)}de=null}else de=null;B!==null&&Ug(K,z,B,de,!1),ae!==null&&qe!==null&&Ug(K,qe,ae,de,!0)}}
vendor: 5,189 bytes, lines 9-10
9e:{if(z=U?oi(U):window,B=z.nodeName&&z.nodeName.toLowerCase(),B==="select"||B==="input"&&z.type==="file")var Me=ep;else if(Zf(z))if(tp)Me=sw;else{Me=tw;var le=ew}else B=z.nodeName,!B||B.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?U&&tu(U.elementType)&&(Me=ep):Me=nw;if(Me&&(Me=Me(n,U))){Wf(K,Me,i,H);break e}le&&le(n,z,U),n==="focusout"&&U&&z.type==="number"&&U.memoizedProps.value!=null&&eu(z,"number",z.value)}switch(le=U?oi(U):window,n){case"focusin":(Zf(le)||le.contentEditable==="true")&&(ua=le,mu=U,gi=null);break;case"focusout":gi=mu=ua=null;break;case"mousedown":gu=!0;break;case"contextmenu":case"mouseup":case"dragend":gu=!1,cp(K,i,H);break;case"selectionchange":if(aw)break;case"keydown":case"keyup":cp(K,i,H)}var _e;if(du)e:{switch(n){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else ca?Jf(n,i)&&(Ce="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Ce="onCompositionStart");Ce&&(Ff&&i.locale!=="ko"&&(ca||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&ca&&(_e=Hf()):(Cs=H,iu="value"in Cs?Cs.value:Cs.textContent,ca=!0)),le=Ol(U,Ce),0<le.length&&(Ce=new Gf(Ce,n,null,i,H),K.push({event:Ce,listeners:le}),_e?Ce.data=_e:(_e=Xf(i),_e!==null&&(Ce.data=_e)))),(_e=Q_?J_(n,i):X_(n,i))&&(Ce=Ol(U,"onBeforeInput"),0<Ce.length&&(le=new Gf("onBeforeInput","beforeinput",null,i,H),K.push({event:le,listeners:Ce}),le.data=_e)),Hw(K,n,U,i,H)}Ng(K,r)})}function $i(n,r,i){return{instance:n,listener:r,currentTarget:i}}function Ol(n,r){for(var i=r+"Capture",l=[];n!==null;){var d=n,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=li(n,i),d!=null&&l.unshift($i(n,d,f)),d=li(n,r),d!=null&&l.push($i(n,d,f))),n.tag===3)return l;n=n.return}return[]}function Kw(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Ug(n,r,i,l,d){for(var f=r._reactName,v=[];i!==null&&i!==l;){var S=i,x=S.alternate,U=S.stateNode;if(S=S.tag,x!==null&&x===l)break;S!==5&&S!==26&&S!==27||U===null||(x=U,d?(U=li(i,f),U!=null&&v.unshift($i(i,U,x))):d||(U=li(i,f),U!=null&&v.push($i(i,U,x)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var Fw=/\r\n?/g,Yw=/\u0000|\uFFFD/g;function zg(n){return(typeof n=="string"?n:""+n).replace(Fw,` 10`).replace(Yw,"")}function Ig(n,r){return r=zg(r),zg(n)===r}function He(n,r,i,l,d,f){switch(i){case"children":typeof l=="string"?r==="body"||r==="textarea"&&l===""||ia(n,l):(typeof l=="number"||typeof l=="bigint")&&r!=="body"&&ia(n,""+l);break;case"className":Po(n,"class",l);break;case"tabIndex":Po(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Po(n,i,l);break;case"style":If(n,l,f);break;case"data":if(r!=="object"){Po(n,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Mo(""+l),n.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(i==="formAction"?(r!=="input"&&He(n,r,"name",d.name,d,null),He(n,r,"formEncType",d.formEncType,d,null),He(n,r,"formMethod",d.formMethod,d,null),He(n,r,"formTarget",d.formTarget,d,null)):(He(n,r,"encType",d.encType,d,null),He(n,r,"method",d.method,d,null),He(n,r,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Mo(""+l),n.setAttribute(i,l);break;case"onClick":l!=null&&(n.onclick=ts);break;case"onScroll":l!=null&&Oe("scroll",n);break;case"onScrollEnd":l!=null&&Oe("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}i=Mo(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""+l):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":l===!0?n.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,l):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(i,l):n.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(i):n.setAttribute(i,l);break;case"popover":Oe("beforetoggle",n),Oe("toggle",n),ko(n,"popover",l);break;case"xlinkActuate":es(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":es(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":es(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":es(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":es(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":es(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":es(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":es(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":es(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ko(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=S_.get(i)||i,ko(n,i,l))}}function $d(n,r,i,l,d,f){switch(i){case"style":If(n,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=i}}break;case"children":typeof l=="string"?ia(n,l):(typeof l=="number"||typeof l=="bigint")&&ia(n,""+l);break;case"onScroll":l!=null&&Oe("scroll",n);break;case"onScrollEnd":l!=null&&Oe("scrollend",n);break;case"onClick":l!=null&&(n.onclick=ts);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kf.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),r=i.slice(2,d?i.length-7:void 0),f=n[Kt]||null,f=f!=null?f[i]:null,typeof f=="function"&&n.removeEventListener(r,f,d),typeof l=="function")){typeof f!="function"&&f!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,l,d);break e}i in n?n[i]=l:l===!0?n.setAttribute(i,""):ko(n,i,l)}}}function xt(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",n),Oe("load",n);var l=!1,d=!1,f;for(f in i)if(i.hasOwnProperty(f)){var v=i[f];if(v!=null)switch(f){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:He(n,r,f,v,i,null)}}d&&He(n,r,"srcSet",i.srcSet,i,null),l&&He(n,r,"src",i.src,i,null);return;case"input":Oe("invalid",n);var S=f=v=d=null,x=null,U=null;for(l in i)if(i.hasOwnProperty(l)){var H=i[l];if(H!=null)switch(l){case"name":d=H;break;case"type":v=H;break;case"checked":x=H;break;case"defaultChecked":U=H;break;case"value":f=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,r));break;default:He(n,r,l,H,i,null)}}Nf(n,f,S,x,U,v,d,!1);return;case"select":Oe("invalid",n),l=v=f=null;for(d in i)if(i.hasOwnProperty(d)&&(S=i[d],S!=null))switch(d){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":l=S;default:He(n,r,d,S,i,null)}r=f,i=v,n.multiple=!!l,r!=null?aa(n,!!l,r,!1):i!=null&&aa(n,!!l,i,!0);return;case"textarea":Oe("invalid",n),f=d=l=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":l=S;break;case"defaultValue":d=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:He(n,r,v,S,i,null)}Uf(n,l,d,f);return;case"option":for(x in i)i.hasOwnProperty(x)&&(l=i[x],l!=null)&&(x==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":He(n,r,x,l,i,null));return;case"dialog":Oe("beforetoggle",n),Oe("toggle",n),Oe("cancel",n),Oe("close",n);break;case"iframe":case"object":Oe("load",n);break;case"video":case"audio":for(l=0;l<Bi.length;l++)Oe(Bi[l],n);break;case"image":Oe("error",n),Oe("load",n);break;case"details":Oe("toggle",n);break;case"embed":case"source":case"link":Oe("error",n),Oe("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(U in i)if(i.hasOwnProperty(U)&&(l=i[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:He(n,r,U,l,i,null)}return;default:if(tu(r)){for(H in i)i.hasOwnProperty(H)&&(l=i[H],l!==void 0&&$d(n,r,H,l,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(l=i[S],l!=null&&He(n,r,S,l,i,null))}function Qw(n,r,i,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,v=null,S=null,x=null,U=null,H=null;for(B in i){var K=i[B];if(i.hasOwnProperty(B)&&K!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":x=K;default:l.hasOwnProperty(B)||He(n,r,B,null,l,K)}}for(var z in l){var B=l[z];if(K=i[z],l.hasOwnProperty(z)&&(B!=null||K!=null))switch(z){case"type":f=B;break;case"name":d=B;break;case"checked":U=B;break;case"defaultChecked":H=B;break;case"value":v=B;break;case"defaultValue":S=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(137,r));break;default:B!==K&&He(n,r,z,B,l,K)}}Wc(n,v,S,x,U,H,f,d);return;case"select":B=v=S=z=null;for(f in i)if(x=i[f],i.hasOwnProperty(f)&&x!=null)switch(f){case"value":break;case"multiple":B=x;default:l.hasOwnProperty(f)||He(n,r,f,null,l,x)}for(d in l)if(f=l[d],x=i[d],l.hasOwnProperty(d)&&(f!=null||x!=null))switch(d){case"value":z=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==x&&He(n,r,d,f,l,x)}r=S,i=v,l=B,z!=null?aa(n,!!i,z,!1):!!l!=!!i&&(r!=null?aa(n,!!i,r,!0):aa(n,!!i,i?[]:"",!1));return;case"textarea":B=z=null;for(S in i)if(d=i[S],i.hasOwnProperty(S)&&d!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:He(n,r,S,null,l,d)}for(v in l)if(d=l[v],f=i[v],l.hasOwnProperty(v)&&(d!=null||f!=null))switch(v){case"value":z=d;break;case"defaultValue":B=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==f&&He(n,r,v,d,l,f)}Lf(n,z,B);return;case"option":for(var ae in i)z=i[ae],i.hasOwnProperty(ae)&&z!=null&&!l.hasOwnProperty(ae)&&(ae==="selected"?n.selected=!1:He(n,r,ae,null,l,z));for(x in l)z=l[x],B=i[x],l.hasOwnProperty(x)&&z!==B&&(z!=null||B!=null)&&(x==="selected"?n.selected=z&&typeof z!="function"&&typeof z!="symbol":He(n,r,x,z,l,B));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var de in i)z=i[de],i.hasOwnProperty(de)&&z!=null&&!l.hasOwnProperty(de)&&He(n,r,de,null,l,z);for(U in l)if(z=l[U],B=i[U],l.hasOwnProperty(U)&&z!==B&&(z!=null||B!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(a(137,r));break;default:He(n,r,U,z,l,B)}return;default:if(tu(r)){for(var qe in i)z=i[qe],i.hasOwnProperty(qe)&&z!==void 0&&!l.hasOwnProperty(qe)&&$d(n,r,qe,void 0,l,z);for(H in l)z=l[H],B=i[H],!l.hasOwnProperty(H)||z===B||z===void 0&&B===void 0||$d(n,r,H,z,l,B);return}}for(var M in i)z=i[M],i.hasOwnProperty(M)&&z!=null&&!l.hasOwnProperty(M)&&He(n,r,M,null,l,z);for(K in l)z=l[K],B=i[K],!l.hasOwnProperty(K)||z===B||z==null&&B==null||He(n,r,K,z,l,B)}function Bg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jw(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],f=d.transferSize,v=d.initiatorType,S=d.duration;if(f&&S&&Bg(v)){for(v=0,S=d.responseEnd,l+=1;l<i.length;l++){var x=i[l],U=x.startTime;if(U>S)break;var H=x.transferSize,K=x.initiatorType;H&&Bg(K)&&(x=x.responseEnd,v+=H*(x<S?1:(S-U)/(x-U)))}if(--l,r+=8*(f+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 9,435 bytes, line 10
10n:5}var Hd=null,qd=null;function xl(n){return n.nodeType===9?n:n.ownerDocument}function $g(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 Hg(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Vd(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Xw(){var n=window.event;return n&&n.type==="popstate"?n===Gd?!1:(Gd=n,!0):(Gd=null,!1)}var qg=typeof setTimeout=="function"?setTimeout:void 0,Zw=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,Ww=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(n){return Vg.resolve(null).then(n).catch(eS)}:qg;function eS(n){setTimeout(function(){throw n})}function Ks(n){return n==="head"}function Gg(n,r){var i=r,l=0;do{var d=i.nextSibling;if(n.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(l===0){n.removeChild(d),Ua(r);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Hi(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Hi(i);for(var f=i.firstChild;f;){var v=f.nextSibling,S=f.nodeName;f[ii]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=v}}else i==="body"&&Hi(n.ownerDocument.body);i=d}while(i);Ua(r)}function Kg(n,r){var i=n;n=0;do{var l=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=l}while(i)}function Kd(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Kd(i),Xc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function tS(n,r,i,l){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[ii])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=An(n.nextSibling),n===null)break}return null}function nS(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=An(n.nextSibling),n===null))return null;return n}function Fg(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=An(n.nextSibling),n===null))return null;return n}function Fd(n){return n.data==="$?"||n.data==="$~"}function Yd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function sS(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var l=function(){r(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function An(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var Qd=null;function Yg(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return An(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function Qg(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function Jg(n,r,i){switch(r=xl(i),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Hi(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Xc(n)}var On=new Map,Xg=new Set;function Cl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ys=Y.d;Y.d={f:rS,r:aS,D:iS,C:oS,L:lS,m:cS,X:dS,S:uS,M:hS};function rS(){var n=ys.f(),r=_l();return n||r}function aS(n){var r=na(n);r!==null&&r.tag===5&&r.type==="form"?pm(r):ys.r(n)}var Da=typeof document>"u"?null:document;function Zg(n,r,i){var l=Da;if(l&&typeof r=="string"&&r){var d=bn(r);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Xg.has(d)||(Xg.add(d),n={rel:n,crossOrigin:i,href:r},l.querySelector(d)===null&&(r=l.createElement("link"),xt(r,"link",n),bt(r),l.head.appendChild(r)))}}function iS(n){ys.D(n),Zg("dns-prefetch",n,null)}function oS(n,r){ys.C(n,r),Zg("preconnect",n,r)}function lS(n,r,i){ys.L(n,r,i);var l=Da;if(l&&n&&r){var d='link[rel="preload"][as="'+bn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+bn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+bn(i.imageSizes)+'"]')):d+='[href="'+bn(n)+'"]';var f=d;switch(r){case"style":f=Na(n);break;case"script":f=La(n)}On.has(f)||(n=g({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),On.set(f,n),l.querySelector(d)!==null||r==="style"&&l.querySelector(qi(f))||r==="script"&&l.querySelector(Vi(f))||(r=l.createElement("link"),xt(r,"link",n),bt(r),l.head.appendChild(r)))}}function cS(n,r){ys.m(n,r);var i=Da;if(i&&n){var l=r&&typeof r.as=="string"?r.as:"script",d='link[rel="modulepreload"][as="'+bn(l)+'"][href="'+bn(n)+'"]',f=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=La(n)}if(!On.has(f)&&(n=g({rel:"modulepreload",href:n},r),On.set(f,n),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Vi(f)))return}l=i.createElement("link"),xt(l,"link",n),bt(l),i.head.appendChild(l)}}}function uS(n,r,i){ys.S(n,r,i);var l=Da;if(l&&n){var d=sa(l).hoistableStyles,f=Na(n);r=r||"default";var v=d.get(f);if(!v){var S={loading:0,preload:null};if(v=l.querySelector(qi(f)))S.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":r},i),(i=On.get(f))&&Jd(n,i);var x=v=l.createElement("link");bt(x),xt(x,"link",n),x._p=new Promise(function(U,H){x.onload=U,x.onerror=H}),x.addEventListener("load",function(){S.loading|=1}),x.addEventListener("error",function(){S.loading|=2}),S.loading|=4,kl(v,r,l)}v={type:"stylesheet",instance:v,count:1,state:S},d.set(f,v)}}}function dS(n,r){ys.X(n,r);var i=Da;if(i&&n){var l=sa(i).hoistableScripts,d=La(n),f=l.get(d);f||(f=i.querySelector(Vi(d)),f||(n=g({src:n,async:!0},r),(r=On.get(d))&&Xd(n,r),f=i.createElement("script"),bt(f),xt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}}function hS(n,r){ys.M(n,r);var i=Da;if(i&&n){var l=sa(i).hoistableScripts,d=La(n),f=l.get(d);f||(f=i.querySelector(Vi(d)),f||(n=g({src:n,async:!0,type:"module"},r),(r=On.get(d))&&Xd(n,r),f=i.createElement("script"),bt(f),xt(f,"link",n),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}}function Wg(n,r,i,l){var d=(d=ue.current)?Cl(d):null;if(!d)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=Na(i.href),i=sa(d).hoistableStyles,l=i.get(r),l||(l={type:"style",instance:null,count:0,state:null},i.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Na(i.href);var f=sa(d).hoistableStyles,v=f.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,v),(f=d.querySelector(qi(n)))&&!f._p&&(v.instance=f,v.state.loading=5),On.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},On.set(n,i),f||fS(d,n,i,v.state))),r&&l===null)throw Error(a(528,""));return v}if(r&&l!==null)throw Error(a(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?
vendor: 8,851 bytes, line 10
10(r=La(i),i=sa(d).hoistableScripts,l=i.get(r),l||(l={type:"script",instance:null,count:0,state:null},i.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Na(n){return'href="'+bn(n)+'"'}function qi(n){return'link[rel="stylesheet"]['+n+"]"}function ey(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function fS(n,r,i,l){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=n.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),xt(r,"link",i),bt(r),n.head.appendChild(r))}function La(n){return'[src="'+bn(n)+'"]'}function Vi(n){return"script[async]"+n}function ty(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var l=n.querySelector('style[data-href~="'+bn(i.href)+'"]');if(l)return r.instance=l,bt(l),l;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),bt(l),xt(l,"style",d),kl(l,i.precedence,n),r.instance=l;case"stylesheet":d=Na(i.href);var f=n.querySelector(qi(d));if(f)return r.state.loading|=4,r.instance=f,bt(f),f;l=ey(i),(d=On.get(d))&&Jd(l,d),f=(n.ownerDocument||n).createElement("link"),bt(f);var v=f;return v._p=new Promise(function(S,x){v.onload=S,v.onerror=x}),xt(f,"link",l),r.state.loading|=4,kl(f,i.precedence,n),r.instance=f;case"script":return f=La(i.src),(d=n.querySelector(Vi(f)))?(r.instance=d,bt(d),d):(l=i,(d=On.get(f))&&(l=g({},i),Xd(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),bt(d),xt(d,"link",l),n.head.appendChild(d),r.instance=d);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,kl(l,i.precedence,n));return r.instance}function kl(n,r,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,f=d,v=0;v<l.length;v++){var S=l[v];if(S.dataset.precedence===r)f=S;else if(f!==d)break}f?f.parentNode.insertBefore(n,f.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function Jd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Xd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Pl=null;function ny(n,r,i){if(Pl===null){var l=new Map,d=Pl=new Map;d.set(i,l)}else d=Pl,l=d.get(i),l||(l=new Map,d.set(i,l));if(l.has(n))return l;for(l.set(n,null),i=i.getElementsByTagName(n),d=0;d<i.length;d++){var f=i[d];if(!(f[ii]||f[Rt]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(r)||"";v=n+v;var S=l.get(v);S?S.push(f):l.set(v,[f])}}return l}function sy(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function pS(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function ry(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function mS(n,r,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Na(l.href),f=r.querySelector(qi(d));if(f){r=f._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=jl.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=f,bt(f);return}f=r.ownerDocument||r,l=ey(l),(d=On.get(d))&&Jd(l,d),f=f.createElement("link"),bt(f);var v=f;v._p=new Promise(function(S,x){v.onload=S,v.onerror=x}),xt(f,"link",l),i.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=jl.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var Zd=0;function gS(n,r){return n.stylesheets&&n.count===0&&Dl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var l=setTimeout(function(){if(n.stylesheets&&Dl(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+r);0<n.imgBytes&&Zd===0&&(Zd=62500*Jw());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Dl(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>Zd?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function jl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Ml=null;function Dl(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ml=new Map,r.forEach(yS,n),Ml=null,jl.call(n))}function yS(n,r){if(!(r.state.loading&4)){var i=Ml.get(n);if(i)var l=i.get(null);else{i=new Map,Ml.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var v=d[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}d=r.instance,v=d.getAttribute("data-precedence"),f=i.get(v)||l,f===l&&i.set(null,d),i.set(v,d),this.count++,l=jl.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),f?f.parentNode.insertBefore(d,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),r.state.loading|=4}}var Gi={$$typeof:k,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function vS(n,r,i,l,d,f,v,S,x){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=Os(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Os(0),this.hiddenUpdates=Os(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function ay(n,r,i,l,d,f,v,S,x,U,H,K){return n=new vS(n,r,i,v,x,U,H,K,S),r=1,f===!0&&(r|=24),f=ln(3,null,null,r),n.current=f,f.stateNode=n,r=Pu(),r.refCount++,n.pooledCache=r,r.refCount++,f.memoizedState={element:l,isDehydrated:i,cache:r},Nu(f),n}function iy(n){return n?(n=fa,n):fa}function oy(n,r,i,l,d,f){d=iy(d),l.context===null?l.context=d:l.pendingContext=d,l=Ns(r),l.payload={element:i},f=f===void 0?null:f,f!==null&&(l.callback=f),i=Ls(n,l,r),i!==null&&(Zt(i,n,r),Ei(i,n,r))}function ly(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function Wd(n,r){ly(n,r),(n=n.alternate)&&ly(n,r)}function cy(n){if(n.tag===13||n.tag===31){var r=Er(n,67108864);r!==null&&Zt(r,n,67108864),Wd(n,67108864)}}function uy(n){if(n.tag===13||n.tag===31){var r=fn();r=Wr(r);var i=Er(n,r);i!==null&&Zt(i,n,r),Wd(n,r)}}var Nl=!0;function bS(n,r,i,l){var d=L.T;L.T=null;var f=Y.p;try{Y.p=2,eh(n,r,i,l)}finally{Y.p=f,L.T=d}}function _S(n,r,i,l){var d=L.T;L.T=null;var f=Y.p;try{Y.p=8,eh(n,r,i,l)}finally{Y.p=f,L.T=d}}function eh(n,r,i,l){if(Nl){var d=th(l);if(d===null)Bd(n,r,l,Ll,i),hy(n,l);else if(SS(d,n,r,i,l))l.stopPropagation();else if(hy(n,l),r&4&&-1<wS.indexOf(n)){for(;d!==null;){var f=na(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Bn(f.pendingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var x=1<<31-Dt(v);S.entanglements[1]|=x,v&=~x}Vn(f),(Ue&6)===0&&(vl=yt()+500,Ii(0))}}break;case 31:case 13:S=Er(f,2),S!==null&&Zt(S,f,2),_l(),Wd(f,2)}if(f=th(l),f===null&&Bd(n,r,l,Ll,i),f===d)break;d=f}d!==null&&l.stopPropagation()}else Bd(n,r,l,null,i)}}function th(n){return n=su(n),nh(n)}var Ll=null;function nh(n){if(Ll=null,n=ta(n),n!==null){var r=c(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=u(r),n!==null)return n;n=null}else if(i===31){if(n=h(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Ll=n,null}function dy(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 6,256 bytes, line 10
10: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(Be()){case tt:return 2;case yn:return 8;case Zn:case ri:return 32;case Wn:return 268435456;default:return 32}default:return 32}}var sh=!1,Fs=null,Ys=null,Qs=null,Ki=new Map,Fi=new Map,Js=[],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 hy(n,r){switch(n){case"focusin":case"focusout":Fs=null;break;case"dragenter":case"dragleave":Ys=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":Ki.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fi.delete(r.pointerId)}}function Yi(n,r,i,l,d,f){return n===null||n.nativeEvent!==f?(n={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:f,targetContainers:[d]},r!==null&&(r=na(r),r!==null&&cy(r)),n):(n.eventSystemFlags|=l,r=n.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),n)}function SS(n,r,i,l,d){switch(r){case"focusin":return Fs=Yi(Fs,n,r,i,l,d),!0;case"dragenter":return Ys=Yi(Ys,n,r,i,l,d),!0;case"mouseover":return Qs=Yi(Qs,n,r,i,l,d),!0;case"pointerover":var f=d.pointerId;return Ki.set(f,Yi(Ki.get(f)||null,n,r,i,l,d)),!0;case"gotpointercapture":return f=d.pointerId,Fi.set(f,Yi(Fi.get(f)||null,n,r,i,l,d)),!0}return!1}function fy(n){var r=ta(n.target);if(r!==null){var i=c(r);if(i!==null){if(r=i.tag,r===13){if(r=u(i),r!==null){n.blockedOn=r,Of(n.priority,function(){uy(i)});return}}else if(r===31){if(r=h(i),r!==null){n.blockedOn=r,Of(n.priority,function(){uy(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Ul(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=th(n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);nu=l,i.target.dispatchEvent(l),nu=null}else return r=na(i),r!==null&&cy(r),n.blockedOn=i,!1;r.shift()}return!0}function py(n,r,i){Ul(n)&&i.delete(r)}function ES(){sh=!1,Fs!==null&&Ul(Fs)&&(Fs=null),Ys!==null&&Ul(Ys)&&(Ys=null),Qs!==null&&Ul(Qs)&&(Qs=null),Ki.forEach(py),Fi.forEach(py)}function zl(n,r){n.blockedOn===r&&(n.blockedOn=null,sh||(sh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ES)))}var Il=null;function my(n){Il!==n&&(Il=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Il===n&&(Il=null);for(var r=0;r<n.length;r+=3){var i=n[r],l=n[r+1],d=n[r+2];if(typeof l!="function"){if(nh(l||i)===null)continue;break}var f=na(i);f!==null&&(n.splice(r,3),r-=3,td(f,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function Ua(n){function r(x){return zl(x,n)}Fs!==null&&zl(Fs,n),Ys!==null&&zl(Ys,n),Qs!==null&&zl(Qs,n),Ki.forEach(r),Fi.forEach(r);for(var i=0;i<Js.length;i++){var l=Js[i];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Js.length&&(i=Js[0],i.blockedOn===null);)fy(i),i.blockedOn===null&&Js.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],f=i[l+1],v=d[Kt]||null;if(typeof f=="function")v||my(i);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[Kt]||null)S=v.formAction;else if(nh(d)!==null)continue}else S=v.action;typeof S=="function"?i[l+1]=S:(i.splice(l,3),l-=3),my(i)}}}function gy(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function r(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),d!==null&&(d(),d=null)}}}function rh(n){this._internalRoot=n}Bl.prototype.render=rh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var i=r.current,l=fn();oy(i,l,n,r,null,null)},Bl.prototype.unmount=rh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;oy(n.current,2,null,n,null,null),_l(),r[ea]=null}};function Bl(n){this._internalRoot=n}Bl.prototype.unstable_scheduleHydration=function(n){if(n){var r=Qc();n={blockedOn:null,target:n,priority:r};for(var i=0;i<Js.length&&r!==0&&r<Js[i].priority;i++);Js.splice(i,0,n),i===0&&fy(n)}};var yy=t.version;if(yy!=="19.2.5")throw Error(a(527,yy,"19.2.5"));Y.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var RS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$l.isDisabled&&$l.supportsFiber)try{gr=$l.inject(RS),zt=$l}catch{}}return Ji.createRoot=function(n,r){if(!o(n))throw Error(a(299));var i=!1,l="",d=Rm,f=Tm,v=Am;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(f=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=ay(n,1,!1,null,null,i,l,null,d,f,v,gy),n[ea]=r.current,Id(n),new rh(r)},Ji.hydrateRoot=function(n,r,i){if(!o(n))throw Error(a(299));var l=!1,d="",f=Rm,v=Tm,S=Am,x=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(x=i.formState)),r=ay(n,1,!0,r,i??null,l,d,x,f,v,S,gy),r.context=iy(null),i=r.current,l=fn(),l=Wr(l),d=Ns(l),d.callback=null,Ls(i,d,l),i=l,r.current.lanes=i,We(r,i),Vn(r),n[ea]=r.current,Id(n),new Bl(r)},Ji.version="19.2.5",Ji}var Oy;function DS(){if(Oy)return oh.exports;Oy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),oh.exports=MS(),oh.exports}var NS=DS(),LS="__TSS_CONTEXT",jh=Symbol.for("TSS_SERVER_FUNCTION"),cM=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),US="application/x-tss-framed",vs={JSON:0,CHUNK:1,END:2,ERROR:3},zS=/;\s*v=(\d+)/;function IS(e){const t=e.match(zS);return t?parseInt(t[1],10):void 0}function BS(e){const t=IS(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var v0=()=>window.__TSS_START_OPTIONS__,b0=!1;function uo(e){return e[e.length-1]}function $S(e){return typeof e=="function"}function nr(e,t){return $S(e)?e(t):e}var HS=Object.prototype.hasOwnProperty,xy=Object.prototype.propertyIsEnumerable,qS=()=>Object.create(null),Lr=(e,t)=>Br(e,t,qS);function Br(e,t,s=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const o=t,c=Py(e)&&Py(o);if(!c&&!(ti(e)&&ti(o)))return o;const u=c?e:Cy(e);if(!u)return o;const h=c?o:Cy(o);if(!h)return o;const p=u.length,m=h.length,y=c?new Array(m):s();let g=0;for(let b=0;b<m;b++){const _=c?b:h[b],w=e[_],E=o[_];if(w===E){y[_]=w,(c?b<p:HS.call(e,_))&&g++;continue}if(w===null||E===null||typeof w!="object"||typeof E!="object"){y[_]=E;continue}const R=Br(w,E,s,a+1);y[_]=R,R===w&&g++}return p===m&&g===p?e:y}function Cy(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!xy.call(e,o))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return t;const a=t;for(const o of s){if(!xy.call(e,o))return!1;a.push(o)}return a}function ti(e){if(!ky(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!ky(s)||!s.hasOwnProperty("isPrototypeOf"))}function ky(e){return Object.prototype.toString.call(e)==="[object Object]"}function Py(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nn(e,t,s){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!nn(e[a],t[a],s))return!1;return!0}if(ti(e)&&ti(t)){const a=s?.ignoreUndefined??!0;if(s?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!nn(e[u],t[u],s))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let c=0;for(const u in t)if((!a||t[u]!==void 0)&&(c++,c>o||!nn(e[u],t[u],s)))return!1;return o===c}return!1}function Yr(e){let t,s;const a=new Promise((o,c)=>{t=o,s=c});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",s(o)},a}function VS(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function ho(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function GS(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function jy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return GS(t)}var KS=["http:","https:","mailto:","tel:"];function _c(e,t){if(!e)return!1;try{const s=new URL(e);return!t.has(s.protocol)}catch{return!1}}var FS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},YS=/[&><\u2028\u2029]/g;function QS(e){return e.replace(YS,t=>FS[t])}function Xi(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let s=0,a="",o;for(;(o=t.exec(e))!==null;)a+=jy(e.slice(s,o.index))+o[0],s=t.lastIndex;a=a+jy(s?e.slice(s):e);let c=!1;return a.startsWith("//")&&(c=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:c}}function JS(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function XS(e,t){if(e===t)return!0;
10if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function rn(){throw new Error("Invariant failed")}function fo(e){const t=new Map;let s,a;const o=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,a&&(a.next=c,c.prev=a)):(c.next.prev=void 0,s=c.next,c.next=void 0,a&&(c.prev=a,a.next=c)),a=c)};return{get(c){const u=t.get(c);if(u)return o(u),u.value},set(c,u){if(t.size>=e&&s){const p=s;t.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const h=t.get(c);if(h)h.value=u,o(h);else{const p={key:c,value:u,prev:a};a&&(a.next=p),a=p,s||(s=p),t.set(c,p)}},clear(){t.clear(),s=void 0,a=void 0}}}var sr=4,_0=5;function ZS(e){const t=e.indexOf("{");if(t===-1)return null;const s=e.indexOf("}",t);return s===-1||t+1>=e.length?null:[t,s]}function cf(e,t,s=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,c=e.substring(t,o);if(!c||!c.includes("$"))return s[0]=0,s[1]=t,s[2]=t,s[3]=o,s[4]=o,s[5]=o,s;if(c==="$"){const h=e.length;return s[0]=2,s[1]=t,s[2]=t,s[3]=h,s[4]=h,s[5]=h,s}if(c.charCodeAt(0)===36)return s[0]=1,s[1]=t,s[2]=t+1,s[3]=o,s[4]=o,s[5]=o,s;const u=ZS(c);if(u){const[h,p]=u,m=c.charCodeAt(h+1);if(m===45){if(h+2<c.length&&c.charCodeAt(h+2)===36){const y=h+3,g=p;if(y<g)return s[0]=3,s[1]=t+h,s[2]=t+y,s[3]=t+g,s[4]=t+p+1,s[5]=o,s}}else if(m===36){const y=h+1,g=h+2;return g===p?(s[0]=2,s[1]=t+h,s[2]=t+y,s[3]=t+g,s[4]=t+p+1,s[5]=e.length,s):(s[0]=1,s[1]=t+h,s[2]=t+g,s[3]=t+p,s[4]=t+p+1,s[5]=o,s)}}return s[0]=0,s[1]=t,s[2]=t,s[3]=o,s[4]=o,s[5]=o,s}function Lc(e,t,s,a,o,c,u){u?.(s);let h=a;{const p=s.fullPath??s.from,m=p.length,y=s.options?.caseSensitive??e,g=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;h<m;){const _=cf(p,h,t);let w;const E=h,R=_[5];switch(h=R+1,c++,_[0]){case 0:{const A=p.substring(_[2],_[3]);if(y){const j=o.static?.get(A);if(j)w=j;else{o.static??=new Map;const k=$r(s.fullPath??s.from);k.parent=o,k.depth=c,w=k,o.static.set(A,k)}}else{const j=A.toLowerCase(),k=o.staticInsensitive?.get(j);if(k)w=k;else{o.staticInsensitive??=new Map;const D=$r(s.fullPath??s.from);D.parent=o,D.depth=c,w=D,o.staticInsensitive.set(j,D)}}break}case 1:{const A=p.substring(E,_[1]),j=p.substring(_[4],R),k=y&&!!(A||j),D=A?k?A:A.toLowerCase():void 0,Q=j?k?j:j.toLowerCase():void 0,G=!g&&o.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===k&&I.prefix===D&&I.suffix===Q);if(G)w=G;else{const I=hh(1,s.fullPath??s.from,k,D,Q);w=I,I.depth=c,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case 3:{const A=p.substring(E,_[1]),j=p.substring(_[4],R),k=y&&!!(A||j),D=A?k?A:A.toLowerCase():void 0,Q=j?k?j:j.toLowerCase():void 0,G=!g&&o.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===k&&I.prefix===D&&I.suffix===Q);if(G)w=G;else{const I=hh(3,s.fullPath??s.from,k,D,Q);w=I,I.parent=o,I.depth=c,o.optional??=[],o.optional.push(I)}break}case 2:{const A=p.substring(E,_[1]),j=p.substring(_[4],R),k=y&&!!(A||j),D=A?k?A:A.toLowerCase():void 0,Q=j?k?j:j.toLowerCase():void 0,G=hh(2,s.fullPath??s.from,k,D,Q);w=G,G.parent=o,G.depth=c,o.wildcard??=[],o.wildcard.push(G)}}o=w}if(g&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const _=$r(s.fullPath??s.from);_.kind=_0,_.parent=o,c++,_.depth=c,o.pathless??=[],o.pathless.push(_),o=_}const b=(s.path||!s.children)&&!s.isRoot;if(b&&p.endsWith("/")){const _=$r(s.fullPath??s.from);_.kind=sr,_.parent=o,c++,_.depth=c,o.index=_,o=_}o.parse=s.options?.params?.parse??null,o.skipOnParamError=g,o.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=s,o.fullPath=s.fullPath??s.from)}if(s.children)for(const p of s.children)Lc(e,t,p,h,o,c,u)}function dh(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Zs(e){if(e.pathless)for(const t of e.pathless)Zs(t);if(e.static)for(const t of e.static.values())Zs(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Zs(t);if(e.dynamic?.length){e.dynamic.sort(dh);for(const t of e.dynamic)Zs(t)}if(e.optional?.length){e.optional.sort(dh);for(const t of e.optional)Zs(t)}if(e.wildcard?.length){e.wildcard.sort(dh);for(const t of e.wildcard)Zs(t)}}function $r(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function hh(e,t,s,a,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:s,prefix:a,suffix:o}}function WS(e,t){const s=$r("/"),a=new Uint16Array(6);for(const o of e)Lc(!1,a,o,1,s,0);Zs(s),t.masksTree=s,t.flatCache=fo(1e3)}function eE(e,t){e||="/";const s=t.flatCache.get(e);if(s)return s;const a=uf(e,t.masksTree);return t.flatCache.set(e,a),a}function tE(e,t,s,a,o){e||="/",a||="/";const c=t?`case\0${e}`:e;let u=o.singleCache.get(c);return u||(u=$r("/"),Lc(t,new Uint16Array(6),{from:e},1,u,0),o.singleCache.set(c,u)),uf(a,u,s)}function nE(e,t,s=!1){const a=s?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";
10let c;try{c=uf(e,t.segmentTree,s)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=aE(c.route)),t.matchCache.set(a,c),c}function sE(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function rE(e,t=!1,s){const a=$r(e.fullPath),o=new Uint16Array(6),c={},u={};let h=0;return Lc(t,o,e,1,a,0,p=>{if(s?.(p,h),p.id in c&&rn(),c[p.id]=p,h!==0&&p.path){const m=sE(p.fullPath);(!u[m]||p.fullPath.endsWith("/"))&&(u[m]=p)}h++}),Zs(a),{processedTree:{segmentTree:a,singleCache:fo(1e3),matchCache:fo(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function uf(e,t,s=!1){const a=e.split("/"),o=oE(e,a,t,s);if(!o)return null;const[c]=w0(e,a,o);return{route:o.node.route,rawParams:c,parsedParams:o.parsedParams}}function w0(e,t,s){const a=iE(s.node);let o=null;const c=Object.create(null);let u=s.extract?.part??0,h=s.extract?.node??0,p=s.extract?.path??0,m=s.extract?.segment??0;for(;h<a.length;u++,h++,p++,m++){const y=a[h];if(y.kind===sr)break;if(y.kind===_0){m--,u--,p--;continue}const g=t[u],b=p;if(g&&(p+=g.length),y.kind===1){o??=s.node.fullPath.split("/");const _=o[m],w=y.prefix?.length??0;if(_.charCodeAt(w)===123){const E=y.suffix?.length??0,R=_.substring(w+2,_.length-E-1),A=g.substring(w,g.length-E);c[R]=decodeURIComponent(A)}else{const E=_.substring(1);c[E]=decodeURIComponent(g)}}else if(y.kind===3){if(s.skipped&1<<h){u--,p=b-1;continue}o??=s.node.fullPath.split("/");const _=o[m],w=y.prefix?.length??0,E=y.suffix?.length??0,R=_.substring(w+3,_.length-E-1),A=y.suffix||y.prefix?g.substring(w,g.length-E):g;A&&(c[R]=decodeURIComponent(A))}else if(y.kind===2){const _=y,w=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),E=decodeURIComponent(w);c["*"]=E,c._splat=E;break}}return s.rawParams&&Object.assign(c,s.rawParams),[c,{part:u,node:h,path:p,segment:m}]}function aE(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function iE(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function oE(e,t,s,a){if(e==="/"&&s.index)return{node:s.index,skipped:0};const o=!uo(t),c=o&&e!=="/",u=t.length-(o?1:0),h=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const y=h.pop(),{node:g,index:b,skipped:_,depth:w,statics:E,dynamics:R,optionals:A}=y;let{extract:j,rawParams:k,parsedParams:D}=y;if(g.kind===2&&g.route&&!ql(m,y))continue;if(g.skipOnParamError){if(!My(e,t,y))continue;k=y.rawParams,j=y.extract,D=y.parsedParams}a&&g.route&&g.kind!==sr&&ql(p,y)&&(p=y);const Q=b===u;if(Q&&(g.route&&(!c||g.kind===sr||g.kind===2)&&ql(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const G=Q?void 0:t[b];let I;if(Q&&g.index){const $={node:g.index,index:b,skipped:_,depth:w+1,statics:E,dynamics:R,optionals:A,extract:j,rawParams:k,parsedParams:D};let J=!0;if(g.index.skipOnParamError&&(My(e,t,$)||(J=!1)),J){if(!R&&!A&&!_&&lE(E,u))return $;ql(m,$)&&(m=$)}}if(g.wildcard)for(let $=g.wildcard.length-1;$>=0;$--){const J=g.wildcard[$],{prefix:re,suffix:se}=J;if(!(re&&(Q||!(J.caseSensitive?G:I??=G.toLowerCase()).startsWith(re)))){if(se){if(Q)continue;const fe=t.slice(b).join("/").slice(-se.length);if((J.caseSensitive?fe:fe.toLowerCase())!==se)continue}h.push({node:J,index:u,skipped:_,depth:w+1,statics:E,dynamics:R,optionals:A,extract:j,rawParams:k,parsedParams:D})}}if(g.optional){const $=_|1<<w,J=w+1;for(let re=g.optional.length-1;re>=0;re--){const se=g.optional[re];h.push({node:se,index:b,skipped:$,depth:J,statics:E,dynamics:R,optionals:A,extract:j,rawParams:k,parsedParams:D})}if(!Q)for(let re=g.optional.length-1;re>=0;re--){const se=g.optional[re],{prefix:fe,suffix:ge}=se;if(fe||ge){const Ke=se.caseSensitive?G:I??=G.toLowerCase();if(fe&&!Ke.startsWith(fe)||ge&&!Ke.endsWith(ge))continue}h.push({node:se,index:b+1,skipped:_,depth:J,statics:E,dynamics:R,optionals:A+Hl(u,b),extract:j,rawParams:k,parsedParams:D})}}if(!Q&&g.dynamic&&G)for(let $=g.dynamic.length-1;$>=0;$--){const J=g.dynamic[$],{prefix:re,suffix:se}=J;if(re||se){const fe=J.caseSensitive?G:I??=G.toLowerCase();if(re&&!fe.startsWith(re)||se&&!fe.endsWith(se))continue}h.push({node:J,index:b+1,skipped:_,depth:w+1,statics:E,dynamics:R+Hl(u,b),optionals:A,extract:j,rawParams:k,parsedParams:D})}if(!Q&&g.staticInsensitive){const $=g.staticInsensitive.get(I??=G.toLowerCase());$&&h.push({node:$,index:b+1,skipped:_,depth:w+1,statics:E+Hl(u,b),dynamics:R,optionals:A,extract:j,rawParams:k,parsedParams:D})}if(!Q&&g.static){const $=g.static.get(G);$&&h.push({node:$,index:b+1,skipped:_,depth:w+1,statics:E+Hl(u,b),dynamics:R,optionals:A,extract:j,rawParams:k,parsedParams:D})}if(g.pathless){const $=w+1;for(let J=g.pathless.length-1;J>=0;J--){const re=g.pathless[J];h.push({node:re,index:b,skipped:_,depth:$,statics:E,dynamics:R,optionals:A,extract:j,rawParams:k,parsedParams:D})}}}if(m)return m;if(a&&p){let y=p.index;for(let b=0;b<p.index;b++)y+=t[b].length;const g=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(g),p}return null}function Hl(e,t){return 2**(e-t-1)}function lE(e,t){return e===2**(t-1)-1}function My(e,t,s){try{const[a,o]=w0(e,t,s);s.rawParams=a,s.extract=o;const c=s.node.parse(a);return s.parsedParams=Object.assign(Object.create(null),s.parsedParams,c),!0}catch{return null}}function ql(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===sr)>(e.node.kind===sr)||t.node.kind===sr==(e.node.kind===sr)&&t.depth>e.depth))):!0}function fc(e){return df(e.filter(t=>t!==void 0).join("/"))}function df(e){return e.replace(/\/{2,}/g,"/")}function S0(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ar(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function E0(e){return ar(S0(e))}function wc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function cE(e,t,s){return wc(e,s)===wc(t,s)}function uE({base:e,to:t,trailingSlash:s="never",cache:a}){const o=t.startsWith("/"),c=!o&&t===".";let u;if(a){u=o?t:c?e:e+"\0"+t;const g=a.get(u);if(g)return g}let h;
10if(c)h=e.split("/");else if(o)h=t.split("/");else{for(h=e.split("/");h.length>1&&uo(h)==="";)h.pop();const g=t.split("/");for(let b=0,_=g.length;b<_;b++){const w=g[b];w===""?b?b===_-1&&h.push(w):h=[w]:w===".."?h.pop():w==="."||h.push(w)}}h.length>1&&(uo(h)===""?s==="never"&&h.pop():s==="always"&&h.push(""));let p,m="";for(let g=0;g<h.length;g++){g>0&&(m+="/");const b=h[g];if(!b)continue;p=cf(b,0,p);const _=p[0];if(_===0){m+=b;continue}const w=p[5],E=b.substring(0,p[1]),R=b.substring(p[4],w),A=b.substring(p[2],p[3]);_===1?m+=E||R?`${E}{$${A}}${R}`:`$${A}`:_===2?m+=E||R?`${E}{$}${R}`:"$":m+=`${E}{-$${A}}${R}`}m=df(m);const y=m||"/";return u&&a&&a.set(u,y),y}function dE(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),s=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(s,"g");return o=>o.replace(a,c=>t.get(c)??c)}function fh(e,t,s){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>Ny(o,s)).join("/"):Ny(a,s)}function Dy({path:e,params:t,decoder:s,...a}){let o=!1;const c=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:c,isMissingParams:o};const u=e.length;let h=0,p,m="";for(;h<u;){const y=h;p=cf(e,y,p);const g=p[5];if(h=g+1,y===g)continue;const b=p[0];if(b===0){m+="/"+e.substring(y,g);continue}if(b===2){const _=t._splat;c._splat=_,c["*"]=_;const w=e.substring(y,p[1]),E=e.substring(p[4],g);if(!_){o=!0,(w||E)&&(m+="/"+w+E);continue}const R=fh("_splat",t,s);m+="/"+w+R+E;continue}if(b===1){const _=e.substring(p[2],p[3]);!o&&!(_ in t)&&(o=!0),c[_]=t[_];const w=e.substring(y,p[1]),E=e.substring(p[4],g),R=fh(_,t,s)??"undefined";m+="/"+w+R+E;continue}if(b===3){const _=e.substring(p[2],p[3]),w=t[_];if(w==null)continue;c[_]=w;const E=e.substring(y,p[1]),R=e.substring(p[4],g),A=fh(_,t,s)??"";m+="/"+E+A+R;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:c,interpolatedPath:m||"/",isMissingParams:o}}function Ny(e,t){const s=encodeURIComponent(e);return t?.(s)??s}function hE(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function St(e){return e?.isNotFound===!0}function fE(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var pE="tsr-scroll-restoration-v1_3";function mE(){const e=fE();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");ti(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=nr(a,t)||t},persist:()=>{try{e.setItem(pE,JSON.stringify(t))}catch{}}}}var Ly=mE(),gE=e=>e.state.__TSR_key||e.href;function yE(e){const t=[];let s;for(;s=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${t.reverse().join(" > ")}`.toLowerCase()}var Vl=!1,Zi="window",Uy="data-scroll-restoration-id";function vE(e,t){if(!Ly)return;const s=Ly;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,Vl=!1;const a=e.options.getScrollRestorationKey||gE,o=new Map;window.history.scrollRestoration="manual";const c=h=>{if(!(Vl||!e.isScrollRestoring))if(h.target===document||h.target===window)o.set(Zi,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=h.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},u=h=>{if(!e.isScrollRestoring||!h||o.size===0||!s)return;const p=s.state[h]||={};for(const[m,y]of o){let g;if(m===Zi)g=Zi;else if(m.isConnected){const b=m.getAttribute(Uy);g=b?`[${Uy}="${b}"]`:yE(m)}g&&(p[g]=y)}};document.addEventListener("scroll",c,!0),e.subscribe("onBeforeLoad",h=>{u(h.fromLocation?a(h.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{u(a(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",h=>{const p=a(h.toLocation),m=e.options.scrollRestorationBehavior,y=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Vl=!0;try{const g=e.isScrollRestoring?s.state[p]:void 0;let b=!1;if(g)for(const _ in g){const w=g[_];if(!ti(w))continue;const{scrollX:E,scrollY:R}=w;if(!(!Number.isFinite(E)||!Number.isFinite(R))){if(_===Zi)window.scrollTo({top:R,left:E,behavior:m}),b=!0;else if(_){let A;
10try{A=document.querySelector(_)}catch{continue}A&&(A.scrollLeft=E,A.scrollTop=R,b=!0)}}}if(!b){const _=e.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const E=document.getElementById(_);E&&E.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:m};if(window.scrollTo(w),y)for(const E of y){if(E===Zi)continue;const R=typeof E=="function"?E():document.querySelector(E);R&&R.scrollTo(w)}}}}finally{Vl=!1}e.isScrollRestoring&&s.set(g=>(g[p]||={},g))}})}function R0(e,t=String){const s=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&s.set(a,t(o))}return s.toString()}function ph(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function bE(e){const t=new URLSearchParams(e),s=Object.create(null);for(const[a,o]of t.entries()){const c=s[a];c==null?s[a]=ph(o):Array.isArray(c)?c.push(ph(o)):s[a]=[c,ph(o)]}return s}var _E=SE(JSON.parse),wE=EE(JSON.stringify,JSON.parse);function SE(e){return t=>{t[0]==="?"&&(t=t.substring(1));const s=bE(t);for(const a in s){const o=s[a];if(typeof o=="string")try{s[a]=e(o)}catch{}}return s}}function EE(e,t){const s=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(s&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const c=R0(o,a);return c?`?${c}`:""}}var Kr="__root__";function T0(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function sn(e){return e instanceof Response&&!!e.options}function RE(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return T0(e)}function TE(e){return{input:({url:t})=>{for(const s of e)t=Mh(s,t);return t},output:({url:t})=>{for(let s=e.length-1;s>=0;s--)t=A0(e[s],t);return t}}}function AE(e){const t=E0(e.basepath),s=`/${t}`,a=`${s}/`,o=e.caseSensitive?s:s.toLowerCase(),c=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const h=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return h===o?u.pathname="/":h.startsWith(c)&&(u.pathname=u.pathname.slice(s.length)),u},output:({url:u})=>(u.pathname=fc(["/",t,u.pathname]),u)}}function Mh(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function A0(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function OE(e,t){const{createMutableStore:s,createReadonlyStore:a,batch:o,init:c}=t,u=new Map,h=new Map,p=new Map,m=s(e.status),y=s(e.loadedAt),g=s(e.isLoading),b=s(e.isTransitioning),_=s(e.location),w=s(e.resolvedLocation),E=s(e.statusCode),R=s(e.redirect),A=s([]),j=s([]),k=s([]),D=a(()=>mh(u,A.get())),Q=a(()=>mh(h,j.get())),G=a(()=>mh(p,k.get())),I=a(()=>A.get()[0]),$=a(()=>A.get().some(Y=>u.get(Y)?.get().status==="pending")),J=a(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:m.get()})),re=a(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:b.get(),matches:D.get(),location:_.get(),resolvedLocation:w.get(),statusCode:E.get(),redirect:R.get()})),se=fo(64);function fe(Y){let oe=se.get(Y);return oe||(oe=a(()=>{const Te=A.get();for(const ve of Te){const C=u.get(ve);if(C&&C.routeId===Y)return C.get()}}),se.set(Y,oe)),oe}const ge={status:m,loadedAt:y,isLoading:g,isTransitioning:b,location:_,resolvedLocation:w,statusCode:E,redirect:R,matchesId:A,pendingIds:j,cachedIds:k,matches:D,pendingMatches:Q,cachedMatches:G,firstId:I,hasPending:$,matchRouteDeps:J,matchStores:u,pendingMatchStores:h,cachedMatchStores:p,__store:re,getRouteMatchStore:fe,setMatches:Ke,setPending:Le,setCached:L};Ke(e.matches),c?.(ge);function Ke(Y){gh(Y,u,A,s,o)}function Le(Y){gh(Y,h,j,s,o)}function L(Y){gh(Y,p,k,s,o)}return ge}function mh(e,t){const s=[];for(const a of t){const o=e.get(a);o&&s.push(o.get())}return s}function gh(e,t,s,a,o){const c=e.map(h=>h.id),u=new Set(c);o(()=>{for(const h of t.keys())u.has(h)||t.delete(h);for(const h of e){const p=t.get(h.id);if(!p){const m=a(h);m.routeId=h.routeId,t.set(h.id,m);continue}p.routeId=h.routeId,p.get()!==h&&p.set(h)}XS(s.get(),c)||s.set(c)})}var Dh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},xE=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Uc=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Fr=(e,t,s=!0)=>{const a={...e.router.options.context??{}},o=s?t:t-1;for(let c=0;c<=o;c++){const u=e.matches[c];if(!u)continue;const h=e.router.getMatch(u.id);
10h&&Object.assign(a,h.__routeContext,h.__beforeLoadContext)}return a},zy=(e,t)=>{if(!e.matches.length)return;const s=t.routeId,a=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),o=a>=0?a:0;let c=s?e.matches.findIndex(u=>u.routeId===s):e.firstBadMatchIndex??e.matches.length-1;c<0&&(c=o);for(let u=c;u>=0;u--){const h=e.matches[u];if(e.router.looseRoutesById[h.routeId].options.notFoundComponent)return u}return s?c:o},rr=(e,t,s)=>{if(!(!sn(s)&&!St(s)))throw sn(s)&&s.redirectHandled&&!s.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=s,e.updateMatch(t.id,a=>({...a,status:sn(s)?"redirected":St(s)?"notFound":a.status==="pending"?"success":a.status,context:Fr(e,t.index),isFetching:!1,error:s})),St(s)&&!s.routeId&&(s.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),sn(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},O0=(e,t)=>{const s=e.router.getMatch(t);return!!(!s||s._nonReactive.dehydrated)},Iy=(e,t,s)=>{const a=Fr(e,s);e.updateMatch(t,o=>({...o,context:a}))},Wi=(e,t,s,a)=>{const{id:o,routeId:c}=e.matches[t],u=e.router.looseRoutesById[c];if(s instanceof Promise)throw s;s.routerCode=a,e.firstBadMatchIndex??=t,rr(e,e.router.getMatch(o),s);try{u.options.onError?.(s)}catch(h){s=h,rr(e,e.router.getMatch(o),s)}e.updateMatch(o,h=>(h._nonReactive.beforeLoadPromise?.resolve(),h._nonReactive.beforeLoadPromise=void 0,h._nonReactive.loadPromise?.resolve(),{...h,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!sn(s)&&!St(s)&&(e.serialError??=s)},x0=(e,t,s,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Uc(e,t)&&(s.options.loader||s.options.beforeLoad||k0(s))&&typeof o=="number"&&o!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const c=setTimeout(()=>{Dh(e)},o);a._nonReactive.pendingTimeout=c}},CE=(e,t,s)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;x0(e,t,s,a);const o=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&rr(e,c,c.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},kE=(e,t,s,a)=>{const o=e.router.getMatch(t);let c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Yr(()=>{c?.resolve(),c=void 0});const{paramsError:u,searchError:h}=o;u&&Wi(e,s,u,"PARSE_PARAMS"),h&&Wi(e,s,h,"VALIDATE_SEARCH"),x0(e,t,a,o);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,e.updateMatch(t,D=>({...D,isFetching:"beforeLoad",fetchCount:D.fetchCount+1,abortController:p})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,D=>({...D,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{y(),g()});return}o._nonReactive.beforeLoadPromise=Yr();const b={...Fr(e,s,!1),...o.__routeContext},{search:_,params:w,cause:E}=o,R=Uc(e,t),A={search:_,abortController:p,params:w,preload:R,context:b,location:e.location,navigate:D=>e.router.navigate({...D,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:R?"preload":E,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},j=D=>{if(D===void 0){e.router.batch(()=>{y(),g()});return}(sn(D)||St(D))&&(y(),Wi(e,s,D,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(t,Q=>({...Q,__beforeLoadContext:D})),g()})};let k;try{if(k=a.options.beforeLoad(A),ho(k))return y(),k.catch(D=>{Wi(e,s,D,"BEFORE_LOAD")}).then(j)}catch(D){y(),Wi(e,s,D,"BEFORE_LOAD")}j(k)},PE=(e,t)=>{const{id:s,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],c=()=>h(),u=()=>kE(e,s,t,o),h=()=>{if(O0(e,s))return;const p=CE(e,s,o);return ho(p)?p.then(u):u()};return c()},jE=(e,t,s)=>{const a=e.router.getMatch(t);if(!a||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([s.options.head?.(o),s.options.scripts?.(o),s.options.headers?.(o)]).then(([c,u,h])=>({meta:c?.meta,links:c?.links,headScripts:c?.scripts,headers:h,scripts:u,styles:c?.styles}))},C0=(e,t,s,a,o)=>{const c=t[a-1],{params:u,loaderDeps:h,abortController:p,cause:m}=e.router.getMatch(s),y=Fr(e,a),g=Uc(e,s);return{params:u,deps:h,preload:!!g,parentMatchPromise:c,abortController:p,context:y,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:g?"preload":m,route:o,...e.router.options.additionalContext}},By=async(e,t,s,a,o)=>{try{const c=e.router.getMatch(s);try{(!(b0??e.router.isServer)||c.ssr===!0)&&po(o);const u=o.options.loader,h=typeof u=="function"?u:u?.handler,p=h?.(C0(e,t,s,a,o)),m=!!h&&ho(p);if((m||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(s,g=>({...g,isFetching:"loader"})),h){const g=m?await p:p;rr(e,e.router.getMatch(s),g),g!==void 0&&e.updateMatch(s,b=>({...b,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,e.updateMatch(s,g=>({...g,error:void 0,context:Fr(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let h=u;if(h?.name==="AbortError"){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(s,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Fr(e,a)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,St(u)&&await o.options.notFoundComponent?.preload?.(),rr(e,e.router.getMatch(s),u);try{o.options.onError?.(u)}catch(m){h=m,rr(e,e.router.getMatch(s),m)}!sn(h)&&!St(h)&&await po(o,["errorComponent"]),e.updateMatch(s,m=>({...m,error:h,context:Fr(e,a),status:"error",isFetching:!1}))}}catch(c){const u=e.router.getMatch(s);u&&(u._nonReactive.loaderPromise=void 0),rr(e,u,c)}},ME=async(e,t,s)=>{async function a(_,w,E,R,A){const j=Date.now()-w.updatedAt,k=_?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,D=A.options.shouldReload,Q=typeof D=="function"?D(C0(e,t,o,s,A)):D,{status:G,invali
10d:I}=R,$=j>=k&&(!!e.forceStaleReload||R.cause==="enter"||E!==void 0&&E!==R.id);u=G==="success"&&(I||(Q??$)),_&&A.options.preload===!1||(u&&!e.sync&&y?(h=!0,(async()=>{try{await By(e,t,o,s,A);const J=e.router.getMatch(o);J._nonReactive.loaderPromise?.resolve(),J._nonReactive.loadPromise?.resolve(),J._nonReactive.loaderPromise=void 0,J._nonReactive.loadPromise=void 0}catch(J){sn(J)&&await e.router.navigate(J.options)}})()):G!=="success"||u?await By(e,t,o,s,A):Iy(e,o,s))}const{id:o,routeId:c}=e.matches[s];let u=!1,h=!1;const p=e.router.looseRoutesById[c],m=p.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(O0(e,o)){if(!e.router.getMatch(o))return e.matches[s];Iy(e,o,s)}else{const _=e.router.getMatch(o),w=e.router.stores.matchesId.get()[s],E=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===c?w:e.router.stores.matches.get().find(A=>A.routeId===c)?.id,R=Uc(e,o);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const A=e.router.getMatch(o),j=A._nonReactive.error||A.error;j&&rr(e,A,j),A.status==="pending"&&await a(R,_,E,A,p)}else{const A=R&&!e.router.stores.matchStores.has(o),j=e.router.getMatch(o);j._nonReactive.loaderPromise=Yr(),A!==j.preload&&e.updateMatch(o,k=>({...k,preload:A})),await a(R,_,E,j,p)}}const g=e.router.getMatch(o);h||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,h||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const b=h?g.isFetching:!1;return b!==g.isFetching||g.invalid!==!1?(e.updateMatch(o,_=>({..._,isFetching:b,invalid:!1})),e.router.getMatch(o)):g};async function $y(e){const t=e,s=[];xE(t.router)&&Dh(t);let a;for(let b=0;b<t.matches.length;b++){try{const _=PE(t,b);ho(_)&&await _}catch(_){if(sn(_))throw _;if(St(_))a=_;else if(!t.preload)throw _;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,c=a&&!t.preload?zy(t,a):void 0,u=a&&t.preload?0:c!==void 0?Math.min(c+1,o):o;let h,p;for(let b=0;b<u;b++)s.push(ME(t,s,b));try{await Promise.all(s)}catch{const b=await Promise.allSettled(s);for(const _ of b){if(_.status!=="rejected")continue;const w=_.reason;if(sn(w))throw w;St(w)?h??=w:p??=w}if(p!==void 0)throw p}const m=h??(a&&!t.preload?a:void 0);let y=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!m&&a&&t.preload)return t.matches;if(m){const b=zy(t,m);b===void 0&&rn();const _=t.matches[b],w=t.router.looseRoutesById[_.routeId],E=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&E&&(w.options.notFoundComponent=E),m.routeId=_.routeId;const R=_.routeId===t.router.routeTree.id;t.updateMatch(_.id,A=>({...A,...R?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=b,await po(w,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await po(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:_,routeId:w}=t.matches[b],E=t.router.looseRoutesById[w];try{const R=jE(t,_,E);if(R){const A=await R;t.updateMatch(_,j=>({...j,...A}))}}catch(R){console.error(`Error executing head for route ${w}:`,R)}}const g=Dh(t);if(ho(g)&&await g,m)throw m;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Hy(e,t){const s=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function po(e,t=pc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:o,...c}=a.options;Object.assign(e.options,c),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const s=()=>e._componentsLoaded?void 0:t===pc?(()=>{if(e._componentsPromise===void 0){const a=Hy(e,pc);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Hy(e,t);return e._lazyPromise?e._lazyPromise.then(s):s()}function k0(e){for(const t of pc)if(e.options[t]?.preload)return!0;return!1}var pc=["component","errorComponent","pendingComponent","notFoundComponent"],ir="__TSR_index",qy="popstate",Vy="beforeunload";function DE(e){let t=e.getLocation();const s=new Set,a=u=>
10{t=e.getLocation(),s.forEach(h=>h({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},c=async({task:u,navigateOpts:h,...p})=>{if(h?.ignoreBlocker??!1){u();return}const m=e.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const b=Sc(p.path,p.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:u=>(s.add(u),()=>{s.delete(u)}),push:(u,h,p)=>{const m=t.state[ir];h=Gy(m+1,h),c({task:()=>{e.pushState(u,h),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:h})},replace:(u,h,p)=>{const m=t.state[ir];h=Gy(m,h),c({task:()=>{e.replaceState(u,h),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:h})},go:(u,h)=>{c({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:h,type:"GO"})},back:u=>{c({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ir]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const h=e.getBlockers?.()??[];return e.setBlockers([...h,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function Gy(e,t){t||(t={});const s=hf();return{...t,key:s,__TSR_key:s,[ir]:e}}function NE(e){const t=typeof document<"u"?window:void 0,s=t.history.pushState,a=t.history.replaceState;let o=[];const c=()=>o,u=$=>o=$,h=($=>$),p=(()=>Sc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const $=hf();t.history.replaceState({[ir]:0,key:$,__TSR_key:$},"")}let m=p(),y,g=!1,b=!1,_=!1,w=!1;const E=()=>m;let R,A;const j=()=>{R&&(I._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),I._ignoreSubscribers=!1,R=void 0,A=void 0,y=void 0)},k=($,J,re)=>{const se=h(J);A||(y=m),m=Sc(J,re),R={href:se,state:re,isPush:R?.isPush||$==="push"},A||(A=Promise.resolve().then(()=>j()))},D=$=>{m=p(),I.notify({type:$})},Q=async()=>{if(b){b=!1;return}const $=p(),J=$.state[ir]-m.state[ir],re=J===1,se=J===-1,fe=!re&&!se||g;g=!1;const ge=fe?"GO":se?"BACK":"FORWARD",Ke=fe?{type:"GO",index:J}:{type:se?"BACK":"FORWARD"};if(_)_=!1;else{const Le=c();if(typeof document<"u"&&Le.length){for(const L of Le)if(await L.blockerFn({currentLocation:m,nextLocation:$,action:ge})){b=!0,t.history.go(1),I.notify(Ke);return}}}m=p(),I.notify(Ke)},G=$=>{if(w){w=!1;return}let J=!1;const re=c();if(typeof document<"u"&&re.length)for(const se of re){const fe=se.enableBeforeUnload??!0;if(fe===!0){J=!0;break}if(typeof fe=="function"&&fe()===!0){J=!0;break}}if(J)return $.preventDefault(),$.returnValue=""},I=DE({getLocation:E,getLength:()=>t.history.length,pushState:($,J)=>k("push",$,J),replaceState:($,J)=>k("replace",$,J),back:$=>($&&(_=!0),w=!0,t.history.back()),forward:$=>{$&&(_=!0),w=!0,t.history.forward()},go:$=>{g=!0,t.history.go($)},createHref:$=>h($),flush:j,destroy:()=>{t.history.pushState=s,t.history.replaceState=a,t.removeEventListener(Vy,G,{capture:!0}),t.removeEventListener(qy,Q)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Vy,G,{capture:!0}),t.addEventListener(qy,Q),t.history.pushState=function(...$){const J=s.apply(t.history,$);return I._ignoreSubscribers||D("PUSH"),J},t.history.replaceState=function(...$){const J=a.apply(t.history,$);return I._ignoreSubscribers||D("REPLACE"),J},I}function LE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Sc(e,t){const s=LE(e),a=s.indexOf("#"),o=s.indexOf("?"),c=hf();return{href:s,pathname:s.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:s.length),hash:a>-1?s.substring(a):"",search:o>-1?s.slice(o,a===-1?void 0:a):"",state:t||{[ir]:0,key:c,__TSR_key:c}}}function hf(){return(Math.random()+1).toString(36).substring(7)}function UE(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Xa(e,t){const s=t,a=e;return{fromLocation:s,toLocation:a,pathChanged:s?.pathname!==a.pathname,hrefChanged:s?.href!==a.href,hashChanged:s?.hash!==a.hash}}var zE=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{const a=this.options,o=this.basepath??a?.basepath??"/",c=this.basepath===void 0,u=a?.rewrite;if(this.options={...a,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=dE(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=NE()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let y;this.resolvePathCache=fo(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=OE(BE(this.latestLocation),y),vE(this)}let h=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(c||o!==p||u!==m){this.basepath=p;const y=[],g=E0(p);g&&g!=="/"&&y.push(AE({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:TE(y),this.history&&this.updateLatestLocation(),h=!0}h&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=rE(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&WS(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,a)=>{const o={eventType:s,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=s=>
10{this.subscribers.forEach(a=>{a.eventType===s.type&&a.fn(s)})},this.parseLocation=(s,a)=>{const o=({pathname:p,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(m),j=this.options.stringifySearch(A);return{href:p+j+y,publicHref:p+j+y,pathname:Xi(p).path,external:!1,searchStr:j,search:Lr(a?.search,A),hash:Xi(y.slice(1)).path,state:Br(a?.state,b)}}const _=new URL(g,this.origin),w=Mh(this.rewrite,_),E=this.options.parseSearch(w.search),R=this.options.stringifySearch(E);return w.search=R,{href:w.href.replace(w.origin,""),publicHref:g,pathname:Xi(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:R,search:Lr(a?.search,E),hash:Xi(w.hash.slice(1)).path,state:Br(a?.state,b)}},c=o(s),{__tempLocation:u,__tempKey:h}=c.state;if(u&&(!h||h===this.tempLocationKey)){const p=o(u);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(s,a)=>uE({base:s,to:df(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,a,o)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:a},o):this.matchRoutesInternal(s,a),this.getMatchedRoutes=s=>$E({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const a=this.getMatch(s);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const a=this.stores.matchStores.get(s)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const a=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,h=this.matchRoutesLightweight(u);c.from;const p=c.unsafeRelative==="path"?u.pathname:c.from??h.fullPath,m=this.resolvePathWithBase(p,"."),y=h.search,g=Object.assign(Object.create(null),h.params),b=c.to?this.resolvePathWithBase(m,`${c.to}`):this.resolvePathWithBase(m,"."),_=c.params===!1||c.params===null?Object.create(null):(c.params??!0)===!0?g:Object.assign(g,nr(c.params,g)),w=this.getMatchedRoutes(b);let E=w.matchedRoutes;if((!w.foundRoute||w.foundRoute.path!=="/"&&w.routeParams["**"])&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]),Object.keys(_).length>0)for(const re of E){const se=re.options.params?.stringify??re.options.stringifyParams;if(se)try{Object.assign(_,se(_))}catch{}}const R=s.leaveParams?b:Xi(Dy({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=y;if(s._includeValidateSearch&&this.options.search?.strict){const re={};E.forEach(se=>{if(se.options.validateSearch)try{Object.assign(re,mc(se.options.validateSearch,{...re,...A}))}catch{}}),A=re}A=HE({search:A,dest:c,destRoutes:E,_includeValidateSearch:s._includeValidateSearch}),A=Lr(y,A);const j=this.options.stringifySearch(A),k=c.hash===!0?u.hash:c.hash?nr(c.hash,u.hash):void 0,D=k?`#${k}`:"";let Q=c.state===!0?u.state:c.state?nr(c.state,u.state):{};Q=Br(u.state,Q);const G=`${R}${j}${D}`;let I,$,J=!1;if(this.rewrite){const re=new URL(G,this.origin),se=A0(this.rewrite,re);I=re.href.replace(re.origin,""),se.origin!==this.origin?($=se.href,J=!0):$=se.pathname+se.search+se.hash}else I=JS(G),$=I;return{publicHref:$,href:I,pathname:R,search:A,searchStr:j,state:Q,hash:k??"",external:J,unmaskOnReload:c.unmaskOnReload}},o=(c={},u)=>{const h=a(c);let p=u?a(u):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=eE(h.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,..._}=y.route,w=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,nr(b,m));u={from:s.from,..._,params:w},p=a(u)}}}return p&&(h.maskedLocation=p),h};return s.mask?o(s,{from:s.from,...s.mask}):o(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:a,...o})=>{const c=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(y=>{o.state[y]=this.latestLocation.state[y]});const m=nn(o.state,this.latestLocation.state);return p.forEach(y=>{delete o.state[y]}),m},u=ar(this.latestLocation.href)===ar(o.href);let h=this.commitLocationPromise;if(this.commitLocationPromise=Yr(()=>{h?.resolve(),h=void 0}),u&&c())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...y}=o;p&&(y={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[o.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:a,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,href:h,...p}={})=>
10{if(h){const g=this.history.location.state.__TSR_index,b=Sc(h,{__TSR_index:s?g:g+1}),_=new URL(b.pathname,this.origin);p.to=Mh(this.rewrite,_).pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:c,replace:s,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:s,reloadDocument:a,href:o,publicHref:c,...u})=>{let h=!1;if(o)try{new URL(`${o}`),h=!0}catch{}if(h&&!a&&(a=!0),a){if(s!==void 0||!o){const m=this.buildLocation({to:s,...u});o=o??m.publicHref,c=c??m.publicHref}const p=!h&&c?c:o;if(_c(p,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(o=>!s.some(c=>c.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(s),this.stores.setCached(a)})},this.load=async s=>{let a,o,c;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(c=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,y=Xa(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await $y({router:this,sync:s?.sync,forceStaleReload:u.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,b=null,_=null,w=null;this.batch(()=>{const E=this.stores.pendingMatches.get(),R=E.length,A=this.stores.matches.get();g=R?A.filter(D=>!this.stores.pendingMatchStores.has(D.id)):null;const j=new Set;for(const D of this.stores.pendingMatchStores.values())D.routeId&&j.add(D.routeId);const k=new Set;for(const D of this.stores.matchStores.values())D.routeId&&k.add(D.routeId);b=R?A.filter(D=>!j.has(D.routeId)):null,_=R?E.filter(D=>!k.has(D.routeId)):null,w=R?E.filter(D=>k.has(D.routeId)):A,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),R&&(this.stores.setMatches(E),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[E,R]of[[b,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(E)for(const A of E)this.looseRoutesById[A.routeId].options[R]?.(A)})})}})}catch(m){sn(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):St(m)&&(o=m);const y=a?a.status:o?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(y),this.stores.redirect.set(a)})}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let h;this.hasNotFoundMatch()?h=404:this.stores.matches.get().some(p=>p.status==="error")&&(h=500),h!==void 0&&this.stores.statusCode.set(h)},this.startViewTransition=s=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),h=typeof a.types=="function"?a.types(Xa(c,u)):a.types;if(h===!1){s();return}o={update:s,types:h}}else o=s;document.startViewTransition(o)}else s()},this.updateMatch=(s,a)=>{this.startTransition(()=>
10{const o=this.stores.pendingMatchStores.get(s);if(o){o.set(a);return}const c=this.stores.matchStores.get(s);if(c){c.set(a);return}const u=this.stores.cachedMatchStores.get(s);if(u){const h=a(u.get());h.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==s)):u.set(h)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const a=o=>s?.filter?.(o)??!0?{...o,invalid:!0,...s?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const a=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const o=s.options._builtLocation??this.buildLocation(s.options),c=this.getParsedLocationHref(o);s.options.href=c,s.headers.set("Location",c)}else if(a)try{const o=new URL(a);if(this.origin&&o.origin===this.origin){const c=o.pathname+o.search+o.hash;s.options.href=c,s.headers.set("Location",c)}}catch{}if(s.options.href&&!s.options._builtLocation&&_c(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const a=s?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!a(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),a=o=>{const c=this.looseRoutesById[o.routeId];if(!c.options.loader)return!0;const u=(o.preload?c.options.preloadGcTime??this.options.defaultPreloadGcTime:c.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:s-o.updatedAt>=u};this.clearCache({filter:a})},this.loadRouteChunk=po,this.preloadRoute=async s=>{const a=s._builtLocation??this.buildLocation(s);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:s});const c=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...c,...this.stores.cachedIds.get()]),h=o.filter(p=>!u.has(p.id));if(h.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...h])}try{return o=await $y({router:this,matches:o,location:a,preload:!0,updateMatch:(p,m)=>{c.has(p)?o=o.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),o}catch(p){if(sn(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});St(p)||console.error(p);return}},this.matchRoute=(s,a)=>{const o={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},c=this.buildLocation(o);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const u=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=tE(c.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,u.pathname,this.processedTree);return!h||s.params&&!nn(h.rawParams,s.params,{partial:!0})?!1:a?.includeSearch??!0?nn(u.search,c.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??wE,parseSearch:e.parseSearch??_E,protocolAllowlist:e.protocolAllowlist??KS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:s}){this.routesById=e,this.routesByPath=t,this.processedTree=s;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const s=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParam
10s:o,parsedParams:c}=s;let{matchedRoutes:u}=s,h=!1;(a?a.path!=="/"&&o["**"]:ar(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:h=!0);const p=h?VE(this.options.notFoundMode,u):void 0,m=new Array(u.length),y=new Map;for(const g of this.stores.matchStores.values())g.routeId&&y.set(g.routeId,g.get());for(let g=0;g<u.length;g++){const b=u[g],_=m[g-1];let w,E,R;{const ge=_?.search??e.search,Ke=_?._strictSearch??void 0;try{const Le=mc(b.options.validateSearch,{...ge})??void 0;w={...ge,...Le},E={...Ke,...Le},R=void 0}catch(Le){let L=Le;if(Le instanceof Ec||(L=new Ec(Le.message,{cause:Le})),t?.throwOnError)throw L;w=ge,E={},R=L}}const A=b.options.loaderDeps?.({search:w})??"",j=A?JSON.stringify(A):"",{interpolatedPath:k,usedParams:D}=Dy({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),Q=b.id+k+j,G=this.getMatch(Q),I=y.get(b.id),$=G?._strictParams??D;let J;if(!G)try{Ky(b,D,c,$)}catch(ge){if(St(ge)||sn(ge)?J=ge:J=new IE(ge.message,{cause:ge}),t?.throwOnError)throw J}Object.assign(o,$);const re=I?"stay":"enter";let se;if(G)se={...G,cause:re,params:I?.params??o,_strictParams:$,search:Lr(I?I.search:G.search,w),_strictSearch:E};else{const ge=b.options.loader||b.options.beforeLoad||b.lazyFn||k0(b)?"pending":"success";se={id:Q,ssr:b.options.ssr,index:g,routeId:b.id,params:I?.params??o,_strictParams:$,pathname:k,updatedAt:Date.now(),search:I?Lr(I.search,w):w,_strictSearch:E,searchError:void 0,status:ge,isFetching:!1,error:void 0,paramsError:J,__routeContext:void 0,_nonReactive:{loadPromise:Yr()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:re,loaderDeps:I?Br(I.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t?.preload||(se.globalNotFound=p===b.id),se.searchError=R;const fe=this.getParentContext(_);se.context={...fe,...se.__routeContext,...se.__beforeLoadContext},m[g]=se}for(let g=0;g<m.length;g++){const b=m[g],_=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),E=y.get(b.routeId);if(b.params=E?Lr(E.params,o):o,!w){const R=m[g-1],A=this.getParentContext(R);if(_.options.context){const j={deps:b.loaderDeps,params:b.params,context:A??{},location:e,navigate:k=>this.navigate({...k,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:_.id};b.__routeContext=_.options.context(j)??void 0}b.context={...A,...b.__routeContext,...b.__beforeLoadContext}}}return m}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:s,parsedParams:a}=this.getMatchedRoutes(e.pathname),o=uo(t),c={...e.search};for(const y of t)try{Object.assign(c,mc(y.options.validateSearch,c))}catch{}const u=uo(this.stores.matchesId.get()),h=u&&this.stores.matchStores.get(u)?.get(),p=h&&h.routeId===o.id&&h.pathname===e.pathname;let m;if(p)m=h.params;else{const y=Object.assign(Object.create(null),s);for(const g of t)try{Ky(g,s,a??{},y)}catch{}m=y}return{matchedRoutes:t,fullPath:o.fullPath,search:c,params:m}}},Ec=class extends Error{},IE=class extends Error{};function BE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function mc(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new Ec("Async validation not supported");if(s.issues)throw new Ec(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function $E({pathname:e,routesById:t,processedTree:s}){const a=Object.create(null),o=ar(e);let c,u;const h=nE(o,s,!0);return h&&(c=h.route,Object.assign(a,h.rawParams),u=Object.assign(Object.create(null),h.parsedParams)),{matchedRoutes:h?.branch||[t.__root__],routeParams:a,foundRoute:c,parsedParams:u}}function HE({search:e,dest:t,destRoutes:s,_includeValidateSearch:a}){return qE(s)(e,t,a??!1)}function qE(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const c=({search:u,next:h})=>{let p=u;
10"preSearchFilters"in o.options&&o.options.preSearchFilters&&(p=o.options.preSearchFilters.reduce((y,g)=>g(y),u));const m=h(p);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,g)=>g(y),m):m};t.middlewares.push(c)}if(o.options.validateSearch){const c=({search:u,next:h})=>{const p=h(u);if(!t._includeValidateSearch)return p;try{return{...p,...mc(o.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(c)}}const s=({search:o})=>{const c=t.dest;return c.search?c.search===!0?o:nr(c.search,o):{}};t.middlewares.push(s);const a=(o,c,u)=>{if(o>=u.length)return c;const h=u[o];return h({search:c,next:m=>a(o+1,m,u)})};return function(c,u,h){return t.dest=u,t._includeValidateSearch=h,a(0,c,t.middlewares)}}function VE(e,t){if(e!=="root")for(let s=t.length-1;s>=0;s--){const a=t[s];if(a.children)return a.id}return Kr}function Ky(e,t,s,a){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const c in t)c in s&&(a[c]=s[c]);else{const c=o(a);Object.assign(a,c)}}var Qn=Symbol.for("TSR_DEFERRED_PROMISE");function GE(e,t){const s=e;return s[Qn]||(s[Qn]={status:"pending"},s.then(a=>{s[Qn].status="success",s[Qn].data=a}).catch(a=>{s[Qn].status="error",s[Qn].error={data:UE(a),__isServerError:!0}})),s}var KE="Error preloading route! âï¸";function Fy(e,t){if(e)return typeof e=="string"?e:e[t]}function FE(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function YE(e){if(e.tag!=="link")return;const t=e.attrs?.rel,s=e.attrs?.href;if(typeof s=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return s}function QE(e,t){const s=YE(t);return!!s&&e?.inlineCss?.styles[s]!==void 0}var P0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const s=this.options,a=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Kr:this.parentRoute||rn();let o=a?Kr:s?.path;o&&o!=="/"&&(o=S0(o));const c=s?.id||o;let u=a?Kr:fc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=fc(["/",u]));const h=u==="__root__"?"/":fc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=h,this._to=ar(h)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>T0({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},JE=class extends P0{constructor(e){super(e)}};function XE(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),s=t.state.__hashScrollIntoViewOptions??!0;if(s&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(s)}}}var ZE=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(ZE||{}),Ss=Symbol.asyncIterator,j0=Symbol.hasInstance,Za=Symbol.isConcatSpreadable,Es=Symbol.iterator,M0=Symbol.match,D0=Symbol.matchAll,N0=Symbol.replace,L0=Symbol.search,U0=Symbol.species,z0=Symbol.split,I0=Symbol.toPrimitive,Wa=Symbol.toStringTag,B0=Symbol.unscopables,$0={[Ss]:0,[j0]:1,[Za]:2,[Es]:3,[M0]:4,[D0]:5,[N0]:6,[L0]:7,[U0]:8,[z0]:9,[I0]:10,[Wa]:11,[B0]:12},WE={0:Ss,1:j0,2:Za,3:Es,4:M0,5:D0,6:N0,7:L0,8:U0,9:z0,10:I0,11:Wa,12:B0},O=void 0,eR={2:!0,3:!1,1:O,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},tR={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},nR={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Ne(e,t,s,a,o,c,u,h,p,m,y,g){return{t:e,i:t,s,c:a,m:o,p:c,e:u,a:h,f:p,b:m,o:y,l:g}}function lr(e){return Ne(2,O,e,O,O,O,O,O,O,O,O,O)}var H0=lr(2),q0=lr(3),sR=lr(1),rR=lr(0),aR=lr(4),iR=lr(5),oR=lr(6),lR=lr(7);function cR(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return O}}function cr(e){let t="",s=0,a;for(let o=0,c=e.length;o<c;o++)a=cR(e[o]),a&&(t+=e.slice(s,o)+a,s=o+1);return s===0?t=e:t+=e.slice(s),t}function uR(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function ur(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,uR)}var Gl="__SEROVAL_REFS__",V0=new Map,Qa=new Map;function G0(e){return V0.has(e)}function dR(e){return Qa.has(e)}function hR(e){if(G0(e))return V0.get(e);throw new qR(e)}function fR(e){if(dR(e))return Qa.get(e);throw new VR(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Gl,{value:Qa,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Gl,{value:Qa,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Gl,{value:Qa,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Gl,{value:Qa,configurable:!0,writable:!1,enumerable:!1});function ff(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function pR(e){let t=tR[ff(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function K0(e,t){let s=pR(e),a=Object.getOwnPropertyNames(e);for(let o=0,c=a.length,u;o<c;o++)u=a[o],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(s=s||{},s[u]=e[u]):(s=s||{},s[u]=e[u]));return s}function F0(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}
12function mR(e){switch(e){case Number.POSITIVE_INFINITY:return iR;case Number.NEGATIVE_INFINITY:return oR}return e!==e?lR:Object.is(e,-0)?aR:Ne(0,O,e,O,O,O,O,O,O,O,O,O)}function Y0(e){return Ne(1,O,cr(e),O,O,O,O,O,O,O,O,O)}function gR(e){return Ne(3,O,""+e,O,O,O,O,O,O,O,O,O)}function yR(e){return Ne(4,e,O,O,O,O,O,O,O,O,O,O)}function vR(e,t){let s=t.valueOf();return Ne(5,e,s!==s?"":t.toISOString(),O,O,O,O,O,O,O,O,O)}function bR(e,t){return Ne(6,e,O,cr(t.source),t.flags,O,O,O,O,O,O,O)}function _R(e,t){return Ne(17,e,$0[t],O,O,O,O,O,O,O,O,O)}function wR(e,t){return Ne(18,e,cr(hR(t)),O,O,O,O,O,O,O,O,O)}function SR(e,t,s){return Ne(25,e,s,cr(t),O,O,O,O,O,O,O,O)}function ER(e,t,s){return Ne(9,e,O,O,O,O,O,s,O,O,F0(t),O)}function RR(e,t){return Ne(21,e,O,O,O,O,O,O,t,O,O,O)}function TR(e,t,s){return Ne(15,e,O,t.constructor.name,O,O,O,O,s,t.byteOffset,O,t.length)}function AR(e,t,s){return Ne(16,e,O,t.constructor.name,O,O,O,O,s,t.byteOffset,O,t.byteLength)}function OR(e,t,s){return Ne(20,e,O,O,O,O,O,O,s,t.byteOffset,O,t.byteLength)}function xR(e,t,s){return Ne(13,e,ff(t),O,cr(t.message),s,O,O,O,O,O,O)}function CR(e,t,s){return Ne(14,e,ff(t),O,cr(t.message),s,O,O,O,O,O,O)}function kR(e,t){return Ne(7,e,O,O,O,O,O,t,O,O,O,O)}function PR(e,t){return Ne(28,O,O,O,O,O,O,[e,t],O,O,O,O)}function jR(e,t){return Ne(30,O,O,O,O,O,O,[e,t],O,O,O,O)}function MR(e,t,s){return Ne(31,e,O,O,O,O,O,s,t,O,O,O)}function DR(e,t){return Ne(32,e,O,O,O,O,O,O,t,O,O,O)}function NR(e,t){return Ne(33,e,O,O,O,O,O,O,t,O,O,O)}function LR(e,t){return Ne(34,e,O,O,O,O,O,O,t,O,O,O)}function UR(e,t,s,a){return Ne(35,e,s,O,O,O,O,t,O,O,O,a)}var zR={parsing:1,serialization:2,deserialization:3};function IR(e){return`Seroval Error (step: ${zR[e]})`}var BR=(e,t)=>IR(e),Q0=class extends Error{constructor(e,t){super(BR(e)),this.cause=t}},Yy=class extends Q0{constructor(e){super("parsing",e)}},$R=class extends Q0{constructor(e){super("deserialization",e)}};function Rs(e){return`Seroval Error (specific: ${e})`}var zc=class extends Error{constructor(t){super(Rs(1)),this.value=t}},J0=class extends Error{constructor(t){super(Rs(2))}},HR=class extends Error{constructor(e){super(Rs(3))}},Ao=class extends Error{constructor(e){super(Rs(4))}},qR=class extends Error{constructor(e){super(Rs(5)),this.value=e}},VR=class extends Error{constructor(e){super(Rs(6))}},GR=class extends Error{constructor(e){super(Rs(7))}},dr=class extends Error{constructor(e){super(Rs(8))}},KR=class extends Error{constructor(t){super(Rs(9))}},FR=class{constructor(e,t){this.value=e,this.replacement=t}},Ic=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,s)=>{e.s=t,e.f=s}),e},YR=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},QR=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Ic.toString();YR.toString();QR.toString();var JR=()=>{let e=[],t=[],s=!0,a=!1,o=0,c=(p,m,y)=>{for(y=0;y<o;y++)t[y]&&t[y][m](p)},u=(p,m,y,g)=>{for(m=0,y=e.length;m<y;m++)g=e[m],!s&&m===y-1?p[a?"return":"throw"](g):p.next(g)},h=(p,m)=>(s&&(m=o++,t[m]=p),u(p),()=>{s&&(t[m]=t[o],t[o--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>h(p),next:p=>{s&&(e.push(p),c(p,"next"))},throw:p=>{s&&(e.push(p),c(p,"throw"),s=!1,a=!1,t.length=0)},return:p=>{s&&(e.push(p),c(p,"return"),s=!1,a=!0,t.length=0)}}},XR=e=>t=>()=>{let s=0,a={[e]:()=>a,next:()=>{if(s>t.d)return{done:!0,value:void 0};let o=s++,c=t.v[o];if(o===t.t)throw c;return{done:o===t.d,value:c}}};return a},ZR=(e,t)=>s=>()=>{let a=0,o=-1,c=!1,u=[],h=[],p=(y=0,g=h.length)=>{for(;y<g;y++)h[y].s({done:!0,value:void 0})};s.on({next:y=>{let g=h.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw:y=>{let g=h.shift();g&&g.f(y),p(),o=u.length,c=!0,u.push(y)},return:y=>{let g=h.shift();g&&g.s({done:!0,value:y}),p(),o=u.length,u.push(y)}});let m={[e]:()=>m,next:()=>{if(o===-1){let b=a++;if(b>=u.length){let _=t();return h.push(_),_.p}return{done:!1,value:u[b]}}if(a>o)return{done:!0,value:void 0};let y=a++,g=u[y];if(y!==o)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return m},X0=e=>{let t=atob(e),s=t.length,a=new Uint8Array(s);for(let o=0;o<s;o++)a[o]=t.charCodeAt(o);return a.buffer};X0.toString();
12function WR(e){return"__SEROVAL_SEQUENCE__"in e}function Z0(e,t,s){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:s}}function eT(e){let t=[],s=-1,a=-1,o=e[Es]();for(;;)try{let c=o.next();if(t.push(c.value),c.done){a=t.length-1;break}}catch(c){s=t.length,t.push(c)}return Z0(t,s,a)}var tT=XR(Es);function nT(e){return tT(e)}var sT={},rT={},aT={0:{},1:{},2:{},3:{},4:{},5:{}};function Bc(e){return"__SEROVAL_STREAM__"in e}function Qr(){return JR()}function iT(e){let t=Qr(),s=e[Ss]();async function a(){try{let o=await s.next();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var oT=ZR(Ss,Ic);function lT(e){return oT(e)}async function cT(e){try{return[1,await e]}catch(t){return[0,t]}}function uT(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function gc(e,t){e.marked.add(t)}function dT(e,t){let s=e.refs.size;return e.refs.set(t,s),s}function $c(e,t){let s=e.refs.get(t);return s!=null?(gc(e,s),{type:1,value:yR(s)}):{type:0,value:dT(e,t)}}function pf(e,t){let s=$c(e,t);return s.type===1?s:G0(t)?{type:2,value:wR(s.value,t)}:s}function Hr(e,t){let s=pf(e,t);if(s.type!==0)return s.value;if(t in $0)return _R(s.value,t);throw new zc(t)}function Hc(e,t){let s=$c(e,aT[t]);return s.type===1?s.value:Ne(26,s.value,t,O,O,O,O,O,O,O,O,O)}function hT(e){let t=$c(e,sT);return t.type===1?t.value:Ne(27,t.value,O,O,O,O,O,O,Hr(e,Es),O,O,O)}function fT(e){let t=$c(e,rT);return t.type===1?t.value:Ne(29,t.value,O,O,O,O,O,[Hc(e,1),Hr(e,Ss)],O,O,O,O)}function pT(e,t,s,a){return Ne(s?11:10,e,O,O,O,a,O,O,O,O,F0(t),O)}function mT(e,t,s,a){return Ne(8,t,O,O,O,O,{k:s,v:a},O,Hc(e,0),O,O,O)}function gT(e,t,s){let a=new Uint8Array(s),o="";for(let c=0,u=a.length;c<u;c++)o+=String.fromCharCode(a[c]);return Ne(19,t,cr(btoa(o)),O,O,O,O,O,Hc(e,5),O,O,O)}function yT(e,t){return{base:uT(e,t),child:void 0}}var vT=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return pt(this._p,this.depth,e)}};async function bT(e,t,s){let a=[];for(let o=0,c=s.length;o<c;o++)o in s?a[o]=await pt(e,t,s[o]):a[o]=0;return a}async function _T(e,t,s,a){return ER(s,a,await bT(e,t,a))}async function mf(e,t,s){let a=Object.entries(s),o=[],c=[];for(let u=0,h=a.length;u<h;u++)o.push(cr(a[u][0])),c.push(await pt(e,t,a[u][1]));return Es in s&&(o.push(Hr(e.base,Es)),c.push(PR(hT(e.base),await pt(e,t,eT(s))))),Ss in s&&(o.push(Hr(e.base,Ss)),c.push(jR(fT(e.base),await pt(e,t,iT(s))))),Wa in s&&(o.push(Hr(e.base,Wa)),c.push(Y0(s[Wa]))),Za in s&&(o.push(Hr(e.base,Za)),c.push(s[Za]?H0:q0)),{k:o,v:c}}async function yh(e,t,s,a,o){return pT(s,a,o,await mf(e,t,a))}async function wT(e,t,s,a){return RR(s,await pt(e,t,a.valueOf()))}async function ST(e,t,s,a){return TR(s,a,await pt(e,t,a.buffer))}async function ET(e,t,s,a){return AR(s,a,await pt(e,t,a.buffer))}async function RT(e,t,s,a){return OR(s,a,await pt(e,t,a.buffer))}async function Qy(e,t,s,a){let o=K0(a,e.base.features);return xR(s,a,o?await mf(e,t,o):O)}async function TT(e,t,s,a){let o=K0(a,e.base.features);return CR(s,a,o?await mf(e,t,o):O)}async function AT(e,t,s,a){let o=[],c=[];for(let[u,h]of a.entries())o.push(await pt(e,t,u)),c.push(await pt(e,t,h));return mT(e.base,s,o,c)}async function OT(e,t,s,a){let o=[];for(let c of a.keys())o.push(await pt(e,t,c));return kR(s,o)}async function W0(e,t,s,a){let o=e.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){let h=o[c];if(h.parse.async&&h.test(a))return SR(s,h.tag,await h.parse.async(a,new vT(e,t),{id:s}))}return O}async function xT(e,t,s,a){let[o,c]=await cT(a);return Ne(12,s,o,O,O,O,O,O,await pt(e,t,c),O,O,O)}function CT(e,t,s,a,o){let c=[],u=s.on({next:h=>{gc(this.base,t),pt(this,e,h).then(p=>{c.push(DR(t,p))},p=>{o(p),u()})},throw:h=>{gc(this.base,t),pt(this,e,h).then(p=>{c.push(NR(t,p)),a(c),u()},p=>{o(p),u()})},return:h=>{gc(this.base,t),pt(this,e,h).then(p=>{c.push(LR(t,p)),a(c),u()},p=>{o(p),u()})}})}async function kT(e,t,s,a){return MR(s,Hc(e.base,4),await new Promise(CT.bind(e,t,s,a)))}async function PT(e,t,s,a){let o=[];for(let c=0,u=a.v.length;c<u;c++)o[c]=await pt(e,t,a.v[c]);return UR(s,o,a.t,a.d)}async function jT(e,t,s,a){if(Array.isArray(a))return _T(e,t,s,a);if(Bc(a))return kT(e,t,s,a);if(WR(a))return PT(e,t,s,a);let o=a.constructor;if(o===FR)return pt(e,t,a.replacement);let c=await W0(e,t,s,a);if(c)return c;switch(o){case Object:return yh(e,t,s,a,!1);case O:return yh(e,t,s,a,!0);case Date:return vR(s,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Qy(e,t,s,a);case Number:case Boolean:case String:case BigInt:return wT(e,t,s,a);case ArrayBuffer:return gT(e.base,s,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return ST(e,t,s,a);case DataView:return RT(e,t,s,a);case Map:return AT(e,t,s,a);
12case Set:return OT(e,t,s,a)}if(o===Promise||a instanceof Promise)return xT(e,t,s,a);let u=e.base.features;if(u&32&&o===RegExp)return bR(s,a);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return ET(e,t,s,a)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||a instanceof AggregateError))return TT(e,t,s,a);if(a instanceof Error)return Qy(e,t,s,a);if(Es in a||Ss in a)return yh(e,t,s,a,!!o);throw new zc(a)}async function MT(e,t,s){let a=pf(e.base,s);if(a.type!==0)return a.value;let o=await W0(e,t,a.value,s);if(o)return o;throw new zc(s)}async function pt(e,t,s){switch(typeof s){case"boolean":return s?H0:q0;case"undefined":return sR;case"string":return Y0(s);case"number":return mR(s);case"bigint":return gR(s);case"object":{if(s){let a=pf(e.base,s);return a.type===0?await jT(e,t+1,a.value,s):a.value}return rR}case"symbol":return Hr(e.base,s);case"function":return MT(e,t,s);default:throw new zc(s)}}async function DT(e,t){try{return await pt(e,0,t)}catch(s){throw s instanceof Yy?s:new Yy(s)}}var NT=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(NT||{});function eb(e,t){for(let s=0,a=t.length;s<a;s++){let o=t[s];e.has(o)||(e.add(o),o.extends&&eb(e,o.extends))}}function tb(e){if(e){let t=new Set;return eb(t,e),[...t]}}function LT(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new GR(e)}}var UT=1e6,zT=1e4,IT=2e4;function nb(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var BT=1e3;function $T(e,t){var s;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(s=t.features)!=null?s:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||BT}}function HT(e){return{mode:2,base:$T(2,e),child:O}}var qT=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Ge(this._p,this.depth,e)}};function sb(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new dr({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function VT(e,t,s){return sb(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,s),s}function GT(e,t,s){return sb(e.base,t),e.base.refs.set(t,s),s}function mt(e,t,s){return e.mode===1?VT(e,t,s):GT(e,t,s)}function Nh(e,t,s){if(Object.hasOwn(t,s))return t[s];throw new dr(e)}function KT(e,t){return mt(e,t.i,fR(ur(t.s)))}function FT(e,t,s){let a=s.a,o=a.length,c=mt(e,s.i,new Array(o));for(let u=0,h;u<o;u++)h=a[u],h&&(c[u]=Ge(e,t,h));return nb(c,s.o),c}function YT(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function QT(e){switch(e){case Ss:case Za:case Wa:case Es:return!0;default:return!1}}function Jy(e,t,s){YT(t)?e[t]=s:Object.defineProperty(e,t,{value:s,configurable:!0,enumerable:!0,writable:!0})}function JT(e,t,s,a,o){if(typeof a=="string")Jy(s,ur(a),Ge(e,t,o));else{let c=Ge(e,t,a);switch(typeof c){case"string":Jy(s,c,Ge(e,t,o));break;case"symbol":QT(c)&&(s[c]=Ge(e,t,o));break;default:throw new dr(a)}}}function rb(e,t,s,a){let o=s.k;if(o.length>0)for(let c=0,u=s.v,h=o.length;c<h;c++)JT(e,t,a,o[c],u[c]);return a}function XT(e,t,s){let a=mt(e,s.i,s.t===10?{}:Object.create(null));return rb(e,t,s.p,a),nb(a,s.o),a}function ZT(e,t){return mt(e,t.i,new Date(t.s))}function WT(e,t){if(e.base.features&32){let s=ur(t.c);if(s.length>IT)throw new dr(t);return mt(e,t.i,new RegExp(s,t.m))}throw new J0(t)}function e1(e,t,s){let a=mt(e,s.i,new Set);for(let o=0,c=s.a,u=c.length;o<u;o++)a.add(Ge(e,t,c[o]));return a}function t1(e,t,s){let a=mt(e,s.i,new Map);for(let o=0,c=s.e.k,u=s.e.v,h=c.length;o<h;o++)a.set(Ge(e,t,c[o]),Ge(e,t,u[o]));return a}function n1(e,t){if(t.s.length>UT)throw new dr(t);return mt(e,t.i,X0(ur(t.s)))}function s1(e,t,s){var a;let o=LT(s.c),c=Ge(e,t,s.f),u=(a=s.b)!=null?a:0;if(u<0||u>c.byteLength)throw new dr(s);return mt(e,s.i,new o(c,u,s.l))}function r1(e,t,s){var a;let o=Ge(e,t,s.f),c=(a=s.b)!=null?a:0;if(c<0||c>o.byteLength)throw new dr(s);return mt(e,s.i,new DataView(o,c,s.l))}function ab(e,t,s,a){if(s.p){let o=rb(e,t,s.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(o))}return a}function a1(e,t,s){let a=mt(e,s.i,new AggregateError([],ur(s.m)));return ab(e,t,s,a)}function i1(e,t,s){let a=Nh(s,nR,s.s),o=mt(e,s.i,new a(ur(s.m)));return ab(e,t,s,o)}function o1(e,t,s){let a=Ic(),o=mt(e,s.i,a.p),c=Ge(e,t,s.f);return s.s?a.s(c):a.f(c),o}
12function l1(e,t,s){return mt(e,s.i,Object(Ge(e,t,s.f)))}function c1(e,t,s){let a=e.base.plugins;if(a){let o=ur(s.c);for(let c=0,u=a.length;c<u;c++){let h=a[c];if(h.tag===o)return mt(e,s.i,h.deserialize(s.s,new qT(e,t),{id:s.i}))}}throw new HR(s.c)}function u1(e,t){return mt(e,t.i,mt(e,t.s,Ic()).p)}function d1(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.s(Ge(e,t,s.a[1])),O;throw new Ao("Promise")}function h1(e,t,s){let a=e.base.refs.get(s.i);if(a)return a.f(Ge(e,t,s.a[1])),O;throw new Ao("Promise")}function f1(e,t,s){Ge(e,t,s.a[0]);let a=Ge(e,t,s.a[1]);return nT(a)}function p1(e,t,s){Ge(e,t,s.a[0]);let a=Ge(e,t,s.a[1]);return lT(a)}function m1(e,t,s){let a=mt(e,s.i,Qr()),o=s.a,c=o.length;if(c)for(let u=0;u<c;u++)Ge(e,t,o[u]);return a}function g1(e,t,s){let a=e.base.refs.get(s.i);if(a&&Bc(a))return a.next(Ge(e,t,s.f)),O;throw new Ao("Stream")}function y1(e,t,s){let a=e.base.refs.get(s.i);if(a&&Bc(a))return a.throw(Ge(e,t,s.f)),O;throw new Ao("Stream")}function v1(e,t,s){let a=e.base.refs.get(s.i);if(a&&Bc(a))return a.return(Ge(e,t,s.f)),O;throw new Ao("Stream")}function b1(e,t,s){return Ge(e,t,s.f),O}function _1(e,t,s){return Ge(e,t,s.a[1]),O}function w1(e,t,s){let a=mt(e,s.i,Z0([],s.s,s.l));for(let o=0,c=s.a.length;o<c;o++)a.v[o]=Ge(e,t,s.a[o]);return a}function Ge(e,t,s){if(t>e.base.depthLimit)throw new KR(e.base.depthLimit);switch(t+=1,s.t){case 2:return Nh(s,eR,s.s);case 0:return Number(s.s);case 1:return ur(String(s.s));case 3:if(String(s.s).length>zT)throw new dr(s);return BigInt(s.s);case 4:return e.base.refs.get(s.i);case 18:return KT(e,s);case 9:return FT(e,t,s);case 10:case 11:return XT(e,t,s);case 5:return ZT(e,s);case 6:return WT(e,s);case 7:return e1(e,t,s);case 8:return t1(e,t,s);case 19:return n1(e,s);case 16:case 15:return s1(e,t,s);case 20:return r1(e,t,s);case 14:return a1(e,t,s);case 13:return i1(e,t,s);case 12:return o1(e,t,s);case 17:return Nh(s,WE,s.s);case 21:return l1(e,t,s);case 25:return c1(e,t,s);case 22:return u1(e,s);case 23:return d1(e,t,s);case 24:return h1(e,t,s);case 28:return f1(e,t,s);case 30:return p1(e,t,s);case 31:return m1(e,t,s);case 32:return g1(e,t,s);case 33:return y1(e,t,s);case 34:return v1(e,t,s);case 27:return b1(e,t,s);case 29:return _1(e,t,s);case 35:return w1(e,t,s);default:throw new J0(s)}}function S1(e,t){try{return Ge(e,0,t)}catch(s){throw new $R(s)}}var E1=()=>T;E1.toString();function Xy(e,t){let s=tb(t.plugins),a=HT({plugins:s,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return S1(a,e)}async function R1(e,t={}){let s=tb(t.plugins),a=yT(1,{plugins:s,disabledFeatures:t.disabledFeatures});return{t:await DT(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function T1(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,s,a){return{v:s.parse(e.toSerializable(t))}},async async(t,s,a){return{v:await s.parse(e.toSerializable(t))}},stream(t,s,a){return{v:s.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,s,a){return e.fromSerializable(s.deserialize(t.v))}}}var A1=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Rc=globalThis.Buffer,ib=!!Rc&&typeof Rc.from=="function";function ob(e){if(e.length===0)return"";if(ib)return Rc.from(e).toString("base64");const t=32768,s=[];for(let a=0;a<e.length;a+=t){const o=e.subarray(a,a+t);s.push(String.fromCharCode.apply(null,o))}return btoa(s.join(""))}function lb(e){if(e.length===0)return new Uint8Array(0);if(ib){const a=Rc.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),s=new Uint8Array(t.length);for(let a=0;a<t.length;a++)s[a]=t.charCodeAt(a);return s}var eo=Object.create(null),to=Object.create(null),O1=e=>new ReadableStream({start(t){e.on({next(s){try{t.enqueue(lb(s))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),x1=new TextEncoder,C1=e=>new ReadableStream({start(t){e.on({next(s){try{typeof s=="string"?t.enqueue(x1.encode(s)):t.enqueue(lb(s.$b64))}catch{}},throw(s){t.error(s)},return(){try{t.close()}catch{}}})}}),k1="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",P1="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function Zy(e){const t=Qr(),s=e.getReader();return(async()=>{try{for(;;){const{done:a,value:o}=await s.read();if(a){t.return(void 0);break}t.next(ob(o))}}catch(a){t.throw(a)}finally{s.releaseLock()}})(),t}function Wy(e){const t=Qr(),s=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:c}=await s.read();if(o){try{const u=a.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=a.decode(c,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:ob(c)})}}}catch(o){t.throw(o)}finally{s.releaseLock()}})(),t}var j1={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===eo},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return k1},deserialize(e,t,s){return eo}},{tag:"tss/RawStreamFactoryText",test(e){return e===to},parse:{sync(e,t,s){return{}},async async(e,t,s){return{}},stream(e,t,s){return{}}},serialize(e,t,s){return P1},deserialize(e,t,s){return to}}],test(e){return e instanceof A1},parse:{sync(e,t,s){const a=e.hint==="text"?to:eo;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(Qr())}},async async(e,t,s){const a=e.hint==="text"?to:eo,o=e.hint==="text"?Wy(e.stream):Zy(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(o)}},stream(e,t,s){const a=e.hint==="text"?to:eo,o=e.hint==="text"?Wy(e.stream):Zy(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(o)}}},serialize(e,t,s){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,s){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?C1(a):O1(a)}};function M1(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,s,a){return e(typeof s?.deserialize=="function"?s.deserialize(t.streamId):t.streamId)}}}var D1={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},Ws={},cb=e=>new ReadableStream({start:t=>{e.on({next:s=>{try{t.enqueue(s)}catch{}},throw:s=>{t.error(s)},return:()=>{try{t.close()}catch{}}})}}),N1={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Ws},parse:{sync(){return Ws},async async(){return await Promise.resolve(Ws)},stream(){return Ws}},serialize(){return cb.toString()},deserialize(){return Ws}};function ev(e){let t=Qr(),s=e.getReader();async function a(){try{let o=await s.read();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var L1={tag:"seroval/plugins/web/ReadableStream",extends:[N1],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Ws),stream:t.parse(Qr())}},async async(e,t){return{factory:await t.parse(Ws),stream:await t.parse(ev(e))}},stream(e,t){return{factory:t.parse(Ws),stream:t.parse(ev(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let s=t.deserialize(e.stream);return cb(s)}},U1=L1,z1=[D1,j1,U1];function I1(){return[...v0()?.serializationAdapters?.map(T1)??[],...z1]}var tv=new TextDecoder,B1=new Uint8Array(0),nv=16*1024*1024,sv=32*1024*1024,rv=1024,av=1e5;function $1(e){const t=new Map,s=new Map,a=new Set;let o=!1,c=null,u=0,h;const p=new ReadableStream({start(g){h=g},cancel(){o=!0;try{c?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),s.clear(),a.clear()}});function m(g){const b=s.get(g);if(b)return b;if(a.has(g))return new ReadableStream({start(w){w.close()}});if(s.size>
12=rv)throw new Error(`Too many raw streams in framed response (max ${rv})`);const _=new ReadableStream({start(w){t.set(g,w)},cancel(){a.add(g),t.delete(g),s.delete(g)}});return s.set(g,_),_}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();c=g;const b=[];let _=0;function w(){if(_<9)return null;const R=b[0];if(R.length>=9)return{type:R[0],streamId:(R[1]<<24|R[2]<<16|R[3]<<8|R[4])>>>0,length:(R[5]<<24|R[6]<<16|R[7]<<8|R[8])>>>0};const A=new Uint8Array(9);let j=0,k=9;for(let D=0;D<b.length&&k>0;D++){const Q=b[D],G=Math.min(Q.length,k);A.set(Q.subarray(0,G),j),j+=G,k-=G}return{type:A[0],streamId:(A[1]<<24|A[2]<<16|A[3]<<8|A[4])>>>0,length:(A[5]<<24|A[6]<<16|A[7]<<8|A[8])>>>0}}function E(R){if(R===0)return B1;const A=new Uint8Array(R);let j=0,k=R;for(;k>0&&b.length>0;){const D=b[0];if(!D)break;const Q=Math.min(D.length,k);A.set(D.subarray(0,Q),j),j+=Q,k-=Q,Q===D.length?b.shift():b[0]=D.subarray(Q)}return _-=R,A}try{for(;;){const{done:R,value:A}=await g.read();if(o||R)break;if(A){if(_+A.length>sv)throw new Error(`Framed response buffer exceeded ${sv} bytes`);for(b.push(A),_+=A.length;;){const j=w();if(!j)break;const{type:k,streamId:D,length:Q}=j;if(k!==vs.JSON&&k!==vs.CHUNK&&k!==vs.END&&k!==vs.ERROR)throw new Error(`Unknown frame type: ${k}`);if(k===vs.JSON){if(D!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(D===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(Q>nv)throw new Error(`Frame payload too large: ${Q} bytes (max ${nv})`);const G=9+Q;if(_<G)break;if(++u>av)throw new Error(`Too many frames in framed response (max ${av})`);E(9);const I=E(Q);switch(k){case vs.JSON:try{h.enqueue(tv.decode(I))}catch{}break;case vs.CHUNK:{const $=y(D);$&&$.enqueue(I);break}case vs.END:{const $=y(D);if(a.add(D),$){try{$.close()}catch{}t.delete(D)}break}case vs.ERROR:{const $=y(D);if(a.add(D),$){const J=tv.decode(I);$.error(new Error(J)),t.delete(D)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{h.close()}catch{}t.forEach(R=>{try{R.close()}catch{}}),t.clear()}catch(R){try{h.error(R)}catch{}t.forEach(A=>{try{A.error(R)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}c=null}})(),{getOrCreateStream:m,jsonChunks:p}}var mo=null;async function Lh(e){e.length>0&&await Promise.allSettled(e)}var H1=Object.prototype.hasOwnProperty;function ub(e){for(const t in e)if(H1.call(e,t))return!0;return!1}async function q1(e,t,s){mo||(mo=I1());const a=t[0],o=a.fetch??s,c=a.data instanceof FormData?"formData":"payload",u=a.headers?new Headers(a.headers):new Headers;if(u.set("x-tsr-serverFn","true"),c==="payload"&&u.set("accept",`${US}, application/x-ndjson, application/json`),a.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const p=await db(a);if(p!==void 0){const m=R0({payload:p});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let h;if(a.method==="POST"){const p=await V1(a);p?.contentType&&u.set("content-type",p.contentType),h=p?.body}return await G1(async()=>o(e,{method:a.method,headers:u,signal:a.signal,body:h}))}async function db(e){let t=!1;const s={};if(e.data!==void 0&&(t=!0,s.data=e.data),e.context&&ub(e.context)&&(t=!0,s.context=e.context),t)return hb(s)}async function hb(e){return JSON.stringify(await Promise.resolve(R1(e,{plugins:mo})))}async function V1(e){if(e.data instanceof FormData){let s;return e.context&&ub(e.context)&&(s=await hb(e.context)),s!==void 0&&e.data.set(LS,s),{body:e.data}}const t=await db(e);if(t)return{body:t,contentType:"application/json"}}async function G1(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const s=t.headers.get("content-type");if(s||rn(),t.headers.get("x-tss-serialized")){let a;if(s.includes("application/x-tss-framed")){if(BS(s),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:c}=$1(t.body),u=[M1(o),...mo||[]],h=new Map;a=await K1({jsonStream:c,onMessage:p=>Xy(p,{refs:h,plugins:u}),onError(p,m){console.error(p,m)}})}else if(s.includes("application/json")){const o=await t.json(),c=[];a=Xy(o,{plugins:mo}),await Lh(c)}if(a||rn(),a instanceof Error)throw a;return a}if(s.includes("application/json")){const a=await t.json(),o=RE(a);if(o)throw o;if(St(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function K1({jsonStream:e,onMessage:t,onError:s}){const a=e.getReader(),{value:o,done:c}=await a.read();if(c||!o)throw new Error("Stream ended before first object");const u=JSON.parse(o);let h=!1;const p=(async()=>{try{for(;;){const{value:g,done:b}=await a.read();if(b)break;
12if(g)try{const _=[];try{t(JSON.parse(g))}finally{}await Lh(_)}catch(_){s?.(`Invalid JSON: ${g}`,_)}}}catch(g){h||s?.("Stream processing error:",g)}})();let m;const y=[];try{m=t(u)}catch(g){throw h=!0,a.cancel().catch(()=>{}),g}return await Lh(y),Promise.resolve(m).catch(()=>{h=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),m}function F1(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const c=v0()?.serverFns?.fetch;return q1(t,o,c??fetch)},{url:t,serverFnMeta:{id:e},[jh]:!0})}var Y1={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(jh in e)?!1:!!e[jh],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>F1(e)};function iv(e){return e.replaceAll("\0","/").replaceAll("�","/")}function Q1(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function J1(e){window.$_TSR||rn();const t=e.options.serializationAdapters;if(t?.length){const R=new Map;t.forEach(A=>{R.set(A.key,A.fromSerializable)}),window.$_TSR.t=R,window.$_TSR.buffer.forEach(A=>A())}window.$_TSR.initialized=!0,window.$_TSR.router||rn();const s=window.$_TSR.router;s.matches.forEach(R=>{R.i=iv(R.i)}),s.lastMatchId&&(s.lastMatchId=iv(s.lastMatchId));const{manifest:a,dehydratedData:o,lastMatchId:c}=s;e.ssr={manifest:a};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const h=e.matchRoutes(e.stores.location.get()),p=Promise.all(h.map(R=>e.loadRouteChunk(e.looseRoutesById[R.routeId])));function m(R){const A=e.looseRoutesById[R.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(A){const j=Yr();R._nonReactive.minPendingPromise=j,R._forcePending=!0,setTimeout(()=>{j.resolve(),e.updateMatch(R.id,k=>(k._nonReactive.minPendingPromise=void 0,{...k,_forcePending:void 0}))},A)}}function y(R){const A=e.looseRoutesById[R.routeId];A&&(A.options.ssr=R.ssr)}let g;h.forEach(R=>{const A=s.matches.find(j=>j.i===R.id);if(!A){R._nonReactive.dehydrated=!1,R.ssr=!1,y(R);return}Q1(R,A),y(R),R._nonReactive.dehydrated=R.ssr!==!1,(R.ssr==="data-only"||R.ssr===!1)&&g===void 0&&(g=R.index,m(R))}),e.stores.setMatches(h),await e.options.hydrate?.(o);const b=e.stores.matches.get(),_=e.stores.location.get();await Promise.all(b.map(async R=>{try{const A=e.looseRoutesById[R.routeId],j=b[R.index-1]?.context??e.options.context;if(A.options.context){const G={deps:R.loaderDeps,params:R.params,context:j??{},location:_,navigate:I=>e.navigate({...I,_fromLocation:_}),buildLocation:e.buildLocation,cause:R.cause,abortController:R.abortController,preload:!1,matches:h,routeId:A.id};R.__routeContext=A.options.context(G)??void 0}R.context={...j,...R.__routeContext,...R.__beforeLoadContext};const k={ssr:e.options.ssr,matches:b,match:R,params:R.params,loaderData:R.loaderData},D=await A.options.head?.(k),Q=await A.options.scripts?.(k);R.meta=D?.meta,R.links=D?.links,R.headScripts=D?.scripts,R.styles=D?.styles,R.scripts=Q}catch(A){if(St(A))R.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${R.routeId}`,A);else throw R.error=A,console.error(`Error during hydration for route ${R.routeId}:`,A),A}}));const w=h[h.length-1].id!==c;if(!h.some(R=>R.ssr===!1)&&!w)return h.forEach(R=>{R._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const E=Promise.resolve().then(()=>e.load()).catch(R=>{console.error("Error during router hydration:",R)});if(w){const R=h[1];R||rn(),m(R),R._displayPending=!0,R._nonReactive.displayPendingPromise=E,E.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(R.id,A=>({...A,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Tc=ne.use,ro=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function vh(e){const t=ne.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function X1(e,t,s={},a={}){ne.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([c])=>{t(c)},s);return o.observe(e.current),()=>{o.disconnect()}},[t,s,a.disabled,e])}function Z1(e){const t=ne.useRef(null);return ne.useImperativeHandle(e,()=>t.current,[]),t}function W1({promise:e}){if(Tc)return Tc(e);const t=GE(e);if(t[Qn].status==="pending")throw t;if(t[Qn].status==="error")throw t[Qn].error;return t[Qn].data}function eA(e){const t=X.jsx(tA,{...e});
12return e.fallback?X.jsx(ne.Suspense,{fallback:e.fallback,children:t}):t}function tA(e){const t=W1(e);return e.children(t)}function gf(e){const t=e.errorComponent??yf;return X.jsx(nA,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:a})=>s?ne.createElement(t,{error:s,reset:a}):e.children})}var nA=class extends ne.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const s=e.getResetKey();return t.error&&t.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function yf({error:e}){const[t,s]=ne.useState(!1);return X.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[X.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),X.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(a=>!a),children:t?"Hide Error":"Show Error"})]}),X.jsx("div",{style:{height:".25rem"}}),t?X.jsx("div",{children:X.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?X.jsx("code",{children:e.message}):null})}):null]})}function sA({children:e,fallback:t=null}){return vf()?X.jsx(W.Fragment,{children:e}):X.jsx(W.Fragment,{children:t})}function vf(){return W.useSyncExternalStore(rA,()=>!0,()=>!1)}function rA(){return()=>{}}var fb=ne.createContext(null);function jt(e){return ne.useContext(fb)}var qc=ne.createContext(void 0),aA=ne.createContext(void 0),Ze=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ze||{});function iA({update:e,notify:t,unwatched:s}){return{link:a,unlink:o,propagate:c,checkDirty:u,shallowPropagate:h};function a(m,y,g){const b=y.depsTail;if(b!==void 0&&b.dep===m)return;const _=b!==void 0?b.nextDep:y.deps;if(_!==void 0&&_.dep===m){_.version=g,y.depsTail=_;return}const w=m.subsTail;if(w!==void 0&&w.version===g&&w.sub===y)return;const E=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=E),b!==void 0?b.nextDep=E:y.deps=E,w!==void 0?w.nextSub=E:m.subs=E}function o(m,y=m.sub){const g=m.dep,b=m.prevDep,_=m.nextDep,w=m.nextSub,E=m.prevSub;return _!==void 0?_.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=_:y.deps=_,w!==void 0?w.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=w:(g.subs=w)===void 0&&s(g),_}function c(m){let y=m.nextSub,g;e:do{const b=m.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&p(m,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&t(b),_&1){const w=b.subs;if(w!==void 0){const E=(m=w).nextSub;E!==void 0&&(g={value:y,prev:g},y=E);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function u(m,y){let g,b=0,_=!1;e:do{const w=m.dep,E=w.flags;if(y.flags&16)_=!0;else if((E&17)===17){if(e(w)){const R=w.subs;R.nextSub!==void 0&&h(R),_=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=w.deps,y=w,++b;continue}if(!_){const R=m.nextDep;if(R!==void 0){m=R;continue}}for(;b--;){const R=y.subs,A=R.nextSub!==void 0;if(A?(m=g.value,g=g.prev):m=R,_){if(e(y)){A&&h(R),y=m.sub;continue}_=!1}else y.flags&=-33;y=m.sub;const j=m.nextDep;if(j!==void 0){m=j;continue e}}return _}while(!0)}function h(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&t(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function oA(e,t,s){const a=typeof e=="object",o=a?e:void 0;return{next:(a?e.next:e)?.bind(o),error:(a?e.error:t)?.bind(o),complete:(a?e.complete:s)?.bind(o)}}const Uh=[];let yc=0;const{link:ov,unlink:lA,propagate:cA,checkDirty:pb,shallowPropagate:lv}=iA({update(e){return e._update()},notify(e){Uh[zh++]=e,e.flags&=~Ze.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ze.Mutable|Ze.Dirty,Ac(e))}});let Kl=0,zh=0,Fn,Ih=0;function mb(e){try{++Ih,e()}finally{--Ih||gb()}}function Ac(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=lA(s,e)}function gb(){if(!(Ih>0)){for(;Kl<zh;){const e=Uh[Kl];Uh[Kl++]=void 0,e.notify()}Kl=0,zh=0}}function cv(e,t){const s=typeof e=="function",a=e,o={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?Ze.None:Ze.Mutable,get(){return Fn!==void 0&&ov(o,Fn,yc),o._snapshot},subscribe(c){const u=oA(c),h={current:!1},p=uA(()=>{o.get(),h.current?u.next?.(o._snapshot):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const u=Fn,h=t?.compare??Object.is;if(s)Fn=o,++yc,o.depsTail=void 0;else if(c===void 0)return!1;s&&(o.flags=Ze.Mutable|Ze.RecursedCheck);try{const p=o._snapshot,m=typeof c=="function"?c(p):c===void 0&&s?a(p):c;return p===void 0||!h(p,m)?(o._snapshot=m,!0):!1}finally{Fn=u,s&&(o.flags&=~Ze.RecursedCheck),Ac(o)}}};return s?(o.flags=Ze.Mutable|Ze.Dirty,o.get=function(){const c=o.flags;
12if(c&Ze.Dirty||c&Ze.Pending&&pb(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&lv(u)}}else c&Ze.Pending&&(o.flags=c&~Ze.Pending);return Fn!==void 0&&ov(o,Fn,yc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(cA(u),lv(u),gb())}},o}function uA(e){const t=()=>{const a=Fn;Fn=s,++yc,s.depsTail=void 0,s.flags=Ze.Watching|Ze.RecursedCheck;try{return e()}finally{Fn=a,s.flags&=~Ze.RecursedCheck,Ac(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ze.Watching|Ze.RecursedCheck,notify(){const a=this.flags;a&Ze.Dirty||a&Ze.Pending&&pb(this.deps,this)?t():this.flags=Ze.Watching},stop(){this.flags=Ze.None,this.depsTail=void 0,Ac(this)}};return t(),s}var bh={exports:{}},_h={},wh={exports:{}},Sh={};var uv;function dA(){if(uv)return Sh;uv=1;var e=To();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var s=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function h(g,b){var _=b(),w=a({inst:{value:_,getSnapsh
12ot:b}}),E=w[0].inst,R=w[1];return c(function(){E.value=_,E.getSnapshot=b,p(E)&&R({inst:E})},[g,_,b]),o(function(){return p(E)&&R({inst:E}),g(function(){p(E)&&R({inst:E})})},[g]),u(_),_}function p(g){var b=g.getSnapshot;g=g.value;try{var _=b();return!s(g,_)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Sh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Sh}var dv;function hA(){return dv||(dv=1,wh.exports=dA()),wh.exports}var hv;function fA(){if(hv)return _h;hv=1;var e=To(),t=hA();function s(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var a=typeof Object.is=="function"?Object.is:s,o=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,h=e.useMemo,p=e.useDebugValue;return _h.useSyncExternalStoreWithSelector=function(m,y,g,b,_){var w=c(null);if(w.current===null){var E={hasValue:!1,value:null};w.current=E}else E=w.current;w=h(function(){function A(G){if(!j){if(j=!0,k=G,G=b(G),_!==void 0&&E.hasValue){var I=E.value;if(_(I,G))return D=I}return D=G}if(I=D,a(k,G))return I;var $=b(G);return _!==void 0&&_(I,$)?(k=G,I):(k=G,D=$)}var j=!1,k,D,Q=g===void 0?null:g;return[function(){return A(y())},Q===null?void 0:function(){return A(Q())}]},[y,g,b,_]);var R=o(m,w[0],w[1]);return u(function(){E.hasValue=!0,E.value=R},[R]),p(R),R},_h}var fv;function pA(){return fv||(fv=1,bh.exports=fA()),bh.exports}var mA=pA();function gA(e,t){return e===t}function ht(e,t,s=gA){const a=ne.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:h}=e.subscribe(u);return h},[e]),o=ne.useCallback(()=>e?.get(),[e]);return mA.useSyncExternalStoreWithSelector(a,o,o,t,s)}var yA={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Jr(e){const t=jt(),s=ne.useContext(e.from?aA:qc),a=e.from??s,o=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,c=ne.useRef(void 0);return ht(o??yA,u=>{if((e.shouldThrow??!0)&&!u&&rn(),u===void 0)return;const h=e.select?e.select(u):u;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=Br(c.current,h);return c.current=p,p}return h})}function yb(e){return Jr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vb(e){const{select:t,...s}=e;return Jr({...s,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function bb(e){return Jr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const s=e.strict===!1?t.params:t._strictParams;return e.select?e.select(s):s}})}function _b(e){return Jr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function wb(e){const t=jt();return ne.useCallback(s=>t.navigate({...s,from:s.from??e?.from}),[e?.from,t])}function Sb(e){return Jr({...e,select:t=>e.select?e.select(t.context):t.context})}var Eb=y0();const vA=g0(Eb);function bA(e,t){const s=jt(),a=Z1(t),{activeProps:o,inactiveProps:c,activeOptions:u,to:h,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:b,startTransition:_,resetScroll:w,viewTransition:E,children:R,target:A,disabled:j,style:k,className:D,onClick:Q,onBlur:G,onFocus:I,onMouseEnter:$,onMouseLeave:J,onTouchStart:re,ignoreBlocker:se,params:fe,search:ge,hash:Ke,state:Le,mask:L,reloadDocument:Y,unsafeRelative:oe,from:Te,_fromLocation:ve,...C}=e,q=vf(),F=ne.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Z=ht(s.stores.location,Be=>Be,(Be,tt)=>Be.href===tt.href),ee=ne.useMemo(()=>{const Be={_fromLocation:Z,...F};return s.buildLocation(Be)},[s,Z,F]),ue=ee.maskedLocation?ee.maskedLocation.publicHref:ee.publicHref,Ee=ee.maskedLocation?ee.maskedLocation.external:ee.external,pe=ne.useMemo(()=>TA(ue,Ee,s.history,j),[j,Ee,ue,s.history]),je=ne.useMemo(()=>{if(pe?.external)return _c(pe.href,s.protocolAllowlist)?void 0:pe.href;if(!AA(h)&&!(typeof h!="string"||h.indexOf(":")===-1))try{return new URL(h),_c(h,s.protocolAllowlist)?void 0:h}catch{}},[h,pe,s.protocolAllowlist]),Bt=ne.useMemo(()=>
12{if(je)return!1;if(u?.exact){if(!cE(Z.pathname,ee.pathname,s.basepath))return!1}else{const Be=wc(Z.pathname,s.basepath),tt=wc(ee.pathname,s.basepath);if(!(Be.startsWith(tt)&&(Be.length===tt.length||Be[tt.length]==="/")))return!1}return(u?.includeSearch??!0)&&!nn(Z.search,ee.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?q&&Z.hash===ee.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,Z,je,q,ee.hash,ee.pathname,ee.search,s.basepath]),$t=Bt?nr(o,{})??_A:Eh,Ut=Bt?Eh:nr(c,{})??Eh,fr=[D,$t.className,Ut.className].filter(Boolean).join(" "),Ht=(k||$t.style||Ut.style)&&{...k,...$t.style,...Ut.style},[pr,Xn]=ne.useState(!1),Un=ne.useRef(!1),gn=e.reloadDocument||je?!1:p??s.options.defaultPreload,Et=m??s.options.defaultPreloadDelay??0,an=ne.useCallback(()=>{s.preloadRoute({...F,_builtLocation:ee}).catch(Be=>{console.warn(Be),console.warn(KE)})},[s,F,ee]);X1(a,ne.useCallback(Be=>{Be?.isIntersecting&&an()},[an]),RA,{disabled:!!j||gn!=="viewport"}),ne.useEffect(()=>{Un.current||!j&&gn==="render"&&(an(),Un.current=!0)},[j,an,gn]);const mr=Be=>{const tt=Be.currentTarget.getAttribute("target"),yn=A!==void 0?A:tt;if(!j&&!OA(Be)&&!Be.defaultPrevented&&(!yn||yn==="_self")&&Be.button===0){Be.preventDefault(),Eb.flushSync(()=>{Xn(!0)});const Zn=s.subscribe("onResolved",()=>{Zn(),Xn(!1)});s.navigate({...F,replace:b,resetScroll:w,hashScrollIntoView:g,startTransition:_,viewTransition:E,ignoreBlocker:se})}};if(je)return{...C,ref:a,href:je,...R&&{children:R},...A&&{target:A},...j&&{disabled:j},...k&&{style:k},...D&&{className:D},...Q&&{onClick:Q},...G&&{onBlur:G},...I&&{onFocus:I},...$&&{onMouseEnter:$},...J&&{onMouseLeave:J},...re&&{onTouchStart:re}};const gt=Be=>{if(j||gn!=="intent")return;if(!Et){an();return}const tt=Be.currentTarget;if(no.has(tt))return;const yn=setTimeout(()=>{no.delete(tt),an()},Et);no.set(tt,yn)},zn=Be=>{j||gn!=="intent"||an()},yt=Be=>{if(j||!gn||!Et)return;const tt=Be.currentTarget,yn=no.get(tt);yn&&(clearTimeout(yn),no.delete(tt))};return{...C,...$t,...Ut,href:pe?.href,ref:a,onClick:za([Q,mr]),onBlur:za([G,yt]),onFocus:za([I,gt]),onMouseEnter:za([$,gt]),onMouseLeave:za([J,yt]),onTouchStart:za([re,zn]),disabled:!!j,target:A,...Ht&&{style:Ht},...fr&&{className:fr},...j&&wA,...Bt&&SA,...q&&pr&&EA}}var Eh={},_A={className:"active"},wA={role:"link","aria-disabled":!0},SA={"data-status":"active","aria-current":"page"},EA={"data-transitioning":"transitioning"},no=new WeakMap,RA={rootMargin:"100px"},za=e=>t=>{for(const s of e)if(s){if(t.defaultPrevented)return;s(t)}};function TA(e,t,s,a){if(!a)return t?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function AA(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var bf=ne.forwardRef((e,t)=>{const{_asChild:s,...a}=e,{type:o,...c}=bA(a,t),u=typeof a.children=="function"?a.children({isActive:c["data-status"]==="active"}):a.children;if(!s){const{disabled:h,...p}=c;return ne.createElement("a",p,u)}return ne.createElement(s,c,u)});function OA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var xA=class extends P0{constructor(t){super(t),this.useMatch=s=>Jr({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>Sb({...s,from:this.id}),this.useSearch=s=>_b({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>bb({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>vb({...s,from:this.id}),this.useLoaderData=s=>yb({...s,from:this.id}),this.useNavigate=()=>wb({from:this.fullPath}),this.Link=W.forwardRef((s,a)=>X.jsx(bf,{ref:a,from:this.fullPath,...s}))}};function CA(e){return new xA(e)}function kA(){return e=>jA(e)}var PA=class extends JE{constructor(e){super(e),this.useMatch=t=>Jr({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Sb({...t,from:this.id}),this.useSearch=t=>_b({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>bb({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>vb({...t,from:this.id}),this.useLoaderData=t=>yb({...t,from:this.id}),this.useNavigate=()=>wb({from:this.fullPath}),this.Link=W.forwardRef((t,s)=>X.jsx(bf,{ref:s,from:this.fullPath,...t}))}};function jA(e){return new PA(e)}function Re(e){return new MA(e,{silent:!0}).createRoute}var MA=class{constructor(e,t){this.path=e,this.createRoute=s=>{const a=CA(s);return a.isRoot=!1,a},this.silent=t?.silent}};function we(e,t){let s,a,o,c;const u=()=>(s||(s=e().then(p=>{s=void 0,a=p[t??"default"]}).catch(p=>{if(o=p,VS(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),c=!0)}})),s),h=function(m){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(Tc)Tc(u());else throw u();return ne.createElement(a,m)};return h.preload=u,h}function DA(e){const t=jt(),s=`not-found-${ht(t.stores.location,a=>a.pathname)}-${ht(t.stores.status,a=>a)}`;return X.jsx(gf,{getResetKey:()=>s,onCatch:(a,o)=>
12{if(St(a))e.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(St(a))return e.fallback?.(a);throw a},children:e.children})}function NA(){return X.jsx("p",{children:"Not Found"})}function Va(e){return X.jsx(X.Fragment,{children:e.children})}function Rb(e,t,s){return t.options.notFoundComponent?X.jsx(t.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?X.jsx(e.options.defaultNotFoundComponent,{...s}):X.jsx(NA,{})}function LA(e){return null}function UA(){return LA(jt()),null}var Tb=ne.memo(function({matchId:t}){const s=jt(),a=s.stores.matchStores.get(t);a||rn();const o=ht(s.stores.loadedAt,u=>u),c=ht(a,u=>u);return X.jsx(zA,{router:s,matchId:t,resetKey:o,matchState:ne.useMemo(()=>{const u=c.routeId,h=s.routesById[u].parentRoute?.id;return{routeId:u,ssr:c.ssr,_displayPending:c._displayPending,parentRouteId:h}},[c._displayPending,c.routeId,c.ssr,s.routesById])})});function zA({router:e,matchId:t,resetKey:s,matchState:a}){const o=e.routesById[a.routeId],c=o.options.pendingComponent??e.options.defaultPendingComponent,u=c?X.jsx(c,{}):null,h=o.options.errorComponent??e.options.defaultErrorComponent,p=o.options.onCatch??e.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",g=(!o.isRoot||o.options.wrapInSuspense||y)&&(o.options.wrapInSuspense??c??(o.options.errorComponent?.preload||y))?ne.Suspense:Va,b=h?gf:Va,_=m?DA:Va;return X.jsxs(o.isRoot?o.options.shellComponent??Va:Va,{children:[X.jsx(qc.Provider,{value:t,children:X.jsx(g,{fallback:u,children:X.jsx(b,{getResetKey:()=>s,errorComponent:h||yf,onCatch:(w,E)=>{if(St(w))throw w.routeId??=a.routeId,w;p?.(w,E)},children:X.jsx(_,{fallback:w=>{if(w.routeId??=a.routeId,!m||w.routeId&&w.routeId!==a.routeId||!w.routeId&&
12!o.isRoot)throw w;return ne.createElement(m,w)},children:y||a._displayPending?X.jsx(sA,{fallback:u,children:X.jsx(pv,{matchId:t})}):X.jsx(pv,{matchId:t})})})})}),a.parentRouteId===Kr?X.jsxs(X.Fragment,{children:[X.jsx(IA,{resetKey:s}),e.options.scrollRestoration&&b0?X.jsx(UA,{}):null]}):null]})}function IA({resetKey:e}){const t=jt(),s=ne.useRef(void 0);return ro(()=>{const a=t.latestLocation.href;(s.current===void 0||s.current!==a)&&(t.emit({type:"onRendered",...Xa(t.stores.location.get(),t.stores.resolvedLocation.get())}),s.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var pv=ne.memo(function({matchId:t}){const s=jt(),a=(y,g)=>s.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],o=s.stores.matchStores.get(t);o||rn();const c=ht(o,y=>y),u=c.routeId,h=s.routesById[u],p=ne.useMemo(()=>{const y=(s.routesById[u].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:u,loaderDeps:c.loaderDeps,params:c._strictParams,search:c._strictSearch});return y?JSON.stringify(y):void 0},[u,c.loaderDeps,c._strictParams,c._strictSearch,s.options.defaultRemountDeps,s.routesById]),m=ne.useMemo(()=>{const y=h.options.component??s.options.defaultComponent;return y?X.jsx(y,{},p):X.jsx(Ab,{})},[p,h.options.component,s.options.defaultComponent]);if(c._displayPending)throw a(c,"displayPendingPromise");if(c._forcePending)throw a(c,"minPendingPromise");if(c.status==="pending"){const y=h.options.pendingMinMs??s.options.defaultPendingMinMs;if(y){const g=s.getMatch(c.id);if(g&&!g._nonReactive.minPendingPromise){const b=Yr();g._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw a(c,"loadPromise")}if(c.status==="notFound")return St(c.error)||rn(),Rb(s,h,c.error);if(c.status==="redirected")throw sn(c.error)||rn(),a(c,"loadPromise");if(c.status==="error")throw c.error;return m}),Ab=ne.memo(function(){const t=jt(),s=ne.useContext(qc);let a,o=!1,c;{const m=s?t.stores.matchStores.get(s):void 0;[a,o]=ht(m,y=>[y?.routeId,y?.globalNotFound??!1]),c=ht(t.stores.matchesId,y=>y[y.findIndex(g=>g===s)+1])}const u=a?t.routesById[a]:void 0,h=t.options.defaultPendingComponent?X.jsx(t.options.defaultPendingComponent,{}):null;if(o)return u||rn(),Rb(t,u,void 0);if(!c)return null;const p=X.jsx(Tb,{matchId:c});return a===Kr?X.jsx(ne.Suspense,{fallback:h,children:p}):p});function BA(){const e=jt(),t=ne.useRef({router:e,mounted:!1}),[s,a]=ne.useState(!1),o=ht(e.stores.isLoading,g=>g),c=ht(e.stores.hasPending,g=>g),u=vh(o),h=o||s||c,p=vh(h),m=o||c,y=vh(m);return e.startTransition=g=>{a(!0),ne.startTransition(()=>{g(),a(!1)})},ne.useEffect(()=>{const g=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ar(e.latestLocation.publicHref)!==ar(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),ro(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),ro(()=>{u&&!o&&e.emit({type:"onLoad",...Xa(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,e,o]),ro(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...Xa(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,y,e]),ro(()=>{if(p&&!h){const g=Xa(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...g}),mb(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),g.hrefChanged&&XE(e)}},[h,p,e]),null}function $A(){const e=jt(),t=e.routesById[Kr].options.pendingComponent??e.options.defaultPendingComponent,s=t?X.jsx(t,{}):null,a=X.jsxs(typeof document<"u"&&e.ssr?Va:ne.Suspense,{fallback:s,children:[X.jsx(BA,{}),X.jsx(HA,{})]});return e.options.InnerWrap?X.jsx(e.options.InnerWrap,{children:a}):a}function HA(){const e=jt(),t=ht(e.stores.firstId,o=>o),s=ht(e.stores.loadedAt,o=>o),a=t?X.jsx(Tb,{matchId:t}):null;return X.jsx(qc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:X.jsx(gf,{getResetKey:()=>s,errorComponent:yf,onCatch:void 0,children:a})})}var qA=e=>({createMutableStore:cv,createReadonlyStore:cv,batch:mb}),VA=e=>new GA(e),GA=class extends zE{constructor(e){super(e,qA)}};function KA({router:e,children:t,...s}){Object.keys(s).length>0&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const a=X.jsx(fb.Provider,{value:e,children:t});return e.options.Wrap?X.jsx(e.options.Wrap,{children:a}):a}function FA({router:e,...t}){return X.jsx(KA,{router:e,...t,children:X.jsx($A,{})})}function Ob(e){const{attrs:t,children:s,nonce:a}=e;switch(e.tag){case"title":return X.jsx("title",{...t,suppressHydrationWarning:!0,children:s});case"meta":return X.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return X.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,X.jsx("style",{...t,dangerouslySetInnerHTML:{__html:s},nonce:a});case"script":return X.jsx(YA,{attrs:t,children:s});default:return null}}function YA({attrs:e,children:t}){jt();const s=vf(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(ne.useEffect(()=>{if(!a){if(e?.src){const o=(()=>{try{const u=document.baseURI||window.location.href;return new URL(e.src,u).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===o))return;const c=document.createElement("script");for(const[u,h]of Object.entries(e))u!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&c.setAttribute(u,typeof h=="boolean"?"":String(h));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}if(typeof t=="string"){const o=typeof e?.type=="string"?e.type:"text/javascript",c=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(h=>{if(!(h instanceof HTMLScriptElement))return!1;const p=h.getAttribute("type")??"text/javascript",m=h.getAttribute("nonce")??void 0;return h.textContent===t&&p===o&&m===c}))return;const u=document.createElement("script");
12if(u.textContent=t,e)for(const[h,p]of Object.entries(e))h!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&u.setAttribute(h,typeof p=="boolean"?"":String(p));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[e,t,a]),a&&typeof t=="string")return X.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!s){if(e?.src)return X.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return X.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var QA=e=>{const t=jt(),s=t.options.ssr?.nonce,a=ht(t.stores.matches,m=>m.map(y=>y.meta).filter(Boolean),nn),o=ne.useMemo(()=>{const m=[],y={};let g;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let w=_.length-1;w>=0;w--){const E=_[w];if(E)if(E.title)g||(g={tag:"title",children:E.title});else if("script:ld+json"in E)try{const R=JSON.stringify(E["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:QS(R)})}catch{}else{const R=E.name??E.property;if(R){if(y[R])continue;y[R]=!0}m.push({tag:"meta",attrs:{...E,nonce:s}})}}}return g&&m.push(g),s&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:s}}),m.reverse(),m},[a,s]),c=ht(t.stores.matches,m=>{const y=m.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:s}})),g=t.ssr?.manifest,b=m.map(_=>g?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?QE(g,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:Fy(e,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:s}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:s},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},nn),u=ht(t.stores.matches,m=>{const y=[];return m.map(g=>t.looseRoutesById[g.routeId]).forEach(g=>t.ssr?.manifest?.routes[g.id]?.preloads?.filter(Boolean).forEach(b=>{const _=FE(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:Fy(e,"modulepreload")??_.crossOrigin,nonce:s}})})),y},nn),h=ht(t.stores.matches,m=>m.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:s},children:y})),nn),p=ht(t.stores.matches,m=>m.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:s},children:y})),nn);return JA([...o,...u,...c,...h,...p],m=>JSON.stringify(m))};function JA(e,t){const s=new Set;return e.filter(a=>{const o=t(a);return s.has(o)?!1:(s.add(o),!0)})}function XA(e){const t=QA(e.assetCrossOrigin),s=jt().options.ssr?.nonce;return X.jsx(X.Fragment,{children:t.map(a=>ne.createElement(Ob,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:s}))})}var ZA=()=>{const e=jt(),t=e.options.ssr?.nonce,s=c=>{const u=[],h=e.ssr?.manifest;return h?(c.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>h.routes[p.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{u.push({tag:"script",attrs:{...m.attrs,nonce:t},children:m.children})})),u):[]},a=c=>c.map(u=>u.scripts).flat(1).filter(Boolean).map(({children:u,...h})=>({tag:"script",attrs:{...h,suppressHydrationWarning:!0,nonce:t},children:u})),o=ht(e.stores.matches,s,nn);return WA(e,ht(e.stores.matches,a,nn),o)};function WA(e,t,s){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const o=[...t,...s];return a&&o.unshift(a),X.jsx(X.Fragment,{children:o.map((c,u)=>ne.createElement(Ob,{...c,key:`tsr-scripts-${c.tag}-${u}`}))})}var qr=(e,t)=>{const s={type:"request",...t||e};return{options:s,middleware:a=>qr({},Object.assign(s,{middleware:a})),inputValidator:a=>qr({},Object.assign(s,{inputValidator:a})),client:a=>qr({},Object.assign(s,{client:a})),server:a=>qr({},Object.assign(s,{server:a}))}};function xb(e,t){for(let s=0,a=t.length;s<a;s++){const o=t[s];e.has(o)||(e.add(o),o.extends&&xb(e,o.extends))}}var eO=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const s=new Set;xb(s,t.serializationAdapters),t.serializationAdapters=Array.from(s)}return t},createMiddleware:qr}),mv=function(){return mv=Object.assign||function(t){for(var s,a=1,o=arguments.length;a<o;a++){s=arguments[a];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(t[c]=s[c])}return t},mv.apply(this,arguments)};function Vc(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(s[a[o]]=e[a[o]]);return s}function tO(e,t,s,a){function o(c){return c instanceof s?c:new s(function(u){u(c)})}
12return new(s||(s=Promise))(function(c,u){function h(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(h,p)}m((a=a.apply(e,t||[])).next())})}function pM(e,t,s){if(s||arguments.length===2)for(var a=0,o=t.length,c;a<o;a++)(c||!(a in t))&&(c||(c=Array.prototype.slice.call(t,0,a)),c[a]=t[a]);return e.concat(c||Array.prototype.slice.call(t))}const nO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class _f extends Error{constructor(t,s="FunctionsError",a){super(t),this.name=s,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class sO extends _f{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class gv extends _f{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class yv extends _f{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Bh;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Bh||(Bh={}));class rO{constructor(t,{headers:s={},customFetch:a,region:o=Bh.Any}={}){this.url=t,this.headers=s,this.region=o,this.fetch=nO(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return tO(this,arguments,void 0,function*(s,a={}){var o;let c,u;try{const{headers:h,method:p,body:m,signal:y,timeout:g}=a;let b={},{region:_}=a;_||(_=this.region);const w=new URL(`${this.url}/${s}`);_&&_!=="any"&&(b["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let E;m&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",E=m):typeof m=="string"?(b["Content-Type"]="text/plain",E=m):typeof FormData<"u"&&m instanceof FormData?E=m:(b["Content-Type"]="application/json",E=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?E=JSON.stringify(m):E=m;let R=y;g&&(u=new AbortController,c=setTimeout(()=>u.abort(),g),y?(R=u.signal,y.addEventListener("abort",()=>u.abort())):R=u.signal);const A=yield this.fetch(w.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),h),body:E,signal:R}).catch(Q=>{throw new sO(Q)}),j=A.headers.get("x-relay-error");if(j&&j==="true")throw new gv(A);if(!A.ok)throw new yv(A);let k=((o=A.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),D;return k==="application/json"?D=yield A.json():k==="application/octet-stream"||k==="application/pdf"?D=yield A.blob():k==="text/event-stream"?D=A:k==="multipart/form-data"?D=yield A.formData():D=yield A.text(),{data:D,error:null,response:A}}catch(h){return{data:null,error:h,response:h instanceof yv||h instanceof gv?h.context:void 0}}finally{c&&clearTimeout(c)}})}}const Cb=3,vv=e=>Math.min(1e3*2**e,3e4),aO=[520,503],kb=["GET","HEAD","OPTIONS"];var iO=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
12de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function bv(e,t){return new Promise(s=>{if(t?.aborted){s();return}const a=setTimeout(()=>{t?.removeEventListener("abort",o),s()},e);function o(){clearTimeout(a),s()}t?.addEventListener("abort",o)})}function oO(e,t,s,a){return!(!a||s>=Cb||!kb.includes(e)||!aO.includes(t))}var lO=class{constructor(e){var t,s,a,o,c;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(s=e.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(o=e.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(c=e.retry)!==null&&c!==void 0?c:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let c=(async()=>{let u=0;for(;;){const m=new Headers(s.headers);u>0&&m.set("X-Retry-Count",String(u));let y;try{y=await a(s.url.toString(),{method:s.method,headers:m,body:JSON.stringify(s.body,(g,b)=>typeof b=="bigint"?b.toString():b),signal:s.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!kb.includes(s.method))throw g;if(s.retryEnabled&&u<Cb){const b=vv(u);u++,await bv(b,s.signal);continue}throw g}if(oO(s.method,y.status,u,s.retryEnabled)){var h,p;const g=(h=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&h!==void 0?h:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:vv(u);await y.text(),u++,await bv(b,s.signal);continue}return await s.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var h;let p="",m="",y="";const g=u?.cause;if(g){var b,_,w,E;const j=(b=g?.message)!==null&&b!==void 0?b:"",k=(_=g?.code)!==null&&_!==void 0?_:"";p=`${(w=u?.name)!==null&&w!==void 0?w:"FetchError"}: ${u?.message}`,p+=` 13 14Caused by: ${(E=g?.name)!==null&&E!==void 0?E:"Error"}: ${j}`,k&&(p+=` (${k})`),g?.stack&&(p+=` 15${g.stack}`)}else{var R;p=(R=u?.stack)!==null&&R!==void 0?R:""}const A=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",A>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${A} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",A>this.urlLengthLimit&&(m+=`. Your request URL is ${A} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(h=u?.name)!==null&&h!==void 0?h:"FetchError"}: ${u?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}})),c.then(e,t)}async processResponse(e){var t=this;let s=null,a=null,o=null,c=e.status,u=e.statusText;if(e.ok){var h,p;if(t.method!=="HEAD"){var m;const b=await e.text();b===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?a=b:a=JSON.parse(b))}const y=(h=t.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),g=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&g&&g.length>
151&&(o=parseInt(g[1])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(s={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,o=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const y=await e.text();try{s=JSON.parse(y),Array.isArray(s)&&e.status===404&&(a=[],s=null,c=200,u="OK")}catch{e.status===404&&y===""?(c=204,u="No Content"):s={message:y}}if(s&&t.shouldThrowOnError)throw new iO(s)}return{success:s===null,error:s,data:a,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},cO=class extends lO{select(e){let t=!1;const s=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:s,foreignTable:a,referencedTable:o=a}={}){const c=o?`${o}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${e}.${t?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:s=t}={}){const a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:s,referencedTable:a=s}={}){const o=typeof a>"u"?"offset":`${a}.offset`,c=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(c,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:s=!1,buffers:a=!1,wal:o=!1,format:c="text"}={}){var u;const h=[e?"analyze":null,t?"verbose":null,s?"settings":null,a?"buffers":null,o?"wal":null].filter(Boolean).join("|"),p=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${p}"; options=${h};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const _v=new RegExp("[,()]");var Ga=class extends cO{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const s=Array.from(new Set(t)).map(a=>typeof a=="string"&&_v.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}notIn(e,t){const s=Array.from(new Set(t)).map(a=>typeof a=="string"&&_v.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${s})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:s,type:a}={}){let o="";a==="plain"?o="pl":a==="phrase"?o="ph":a==="websearch"&&(o="w");const c=s===void 0?"":`(${s})`;return this.url.searchParams.append(e,`${o}fts${c}.${t}`),this}match(e){return Object.entries(e).filter(([t,s])=>
15s!==void 0).forEach(([t,s])=>{this.url.searchParams.append(t,`eq.${s}`)}),this}not(e,t,s){return this.url.searchParams.append(e,`not.${t}.${s}`),this}or(e,{foreignTable:t,referencedTable:s=t}={}){const a=s?`${s}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,s){return this.url.searchParams.append(e,`${t}.${s}`),this}},uO=class{constructor(e,{headers:t={},schema:s,fetch:a,urlLengthLimit:o=8e3,retry:c}){this.url=e,this.headers=new Headers(t),this.schema=s,this.fetch=a,this.urlLengthLimit=o,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:s=!1,count:a}=t??{},o=s?"HEAD":"GET";let c=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:h,headers:p}=this.cloneRequestState();return h.searchParams.set("select",u),a&&p.append("Prefer",`count=${a}`),new Ga({method:o,url:h,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:s=!0}={}){var a;const o="POST",{url:c,headers:u}=this.cloneRequestState();
15if(t&&u.append("Prefer",`count=${t}`),s||u.append("Prefer","missing=default"),Array.isArray(e)){const h=e.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(h.length>0){const p=[...new Set(h)].map(m=>`"${m}"`);c.searchParams.set("columns",p.join(","))}}return new Ga({method:o,url:c,headers:u,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:s=!1,count:a,defaultToNull:o=!0}={}){var c;const u="POST",{url:h,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),t!==void 0&&h.searchParams.set("on_conflict",t),a&&p.append("Prefer",`count=${a}`),o||p.append("Prefer","missing=default"),Array.isArray(e)){const m=e.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);h.searchParams.set("columns",y.join(","))}}return new Ga({method:u,url:h,headers:p,schema:this.schema,body:e,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var s;const a="PATCH",{url:o,headers:c}=this.cloneRequestState();return t&&c.append("Prefer",`count=${t}`),new Ga({method:a,url:o,headers:c,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const s="DELETE",{url:a,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new Ga({method:s,url:a,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function go(e){"@babel/helpers - typeof";return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},go(e)}function dO(e,t){if(go(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(go(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hO(e){var t=dO(e,"string");return go(t)=="symbol"?t:t+""}function fO(e,t,s){return(t=hO(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function wv(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),s.push.apply(s,a)}return s}function Fl(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?wv(Object(s),!0).forEach(function(a){fO(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):wv(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var pO=class Pb{constructor(t,{headers:s={},schema:a,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:h}={}){this.url=t,this.headers=new Headers(s),this.schemaName=a,this.urlLengthLimit=u;const p=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(m,y)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),c),_=y?.signal;if(_){if(_.aborted)return clearTimeout(b),p(m,y);const w=()=>{clearTimeout(b),g.abort()};return _.addEventListener("abort",w,{once:!0}),p(m,Fl(Fl({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",w)})}return p(m,Fl(Fl({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=h}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new uO(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new Pb(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,s={},{head:a=!1,get:o=!1,count:c}={}){var u;let h;const p=new URL(`${this.url}/rpc/${t}`);let m;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),g=a&&Object.values(s).some(y);g?(h="POST",m=s):a||o?(h=a?"HEAD":"GET",Object.entries(s).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}
15`]).forEach(([_,w])=>{p.searchParams.append(_,w)})):(h="POST",m=s);const b=new Headers(this.headers);return g?b.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&b.set("Prefer",`count=${c}`),new Ga({method:h,url:p,headers:b,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class mO{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const o=globalThis.process;if(o){const c=o.versions;if(c&&c.node){const u=c.node,h=parseInt(u.replace(/^v/,"").split(".")[0]);return h>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${h} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${h} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let s=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(s+=` 18 19Suggested solution: ${t.workaround}`),new Error(s)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const gO="2.106.1",yO=`realtime-js/${gO}`,vO="1.0.0",jb="2.0.0",bO=jb,_O=1e4,wO=100,er={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Mb={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},$h={connecting:"connecting",closing:"closing",closed:"closed"};class SO{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,s){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return s(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var s;return this._isArrayBuffer((s=t.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var s,a;const o=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var s,a;const o=(a=(s=t.payload)===null||s===void 0?void 0:s.payload)!==null&&a!==void 0?a:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,s,a){var o,c;const u=t.topic,h=(o=t.ref)!==null&&o!==void 0?o:"",p=(c=t.join_ref)!==null&&c!==void 0?c:"",m=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},g=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(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+h.length+u.length+m.length+g.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let w=new DataView(_),E=0;w.setUint8(E++,this.KINDS.userBroadcastPush),w.setUint8(E++,p.length),w.setUint8(E++,h.length),w.setUint8(E++,u.length),w.setUint8(E++,m.length),w.setUint8(E++,g.length),w.setUint8(E++,s),Array.from(p,A=>w.setUint8(E++,A.charCodeAt(0))),Array.from(h,A=>w.setUint8(E++,A.charCodeAt(0))),Array.from(u,A=>w.setUint8(E++,A.charCodeAt(0))),Array.from(m,A=>w.setUint8(E++,A.charCodeAt(0))),Array.from(g,A=>w.setUint8(E++,A.charCodeAt(0)));var R=new Uint8Array(_.byteLength+a.byteLength);return R.set(new Uint8Array(_),0),R.set(new Uint8Array(a),_.byteLength),R.buffer}decode(t,s){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return s(a)}if(typeof t=="string"){const a=JSON.parse(t),[o,c,u,h,p]=a;
19return s({join_ref:o,ref:c,topic:u,event:h,payload:p})}return s({})}_binaryDecode(t){const s=new DataView(t),a=s.getUint8(0),o=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,s,o)}_decodeUserBroadcast(t,s,a){const o=s.getUint8(1),c=s.getUint8(2),u=s.getUint8(3),h=s.getUint8(4);let p=this.HEADER_LENGTH+4;const m=a.decode(t.slice(p,p+o));p=p+o;const y=a.decode(t.slice(p,p+c));p=p+c;const g=a.decode(t.slice(p,p+u));p=p+u;const b=t.slice(p,t.byteLength),_=h===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,w={type:this.BROADCAST_EVENT,event:y,payload:_};return u>0&&(w.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var s;return t instanceof ArrayBuffer||((s=t?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(t,s){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>s.includes(a)))}}var Fe;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Fe||(Fe={}));const Sv=(e,t,s={})=>{var a;const o=(a=s.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((c,u)=>(c[u]=EO(u,e,t,o),c),{}):{}},EO=(e,t,s,a)=>{const o=t.find(h=>h.name===e),c=o?.type,u=s[e];return c&&!a.includes(c)?Db(c,u):Hh(u)},Db=(e,t)=>{if(e.charAt(0)==="_"){const s=e.slice(1,e.length);return OO(t,s)}switch(e){case Fe.bool:return RO(t);case Fe.float4:case Fe.float8:case Fe.int2:case Fe.int4:case Fe.int8:case Fe.numeric:case Fe.oid:return TO(t);case Fe.json:case Fe.jsonb:return AO(t);case Fe.timestamp:return xO(t);case Fe.abstime:case Fe.date:case Fe.daterange:case Fe.int4range:case Fe.int8range:case Fe.money:case Fe.reltime:case Fe.text:case Fe.time:case Fe.timestamptz:case Fe.timetz:case Fe.tsrange:case Fe.tstzrange:return Hh(t);default:return Hh(t)}},Hh=e=>e,RO=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},TO=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},AO=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},OO=(e,t)=>{if(typeof e!="string")return e;const s=e.length-1,a=e[s];if(e[0]==="{"&&a==="}"){let c;const u=e.slice(1,s);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(h=>Db(t,h))}return e},xO=e=>typeof e=="string"?e.replace(" ","T"):e,Nb=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var oo=e=>typeof e=="function"?e:function(){return e},CO=typeof self<"u"?self:null,Ka=typeof window<"u"?window:null,Yn=CO||Ka||globalThis,kO="2.0.0",PO=1e4,jO=1e3,Jn={connecting:0,open:1,closing:2,closed:3},Wt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},_s={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},qh={longpoll:"longpoll",websocket:"websocket"},MO={complete:4},Vh="base64url.bearer.phx.",Yl=class{constructor(e,t,s,a){this.channel=e,this.event=t,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 8,135 bytes, line 19
19matchReceive({status:e,response:t,_ref:s}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Lb=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},DO=class{constructor(e,t,s){this.state=Wt.closed,this.topic=e,this.params=oo(t||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Yl(this,_s.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Lb(()=>{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=Wt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=Wt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Wt.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=Wt.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 Yl(this,_s.leave,oo({}),this.timeout).send(),this.state=Wt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(_s.reply,(a,o)=>{this.trigger(this.replyEventName(o),a)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Wt.closed,this.bindings=[]}onClose(e){this.on(_s.close,e)}onError(e){return this.on(_s.error,t=>e(t))}on(e,t){let s=this.bindingRef++;return this.bindings.push({event:e,ref:s,callback:t}),s}off(e,t){this.bindings=this.bindings.filter(s=>!(s.event===e&&(typeof t>"u"||t===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,s=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new Yl(this,e,function(){return t},s);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Wt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(_s.close,"leave")},s=new Yl(this,_s.leave,oo({}),e);return s.receive("ok",()=>t()).receive("timeout",()=>t()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(e,t,s){return t}filterBindings(e,t,s){return!0}isMember(e,t,s,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:s,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Wt.joining,this.joinPush.resend(e))}trigger(e,t,s,a){let o=this.onMessage(e,t,s,a);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===e&&this.filterBindings(u,t,s));for(let u=0;u<c.length;u++)c[u].callback(o,s,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Wt.closed}isErrored(){return this.state===Wt.errored}isJoined(){return this.state===Wt.joined}isJoining(){return this.state===Wt.joining}isLeaving(){return this.state===Wt.leaving}},Oc=class{static request(e,t,s,a,o,c,u){if(Yn.XDomainRequest){let h=new Yn.XDomainRequest;return this.xdomainRequest(h,e,t,a,o,c,u)}else if(Yn.XMLHttpRequest){let h=new Yn.XMLHttpRequest;return this.xhrRequest(h,e,t,s,a,o,c,u)}else{if(Yn.fetch&&Yn.AbortController)return this.fetchRequest(e,t,s,a,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,s,a,o,c,u){let h={method:e,headers:s,body:a},p=null;return o&&(p=new AbortController,setTimeout(()=>p.abort(),o),h.signal=p.signal),Yn.fetch(t,h).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&c?c():u&&u(null)}),p}static xdomainRequest(e,t,s,a,o,c,u){return e.timeout=o,e.open(t,s),e.onload=()=>{let h=this.parseJSON(e.responseText);u&&u(h)},c&&(e.ontimeout=c),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,s,a,o,c,u,h){e.open(t,s,!0),e.timeout=c;for(let[p,m]of Object.entries(a))e.setRequestHeader(p,m);return e.onerror=()=>h&&h(null),e.onreadystatechange=()=>{if(e.readyState===MO.complete&&h){let p=this.parseJSON(e.responseText);h(p)}},u&&(e.ontimeout=u),e.send(o),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let s=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let o=t?`${t}[${a}]`:a,c=e[a];typeof c=="object"?s.push(this.serialize(c,o)):s.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return s.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let s=e.match(/\?/)?"&":"?";return`${e}${s}${this.serialize(t)}`}},NO=e=>{let t="",s=new Uint8Array(e),a=s.byteLength;for(let o=0;o<a;o++)t+=String.fromCharCode(s[o]);return btoa(t)},Ia=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Vh)&&(this.authToken=atob(t[1].slice(Vh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Jn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+qh.websocket),"$1/"+qh.longpoll)}endpointURL(){return Oc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,s){this.close(e,t,s),this.readyState=Jn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Jn.open||this.readyState===Jn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:s,token:a,messages:o}=t;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else s=0;switch(s){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Jn.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${s}`)}})}send(e){typeof e!="string"&&(e=NO(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 20`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,s){for(let o of this.reqs)o.abort();this.readyState=Jn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,s,a,o){let c,u=()=>{this.reqs.delete(c),a()};c=Oc.request(e,this.endpointURL(),t,s,this.timeout,u,h=>{this.reqs.delete(c),this.isActive()&&o(h)}),this.reqs.add(c)}},LO=class ao{constructor(t,s={}){let a=s.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,o=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ao.syncState(this.state,o,c,u),this.pendingDiffs.forEach(p=>{this.state=ao.syncDiff(this.state,p,c,u)}),this.pendingDiffs=[],h()}),this.channel.on(a.diff,o=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=ao.syncDiff(this.state,o,c,u),h())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ao.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,s,a,o){let c=this.clone(t),u={},h={};return this.map(c,(p,m)=>{s[p]||(h[p]=m)}),this.map(s,(p,m)=>{let y=c[p];if(y){let g=m.metas.map(E=>E.phx_ref),b=y.metas.map(E=>E.phx_ref),_=m.metas.filter(E=>b.indexOf(E.phx_ref)<0),w=y.metas.filter(E=>g.indexOf(E.phx_ref)<0);_.length>0&&(u[p]=m,u[p].metas=_),w.length>0&&(h[p]=this.clone(y),h[p].metas=w)}else u[p]=m}),this.syncDiff(c,{joins:u,leaves:h},a,o)}static syncDiff(t,s,a,o){let{joins:c,leaves:u}=this.clone(s);return a||(a=function(){}),o||(o=function(){}),this.map(c,(h,p)=>{let m=t[h];if(t[h]=this.clone(p),m){let y=t[h].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[h].metas.unshift(...g)}a(h,m,p)}),this.map(u,(h,p)=>{let m=t[h];if(!m)return;let y=p.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(h,m,p),m.metas.length===0&&delete t[h]}),t}static list(t,s){return s||(s=function(a,o){return o}),this.map(t,(a,o)=>s(a,o))}static map(t,s){return Object.getOwnPropertyNames(t).map(a=>s(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Ql={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(s))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[s,a,o,c,u]=JSON.parse(e);return t({join_ref:s,ref:a,topic:o,event:c,payload:u})}},binaryEncode(e){let{join_ref:t,ref:s,event:a,topic:o,payload:c}=e,u=this.META_LENGTH+t.length+s.length+o.length+a.length,h=new ArrayBuffer(this.HEADER_LENGTH+u),p=new DataView(h),m=0;p.setUint8(m++,this.KINDS.push),p.setUint8(m++,t.length),p.setUint8(m++,s.length),p.setUint8(m++,o.length),p.setUint8(m++,a.length),Array.from(t,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(s,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>p.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(h.byteLength+c.byteLength);return y.set(new Uint8Array(h),0),y.set(new Uint8Array(c),h.byteLength),y.buffer},binaryDecode(e){let t=new DataView(e),s=t.getUint8(0),a=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,s){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,h=s.decode(e.slice(u,u+a));u=u+a;let p=s.decode(e.slice(u,u+o));u=u+o;let m=s.decode(e.slice(u,u+c));u=u+c;let y=e.slice(u,e.byteLength);return{join_ref:h,ref:null,topic:p,event:m,payload:y}},decodeReply(e,t,s){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=t.getUint8(4),h=this.HEADER_LENGTH+this.META_LENGTH,p=s.decode(e.slice(h,h+a));h=h+a;let m=s.decode(e.slice(h,h+o));h=h+o;let y=s.decode(e.slice(h,h+c));h=h+c;let g=s.decode(e.slice(h,h+u));h=h+u;let b=e.slice(h,e.byteLength),_={status:g,response:b};return{join_ref:p,ref:m,topic:y,event:_s.reply,payload:_}}
20,decodeBroadcast(e,t,s){let a=t.getUint8(1),o=t.getUint8(2),c=this.HEADER_LENGTH+2,u=s.decode(e.slice(c,c+a));c=c+a;let h=s.decode(e.slice(c,c+o));c=c+o;let p=e.slice(c,e.byteLength);return{join_ref:null,ref:null,topic:u,event:h,payload:p}}},UO=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||PO,this.transport=t.transport||Yn.WebSocket||Ia,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=Yn&&Yn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=Ql.encode.bind(Ql),this.defaultDecoder=Ql.decode.bind(Ql),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ia?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;Ka&&Ka.addEventListener&&(Ka.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),a=this.connectClock)}),Ka.addEventListener("pageshow",o=>{a===this.connectClock&&(a=null,this.connect())}),Ka.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>t.rejoinAfterMs?t.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>t.reconnectAfterMs?t.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(o,c,u)=>{console.log(`${o}: ${c}`,u)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=oo(t.params||{}),this.endPoint=`${e}/${qh.websocket}`,this.vsn=t.vsn||kO,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Lb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ia}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Oc.appendParams(Oc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,s)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=oo(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ia?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(Ia,this.longPollFallbackMs):this.transportConnect())}log(e,t,s){this.logger&&this.logger(e,t,s)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(o=>{o.ref===t&&(this.off([a]),e(Date.now()-s))});return!0}transportName(e){return e===Ia?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Vh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let s=!1,a=!0,o,c,u=this.transportName(e),h=p=>{this.log("transport",`falling back to ${u}...`,p),this.off([o,c]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return h("memorized");this.fallbackTimer=setTimeout(h,t),c=this.onError(p=>{this.log("transport","error",p),a&&!s&&(clearTimeout(this.fallbackTimer),h(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!a){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,t),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),jO,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,s){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,s||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,s=1){if(s===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,s+1)},150*s)}waitForSocketClosed(e,t,s=1){if(s===5||e.readyState===Jn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,s+1)},150*s)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",e,t,s),(t===this.transport||s>0)&&this.triggerChanError(e)}
20triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(_s.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Jn.connecting:return"connecting";case Jn.open:return"open";case Jn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([s])=>e.indexOf(s)===-1)}channel(e,t={}){let s=new DO(e,t,this);return this.channels.push(s),s}push(e){if(this.hasLogger()){let{topic:t,event:s,payload:a,ref:o,join_ref:c}=e;this.log("push",`${t} ${s} (${c}, ${o})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:s,event:a,payload:o,ref:c,join_ref:u}=t;if(c&&c===this.pendingHeartbeatRef){const h=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.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",`${o.status||""} ${s} ${a} ${c&&"("+c+")"||""}`.trim(),o);for(let h=0;h<this.channels.length;h++){const p=this.channels[h];p.isMember(s,a,o,u)&&p.trigger(a,o,c,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([s,a])=>{try{a(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(s){this.log("error",`error triggering ${e} callbacks`,s)}}leaveOpenTopic(e){let t=this.channels.find(s=>s.topic===e&&(s.isJoined()||s.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class lo{constructor(t,s){const a=IO(s);this.presence=new LO(t.getChannel(),a),this.presence.onJoin((o,c,u)=>{const h=lo.onJoinPayload(o,c,u);t.getChannel().trigger("presence",h)}),this.presence.onLeave((o,c,u)=>{const h=lo.onLeavePayload(o,c,u);t.getChannel().trigger("presence",h)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return lo.transformState(this.presence.state)}static transformState(t){return t=zO(t),Object.getOwnPropertyNames(t).reduce((s,a)=>{const o=t[a];return s[a]=vc(o),s},{})}static onJoinPayload(t,s,a){const o=Ev(s),c=vc(a);return{event:"join",key:t,currentPresences:o,newPresences:c}}static onLeavePayload(t,s,a){const o=Ev(s),c=vc(a);return{event:"leave",key:t,currentPresences:o,leftPresences:c}}}function vc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function zO(e){return JSON.parse(JSON.stringify(e))}function IO(e){return e?.events&&{events:e.events}}function Ev(e){return e?.metas?vc(e):[]}var Rv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Rv||(Rv={}));class BO{get state(){return this.presenceAdapter.state}constructor(t,s){this.channel=t,this.presenceAdapter=new lo(this.channel.channelAdapter,s)}}function $O(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const s=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${s}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class HO{constructor(t,s,a){const o=qO(a);this.channel=t.getSocket().channel(s,o),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,s){return this.channel.on(t,s)}off(t,s){this.channel.off(t,s)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,s,a){let o;try{o=this.channel.push(t,s,a)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>wO){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return o}updateJoinPayload(t){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),t)}canPush(){return this.socket.isConnected()&&this.state===er.joined}isJoined(){return this.state===er.joined}isJoining(){return this.state===er.joining}isClosed(){return this.state===er.closed}isLeaving(){return this.state===er.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function qO(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Tv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Tv||(Tv={}));var Ja;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ja||(Ja={}));var ws;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ws||(ws={}));class co{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,s={config:{}},a){var o,c;if(this.topic=t,this.params=s,this.socket=a,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new HO(this.socket.socketAdapter,t,this.params),this.presence=new BO(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Nb(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,s=this.timeout){var a,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:h,private:p}}=this.params,m=(o=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[Ja.PRESENCE]&&this.bindings[Ja.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,g={},b={broadcast:u,presence:Object.assign(Object.assign({},h),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(ws.CHANNEL_ERROR,$O(_))}),this._onClose(()=>t?.(ws.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(s).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t?.(ws.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=er.errored;const w=Object.values(_).join(", ")||"error";t?.(ws.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{t?.(ws.TIMED_OUT)})}return this}_updatePostgresBindings(t,s){var a;const o=this.bindings.postgres_changes,c=(a=o?.length)!==null&&a!==void 0?a:0,u=[];for(let h=0;h<c;h++){const p=o[h],{filter:{event:m,schema:y,table:g,filter:b}}=p,_=t&&t[h];if(_&&_.event===m&&co.isFilterValueEqual(_.schema,y)&&co.isFilterValueEqual(_.table,g)&&co.isFilterValueEqual(_.filter,b))u.push(Object.assign(Object.assign({},p),{id:_.id}));else{this.unsubscribe(),this.state=er.errored,s?.(ws.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=er.errored&&s&&s(ws.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,s={}){return await this.send({type:"presence",event:"track",payload:t},s.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,s,a){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=t===Ja.PRESENCE||t===Ja.POSTGRES_CHANGES;if(o&&c)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,s,a)}async httpSend(t,s,a={}){var o;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const u={method:"POST",headers:c,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:s,private:this.private}]})},h=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(o=a.timeout)!==null&&o!==void 0?o:this.timeout);if(h.status===202)return{success:!0};let p=h.statusText;try{const m=await h.json();p=m.error||m.message||p}catch{}return Promise.reject(new Error(p))}async send(t,s={}){var a,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=t,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:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=s.timeout)!==null&&a!==void 0?a:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,h,p;const m=this.channelAdapter.push(t.type,t,s.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(h=(u=this.params)===null||u===void 0?void 0:u.config)===null||h===void 0?void 0:h.broadcast)===null||p===void 0)&&p.ack)&&c("ok"),m.receive("ok",()=>c("ok")),m.receive("error",()=>c("error")),m.receive("timeout",()=>c("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,s,a){const o=new AbortController,c=setTimeout(()=>o.abort(),a),u=await this.socket.fetch(t,Object.assign(Object.assign({},s),{signal:o.signal}));return clearTimeout(c),u}_on(t,s,a){const o=t.toLocaleLowerCase(),c=this.channelAdapter.on(t,a),u={type:o,filter:s,callback:a,ref:c};return this.bindings[o]?this.bindings[o].push(u):this.bindings[o]=[u],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,s,a)=>{var o,c,u,h,p,m,y;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,a))return!1;const b=(o=this.bindings[g])===null||o===void 0?void 0:o.find(_=>_.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const _=b.id,w=(c=b.filter)===null||c===void 0?void 0:c.event;return _&&((u=s.ids)===null||u===void 0?void 0:u.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((h=s.data)===null||h===void 0?void 0:h.type.toLocaleLowerCase()))}else{const _=(m=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return _==="*"||_===((y=s?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,s){const{close:a,error:o,leave:c,join:u}=Mb;return s&&[a,o,c,u].includes(t)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,s,a)=>{if(typeof s=="object"&&"ids"in s){const o=s.data,{schema:c,table:u,commit_timestamp:h,type:p,errors:m}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:h,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return s})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in t.bindings)for(const a of t.bindings[s])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,s){return(t??void 0)===(s??void 0)}_getPayloadRecords(t){const s={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(s.new=Sv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(s.old=Sv(t.columns,t.old_record)),s}}class VO{constructor(t,s){this.socket=new UO(t,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,s,a,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{t(),c("ok")},s,a)})}push(t){this.socket.push(t)}log(t,s,a){this.socket.log(t,s,a)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==$h.connecting}isDisconnecting(){return this.socket.connectionState()==$h.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Av={HEARTBEAT_INTERVAL:25e3},GO=[1e3,2e3,5e3,1e4],KO=1e4;function FO(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var s;return(s=Array.from(e.keys())[t])!==null&&s!==void 0?s:null},removeItem(t){e.delete(t)},setItem(t,s){e.set(t,String(s))}}}function YO(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return FO()}const QO=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class JO{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,s){var a;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new SO,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((a=s?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const o=this._initializeOptions(s);this.socketAdapter=new VO(t,o),this.httpEndpoint=Nb(t),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const s=t.message;throw s.includes("Node.js")?new Error(`${s} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,s)}getChannels(){return this.channels}async removeChannel(t){const s=await t.unsubscribe();return s==="ok"&&t.teardown(),s}async removeAllChannels(){const t=this.channels.map(async a=>{const o=await a.unsubscribe();return a.teardown(),o}),s=await Promise.all(t);return await this.disconnect(),s}log(t,s,a){this.socketAdapter.log(t,s,a)}connectionState(){return this.socketAdapter.connectionState()||$h.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,s={config:{}}){const a=`realtime:${t}`,o=this.getChannels().find(c=>c.topic===a);if(o)return o;{const c=new co(`realtime:${t}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(s=>s.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let s,a=!1;if(t)s=t,a=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),s=this.accessTokenValue}else s=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(o=>{const c={access_token:s,version:yO};s&&o.updateJoinPayload(c),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(Mb.access_token,{access_token:s})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${t}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(s,a)=>{s=="sent"&&this._setAuthSafely(),t&&t(s,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let s;if(t)s=t;else{const a=new Blob([QO],{type:"application/javascript"});s=URL.createObjectURL(a)}return s}_initializeOptions(t){var s,a,o,c,u,h,p,m,y,g,b,_;this.worker=(s=t?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const w={};w.timeout=(o=t?.timeout)!==null&&o!==void 0?o:_O,w.heartbeatIntervalMs=(c=t?.heartbeatIntervalMs)!==null&&c!==void 0?c:Av.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((h=t?.heartbeatIntervalMs)!==null&&h!==void 0?h:Av.HEARTBEAT_INTERVAL),w.transport=(p=t?.transport)!==null&&p!==void 0?p:mO.getWebSocketConstructor(),w.params=t?.params,w.logger=t?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),w.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:YO(),w.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(j=>GO[j-1]||KO);let E,R;const A=(g=t?.vsn)!==null&&g!==void 0?g:bO;switch(A){case vO:E=(j,k)=>k(JSON.stringify(j)),R=(j,k)=>k(JSON.parse(j));break;case jb:E=this.serializer.encode.bind(this.serializer),R=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=A,w.encode=(b=t?.encode)!==null&&b!==void 0?b:E,w.decode=(_=t?.decode)!==null&&_!==void 0?_:R,w.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var yo=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function XO(e,t,s){const a=new URL(t,e);if(s)for(const[o,c]of Object.entries(s))c!==void 0&&a.searchParams.set(o,c);return a.toString()}async function ZO(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function WO(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:s,path:a,query:o,body:c,headers:u}){const h=XO(e.baseUrl,a,o),p=await ZO(e.auth),m=await t(h,{method:s,headers:{...c?{"Content-Type":"application/json"}:{},...p,...u},body:c?JSON.stringify(c):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),b=g&&y?JSON.parse(y):y;if(!m.ok){const _=g?b:void 0,w=_?.error;throw new yo(w?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:m.status,headers:m.headers,data:b}}}}function Jl(e){return e.join("�")}var ex=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Jl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const s={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Jl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Jl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Jl(e.namespace)}`}),!0}catch(t){if(t instanceof yo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(s){if(s instanceof yo&&s.status===409)return;throw s}}};function Ba(e){return e.join("�")}var tx=class{constructor(e,t="",s){this.client=e,this.prefix=t,this.accessDelegation=s}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ba(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ba(e.namespace)}/tables`,body:t,headers:s})).data.metadata}async updateTable(e,t){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ba(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ba(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ba(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ba(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(s){if(s instanceof yo&&s.status===404)return!1;throw s}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(s){if(s instanceof yo&&s.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw s}}},nx=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const s=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=WO({baseUrl:s,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new ex(this.client,t),this.tableOps=new tx(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
38async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function vo(e){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(e)}function sx(e,t){if(vo(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(vo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rx(e){var t=sx(e,"string");return vo(t)=="symbol"?t:t+""}function ax(e,t,s){return(t=rx(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Ov(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),s.push.apply(s,a)}return s}function he(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Ov(Object(s),!0).forEach(function(a){ax(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Ov(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}var Gc=class extends Error{constructor(e,t="storage",s,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Kc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Gh=class extends Gc{constructor(e,t,s,a="storage"){super(e,a,t,s),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=s}toJSON(){return he({},super.toJSON())}},Ub=class extends Gc{constructor(e,t,s="storage"){super(e,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function xc(e,t,s){const a=he({},e),o=t.toLowerCase();for(const c of Object.keys(a))c.toLowerCase()===o&&delete a[c];return a[o]=s,a}function ix(e){const t={};for(const[s,a]of Object.entries(e))t[s.toLowerCase()]=a;return t}const ox=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),lx=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kh=e=>{if(Array.isArray(e))return e.map(s=>Kh(s));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([s,a])=>{const o=s.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));t[o]=Kh(a)}),t},cx=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),xv=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const s=t.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(e)},ux=async(e,t,s,a)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const o=e;let c=parseInt(String(o.status),10);Number.isFinite(c)||(c=500),o.json().then(u=>{const h=u?.statusCode||u?.code||c+"";t(new Gh(xv(u),c,h,a))}).catch(()=>{const u=c+"";t(new Gh(o.statusText||`HTTP ${c} error`,c,u,a))})}else t(new Ub(xv(e),e,a))},dx=(e,t,s,a)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return he(he({},o),s);if(lx(a)){var c;const u=t?.headers||{};let h;for(const[p,m]of Object.entries(u))p.toLowerCase()==="content-type"&&(h=m);o.headers=xc(u,"Content-Type",(c=h)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(a)}else o.body=a;return t?.duplex&&(o.duplex=t.duplex),he(he({},o),s)};async function so(e,t,s,a,o,c,u){return new Promise((h,p)=>{e(s,dx(t,a,o,c)).then(m=>{if(!m.ok)throw m;if(a?.noResolveJson)return m;if(u==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>h(m)).catch(m=>ux(m,p,a,u))})}function zb(e="storage"){return{get:async(t,s,a,o)=>so(t,"GET",s,a,o,void 0,e),post:async(t,s,a,o,c)=>
38so(t,"POST",s,o,c,a,e),put:async(t,s,a,o,c)=>so(t,"PUT",s,o,c,a,e),head:async(t,s,a,o)=>so(t,"HEAD",s,he(he({},a),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,s,a,o,c)=>so(t,"DELETE",s,o,c,a,e)}}const hx=zb("storage"),{get:bo,post:Nn,put:Fh,head:fx,remove:wf}=hx,mn=zb("vectors");var si=class{constructor(e,t={},s,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=ix(t),this.fetch=ox(s),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=xc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Kc(s))return{data:null,error:s};throw s}}};let Ib;Ib=Symbol.toStringTag;var px=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ib]="StreamDownloadBuilder",this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Kc(t))return{data:null,error:t};throw t}}};let Bb;Bb=Symbol.toStringTag;var mx=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Bb]="BlobDownloadBuilder",this.promise=null}asStream(){return new px(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Kc(t))return{data:null,error:t};throw t}}};const gx={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Cv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var yx=class extends si{constructor(e,t={},s,a){super(e,t,a,"storage"),this.bucketId=s}async uploadOrUpdate(e,t,s,a){var o=this;return o.handleOperation(async()=>{let c;const u=he(he({},Cv),a);let h=he(he({},o.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const p=u.metadata;if(typeof Blob<"u"&&s instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),p&&c.append("metadata",o.encodeMetadata(p)),c.append("",s)):typeof FormData<"u"&&s instanceof FormData?(c=s,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),p&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(p))):(c=s,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType,p&&(h["x-metadata"]=o.toBase64(o.encodeMetadata(p))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))h=xc(h,b,_);const m=o._removeEmptyFolders(t),y=o._getFinalPath(m),g=await(e=="PUT"?Fh:Nn)(o.fetch,`${o.url}/object/${y}`,c,he({headers:h},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(e,t,s){return this.uploadOrUpdate("POST",e,t,s)}async uploadToSignedUrl(e,t,s,a){var o=this;const c=o._removeEmptyFolders(e),u=o._getFinalPath(c),h=new URL(o.url+`/object/upload/sign/${u}`);return h.searchParams.set("token",t),o.handleOperation(async()=>{let p;const m=he(he({},Cv),a);let y=he(he({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&s instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",o.encodeMetadata(g)),p.append("",s)):typeof FormData<"u"&&s instanceof FormData?(p=s,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",o.encodeMetadata(g))):(p=s,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!m.duplex&&(m.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))y=xc(y,b,_);return{path:c,fullPath:(await Fh(o.fetch,h.toString(),p,he({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var s=this;return s.handleOperation(async()=>{let a=s._getFinalPath(e);const o=he({},s.headers);t?.upsert&&(o["x-upsert"]="true");const c=await Nn(s.fetch,`${s.url}/object/upload/sign/${a}`,{},{headers:o}),u=new URL(s.url+c.url),h=u.searchParams.get("token");if(!h)throw new Gc("No token returned by API");return{signedUrl:u.toString(),path:e,token:h}})}
38async update(e,t,s){return this.uploadOrUpdate("PUT",e,t,s)}async move(e,t,s){var a=this;return a.handleOperation(async()=>await Nn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:s?.destinationBucket},{headers:a.headers}))}async copy(e,t,s){var a=this;return a.handleOperation(async()=>({path:(await Nn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:s?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,s){var a=this;return a.handleOperation(async()=>{let o=a._getFinalPath(e);const c=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let u=await Nn(a.fetch,`${a.url}/object/sign/${o}`,he({expiresIn:t},c?{transform:s.transform}:{}),{headers:a.headers});const h=new URLSearchParams;s?.download&&h.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&h.set("cacheNonce",String(s.cacheNonce));const p=h.toString();return{signedUrl:encodeURI(`${a.url}${u.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,s){var a=this;return a.handleOperation(async()=>{const o=await Nn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),c=new URLSearchParams;s?.download&&c.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&c.set("cacheNonce",String(s.cacheNonce));const u=c.toString();return o.map(h=>he(he({},h),{},{signedUrl:h.signedURL?encodeURI(`${a.url}${h.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,s){const a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(o,t.transform),t?.cacheNonce!=null&&o.set("cacheNonce",String(t.cacheNonce));const c=o.toString(),u=this._getFinalPath(e),h=()=>bo(this.fetch,`${this.url}/${a}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new mx(h,this.shouldThrowOnError)}async info(e){var t=this;const s=t._getFinalPath(e);return t.handleOperation(async()=>Kh(await bo(t.fetch,`${t.url}/object/info/${s}`,{headers:t.headers})))}async exists(e){var t=this;const s=t._getFinalPath(e);try{return await fx(t.fetch,`${t.url}/object/${s}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if(Kc(o)){var a;const c=o instanceof Gh?o.status:o instanceof Ub?(a=o.originalError)===null||a===void 0?void 0:a.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:o}}throw o}}getPublicUrl(e,t){const s=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const o=a.toString(),c=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${s}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await wf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,s){var a=this;return a.handleOperation(async()=>{const o=he(he(he({},gx),t),{},{prefix:e||""});return await Nn(a.fetch,`${a.url}/object/list/${a.bucketId}`,o,{headers:a.headers},s)})}async listV2(e,t){var s=this;return s.handleOperation(async()=>{const a=he({},e);return await Nn(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,a,{headers:s.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const vx="2.106.1",Oo={"X-Client-Info":`storage-js/${vx}`};var bx=class extends si{constructor(e,t={},s,a){const o=new URL(e);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const c=o.href.replace(/\/$/,""),u=he(he({},Oo),t);super(c,u,s,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=t.listBucketOptionsToQueryString(e);return await bo(t.fetch,`${t.url}/bucket${s}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await bo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var s=this;return s.handleOperation(async()=>await Nn(s.fetch,`${s.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async updateBucket(e,t){var s=this;return s.handleOperation(async()=>await Fh(s.fetch,`${s.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:s.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Nn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},_x=class extends si{constructor(e,t={},s){const a=e.replace(/\/$/,""),o=he(he({},Oo),t);super(a,o,s,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Nn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const s=new URLSearchParams;e?.limit!==void 0&&s.set("limit",e.limit.toString()),e?.offset!==void 0&&s.set("offset",e.offset.toString()),e?.sortColumn&&s.set("sortColumn",e.sortColumn),e?.sortOrder&&s.set("sortOrder",e.sortOrder),e?.search&&s.set("search",e.search);const a=s.toString(),o=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await bo(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!cx(e))throw new Gc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new nx({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(s,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...h)=>{try{return{data:await u.apply(o,h),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},wx=class extends si{constructor(e,t={},s){const a=e.replace(/\/$/,""),o=he(he({},Oo),{},{"Content-Type":"application/json"},t);super(a,o,s,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var s=this;return s.handleOperation(async()=>await mn.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var s=this;return s.handleOperation(async()=>await mn.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:s.headers})||{})}},Sx=class extends si{constructor(e,t={},s){const a=e.replace(/\/$/,""),o=he(he({},Oo),{},{"Content-Type":"application/json"},t);super(a,o,s,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
38if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Ex=class extends si{constructor(e,t={},s){const a=e.replace(/\/$/,""),o=he(he({},Oo),{},{"Content-Type":"application/json"},t);super(a,o,s,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await mn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Rx=class extends Ex{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Tx(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,s=this;return t().call(s,e)}async getBucket(e){var t=()=>super.getBucket,s=this;return t().call(s,e)}async listBuckets(e={}){var t=()=>super.listBuckets,s=this;return t().call(s,e)}async deleteBucket(e){var t=()=>super.deleteBucket,s=this;return t().call(s,e)}},Tx=class extends wx{constructor(e,t,s,a){super(e,t,a),this.vectorBucketName=s}async createIndex(e){var t=()=>super.createIndex,s=this;return t().call(s,he(he({},e),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,s=this;return t().call(s,he(he({},e),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,s=this;return t().call(s,s.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,s=this;return t().call(s,s.vectorBucketName,e)}index(e){return new Ax(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Ax=class extends Sx{constructor(e,t,s,a,o){super(e,t,o),this.vectorBucketName=s,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,s=this;return t().call(s,he(he({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(e){var t=()=>super.getVectors,s=this;return t().call(s,he(he({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,s=this;return t().call(s,he(he({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,s=this;return t().call(s,he(he({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,s=this;return t().call(s,he(he({},e),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},Ox=class extends bx{constructor(e,t={},s,a){super(e,t,s,a)}from(e){return new yx(this.url,this.headers,e,this.fetch)}get vectors(){return new Rx(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _x(this.url+"/iceberg",this.headers,this.fetch)}};const $b="2.106.1",Fa=30*1e3,Yh=3,Rh=Yh*Fa,xx="http://localhost:9999",Cx="supabase.auth.token",kx={"X-Client-Info":`gotrue-js/${$b}`},Qh="X-Supabase-Api-Version",Hb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Px=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,jx=600*1e3;
38class ni extends Error{constructor(t,s,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function te(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class Mx extends ni{constructor(t,s,a){super(t,s,a),this.name="AuthApiError",this.status=s,this.code=a}}function Dx(e){return te(e)&&e.name==="AuthApiError"}class Ln extends ni{constructor(t,s){super(t),this.name="AuthUnknownError",this.originalError=s}}class Ts extends ni{constructor(t,s,a,o){super(t,a,o),this.name=s,this.status=a}}class wt extends Ts{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Xl(e){return te(e)&&e.name==="AuthSessionMissingError"}class $a extends Ts{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Zl extends Ts{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Wl extends Ts{constructor(t,s=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function Nx(e){return te(e)&&e.name==="AuthImplicitGrantRedirectError"}class kv extends Ts{constructor(t,s=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class Lx extends Ts{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 Jh extends Ts{constructor(t,s){super(t,"AuthRetryableFetchError",s,void 0)}}function Th(e){return te(e)&&e.name==="AuthRetryableFetchError"}class Pv extends Ts{constructor(t,s,a){super(t,"AuthWeakPasswordError",s,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Xh extends Ts{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Cc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),jv=` 39\r=`.split(""),Ux=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<jv.length;t+=1)e[jv[t].charCodeAt(0)]=-2;for(let t=0;t<Cc.length;t+=1)e[Cc[t].charCodeAt(0)]=t;return e})();function Mv(e,t,s){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Cc[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;s(Cc[a]),t.queuedBits-=6}}function qb(e,t,s){const a=Ux[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)s(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Dv(e){const t=[],s=u=>{t.push(String.fromCodePoint(u))},a={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{Bx(u,a,s)};for(let u=0;u<e.length;u+=1)qb(e.charCodeAt(u),o,c);return t.join("")}function zx(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Ix(e,t){for(let s=0;s<e.length;s+=1){let a=e.charCodeAt(s);if(a>55295&&a<=56319){const o=(a-55296)*1024&65535;a=(e.charCodeAt(s+1)-56320&65535|o)+65536,s+=1}zx(a,t)}}function Bx(e,t,s){if(t.utf8seq===0){if(e<=127){s(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&s(t.codepoint)}}function ei(e){const t=[],s={queue:0,queuedBits:0},a=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)qb(e.charCodeAt(o),s,a);return new Uint8Array(t)}function $x(e){const t=[];return Ix(e,s=>t.push(s)),new Uint8Array(t)}function Vr(e){const t=[],s={queue:0,queuedBits:0},a=o=>{t.push(o)};return e.forEach(o=>Mv(o,s,a)),Mv(null,s,a),t.join("")}function Hx(e){return Math.round(Date.now()/1e3)+e}function qx(){return Symbol("auth-callback")}const kt=()=>typeof window<"u"&&typeof document<"u",Ur={tested:!1,writable:!1},Vb=()=>{if(!kt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ur.tested)return Ur.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ur.tested=!0,Ur.writable=!0}catch{Ur.tested=!0,Ur.writable=!1}return Ur.writable};function Vx(e){const t={},s=new URL(e);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEac
39h((o,c)=>{t[c]=o})}catch{}return s.searchParams.forEach((a,o)=>{t[o]=a}),t}const Gb=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Gx=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ya=async(e,t,s)=>{await e.setItem(t,JSON.stringify(s))},zr=async(e,t)=>{const s=await e.getItem(t);if(!s)return null;try{return JSON.parse(s)}catch{return null}},Ct=async(e,t)=>{await e.removeItem(t)};class Fc{constructor(){this.promise=new Fc.promiseConstructor((t,s)=>{this.resolve=t,this.reject=s})}}Fc.promiseConstructor=Promise;function ec(e){const t=e.split(".");if(t.length!==3)throw new Xh("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!Px.test(t[a]))throw new Xh("JWT not in base64url format");return{header:JSON.parse(Dv(t[0])),payload:JSON.parse(Dv(t[1])),signature:ei(t[2]),raw:{header:t[0],payload:t[1]}}}async function Kx(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Fx(e,t){return new Promise((a,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await e(c);if(!t(c,null,u)){a(u);return}}catch(u){if(!t(c,u)){o(u);return}}})()})}function Yx(e){return("0"+e.toString(16)).substr(-2)}function Qx(){const t=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=s.length;let o="";for(let c=0;c<56;c++)o+=s.charAt(Math.floor(Math.random()*a));return o}return crypto.getRandomValues(t),Array.from(t,Yx).join("")}async function Jx(e){const s=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",s),o=new Uint8Array(a);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function Xx(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const s=await Jx(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ha(e,t,s=!1){const a=Qx();let o=a;s&&(o+="/recovery"),await Ya(e,`${t}-code-verifier`,o);const c=await Xx(a);return[c,a===c?"plain":"s256"]}const Zx=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Wx(e){const t=e.headers.get(Qh);if(!t||!t.match(Zx))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function eC(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function tC(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const nC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function bs(e){if(!nC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Dn(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Ah(){const e={};return new Proxy(e,{get:(t,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const a=s.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function sC(e,t){return new Proxy(e,{get:(s,a,o)=>
39{if(a==="__isInsecureUserWarningProxy")return!0;if(typeof a=="symbol"){const c=a.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,a,o)}return!t.value&&typeof a=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(s,a,o)}})}function Nv(e){return JSON.parse(JSON.stringify(e))}const Ir=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},rC=[502,503,504,520,521,522,523,524,530];async function Lv(e){var t;if(!Gx(e))throw new Jh(Ir(e),0);if(rC.includes(e.status))throw new Jh(Ir(e),e.status);let s;try{s=await e.json()}catch(c){throw new Ln(Ir(c),c)}let a;const o=Wx(e);if(o&&o.getTime()>=Hb["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?a=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(a=s.error_code),a){if(a==="weak_password")throw new Pv(Ir(s),e.status,((t=s.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new wt}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new Pv(Ir(s),e.status,s.weak_password.reasons);throw new Mx(Ir(s),e.status||500,a)}const aC=(e,t,s,a)=>{const o={method:e,headers:t?.headers||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),o.body=JSON.stringify(a),Object.assign(Object.assign({},o),s))};async function ie(e,t,s,a){var o;const c=Object.assign({},a?.headers);c[Qh]||(c[Qh]=Hb["2024-01-01"].name),a?.jwt&&(c.Authorization=`Bearer ${a.jwt}`);const u=(o=a?.query)!==null&&o!==void 0?o:{};a?.redirectTo&&(u.redirect_to=a.redirectTo);const h=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",p=await iC(e,t,s+h,{headers:c,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function iC(e,t,s,a,o,c){const u=aC(t,a,o,c);let h;try{h=await e(s,Object.assign({},u))}catch(p){throw console.error(p),new Jh(Ir(p),0)}if(h.ok||await Lv(h),a?.noResolveJson)return h;try{return await h.json()}catch(p){await Lv(p)}}function xn(e){var t;let s=null;cC(e)&&(s=Object.assign({},e),e.expires_at||(s.expires_at=Hx(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:null;return{data:{session:s,user:a},error:null}}function Uv(e){const t=xn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function tr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function oC(e){return{data:e,error:null}}function lC(e){const{action_link:t,email_otp:s,hashed_token:a,redirect_to:o,verification_type:c}=e,u=Vc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:t,email_otp:s,hashed_token:a,redirect_to:o,verification_type:c},p=Object.assign({},u);return{data:{properties:h,user:p},error:null}}function zv(e){return e}function cC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Oh=["global","local","others"];class uC{_encodePathSegment(t){if(t==="."||t==="..")throw new ni("Invalid path segment");return encodeURIComponent(t)}constructor({url:t="",headers:s={},fetch:a,experimental:o}){this.url=t,this.headers=s,this.fetch=Gb(a),this.experimental=o??{},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(t,s=Oh[0]){if(Oh.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Oh.join(", ")}`);try{return await ie(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(te(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,s={}){try{return await ie(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:tr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:s}=t,a=Vc(t,["options"]),o=Object.assign(Object.assign({},a),s);return"newEmail"in a&&(o.new_email=a?.newEmail,delete o.newEmail),await ie(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:lC,redirectTo:s?.redirectTo})}catch(s){if(te(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:tr})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async listUsers(t){var s,a,o,c,u,h,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ie(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:zv});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const E=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);m[`${R}Page`]=E}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(te(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){bs(t);try{return await ie(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:tr})}catch(s){if(te(s))return{data:{user:null},error:s};throw s}}async updateUserById(t,s){bs(t);try{return await ie(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:s,headers:this.headers,xform:tr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,s=!1){bs(t);
39try{return await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:s},xform:tr})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){bs(t.userId);try{const{data:s,error:a}=await ie(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:s,error:a}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _deleteFactor(t){bs(t.userId),bs(t.id);try{return{data:await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _listOAuthClients(t){var s,a,o,c,u,h,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ie(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(s=t?.page)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:zv});if(y.error)throw y.error;const g=await y.json(),b=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(p=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&p!==void 0?p:[];return _.length>0&&(_.forEach(w=>{const E=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),R=JSON.parse(w.split(";")[1].split("=")[1]);m[`${R}Page`]=E}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(te(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _getOAuthClient(t){try{const s=this._encodePathSegment(t);return await ie(this.fetch,"GET",`${this.url}/admin/oauth/clients/${s}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _updateOAuthClient(t,s){try{const a=this._encodePathSegment(t);return await ie(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${a}`,{body:s,headers:this.headers,xform:o=>({data:o,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{const s=this._encodePathSegment(t);return await ie(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${s}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(t){try{const s=this._encodePathSegment(t);return await ie(this.fetch,"POST",`${this.url}/admin/oauth/clients/${s}/regenerate_secret`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _listCustomProviders(t){try{const s={};return t?.type&&(s.type=t.type),await ie(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:a=>{var o;return{data:{providers:(o=a?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(s){if(te(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(t){try{return await ie(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _getCustomProvider(t){try{const s=this._encodePathSegment(t);return await ie(this.fetch,"GET",`${this.url}/admin/custom-providers/${s}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _updateCustomProvider(t,s){try{const a=this._encodePathSegment(t);return await ie(this.fetch,"PUT",`${this.url}/admin/custom-providers/${a}`,{body:s,headers:this.headers,xform:o=>({data:o,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{const s=this._encodePathSegment(t);return await ie(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${s}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}async _adminListPasskeys(t){Dn(this.experimental),bs(t.userId);try{return await ie(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(te(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(t){Dn(this.experimental),bs(t.userId),bs(t.passkeyId);
39try{return await ie(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(te(s))return{data:null,error:s};throw s}}}function Iv(e={}){return{getItem:t=>e[t]||null,setItem:(t,s)=>{e[t]=s},removeItem:t=>{delete e[t]}}}const Gn={debug:!!(globalThis&&Vb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Kb extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Bv extends Kb{}async function dC(e,t,s){Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const a=new globalThis.AbortController;let o;t>0&&(o=setTimeout(()=>{a.abort(),Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:a.signal},async c=>{if(c){clearTimeout(o),Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,c.name);try{return await s()}finally{Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,c.name)}}else{if(t===0)throw Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Bv(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Gn.debug)try{const u=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(u,null," "))}catch(u){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",u)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(o),await s()}})}catch(c){if(t>0&&clearTimeout(o),c!==null&&typeof c=="object"&&"name"in c&&c.name==="AbortError"&&t>0){if(a.signal.aborted)return Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async u=>{if(u){Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,u.name);try{return await s()}finally{Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,u.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await s()}));throw Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Bv(`Lock "${e}" was released because another request stole it`)}throw c}}function hC(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Fb(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function fC(e){return parseInt(e,16)}function pC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function mC(e){var t;const{chainId:s,domain:a,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:h,requestId:p,resources:m,scheme:y,uri:g,version:b}=e;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=Fb(e.address),w=y?`${y}://${a}`:a,E=e.statement?`${e.statement} 41`:"",R=`${w} wants you to sign in with your Ethereum account: 42${_} 43 44${E}`;
44let A=`URI: ${g} 45Version: ${b} 46Chain ID: ${s}${u?` 47Nonce: ${u}`:""} 48Issued At: ${c.toISOString()}`;if(o&&(A+=` 49Expiration Time: ${o.toISOString()}`),h&&(A+=` 50Not Before: ${h.toISOString()}`),p&&(A+=` 51Request ID: ${p}`),m){let j=` 52Resources:`;for(const k of m){if(!k||typeof k!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${k}`);j+=` 53- ${k}`}A+=j}return`${R} 54${A}`}class dt extends Error{constructor({message:t,code:s,cause:a,name:o}){var c;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(c=o??(a instanceof Error?a.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class kc extends dt{constructor(t,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:t}),this.name="WebAuthnUnknownError",this.originalError=s}}function gC({error:e,options:t}){var s,a,o;const{publicKey:c}=t;if(!c)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new dt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((s=c.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new dt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=c.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new dt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((o=c.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new dt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new dt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new dt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return c.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new dt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new dt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const u=window.location.hostname;if(Yb(u)){if(c.rp.id!==u)return new dt({message:`The RP ID "${c.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new dt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new dt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new dt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new dt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function yC({error:e,options:t}){const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new dt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new dt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;
54if(Yb(a)){if(s.rpId!==a)return new dt({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new dt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new dt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new dt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class vC{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Zh=new vC;function $v(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:s,excludeCredentials:a}=e,o=Vc(e,["challenge","user","excludeCredentials"]),c=ei(t).buffer,u=Object.assign(Object.assign({},s),{id:ei(s.id).buffer}),h=Object.assign(Object.assign({},o),{challenge:c,user:u});if(a&&a.length>0){h.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const m=a[p];h.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:ei(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return h}function Hv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:s}=e,a=Vc(e,["challenge","allowCredentials"]),o=ei(t).buffer,c=Object.assign(Object.assign({},a),{challenge:o});if(s&&s.length>0){c.allowCredentials=new Array(s.length);for(let u=0;u<s.length;u++){const h=s[u];c.allowCredentials[u]=Object.assign(Object.assign({},h),{id:ei(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return c}function qv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e;return{id:e.id,rawId:e.id,response:{attestationObject:Vr(new Uint8Array(e.response.attestationObject)),clientDataJSON:Vr(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Vv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const s=e,a=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Vr(new Uint8Array(o.authenticatorData)),clientDataJSON:Vr(new Uint8Array(o.clientDataJSON)),signature:Vr(new Uint8Array(o.signature)),userHandle:o.userHandle?Vr(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=s.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Yb(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Pc(){var e,t;return!!(kt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Qb(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kc("Browser returned unexpected credential type",t)}:{data:null,error:new kc("Empty credential response",t)}}catch(t){return{data:null,error:gC({error:t,options:e})}}}async function Jb(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kc("Browser returned unexpected credential type",t)}:{data:null,error:new kc("Empty credential response",t)}}
54catch(t){return{data:null,error:yC({error:t,options:e})}}}const bC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},_C={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function jc(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),s=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),a={};for(const o of e)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))a[c]=u;else if(s(u))a[c]=u;else if(t(u)){const h=a[c];t(h)?a[c]=jc(h,u):a[c]=jc(u)}else a[c]=u}return a}function wC(e,t){return jc(bC,e,t||{})}function SC(e,t){return jc(_C,e,t||{})}class EC{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:s,friendlyName:a,signal:o},c){var u;try{const{data:h,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:s});if(!h)return{data:null,error:p};const m=o??Zh.createNewAbortSignal();if(h.webauthn.type==="create"){const{user:y}=h.webauthn.credential_options.publicKey;if(!y.name){const g=a;if(g)y.name=`${y.id}:${g}`;else{const _=(await this.client.getUser()).data.user,w=((u=_?.user_metadata)===null||u===void 0?void 0:u.name)||_?.email||_?.id||"User";y.name=`${y.id}:${w}`}}y.displayName||(y.displayName=y.name)}switch(h.webauthn.type){case"create":{const y=wC(h.webauthn.credential_options.publicKey,c?.create),{data:g,error:b}=await Qb({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=SC(h.webauthn.credential_options.publicKey,c?.request),{data:g,error:b}=await Jb(Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(h){return te(h)?{data:null,error:h}:{data:null,error:new Ln("Unexpected error in challenge",h)}}}async _verify({challengeId:t,factorId:s,webauthn:a}){return this.client.mfa.verify({factorId:s,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!s)return{data:null,error:new ni("rpId is required for WebAuthn authentication")};try{if(!Pc())return{data:null,error:new Ln("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this.challenge({factorId:t,webauthn:{rpId:s,rpOrigins:a},signal:o},{request:c});if(!u)return{data:null,error:h};const{webauthn:p}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:p.type,rpId:s,rpOrigins:a,credential_response:p.credential_response}})}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Ln("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!s)return{data:null,error:new ni("rpId is required for WebAuthn registration")};try{if(!Pc())return{data:null,error:new Ln("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this._enroll({friendlyName:t});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:h};const{data:p,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:s,rpOrigins:a},signal:o},{create:c});return p?this._verify({factorId:u.id,challengeId:p.challengeId,webauthn:{rpId:s,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Ln("Unexpected error in register",u)}}}}hC();const RC={url:xx,storageKey:Cx,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:kx,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Gv(e,t,s){return await s()}const qa={};class _o{get jwks(){var t,s;return(s=(t=qa[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(t){qa[this.storageKey]=Object.assign(Object.assign({},qa[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,s;return(s=(t=qa[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){qa[this.storageKey]=Object.assign(Object.assign({},qa[this.storageKey]),{cachedAt:t})}constructor(t){var s,a,o,c;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},RC),t);
54if(this.storageKey=u.storageKey,this.instanceID=(s=_o.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,_o.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&kt()){const h=`${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(h),this.logDebugMessages&&console.trace(h)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(a=u.experimental)!==null&&a!==void 0?a:{},this.admin=new uC({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=Gb(u.fetch),this.lock=u.lock||Gv,this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock?this.lock=u.lock:this.persistSession&&kt()&&(!((o=globalThis?.navigator)===null||o===void 0)&&o.locks)?this.lock=dC:this.lock=Gv,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 EC(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:Vb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Iv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=Iv(this.memoryStorage)),kt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(h){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",h)}(c=this.broadcastChannel)===null||c===void 0||c.addEventListener("message",async h=>{this._debug("received broadcast notification from other tab or client",h);try{await this._notifyAllSubscribers(h.data.event,h.data.session,!1)}catch(p){this._debug("#broadcastChannel","error",p)}})}u.skipAutoInitialize||this.initialize().catch(h=>{this._debug("#initialize()","error",h)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${$b}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let s={},a="none";if(kt()&&(s=Vx(window.location.href),this._isImplicitGrantCallback(s)?a="implicit":await this._isPKCECallback(s)&&(a="pkce")),kt()&&this.detectSessionInUrl&&a!=="none"){const{data:o,error:c}=await this._getSessionFromURL(s,a);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),Nx(c)){const p=(t=c.details)===null||t===void 0?void 0:t.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:h}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",h),await this._saveSession(u),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return te(s)?this._returnResult({error:s}):this._returnResult({error:new Ln("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var s,a,o;try{const c=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(s=t?.options)===null||s===void 0?void 0:s.data)!==null&&a!==void 0?a:{}
54,gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:xn}),{data:u,error:h}=c;if(h||!u)return this._returnResult({data:{user:null,session:null},error:h});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(te(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(t){var s,a,o;try{let c;if("email"in t){const{email:y,password:g,options:b}=t;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await Ha(this.storage,this.storageKey)),c=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:g,data:(s=b?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:w},xform:xn})}else if("phone"in t){const{phone:y,password:g,options:b}=t;c=await ie(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:xn})}else throw new Zl("You must provide either an email or phone number and a password");const{data:u,error:h}=c;if(h||!u)return await Ct(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(t){try{let s;if("email"in t){const{email:c,password:u,options:h}=t;s=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Uv})}else if("phone"in t){const{phone:c,password:u,options:h}=t;s=await ie(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:Uv})}else throw new Zl("You must provide either an email or phone number and a password");const{data:a,error:o}=s;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!a||!a.session||!a.user){const c=new $a;return this._returnResult({data:{user:null,session:null},error:c})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:o})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(t){var s,a,o,c;return await this._handleProviderSignIn(t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(c=t.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:s}=t;switch(s){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(t){var s,a,o,c,u,h,p,m,y,g,b;let _,w;if("message"in t)_=t.message,w=t.signature;else{const{chain:E,wallet:R,statement:A,options:j}=t;let k;if(kt())if(typeof R=="object")k=R;else{const J=window;if("ethereum"in J&&typeof J.ethereum=="object"&&"request"in J.ethereum&&typeof J.ethereum.request=="function")k=J.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof R!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=R}const D=new URL((s=j?.url)!==null&&s!==void 0?s:window.location.href),Q=await k.request({method:"eth_requestAccounts"}).then(J=>J).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!Q||Q.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const G=Fb(Q[0]);let I=(a=j?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!I){const J=await k.request({method:"eth_chainId"});I=fC(J)}const $={domain:D.host,address:G,statement:A,uri:D.href,version:"1",chainId:I,nonce:(o=j?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=j?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(h=j?.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(p=j?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(m=j?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=j?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=mC($),w=await k.request({method:"personal_sign",params:[pC(_),G]})}try{const{data:E,error:R}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:xn});if(R)throw R;if(!E||!E.session||!E.user){const A=new $a;return this._returnResult({data:{user:null,session:null},error:A})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:R})}
54catch(E){if(te(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async signInWithSolana(t){var s,a,o,c,u,h,p,m,y,g,b,_;let w,E;if("message"in t)w=t.message,E=t.signature;else{const{chain:R,wallet:A,statement:j,options:k}=t;let D;if(kt())if(typeof A=="object")D=A;else{const G=window;if("solana"in G&&typeof G.solana=="object"&&("signIn"in G.solana&&typeof G.solana.signIn=="function"||"signMessage"in G.solana&&typeof G.solana.signMessage=="function"))D=G.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof A!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");D=A}const Q=new URL((s=k?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in D&&D.signIn){const G=await D.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},k?.signInWithSolana),{version:"1",domain:Q.host,uri:Q.href}),j?{statement:j}:null));let I;if(Array.isArray(G)&&G[0]&&typeof G[0]=="object")I=G[0];else if(G&&typeof G=="object"&&"signedMessage"in G&&"signature"in G)I=G;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)w=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),E=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in D)||typeof D.signMessage!="function"||!("publicKey"in D)||typeof D!="object"||!D.publicKey||!("toBase58"in D.publicKey)||typeof D.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${Q.host} wants you to sign in with your Solana account:`,D.publicKey.toBase58(),...j?["",j,""]:[""],"Version: 1",`URI: ${Q.href}`,`Issued At: ${(o=(a=k?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=k?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${k.signInWithSolana.notBefore}`]:[],...!((u=k?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${k.signInWithSolana.expirationTime}`]:[],...!((h=k?.signInWithSolana)===null||h===void 0)&&h.chainId?[`Chain ID: ${k.signInWithSolana.chainId}`]:[],...!((p=k?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${k.signInWithSolana.nonce}`]:[],...!((m=k?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${k.signInWithSolana.requestId}`]:[],...!((g=(y=k?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...k.signInWithSolana.resources.map(I=>`- ${I}`)]:[]].join(` 55`);const G=await D.signMessage(new TextEncoder().encode(w),"utf8");if(!G||!(G instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");E=G}}try{const{data:R,error:A}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Vr(E)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:xn});if(A)throw A;if(!R||!R.session||!R.user){const j=new $a;return this._returnResult({data:{user:null,session:null},error:j})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:A})}catch(R){if(te(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async _exchangeCodeForSession(t){const s=await zr(this.storage,`${this.storageKey}-code-verifier`),[a,o]=(s??"").split("/");try{if(!a&&this.flowType==="pkce")throw new Lx;const{data:c,error:u}=await ie(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:xn});if(await Ct(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const h=new $a;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:o??null}),error:u})}catch(c){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(t){try{const{options:s,provider:a,token:o,access_token:c,nonce:u}=t,h=await ie(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:xn}),{data:p,error:m}=h;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new $a;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:m})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(t){var s,a,o,c,u;try{if("email"in t){const{email:h,options:p}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await Ha(this.storage,this.storageKey));const{error:g}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(a=p?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:m,code_challenge_method:y},redirectTo:p?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in t){const{phone:h,options:p}=t,{data:m,error:y}=await ie(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,data:(o=p?.data)!==null&&o!==void 0?o:{},create_user:(c=p?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(u=p?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new Zl("You must provide either an email or phone number.")}catch(h){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),te(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(t){var s,a;try{let o,c;"options"in t&&(o=(s=t.options)===null||s===void 0?void 0:s.redirectTo,c=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:u,error:h}=await ie(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:xn});if(h)throw h;if(!u)throw new Error("An error occurred on token verification.");const p=u.session,m=u.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(o){if(te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var s,a,o,c,u;try{let h=null,p=null;this.flowType==="pkce"&&([h,p]=await Ha(this.storage,this.storageKey));const m=await ie(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(s=t.options)===null||s===void 0?void 0:s.redirectTo)!==null&&a!==void 0?a:void 0}
55),!((o=t?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:p}),headers:this.headers,xform:oC});return!((c=m.data)===null||c===void 0)&&c.url&&kt()&&!(!((u=t.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(h){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),te(h))return this._returnResult({data:null,error:h});throw h}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)throw a;if(!s)throw new wt;const{error:o}=await ie(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(te(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const s=`${this.url}/resend`;if("email"in t){const{email:a,type:o,options:c}=t,{error:u}=await ie(this.fetch,"POST",s,{headers:this.headers,body:{email:a,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}},redirectTo:c?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:a,type:o,options:c}=t,{data:u,error:h}=await ie(this.fetch,"POST",s,{headers:this.headers,body:{phone:a,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:h})}throw new Zl("You must provide either an email or phone number and a type")}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async s=>s))}async _acquireLock(t,s){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await a,await s()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=s();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await t(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const s=await zr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?t=s:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Rh:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const u=await zr(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=Ah()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=sC(t.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{session:null},error:c}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(t){try{return t?await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:tr}):await this._useSession(async s=>{var a,o,c;const{data:u,error:h}=s;if(h)throw h;return!(!((a=u.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new wt}:await ie(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&c!==void 0?c:void 0,xform:tr})})}catch(s){if(te(s))return Xl(s)&&(await this._removeSession(),await Ct(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(t,s={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,s))}async _updateUser(t,s={}){try{return await this._useSession(async a=>{const{data:o,error:c}=a;if(c)throw c;if(!o.session)throw new wt;const u=o.session;let h=null,p=null;this.flowType==="pkce"&&t.email!=null&&([h,p]=await Ha(this.storage,this.storageKey));const{data:m,error:y}=await ie(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:s?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:h,code_challenge_method:p}),jwt:u.access_token,xform:tr});if(y)throw y;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(a){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),te(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new wt;const s=Date.now()/1e3;let a=s,o=!0,c=null;const{payload:u}=ec(t.access_token);if(u.exp&&(a=u.exp,o=a<=s),o){const{data:h,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!h)return{data:{user:null,session:null},error:null};c=h}else{const{data:h,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});c={access_token:t.access_token,refresh_token:t.refresh_token,user:h.user,token_type:"bearer",expires_in:a-s,expires_at:a},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(s){if(te(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async s=>{var a;if(!t){const{data:u,error:h}=s;if(h)throw h;t=(a=u.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new wt;const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(te(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(t,s){var a;try{if(!kt())throw new Wl("No browser detected.");
55if(t.error||t.error_description||t.error_code)throw new Wl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new kv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Wl("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new kv("No code detected.");const{data:k,error:D}=await this._exchangeCodeForSession(t.code);if(D)throw D;const Q=new URL(window.location.href);return Q.searchParams.delete("code"),window.history.replaceState(window.history.state,"",Q.toString()),{data:{session:k.session,redirectType:(a=k.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:h,expires_in:p,expires_at:m,token_type:y}=t;if(!u||!p||!h||!y)throw new Wl("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(p);let _=g+b;m&&(_=parseInt(m));const w=_-g;w*1e3<=Fa&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const E=_-b;g-E>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",E,_,g):g-E<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",E,_,g);const{data:R,error:A}=await this._getUser(u);if(A)throw A;const j={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:b,expires_at:_,refresh_token:h,token_type:y,user:R.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:j,redirectType:t.type},error:null})}catch(o){if(te(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const s=await zr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&s)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async s=>{var a;const{data:o,error:c}=s;if(c&&!Xl(c))return this._returnResult({error:c});const u=(a=o.session)===null||a===void 0?void 0:a.access_token;if(u){const{error:h}=await this.admin.signOut(u,t);if(h&&!(Dx(h)&&(h.status===404||h.status===401||h.status===403)||Xl(h)))return this._returnResult({error:h})}return t!=="others"&&(await this._removeSession(),await Ct(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const s=qx(),a={id:s,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,a),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)})))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async s=>{var a,o;try{const{data:{session:c},error:u}=s;if(u)throw u;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",t,"session",c)}catch(c){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",c),Xl(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(t,s={}){let a=null,o=null;this.flowType==="pkce"&&([a,o]=await Ha(this.storage,this.storageKey,!0));try{return await ie(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:o,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:s.redirectTo})}catch(c){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),te(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var t;try{const{data:s,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=s.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var s;try{const{data:a,error:o}=await this._useSession(async c=>{var u,h,p,m,y;const{data:g,error:b}=c;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(h=t.options)===null||h===void 0?void 0:h.scopes,queryParams:(p=t.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await ie(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(m=g.session)===null||m===void 0?void 0:m.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return kt()&&!(!((s=t.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(te(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async s=>{var a;try{const{error:o,data:{session:c}}=s;
55if(o)throw o;const{options:u,provider:h,token:p,access_token:m,nonce:y}=t,g=await ie(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=c?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:h,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:xn}),{data:b,error:_}=g;return _?this._returnResult({data:{user:null,session:null},error:_}):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new $a}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(o){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async s=>{var a,o;const{data:c,error:u}=s;if(u)throw u;return await ie(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(a=c.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(t){const s=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{const a=Date.now();return await Fx(async o=>(o>0&&await Kx(200*Math.pow(2,o-1)),this._debug(s,"refreshing attempt",o),await ie(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:xn})),(o,c)=>{const u=200*Math.pow(2,o);return c&&Th(c)&&Date.now()+u-a<Fa})}catch(a){if(this._debug(s,"error",a),te(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(s,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,s){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",s,"url",a),kt()&&!s.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,s;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const o=await zr(this.storage,this.storageKey);if(o&&this.userStorage){let u=await zr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await Ya(this.userStorage,this.storageKey+"-user",u)),o.user=(t=u?.user)!==null&&t!==void 0?t:Ah()}else if(o&&!o.user&&!o.user){const u=await zr(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await Ct(this.storage,this.storageKey+"-user"),await Ya(this.storage,this.storageKey,o)):o.user=Ah()}if(this._debug(a,"session from storage",o),!this._isValidSession(o)){this._debug(a,"session is not valid"),o!==null&&await this._removeSession();return}const c=((s=o.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<Rh;if(this._debug(a,`session has${c?"":" not"} expired with margin of ${Rh}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(console.error(u),Th(u)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:h}=await this._getUser(o.access_token);!h&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(a,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(a,"error",o),console.error(o);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var s,a;if(!t)throw new wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new Fc;const{data:c,error:u}=await this._refreshAccessToken(t);if(u)throw u;if(!c.session)throw new wt;await this._saveSession(c.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const h={data:c.session,error:null};return this.refreshingDeferred.resolve(h),h}catch(c){if(this._debug(o,"error",c),te(c)){const u={data:null,error:c};return Th(c)||await this._removeSession(),(s=this.refreshingDeferred)===null||s===void 0||s.resolve(u),u}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,s,a=!0){const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",s,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:s});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(t,s)}catch(p){c.push(p)}});if(await Promise.all(u),c.length>0){for(let h=0;h<c.length;h+=1)console.error(c[h]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ct(this.storage,`${this.storageKey}-code-verifier`);const s=Object.assign({},t),a=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&s.user&&await Ya(this.userStorage,this.storageKey+"-user",{user:s.user});const o=Object.assign({},s);delete o.user;const c=Nv(o);await Ya(this.storage,this.storageKey,c)}else{const o=Nv(s);await Ya(this.storage,this.storageKey,o)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ct(this.storage,this.storageKey),await Ct(this.storage,this.storageKey+"-code-verifier"),await Ct(this.storage,this.storageKey+"-user"),this.userStorage&&await Ct(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&kt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}
55catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Fa);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async s=>{const{data:{session:a}}=s;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/Fa);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Fa}ms, refresh threshold is ${Yh} ticks`),o<=Yh&&await this._callRefreshToken(a.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof Kb)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!kt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const s=`#_onVisibilityChanged(${t})`;this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,s,a){const o=[`provider=${encodeURIComponent(s)}`];if(a?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&o.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[c,u]=await Ha(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(h.toString())}if(a?.queryParams){const c=new URLSearchParams(a.queryParams);o.push(c.toString())}return a?.skipBrowserRedirect&&o.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${o.join("&")}`}async _unenroll(t){try{return await this._useSession(async s=>{var a;const{data:o,error:c}=s;return c?this._returnResult({data:null,error:c}):await ie(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(t){try{return await this._useSession(async s=>{var a,o;const{data:c,error:u}=s;if(u)return this._returnResult({data:null,error:u});const h=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:m}=await ie(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(a=c?.session)===null||a===void 0?void 0:a.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&p.type==="totp"&&(!((o=p?.totp)===null||o===void 0)&&o.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var a;const{data:o,error:c}=s;if(c)return this._returnResult({data:null,error:c});const u=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?qv(t.webauthn.credential_response):Vv(t.webauthn.credential_response)})}:{code:t.code}),{data:h,error:p}=await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:u,headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token});return p?this._returnResult({data:null,error:p}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:p}))})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async s=>{var a;const{data:o,error:c}=s;if(c)return this._returnResult({data:null,error:c});const u=await ie(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token});if(u.error)return u;const{data:h}=u;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:$v(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:Hv(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}})}async _challengeAndVerify(t){const{data:s,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:s.id,code:t.code})}async _listFactors(){var t;const{data:{user:s},error:a}=await this.getUser();if(a)return{data:null,error:a};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(t=s?.factors)!==null&&t!==void 0?t:[])o.all.push(c),c.status==="verified"&&o[c.factor_type].push(c);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(t){var s,a,o,c;if(t)try{const{payload:_}=ec(t);let w=null;_.aal&&(w=_.aal);let E=w;const{data:{user:R},error:A}=await this.getUser(t);if(A)return this._returnResult({data:null,error:A});((a=(s=R?.factors)===null||s===void 0?void 0:s.filter(D=>D.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(E="aal2");const k=_.amr||[];return{data:{currentLevel:w,nextLevel:E,currentAuthenticationMethods:k},error:null}}catch(_){if(te(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:u},error:h}
55=await this.getSession();if(h)return this._returnResult({data:null,error:h});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=ec(u.access_token);let m=null;p.aal&&(m=p.aal);let y=m;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const b=p.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async s=>{const{data:{session:a},error:o}=s;return o?this._returnResult({data:null,error:o}):a?await ie(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new wt})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:o},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new wt});const u=await ie(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});
55return u.data&&u.data.redirect_url&&kt()&&!s?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,s){try{return await this._useSession(async a=>{const{data:{session:o},error:c}=a;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new wt});const u=await ie(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&kt()&&!s?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;return a?this._returnResult({data:null,error:a}):s?await ie(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new wt})})}catch(t){if(te(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async s=>{const{data:{session:a},error:o}=s;return o?this._returnResult({data:null,error:o}):a?(await ie(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new wt})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(t,s={keys:[]}){let a=s.keys.find(h=>h.kid===t);if(a)return a;const o=Date.now();if(a=this.jwks.keys.find(h=>h.kid===t),a&&this.jwks_cached_at+jx>o)return a;const{data:c,error:u}=await ie(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=o,a=c.keys.find(h=>h.kid===t),!a)?null:a}async getClaims(t,s={}){try{let a=t;if(!a){const{data:_,error:w}
55=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});a=_.session.access_token}const{header:o,payload:c,signature:u,raw:{header:h,payload:p}}=ec(a);s?.allowExpired||eC(c.exp);const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!m){const{error:_}=await this.getUser(a);if(_)throw _;return{data:{claims:c,header:o,signature:u},error:null}}const y=tC(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,$x(`${h}.${p}`)))throw new Xh("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var s,a,o;Dn(this.experimental);try{if(!Pc())return this._returnResult({data:null,error:new Ln("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const h=Hv(c.options),p=(o=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&o!==void 0?o:Zh.createNewAbortSignal(),{data:m,error:y}=await Jb({publicKey:h,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new Ln("WebAuthn ceremony failed",null)});const g=Vv(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(te(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(t){var s,a;Dn(this.experimental);try{if(!Pc())return this._returnResult({data:null,error:new Ln("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyRegistration();if(c||!o)return this._returnResult({data:null,error:c});const u=$v(o.options),h=(a=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&a!==void 0?a:Zh.createNewAbortSignal(),{data:p,error:m}=await Qb({publicKey:u,signal:h});if(m||!p)return this._returnResult({data:null,error:m??new Ln("WebAuthn ceremony failed",null)});const y=qv(p);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(te(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){Dn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new wt});const{data:o,error:c}=await ie(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(te(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Dn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:o}=s;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new wt});const{data:c,error:u}=await ie(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(t){var s;Dn(this.experimental);try{const{data:a,error:o}=await ie(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=t?.options)===null||s===void 0?void 0:s.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){Dn(this.experimental);try{const{data:s,error:a}=await ie(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:xn});return a?this._returnResult({data:null,error:a}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){Dn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new wt});const{data:o,error:c}=await ie(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(te(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Dn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:o}=s;
55if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new wt});const{data:c,error:u}=await ie(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(t){Dn(this.experimental);try{return await this._useSession(async s=>{const{data:{session:a},error:o}=s;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new wt});const{error:c}=await ie(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(s){if(te(s))return this._returnResult({data:null,error:s});throw s}}}_o.nextInstanceID={};const TC=_o,AC="2.106.1";let io="";typeof Deno<"u"?io="deno":typeof document<"u"?io="web":typeof navigator<"u"&&navigator.product==="ReactNative"?io="react-native":io="node";const OC={"X-Client-Info":`supabase-js-${io}/${AC}`},xC={headers:OC},CC={schema:"public"},kC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},PC={},jC={enabled:!1,respectSamplingDecision:!0};function MC(e,t,s,a){function o(c){return c instanceof s?c:new s(function(u){u(c)})}return new(s||(s=Promise))(function(c,u){function h(y){try{m(a.next(y))}catch(g){u(g)}}function p(y){try{m(a.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(h,p)}m((a=a.apply(e,[])).next())})}let xh=null;const DC="@opentelemetry/api";function NC(){return xh===null&&(xh=import(DC).catch(()=>null)),xh}function LC(){return MC(this,void 0,void 0,function*(){try{const e=yield NC();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const s=t.traceparent;return s?{traceparent:s,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function UC(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[s,a,o,c]=t;if(s.length!==2||a.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(s)||!u.test(a)||!u.test(o)||!u.test(c)||a==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:s,traceId:a,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function zC(e,t){if(!e||!t||t.length===0)return!1;let s;if(e instanceof URL)s=e;else try{s=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(IC(s.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(s.hostname))return!0}else if(typeof a=="function"&&a(s))return!0}catch{continue}return!1}function IC(e,t){if(t===e)return!0;if(t.startsWith("*.")){const s=t.slice(2);if(e.endsWith(s)&&(e===s||e.endsWith("."+s)))return!0}return!1}function BC(e){const t=[];try{const s=new URL(e);t.push(s.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function $C(e,t){if(wo(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(wo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HC(e){var t=$C(e,"string");return wo(t)=="symbol"?t:t+""}function qC(e,t,s){return(t=HC(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Kv(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),s.push.apply(s,a)}return s}function rt(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};
55t%2?Kv(Object(s),!0).forEach(function(a){qC(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Kv(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}const VC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GC=()=>Headers,KC=(e,t,s,a,o)=>{const c=VC(a),u=GC(),h=o?.enabled===!0,p=o?.respectSamplingDecision!==!1,m=h?BC(t):null;return async(y,g)=>{var b;const _=(b=await s())!==null&&b!==void 0?b:e;let w=new u(g?.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${_}`),m){const E=await FC(y,m,p);E&&(E.traceparent&&!w.has("traceparent")&&w.set("traceparent",E.traceparent),E.tracestate&&!w.has("tracestate")&&w.set("tracestate",E.tracestate),E.baggage&&!w.has("baggage")&&w.set("baggage",E.baggage))}return c(y,rt(rt({},g),{},{headers:w}))}};async function FC(e,t,s){if(!zC(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await LC();if(!a||!a.traceparent)return null;if(s){const o=UC(a.traceparent);if(o&&!o.isSampled)return null}return a}function Fv(e){return typeof e=="boolean"?{enabled:e}:e}function YC(e){return e.endsWith("/")?e:e+"/"}function QC(e,t){var s,a,o,c,u,h;const{db:p,auth:m,realtime:y,global:g}=e,{db:b,auth:_,realtime:w,global:E}=t,R=Fv(e.tracePropagation),A=Fv(t.tracePropagation),j={db:rt(rt({},b),p),auth:rt(rt({},_),m),realtime:rt(rt({},w),y),storage:{},global:rt(rt(rt({},E),g),{},{headers:rt(rt({},(s=E?.headers)!==null&&s!==void 0?s:{}),(a=g?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(o=(c=R?.enabled)!==null&&c!==void 0?c:A?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(h=R?.respectSamplingDecision)!==null&&h!==void 0?h:A?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?j.accessToken=e.accessToken:delete j.accessToken,j}function JC(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(YC(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var XC=class extends TC{constructor(e){super(e)}},ZC=class{constructor(e,t,s){var a,o;this.supabaseUrl=e,this.supabaseKey=t;const c=JC(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,h={db:CC,realtime:PC,auth:rt(rt({},kC),{},{storageKey:u}),global:xC,tracePropagation:jC},p=QC(s??{},h);if(this.settings=p,this.storageKey=(a=p.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(o=p.global.headers)!==null&&o!==void 0?o:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=p.auth)!==null&&m!==void 0?m:{},this.headers,p.global.fetch)}this.fetch=KC(t,e,this._getAccessToken.bind(this),p.global.fetch,p.tracePropagation),this.realtime=this._initRealtimeClient(rt({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 pO(new URL("rest/v1",c).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit}),this.storage=new Ox(this.storageUrl.href,this.headers,this.fetch,s?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new rO(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,s)}
55channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,s;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:o,storageKey:c,flowType:u,lock:h,debug:p,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},_,w){const E={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new XC({url:this.authUrl.href,headers:rt(rt({},E),_),storageKey:c,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:a,userStorage:o,flowType:u,lock:h,debug:p,throwOnError:m,experimental:y,fetch:w,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(R=>R.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new JO(this.realtimeUrl.href,rt(rt({},e),{},{params:rt(rt({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,s){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const WC=(e,t,s)=>new ZC(e,t,s);function ek(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const s=t.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}ek()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function tk(){if(typeof window>"u")return;const e=location.hostname,s=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(R=>e===R||e.endsWith("."+R)),a="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=s?e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+a+")(?:-dev)?(?=\\.|$)","i"))?.[1]??e.match(new RegExp("^("+a+")(?=[.-])","i"))?.[1]:void 0,c=window.parent&&window.parent!==window;if(!o||!c)return localStorage;const u=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),h=u?/^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:""),m=p&&h.test(p)?[p]:u?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",g=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(R,A,j)=>new Promise(k=>{const D=b();let Q=!1,G;const I=re=>{Q||(Q=!0,clearTimeout(G),window.removeEventListener("message",$),k(re))},$=re=>{if(m.indexOf(re.origin)<0)return;const se=re.data;se&&se.type===y&&se.requestId===D&&I(se)};window.addEventListener("message",$);const J={type:R,requestId:D,projectId:o,key:A};j!==void 0&&(J.value=j);for(const re of m)window.parent.postMessage(J,re);G=setTimeout(()=>I(null),g)});let w=!0;const E=250;return{getItem:async R=>{let A=await _("lovable-preview-auth:get",R);return!A&&w&&(await new Promise(j=>setTimeout(j,E)),A=await _("lovable-preview-auth:get",R)),w=!1,A&&A.ok&&typeof A.value=="string"?A.value===""?(localStorage.removeItem(R),null):A.value:localStorage.getItem(R)},setItem:(R,A)=>(localStorage.setItem(R,A),_("lovable-preview-auth:set",R,A).then(()=>{})),removeItem:R=>(localStorage.removeItem(R),_("lovable-preview-auth:remove",R).then(()=>{}))}}function nk(){return WC("https://tsxxowjehqglqbjkmjqs.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InRzeHhvd2plaHFnbHFiamttanFzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzk3MzE5NDgsImV4cCI6MjA5NTMwNzk0OH0.cESlJzDZosGBJ8FzWqCigII3npfPdrLQz0MHOpszo6U",{auth:{storage:tk(),persistSession:!0,autoRefreshToken:!0}})}let Ch;const ke=new Proxy({},{get(e,t,s){return Ch||(Ch=nk()),Reflect.get(Ch,t,s)}}),sk=qr({type:"function"}).client(async({next:e})=>{const{data:t}=await ke.auth.getSession(),s=t.session?.access_token;return e({headers:s?{Authorization:`Bearer ${s}`}:{}})}),rk=qr(),Yv=eO(()=>({requestMiddleware:[rk],functionMiddleware:[sk]}));var xo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ak=class extends xo{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 35,431 bytes, line 55
55this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Sf=new ak,ik={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ok=class{#e=ik;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Gr=new ok;function lk(e){setTimeout(e,0)}var ck=typeof window>"u"||"Deno"in globalThis;function tn(){}function uk(e,t){return typeof e=="function"?e(t):e}function Wh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function or(e,t){return typeof e=="function"?e(t):e}function pn(e,t){return typeof e=="function"?e(t):e}function Qv(e,t){const{type:s="all",exact:a,fetchStatus:o,predicate:c,queryKey:u,stale:h}=e;if(u){if(a){if(t.queryHash!==Ef(u,t.options))return!1}else if(!Eo(t.queryKey,u))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||o&&o!==t.state.fetchStatus||c&&!c(t))}function Jv(e,t){const{exact:s,status:a,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(s){if(So(t.options.mutationKey)!==So(c))return!1}else if(!Eo(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function Ef(e,t){return(t?.queryKeyHashFn||So)(e)}function So(e){return JSON.stringify(e,(t,s)=>tf(s)?Object.keys(s).sort().reduce((a,o)=>(a[o]=s[o],a),{}):s)}function Eo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>Eo(e[s],t[s])):!1}var dk=Object.prototype.hasOwnProperty;function Zb(e,t,s=0){if(e===t)return e;if(s>500)return t;const a=Xv(e)&&Xv(t);if(!a&&!(tf(e)&&tf(t)))return t;const c=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),h=u.length,p=a?new Array(h):{};let m=0;for(let y=0;y<h;y++){const g=a?y:u[y],b=e[g],_=t[g];if(b===_){p[g]=b,(a?y<c:dk.call(e,g))&&m++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){p[g]=_;continue}const w=Zb(b,_,s+1);p[g]=w,w===b&&m++}return c===h&&m===c?e:p}function ef(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Xv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tf(e){if(!Zv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Zv(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Zv(e){return Object.prototype.toString.call(e)==="[object Object]"}function hk(e){return new Promise(t=>{Gr.setTimeout(t,e)})}function nf(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Zb(e,t):t}function fk(e,t,s=0){const a=[...e,t];return s&&a.length>s?a.slice(1):a}function pk(e,t,s=0){const a=[t,...e];return s&&a.length>s?a.slice(0,-1):a}var Rf=Symbol();function Wb(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Rf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function e_(e,t){return typeof e=="function"?e(...t):!!e}function mk(e,t,s){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),e}var Ro=(()=>{let e=()=>ck;return{isServer(){return e()},setIsServer(t){e=t}}})();function sf(){let e,t;const s=new Promise((o,c)=>{e=o,t=c});s.status="pending",s.catch(()=>{});function a(o){Object.assign(s,o),delete s.resolve,delete s.reject}return s.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},s.reject=o=>{a({status:"rejected",reason:o}),t(o)},s}var gk=lk;function yk(){let e=[],t=0,s=h=>{h()},a=h=>{h()},o=gk;const c=h=>{t?e.push(h):o(()=>{s(h)})},u=()=>{const h=e;e=[],h.length&&o(()=>{a(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||u()}return p},batchCalls:h=>(...p)=>{c(()=>{h(...p)})},schedule:c,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{o=h}}}var Pt=yk(),vk=class extends xo{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Mc=new vk;function bk(e){return Math.min(1e3*2**e,3e4)}function t_(e){return(e??"online")==="online"?Mc.isOnline():!0}var rf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function n_(e){let t=!1,s=0,a;const o=sf(),c=()=>o.status!=="pending",u=E=>{if(!c()){const R=new rf(E);b(R),e.onCancel?.(R)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>Sf.isFocused()&&(e.networkMode==="always"||Mc.isOnline())&&e.canRun(),y=()=>t_(e.networkMode)&&e.canRun(),g=E=>{c()||(a?.(),o.resolve(E))},b=E=>{c()||(a?.(),o.reject(E))},_=()=>new Promise(E=>{a=R=>{(c()||m())&&E(R)},e.onPause?.()}).then(()=>{a=void 0,c()||e.onContinue?.()}),w=()=>{if(c())return;let E;const R=s===0?e.initialPromise:void 0;try{E=R??e.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(g).catch(A=>{if(c())return;const j=e.retry??(Ro.isServer()?0:3),k=e.retryDelay??bk,D=typeof k=="function"?k(s,A):k,Q=j===!0||typeof j=="number"&&s<j||typeof j=="function"&&j(s,A);if(t||!Q){b(A);return}s++,e.onFail?.(s,A),hk(D).then(()=>m()?void 0:_()).then(()=>{t?b(A):w()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?w():_().then(w),o)}}var s_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wh(this.gcTime)&&(this.#e=Gr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ro.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Gr.clearTimeout(this.#e),this.#e=void 0)}},_k=class extends s_{#e;#t;#n;#r;#s;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=e0(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=e0(this.options);t.data!==void 0&&(this.setState(Wv(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const s=nf(this.state.data,e,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(tn).catch(tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>pn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>or(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Xb(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a||this.#o()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#o(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},o=()=>{const h=Wb(this.options,t),m=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#a=!1,this.options.persister?this.options.persister(h,m,this):h(m)},u=(()=>{const h={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:o};return a(h),h})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#l({type:"fetch",meta:u.fetchOptions?.meta}),this.#s=n_({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:h=>{h instanceof rf&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(h,p)=>{this.#l({type:"failed",failureCount:h,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const h=await this.#s.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof rf){if(h.silent)return this.#s.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#l({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#l(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...r_(s.data,this.options),fetchMeta:e.meta??null};case"success":const a={...s,...Wv(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),Pt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function r_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:t_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Wv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function e0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,a=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var wk=class extends xo{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=sf(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#s;#i;#a;#o;#l;#f;#p;#u;#d;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),t0(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return af(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return af(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ef(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&n0(this.#t,s,this.options,t)&&this.#h(),this.updateResult(),a&&(this.#t!==s||pn(this.options.enabled,this.#t)!==pn(t.enabled,this.#t)||or(this.options.staleTime,this.#t)!==or(t.staleTime,this.#t))&&this.#g();const o=this.#y();a&&(this.#t!==s||pn(this.options.enabled,this.#t)!==pn(t.enabled,this.#t)||o!==this.#c)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(t,e);return Ek(this,s)&&(this.#r=s,this.#i=this.options,this.#s=this.#t.state),s}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(s,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,a))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(tn)),t}#g(){this.#_();const e=or(this.options.staleTime,this.#t);if(Ro.isServer()||this.#r.isStale||!Wh(e))return;const s=Xb(this.#r.dataUpdatedAt,e)+1;this.#u=Gr.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#c=e,!(Ro.isServer()||pn(this.options.enabled,this.#t)===!1||!Wh(this.#c)||this.#c===0)&&(this.#d=Gr.setInterval(()=>{(this.options.refetchIntervalInBackground||Sf.isFocused())&&this.#h()},this.#c))}#b(){this.#g(),this.#v(this.#y())}#_(){this.#u!==void 0&&(Gr.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#d!==void 0&&(Gr.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const s=this.#t,a=this.options,o=this.#r,c=this.#s,u=this.#i,p=e!==s?e.state:this.#n,{state:m}=e;let y={...m},g=!1,b;if(t._optimisticResults){const $=this.hasListeners(),J=!$&&t0(e,t),re=$&&n0(e,s,t,a);(J||re)&&(y={...y,...r_(m.data,e.options)}),t._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:_,errorUpdatedAt:w,status:E}=y;b=y.data;let R=!1;if(t.placeholderData!==void 0&&b===void 0&&E==="pending"){let $;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?($=o.data,R=!0):$=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,$!==void 0&&(E="success",b=nf(o?.data,$,t),g=!0)}if(t.select&&b!==void 0&&!R)if(o&&b===c?.data&&t.select===this.#l)b=this.#f;else try{this.#l=t.select,b=t.select(b),b=nf(o?.data,b,t),this.#f=b,this.#o=null}catch($){this.#o=$}this.#o&&(_=this.#o,b=this.#f,w=Date.now(),E="error");const A=y.fetchStatus==="fetching",j=E==="pending",k=E==="error",D=j&&A,Q=b!==void 0,I={status:E,fetchStatus:y.fetchStatus,isPending:j,isSuccess:E==="success",isError:k,isInitialLoading:D,isLoading:D,data:b,dataUpdatedAt:y.dataUpdatedAt,error:_,errorUpdatedAt:w,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:A,isRefetching:A&&!j,isLoadingError:k&&!Q,isPaused:y.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:k&&Q,isStale:Tf(e,t),refetch:this.refetch,promise:this.#a,isEnabled:pn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const $=I.data!==void 0,J=I.status==="error"&&!$,re=ge=>{J?ge.reject(I.error):$&&ge.resolve(I.data)},se=()=>{const ge=this.#a=I.promise=sf();re(ge)},fe=this.#a;switch(fe.status){case"pending":e.queryHash===s.queryHash&&re(fe);break;case"fulfilled":(J||I.data!==fe.value)&&se();break;case"rejected":(!J||I.error!==fe.reason)&&se();break}}return I}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#i=this.options,this.#s.data!==void 0&&(this.#p=this.#t),ef(t,e))return;this.#r=t;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#m.size)return!0;const c=new Set(o??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(u=>{const h=u;return this.#r[h]!==e[h]&&c.has(h)})};this.#E({listeners:s()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){Pt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Sk(e,t){return pn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&pn(t.retryOnMount,e)===!1)}function t0(e,t){return Sk(e,t)||e.state.data!==void 0&&af(e,t,t.refetchOnMount)}function af(e,t,s){if(pn(t.enabled,e)!==!1&&or(t.staleTime,e)!=="static"){const a=typeof s=="function"?s(e):s;return a==="always"||a!==!1&&Tf(e,t)}return!1}function n0(e,t,s,a){return(e!==t||pn(a.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Tf(e,s)}function Tf(e,t){return pn(t.enabled,e)!==!1&&e.isStaleByTime(or(t.staleTime,e))}function Ek(e,t){return!ef(e.getCurrentResult(),t)}function s0(e){return{onFetch:(t,s)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=w=>{mk(w,()=>t.signal,()=>y=!0)},b=Wb(t.options,t.fetchOptions),_=async(w,E,R)=>{if(y)return Promise.reject();if(E==null&&w.pages.length)return Promise.resolve(w);const j=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:E,direction:R?"backward":"forward",meta:t.options.meta};return g(G),G})(),k=await b(j),{maxPages:D}=t.options,Q=R?pk:fk;return{pages:Q(w.pages,k,D),pageParams:Q(w.pageParams,E,D)}};if(o&&c.length){const w=o==="backward",E=w?Rk:r0,R={pages:c,pageParams:u},A=E(a,R);h=await _(R,A,w)}else{const w=e??c.length;do{const E=p===0?u[0]??a.initialPageParam:r0(a,h);if(p>0&&E==null)break;h=await _(h,E),p++}while(p<w)}return h};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=m}}}function r0(e,{pages:t,pageParams:s}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,s[a],s):void 0}function Rk(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var Tk=class extends s_{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ak(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=n_({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#s({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#r.canStart();try{if(a)t();else{this.#s({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,s);const u=await this.options.onMutate?.(e,s);u!==this.state.context&&this.#s({type:"pending",context:u,variables:e,isPaused:o})}const c=await this.#r.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,s),await this.options.onSuccess?.(c,e,this.state.context,s),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(c,null,e,this.state.context,s),this.#s({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,e,this.state.context,s)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,s)}catch(u){Promise.reject(u)}throw this.#s({type:"error",error:c}),c}finally{this.#n.runNext(this)}}#s(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Pt.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Ak(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ok=class extends xo{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,s){const a=new Tk({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:s});return this.add(a),a}add(e){this.#e.add(e);const t=tc(e);if(typeof t=="string"){const s=this.#t.get(t);s?s.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=tc(e);if(typeof t=="string"){const s=this.#t.get(t);if(s)if(s.length>1){const a=s.indexOf(e);a!==-1&&s.splice(a,1)}else s[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=tc(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=tc(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Pt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Jv(t,s))}findAll(e={}){return this.getAll().filter(t=>Jv(e,t))}notify(e){Pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Pt.batch(()=>Promise.all(e.map(t=>t.continue().catch(tn))))}};function tc(e){return e.options.scope?.id}var xk=class extends xo{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const a=t.queryKey,o=t.queryHash??Ef(a,t);let c=this.get(o);return c||(c=new _k({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Pt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Qv(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>Qv(e,s)):t}notify(e){Pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Pt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Pt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ck=class{#e;#t;#n;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new xk,this.#t=e.mutationCache||new Ok,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Sf.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Mc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),a=s.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(or(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const a=s.data;return[t,a]})}setQueryData(e,t,s){const a=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(a.queryHash)?.state.data,u=uk(t,c);if(u!==void 0)return this.#e.build(this,a).setData(u,{...s,manual:!0})}setQueriesData(e,t,s){return Pt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Pt.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return Pt.batch(()=>(s.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},a=Pt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(s)));return Promise.all(a).then(tn).catch(tn)}invalidateQueries(e,t={}){return Pt.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},a=Pt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,s);return s.throwOnError||(c=c.catch(tn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(tn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(or(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(tn).catch(tn)}fetchInfiniteQuery(e){return e.behavior=s0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(tn).catch(tn)}ensureInfiniteQueryData(e){return e.behavior=s0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(So(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(a=>{Eo(e,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(e,t){this.#s.set(So(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],s={};return t.forEach(a=>{Eo(e,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ef(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Rf&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},a_=ne.createContext(void 0),kk=e=>{const t=ne.useContext(a_);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Pk=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),X.jsx(a_.Provider,{value:e,children:t})),i_=ne.createContext(!1),jk=()=>ne.useContext(i_);i_.Provider;function Mk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Dk=ne.createContext(Mk()),Nk=()=>ne.useContext(Dk),Lk=(e,t,s)=>{const a=s?.state.error&&typeof e.throwOnError=="function"?e_(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},Uk=e=>{ne.useEffect(()=>{e.clearReset()},[e])},zk=({result:e,errorResetBoundary:t,throwOnError:s,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||e_(s,[e.error,a])),mM=(e,t)=>t.state.data===void 0,Ik=e=>{if(e.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>s(a(...o)):s(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Bk=(e,t)=>e.isLoading&&e.isFetching&&!t,$k=(e,t)=>e?.suspense&&t.isPending,a0=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Hk(e,t,s){const a=jk(),o=Nk(),c=kk(),u=c.defaultQueryOptions(e);c.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const h=c.getQueryCache().get(u.queryHash);u._optimisticResults=a?"isRestoring":"optimistic",Ik(u),Lk(u,o,h),Uk(o);const p=!c.getQueryCache().get(u.queryHash),[m]=ne.useState(()=>new t(c,u)),y=m.getOptimisticResult(u),g=!a&&e.subscribed!==!1;if(ne.useSyncExternalStore(ne.useCallback(b=>{const _=g?m.subscribe(Pt.batchCalls(b)):tn;return m.updateResult(),_},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),ne.useEffect(()=>{m.setOptions(u)},[u,m]),$k(u,y))throw a0(u,m,o);if(zk({result:y,errorResetBoundary:o,throwOnError:u.throwOnError,query:h,suspense:u.suspense}))throw y.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(u,y),u.experimental_prefetchInRender&&!Ro.isServer()&&Bk(y,a)&&(p?a0(u,m,o):h?.promise)?.catch(tn).finally(()=>{m.updateResult()}),u.notifyOnChangeProps?y:m.trackResult(y)}function o_(e,t){return Hk(e,wk)}function qk(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",t.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const Vk=e=>{switch(e){case"success":return Fk;case"info":return Qk;case"warning":return Yk;case"error":return Jk;default:return null}},Gk=Array(12).fill(0),Kk=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},Gk.map((s,a)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),Fk=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Yk=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Qk=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Jk=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Xk=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zk=()=>{const[e,t]=W.useState(document.hidden);return W.useEffect(()=>{const s=()=>{t(document.hidden)};
vendor: 3,892 bytes, line 55
55return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let of=1;class Wk{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const s=this.subscribers.indexOf(t);this.subscribers.splice(s,1)}),this.publish=t=>{this.subscribers.forEach(s=>s(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var s;const{message:a,...o}=t,c=typeof t?.id=="number"||((s=t.id)==null?void 0:s.length)>0?t.id:of++,u=this.toasts.find(p=>p.id===c),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(p=>p.id===c?(this.publish({...p,...t,id:c,title:a}),{...p,...t,id:c,dismissible:h,title:a}):p):this.addToast({title:a,...o,dismissible:h,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:t,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(a=>a({id:s.id,dismiss:!0}))}),t),this.message=(t,s)=>this.create({...s,message:t}),this.error=(t,s)=>this.create({...s,message:t,type:"error"}),this.success=(t,s)=>this.create({...s,type:"success",message:t}),this.info=(t,s)=>this.create({...s,type:"info",message:t}),this.warning=(t,s)=>this.create({...s,type:"warning",message:t}),this.loading=(t,s)=>this.create({...s,type:"loading",message:t}),this.promise=(t,s)=>{if(!s)return;let a;s.loading!==void 0&&(a=this.create({...s,promise:t,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let c=a!==void 0,u;const h=o.then(async m=>{if(u=["resolve",m],W.isValidElement(m))c=!1,this.create({id:a,type:"default",message:m});else if(tP(m)&&!m.ok){c=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${m.status}`):s.error,b=typeof s.description=="function"?await s.description(`HTTP error! status: ${m.status}`):s.description,w=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,...w})}else if(m instanceof Error){c=!1;const g=typeof s.error=="function"?await s.error(m):s.error,b=typeof s.description=="function"?await s.description(m):s.description,w=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,...w})}else if(s.success!==void 0){c=!1;const g=typeof s.success=="function"?await s.success(m):s.success,b=typeof s.description=="function"?await s.description(m):s.description,w=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:b,...w})}}).catch(async m=>{if(u=["reject",m],s.error!==void 0){c=!1;const y=typeof s.error=="function"?await s.error(m):s.error,g=typeof s.description=="function"?await s.description(m):s.description,_=typeof y=="object"&&!W.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:g,..._})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),s.finally==null||s.finally.call(s)}),p=()=>new Promise((m,y)=>h.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(t,s)=>{const a=s?.id||of++;return this.create({jsx:t(a),id:a,...s}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const en=new Wk,eP=(e,t)=>{const s=t?.id||of++;return en.addToast({title:e,...t,id:s}),s},tP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",nP=eP,sP=()=>en.toasts,rP=()=>en.getActiveToasts(),gM=Object.assign(nP,{success:en.success,info:en.info,warning:en.warning,error:en.error,custom:en.custom,message:en.message,promise:en.promise,dismiss:en.dismiss,loading:en.loading},{getHistory:sP,getToasts:rP});qk
vendor: 4,787 bytes, line 55
55("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 55
55left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
vendor: 2,339 bytes, line 55
55nc(e){return e.label!==void 0}const aP=3,iP="24px",oP="16px",i0=4e3,lP=356,cP=14,uP=45,dP=200;function Kn(...e){return e.filter(Boolean).join(" ")}function hP(e){const[t,s]=e.split("-"),a=[];return t&&a.push(t),s&&a.push(s),a}const fP=e=>{var t,s,a,o,c,u,h,p,m;const{invert:y,toast:g,unstyled:b,interacting:_,setHeights:w,visibleToasts:E,heights:R,index:A,toasts:j,expanded:k,removeToast:D,defaultRichColors:Q,closeButton:G,style:I,cancelButtonStyle:$,actionButtonStyle:J,className:re="",descriptionClassName:se="",duration:fe,position:ge,gap:Ke,expandByDefault:Le,classNames:L,icons:Y,closeButtonAriaLabel:oe="Close toast"}=e,[Te,ve]=W.useState(null),[C,q]=W.useState(null),[F,Z]=W.useState(!1),[ee,ue]=W.useState(!1),[Ee,pe]=W.useState(!1),[je,Bt]=W.useState(!1),[$t,Ut]=W.useState(!1),[fr,Ht]=W.useState(0),[pr,Xn]=W.useState(0),Un=W.useRef(g.duration||fe||i0),gn=W.useRef(null),Et=W.useRef(null),an=A===0,mr=A+1<=E,gt=g.type,zn=g.dismissible!==!1,yt=g.className||"",Be=g.descriptionClassName||"",tt=W.useMemo(()=>R.findIndex(me=>me.toastId===g.id)||0,[R,g.id]),yn=W.useMemo(()=>{var me;return(me=g.closeButton)!=null?me:G},[g.closeButton,G]),Zn=W.useMemo(()=>g.duration||fe||i0,[g.duration,fe]),ri=W.useRef(0),Wn=W.useRef(0),Co=W.useRef(0),As=W.useRef(null),[gr,zt]=ge.split("-"),Cn=W.useMemo(()=>R.reduce((me,Je,vt)=>vt>=tt?me:me+Je.height,0),[R,tt]),Dt=Zk(),Yc=g.invert||y,ai=gt==="loading";Wn.current=W.useMemo(()=>tt*Ke+Cn,[tt,Cn]),W.useEffect(()=>{Un.current=Zn},[Zn]),W.useEffect(()=>{Z(!0)},[]),W.useEffect(()=>{const me=Et.current;if(me){const Je=me.getBoundingClientRect().height;return Xn(Je),w(vt=>[{toastId:g.id,height:Je,position:g.position},...vt]),()=>w(vt=>vt.filter(Nt=>Nt.toastId!==g.id))}},[w,g.id]),W.useLayoutEffect(()=>{if(!F)return;const me=Et.current,Je=me.style.height;me.style.height="auto";const vt=me.getBoundingClientRect().height;me.style.height=Je,Xn(vt),w(Nt=>Nt.find(We=>We.toastId===g.id)?Nt.map(We=>We.toastId===g.id?{...We,height:vt}:We):[{toastId:g.id,height:vt,position:g.position},...Nt])},[F,g.title,g.description,w,g.id,g.jsx,g.action,g.cancel]);const In=W.useCallback(()=>{ue(!0),Ht(Wn.current),w(me=>me.filter(Je=>Je.toastId!==g.id)),setTimeout(()=>{D(g)},dP)},[g,D,w,Wn]);W.useEffect(()=>{if(g.promise&>==="loading"||g.duration===1/0||g.type==="loading")return;let me;return k||_||Dt?(()=>
vendor: 5,685 bytes, line 55
55{if(Co.current<ri.current){const Nt=new Date().getTime()-ri.current;Un.current=Un.current-Nt}Co.current=new Date().getTime()})():Un.current!==1/0&&(ri.current=new Date().getTime(),me=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),In()},Un.current)),()=>clearTimeout(me)},[k,_,g,gt,Dt,In]),W.useEffect(()=>{g.delete&&(In(),g.onDismiss==null||g.onDismiss.call(g,g))},[In,g.delete]);function Xr(){var me;if(Y?.loading){var Je;return W.createElement("div",{className:Kn(L?.loader,g==null||(Je=g.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":gt==="loading"},Y.loading)}return W.createElement(Kk,{className:Kn(L?.loader,g==null||(me=g.classNames)==null?void 0:me.loader),visible:gt==="loading"})}const Zr=g.icon||Y?.[gt]||Vk(gt);var yr,Bn;return W.createElement("li",{tabIndex:0,ref:Et,className:Kn(re,yt,L?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,L?.default,L?.[gt],g==null||(s=g.classNames)==null?void 0:s[gt]),"data-sonner-toast":"","data-rich-colors":(yr=g.richColors)!=null?yr:Q,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":F,"data-promise":!!g.promise,"data-swiped":$t,"data-removed":ee,"data-visible":mr,"data-y-position":gr,"data-x-position":zt,"data-index":A,"data-front":an,"data-swiping":Ee,"data-dismissible":zn,"data-type":gt,"data-invert":Yc,"data-swipe-out":je,"data-swipe-direction":C,"data-expanded":!!(k||Le&&F),"data-testid":g.testId,style:{"--index":A,"--toasts-before":A,"--z-index":j.length-A,"--offset":`${ee?fr:Wn.current}px`,"--initial-height":Le?"auto":`${pr}px`,...I,...g.style},onDragEnd:()=>{pe(!1),ve(null),As.current=null},onPointerDown:me=>{me.button!==2&&(ai||!zn||(gn.current=new Date,Ht(Wn.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(pe(!0),As.current={x:me.clientX,y:me.clientY})))},onPointerUp:()=>{var me,Je,vt;if(je||!zn)return;As.current=null;const Nt=Number(((me=Et.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Os=Number(((Je=Et.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),We=new Date().getTime()-((vt=gn.current)==null?void 0:vt.getTime()),qt=Te==="x"?Nt:Os,vr=Math.abs(qt)/We;if(Math.abs(qt)>=uP||vr>.11){Ht(Wn.current),g.onDismiss==null||g.onDismiss.call(g,g),q(Te==="x"?Nt>0?"right":"left":Os>0?"down":"up"),In(),Bt(!0);return}else{var Vt,Gt;(Vt=Et.current)==null||Vt.style.setProperty("--swipe-amount-x","0px"),(Gt=Et.current)==null||Gt.style.setProperty("--swipe-amount-y","0px")}Ut(!1),pe(!1),ve(null)},onPointerMove:me=>{var Je,vt,Nt;if(!As.current||!zn||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const We=me.clientY-As.current.y,qt=me.clientX-As.current.x;var vr;const Vt=(vr=e.swipeDirections)!=null?vr:hP(ge);!Te&&(Math.abs(qt)>1||Math.abs(We)>1)&&ve(Math.abs(qt)>Math.abs(We)?"x":"y");let Gt={x:0,y:0};const Wr=kn=>1/(1.5+Math.abs(kn)/20);if(Te==="y"){if(Vt.includes("top")||Vt.includes("bottom"))if(Vt.includes("top")&&We<0||Vt.includes("bottom")&&We>0)Gt.y=We;else{const kn=We*Wr(We);Gt.y=Math.abs(kn)<Math.abs(We)?kn:We}}else if(Te==="x"&&(Vt.includes("left")||Vt.includes("right")))if(Vt.includes("left")&&qt<0||Vt.includes("right")&&qt>0)Gt.x=qt;else{const kn=qt*Wr(qt);Gt.x=Math.abs(kn)<Math.abs(qt)?kn:qt}(Math.abs(Gt.x)>0||Math.abs(Gt.y)>0)&&Ut(!0),(vt=Et.current)==null||vt.style.setProperty("--swipe-amount-x",`${Gt.x}px`),(Nt=Et.current)==null||Nt.style.setProperty("--swipe-amount-y",`${Gt.y}px`)}},yn&&!g.jsx&>!=="loading"?W.createElement("button",{"aria-label":oe,"data-disabled":ai,"data-close-button":!0,onClick:ai||!zn?()=>{}:()=>{In(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Kn(L?.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Bn=Y?.close)!=null?Bn:Xk):null,(gt||g.icon||g.promise)&&g.icon!==null&&(Y?.[gt]!==null||g.icon)?W.createElement("div",{"data-icon":"",className:Kn(L?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Xr():null,g.type!=="loading"?Zr:null):null,W.createElement("div",{"data-content":"",className:Kn(L?.content,g==null||(c=g.classNames)==null?void 0:c.content)},W.createElement("div",{"data-title":"",className:Kn(L?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?W.createElement("div",{"data-description":"",className:Kn(se,Be,L?.description,g==null||(h=g.classNames)==null?void 0:h.description)},typeof g.description=="function"?g.description():g.description):null),W.isValidElement(g.cancel)?g.cancel:g.cancel&&nc(g.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||$,onClick:me=>{nc(g.cancel)&&zn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,me),In())},className:Kn(L?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,W.isValidElement(g.action)?g.action:g.action&&nc(g.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||J,onClick:me=>{nc(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,me),!me.defaultPrevented&&In())},className:Kn(L?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function o0(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function pP(e,t){const s={};return[e,t].forEach((a,o)=>{const c=o===1,u=c?"--mobile-offset":"--offset",h=c?oP:iP;function p(m){["top","right","bottom","left"].forEach(y=>{s[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}
vendor: 7,556 bytes, line 55
55typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(m=>{a[m]===void 0?s[`${u}-${m}`]=h:s[`${u}-${m}`]=typeof a[m]=="number"?`${a[m]}px`:a[m]}):p(h)}),s}const mP=W.forwardRef(function(t,s){const{id:a,invert:o,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:h,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:_,duration:w,style:E,visibleToasts:R=aP,toastOptions:A,dir:j=o0(),gap:k=cP,icons:D,containerAriaLabel:Q="Notifications"}=t,[G,I]=W.useState([]),$=W.useMemo(()=>a?G.filter(F=>F.toasterId===a):G.filter(F=>!F.toasterId),[G,a]),J=W.useMemo(()=>Array.from(new Set([c].concat($.filter(F=>F.position).map(F=>F.position)))),[$,c]),[re,se]=W.useState([]),[fe,ge]=W.useState(!1),[Ke,Le]=W.useState(!1),[L,Y]=W.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),oe=W.useRef(null),Te=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=W.useRef(null),C=W.useRef(!1),q=W.useCallback(F=>{I(Z=>{var ee;return(ee=Z.find(ue=>ue.id===F.id))!=null&&ee.delete||en.dismiss(F.id),Z.filter(({id:ue})=>ue!==F.id)})},[]);return W.useEffect(()=>en.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{I(Z=>Z.map(ee=>ee.id===F.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{vA.flushSync(()=>{I(Z=>{const ee=Z.findIndex(ue=>ue.id===F.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...F},...Z.slice(ee+1)]:[F,...Z]})})})}),[G]),W.useEffect(()=>{if(b!=="system"){Y(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:Z})=>{Y(Z?"dark":"light")})}catch{F.addListener(({matches:ee})=>{try{Y(ee?"dark":"light")}catch(ue){console.error(ue)}})}},[b]),W.useEffect(()=>{G.length<=1&&ge(!1)},[G]),W.useEffect(()=>{const F=Z=>{var ee;if(u.every(pe=>Z[pe]||Z.code===pe)){var Ee;ge(!0),(Ee=oe.current)==null||Ee.focus()}Z.code==="Escape"&&(document.activeElement===oe.current||(ee=oe.current)!=null&&ee.contains(document.activeElement))&&ge(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[u]),W.useEffect(()=>{if(oe.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,C.current=!1)}},[oe.current]),W.createElement("section",{ref:s,"aria-label":`${Q} ${Te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},J.map((F,Z)=>{var ee;const[ue,Ee]=F.split("-");return $.length?W.createElement("ol",{key:F,dir:j==="auto"?o0():j,tabIndex:-1,ref:oe,className:m,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":ue,"data-x-position":Ee,style:{"--front-toast-height":`${((ee=re[0])==null?void 0:ee.height)||0}px`,"--width":`${lP}px`,"--gap":`${k}px`,...E,...pP(y,g)},onBlur:pe=>{C.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(C.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||C.current||(C.current=!0,ve.current=pe.relatedTarget)},onMouseEnter:()=>ge(!0),onMouseMove:()=>ge(!0),onMouseLeave:()=>{Ke||ge(!1)},onDragEnd:()=>ge(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||Le(!0)},onPointerUp:()=>Le(!1)},$.filter(pe=>!pe.position&&Z===0||pe.position===F).map((pe,je)=>{var Bt,$t;return W.createElement(fP,{key:pe.id,icons:D,index:je,toast:pe,defaultRichColors:_,duration:(Bt=A?.duration)!=null?Bt:w,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:o,visibleToasts:R,closeButton:($t=A?.closeButton)!=null?$t:p,interacting:Ke,position:F,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:q,toasts:$.filter(Ut=>Ut.position==pe.position),heights:re.filter(Ut=>Ut.position==pe.position),setHeights:se,expandByDefault:h,gap:k,expanded:fe,swipeDirections:t.swipeDirections})})):null}))}),gP=({...e})=>X.jsx(mP,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e}),yP="/assets/styles-PmjwsOt8.css";function vP(){return X.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:X.jsxs("div",{className:"max-w-md text-center",children:[X.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),X.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),X.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),X.jsx("div",{className:"mt-6",children:X.jsx(bf,{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 bP({error:e,reset:t}){console.error(e);const s=jt();return X.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:X.jsxs("div",{className:"max-w-md text-center",children:[X.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),X.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."}),X.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[X.jsx("button",{onClick:()=>{s.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),X.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 et=kA()({head:()=>{const e="G-MQKVPSMX9T",t=[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"The Health Policy Podcast"},{name:"description",content:"Health Policy Podcast: conversations with the policymakers, providers, payers, and researchers shaping the future of American healthcare."},{property:"og:site_name",content:"The Health Policy Podcast"},{property:"og:title",content:"The Health Policy Podcast"},{property:"og:description",content:"Health Policy Podcast: conversations with the policymakers, providers, payers, and researchers shaping the future of American healthcare."},{property:"og:type",content:"website"},{property:"og:url",content:"https://healthpolicypodcast.com"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"The Health Policy Podcast"},{name:"twitter:description",content:"Health Policy Podcast: conversations with the policymakers, providers, payers, and researchers shaping the future of American healthcare."},{property:"og:image",content:"https://healthpolicypodcast.com/og-image.png"}
55,{property:"og:image:width",content:"1200"},{property:"og:image:height",content:"630"},{name:"twitter:image",content:"https://healthpolicypodcast.com/og-image.png"}],s=[{rel:"stylesheet",href:yP},{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],400;9..144,500;9..144,600;9..144,700;9..144,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap"},{rel:"icon",type:"image/png",href:"/favicon.png"},{rel:"apple-touch-icon",href:"/favicon.png"},{rel:"alternate",type:"application/rss+xml",title:"Health Policy Podcast â RSS",href:"https://feeds.libsyn.com/health-policy-podcast"}],a=[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"PodcastSeries",name:"The Health Policy Podcast",alternateName:"Health Policy Podcast",url:"https://healthpolicypodcast.com",description:"Conversations with the policymakers, providers, payers, and researchers shaping the future of American healthcare."})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"WebSite",name:"The Health Policy Podcast",alternateName:"Health Policy Podcast",url:"https://healthpolicypodcast.com"})},{src:`https://www.googletagmanager.com/gtag/js?id=${e}`,async:!0},{children:`window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','${e}');`}];return{meta:t,links:s,scripts:a}},shellComponent:_P,component:wP,notFoundComponent:vP,errorComponent:bP});function _P({children:e}){return X.jsxs("html",{lang:"en",children:[X.jsx("head",{children:X.jsx(XA,{})}),X.jsxs("body",{children:[e,X.jsx(ZA,{})]})]})}function wP(){const{queryClient:e}=et.useRouteContext();return X.jsxs(Pk,{client:e,children:[X.jsx(Ab,{}),X.jsx(gP,{})]})}const SP="modulepreload",EP=function(e){return"/"+e},l0={},Se=function(t,s,a){let o=Promise.resolve();if(s&&s.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");o=p(s.map(m=>{if(m=EP(m),m in l0)return;l0[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":SP,y||(b.as="script"),b.crossOrigin="",b.href=m,h&&b.setAttribute("nonce",h),document.head.appendChild(b),y)return new Promise((_,w)=>{b.addEventListener("load",_),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return o.then(u=>{for(const h of u||[])h.status==="rejected"&&c(h.reason);return t().catch(c)})},RP=()=>Se(()=>import("./subscribe-CvZBSyK5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),c0="https://healthpolicypodcast.com",TP=Re("/subscribe")({component:we(RP,"component"),head:()=>({meta:[{title:"Subscribe â Health Policy Podcast"},{name:"description",content:"Get Health Policy Podcast episodes, briefings, and dispatches by email or text."},{property:"og:title",content:"Subscribe â Health Policy Podcast"},{property:"og:description",content:"Subscribe by email or text for new episodes and briefings."},{property:"og:type",content:"website"},{property:"og:url",content:`${c0}/subscribe`}],links:[{rel:"canonical",href:`${c0}/subscribe`}]})}),AP=()=>Se(()=>import("./search-CAt_eT6e.js"),__vite__mapDeps([10,1,2,3,4,5,11,8])),OP="https://healthpolicypodcast.com",xP=Re("/search")({component:we(AP,"component"),head:()=>({meta:[{title:"Search â Health Policy Podcast"},{name:"description",content:"Search episodes, guests, and topics on the Health Policy Podcast."}],links:[{rel:"canonical",href:`${OP}/search`}]})}),CP=()=>Se(()=>import("./reset-password-DaQCG1gq.js"),__vite__mapDeps([12,5,3,2,4])),kP=Re("/reset-password")({component:we(CP,"component"),head:()=>({meta:[{title:"Set New Password â Health Policy Podcast"}]})}),PP=()=>Se(()=>import("./privacy-policy-DOxQHNGi.js"),__vite__mapDeps([13,1,2,3,4,5,14])),l_="https://healthpolicypodcast.com",kh=`${l_}/privacy-policy`,sc="Privacy Policy | The Health Policy Podcast",rc="Read the Privacy Policy for The Health Policy Podcast, including information about cookies, analytics, embedded media, and data usage.",jP=Re("/privacy-policy")({component:we(PP,"component"),head:()=>({meta:[{title:sc},{name:"description",content:rc},{property:"og:title",content:sc},{property:"og:description",content:rc},{property:"og:type",content:"website"},{property:"og:url",content:kh},{property:"og:site_name",content:"Health Policy Podcast"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:sc},{name:"twitter:description",content:rc}],links:[{rel:"canonical",href:kh}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"PrivacyPolicy",name:sc,url:kh,description:rc,publisher:{"@type":"Organization",name:"Health Policy Podcast",url:l_}})}]})}),MP=()=>Se(()=>import("./login-D6cDpPAK.js"),__vite__mapDeps([15,5,3,2,4])),DP=Re("/login")({component:we(MP,"component"),head:()=>({meta:[{title:"Admin Login â Atlas Point Podcast OS"}]})}),NP=()=>Se(()=>import("./forgot-password-CPPG9Wq0.js"),__vite__mapDeps([16,5,3,2,4])),LP=Re("/forgot-password")({component:we(NP,"component"),head:()=>({meta:[{title:"Reset Password â Health Policy Podcast"}]})}),UP=()=>Se(()=>import("./contact-DQigaj48.js"),__vite__mapDeps([17,1,2,3,4,5,14,18])),u0="https://healthpolicypodcast.com",zP=Re("/contact")({component:we(UP,"component"),head:()=>({meta:[{title:"Contact â Health Policy Podcast"},{name:"description",content:"Reach the Health Policy Podcast team â guest pitches, media inquiries, partnerships, and listener feedback."},{property:"og:title",content:"Contact â Health Policy Podcast"},{property:"og:description",content:"Get in touch with the Health Policy Podcast team."},{property:"og:type",content:"website"},{property:"og:url",content:`${u0}/contact`}],links:[{rel:"canonical",href:`${u0}/contact`}]})}),IP=()=>Se(()=>import("./admin-BjwjVO5l.js"),__vite__mapDeps([19,20,3,7,8,21])),BP=Re("/admin")({component:we(IP,"component")}
55),$P=()=>Se(()=>import("./about-Db7VPeSd.js"),__vite__mapDeps([22,1,2,3,4,5,14])),lf="https://healthpolicypodcast.com",ac=`${lf}/about`,ic="About The Health Policy Podcast",oc="The Health Policy Podcast features conversations with policymakers, researchers, physicians, economists, patient advocates, and healthcare industry leaders shaping the future of American healthcare.",HP=Re("/about")({component:we($P,"component"),head:()=>({meta:[{title:ic},{name:"description",content:oc},{property:"og:title",content:ic},{property:"og:description",content:oc},{property:"og:type",content:"website"},{property:"og:url",content:ac},{property:"og:site_name",content:"Health Policy Podcast"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:ic},{name:"twitter:description",content:oc}],links:[{rel:"canonical",href:ac}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@graph":[{"@type":"AboutPage",url:ac,name:ic,description:oc},{"@type":"PodcastSeries",name:"The Health Policy Podcast",url:lf,description:"Conversations with policymakers, researchers, physicians, economists, patient advocates, and healthcare industry leaders shaping the future of American healthcare."},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:lf},{"@type":"ListItem",position:2,name:"About",item:ac}]}]})}]})}),qP=()=>Se(()=>import("./index-CPGmtZfT.js"),__vite__mapDeps([23,1,2,3,4,5,14,11,8])),VP=Re("/")({component:we(qP,"component"),head:()=>({meta:[{title:"The Health Policy Podcast â Healthcare policy, reform, and reporting"},{name:"description",content:"Health Policy Podcast covers the people and decisions shaping American healthcare â Medicare, Medicaid, public health, drug pricing, FDA, hospitals, insurance, and reform."},{property:"og:title",content:"The Health Policy Podcast"},{property:"og:description",content:"Inside American healthcare â policy, reform, payers, providers, and public health."},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://healthpolicypodcast.com/"}]})}),GP=()=>Se(()=>import("./topics.index-DSa0SLub.js"),__vite__mapDeps([24,1,2,3,4,5])),d0="https://healthpolicypodcast.com",KP=Re("/topics/")({component:we(GP,"component"),head:()=>({meta:[{title:"Topics â Health Policy Podcast"},{name:"description",content:"Browse Health Policy Podcast topics â energy policy, grid reliability, nuclear power, natural gas, advanced manufacturing, AI power demand, and more."},{property:"og:title",content:"Topics â Health Policy Podcast"},{property:"og:description",content:"Every topic covered on the Health Policy Podcast, from grid reliability to advanced manufacturing."},{property:"og:type",content:"website"},{property:"og:url",content:`${d0}/topics`}],links:[{rel:"canonical",href:`${d0}/topics`}]})}),FP=()=>Se(()=>import("./press-releases.index-CeXWO7y5.js"),__vite__mapDeps([25,1,2,3,4,5])),h0="https://healthpolicypodcast.com",YP=Re("/press-releases/")({component:we(FP,"component"),head:()=>({meta:[{title:"Press Releases â Health Policy Podcast"},{name:"description",content:"Official press releases from the Health Policy Podcast â episode announcements, guest interviews, and editorial coverage of energy, infrastructure, and policy."},{property:"og:title",content:"Press Releases â Health Policy Podcast"},{property:"og:description",content:"Official press releases from the Health Policy Podcast."},{property:"og:type",content:"website"},{property:"og:url",content:`${h0}/press-releases`}],links:[{rel:"canonical",href:`${h0}/press-releases`}]})}),Dc="atlas.selectedPublicationSlug",Nc="health-policy-podcast";let lc=null;function hr(){return lc||(lc=(async()=>{const{data:e}=await ke.from("publications").select("id").eq("slug",Nc).maybeSingle();return e?.id??null})(),lc)}function c_(){return o_({queryKey:["publications"],queryFn:async()=>{const{data:e,error:t}=await ke.from("publications").select("*").order("status").order("name");if(t)throw t;return e??[]},staleTime:300*1e3})}function u_(){const[e,t]=ne.useState(()=>typeof window>"u"?"":localStorage.getItem(Dc)??"");return ne.useEffect(()=>{typeof window>"u"||e&&localStorage.setItem(Dc,e)},[e]),[e,t]}function d_(){const{data:e}=c_(),[t,s]=u_(),a=e?.find(u=>u.slug===t)??null,o=e?.find(u=>u.status==="active")??e?.[0]??null,c=a??o;return ne.useEffect(()=>{e&&c&&c.slug!==t&&(console.debug("[publication] self-healing selection â",c.slug),s(c.slug))},[e,c,t,s]),c}function QP(){return d_()?.id??null}function JP(){return o_({queryKey:["publication",Nc],queryFn:async()=>{const{data:e,error:t}=await ke.from("publications").select("*").eq("slug",Nc).eq("status","active").maybeSingle();if(t)throw t;return e},staleTime:600*1e3})}const bc=new Map;async function h_(e){if(!e)return null;if(bc.has(e))return bc.get(e);const{data:t,error:s}=await ke.from("publications").select("id").eq("slug",e).maybeSingle();return s||!t?null:(bc.set(e,t.id),t.id)}async function f_(){const e=typeof window<"u"&&localStorage.getItem(Dc)||"";if(e){const a=await h_(e);if(a)return console.debug("[publication] resolved",e,"â",a),a;console.warn("[publication] persisted slug not found, falling back:",e)}const{data:t,error:s}=await ke.from("publications").select("id,slug").eq("status","active").order("name").limit(1).maybeSingle();if(s)throw new Error(`Could not load publications: ${s.message}`);if(!t)throw new Error("No active publication available. Create one in Admin â Publications.");return typeof window<"u"&&localStorage.setItem(Dc,t.slug),bc.set(t.slug,t.id),console.debug("[publication] fallback active â",t.slug,t.id),t.id}const XP=f_,yM=Object.freeze(Object.defineProperty({__proto__:null,PUBLIC_PUBLICATION_SLUG:Nc,getCurrentPublicationId:XP,getPublicPublicationId:hr,getPublicationIdBySlug:h_,resolveActivePublicationId:f_,useActivePublication:d_,useActivePublicationId:QP,usePublicPublication:JP,usePublications:c_,useSelectedPublicationSlug:u_},Symbol.toStringTag,{value:"Module"})),ZP={queryKey:["public-orgs-directory"],queryFn:async()=>{const e=await hr();if(!e)return null;const{data:t}=await ke.from("organizations").select("id,name,slug,description,logo_url,website_url").eq("publication_id",e).order("name"),{data:s}=await ke.from("guests").select("organization_id").eq("publication_id",e),a=new Map;for(const o of s??[])o.organization_id&&a.set(o.organization_id,(a.get(o.organization_id)??0)+1);return(t??[]).map(o=>({...o,guest_count:a.get(o.id)??0}))}},WP=()=>Se(()=>import("./organizations.index-ChmfcavW.js"),__vite__mapDeps([26,27,1,2,3,4,5])),f0="https://healthpolicypodcast.com",e2=Re("/organizations/")({loader:({context:e})=>e.queryClient.ensureQueryData(ZP),component:we(WP,"component"),head:()=>({meta:[{title:"Organization Directory â Health Policy Podcast"},{name:"description",content:"Utilities, developers, regulators, and industrial
55companies featured on Health Policy Podcast."},{property:"og:title",content:"Organization Directory â Health Policy Podcast"},{property:"og:description",content:"Utilities, developers, regulators, and industrial companies featured on Health Policy Podcast."},{property:"og:url",content:`${f0}/organizations`},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:`${f0}/organizations`}]})}),t2={queryKey:["public-guests-directory"],queryFn:async()=>{const e=await hr();if(!e)return null;const{data:t}=await ke.from("guests").select("id,name,slug,title,bio,headshot_url,organizations(name,slug)").eq("publication_id",e).order("name"),{data:s}=await ke.from("episodes").select("guest_id").eq("publication_id",e).eq("status","published"),a=new Map;for(const o of s??[])o.guest_id&&a.set(o.guest_id,(a.get(o.guest_id)??0)+1);return(t??[]).map(o=>({...o,episode_count:a.get(o.id)??0}))}},n2=()=>Se(()=>import("./guests.index-CmoEUffb.js"),__vite__mapDeps([28,27,1,2,3,4,5])),p0="https://healthpolicypodcast.com",s2=Re("/guests/")({loader:({context:e})=>e.queryClient.ensureQueryData(t2),component:we(n2,"component"),head:()=>({meta:[{title:"Guest Directory â Health Policy Podcast"},{name:"description",content:"Browse every guest interviewed on Health Policy Podcast â Energy executives, regulators, operators, and policymakers shaping America's power systems."},{property:"og:title",content:"Guest Directory â Health Policy Podcast"},{property:"og:description",content:"Energy and infrastructure leaders interviewed on Health Policy Podcast."},{property:"og:url",content:`${p0}/guests`},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:`${p0}/guests`}]})}),r2=()=>Se(()=>import("./episodes.index-CUc3bqQd.js"),__vite__mapDeps([29,1,2,3,4,5])),m0="https://healthpolicypodcast.com",a2=Re("/episodes/")({component:we(r2,"component"),head:()=>({meta:[{title:"All Episodes â Health Policy Podcast"},{name:"description",content:"Browse every episode of the Health Policy Podcast â interviews on energy policy, grid reliability, nuclear, natural gas, and the power demand reshaping the American economy."},{property:"og:title",content:"All Episodes â Health Policy Podcast"},{property:"og:description",content:"Every interview with the operators, regulators, and innovators powering America's grid, gas, nuclear, and industrial future."},{property:"og:type",content:"website"},{property:"og:url",content:`${m0}/episodes`}],links:[{rel:"canonical",href:`${m0}/episodes`}]})}),i2=()=>Se(()=>import("./topics._slug-BrYSd5Yn.js"),__vite__mapDeps([30,1,2,3,4,5])),o2=Re("/topics/$slug")({component:we(i2,"component"),head:({params:e})=>({meta:[{title:`Topic â ${e.slug}`},{property:"og:type",content:"website"},{property:"og:url",content:`https://healthpolicypodcast.com/topics/${e.slug}`}],links:[{rel:"canonical",href:`https://healthpolicypodcast.com/topics/${e.slug}`}]})}),l2=e=>({queryKey:["public-press-release",e],queryFn:async()=>{const t=await hr();if(!t)return null;const{data:s}=await ke.from("episodes").select("id,title,slug,publish_date,featured_image,featured_image_alt,guests!episodes_guest_id_fkey(name,title,bio,headsh
55ot_url,organizations(name,description,website_url))").eq("publication_id",t).eq("slug",e).eq("status","published").maybeSingle();if(!s)return null;const{data:a}=await ke.from("articles").select("id,title,content,featured_image,featured_image_alt,seo_description,schema_json,created_at,updated_at").eq("publication_id",t).eq("episode_id",s.id).eq("article_type","press_release").maybeSingle();if(!a)return null;const{data:o}=await ke.from("episode_topics").select("topics(id,name,slug)").eq("episode_id",s.id),c=(o??[]).map(p=>p.topics).filter(Boolean),u=c.map(p=>p.id);let h=[];if(u.length){const{data:p}=await ke.from("episode_topics").select("episodes!inner(id,title,slug,publish_date,status,publication_id)").in("topic_id",u).eq("episodes.publication_id",t).eq("episodes.status","published").neq("episode_id",s.id).limit(20),m=new Set;for(const y of p??[]){const g=y.episodes;g&&!m.has(g.id)&&(m.add(g.id),h.push({slug:g.slug,title:g.title,publish_date:g.publish_date}))}h.sort((y,g)=>new Date(g.publish_date??0).getTime()-new Date(y.publish_date??0).getTime()),h=h.slice(0,4)}return{ep:s,pr:a,topics:c,related:h}}}),c2=()=>Se(()=>import("./press-releases._slug-YDZrc-3V.js"),__vite__mapDeps([31,27,1,2,3,4,5,32])),u2=()=>Se(()=>import("./press-releases._slug-C5vvswB0.js"),__vite__mapDeps([33,1,2,3,4,5])),cc="https://healthpolicypodcast.com",d2=Re("/press-releases/$slug")({loader:async({params:e,context:t})=>{const s=await t.queryClient.ensureQueryData(l2(e.slug));if(!s)throw hE();return s},notFoundComponent:we(u2,"notFoundComponent"),head:({params:e,loaderData:t})=>{const s=`${cc}/press-releases/${e.slug}`;if(!t)return{meta:[{title:"Press release not found â Health Policy Podcast"}],links:[{rel:"canonical",href:s}]};const{ep:a,pr:o}=t,c=a.guests,u=c?.organizations,h=a.title||o.title,p=o.seo_description||`Press release covering ${c?.name??"the episode"}${u?.name?` of ${u.name}`:""} on the Health Policy Podcast.`,m=o.featured_image||a.featured_image||void 0,y=o.featured_image_alt||a.featured_image_alt||h,g=a.publish_date||o.created_at,b=[{title:`${h} â Health Policy Podcast`},{name:"description",content:p},{property:"og:title",content:h},{property:"og:description",content:p},{property:"og:type",content:"article"},{property:"og:url",content:s},{property:"og:site_name",content:"Health Policy Podcast"},{name:"twitter:card",content:m?"summary_large_image":"summary"},{name:"twitter:title",content:h},{name:"twitter:description",content:p},{property:"article:published_time",content:String(g)}];m&&(b.push({property:"og:image",content:m}),b.push({property:"og:image:alt",content:y}),b.push({name:"twitter:image",content:m}));const _=[{"@type":"NewsArticle",headline:h,description:p,image:m?[m]:void 0,datePublished:g,dateModified:o.updated_at||g,mainEntityOfPage:s,author:c?.name?{"@type":"Person",name:c.name,jobTitle:c.title||void 0}:{"@type":"Organization",name:"Health Policy Podcast"},publisher:{"@type":"Organization",name:"Health Policy Podcast",url:cc}},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:cc},{"@type":"ListItem",position:2,name:"Press Releases",item:`${cc}/press-releases`},{"@type":"ListItem",position:3,name:h,item:s}]}];return u?.name&&_.push({"@type":"Organization",name:u.name,url:u.website_url||void 0}),{meta:b,links:[{rel:"canonical",href:s}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@graph":_})}]}},component:we(c2,"component")}),h2=e=>({queryKey:["public-org-full",e],queryFn:async()=>{const t=await hr();if(!t)return null;const{data:s}=await ke.from("organizations").select("id,name,slug,description,logo_url,website_url,address,linkedin_url,x_url").eq("publication_id",t).eq("slug",e).maybeSingle();if(!s)return null;const{data:a}=await ke.from("guests").select("id,name,slug,title,headshot_url,bio").eq("publication_id",t).eq("organization_id",s.id).order("name"),o=(a??[]).map(_=>_.id),c=o.length?ke.from("episodes").select("id,title,slug,summary,publish_date,guest_id,guests!episodes_guest_id_fkey(name,slug)").eq("publication_id",t).in("guest_id",o).eq("status","published").order("publish_date",{ascending:!1,nullsFirst:!1}).then(_=>_):Promise.resolve({data:[]}),u=o.length?ke.from("quotes").select("id,quote_text,guest_id").eq("publication_id",t).in("guest_id",o).limit(8).then(_=>_):Promise.resolve({data:[]}),[h,p]=await Promise.all([c,u]),m=h.data??[],y=p.data??[],g=m.map(_=>_.id);let b=[];if(g.length){const{data:_}=await ke.from("episode_topics").select("topics(id,name,slug)").in("episode_id",g),w=new Map;for(const E of _??[])E.topics?.id&&w.set(E.topics.id,E.topics);b=Array.from(w.values()).sort((E,R)=>E.name.localeCompare(R.name))}return{org:s,guests:a??[],episodes:m,quotes:y,topics:b}}}),f2=()=>Se(()=>import("./organizations._slug-J2TapNCJ.js"),__vite__mapDeps([34,27,1,2,3,4,5])),uc="https://healthpolicypodcast.com",p2=Re("/organizations/$slug")({loader:({params:e,context:t})=>t.queryClient.ensureQueryData(h2(e.slug)),component:we(f2,"component"),head:({params:e,loaderData:t})=>{const s=`${uc}/organizations/${e.slug}`;if(!t)return{meta:[{title:"Organization not found â Health Policy Podcast"}],links:[{rel:"canonical",href:s}]};const{org:a,guests:o,episodes:c}=t,u=`${a.name} â Guests & Episodes | Health Policy Podcast`,h=(a.description??`${a.name}: ${o.length} guest${o.length===1?"":"s"} and ${c.length} episode${c.length===1?"":"s"} on Health Policy Podcast.`).slice(0,160),p={"@context":"https://schema.org","@type":"Organization",name:a.name,url:a.website_url||s,logo:a.logo_url||void 0,description:a.description||void 0,member:o.map(y=>({"@type":"Person",name:y.name,jobTitle:y.title||void 0,url:`${uc}/guests/${y.slug}`}))},m={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:uc},{"@type":"ListItem",position:2,name:"Organizations",item:`${uc}/organizations`},{"@type":"ListItem",position:3,name:a.name,item:s}]};return{meta:[{title:u},{name:"description",content:h},{property:"og:title",content:u},{property:"og:description",content:h},{property:"og:type",content:"website"},{property:"og:url",content:s},...a.logo_url?[{property:"og:image",content:a.logo_url}]:[],...a.logo_url?[{name:"twitter:image",content:a.logo_url}]:[],{name:"twitter:card",content:"summary"}],links:[{rel:"canonical",href:s}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@graph":[p,m]})}]}}}),m2=e=>({queryKey:["public-guest-full",e],queryFn:async()=>{const t=await hr();if(!t)return null;const{data:s}
55=await ke.from("guests").select("id,name,slug,title,bio,headshot_url,website_url,linkedin_url,x_url,address,organization_id,organizations(id,name,slug,logo_url,website_url)").eq("publication_id",t).eq("slug",e).maybeSingle();if(!s)return null;const{data:a}=await ke.from("episodes").select("id,title,slug,summary,publish_date,featured_image,libsyn_url,apple_url,spotify_url").eq("publication_id",t).eq("guest_id",s.id).eq("status","published").order("publish_date",{ascending:!1,nullsFirst:!1}),o=(a??[]).map(w=>w.id),c=o.length?ke.from("articles").select("id,title,article_type,episode_id,seo_description,content").eq("publication_id",t).in("episode_id",o).in("article_type",["newsroom","qa"]).then(w=>w):Promise.resolve({data:[]}),u=ke.from("quotes").select("id,quote_text,episode_id").eq("publication_id",t).eq("guest_id",s.id).limit(12).then(w=>w),h=o.length?ke.from("episode_topics").select("topics(id,name,slug)").in("episode_id",o).then(w=>w):Promise.resolve({data:[]}),[p,m,y]=await Promise.all([c,u,h]),g=new Map;for(const w of y.data??[]){const E=w.topics;E?.id&&g.set(E.id,E)}const b=Array.from(g.values()).sort((w,E)=>w.name.localeCompare(E.name));let _=[];if(b.length||s.organization_id){const w=b.map(k=>k.id),E=[];w.length&&E.push(ke.from("episode_topics").select("episodes(guest_id,guests!episodes_guest_id_fkey(id,name,slug,title,headshot_url,organizations(name)))").in("topic_id",w).then(k=>k)),s.organization_id&&E.push(ke.from("guests").select("id,name,slug,title,headshot_url,organizations(name)").eq("organization_id",s.organization_id).then(k=>k));const R=await Promise.all(E),A=new Map;let j=0;if(w.length){for(const k of R[j]?.data??[]){const D=k.episodes?.guests;D?.id&&D.id!==s.id&&A.set(D.id,D)}j++}if(s.organization_id)for(const k of R[j]?.data??[])k.id!==s.id&&A.set(k.id,k);_=Array.from(A.values()).slice(0,6)}return{guest:s,episodes:a??[],articles:p.data??[],quotes:m.data??[],topics:b,relatedGuests:_}}}),g2=()=>Se(()=>import("./guests._slug-FVUNr2JR.js"),__vite__mapDeps([35,27,1,2,3,4,5])),dc="https://healthpolicypodcast.com",y2=Re("/guests/$slug")({loader:({params:e,context:t})=>t.queryClient.ensureQueryData(m2(e.slug)),component:we(g2,"component"),head:({params:e,loaderData:t})=>{const s=`${dc}/guests/${e.slug}`;if(!t)return{meta:[{title:"Guest not found â Health Policy Podcast"}],links:[{rel:"canonical",href:s}]};const{guest:a,episodes:o,topics:c}=t,u=a.organizations,h=`${a.name}${a.title?` â ${a.title}`:""}${u?.name?`, ${u.name}`:""} | Health Policy Podcast`,p=(a.bio?.slice(0,155)??`${a.name}${a.title?`, ${a.title}`:""}${u?.name?` at ${u.name}`:""}. ${o.length} appearance${o.length===1?"":"s"} on Health Policy Podcast.`).slice(0,160),m={"@context":"https://schema.org","@type":"Person",name:a.name,jobTitle:a.title||void 0,image:a.headshot_url||void 0,description:a.bio||void 0,url:s,affiliation:u?.name?{"@type":"Organization",name:u.name,url:u.website_url||void 0}
55:void 0,sameAs:[a.website_url,a.linkedin_url,a.x_url].filter(Boolean),knowsAbout:c.map(g=>g.name),subjectOf:o.map(g=>({"@type":"PodcastEpisode",name:g.title,url:`${dc}/episodes/${g.slug}`,datePublished:g.publish_date}))},y={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:dc},{"@type":"ListItem",position:2,name:"Guests",item:`${dc}/guests`},{"@type":"ListItem",position:3,name:a.name,item:s}]};return{meta:[{title:h},{name:"description",content:p},{property:"og:title",content:h},{property:"og:description",content:p},{property:"og:type",content:"profile"},{property:"og:url",content:s},...a.headshot_url?[{property:"og:image",content:a.headshot_url}]:[],...a.headshot_url?[{name:"twitter:image",content:a.headshot_url}]:[],{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:s}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@graph":[m,y]})}]}}}),v2=e=>({queryKey:["public-episode-full",e],queryFn:async()=>{const t=await hr();if(!t)return null;const{data:s}=await ke.from("episodes").select("id,title,slug,summary,seo_headline,meta_description,publish_date,featured_image,featured_image_alt,use_featured_for_og,use_featured_for_newsroom,libsyn_url,apple_url,spotify_url,transcript,guests!episodes_guest_id_fkey(name,slug,title,bio,headsh
55ot_url,headshot_alt,organizations(name,website_url,logo_url,logo_alt))").eq("publication_id",t).eq("slug",e).eq("status","published").maybeSingle();if(!s)return null;const[a,o,c,u,h]=await Promise.all([ke.from("articles").select("*").eq("publication_id",t).eq("episode_id",s.id).in("article_type",["newsroom","qa"]).order("created_at"),ke.from("articles").select("schema_json,content").eq("publication_id",t).eq("episode_id",s.id).eq("article_type","faq").maybeSingle(),ke.from("episode_topics").select("topics(name,slug,canonical_topic_id)").eq("episode_id",s.id),ke.from("quotes").select("quote_text").eq("publication_id",t).eq("episode_id",s.id).limit(5),ke.from("episode_categories").select("is_primary,categories(name,slug)").eq("episode_id",s.id)]),p={newsroom:0,qa:1},m=(a.data??[]).slice().sort((_,w)=>(p[_.article_type]??99)-(p[w.article_type]??99)),y=(c.data??[]).filter(_=>_.topics&&!_.topics.canonical_topic_id),g=(h.data??[]).map(_=>({isPrimary:_.is_primary,cat:_.categories})).filter(_=>_.cat),b=g.find(_=>_.isPrimary)?.cat??g[0]?.cat??null;return{ep:s,articles:m,faq:o.data?.schema_json??null,topics:y,quotes:u.data??[],primaryCategory:b}}}),b2="Health Policy Podcast";function _2(e){const t=e.customAlt?.trim();if(t)return t;const s=(e.podcastName||b2).trim(),a=(e.title||"").trim(),o=(e.guestName||"").trim();return a?o?`${s} episode featuring ${o} discussing ${a}`:`${s} episode about ${a}`:s}const w2=()=>Se(()=>import("./episodes._slug-DkPJumEr.js"),__vite__mapDeps([36,27,1,2,3,4,5,32,8,37])),hc="https://healthpolicypodcast.com",S2=Re("/episodes/$slug")({loader:({params:e,context:t})=>t.queryClient.ensureQueryData(v2(e.slug)),head:({params:e,loaderData:t})=>{const s=e.slug,a=`${hc}/episodes/${s}`;if(!t)return{meta:[{title:"Episode not found â Health Policy Podcast"}],links:[{rel:"canonical",href:a}]};const{ep:o,faq:c,articles:u}=t,h=o.guests,p=h?.organizations,m=u.find(j=>j.article_type==="newsroom"),y=o.seo_headline||o.title,g=o.meta_description||o.summary?.slice(0,160)||`Interview with ${h?.name??"guest"} on Health Policy Podcast.`,_=(o.use_featured_for_og===!1?void 0:o.featured_image)||m?.featured_image||void 0,w=_2({customAlt:o.featured_image_alt,title:y,guestName:h?.name}),E=[{title:`${y} â Health Policy Podcast`},{name:"description",content:g},{property:"og:title",content:y},{property:"og:description",content:g},{property:"og:type",content:"article"},{property:"og:url",content:a},{property:"og:site_name",content:"Health Policy Podcast"},{name:"twitter:card",content:_?"summary_large_image":"summary"},{name:"twitter:title",content:y},{name:"twitter:description",content:g}];o.publish_date&&E.push({property:"article:published_time",content:String(o.publish_date)}),h?.name&&E.push({property:"article:author",content:h.name}),_&&(E.push({property:"og:image",content:_}),E.push({property:"og:image:alt",content:w}),E.push({name:"twitter:image",content:_}),E.push({name:"twitter:image:alt",content:w}));const R=[{"@type":"Article",headline:y,description:g,image:_?[_]:void 0,datePublished:o.publish_date||void 0,dateModified:o.publish_date||void 0,mainEntityOfPage:a,author:h?.name?{"@type":"Person",name:h.name,jobTitle:h.title||void 0}:void 0,publisher:{"@type":"Organization",name:"Health Policy Podcast",url:hc}},{"@type":"PodcastEpisode",name:o.title,url:a,datePublished:o.publish_date||void 0,description:o.summary||g,associatedMedia:o.libsyn_url?{"@type":"MediaObject",contentUrl:o.libsyn_url}:void 0,partOfSeries:{"@type":"PodcastSeries",name:"Health Policy Podcast",url:hc}},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:hc},{"@type":"ListItem",position:2,name:y,item:a}]}];h?.name&&R.push({"@type":"Person",name:h.name,jobTitle:h.title||void 0,image:h.headshot_url||void 0,worksFor:p?.name?{"@type":"Organization",name:p.name,url:p.website_url||void 0}:void 0}),p?.name&&R.push({"@type":"Organization",name:p.name,url:p.website_url||void 0,logo:p.logo_url||void 0});const A=[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@graph":R})}];return c&&A.push({type:"application/ld+json",children:JSON.stringify(c)}),{meta:E,links:[{rel:"canonical",href:a}],scripts:A}},component:we(w2,"component")}),E2=e=>({queryKey:["public-category",e],queryFn:async()=>{const t=await hr();if(!t)return null;const{data:s}=await ke.from("categories").select("id,name,slug,description,intro,featured_image").eq("publication_id",t).eq("slug",e).maybeSingle();if(!s)return null;const{data:a,error:o}
55=await ke.from("episode_categories").select("episode_id").eq("category_id",s.id);if(o)throw o;const c=Array.from(new Set((a??[]).map(w=>w.episode_id).filter(Boolean))),{data:u,error:h}=c.length?await ke.from("episodes").select("id,title,slug,summary,publish_date,featured_image,featured_image_alt,status,guests!episodes_guest_id_fkey(name,slug,title,headshot_url,organizations(name,slug))").eq("publication_id",t).in("id",c):{data:[],error:null};if(h)throw h;const p=(u??[]).filter(w=>w&&w.status==="published").sort((w,E)=>(E.publish_date??"").localeCompare(w.publish_date??"")),{data:m}=await ke.from("topics").select("id,name,slug,description").eq("publication_id",t).eq("category_id",s.id).is("canonical_topic_id",null).order("name").limit(20),y=new Map;for(const w of p){const E=w.guests;E?.slug&&!y.has(E.slug)&&y.set(E.slug,E)}const g=Array.from(y.values()).slice(0,8),b=new Map;for(const w of p){const E=w.guests?.organizations;E?.slug&&!b.has(E.slug)&&b.set(E.slug,E)}const _=Array.from(b.values()).slice(0,6);return{cat:s,episodes:p,topics:m??[],guests:g,organizations:_}}}),R2=()=>Se(()=>import("./category._slug-BvFE5vtC.js"),__vite__mapDeps([38,27,1,2,3,4,5])),T2="https://healthpolicypodcast.com",A2=Re("/category/$slug")({loader:({params:e,context:t})=>t.queryClient.ensureQueryData(E2(e.slug)),head:({params:e,loaderData:t})=>{const s=`${T2}/category/${e.slug}`,a=t?.cat?.name??"Category",o=t?.cat?.description??`${a} coverage from Health Policy Podcast.`,c=`${a} â Health Policy Podcast`;return{meta:[{title:c},{name:"description",content:o},{property:"og:title",content:c},{property:"og:description",content:o},{property:"og:type",content:"website"},{property:"og:url",content:s}],links:[{rel:"canonical",href:s}]}},component:we(R2,"component")}),O2=()=>Se(()=>import("./admin.index-BZFtCDuy.js"),__vite__mapDeps([39,20,3,7,8])),x2=Re("/admin/")({component:we(O2,"component")}),C2=()=>Se(()=>import("./admin.topics-5asa9zpA.js"),__vite__mapDeps([40,20,3,7,8,5,2,4,18,41,42,9,43,21,44,45])),k2=Re("/admin/topics")({component:we(C2,"component")}),P2=()=>Se(()=>import("./admin.social-BI32XdL1.js"),__vite__mapDeps([46,20,3,7,8])),j2=Re("/admin/social")({component:we(P2,"component")}),M2=()=>Se(()=>import("./admin.settings-1TEWrcIU.js"),__vite__mapDeps([47,20,3,7,8,5,21])),D2=Re("/admin/settings")({component:we(M2,"component")}),N2=()=>Se(()=>import("./admin.publications-w1ub3kcW.js"),__vite__mapDeps([48,20,3,7,8,5,2,4,18,41,42,9,43,21])),L2=Re("/admin/publications")({component:we(N2,"component")}),U2=()=>Se(()=>import("./admin.pages-BTA0HLTS.js"),__vite__mapDeps([49,20,3,7,8])),z2=Re("/admin/pages")({component:we(U2,"component")}),I2=()=>Se(()=>import("./admin.organizations-JATssyV8.js"),__vite__mapDeps([50,20,3,7,8,51,5,2,4,18,41,42,9,43,52,53,21])),B2=Re("/admin/organizations")({component:we(I2,"component")}),$2=()=>Se(()=>import("./admin.incoming-drafts-yJoS1kuu.js"),__vite__mapDeps([54,20,3,7,8,5,2])),H2=Re("/admin/incoming-drafts")({component:we($2,"component")}),q2=()=>Se(()=>import("./admin.guests-PE_K18sD.js"),__vite__mapDeps([55,20,3,7,8,51,5,2,4,18,41,42,9,43,52,53,21])),V2=Re("/admin/guests")({component:we(q2,"component")}),G2=()=>Se(()=>import("./admin.episodes-Bwn00yGq.js"),__vite__mapDeps([56,20,3,7,8,44,5,52,42,9,45])),K2=Re("/admin/episodes")({component:we(G2,"component")}),F2=()=>Se(()=>import("./admin.episode-emails-CW4DJOaV.js"),__vite__mapDeps([57,44,20,3,7,8,5,2,4,18,58])),Y2=Re("/admin/episode-emails")({component:we(F2,"component"),validateSearch:e=>typeof e.id=="string"?{id:e.id}:{}}),Q2=()=>Se(()=>import("./admin.categories-BYjggK0_.js"),__vite__mapDeps([59,20,3,7,8,51,5,2,4,18,41,42,9,43,52,53,21])),J2=Re("/admin/categories")({component:we(Q2,"component")}),X2=()=>Se(()=>import("./admin.articles-1LYH0lR4.js"),__vite__mapDeps([60,20,3,7,8])),Z2=Re("/admin/articles")({component:we(X2,"component")}),W2=()=>Se(()=>import("./admin.graphics.index-DgY3NW_i.js"),__vite__mapDeps([61,20,3,7,8])),ej=Re("/admin/graphics/")({component:we(W2,"component")}),tj=()=>Se(()=>import("./admin.graphics._id-BhEgUpYC.js"),__vite__mapDeps([62,44,20,3,7,8,5,4,2,18,53,43,37])),nj=Re("/admin/graphics/$id")({component:we(tj,"component")}),sj=()=>Se(()=>import("./admin.export._id-CHalOWvh.js"),__vite__mapDeps([63,20,3,7,8,5,18,64,32,53,2,65,37])),r
55j=Re("/admin/export/$id")({component:we(sj,"component")}),aj=()=>Se(()=>import("./admin.pages._slug-aRqJvUO5.js"),__vite__mapDeps([66,20,3,7,8,5,2,4])),ij=Re("/admin/pages/$slug")({component:we(aj,"component")}),oj=()=>Se(()=>import("./admin.episodes.new-DhKrg1Kp.js"),__vite__mapDeps([67,44,20,3,7,8,5,2,4,18,41,42,9,43,21,45])),lj=Re("/admin/episodes/new")({component:we(oj,"component"),validateSearch:e=>({...typeof e.draft=="string"?{draft:e.draft}:{},...e.generate===1||e.generate==="1"?{generate:1}:{}})}),cj=()=>Se(()=>import("./admin.episodes._id-B4i85f_a.js"),__vite__mapDeps([68,44,20,3,7,8,5,2,4,18,45,58,64,32,53,65,6,9])),uj=Re("/admin/episodes/$id")({component:we(cj,"component"),validateSearch:e=>e.generate?{generate:1}:{}}),dj=TP.update({id:"/subscribe",path:"/subscribe",getParentRoute:()=>et}),hj=xP.update({id:"/search",path:"/search",getParentRoute:()=>et}),fj=kP.update({id:"/reset-password",path:"/reset-password",getParentRoute:()=>et}),pj=jP.update({id:"/privacy-policy",path:"/privacy-policy",getParentRoute:()=>et}),mj=DP.update({id:"/login",path:"/login",getParentRoute:()=>et}),gj=LP.update({id:"/forgot-password",path:"/forgot-password",getParentRoute:()=>et}),yj=zP.update({id:"/contact",path:"/contact",getParentRoute:()=>et}),Mt=BP.update({id:"/admin",path:"/admin",getParentRoute:()=>et}),vj=HP.update({id:"/about",path:"/about",getParentRoute:()=>et}),bj=VP.update({id:"/",path:"/",getParentRoute:()=>et}),_j=KP.update({id:"/topics/",path:"/topics/",getParentRoute:()=>et}),wj=YP.update({id:"/press-releases/",path:"/press-releases/",getParentRoute:()=>et}),Sj=e2.update({id:"/organizations/",path:"/organizations/",getParentRoute:()=>et}),Ej=s2.update({id:"/guests/",path:"/guests/",getParentRoute:()=>et}),Rj=a2.update({id:"/episodes/",path:"/episodes/",getParentRoute:()=>et}),Tj=o2.update({id:"/topics/$slug",path:"/topics/$slug",getParentRoute:()=>et}),Aj=d2.update({id:"/press-releases/$slug",path:"/press-releases/$slug",getParentRoute:()=>et}),Oj=p2.update({id:"/organizations/$slug",path:"/organizations/$slug",getParentRoute:()=>et}),xj=y2.update({id:"/guests/$slug",path:"/guests/$slug",getParentRoute:()=>et}),Cj=S2.update({id:"/episodes/$slug",path:"/episodes/$slug",getParentRoute:()=>et}),kj=A2.update({id:"/category/$slug",path:"/category/$slug",getParentRoute:()=>et}),Pj=x2.update({id:"/",path:"/",getParentRoute:()=>Mt}),jj=k2.update({id:"/topics",path:"/topics",getParentRoute:()=>Mt}),Mj=j2.update({id:"/social",path:"/social",getParentRoute:()=>Mt}),Dj=D2.update({id:"/settings",path:"/settings",getParentRoute:()=>Mt}),Nj=L2.update({id:"/publications",path:"/publications",getParentRoute:()=>Mt}),p_=z2.update({id:"/pages",path:"/pages",getParentRoute:()=>Mt}),Lj=B2.update({id:"/organizations",path:"/organizations",getParentRoute:()=>Mt}),Uj=H2.update({id:"/incoming-drafts",path:"/incoming-drafts",getParentRoute:()=>Mt}),zj=V2.update({id:"/guests",path:"/guests",getParentRoute:()=>Mt}),Af=K2.update({id:"/episodes",path:"/episodes",getParentRoute:()=>Mt}),Ij=Y2.update({id:"/episode-emails",path:"/episode-emails",getParentRoute:()=>Mt}),Bj=J2.update({id:"/categories",path:"/categories",getParentRoute:()=>Mt}),$j=Z2.update({id:"/articles",path:"/articles",getParentRoute:()=>Mt}),Hj=ej.update({id:"/graphics/",path:"/graphics/",getParentRoute:()=>Mt}),qj=nj.update({id:"/graphics/$id",path:"/graphics/$id",getParentRoute:()=>Mt}),Vj=rj.update({id:"/export/$id",path:"/export/$id",getParentRoute:()=>Mt}),Gj=ij.update({id:"/$slug",path:"/$slug",getParentRoute:()=>p_}),Kj=lj.update({id:"/new",path:"/new",getParentRoute:()=>Af}),Fj=uj.update({id:"/$id",path:"/$id",getParentRoute:()=>Af}),Yj={AdminEpisodesIdRoute:Fj,AdminEpisodesNewRoute:Kj},Qj=Af._addFileChildren(Yj),Jj={AdminPagesSlugRoute:Gj},Xj=p_._addFileChildren(Jj),Zj={AdminArticlesRoute:$j,AdminCategoriesRoute:Bj,AdminEpisodeEmailsRoute:Ij,AdminEpisodesRoute:Qj,AdminGuestsRoute:zj,AdminIncomingDraftsRoute:Uj,AdminOrganizationsRoute:Lj,AdminPagesRoute:Xj,AdminPublicationsRoute:Nj,AdminSettingsRoute:Dj,AdminSocialRoute:Mj,AdminTopicsRoute:jj,AdminIndexRoute:Pj,AdminExportIdRoute:Vj,AdminGraphicsIdRoute:qj,AdminGraphicsIndexRoute:Hj},Wj=Mt._addFileChildren(Zj),eM={IndexRoute:bj,AboutRoute:vj,AdminRoute:Wj,ContactRoute:yj,ForgotPasswordRoute:gj,LoginRoute:mj,PrivacyPolicyRoute:pj,ResetPasswordRoute:fj,SearchRoute:hj,SubscribeRoute:dj,CategorySlugRoute:kj,EpisodesSlugRoute:Cj,GuestsSlugRoute:xj,OrganizationsSlugRoute:Oj,PressReleasesSlugRoute:Aj,TopicsSlugRoute:Tj,EpisodesIndexRoute:Rj,GuestsIndexRoute:Ej,OrganizationsIndexRoute:Sj,PressReleasesIndexRoute:wj,TopicsIndexRoute:_j},tM=et._addFileChildren(eM),nM=()=>{const e=new Ck;return VA({routeTree:tM,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function sM(){const e=await nM();let t;if(Yv){const s=await Yv.getOptions();s.serializationAdapters=s.serializationAdapters??[],window.__TSS_START_OPTIONS__=s,t=s.seri
55alizationAdapters,e.options.defaultSsr=s.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(Y1),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await J1(e),e}async function rM(){const e=await sM();return window.$_TSR?.h(),e}var Ph;function aM(){return Ph||(Ph=rM()),X.jsx(eA,{promise:Ph,children:e=>X.jsx(FA,{router:e})})}ne.startTransition(()=>{NS.hydrateRoot(document,X.jsx(ne.StrictMode,{children:X.jsx(aM,{})}))});export{v0 as $,Ak as A,Pt as B,tn as C,e_ as D,lM as E,Eb as F,jt as G,ht as H,Br as I,W as J,vA as K,bf as L,mv as M,Vc as N,Ab as O,pM as P,wk as Q,o2 as R,xo as S,c_ as T,d_ as U,u_ as V,g0 as W,sn as X,RE as Y,cM as Z,Se as _,_b as a,qr as a0,WC as a1,F1 as a2,f_ as a3,Y2 as a4,nj as a5,rj as a6,hA as a7,mA as a8,ij as a9,lj as aa,uj as ab,oM as ac,iM as ad,yM as ae,o_ as b,_2 as c,t2 as d,d2 as e,l2 as f,hr as g,p2 as h,h2 as i,X as j,y2 as k,m2 as l,S2 as m,v2 as n,ZP as o,A2 as p,E2 as q,ne as r,ke as s,gM as t,wb as u,Hk as v,mM as w,kk as x,ef as y,So 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.