1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/terms-CNTM5PZD.js","assets/LegalPage-CZpJBMlw.js","assets/Footer-CByVw6dE.js","assets/arrow-left-D5RLes6A.js","assets/sign-up-u_lBGM4N.js","assets/post-auth-redirect-9BqJXWf3.js","assets/loader-circle-BJSgGe5S.js","assets/x-jYWOFlDa.js","assets/sign-in-wPB28jdw.js","assets/reset-password-_iLoIW4m.js","assets/privacy-2NCCv5el.js","assets/onboarding-DzAvkx2s.js","assets/login-D_NKEV-q.js","assets/lc-login-DKOdCuKJ.js","assets/useServerFn-CEXf98D0.js","assets/admin.functions-vfRDAJoD.js","assets/auth-middleware-B62DB3Zb.js","assets/cookies-C_yXd0ve.js","assets/index-CrUH-W7F.js","assets/map-pin-BUZTJy6U.js","assets/users-CeYsQWva.js","assets/check-BbU_BBHd.js","assets/chevron-down-C5hlrNDr.js","assets/briefs.index-CByi3QFk.js","assets/brief-draft-L97wv-XH.js","assets/plus-DAFVlMlf.js","assets/pencil-2U5yyGsy.js","assets/admin.index-DROec-iV.js","assets/chevron-right-CjDw_mAA.js","assets/creator.submissions-B_DI9a-t.js","assets/AppShell-DvW6AB7o.js","assets/logo-lc.svg.asset-CBSHmlfa.js","assets/demo-store-ZrvIcuC2.js","assets/shot-images-CcbTMOFr.js","assets/hoian-lanterns.jpg.asset-Bg-hik4t.js","assets/creator.dashboard-IV7vNtNF.js","assets/BriefCard-2HXcdjbF.js","assets/calendar-xNq9XYWT.js","assets/client.dashboard-B8ZP1xfr.js","assets/Combination-BqCkdEW2.js","assets/circle-QrLdGUhr.js","assets/generateCategoricalChart-Bn32m5Kk.js","assets/download-B3I43hau.js","assets/info-Dnyrblcc.js","assets/shield-alert-ClIPRcLQ.js","assets/clock-DNXqn-wH.js","assets/client.content-performance-DPsck8D3.js","assets/client.account-BJ7kX8rM.js","assets/briefs._id-BWZWSWDY.js","assets/lock-qaT5IVRJ.js","assets/copy-CQSyUQHf.js","assets/app.dashboard-BI050soS.js","assets/amplify.terms-c9bHwBTR.js","assets/amplify-terms-cC4A7vHk.js","assets/amplify.login-B9JGct4R.js","assets/amplify.join-CHOHmrmg.js","assets/amplify-handles-6wIS9gqz.js","assets/types-C_o97gEw.js","assets/amplify.dashboard-CaGytjWD.js","assets/TrialCodeCard-i3Ikrtq1.js","assets/external-link-CXboQl9f.js","assets/amplify.admin-5NZIfBb9.js","assets/amplify-applications.functions-Dfp1dEjt.js","assets/admin.metrics-BuenmaKj.js","assets/creator.briefs.index-Cxxnjgi4.js","assets/client.library.index-DEDRlnTp.js","assets/library-scenes-5tNHY0ew.js","assets/client.briefs.index-BO88weJy.js","assets/amplify.briefs.index-Bkwyo1as.js","assets/creator.upload._briefId-CR8KGwOg.js","assets/ai.functions-B1sPSsJc.js","assets/wand-sparkles-q_GNhYk2.js","assets/creator.briefs._id-BgS5OG3D.js","assets/sparkles-DzGU4A5O.js","assets/client.briefs.new-CUxtnTkj.js","assets/triangle-alert-DD3MHH05.js","assets/client.briefs._id-BWFZ0NDP.js","assets/client.briefs._id-BX798-sZ.js","assets/brief.new.step-3-KQnSpew1.js","assets/BriefWizardShell-CwTlg7ZD.js","assets/brief.new.step-2-Dt6eG4ip.js","assets/brief.new.step-1-CAzqlGc-.js","assets/brief.new.review-vmUOfYkR.js","assets/amplify.briefs._briefSlug-CedSA8QK.js","assets/admin.clients._userId-dGuvxcEv.js","assets/amplify.admin.briefs-CwmPI4HW.js","assets/campaign-types-BpbkMi9T.js","assets/client.library.asset._assetId-oEOP_Ccw.js","assets/video-4.mp4.asset-CQ5ijw1M.js","assets/review-night.jpg.asset-Doqdkhhn.js","assets/amplify.campaigns._campaignSlug.report-OnbyxUzH.js","assets/campaign-report.functions-ByO92UFE.js","assets/client.review.brief-0000131.index-d73datyS.js","assets/amplify.dashboard.verify._submissionId-CnCF3I5w.js","assets/amplify.admin.briefs.new-CDUEyWAH.js","assets/BriefEditor-DsR9uxtq.js","assets/client.review.brief-0000131.asset._assetId-CrF6S-IH.js","assets/amplify.admin.briefs._id.preview-B6UMabsc.js","assets/amplify.admin.briefs._id.edit-DYcIwiz0.js","assets/amplify.campaigns._campaignSlug.report.public._token-Dgsj38e3.js"])))=>i.map(i=>d[i]); 2function IS(e,t){for(var r=0;r<t.length;r++){const a=t[r];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 MM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};
vendor: 4,821 bytes, line 2
2function _0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var df={exports:{}},ao={};var vy;function $S(){if(vy)return ao;vy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(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 f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:c}}return ao.Fragment=t,ao.jsx=r,ao.jsxs=r,ao}var by;function HS(){return by||(by=1,df.exports=$S()),df.exports}var k=HS(),ff={exports:{}},Re={};var wy;function qS(){if(wy)return Re;wy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=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"),f=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 w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,E={};function x(O,G,K){this.props=O,this.context=G,this.refs=E,this.updater=K||_}x.prototype.isReactComponent={},x.prototype.setState=function(O,G){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,G,"setState")},x.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function j(){}j.prototype=x.prototype;function N(O,G,K){this.props=O,this.context=G,this.refs=E,this.updater=K||_}var P=N.prototype=new j;P.constructor=N,R(P,x.prototype),P.isPureReactComponent=!0;var J=Array.isArray;function q(){}var H={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function X(O,G,K){var W=K.ref;return{$$typeof:e,type:O,key:G,ref:W!==void 0?W:null,props:K}}function oe(O,G){return X(O.type,G,O.props)}function se(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function Se(O){var G={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(K){return G[K]})}var Te=/\/+/g;function $e(O,G){return typeof O=="object"&&O!==null&&O.key!=null?Se(""+O.key):G.toString(36)}function je(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(q,q):(O.status="pending",O.then(function(G){O.status==="pending"&&(O.status="fulfilled",O.value=G)},function(G){O.status==="pending"&&(O.status="rejected",O.reason=G)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function M(O,G,K,W,Z){var ae=typeof O;(ae==="undefined"||ae==="boolean")&&(O=null);var xe=!1;if(O===null)xe=!0;else switch(ae){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(O.$$typeof){case e:case t:xe=!0;break;case y:return xe=O._init,M(xe(O._payload),G,K,W,Z)}}if(xe)return Z=Z(O),xe=W===""?"."+$e(O,0):W,J(Z)?(K="",xe!=null&&(K=xe.replace(Te,"$&/")+"/"),M(Z,G,K,"",function(jt){return jt})):Z!=null&&(se(Z)&&(Z=oe(Z,K+(Z.key==null||O&&O.key===Z.key?"":(""+Z.key).replace(Te,"$&/")+"/")+xe)),G.push(Z)),1;xe=0;var we=W===""?".":W+":";if(J(O))for(var ye=0;ye<O.length;ye++)W=O[ye],ae=we+$e(W,ye),xe+=M(W,G,K,ae,Z);else if(ye=w(O),typeof ye=="function")for(O=ye.call(O),ye=0;!(W=O.next()).done;)W=W.value,ae=we+$e(W,ye++),xe+=M(W,G,K,ae,Z);else if(ae==="object"){if(typeof O.then=="function")return M(je(O),G,K,W,Z);throw G=String(O),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Q(O,G,K){if(O==null)return O;var W=[],Z=0;return M(O,W,"","",function(ae){return G.call(K,ae,Z++)}),W}function ie(O){if(O._status===-1){var G=O._result;G=G(),G.then(function(K){(O._status===0||O._status===-1)&&(O._status=1,O._result=K)},function(K){(O._status===0||O._status===-1)&&(O._status=2,O._result=K)}),O._status===-1&&(O._status=0,O._result=G)}if(O._status===1)return O._result.default;throw O._result}var Ae=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)}
vendor: 5,033 bytes, line 2
2,ee={map:Q,forEach:function(O,G,K){Q(O,function(){G.apply(this,arguments)},K)},count:function(O){var G=0;return Q(O,function(){G++}),G},toArray:function(O){return Q(O,function(G){return G})||[]},only:function(O){if(!se(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Re.Activity=g,Re.Children=ee,Re.Component=x,Re.Fragment=r,Re.Profiler=o,Re.PureComponent=N,Re.StrictMode=a,Re.Suspense=p,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Re.__COMPILER_RUNTIME={__proto__:null,c:function(O){return H.H.useMemoCache(O)}},Re.cache=function(O){return function(){return O.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(O,G,K){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var W=R({},O.props),Z=O.key;if(G!=null)for(ae in G.key!==void 0&&(Z=""+G.key),G)!U.call(G,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&G.ref===void 0||(W[ae]=G[ae]);var ae=arguments.length-2;if(ae===1)W.children=K;else if(1<ae){for(var xe=Array(ae),we=0;we<ae;we++)xe[we]=arguments[we+2];W.children=xe}return X(O.type,Z,W)},Re.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},Re.createElement=function(O,G,K){var W,Z={},ae=null;if(G!=null)for(W in G.key!==void 0&&(ae=""+G.key),G)U.call(G,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(Z[W]=G[W]);var xe=arguments.length-2;if(xe===1)Z.children=K;else if(1<xe){for(var we=Array(xe),ye=0;ye<xe;ye++)we[ye]=arguments[ye+2];Z.children=we}if(O&&O.defaultProps)for(W in xe=O.defaultProps,xe)Z[W]===void 0&&(Z[W]=xe[W]);return X(O,ae,Z)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(O){return{$$typeof:f,render:O}},Re.isValidElement=se,Re.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:ie}},Re.memo=function(O,G){return{$$typeof:m,type:O,compare:G===void 0?null:G}},Re.startTransition=function(O){var G=H.T,K={};H.T=K;try{var W=O(),Z=H.S;Z!==null&&Z(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(q,Ae)}catch(ae){Ae(ae)}finally{G!==null&&K.types!==null&&(G.types=K.types),H.T=G}},Re.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Re.use=function(O){return H.H.use(O)},Re.useActionState=function(O,G,K){return H.H.useActionState(O,G,K)},Re.useCallback=function(O,G){return H.H.useCallback(O,G)},Re.useContext=function(O){return H.H.useContext(O)},Re.useDebugValue=function(){},Re.useDeferredValue=function(O,G){return H.H.useDeferredValue(O,G)},Re.useEffect=function(O,G){return H.H.useEffect(O,G)},Re.useEffectEvent=function(O){return H.H.useEffectEvent(O)},Re.useId=function(){return H.H.useId()},Re.useImperativeHandle=function(O,G,K){return H.H.useImperativeHandle(O,G,K)},Re.useInsertionEffect=function(O,G){return H.H.useInsertionEffect(O,G)},Re.useLayoutEffect=function(O,G){return H.H.useLayoutEffect(O,G)},Re.useMemo=function(O,G){return H.H.useMemo(O,G)},Re.useOptimistic=function(O,G){return H.H.useOptimistic(O,G)},Re.useReducer=function(O,G,K){return H.H.useReducer(O,G,K)},Re.useRef=function(O){return H.H.useRef(O)},Re.useState=function(O){return H.H.useState(O)},Re.useSyncExternalStore=function(O,G,K){return H.H.useSyncExternalStore(O,G,K)},Re.useTransition=function(){return H.H.useTransition()},Re.version="19.2.5",Re}var _y;function Uo(){return _y||(_y=1,ff.exports=qS()),ff.exports}var re=Uo();const te=_0(re),PM=IS({__proto__:null,default:te},[re]);var hf={exports:{}},io={},pf={exports:{}},mf={};var Sy;function VS(){return Sy||(Sy=1,(function(e){function t(M,Q){var ie=M.length;M.push(Q);e:for(;0<ie;){var Ae=ie-1>>>1,ee=M[Ae];if(0<o(ee,Q))M[Ae]=Q,M[ie]=ee,ie=Ae;else break e}}function r(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var Q=M[0],ie=M.pop();if(ie!==Q){M[0]=ie;e:for(var Ae=0,ee=M.length,O=ee>>>1;Ae<O;){var G=2*(Ae+1)-1,K=M[G],W=G+1,Z=M[W];if(0>o(K,ie))W<ee&&0>o(Z,K)?(M[Ae]=Z,M[W]=ie,Ae=W):(M[Ae]=K,M[G]=ie,Ae=G);else if(W<ee&&0>o(Z,ie))M[Ae]=Z,M[W]=ie,Ae=W;else break e}}return Q}function o(M,Q){var ie=M.sortIndex-Q.sortIndex;return ie!==0?ie:M.id-Q.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,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],m=[],y=1,g=null,b=3,w=!1,_=!1,R=!1,E=!1,x=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function P(M){for(var Q=r(m);Q!==null;){if(Q.callback===null)a(m);else if(Q.startTime<=M)a(m),Q.sortIndex=Q.expirationTime,t(p,Q);else break;Q=r(m)}}function J(M){if(R=!1,P(M),!_)if(r(p)!==null)_=!0,q||(q=!0,Se());else{var Q=r(m);Q!==null&&je(J,Q.startTime-M)}}var q=!1,H=-1,U=5,X=-1;function oe(){return E?!0:!(e.unstable_now()-X<U)}function se(){if(E=!1,q){var M=e.unstable_now();X=M;var Q=!0;
vendor: 6,947 bytes, line 2
2try{e:{_=!1,R&&(R=!1,j(H),H=-1),w=!0;var ie=b;try{t:{for(P(M),g=r(p);g!==null&&!(g.expirationTime>M&&oe());){var Ae=g.callback;if(typeof Ae=="function"){g.callback=null,b=g.priorityLevel;var ee=Ae(g.expirationTime<=M);if(M=e.unstable_now(),typeof ee=="function"){g.callback=ee,P(M),Q=!0;break t}g===r(p)&&a(p),P(M)}else a(p);g=r(p)}if(g!==null)Q=!0;else{var O=r(m);O!==null&&je(J,O.startTime-M),Q=!1}}break e}finally{g=null,b=ie,w=!1}Q=void 0}}finally{Q?Se():q=!1}}}var Se;if(typeof N=="function")Se=function(){N(se)};else if(typeof MessageChannel<"u"){var Te=new MessageChannel,$e=Te.port2;Te.port1.onmessage=se,Se=function(){$e.postMessage(null)}}else Se=function(){x(se,0)};function je(M,Q){H=x(function(){M(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(M){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var ie=b;b=Q;try{return M()}finally{b=ie}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(M,Q){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ie=b;b=M;try{return Q()}finally{b=ie}},e.unstable_scheduleCallback=function(M,Q,ie){var Ae=e.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?Ae+ie:Ae):ie=Ae,M){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=ie+ee,M={id:y++,callback:Q,priorityLevel:M,startTime:ie,expirationTime:ee,sortIndex:-1},ie>Ae?(M.sortIndex=ie,t(m,M),r(p)===null&&M===r(m)&&(R?(j(H),H=-1):R=!0,je(J,ie-Ae))):(M.sortIndex=ee,t(p,M),_||w||(_=!0,q||(q=!0,Se()))),M},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(M){var Q=b;return function(){var ie=b;b=Q;try{return M.apply(this,arguments)}finally{b=ie}}}})(mf)),mf}var Ey;function GS(){return Ey||(Ey=1,pf.exports=VS()),pf.exports}var gf={exports:{}},Ht={};var xy;function FS(){if(xy)return Ht;xy=1;var e=Uo();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 r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},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 f(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ht.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)},Ht.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()}},Ht.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))},Ht.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Ht.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=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:w}):y==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ht.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(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)},Ht.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(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})}},Ht.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=f(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)},Ht.requestFormReset=function(p){a.d.r(p)},Ht.unstable_batchedUpdates=function(p,m){return p(m)},Ht.useFormState=function(p,m,y){return u.H.useFormState(p,m,y)},Ht.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ht.version="19.2.5",Ht}var Ry;function S0(){if(Ry)return gf.exports;Ry=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(),gf.exports=FS(),gf.exports}var Ty;function KS(){if(Ty)return io;Ty=1;var e=GS(),t=Uo(),r=S0();function a(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)s+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+s+" 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 s=n,i=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(i=s.return),n=s.return;while(n)}return s.tag===3?i:null}function u(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function f(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(a(188))}function m(n){var s=n.alternate;
vendor: 12,307 bytes, lines 2-9
2if(!s){if(s=c(n),s===null)throw Error(a(188));return s!==n?null:n}for(var i=n,l=s;;){var d=i.return;if(d===null)break;var h=d.alternate;if(h===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===i)return p(d),n;if(h===l)return p(d),s;h=h.sibling}throw Error(a(188))}if(i.return!==l.return)i=d,l=h;else{for(var v=!1,S=d.child;S;){if(S===i){v=!0,i=d,l=h;break}if(S===l){v=!0,l=d,i=h;break}S=S.sibling}if(!v){for(S=h.child;S;){if(S===i){v=!0,i=h,l=d;break}if(S===l){v=!0,l=h,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:s}function y(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=y(n),s!==null)return s;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),N=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function Se(n){return n===null||typeof n!="object"?null:(n=se&&n[se]||n["@@iterator"],typeof n=="function"?n:null)}var Te=Symbol.for("react.client.reference");function $e(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Te?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case R:return"Fragment";case x:return"Profiler";case E:return"StrictMode";case J:return"Suspense";case q:return"SuspenseList";case X:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case _:return"Portal";case N:return n.displayName||"Context";case j:return(n._context.displayName||"Context")+".Consumer";case P:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case H:return s=n.displayName||null,s!==null?s:$e(n.type)||"Memo";case U:s=n._payload,n=n._init;try{return $e(n(s))}catch{}}return null}var je=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},Ae=[],ee=-1;function O(n){return{current:n}}function G(n){0>ee||(n.current=Ae[ee],Ae[ee]=null,ee--)}function K(n,s){ee++,Ae[ee]=n.current,n.current=s}var W=O(null),Z=O(null),ae=O(null),xe=O(null);function we(n,s){switch(K(ae,s),K(Z,n),K(W,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?$g(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=$g(s),n=Hg(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}G(W),K(W,n)}function ye(){G(W),G(Z),G(ae)}function jt(n){n.memoizedState!==null&&K(xe,n);var s=W.current,i=Hg(s,n.type);s!==i&&(K(Z,n),K(W,i))}function yt(n){Z.current===n&&(G(W),G(Z)),xe.current===n&&(G(xe),to._currentValue=ie)}var ct,Mn;function vt(n){if(ct===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);ct=s&&s[1]||"",Mn=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+ct+n+Mn}var Rs=!1;function or(n,s){if(!n||Rs)return"";Rs=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(s){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch($){var I=$}Reflect.construct(n,[],Y)}else{try{Y.call()}catch($){I=$}n.call(Y.prototype)}}else{try{throw Error()}catch($){I=$}(Y=n())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch($){if($&&I&&typeof $.stack=="string")return[$.stack,I.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 h=l.DetermineComponentFrameRoot(),v=h[0],S=h[1];if(v&&S){var C=v.split(` 5`),B=S.split(` 6`);for(d=l=0;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;for(;d<B.length&&!B[d].includes("DetermineComponentFrameRoot");)d++;if(l===C.length||d===B.length)for(l=C.length-1,d=B.length-1;1<=l&&0<=d&&C[l]!==B[d];)d--;for(;1<=l&&0<=d;l--,d--)if(C[l]!==B[d]){if(l!==1||d!==1)do if(l--,d--,0>d||C[l]!==B[d]){var V=` 7`+C[l].replace(" at new "," at ");return n.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",n.displayName)),V}while(1<=l&&0<=d);break}}}finally{Rs=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?vt(i):""}function Kn(n,s){switch(n.tag){case 26:case 27:case 5:return vt(n.type);case 16:return vt("Lazy");case 13:return n.child!==s&&s!==null?vt("Suspense Fallback"):vt("Suspense");case 19:return vt("SuspenseList");case 0:case 15:return or(n.type,!1);case 11:return or(n.type.render,!1);case 1:return or(n.type,!0);case 31:return vt("Activity");default:return""}}function _n(n){try{var s="",i=null;do s+=Kn(n,i),i=n,n=n.return;while(n);return s}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var Lt=Object.prototype.hasOwnProperty,fn=e.unstable_scheduleCallback,Ts=e.unstable_cancelCallback,Et=e.unstable_shouldYield,Yn=e.unstable_requestPaint,xt=e.unstable_now,Ve=e.unstable_getCurrentPriorityLevel,rt=e.unstable_ImmediatePriority,Sn=e.unstable_UserBlockingPriority,lr=e.unstable_NormalPriority,pi=e.unstable_LowPriority,cr=e.unstable_IdlePriority,Io=e.log,Ur=e.unstable_setDisableYieldValue,As=null,Gt=null;function Pn(n){if(typeof Io=="function"&&Ur(n),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(As,n)}catch{}}var It=Math.clz32?Math.clz32:Qn,Wc=Math.log,mi=Math.LN2;function Qn(n){return n>>>=0,n===0?32:31-(Wc(n)/mi|0)|0}var ca=256,ua=262144,Cs=4194304;function Jn(n){var s=n&42;if(s!==0)return s;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 Ee(n,s,i){var l=n.pendingLanes;if(l===0)return 0;var d=0,h=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=l&134217727;return S!==0?(l=S&~h,l!==0?d=Jn(l):(v&=S,v!==0?d=Jn(v):i||(i=S&~n,i!==0&&(d=Jn(i))))):(S=l&~h,S!==0?d=Jn(S):v!==0?d=Jn(v):i||(i=l&~n,i!==0&&(d=Jn(i)))),d===0?0:s!==0&&s!==d&&(s&h)===0&&(h=d&-d,i=s&-s,h>=i||h===32&&(i&4194048)!==0)?s:d}function We(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function Rt(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 $t(){var n=Cs;return Cs<<=1,(Cs&62914560)===0&&(Cs=4194304),n}function zr(n){for(var s=[],i=0;31>i;i++)s.push(n);return s}function nt(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Qt(n,s,i,l,d,h){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var S=n.entanglements,C=n.expirationTimes,B=n.hiddenUpdates;for(i=v&~i;0<i;){var V=31-It(i),Y=1<<V;S[V]=0,C[V]=-1;var I=B[V];if(I!==null)for(B[V]=null,V=0;V<I.length;V++){var $=I[V];$!==null&&($.lane&=-536870913)}i&=~Y}l!==0&&Os(n,l,0),h!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=h&~(v&~s))}function Os(n,s,i){n.pendingLanes|=s,n.suspendedLanes&=~s;var l=31-It(s);n.entangledLanes|=s,n.entanglements[l]=n.entanglements[l]|1073741824|i&261930}function Jt(n,s){var i=n.entangledLanes|=s;for(n=n.entanglements;i;){var l=31-It(i),d=1<<l;d&s|n[l]&s&&(n[l]|=s),i&=~d}}function Xt(n,s){var i=s&-s;return i=(i&42)!==0?1:da(i),(i&(n.suspendedLanes|s))!==0?0:i}function da(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 Un(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function eu(){var n=Q.p;return n!==0?n:(n=window.event,n===void 0?32:dy(n.type))}function Ah(n,s){var i=Q.p;try{return Q.p=n,s()}finally{Q.p=i}}var Br=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Br,Zt="__reactProps$"+Br,fa="__reactContainer$"+Br,tu="__reactEvents$"+Br,Ow="__reactListeners$"+Br,kw="__reactHandles$"+Br,Ch="__reactResources$"+Br,gi="__reactMarker$"+Br;function nu(n){delete n[Nt],delete n[Zt],delete n[tu],delete n[Ow],delete n[kw]}function ha(n){var s=n[Nt];if(s)return s;for(var i=n.parentNode;i;){if(s=i[fa]||i[Nt]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(n=Qg(n);n!==null;){if(i=n[Nt])return i;n=Qg(n)}return s}n=i,i=n.parentNode}return null}function pa(n){if(n=n[Nt]||n[fa]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function yi(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(a(33))}function ma(n){var s=n[Ch];return s||(s=n[Ch]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Tt(n){n[gi]=!0}var Oh=new Set,kh={};function ks(n,s){ga(n,s),ga(n+"Capture",s)}function ga(n,s){for(kh[n]=s,n=0;n<s.length;n++)Oh.add(s[n])}var jw=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]*$"),jh={},Lh={};function Lw(n){return Lt.call(Lh,n)?!0:Lt.call(jh,n)?!1:jw.test(n)?Lh[n]=!0:(jh[n]=!0,!1)}function $o(n,s,i){if(Lw(s))if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var l=s.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+i)}}function Ho(n,s,i){if(i===null)n.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+i)}}function ur(n,s,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(s,i,""+l)}}function En(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Nh(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Nw(n,s,i){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,h=l.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(n,s,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function ru(n){if(!n._valueTracker){var s=Nh(n)?"checked":"value";n._valueTracker=Nw(n,s,""+n[s])}}
vendor: 4,820 bytes, line 9
9function Dh(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var i=s.getValue(),l="";return n&&(l=Nh(n)?n.checked?"true":"false":n.value),n=l,n!==i?(s.setValue(n),!0):!1}function qo(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 Dw=/[\n"\\]/g;function xn(n){return n.replace(Dw,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function su(n,s,i,l,d,h,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),s!=null?v==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+En(s)):n.value!==""+En(s)&&(n.value=""+En(s)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),s!=null?au(n,v,En(s)):i!=null?au(n,v,En(i)):l!=null&&n.removeAttribute("value"),d==null&&h!=null&&(n.defaultChecked=!!h),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+En(S):n.removeAttribute("name")}function Mh(n,s,i,l,d,h,v,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),s!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||s!=null)){ru(n);return}i=i!=null?""+En(i):"",s=s!=null?""+En(s):i,S||s===n.value||(n.value=s),n.defaultValue=s}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),ru(n)}function au(n,s,i){s==="number"&&qo(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function ya(n,s,i,l){if(n=n.options,s){s={};for(var d=0;d<i.length;d++)s["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=s.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&l&&(n[i].defaultSelected=!0)}else{for(i=""+En(i),s=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}s!==null||n[d].disabled||(s=n[d])}s!==null&&(s.selected=!0)}}function Ph(n,s,i){if(s!=null&&(s=""+En(s),s!==n.value&&(n.value=s),i==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=i!=null?""+En(i):""}function Uh(n,s,i,l){if(s==null){if(l!=null){if(i!=null)throw Error(a(92));if(je(l)){if(1<l.length)throw Error(a(93));l=l[0]}i=l}i==null&&(i=""),s=i}i=En(s),n.defaultValue=i,l=n.textContent,l===i&&l!==""&&l!==null&&(n.value=l),ru(n)}function va(n,s){if(s){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=s;return}}n.textContent=s}var Mw=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 zh(n,s,i){var l=s.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":l?n.setProperty(s,i):typeof i!="number"||i===0||Mw.has(s)?s==="float"?n.cssFloat=i:n[s]=(""+i).trim():n[s]=i+"px"}function Bh(n,s,i){if(s!=null&&typeof s!="object")throw Error(a(62));if(n=n.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||s!=null&&s.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in s)l=s[d],s.hasOwnProperty(d)&&i[d]!==l&&zh(n,d,l)}else for(var h in s)s.hasOwnProperty(h)&&zh(n,h,s[h])}function iu(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 Pw=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"]]),Uw=/^[\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 Vo(n){return Uw.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function dr(){}var ou=null;function lu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ba=null,wa=null;function Ih(n){var s=pa(n);if(s&&(n=s.stateNode)){var i=n[Zt]||null;e:switch(n=s.stateNode,s.type){case"input":if(su(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),s=i.name,i.type==="radio"&&s!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+xn(""+s)+'"][type="radio"]'),s=0;s<i.length;s++){var l=i[s];if(l!==n&&l.form===n.form){var d=l[Zt]||null;if(!d)throw Error(a(90));su(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(s=0;s<i.length;s++)l=i[s],l.form===n.form&&Dh(l)}break e;case"textarea":Ph(n,i.value,i.defaultValue);break e;case"select":s=i.value,s!=null&&ya(n,!!i.multiple,s,!1)}}}var cu=!1;function $h(n,s,i){if(cu)return n(s,i);cu=!0;try{var l=n(s);return l}finally{if(cu=!1,(ba!==null||wa!==null)&&(jl(),ba&&(s=ba,n=wa,wa=ba=null,Ih(s),n)))for(s=0;s<n.length;s++)Ih(n[s])}}function vi(n,s){var i=n.stateNode;if(i===null)return null;var l=i[Zt]||null;if(l===null)return null;i=l[s];e:switch(s){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,s,typeof i));return i}var fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=!1;if(fr)try{var bi={};Object.defineProperty(bi,"passive",{get:function(){uu=!0}}),window.addEventListener("test",bi,bi),window.removeEventListener("test",bi,bi)}catch{uu=!1}var Ir=null,du=null,Go=null;function Hh(){if(Go)return Go;var n,s=du,i=s.length,l,d="value"in Ir?Ir.value:Ir.textContent,h=d.length;for(n=0;n<i&&s[n]===d[n];n++);var v=i-n;for(l=1;l<=v&&s[i-l]===d[h-l];l++);return Go=d.slice(n,1<l?1-l:void 0)}function Fo(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Ko(){return!0}function qh(){return!1}function Wt(n){function s(i,l,d,h,v){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=h,this.target=v,this.currentTarget=null;
vendor: 2,622 bytes, line 9
9for(var S in n)n.hasOwnProperty(S)&&(i=n[S],this[S]=i?i(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Ko:qh,this.isPropagationStopped=qh,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Ko)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ko)},persist:function(){},isPersistent:Ko}),s}var js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yo=Wt(js),wi=g({},js,{view:0,detail:0}),zw=Wt(wi),fu,hu,_i,Qo=g({},wi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mu,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!==_i&&(_i&&n.type==="mousemove"?(fu=n.screenX-_i.screenX,hu=n.screenY-_i.screenY):hu=fu=0,_i=n),fu)},movementY:function(n){return"movementY"in n?n.movementY:hu}}),Vh=Wt(Qo),Bw=g({},Qo,{dataTransfer:0}),Iw=Wt(Bw),$w=g({},wi,{relatedTarget:0}),pu=Wt($w),Hw=g({},js,{animationName:0,elapsedTime:0,pseudoElement:0}),qw=Wt(Hw),Vw=g({},js,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Gw=Wt(Vw),Fw=g({},js,{data:0}),Gh=Wt(Fw),Kw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yw={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"},Qw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jw(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=Qw[n])?!!s[n]:!1}function mu(){return Jw}var Xw=g({},wi,{key:function(n){if(n.key){var s=Kw[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Fo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="
9keydown"||n.type==="keyup"?Yw[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mu,charCode:function(n){return n.type==="keypress"?Fo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Fo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Zw=Wt(Xw),Ww=g({},Qo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fh=Wt(Ww),e_=g({},wi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mu}),t_=Wt(e_),n_=g({},js,{propertyName:0,elapsedTime:0,pseudoElement:0}),r_=Wt(n_),s_=g({},Qo,{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}),a_=Wt(s_),i_=g({},js,{newState:0,oldState:0}),o_=Wt(i_),l_=[9,13,27,32],gu=fr&&"CompositionEvent"in window,Si=null;fr&&"documentMode"in document&&(Si=document.documentMode);var c_=fr&&"TextEvent"in window&&!Si,Kh=fr&&(!gu||Si&&8<Si&&11>=Si),Yh=" ",Qh=!1;function Jh(n,s){switch(n){case"keyup":return l_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var _a=!1;function u_(n,s){switch(n){case"compositionend":return Xh(s);case"keypress":return s.which!==32?null:(Qh=!0,Yh);case"textInput":return n=s.data,n===Yh&&Qh?null:n;default:return null}}function d_(n,s){if(_a)return n==="compositionend"||!gu&&Jh(n,s)?(n=Hh(),Go=du=Ir=null,_a=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Kh&&s.locale!=="ko"?null:s.data;default:return null}}var f_={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 Zh(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!f_[n.type]:s==="textarea"}function Wh(n,s,i,l){ba?wa?wa.push(l):wa=[l]:ba=l,s=zl(s,"onChange"),0<s.length&&(i=new Yo("onChange","change",null,i,l),n.push({event:i,listeners:s}))}var Ei=null,xi=null;function h_(n){Mg(n,0)}function Jo(n){var s=yi(n);if(Dh(s))return n}function ep(n,s){if(n==="change")return s}var tp=!1;if(fr){var yu;if(fr){var vu="oninput"in document;if(!vu){var np=document.createElement("div");np.setAttribute("oninput","return;"),vu=typeof np.oninput=="function"}yu=vu}else yu=!1;tp=yu&&(!document.documentMode||9<document.documentMode)}
vendor: 18,480 bytes, line 9
9function rp(){Ei&&(Ei.detachEvent("onpropertychange",sp),xi=Ei=null)}function sp(n){if(n.propertyName==="value"&&Jo(xi)){var s=[];Wh(s,xi,n,lu(n)),$h(h_,s)}}function p_(n,s,i){n==="focusin"?(rp(),Ei=s,xi=i,Ei.attachEvent("onpropertychange",sp)):n==="focusout"&&rp()}function m_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Jo(xi)}function g_(n,s){if(n==="click")return Jo(s)}function y_(n,s){if(n==="input"||n==="change")return Jo(s)}function v_(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var hn=typeof Object.is=="function"?Object.is:v_;function Ri(n,s){if(hn(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var i=Object.keys(n),l=Object.keys(s);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!Lt.call(s,d)||!hn(n[d],s[d]))return!1}return!0}function ap(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ip(n,s){var i=ap(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=s&&l>=s)return{node:i,offset:s-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,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?op(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function lp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=qo(n.document);s instanceof n.HTMLIFrameElement;){try{var i=typeof s.contentWindow.location.href=="string"}catch{i=!1}if(i)n=s.contentWindow;else break;s=qo(n.document)}return s}function bu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var b_=fr&&"documentMode"in document&&11>=document.documentMode,Sa=null,wu=null,Ti=null,_u=!1;function cp(n,s,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;_u||Sa==null||Sa!==qo(l)||(l=Sa,"selectionStart"in l&&bu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ti&&Ri(Ti,l)||(Ti=l,l=zl(wu,"onSelect"),0<l.length&&(s=new Yo("onSelect","select",null,s,i),n.push({event:s,listeners:l}),s.target=Sa)))}function Ls(n,s){var i={};return i[n.toLowerCase()]=s.toLowerCase(),i["Webkit"+n]="webkit"+s,i["Moz"+n]="moz"+s,i}var Ea={animationend:Ls("Animation","AnimationEnd"),animationiteration:Ls("Animation","AnimationIteration"),animationstart:Ls("Animation","AnimationStart"),transitionrun:Ls("Transition","TransitionRun"),transitionstart:Ls("Transition","TransitionStart"),transitioncancel:Ls("Transition","TransitionCancel"),transitionend:Ls("Transition","TransitionEnd")},Su={},up={};fr&&(up=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function Ns(n){if(Su[n])return Su[n];if(!Ea[n])return n;var s=Ea[n],i;for(i in s)if(s.hasOwnProperty(i)&&i in up)return Su[n]=s[i];return n}var dp=Ns("animationend"),fp=Ns("animationiteration"),hp=Ns("animationstart"),w_=Ns("transitionrun"),__=Ns("transitionstart"),S_=Ns("transitioncancel"),pp=Ns("transitionend"),mp=new Map,Eu="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(" ");Eu.push("scrollEnd");function zn(n,s){mp.set(n,s),ks(s,[n])}var Xo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=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(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Rn=[],xa=0,xu=0;function Zo(){for(var n=xa,s=xu=xa=0;s<n;){var i=Rn[s];Rn[s++]=null;var l=Rn[s];Rn[s++]=null;var d=Rn[s];Rn[s++]=null;var h=Rn[s];if(Rn[s++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}h!==0&&gp(i,d,h)}}function Wo(n,s,i,l){Rn[xa++]=n,Rn[xa++]=s,Rn[xa++]=i,Rn[xa++]=l,xu|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function Ru(n,s,i,l){return Wo(n,s,i,l),el(n)}function Ds(n,s){return Wo(n,null,null,s),el(n)}function gp(n,s,i){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i);for(var d=!1,h=n.return;h!==null;)h.childLanes|=i,l=h.alternate,l!==null&&(l.childLanes|=i),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(d=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,d&&s!==null&&(d=31-It(i),n=h.hiddenUpdates,l=n[d],l===null?n[d]=[s]:l.push(s),s.lane=i|536870912),h):null}function el(n){if(50<Yi)throw Yi=0,Dd=null,Error(a(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var Ra={};function E_(n,s,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=s,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 pn(n,s,i,l){return new E_(n,s,i,l)}function Tu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function hr(n,s){var i=n.alternate;return i===null?(i=pn(n.tag,s,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=s,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,s=n.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function yp(n,s){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=s,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,s=i.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function tl(n,s,i,l,d,h){var v=0;if(l=n,typeof n=="function")Tu(n)&&(v=1);else if(typeof n=="string")v=CS(n,i,W.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case X:return n=pn(31,i,s,d),n.elementType=X,n.lanes=h,n;case R:return Ms(i.children,d,h,s);case E:v=8,d|=24;break;case x:return n=pn(12,i,s,d|2),n.elementType=x,n.lanes=h,n;case J:return n=pn(13,i,s,d),n.elementType=J,n.lanes=h,n;case q:return n=pn(19,i,s,d),n.elementType=q,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case N:v=10;break e;case j:v=9;break e;case P:v=11;break e;case H:v=14;break e;case U:v=16,l=null;break e}v=29,i=Error(a(130,n===null?"null":typeof n,"")),l=null}return s=pn(v,i,s,d),s.elementType=n,s.type=l,s.lanes=h,s}function Ms(n,s,i,l){return n=pn(7,n,l,s),n.lanes=i,n}function Au(n,s,i){return n=pn(6,n,null,s),n.lanes=i,n}function vp(n){var s=pn(18,null,null,0);return s.stateNode=n,s}function Cu(n,s,i){return s=pn(4,n.children!==null?n.children:[],n.key,s),s.lanes=i,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var bp=new WeakMap;function Tn(n,s){if(typeof n=="object"&&n!==null){var i=bp.get(n);return i!==void 0?i:(s={value:n,source:s,stack:_n(s)},bp.set(n,s),s)}return{value:n,source:s,stack:_n(s)}}var Ta=[],Aa=0,nl=null,Ai=0,An=[],Cn=0,$r=null,Xn=1,Zn="";function pr(n,s){Ta[Aa++]=Ai,Ta[Aa++]=nl,nl=n,Ai=s}function wp(n,s,i){An[Cn++]=Xn,An[Cn++]=Zn,An[Cn++]=$r,$r=n;var l=Xn;n=Zn;var d=32-It(l)-1;l&=~(1<<d),i+=1;var h=32-It(s)+d;if(30<h){var v=d-d%5;h=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Xn=1<<32-It(s)+d|i<<d|l,Zn=h+n}else Xn=1<<h|i<<d|l,Zn=n}function Ou(n){n.return!==null&&(pr(n,1),wp(n,1,0))}function ku(n){for(;n===nl;)nl=Ta[--Aa],Ta[Aa]=null,Ai=Ta[--Aa],Ta[Aa]=null;for(;n===$r;)$r=An[--Cn],An[Cn]=null,Zn=An[--Cn],An[Cn]=null,Xn=An[--Cn],An[Cn]=null}function _p(n,s){An[Cn++]=Xn,An[Cn++]=Zn,An[Cn++]=$r,Xn=s.id,Zn=s.overflow,$r=n}var Dt=null,Xe=null,Pe=!1,Hr=null,On=!1,ju=Error(a(519));function qr(n){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ci(Tn(s,n)),ju}function Sp(n){var s=n.stateNode,i=n.type,l=n.memoizedProps;switch(s[Nt]=n,s[Zt]=l,i){case"dialog":Ne("cancel",s),Ne("close",s);break;case"iframe":case"object":case"embed":Ne("load",s);break;case"video":case"audio":for(i=0;i<Ji.length;i++)Ne(Ji[i],s);break;case"source":Ne("error",s);break;case"img":case"image":case"link":Ne("error",s),Ne("load",s);break;case"details":Ne("toggle",s);break;case"input":Ne("invalid",s),Mh(s,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ne("invalid",s);break;case"textarea":Ne("invalid",s),Uh(s,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||s.textContent===""+i||l.suppressHydrationWarning===!0||Bg(s.textContent,i)?(l.popover!=null&&(Ne("beforetoggle",s),Ne("toggle",s)),l.onScroll!=null&&Ne("scroll",s),l.onScrollEnd!=null&&Ne("scrollend",s),l.onClick!=null&&(s.onclick=dr),s=!0):s=!1,s||qr(n,!0)}function Ep(n){for(Dt=n.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:On=!1;return;case 27:case 3:On=!0;return;default:Dt=Dt.return}}function Ca(n){if(n!==Dt)return!1;if(!Pe)return Ep(n),Pe=!0,!1;var s=n.tag,i;if((i=s!==3&&s!==27)&&((i=s===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Qd(n.type,n.memoizedProps)),i=!i),i&&Xe&&qr(n),Ep(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Xe=Yg(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Xe=Yg(n)}else s===27?(s=Xe,rs(n.type)?(n=ef,ef=null,Xe=n):Xe=s):Xe=Dt?jn(n.stateNode.nextSibling):null;return!0}function Ps(){Xe=Dt=null,Pe=!1}function Lu(){var n=Hr;return n!==null&&(rn===null?rn=n:rn.push.apply(rn,n),Hr=null),n}function Ci(n){Hr===null?Hr=[n]:Hr.push(n)}var Nu=O(null),Us=null,mr=null;function Vr(n,s,i){K(Nu,s._currentValue),s._currentValue=i}function gr(n){n._currentValue=Nu.current,G(Nu)}function Du(n,s,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===i)break;n=n.return}}function Mu(n,s,i,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var h=d.dependencies;if(h!==null){var v=d.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=d;for(var C=0;C<s.length;C++)if(S.context===s[C]){h.lanes|=i,S=h.alternate,S!==null&&(S.lanes|=i),Du(h.return,i,n),l||(v=null);break e}h=S.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(a(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),Du(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 Oa(n,s,i,l){n=null;for(var d=s,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!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;hn(d.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(d===xe.current){if(v=d.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(to):n=[to])}d=d.return}n!==null&&Mu(s,n,i,l),s.flags|=262144}function rl(n){for(n=n.firstContext;n!==null;){if(!hn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function zs(n){Us=n,mr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Mt(n){return xp(Us,n)}function sl(n,s){return Us===null&&zs(n),xp(n,s)}function xp(n,s){var i=s._currentValue;if(s={context:s,memoizedValue:i,next:null},mr===null){if(n===null)throw Error(a(308));mr=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else mr=mr.next=s;return i}var x_=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(i,l){n.push(l)}};this.abort=function(){s.aborted=!0,n.forEach(function(i){return i()})}},R_=e.unstable_scheduleCallback,T_=e.unstable_NormalPriority,ut={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pu(){return{controller:new x_,data:new Map,refCount:0}}function Oi(n){n.refCount--,n.refCount===0&&R_(T_,function(){n.controller.abort()})}var ki=null,Uu=0,ka=0,ja=null;function A_(n,s){if(ki===null){var i=ki=[];Uu=0,ka=Id(),ja={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Uu++,s.then(Rp,Rp),s}function Rp(){if(--Uu===0&&ki!==null){ja!==null&&(ja.status="fulfilled");var n=ki;ki=null,ka=0,ja=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function C_(n,s){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){l.status="fulfilled",l.value=s;for(var d=0;d<i.length;d++)(0,i[d])(s)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var Tp=M.S;M.S=function(n,s){cg=xt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&A_(n,s),Tp!==null&&Tp(n,s)};var Bs=O(null);function zu(){var n=Bs.current;return n!==null?n:Ye.pooledCache}function al(n,s){s===null?K(Bs,Bs.current):K(Bs,s.pool)}function Ap(){var n=zu();return n===null?null:{parent:ut._currentValue,pool:n}}var La=Error(a(460)),Bu=Error(a(474)),il=Error(a(542)),ol={then:function(){}};function Cp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Op(n,s,i){switch(i=n[i],i===void 0?n.push(s):i!==s&&(s.then(dr,dr),s=i),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,jp(n),n;default:if(typeof s.status=="string")s.then(dr,dr);else{if(n=Ye,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=s,n.status="pending",n.then(function(l){if(s.status==="pending"){var d=s;d.status="fulfilled",d.value=l}},function(l){if(s.status==="pending"){var d=s;d.status="rejected",d.reason=l}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,jp(n),n}throw $s=s,La}}function Is(n){try{var s=n._init;return s(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?($s=i,La):i}}var $s=null;function kp(){if($s===null)throw Error(a(459));var n=$s;return $s=null,n}function jp(n){if(n===La||n===il)throw Error(a(483))}var Na=null,ji=0;function ll(n){var s=ji;return ji+=1,Na===null&&(Na=[]),Op(Na,n,s)}function Li(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function cl(n,s){throw s.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(s),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function Lp(n){function s(D,L){if(n){var z=D.deletions;z===null?(D.deletions=[L],D.flags|=16):z.push(L)}}function i(D,L){if(!n)return null;for(;L!==null;)s(D,L),L=L.sibling;return null}function l(D){for(var L=new Map;D!==null;)D.key!==null?L.set(D.key,D):L.set(D.index,D),D=D.sibling;return L}function d(D,L){return D=hr(D,L),D.index=0,D.sibling=null,D}function h(D,L,z){return D.index=z,n?(z=D.alternate,z!==null?(z=z.index,z<L?(D.flags|=67108866,L):z):(D.flags|=67108866,L)):(D.flags|=1048576,L)}function v(D){return n&&D.alternate===null&&(D.flags|=67108866),D}function S(D,L,z,F){return L===null||L.tag!==6?(L=Au(z,D.mode,F),L.return=D,L):(L=d(L,z),L.return=D,L)}function C(D,L,z,F){var me=z.type;return me===R?V(D,L,z.props.children,F,z.key):L!==null&&(L.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===U&&Is(me)===L.type)?(L=d(L,z.props),Li(L,z),L.return=D,L):(L=tl(z.type,z.key,z.props,null,D.mode,F),Li(L,z),L.return=D,L)}function B(D,L,z,F){return L===null||L.tag!==4||L.stateNode.containerInfo!==z.containerInfo||L.stateNode.implementation!==z.implementation?(L=Cu(z,D.mode,F),L.return=D,L):(L=d(L,z.children||[]),L.return=D,L)}function V(D,L,z,F,me){return L===null||L.tag!==7?(L=Ms(z,D.mode,F,me),L.return=D,L):(L=d(L,z),L.return=D,L)}function Y(D,L,z){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=Au(""+L,D.mode,z),L.return=D,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case w:return z=tl(L.type,L.key,L.props,null,D.mode,z),Li(z,L),z.return=D,z;case _:return L=Cu(L,D.mode,z),L.return=D,L;case U:return L=Is(L),Y(D,L,z)}if(je(L)||Se(L))return L=Ms(L,D.mode,z,null),L.return=D,L;if(typeof L.then=="function")return Y(D,ll(L),z);if(L.$$typeof===N)return Y(D,sl(D,L),z);cl(D,L)}return null}function I(D,L,z,F){var me=L!==null?L.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return me!==null?null:S(D,L,""+z,F);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case w:return z.key===me?C(D,L,z,F):null;case _:return z.key===me?B(D,L,z,F):null;case U:return z=Is(z),I(D,L,z,F)}if(je(z)||Se(z))return me!==null?null:V(D,L,z,F,null);if(typeof z.then=="function")return I(D,L,ll(z),F);if(z.$$typeof===N)return I(D,L,sl(D,z),F);cl(D,z)}return null}function $(D,L,z,F,me){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return D=D.get(z)||null,S(L,D,""+F,me);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case w:return D=D.get(F.key===null?z:F.key)||null,C(L,D,F,me);case _:return D=D.get(F.key===null?z:F.key)||null,B(L,D,F,me);case U:return F=Is(F),$(D,L,z,F,me)}if(je(F)||Se(F))return D=D.get(z)||null,V(L,D,F,me,null);if(typeof F.then=="function")return $(D,L,z,ll(F),me);
vendor: 5,344 bytes, line 9
9if(F.$$typeof===N)return $(D,L,z,sl(L,F),me);cl(L,F)}return null}function le(D,L,z,F){for(var me=null,Ue=null,pe=L,Oe=L=0,Me=null;pe!==null&&Oe<z.length;Oe++){pe.index>Oe?(Me=pe,pe=null):Me=pe.sibling;var ze=I(D,pe,z[Oe],F);if(ze===null){pe===null&&(pe=Me);break}n&&pe&&ze.alternate===null&&s(D,pe),L=h(ze,L,Oe),Ue===null?me=ze:Ue.sibling=ze,Ue=ze,pe=Me}if(Oe===z.length)return i(D,pe),Pe&&pr(D,Oe),me;if(pe===null){for(;Oe<z.length;Oe++)pe=Y(D,z[Oe],F),pe!==null&&(L=h(pe,L,Oe),Ue===null?me=pe:Ue.sibling=pe,Ue=pe);return Pe&&pr(D,Oe),me}for(pe=l(pe);Oe<z.length;Oe++)Me=$(pe,D,Oe,z[Oe],F),Me!==null&&(n&&Me.alternate!==null&&pe.delete(Me.key===null?Oe:Me.key),L=h(Me,L,Oe),Ue===null?me=Me:Ue.sibling=Me,Ue=Me);return n&&pe.forEach(function(ls){return s(D,ls)}),Pe&&pr(D,Oe),me}function be(D,L,z,F){if(z==null)throw Error(a(151));for(var me=null,Ue=null,pe=L,Oe=L=0,Me=null,ze=z.next();pe!==null&&!ze.done;Oe++,ze=z.next()){pe.index>Oe?(Me=pe,pe=null):Me=pe.sibling;var ls=I(D,pe,ze.value,F);if(ls===null){pe===null&&(pe=Me);break}n&&pe&&ls.alternate===null&&s(D,pe),L=h(ls,L,Oe),Ue===null?me=ls:Ue.sibling=ls,Ue=ls,pe=Me}if(ze.done)return i(D,pe),Pe&&pr(D,Oe),me;if(pe===null){for(;!ze.done;Oe++,ze=z.next())ze=Y(D,ze.value,F),ze!==null&&(L=h(ze,L,Oe),Ue===null?me=ze:Ue.sibling=ze,Ue=ze);return Pe&&pr(D,Oe),me}for(pe=l(pe);!ze.done;Oe++,ze=z.next())ze=$(pe,D,Oe,ze.value,F),ze!==null&&(n&&ze.alternate!==null&&pe.delete(ze.key===null?Oe:ze.key),L=h(ze,L,Oe),Ue===null?me=ze:Ue.sibling=ze,Ue=ze);return n&&pe.forEach(function(BS){return s(D,BS)}),Pe&&pr(D,Oe),me}function Ke(D,L,z,F){if(typeof z=="object"&&z!==null&&z.type===R&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case w:e:{for(var me=z.key;L!==null;){if(L.key===me){if(me=z.type,me===R){if(L.tag===7){i(D,L.sibling),F=d(L,z.props.children),F.return=D,D=F;break e}}else if(L.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===U&&Is(me)===L.type){i(D,L.sibling),F=d(L,z.props),Li(F,z),F.return=D,D=F;break e}i(D,L);break}else s(D,L);L=L.sibling}z.type===R?(F=Ms(z.props.children,D.mode,F,z.key),F.return=D,D=F):(F=tl(z.type,z.key,z.props,null,D.mode,F),Li(F,z),F.return=D,D=F)}return v(D);case _:e:{for(me=z.key;L!==null;){if(L.key===me)if(L.tag===4&&L.stateNode.containerInfo===z.containerInfo&&L.stateNode.implementation===z.implementation){i(D,L.sibling),F=d(L,z.children||[]),F.return=D,D=F;break e}else{i(D,L);break}else s(D,L);L=L.sibling}F=Cu(z,D.mode,F),F.return=D,D=F}return v(D);case U:return z=Is(z),Ke(D,L,z,F)}if(je(z))return le(D,L,z,F);if(Se(z)){if(me=Se(z),typeof me!="function")throw Error(a(150));return z=me.call(z),be(D,L,z,F)}if(typeof z.then=="function")return Ke(D,L,ll(z),F);if(z.$$typeof===N)return Ke(D,L,sl(D,z),F);cl(D,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,L!==null&&L.tag===6?(i(D,L.sibling),F=d(L,z),F.return=D,D=F):(i(D,L),F=Au(z,D.mode,F),F.return=D,D=F),v(D)):i(D,L)}return function(D,L,z,F){try{ji=0;var me=Ke(D,L,z,F);return Na=null,me}catch(pe){if(pe===La||pe===il)throw pe;var Ue=pn(29,pe,null,D.mode);return Ue.lanes=F,Ue.return=D,Ue}}}var Hs=Lp(!0),Np=Lp(!1),Gr=!1;function Iu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $u(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Fr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Kr(n,s,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ie&2)!==0){var d=l.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),l.pending=s,s=el(n),gp(n,null,i),s}return Wo(n,l,s,i),el(n)}function Ni(n,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194048)!==0)){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,Jt(n,i)}}function Hu(n,s){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?d=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?d=h=s:h=h.next=s}else d=h=s;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=s:n.next=s,i.lastBaseUpdate=s}var qu=!1;function Di(){if(qu){var n=ja;if(n!==null)throw n}}function Mi(n,s,i,l){qu=!1;var d=n.updateQueue;Gr=!1;var h=d.firstBaseUpdate,v=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var C=S,B=C.next;C.next=null,v===null?h=B:v.next=B,v=C;var V=n.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==v&&(S===null?V.firstBaseUpdate=B:S.next=B,V.lastBaseUpdate=C))}if(h!==null){var Y=d.baseState;v=0,V=B=C=null,S=h;do{var I=S.lane&-536870913,$=I!==S.lane;if($?(De&I)===I:(l&I)===I){I!==0&&I===ka&&(qu=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var le=n,be=S;I=s;var Ke=i;switch(be.tag){case 1:if(le=be.payload,typeof le=="function"){Y=le.call(Ke,Y,I);break e}Y=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=be.payload,I=typeof le=="function"?le.call(Ke,Y,I):le,I==null)break e;Y=g({},Y,I);break e;case 2:Gr=!0}}
vendor: 7,005 bytes, line 9
9I=S.callback,I!==null&&(n.flags|=64,$&&(n.flags|=8192),$=d.callbacks,$===null?d.callbacks=[I]:$.push(I))}else $={lane:I,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(B=V=$,C=Y):V=V.next=$,v|=I;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;$=S,S=$.next,$.next=null,d.lastBaseUpdate=$,d.shared.pending=null}}while(!0);V===null&&(C=Y),d.baseState=C,d.firstBaseUpdate=B,d.lastBaseUpdate=V,h===null&&(d.shared.lanes=0),Zr|=v,n.lanes=v,n.memoizedState=Y}}function Dp(n,s){if(typeof n!="function")throw Error(a(191,n));n.call(s)}function Mp(n,s){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)Dp(i[n],s)}var Da=O(null),ul=O(0);function Pp(n,s){n=Rr,K(ul,n),K(Da,s),Rr=n|s.baseLanes}function Vu(){K(ul,Rr),K(Da,Da.current)}function Gu(){Rr=ul.current,G(Da),G(ul)}var mn=O(null),kn=null;function Yr(n){var s=n.alternate;K(ot,ot.current&1),K(mn,n),kn===null&&(s===null||Da.current!==null||s.memoizedState!==null)&&(kn=n)}function Fu(n){K(ot,ot.current),K(mn,n),kn===null&&(kn=n)}function Up(n){n.tag===22?(K(ot,ot.current),K(mn,n),kn===null&&(kn=n)):Qr()}function Qr(){K(ot,ot.current),K(mn,mn.current)}function gn(n){G(mn),kn===n&&(kn=null),G(ot)}var ot=O(0);function dl(n){for(var s=n;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Zd(i)||Wd(i)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var yr=0,Ce=null,Ge=null,dt=null,fl=!1,Ma=!1,qs=!1,hl=0,Pi=0,Pa=null,O_=0;function st(){throw Error(a(321))}function Ku(n,s){if(s===null)return!1;for(var i=0;i<s.length&&i<n.length;i++)if(!hn(n[i],s[i]))return!1;return!0}function Yu(n,s,i,l,d,h){return yr=h,Ce=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,M.H=n===null||n.memoizedState===null?wm:cd,qs=!1,h=i(l,d),qs=!1,Ma&&(h=Bp(s,i,l,d)),zp(n),h}function zp(n){M.H=Bi;var s=Ge!==null&&Ge.next!==null;if(yr=0,dt=Ge=Ce=null,fl=!1,Pi=0,Pa=null,s)throw Error(a(300));n===null||ft||(n=n.dependencies,n!==null&&rl(n)&&(ft=!0))}function Bp(n,s,i,l){Ce=n;var d=0;do{if(Ma&&(Pa=null),Pi=0,Ma=!1,25<=d)throw Error(a(301));if(d+=1,dt=Ge=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}M.H=_m,h=s(i,l)}while(Ma);return h}function k_(){var n=M.H,s=n.useState()[0];return s=typeof s.then=="function"?Ui(s):s,n=n.useState()[0],(Ge!==null?Ge.memoizedState:null)!==n&&(Ce.flags|=1024),s}function Qu(){var n=hl!==0;return hl=0,n}function Ju(n,s,i){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~i}function Xu(n){if(fl){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}fl=!1}yr=0,dt=Ge=Ce=null,Ma=!1,Pi=hl=0,Pa=null}function Ft(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Ce.memoizedState=dt=n:dt=dt.next=n,dt}function lt(){if(Ge===null){var n=Ce.alternate;n=n!==null?n.memoizedState:null}else n=Ge.next;var s=dt===null?Ce.memoizedState:dt.next;if(s!==null)dt=s,Ge=n;else{if(n===null)throw Ce.alternate===null?Error(a(467)):Error(a(310));Ge=n,n={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},dt===null?Ce.memoizedState=dt=n:dt=dt.next=n}return dt}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ui(n){var s=Pi;return Pi+=1,Pa===null&&(Pa=[]),n=Op(Pa,n,s),s=Ce,(dt===null?s.memoizedState:dt.next)===null&&(s=s.alternate,M.H=s===null||s.memoizedState===null?wm:cd),n}function ml(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ui(n);if(n.$$typeof===N)return Mt(n)}throw Error(a(438,String(n)))}function Zu(n){var s=null,i=Ce.updateQueue;if(i!==null&&(s=i.memoCache),s==null){var l=Ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(s={data:l.data.map(function(d){return d.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),i===null&&(i=pl(),Ce.updateQueue=i),i.memoCache=s,i=s.data[s.index],i===void 0)for(i=s.data[s.index]=Array(n),l=0;l<n;l++)i[l]=oe;return s.index++,i}function vr(n,s){return typeof s=="function"?s(n):s}function gl(n){var s=lt();return Wu(s,Ge,n)}function Wu(n,s,i){var l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var d=n.baseQueue,h=l.pending;if(h!==null){if(d!==null){var v=d.next;d.next=h.next,h.next=v}s.baseQueue=d=h,l.pending=null}if(h=n.baseState,d===null)n.memoizedState=h;else{s=d.next;var S=v=null,C=null,B=s,V=!1;do{var Y=B.lane&-536870913;if(Y!==B.lane?(De&Y)===Y:(yr&Y)===Y){var I=B.revertLane;if(I===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),Y===ka&&(V=!0);else if((yr&I)===I){B=B.next,I===ka&&(V=!0);continue}else Y={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(S=C=Y,v=h):C=C.next=Y,Ce.lanes|=I,Zr|=I;Y=B.action,qs&&i(h,Y),h=B.hasEagerState?B.eagerState:i(h,Y)}else I={lane:Y,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(S=C=I,v=h):C=C.next=I,Ce.lanes|=Y,Zr|=Y;B=B.next}while(B!==null&&B!==s);if(C===null?v=h:C.next=S,!hn(h,n.memoizedState)&&(ft=!0,V&&(i=ja,i!==null)))throw i;n.memoizedState=h,n.baseState=v,n.baseQueue=C,l.lastRenderedState=h}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function ed(n){var s=lt(),i=s.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=n;var l=i.dispatch,d=i.pending,h=s.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do h=n(h,v.action),v=v.next;while(v!==d);hn(h,s.memoizedState)||(ft=!0),s.memoizedState=h,s.baseQueue===null&&(s.baseState=h),i.lastRenderedState=h}return[h,l]}function Ip(n,s,i){var l=Ce,d=lt(),h=Pe;if(h){if(i===void 0)throw Error(a(407));i=i()}else i=s();var v=!hn((Ge||d).memoizedState,i);if(v&&(d.memoizedState=i,ft=!0),d=d.queue,rd(qp.bind(null,l,d,n),[n]),d.getSnapshot!==s||v||dt!==null&&dt.memoizedState.tag&1){if(l.flags|=2048,Ua(9,{destroy:void 0},Hp.bind(null,l,d,i,s),null),Ye===null)throw Error(a(349));h||(yr&127)!==0||$p(l,s,i)}return i}function $p(n,s,i){n.flags|=16384,n={getSnapshot:s,value:i},s=Ce.updateQueue,s===null?(s=pl(),Ce.updateQueue=s,s.stores=[n]):(i=s.stores,i===null?s.stores=[n]:i.push(n))}function Hp(n,s,i,l){s.value=i,s.getSnapshot=l,Vp(s)&&Gp(n)}function qp(n,s,i){return i(function(){Vp(s)&&Gp(n)})}function Vp(n){var s=n.getSnapshot;n=n.value;try{var i=s();return!hn(n,i)}catch{return!0}}function Gp(n){var s=Ds(n,2);s!==null&&sn(s,n,2)}function td(n){var s=Ft();if(typeof n=="function"){var i=n;
vendor: 4,444 bytes, line 9
9if(n=i(),qs){Pn(!0);try{i()}finally{Pn(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vr,lastRenderedState:n},s}function Fp(n,s,i,l){return n.baseState=i,Wu(n,Ge,typeof l=="function"?l:vr)}function j_(n,s,i,l,d){if(bl(n))throw Error(a(485));if(n=s.action,n!==null){var h={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};M.T!==null?i(!0):h.isTransition=!1,l(h),i=s.pending,i===null?(h.next=s.pending=h,Kp(s,h)):(h.next=i.next,s.pending=i.next=h)}}function Kp(n,s){var i=s.action,l=s.payload,d=n.state;if(s.isTransition){var h=M.T,v={};M.T=v;try{var S=i(d,l),C=M.S;C!==null&&C(v,S),Yp(n,s,S)}catch(B){nd(n,s,B)}finally{h!==null&&v.types!==null&&(h.types=v.types),M.T=h}}else try{h=i(d,l),Yp(n,s,h)}catch(B){nd(n,s,B)}}function Yp(n,s,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Qp(n,s,l)},function(l){return nd(n,s,l)}):Qp(n,s,i)}function Qp(n,s,i){s.status="fulfilled",s.value=i,Jp(s),n.state=i,s=n.pending,s!==null&&(i=s.next,i===s?n.pending=null:(i=i.next,s.next=i,Kp(n,i)))}function nd(n,s,i){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do s.status="rejected",s.reason=i,Jp(s),s=s.next;while(s!==l)}n.action=null}function Jp(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function Xp(n,s){return s}function Zp(n,s){if(Pe){var i=Ye.formState;if(i!==null){e:{var l=Ce;if(Pe){if(Xe){t:{for(var d=Xe,h=On;d.nodeType!==8;){if(!h){d=null;break t}if(d=jn(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){Xe=jn(d.nextSibling),l=d.data==="F!";break e}}qr(l)}l=!1}l&&(s=i[0])}}return i=Ft(),i.memoizedState=i.baseState=s,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xp,lastRenderedState:s},i.queue=l,i=ym.bind(null,Ce,l),l.dispatch=i,l=td(!1),h=ld.bind(null,Ce,!1,l.queue),l=Ft(),d={state:s,dispatch:null,action:n,pending:null},l.queue=d,i=j_.bind(null,Ce,d,h,i),d.dispatch=i,l.memoizedState=n,[s,i,!1]}function Wp(n){var s=lt();return em(s,Ge,n)}function em(n,s,i){if(s=Wu(n,s,Xp)[0],n=gl(vr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var l=Ui(s)}catch(v){throw v===La?il:v}else l=s;s=lt();var d=s.queue,h=d.dispatch;return i!==s.memoizedState&&(Ce.flags|=2048,Ua(9,{destroy:void 0},L_.bind(null,d,i),null)),[l,h,n]}function L_(n,s){n.action=s}function tm(n){var s=lt(),i=Ge;if(i!==null)return em(s,i,n);lt(),s=s.memoizedState,i=lt();var l=i.queue.dispatch;return i.memoizedState=n,[s,l,!1]}function Ua(n,s,i,l){return n={tag:n,create:i,deps:l,inst:s,next:null},s=Ce.updateQueue,s===null&&(s=pl(),Ce.updateQueue=s),i=s.lastEffect,i===null?s.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,s.lastEffect=n),n}function nm(){return lt().memoizedState}function yl(n,s,i,l){var d=Ft();Ce.flags|=n,d.memoizedState=Ua(1|s,{destroy:void 0},i,l===void 0?null:l)}function vl(n,s,i,l){var d=lt();l=l===void 0?null:l;var h=d.memoizedState.inst;Ge!==null&&l!==null&&Ku(l,Ge.memoizedState.deps)?d.memoizedState=Ua(s,h,i,l):(Ce.flags|=n,d.memoizedState=Ua(1|s,h,i,l))}function rm(n,s){yl(8390656,8,n,s)}function rd(n,s){vl(2048,8,n,s)}function N_(n){Ce.flags|=4;var s=Ce.updateQueue;if(s===null)s=pl(),Ce.updateQueue=s,s.events=[n];else{var i=s.events;i===null?s.events=[n]:i.push(n)}}function sm(n){var s=lt().memoizedState;return N_({ref:s,nextImpl:n}),function(){if((Ie&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function am(n,s){return vl(4,2,n,s)}function im(n,s){return vl(4,4,n,s)}function om(n,s){if(typeof s=="function"){n=n();var i=s(n);return function(){typeof i=="function"?i():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function lm(n,s,i){i=i!=null?i.concat([n]):null,vl(4,4,om.bind(null,s,n),i)}function sd(){}function cm(n,s){var i=lt();s=s===void 0?null:s;var l=i.memoizedState;return s!==null&&Ku(s,l[1])?l[0]:(i.memoizedState=[n,s],n)}function um(n,s){var i=lt();s=s===void 0?null:s;var l=i.memoizedState;if(s!==null&&Ku(s,l[1]))return l[0];if(l=n(),qs){Pn(!0);try{n()}finally{Pn(!1)}}return i.memoizedState=[l,s],l}function ad(n,s,i){return i===void 0||(yr&1073741824)!==0&&(De&261930)===0?n.memoizedState=s:(n.memoizedState=i,n=dg(),Ce.lanes|=n,Zr|=n,i)}function dm(n,s,i,l){return hn(i,s)?i:Da.current!==null?(n=ad(n,i,l),hn(n,s)||(ft=!0),n):(yr&42)===0||(yr&1073741824)!==0&&(De&261930)===0?(ft=!0,n.memoizedState=i):(n=dg(),
vendor: 4,119 bytes, line 9
9Ce.lanes|=n,Zr|=n,s)}function fm(n,s,i,l,d){var h=Q.p;Q.p=h!==0&&8>h?h:8;var v=M.T,S={};M.T=S,ld(n,!1,s,i);try{var C=d(),B=M.S;if(B!==null&&B(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var V=C_(C,l);zi(n,s,V,bn(n))}else zi(n,s,l,bn(n))}catch(Y){zi(n,s,{then:function(){},status:"rejected",reason:Y},bn())}finally{Q.p=h,v!==null&&S.types!==null&&(v.types=S.types),M.T=v}}function D_(){}function id(n,s,i,l){if(n.tag!==5)throw Error(a(476));var d=hm(n).queue;fm(n,d,s,ie,i===null?D_:function(){return pm(n),i(l)})}function hm(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vr,lastRenderedState:ie},next:null};var i={};return s.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vr,lastRenderedState:i},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function pm(n){var s=hm(n);s.next===null&&(s=n.alternate.memoizedState),zi(n,s.next.queue,{},bn())}function od(){return Mt(to)}function mm(){return lt().memoizedState}function gm(){return lt().memoizedState}function M_(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var i=bn();n=Fr(i);var l=Kr(s,n,i);l!==null&&(sn(l,s,i),Ni(l,s,i)),s={cache:Pu()},n.payload=s;return}s=s.return}}function P_(n,s,i){var l=bn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},bl(n)?vm(s,i):(i=Ru(n,s,i,l),i!==null&&(sn(i,n,l),bm(i,s,l)))}function ym(n,s,i){var l=bn();zi(n,s,i,l)}function zi(n,s,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(bl(n))vm(s,d);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=s.lastRenderedReducer,h!==null))try{var v=s.lastRenderedState,S=h(v,i);if(d.hasEagerState=!0,d.eagerState=S,hn(S,v))return Wo(n,s,d,0),Ye===null&&Zo(),!1}catch{}if(i=Ru(n,s,d,l),i!==null)return sn(i,n,l),bm(i,s,l),!0}return!1}function ld(n,s,i,l){if(l={lane:2,revertLane:Id(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},bl(n)){if(s)throw Error(a(479))}else s=Ru(n,i,l,2),s!==null&&sn(s,n,2)}function bl(n){var s=n.alternate;return n===Ce||s!==null&&s===Ce}function vm(n,s){Ma=fl=!0;var i=n.pending;i===null?s.next=s:(s.next=i.next,i.next=s),n.pending=s}function bm(n,s,i){if((i&4194048)!==0){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,Jt(n,i)}}var Bi={readContext:Mt,use:ml,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Bi.useEffectEvent=st;var wm={readContext:Mt,use:ml,useCallback:function(n,s){return Ft().memoizedState=[n,s===void 0?null:s],n},useContext:Mt,useEffect:rm,useImperativeHandle:function(n,s,i){i=i!=null?i.concat([n]):null,yl(4194308,4,om.bind(null,s,n),i)},useLayoutEffect:function(n,s){return yl(4194308,4,n,s)},useInsertionEffect:function(n,s){yl(4,2,n,s)},useMemo:function(n,s){var i=Ft();s=s===void 0?null:s;var l=n();if(qs){Pn(!0);try{n()}finally{Pn(!1)}}return i.memoizedState=[l,s],l},useReducer:function(n,s,i){var l=Ft();if(i!==void 0){var d=i(s);if(qs){Pn(!0);try{i(s)}finally{Pn(!1)}}}else d=s;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=P_.bind(null,Ce,n),[l.memoizedState,n]},useRef:function(n){var s=Ft();return n={current:n},s.memoizedState=n},useState:function(n){n=td(n);var s=n.queue,i=ym.bind(null,Ce,s);return s.dispatch=i,[n.memoizedState,i]},useDebugValue:sd,useDeferredValue:function(n,s){var i=Ft();return ad(i,n,s)},useTransition:function(){var n=td(!1);return n=fm.bind(null,Ce,n.queue,!0,!1),Ft().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,i){var l=Ce,d=Ft();if(Pe){if(i===void 0)throw Error(a(407));i=i()}else{if(i=s(),Ye===null)throw Error(a(349));
vendor: 19,975 bytes, line 9
9(De&127)!==0||$p(l,s,i)}d.memoizedState=i;var h={value:i,getSnapshot:s};return d.queue=h,rm(qp.bind(null,l,h,n),[n]),l.flags|=2048,Ua(9,{destroy:void 0},Hp.bind(null,l,h,i,s),null),i},useId:function(){var n=Ft(),s=Ye.identifierPrefix;if(Pe){var i=Zn,l=Xn;i=(l&~(1<<32-It(l)-1)).toString(32)+i,s="_"+s+"R_"+i,i=hl++,0<i&&(s+="H"+i.toString(32)),s+="_"}else i=O_++,s="_"+s+"r_"+i.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:od,useFormState:Zp,useActionState:Zp,useOptimistic:function(n){var s=Ft();s.memoizedState=s.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=i,s=ld.bind(null,Ce,!0,i),i.dispatch=s,[n,s]},useMemoCache:Zu,useCacheRefresh:function(){return Ft().memoizedState=M_.bind(null,Ce)},useEffectEvent:function(n){var s=Ft(),i={impl:n};return s.memoizedState=i,function(){if((Ie&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},cd={readContext:Mt,use:ml,useCallback:cm,useContext:Mt,useEffect:rd,useImperativeHandle:lm,useInsertionEffect:am,useLayoutEffect:im,useMemo:um,useReducer:gl,useRef:nm,useState:function(){return gl(vr)},useDebugValue:sd,useDeferredValue:function(n,s){var i=lt();return dm(i,Ge.memoizedState,n,s)},useTransition:function(){var n=gl(vr)[0],s=lt().memoizedState;return[typeof n=="boolean"?n:Ui(n),s]},useSyncExternalStore:Ip,useId:mm,useHostTransitionStatus:od,useFormState:Wp,useActionState:Wp,useOptimistic:function(n,s){var i=lt();return Fp(i,Ge,n,s)},useMemoCache:Zu,useCacheRefresh:gm};cd.useEffectEvent=sm;var _m={readContext:Mt,use:ml,useCallback:cm,useContext:Mt,useEffect:rd,useImperativeHandle:lm,useInsertionEffect:am,useLayoutEffect:im,useMemo:um,useReducer:ed,useRef:nm,useState:function(){return ed(vr)},useDebugValue:sd,useDeferredValue:function(n,s){var i=lt();return Ge===null?ad(i,n,s):dm(i,Ge.memoizedState,n,s)},useTransition:function(){var n=ed(vr)[0],s=lt().memoizedState;return[typeof n=="boolean"?n:Ui(n),s]},useSyncExternalStore:Ip,useId:mm,useHostTransitionStatus:od,useFormState:tm,useActionState:tm,useOptimistic:function(n,s){var i=lt();return Ge!==null?Fp(i,Ge,n,s):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Zu,useCacheRefresh:gm};_m.useEffectEvent=sm;function ud(n,s,i,l){s=n.memoizedState,i=i(l,s),i=i==null?s:g({},s,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var dd={enqueueSetState:function(n,s,i){n=n._reactInternals;var l=bn(),d=Fr(l);d.payload=s,i!=null&&(d.callback=i),s=Kr(n,d,l),s!==null&&(sn(s,n,l),Ni(s,n,l))},enqueueReplaceState:function(n,s,i){n=n._reactInternals;var l=bn(),d=Fr(l);d.tag=1,d.payload=s,i!=null&&(d.callback=i),s=Kr(n,d,l),s!==null&&(sn(s,n,l),Ni(s,n,l))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var i=bn(),l=Fr(i);l.tag=2,s!=null&&(l.callback=s),s=Kr(n,l,i),s!==null&&(sn(s,n,i),Ni(s,n,i))}};function Sm(n,s,i,l,d,h,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,h,v):s.prototype&&s.prototype.isPureReactComponent?!Ri(i,l)||!Ri(d,h):!0}function Em(n,s,i,l){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,l),s.state!==n&&dd.enqueueReplaceState(s,s.state,null)}function Vs(n,s){var i=s;if("ref"in s){i={};for(var l in s)l!=="ref"&&(i[l]=s[l])}if(n=n.defaultProps){i===s&&(i=g({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function xm(n){Xo(n)}function Rm(n){console.error(n)}function Tm(n){Xo(n)}function wl(n,s){try{var i=n.onUncaughtError;i(s.value,{componentStack:s.stack})}catch(l){setTimeout(function(){throw l})}}function Am(n,s,i){try{var l=n.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function fd(n,s,i){return i=Fr(i),i.tag=3,i.payload={element:null},i.callback=function(){wl(n,s)},i}function Cm(n){return n=Fr(n),n.tag=3,n}function Om(n,s,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var h=l.value;n.payload=function(){return d(h)},n.callback=function(){Am(s,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Am(s,i,l),typeof d!="function"&&(Wr===null?Wr=new Set([this]):Wr.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function U_(n,s,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(s=i.alternate,s!==null&&Oa(s,i,d,!0),i=mn.current,i!==null){switch(i.tag){case 31:case 13:return kn===null?Ll():i.alternate===null&&at===0&&(at=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===ol?i.flags|=16384:(s=i.updateQueue,s===null?i.updateQueue=new Set([l]):s.add(l),Ud(n,l,d)),!1;case 22:return i.flags|=65536,l===ol?i.flags|=16384:(s=i.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=s):(i=s.retryQueue,i===null?s.retryQueue=new Set([l]):i.add(l)),Ud(n,l,d)),!1}throw Error(a(435,i.tag))}return Ud(n,l,d),Ll(),!1}if(Pe)return s=mn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=d,l!==ju&&(n=Error(a(422),{cause:l}),Ci(Tn(n,i)))):(l!==ju&&(s=Error(a(423),{cause:l}),Ci(Tn(s,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=Tn(l,i),d=fd(n.stateNode,l,d),Hu(n,d),at!==4&&(at=2)),!1;var h=Error(a(520),{cause:l});if(h=Tn(h,i),Ki===null?Ki=[h]:Ki.push(h),at!==4&&(at=2),s===null)return!0;l=Tn(l,i),i=s;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=fd(i.stateNode,l,n),Hu(i,n),!1;case 1:if(s=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Wr===null||!Wr.has(h))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Cm(d),Om(d,n,i,l),Hu(i,d),!1}i=i.return}while(i!==null);return!1}var hd=Error(a(461)),ft=!1;function Pt(n,s,i,l){s.child=n===null?Np(s,null,i,l):Hs(s,n.child,i,l)}function km(n,s,i,l,d){i=i.render;var h=s.ref;if("ref"in l){var v={};for(var S in l)S!=="ref"&&(v[S]=l[S])}else v=l;return zs(s),l=Yu(n,s,i,v,h,d),S=Qu(),n!==null&&!ft?(Ju(n,s,d),br(n,s,d)):(Pe&&S&&Ou(s),s.flags|=1,Pt(n,s,l,d),s.child)}function jm(n,s,i,l,d){if(n===null){var h=i.type;return typeof h=="function"&&!Tu(h)&&h.defaultProps===void 0&&i.compare===null?(s.tag=15,s.type=h,Lm(n,s,h,l,d)):(n=tl(i.type,null,l,s,s.mode,d),n.ref=s.ref,n.return=s,s.child=n)}if(h=n.child,!_d(n,d)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:Ri,i(v,l)&&n.ref===s.ref)return br(n,s,d)}return s.flags|=1,n=hr(h,l),n.ref=s.ref,n.return=s,s.child=n}function Lm(n,s,i,l,d){if(n!==null){var h=n.memoizedProps;if(Ri(h,l)&&n.ref===s.ref)if(ft=!1,s.pendingProps=l=h,_d(n,d))(n.flags&131072)!==0&&(ft=!0);else return s.lanes=n.lanes,br(n,s,d)}return pd(n,s,i,l,d)}function Nm(n,s,i,l){var d=l.children,h=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((s.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,n!==null){for(l=s.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~h}else l=0,s.child=null;return Dm(n,s,h,i,l)}if((i&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&al(s,h!==null?h.cachePool:null),h!==null?Pp(s,h):Vu(),Up(s);else return l=s.lanes=536870912,Dm(n,s,h!==null?h.baseLanes|i:i,i,l)}else h!==null?(al(s,h.cachePool),Pp(s,h),Qr(),s.memoizedState=null):(n!==null&&al(s,null),Vu(),Qr());return Pt(n,s,d,i),s.child}function Ii(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Dm(n,s,i,l,d){var h=zu();return h=h===null?null:{parent:ut._currentValue,pool:h},s.memoizedState={baseLanes:i,cachePool:h},n!==null&&al(s,null),Vu(),Up(s),n!==null&&Oa(n,s,l,!0),s.childLanes=d,null}function _l(n,s){return s=El({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function Mm(n,s,i){return Hs(s,n.child,null,i),n=_l(s,s.pendingProps),n.flags|=2,gn(s),s.memoizedState=null,n}function z_(n,s,i){var l=s.pendingProps,d=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(Pe){if(l.mode==="hidden")return n=_l(s,l),s.lanes=536870912,Ii(null,n);if(Fu(s),(n=Xe)?(n=Kg(n,On),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:$r!==null?{id:Xn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},i=vp(n),i.return=s,s.child=i,Dt=s,Xe=null)):n=null,n===null)throw qr(s);return s.lanes=536870912,null}return _l(s,l)}var h=n.memoizedState;if(h!==null){var v=h.dehydrated;if(Fu(s),d)if(s.flags&256)s.flags&=-257,s=Mm(n,s,i);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(a(558));else if(ft||Oa(n,s,i,!1),d=(i&n.childLanes)!==0,ft||d){if(l=Ye,l!==null&&(v=Xt(l,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,Ds(n,v),sn(l,n,v),hd;Ll(),s=Mm(n,s,i)}else n=h.treeContext,Xe=jn(v.nextSibling),Dt=s,Pe=!0,Hr=null,On=!1,n!==null&&_p(s,n),s=_l(s,l),s.flags|=4096;return s}return n=hr(n.child,{mode:l.mode,children:l.children}),n.ref=s.ref,s.child=n,n.return=s,n}function Sl(n,s){var i=s.ref;if(i===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(n===null||n.ref!==i)&&(s.flags|=4194816)}}function pd(n,s,i,l,d){return zs(s),i=Yu(n,s,i,l,void 0,d),l=Qu(),n!==null&&!ft?(Ju(n,s,d),br(n,s,d)):(Pe&&l&&Ou(s),s.flags|=1,Pt(n,s,i,d),s.child)}function Pm(n,s,i,l,d,h){return zs(s),s.updateQueue=null,i=Bp(s,l,i,d),zp(n),l=Qu(),n!==null&&!ft?(Ju(n,s,h),br(n,s,h)):(Pe&&l&&Ou(s),s.flags|=1,Pt(n,s,i,h),s.child)}function Um(n,s,i,l,d){if(zs(s),s.stateNode===null){var h=Ra,v=i.contextType;typeof v=="object"&&v!==null&&(h=Mt(v)),h=new i(l,h),s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=dd,s.stateNode=h,h._reactInternals=s,h=s.stateNode,h.props=l,h.state=s.memoizedState,h.refs={},Iu(s),v=i.contextType,h.context=typeof v=="object"&&v!==null?Mt(v):Ra,h.state=s.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(ud(s,i,v,l),h.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&dd.enqueueReplaceState(h,h.state,null),Mi(s,l,h,d),Di(),h.state=s.memoizedState),typeof h.componentDidMount=="function"&&(s.flags|=4194308),l=!0}else if(n===null){h=s.stateNode;var S=s.memoizedProps,C=Vs(i,S);h.props=C;var B=h.context,V=i.contextType;v=Ra,typeof V=="object"&&V!==null&&(v=Mt(V));var Y=i.getDerivedStateFromProps;V=typeof Y=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,V||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||B!==v)&&Em(s,h,l,v),Gr=!1;var I=s.memoizedState;h.state=I,Mi(s,l,h,d),Di(),B=s.memoizedState,S||I!==B||Gr?(typeof Y=="function"&&(ud(s,i,Y,l),B=s.memoizedState),(C=Gr||Sm(s,i,C,l,I,B,v))?(V||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(s.flags|=4194308)):(typeof h.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=B),h.props=l,h.state=B,h.context=v,l=C):(typeof h.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{h=s.stateNode,$u(n,s),v=s.memoizedProps,V=Vs(i,v),h.props=V,Y=s.pendingProps,I=h.context,B=i.contextType,C=Ra,typeof B=="object"&&B!==null&&(C=Mt(B)),S=i.getDerivedStateFromProps,(B=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==Y||I!==C)&&Em(s,h,l,C),Gr=!1,I=s.memoizedState,h.state=I,Mi(s,l,h,d),Di();var $=s.memoizedState;v!==Y||I!==$||Gr||n!==null&&n.dependencies!==null&&rl(n.dependencies)?(typeof S=="function"&&(ud(s,i,S,l),$=s.memoizedState),(V=Gr||Sm(s,i,V,l,I,$,C)||n!==null&&n.dependencies!==null&&rl(n.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,$,C),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,$,C)),typeof h.componentDidUpdate=="function"&&(s.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=$),h.props=l,h.state=$,h.context=C,l=V):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&I===n.memoizedState||(s.flags|=1024),l=!1)}return h=l,Sl(n,s),l=(s.flags&128)!==0,h||l?(h=s.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:h.render(),s.flags|=1,n!==null&&l?(s.child=Hs(s,n.child,null,d),s.child=Hs(s,null,i,d)):Pt(n,s,i,d),s.memoizedState=h.state,n=s.child):n=br(n,s,d),n}function zm(n,s,i,l){return Ps(),s.flags|=256,Pt(n,s,i,l),s.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(n){return{baseLanes:n,cachePool:Ap()}}function yd(n,s,i){return n=n!==null?n.childLanes&~i:0,s&&(n|=vn),n}function Bm(n,s,i){var l=s.pendingProps,d=!1,h=(s.flags&128)!==0,v;if((v=h)||(v=n!==null&&n.memoizedState===null?!1:(ot.current&2)!==0),v&&(d=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,n===null){if(Pe){if(d?Yr(s):Qr(),(n=Xe)?(n=Kg(n,On),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:$r!==null?{id:Xn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},i=vp(n),i.return=s,s.child=i,Dt=s,Xe=null)):n=null,n===null)throw qr(s);return Wd(n)?s.lanes=32:s.lanes=536870912,null}var S=l.children;return l=l.fallback,d?(Qr(),d=s.mode,S=El({mode:"hidden",children:S},d),l=Ms(l,d,i,null),S.return=s,l.return=s,S.sibling=l,s.child=S,l=s.child,l.memoizedState=gd(i),l.childLanes=yd(n,v,i),s.memoizedState=md,Ii(null,l)):(Yr(s),vd(s,S))}var C=n.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(h)s.flags&256?(Yr(s),s.flags&=-257,s=bd(n,s,i)):s.memoizedState!==null?(Qr(),s.child=n.child,s.flags|=128,s=null):(Qr(),S=l.fallback,d=s.mode,l=El({mode:"visible",children:l.children},d),S=Ms(S,d,i,null),S.flags|=2,l.return=s,S.return=s,l.sibling=S,s.child=l,Hs(s,n.child,null,i),l=s.child,l.memoizedState=gd(i),l.childLanes=yd(n,v,i),s.memoizedState=md,s=Ii(null,l));else if(Yr(s),Wd(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var B=v.dgst;v=B,l=Error(a(419)),l.stack="",l.digest=v,Ci({value:l,source:null,stack:null}),s=bd(n,s,i)}else if(ft||Oa(n,s,i,!1),v=(i&n.childLanes)!==0,ft||v){if(v=Ye,v!==null&&(l=Xt(v,i),l!==0&&l!==C.retryLane))throw C.retryLane=l,Ds(n,l),sn(v,n,l),hd;Zd(S)||Ll(),s=bd(n,s,i)}else Zd(S)?(s.flags|=192,s.child=n.child,s=null):(n=C.treeContext,Xe=jn(S.nextSibling),Dt=s,Pe=!0,Hr=null,On=!1,n!==null&&_p(s,n),s=vd(s,l.children),s.flags|=4096);return s}return d?(Qr(),S=l.fallback,d=s.mode,C=n.child,B=C.sibling,l=hr(C,{mode:"hidden",children:l.children}),l.subtreeFlags=C.subtreeFlags&65011712,B!==null?S=hr(B,S):(S=Ms(S,d,i,null),S.flags|=2),S.return=s,l.return=s,l.sibling=S,s.child=l,Ii(null,l),l=s.child,S=n.child.memoizedState,S===null?S=gd(i):(d=S.cachePool,d!==null?(C=ut._currentValue,d=d.parent!==C?{parent:C,pool:C}:d):d=Ap(),S={baseLanes:S.baseLanes|i,cachePool:d}),l.memoizedState=S,l.childLanes=yd(n,v,i),s.memoizedState=md,Ii(n.child,l)):(Yr(s),i=n.child,n=i.sibling,i=hr(i,{mode:"visible",children:l.children}),i.return=s,i.sibling=null,n!==null&&(v=s.deletions,v===null?(s.deletions=[n],s.flags|=16):v.push(n)),s.child=i,s.memoizedState=null,i)}function vd(n,s){return s=El({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function El(n,s){return n=pn(22,n,null,s),n.lanes=0,n}function bd(n,s,i){return Hs(s,n.child,null,i),n=vd(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Im(n,s,i){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s),Du(n.return,s,i)}function wd(n,s,i,l,d,h){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:h}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=d,v.treeForkCount=h)}function $m(n,s,i){var l=s.pendingProps,d=l.revealOrder,h=l.tail;l=l.children;var v=ot.current,S=(v&2)!==0;if(S?(v=v&1|2,s.flags|=128):v&=1,K(ot,v),Pt(n,s,l,i),l=Pe?Ai:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Im(n,i,s);else if(n.tag===19)Im(n,i,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(i=s.child,d=null;i!==null;)n=i.alternate,n!==null&&dl(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=s.child,s.child=null):(d=i.sibling,i.sibling=null),wd(s,!1,d,i,h,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=s.child,s.child=null;d!==null;){if(n=d.alternate,n!==null&&dl(n)===null){s.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}wd(s,!0,i,null,h,l);break;case"together":wd(s,!1,null,null,void 0,l);break;default:s.memoizedState=null}return s.child}function br(n,s,i){if(n!==null&&(s.dependencies=n.dependencies),Zr|=s.lanes,(i&s.childLanes)===0)if(n!==null){if(Oa(n,s,i,!1),(i&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(a(153));if(s.child!==null){for(n=s.child,i=hr(n,n.pendingProps),s.child=i,i.return=s;n.sibling!==null;)n=n.sibling,i=i.sibling=hr(n,n.pendingProps),i.return=s;i.sibling=null}return s.child}function _d(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&rl(n)))}function B_(n,s,i){switch(s.tag){case 3:we(s,s.stateNode.containerInfo),Vr(s,ut,n.memoizedState.cache),Ps();break;case 27:case 5:jt(s);break;case 4:we(s,s.stateNode.containerInfo);break;case 10:Vr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Fu(s),null;break;case 13:var l=s.memoizedState;if(l!==null)return l.dehydrated!==null?(Yr(s),s.flags|=128,null):(i&s.child.childLanes)!==0?Bm(n,s,i):(Yr(s),n=br(n,s,i),n!==null?n.sibling:null);Yr(s);break;case 19:var d=(n.flags&128)!==0;if(l=(i&s.childLanes)!==0,l||(Oa(n,s,i,!1),l=(i&s.childLanes)!==0),d){if(l)return $m(n,s,i);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),K(ot,ot.current),l)break;return null;case 22:return s.lanes=0,Nm(n,s,i,s.pendingProps);case 24:Vr(s,ut,n.memoizedState.cache)}return br(n,s,i)}function Hm(n,s,i){if(n!==null)if(n.memoizedProps!==s.pendingProps)ft=!0;else{if(!_d(n,i)&&(s.flags&128)===0)return ft=!1,B_(n,s,i);ft=(n.flags&131072)!==0}else ft=!1,Pe&&(s.flags&1048576)!==0&&wp(s,Ai,s.index);switch(s.lanes=0,s.tag){case 16:e:{var l=s.pendingProps;if(n=Is(s.elementType),s.type=n,typeof n=="function")Tu(n)?(l=Vs(n,l),s.tag=1,s=Um(null,s,n,l,i)):(s.tag=0,s=pd(null,s,n,l,i));else{if(n!=null){var d=n.$$typeof;if(d===P){s.tag=11,s=km(null,s,n,l,i);break e}else if(d===H){s.tag=14,s=jm(null,s,n,l,i);break e}}throw s=$e(n)||n,Error(a(306,s,""))}}return s;case 0:return pd(n,s,s.type,s.pendingProps,i);case 1:return l=s.type,d=Vs(l,s.pendingProps),Um(n,s,l,d,i);case 3:e:{if(we(s,s.stateNode.containerInfo),n===null)throw Error(a(387));l=s.pendingProps;var h=s.memoizedState;d=h.element,$u(n,s),Mi(s,l,null,i);var v=s.memoizedState;
vendor: 5,630 bytes, line 9
9if(l=v.cache,Vr(s,ut,l),l!==h.cache&&Mu(s,[ut],i,!0),Di(),l=v.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=h,s.memoizedState=h,s.flags&256){s=zm(n,s,l,i);break e}else if(l!==d){d=Tn(Error(a(424)),s),Ci(d),s=zm(n,s,l,i);break e}else for(n=s.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Xe=jn(n.firstChild),Dt=s,Pe=!0,Hr=null,On=!0,i=Np(s,null,l,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ps(),l===d){s=br(n,s,i);break e}Pt(n,s,l,i)}s=s.child}return s;case 26:return Sl(n,s),n===null?(i=Wg(s.type,null,s.pendingProps,null))?s.memoizedState=i:Pe||(i=s.type,n=s.pendingProps,l=Bl(ae.current).createElement(i),l[Nt]=s,l[Zt]=n,Ut(l,i,n),Tt(l),s.stateNode=l):s.memoizedState=Wg(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return jt(s),n===null&&Pe&&(l=s.stateNode=Jg(s.type,s.pendingProps,ae.current),Dt=s,On=!0,d=Xe,rs(s.type)?(ef=d,Xe=jn(l.firstChild)):Xe=d),Pt(n,s,s.pendingProps.children,i),Sl(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&Pe&&((d=l=Xe)&&(l=mS(l,s.type,s.pendingProps,On),l!==null?(s.stateNode=l,Dt=s,Xe=jn(l.firstChild),On=!1,d=!0):d=!1),d||qr(s)),jt(s),d=s.type,h=s.pendingProps,v=n!==null?n.memoizedProps:null,l=h.children,Qd(d,h)?l=null:v!==null&&Qd(d,v)&&(s.flags|=32),s.memoizedState!==null&&(d=Yu(n,s,k_,null,null,i),to._currentValue=d),Sl(n,s),Pt(n,s,l,i),s.child;case 6:return n===null&&Pe&&((n=i=Xe)&&(i=gS(i,s.pendingProps,On),i!==null?(s.stateNode=i,Dt=s,Xe=null,n=!0):n=!1),n||qr(s)),null;case 13:return Bm(n,s,i);case 4:return we(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=Hs(s,null,l,i):Pt(n,s,l,i),s.child;case 11:return km(n,s,s.type,s.pendingProps,i);case 7:return Pt(n,s,s.pendingProps,i),s.child;case 8:return Pt(n,s,s.pendingProps.children,i),s.child;case 12:return Pt(n,s,s.pendingProps.children,i),s.child;case 10:return l=s.pendingProps,Vr(s,s.type,l.value),Pt(n,s,l.children,i),s.child;case 9:return d=s.type._context,l=s.pendingProps.children,zs(s),d=Mt(d),l=l(d),s.flags|=1,Pt(n,s,l,i),s.child;case 14:return jm(n,s,s.type,s.pendingProps,i);case 15:return Lm(n,s,s.type,s.pendingProps,i);case 19:return $m(n,s,i);case 31:return z_(n,s,i);case 22:return Nm(n,s,i,s.pendingProps);case 24:return zs(s),l=Mt(ut),n===null?(d=zu(),d===null&&(d=Ye,h=Pu(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=i),d=h),s.memoizedState={parent:l,cache:d},Iu(s),Vr(s,ut,d)):((n.lanes&i)!==0&&($u(n,s),Mi(s,null,null,i),Di()),d=n.memoizedState,h=s.memoizedState,d.parent!==l?(d={parent:l,cache:l},s.memoizedState=d,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=d),Vr(s,ut,l)):(l=h.cache,Vr(s,ut,l),l!==d.cache&&Mu(s,[ut],i,!0))),Pt(n,s,s.pendingProps.children,i),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function wr(n){n.flags|=4}function Sd(n,s,i,l,d){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(mg())n.flags|=8192;else throw $s=ol,Bu}else n.flags&=-16777217}function qm(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!sy(s))if(mg())n.flags|=8192;else throw $s=ol,Bu}function xl(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?$t():536870912,n.lanes|=s,$a|=s)}function $i(n,s){if(!Pe)switch(n.tailMode){case"hidden":s=n.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.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?s||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Ze(n){var s=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(s)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,s}function I_(n,s,i){var l=s.pendingProps;switch(ku(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(s),null;case 1:return Ze(s),null;case 3:return i=s.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),gr(ut),ye(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Ca(s)?wr(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Lu())),Ze(s),null;case 26:var d=s.type,h=s.memoizedState;return n===null?(wr(s),h!==null?(Ze(s),qm(s,h)):(Ze(s),Sd(s,d,null,l,i))):h?h!==n.memoizedState?(wr(s),Ze(s),qm(s,h)):(Ze(s),s.flags&=-16777217):(n=n.memoizedProps,n!==l&&wr(s),Ze(s),Sd(s,d,n,l,i)),null;case 27:if(yt(s),i=ae.current,d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&wr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Ze(s),null}n=W.current,Ca(s)?Sp(s):(n=Jg(d,l,i),s.stateNode=n,wr(s))}return Ze(s),null;case 5:if(yt(s),d=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==l&&wr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Ze(s),null}if(h=W.current,Ca(s))Sp(s);else{var v=Bl(ae.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;
vendor: 25,995 bytes, line 9
9case"select":h=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?h.multiple=!0:l.size&&(h.size=l.size);break;default:h=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}h[Nt]=s,h[Zt]=l;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=h;e:switch(Ut(h,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&&wr(s)}}return Ze(s),Sd(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,i),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==l&&wr(s);else{if(typeof l!="string"&&s.stateNode===null)throw Error(a(166));if(n=ae.current,Ca(s)){if(n=s.stateNode,i=s.memoizedProps,l=null,d=Dt,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[Nt]=s,n=!!(n.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Bg(n.nodeValue,i)),n||qr(s,!0)}else n=Bl(n).createTextNode(l),n[Nt]=s,s.stateNode=n}return Ze(s),null;case 31:if(i=s.memoizedState,n===null||n.memoizedState!==null){if(l=Ca(s),i!==null){if(n===null){if(!l)throw Error(a(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Nt]=s}else Ps(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ze(s),n=!1}else i=Lu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return s.flags&256?(gn(s),s):(gn(s),null);if((s.flags&128)!==0)throw Error(a(558))}return Ze(s),null;case 13:if(l=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Ca(s),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(a(318));if(d=s.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Nt]=s}else Ps(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ze(s),d=!1}else d=Lu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return s.flags&256?(gn(s),s):(gn(s),null)}return gn(s),(s.flags&128)!==0?(s.lanes=i,s):(i=l!==null,n=n!==null&&n.memoizedState!==null,i&&(l=s.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==d&&(l.flags|=2048)),i!==n&&i&&(s.child.flags|=8192),xl(s,s.updateQueue),Ze(s),null);case 4:return ye(),n===null&&Vd(s.stateNode.containerInfo),Ze(s),null;case 10:return gr(s.type),Ze(s),null;case 19:if(G(ot),l=s.memoizedState,l===null)return Ze(s),null;if(d=(s.flags&128)!==0,h=l.rendering,h===null)if(d)$i(l,!1);else{if(at!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(h=dl(n),h!==null){for(s.flags|=128,$i(l,!1),n=h.updateQueue,s.updateQueue=n,xl(s,n),s.subtreeFlags=0,n=i,i=s.child;i!==null;)yp(i,n),i=i.sibling;return K(ot,ot.current&1|2),Pe&&pr(s,l.treeForkCount),s.child}n=n.sibling}l.tail!==null&&xt()>Ol&&(s.flags|=128,d=!0,$i(l,!1),s.lanes=4194304)}else{if(!d)if(n=dl(h),n!==null){if(s.flags|=128,d=!0,n=n.updateQueue,s.updateQueue=n,xl(s,n),$i(l,!0),l.tail===null&&l.tailMode==="hidden"&&!h.alternate&&!Pe)return Ze(s),null}else 2*xt()-l.renderingStartTime>Ol&&i!==536870912&&(s.flags|=128,d=!0,$i(l,!1),s.lanes=4194304);l.isBackwards?(h.sibling=s.child,s.child=h):(n=l.last,n!==null?n.sibling=h:s.child=h,l.last=h)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=xt(),n.sibling=null,i=ot.current,K(ot,d?i&1|2:i&1),Pe&&pr(s,l.treeForkCount),n):(Ze(s),null);case 22:case 23:return gn(s),Gu(),l=s.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(s.flags|=8192):l&&(s.flags|=8192),l?(i&536870912)!==0&&(s.flags&128)===0&&(Ze(s),s.subtreeFlags&6&&(s.flags|=8192)):Ze(s),i=s.updateQueue,i!==null&&xl(s,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==i&&(s.flags|=2048),n!==null&&G(Bs),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),s.memoizedState.cache!==i&&(s.flags|=2048),gr(ut),Ze(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function $_(n,s){switch(ku(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return gr(ut),ye(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return yt(s),null;case 31:if(s.memoizedState!==null){if(gn(s),s.alternate===null)throw Error(a(340));Ps()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(gn(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(a(340));Ps()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return G(ot),null;case 4:return ye(),null;case 10:return gr(s.type),null;case 22:case 23:return gn(s),Gu(),n!==null&&G(Bs),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return gr(ut),null;case 25:return null;default:return null}}function Vm(n,s){switch(ku(s),s.tag){case 3:gr(ut),ye();break;case 26:case 27:case 5:yt(s);break;case 4:ye();break;case 31:s.memoizedState!==null&&gn(s);break;case 13:gn(s);break;case 19:G(ot);break;case 10:gr(s.type);break;case 22:case 23:gn(s),Gu(),n!==null&&G(Bs);break;case 24:gr(ut)}}function Hi(n,s){try{var i=s.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 h=i.create,v=i.inst;l=h(),v.destroy=l}i=i.next}while(i!==d)}}catch(S){qe(s,s.return,S)}}function Jr(n,s,i){try{var l=s.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var h=d.next;l=h;do{if((l.tag&n)===n){var v=l.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,d=s;var C=i,B=S;try{B()}catch(V){qe(d,C,V)}}}l=l.next}while(l!==h)}}catch(V){qe(s,s.return,V)}}function Gm(n){var s=n.updateQueue;if(s!==null){var i=n.stateNode;try{Mp(s,i)}catch(l){qe(n,n.return,l)}}}function Fm(n,s,i){i.props=Vs(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(l){qe(n,s,l)}}function qi(n,s){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){qe(n,s,d)}}function Wn(n,s){var i=n.ref,l=n.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){qe(n,s,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){qe(n,s,d)}else i.current=null}function Km(n){var s=n.type,i=n.memoizedProps,l=n.stateNode;try{e:switch(s){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){qe(n,n.return,d)}}function Ed(n,s,i){try{var l=n.stateNode;cS(l,n.type,i,s),l[Zt]=s}catch(d){qe(n,n.return,d)}}function Ym(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&rs(n.type)||n.tag===4}function xd(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&&rs(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 Rd(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,s):(s=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,s.appendChild(n),i=i._reactRootContainer,i!=null||s.onclick!==null||(s.onclick=dr));else if(l!==4&&(l===27&&rs(n.type)&&(i=n.stateNode,s=null),n=n.child,n!==null))for(Rd(n,s,i),n=n.sibling;n!==null;)Rd(n,s,i),n=n.sibling}function Rl(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?i.insertBefore(n,s):i.appendChild(n);else if(l!==4&&(l===27&&rs(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(Rl(n,s,i),n=n.sibling;n!==null;)Rl(n,s,i),n=n.sibling}function Qm(n){var s=n.stateNode,i=n.memoizedProps;try{for(var l=n.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);Ut(s,l,i),s[Nt]=n,s[Zt]=i}catch(h){qe(n,n.return,h)}}var _r=!1,ht=!1,Td=!1,Jm=typeof WeakSet=="function"?WeakSet:Set,At=null;function H_(n,s){if(n=n.containerInfo,Kd=Fl,n=lp(n),bu(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,h=l.focusNode;l=l.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,S=-1,C=-1,B=0,V=0,Y=n,I=null;t:for(;;){for(var $;Y!==i||d!==0&&Y.nodeType!==3||(S=v+d),Y!==h||l!==0&&Y.nodeType!==3||(C=v+l),Y.nodeType===3&&(v+=Y.nodeValue.length),($=Y.firstChild)!==null;)I=Y,Y=$;for(;;){if(Y===n)break t;if(I===i&&++B===d&&(S=v),I===h&&++V===l&&(C=v),($=Y.nextSibling)!==null)break;Y=I,I=Y.parentNode}Y=$}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Yd={focusedElem:n,selectionRange:i},Fl=!1,At=s;At!==null;)if(s=At,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,At=n;else for(;At!==null;){switch(s=At,h=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.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&&h!==null){n=void 0,i=s,d=h.memoizedProps,h=h.memoizedState,l=i.stateNode;try{var le=Vs(i.type,d);n=l.getSnapshotBeforeUpdate(le,h),l.__reactInternalSnapshotBeforeUpdate=n}catch(be){qe(i,i.return,be)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,i=n.nodeType,i===9)Xd(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Xd(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=s.sibling,n!==null){n.return=s.return,At=n;break}At=s.return}}function Xm(n,s,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Er(n,i),l&4&&Hi(5,i);break;case 1:if(Er(n,i),l&4)if(n=i.stateNode,s===null)try{n.componentDidMount()}catch(v){qe(i,i.return,v)}else{var d=Vs(i.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(d,s,n.__reactInternalSnapshotBeforeUpdate)}catch(v){qe(i,i.return,v)}}l&64&&Gm(i),l&512&&qi(i,i.return);break;case 3:if(Er(n,i),l&64&&(n=i.updateQueue,n!==null)){if(s=null,i.child!==null)switch(i.child.tag){case 27:case 5:s=i.child.stateNode;break;case 1:s=i.child.stateNode}try{Mp(n,s)}catch(v){qe(i,i.return,v)}}break;case 27:s===null&&l&4&&Qm(i);case 26:case 5:Er(n,i),s===null&&l&4&&Km(i),l&512&&qi(i,i.return);break;case 12:Er(n,i);break;case 31:Er(n,i),l&4&&eg(n,i);break;case 13:Er(n,i),l&4&&tg(n,i),l&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=X_.bind(null,i),yS(n,i))));break;case 22:if(l=i.memoizedState!==null||_r,!l){s=s!==null&&s.memoizedState!==null||ht,d=_r;var h=ht;_r=l,(ht=s)&&!h?xr(n,i,(i.subtreeFlags&8772)!==0):Er(n,i),_r=d,ht=h}break;case 30:break;default:Er(n,i)}}function Zm(n){var s=n.alternate;s!==null&&(n.alternate=null,Zm(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&nu(s)),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 et=null,en=!1;function Sr(n,s,i){for(i=i.child;i!==null;)Wm(n,s,i),i=i.sibling}function Wm(n,s,i){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(As,i)}catch{}switch(i.tag){case 26:ht||Wn(i,s),Sr(n,s,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ht||Wn(i,s);var l=et,d=en;rs(i.type)&&(et=i.stateNode,en=!1),Sr(n,s,i),Zi(i.stateNode),et=l,en=d;break;case 5:ht||Wn(i,s);case 6:if(l=et,d=en,et=null,Sr(n,s,i),et=l,en=d,et!==null)if(en)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(i.stateNode)}catch(h){qe(i,s,h)}else try{et.removeChild(i.stateNode)}catch(h){qe(i,s,h)}break;case 18:et!==null&&(en?(n=et,Gg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),Qa(n)):Gg(et,i.stateNode));break;case 4:l=et,d=en,et=i.stateNode.containerInfo,en=!0,Sr(n,s,i),et=l,en=d;break;case 0:case 11:case 14:case 15:Jr(2,i,s),ht||Jr(4,i,s),Sr(n,s,i);break;case 1:ht||(Wn(i,s),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Fm(i,s,l)),Sr(n,s,i);break;case 21:Sr(n,s,i);break;case 22:ht=(l=ht)||i.memoizedState!==null,Sr(n,s,i),ht=l;break;default:Sr(n,s,i)}}function eg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Qa(n)}catch(i){qe(s,s.return,i)}}}function tg(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Qa(n)}catch(i){qe(s,s.return,i)}}function q_(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Jm),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Jm),s;default:throw Error(a(435,n.tag))}}function Tl(n,s){var i=q_(n);s.forEach(function(l){if(!i.has(l)){i.add(l);var d=Z_.bind(null,n,l);l.then(d,d)}})}function tn(n,s){var i=s.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],h=n,v=s,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(rs(S.type)){et=S.stateNode,en=!1;break e}break;case 5:et=S.stateNode,en=!1;break e;case 3:case 4:et=S.stateNode.containerInfo,en=!0;break e}S=S.return}if(et===null)throw Error(a(160));Wm(h,v,d),et=null,en=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)ng(s,n),s=s.sibling}var Bn=null;function ng(n,s){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:tn(s,n),nn(n),l&4&&(Jr(3,n,n.return),Hi(3,n),Jr(5,n,n.return));break;case 1:tn(s,n),nn(n),l&512&&(ht||i===null||Wn(i,i.return)),l&64&&_r&&(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=Bn;if(tn(s,n),nn(n),l&512&&(ht||i===null||Wn(i,i.return)),l&4){var h=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":h=d.getElementsByTagName("title")[0],(!h||h[gi]||h[Nt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(l),d.head.insertBefore(h,d.querySelector("head > title"))),Ut(h,l,i),h[Nt]=n,Tt(h),l=h;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(h=v[S],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}h=d.createElement(l),Ut(h,l,i),d.head.appendChild(h);break;case"meta":if(v=ny("meta","content",d).get(l+(i.content||""))){for(S=0;S<v.length;S++)if(h=v[S],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}h=d.createElement(l),Ut(h,l,i),d.head.appendChild(h);break;default:throw Error(a(468,l))}h[Nt]=n,Tt(h),l=h}n.stateNode=l}else ry(d,n.type,n.stateNode);else n.stateNode=ty(d,l,n.memoizedProps);else h!==l?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,l===null?ry(d,n.type,n.stateNode):ty(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&Ed(n,n.memoizedProps,i.memoizedProps)}break;case 27:tn(s,n),nn(n),l&512&&(ht||i===null||Wn(i,i.return)),i!==null&&l&4&&Ed(n,n.memoizedProps,i.memoizedProps);break;case 5:if(tn(s,n),nn(n),l&512&&(ht||i===null||Wn(i,i.return)),n.flags&32){d=n.stateNode;try{va(d,"")}catch(le){qe(n,n.return,le)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,Ed(n,d,i!==null?i.memoizedProps:d)),l&1024&&(Td=!0);break;case 6:if(tn(s,n),nn(n),l&4){if(n.stateNode===null)throw Error(a(162));l=n.memoizedProps,i=n.stateNode;try{i.nodeValue=l}catch(le){qe(n,n.return,le)}}break;case 3:if(Hl=null,d=Bn,Bn=Il(s.containerInfo),tn(s,n),Bn=d,nn(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Qa(s.containerInfo)}catch(le){qe(n,n.return,le)}Td&&(Td=!1,rg(n));break;case 4:l=Bn,Bn=Il(n.stateNode.containerInfo),tn(s,n),nn(n),Bn=l;break;case 12:tn(s,n),nn(n);break;case 31:tn(s,n),nn(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Tl(n,l)));break;case 13:tn(s,n),nn(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Cl=xt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Tl(n,l)));break;case 22:d=n.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,B=_r,V=ht;if(_r=B||d,ht=V||C,tn(s,n),ht=V,_r=B,nn(n),l&8192)e:for(s=n.stateNode,s._visibility=d?s._visibility&-2:s._visibility|1,d&&(i===null||C||_r||ht||Gs(n)),i=null,s=n;;){if(s.tag===5||s.tag===26){if(i===null){C=i=s;try{if(h=C.stateNode,d)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=C.stateNode;var Y=C.memoizedProps.style,I=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;S.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(le){qe(C,C.return,le)}}}else if(s.tag===6){if(i===null){C=s;try{C.stateNode.nodeValue=d?"":C.memoizedProps}catch(le){qe(C,C.return,le)}}}else if(s.tag===18){if(i===null){C=s;try{var $=C.stateNode;d?Fg($,!0):Fg(C.stateNode,!1)}catch(le){qe(C,C.return,le)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;i===s&&(i=null),s=s.return}i===s&&(i=null),s.sibling.return=s.return,s=s.sibling}l&4&&(l=n.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Tl(n,i))));break;case 19:tn(s,n),nn(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Tl(n,l)));break;case 30:break;case 21:break;default:tn(s,n),nn(n)}}function nn(n){var s=n.flags;if(s&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,h=xd(n);Rl(n,h,d);break;case 5:var v=i.stateNode;i.flags&32&&(va(v,""),i.flags&=-33);var S=xd(n);Rl(n,S,v);break;case 3:case 4:var C=i.stateNode.containerInfo,B=xd(n);Rd(n,B,C);break;default:throw Error(a(161))}}catch(V){qe(n,n.return,V)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function rg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;rg(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function Er(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Xm(n,s.alternate,s),s=s.sibling}function Gs(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:Jr(4,s,s.return),Gs(s);break;case 1:Wn(s,s.return);var i=s.stateNode;typeof i.componentWillUnmount=="function"&&Fm(s,s.return,i),Gs(s);break;case 27:Zi(s.stateNode);case 26:case 5:Wn(s,s.return),Gs(s);break;case 22:s.memoizedState===null&&Gs(s);break;case 30:Gs(s);break;default:Gs(s)}n=n.sibling}}function xr(n,s,i){for(i=i&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var l=s.alternate,d=n,h=s,v=h.flags;switch(h.tag){case 0:case 11:case 15:xr(d,h,i),Hi(4,h);break;case 1:if(xr(d,h,i),l=h,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(B){qe(l,l.return,B)}if(l=h,d=l.updateQueue,d!==null){var S=l.stateNode;try{var C=d.shared.hiddenCallbacks;if(C!==null)for(d.shared.hiddenCallbacks=null,d=0;d<C.length;d++)Dp(C[d],S)}catch(B){qe(l,l.return,B)}}i&&v&64&&Gm(h),qi(h,h.return);break;case 27:Qm(h);case 26:case 5:xr(d,h,i),i&&l===null&&v&4&&Km(h),qi(h,h.return);break;case 12:xr(d,h,i);break;case 31:xr(d,h,i),i&&v&4&&eg(d,h);break;case 13:xr(d,h,i),i&&v&4&&tg(d,h);break;case 22:h.memoizedState===null&&xr(d,h,i),qi(h,h.return);break;case 30:break;default:xr(d,h,i)}s=s.sibling}}function Ad(n,s){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&Oi(i))}function Cd(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Oi(n))}function In(n,s,i,l){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)sg(n,s,i,l),s=s.sibling}function sg(n,s,i,l){var d=s.flags;switch(s.tag){case 0:case 11:case 15:In(n,s,i,l),d&2048&&Hi(9,s);break;case 1:In(n,s,i,l);break;case 3:In(n,s,i,l),d&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Oi(n)));break;case 12:if(d&2048){In(n,s,i,l),n=s.stateNode;try{var h=s.memoizedProps,v=h.id,S=h.onPostCommit;typeof S=="function"&&S(v,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(C){qe(s,s.return,C)}}else In(n,s,i,l);break;case 31:In(n,s,i,l);break;case 13:In(n,s,i,l);break;case 23:break;case 22:h=s.stateNode,v=s.alternate,s.memoizedState!==null?h._visibility&2?In(n,s,i,l):Vi(n,s):h._visibility&2?In(n,s,i,l):(h._visibility|=2,za(n,s,i,l,(s.subtreeFlags&10256)!==0||!1)),d&2048&&Ad(v,s);break;case 24:In(n,s,i,l),d&2048&&Cd(s.alternate,s);break;default:In(n,s,i,l)}}function za(n,s,i,l,d){for(d=d&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var h=n,v=s,S=i,C=l,B=v.flags;switch(v.tag){case 0:case 11:case 15:za(h,v,S,C,d),Hi(8,v);break;case 23:break;case 22:var V=v.stateNode;v.memoizedState!==null?V._visibility&2?za(h,v,S,C,d):Vi(h,v):(V._visibility|=2,za(h,v,S,C,d)),d&&B&2048&&Ad(v.alternate,v);break;case 24:za(h,v,S,C,d),d&&B&2048&&Cd(v.alternate,v);break;default:za(h,v,S,C,d)}s=s.sibling}}function Vi(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var i=n,l=s,d=l.flags;switch(l.tag){case 22:Vi(i,l),d&2048&&Ad(l.alternate,l);break;case 24:Vi(i,l),d&2048&&Cd(l.alternate,l);break;default:Vi(i,l)}s=s.sibling}}var Gi=8192;function Ba(n,s,i){if(n.subtreeFlags&Gi)for(n=n.child;n!==null;)ag(n,s,i),n=n.sibling}function ag(n,s,i){switch(n.tag){case 26:Ba(n,s,i),n.flags&Gi&&n.memoizedState!==null&&OS(i,Bn,n.memoizedState,n.memoizedProps);break;case 5:Ba(n,s,i);break;case 3:case 4:var l=Bn;Bn=Il(n.stateNode.containerInfo),Ba(n,s,i),Bn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Gi,Gi=16777216,Ba(n,s,i),Gi=l):Ba(n,s,i));break;default:Ba(n,s,i)}}function ig(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function Fi(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];At=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:Fi(n),n.flags&2048&&Jr(9,n,n.return);break;case 3:Fi(n);break;case 12:Fi(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,Al(n)):Fi(n);break;default:Fi(n)}}function Al(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];At=l,lg(l,n)}ig(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:Jr(8,s,s.return),Al(s);break;case 22:i=s.stateNode,i._visibility&2&&(i._visibility&=-3,Al(s));break;default:Al(s)}n=n.sibling}}function lg(n,s){for(;At!==null;){var i=At;switch(i.tag){case 0:case 11:case 15:Jr(8,i,s);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:Oi(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,At=l;else e:for(i=n;At!==null;){l=At;var d=l.sibling,h=l.return;if(Zm(l),l===i){At=null;break e}if(d!==null){d.return=h,At=d;break e}At=h}}}var V_={getCacheForType:function(n){var s=Mt(ut),i=s.data.get(n);return i===void 0&&(i=n(),s.data.set(n,i)),i},cacheSignal:function(){return Mt(ut).controller.signal}},G_=typeof WeakMap=="function"?WeakMap:Map,Ie=0,Ye=null,Le=null,De=0,He=0,yn=null,Xr=!1,Ia=!1,Od=!1,Rr=0,at=0,Zr=0,Fs=0,kd=0,vn=0,$a=0,Ki=null,rn=null,jd=!1,Cl=0,cg=0,Ol=1/0,kl=null,Wr=null,bt=0,es=null,Ha=null,Tr=0,Ld=0,Nd=null,ug=null,Yi=0,Dd=null;function bn(){return(Ie&2)!==0&&De!==0?De&-De:M.T!==null?Id():eu()}function dg(){if(vn===0)if((De&536870912)===0||Pe){var n=ua;ua<<=1,(ua&3932160)===0&&(ua=262144),vn=n}else vn=536870912;return n=mn.current,n!==null&&(n.flags|=32),vn}function sn(n,s,i){(n===Ye&&(He===2||He===9)||n.cancelPendingCommit!==null)&&(qa(n,0),ts(n,De,vn,!1)),nt(n,i),((Ie&2)===0||n!==Ye)&&(n===Ye&&((Ie&2)===0&&(Fs|=i),at===4&&ts(n,De,vn,!1)),er(n))}function fg(n,s,i){if((Ie&6)!==0)throw Error(a(327));var l=!i&&(s&127)===0&&(s&n.expiredLanes)===0||We(n,s),d=l?Y_(n,s):Pd(n,s,!0),h=l;do{if(d===0){Ia&&!l&&ts(n,s,0,!1);break}else{if(i=n.current.alternate,h&&!F_(i)){d=Pd(n,s,!1),h=!1;continue}if(d===2){if(h=s,n.errorRecoveryDisabledLanes&h)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var S=n;d=Ki;var C=S.current.memoizedState.isDehydrated;if(C&&(qa(S,v).flags|=256),v=Pd(S,v,!1),v!==2){if(Od&&!C){S.errorRecoveryDisabledLanes|=h,Fs|=h,d=4;break e}h=rn,rn=d,h!==null&&(rn===null?rn=h:rn.push.apply(rn,h))}d=v}if(h=!1,d!==2)continue}}if(d===1){qa(n,0),ts(n,s,0,!0);break}e:{switch(l=n,h=d,h){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:ts(l,s,vn,!Xr);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(d=Cl+300-xt(),10<d)){if(ts(l,s,vn,!Xr),Ee(l,0,!0)!==0)break e;
vendor: 19,723 bytes, line 9
9Tr=s,l.timeoutHandle=qg(hg.bind(null,l,i,rn,kl,jd,s,vn,Fs,$a,Xr,h,"Throttled",-0,0),d);break e}hg(l,i,rn,kl,jd,s,vn,Fs,$a,Xr,h,null,-0,0)}}break}while(!0);er(n)}function hg(n,s,i,l,d,h,v,S,C,B,V,Y,I,$){if(n.timeoutHandle=-1,Y=s.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dr},ag(s,h,Y);var le=(h&62914560)===h?Cl-xt():(h&4194048)===h?cg-xt():0;if(le=kS(Y,le),le!==null){Tr=h,n.cancelPendingCommit=le(_g.bind(null,n,s,h,i,l,d,v,S,C,V,Y,null,I,$)),ts(n,h,v,!B);return}}_g(n,s,h,i,l,d,v,S,C)}function F_(n){for(var s=n;;){var i=s.tag;if((i===0||i===11||i===15)&&s.flags&16384&&(i=s.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],h=d.getSnapshot;d=d.value;try{if(!hn(h(),d))return!1}catch{return!1}}if(i=s.child,s.subtreeFlags&16384&&i!==null)i.return=s,s=i;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ts(n,s,i,l){s&=~kd,s&=~Fs,n.suspendedLanes|=s,n.pingedLanes&=~s,l&&(n.warmLanes|=s),l=n.expirationTimes;for(var d=s;0<d;){var h=31-It(d),v=1<<h;l[h]=-1,d&=~v}i!==0&&Os(n,i,s)}function jl(){return(Ie&6)===0?(Qi(0),!1):!0}function Md(){if(Le!==null){if(He===0)var n=Le.return;else n=Le,mr=Us=null,Xu(n),Na=null,ji=0,n=Le;for(;n!==null;)Vm(n.alternate,n),n=n.return;Le=null}}function qa(n,s){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,fS(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Tr=0,Md(),Ye=n,Le=i=hr(n.current,null),De=s,He=0,yn=null,Xr=!1,Ia=We(n,s),Od=!1,$a=vn=kd=Fs=Zr=at=0,rn=Ki=null,jd=!1,(s&8)!==0&&(s|=s&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=s;0<l;){var d=31-It(l),h=1<<d;s|=n[d],l&=~h}return Rr=s,Zo(),i}function pg(n,s){Ce=null,M.H=Bi,s===La||s===il?(s=kp(),He=3):s===Bu?(s=kp(),He=4):He=s===hd?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,yn=s,Le===null&&(at=1,wl(n,Tn(s,n.current)))}function mg(){var n=mn.current;return n===null?!0:(De&4194048)===De?kn===null:(De&62914560)===De||(De&536870912)!==0?n===kn:!1}function gg(){var n=M.H;return M.H=Bi,n===null?Bi:n}function yg(){var n=M.A;return M.A=V_,n}function Ll(){at=4,Xr||(De&4194048)!==De&&mn.current!==null||(Ia=!0),(Zr&134217727)===0&&(Fs&134217727)===0||Ye===null||ts(Ye,De,vn,!1)}function Pd(n,s,i){var l=Ie;Ie|=2;var d=gg(),h=yg();(Ye!==n||De!==s)&&(kl=null,qa(n,s)),s=!1;var v=at;e:do try{if(He!==0&&Le!==null){var S=Le,C=yn;switch(He){case 8:Md(),v=6;break e;case 3:case 2:case 9:case 6:mn.current===null&&(s=!0);var B=He;if(He=0,yn=null,Va(n,S,C,B),i&&Ia){v=0;break e}break;default:B=He,He=0,yn=null,Va(n,S,C,B)}}K_(),v=at;break}catch(V){pg(n,V)}while(!0);return s&&n.shellSuspendCounter++,mr=Us=null,Ie=l,M.H=d,M.A=h,Le===null&&(Ye=null,De=0,Zo()),v}function K_(){for(;Le!==null;)vg(Le)}function Y_(n,s){var i=Ie;Ie|=2;var l=gg(),d=yg();Ye!==n||De!==s?(kl=null,Ol=xt()+500,qa(n,s)):Ia=We(n,s);e:do try{if(He!==0&&Le!==null){s=Le;var h=yn;t:switch(He){case 1:He=0,yn=null,Va(n,s,h,1);break;case 2:case 9:if(Cp(h)){He=0,yn=null,bg(s);break}s=function(){He!==2&&He!==9||Ye!==n||(He=7),er(n)},h.then(s,s);break e;case 3:He=7;break e;case 4:He=5;break e;case 7:Cp(h)?(He=0,yn=null,bg(s)):(He=0,yn=null,Va(n,s,h,7));break;case 5:var v=null;switch(Le.tag){case 26:v=Le.memoizedState;case 5:case 27:var S=Le;if(v?sy(v):S.stateNode.complete){He=0,yn=null;var C=S.sibling;if(C!==null)Le=C;else{var B=S.return;B!==null?(Le=B,Nl(B)):Le=null}break t}}He=0,yn=null,Va(n,s,h,5);break;case 6:He=0,yn=null,Va(n,s,h,6);break;case 8:Md(),at=6;break e;default:throw Error(a(462))}}Q_();break}catch(V){pg(n,V)}while(!0);return mr=Us=null,M.H=l,M.A=d,Ie=i,Le!==null?0:(Ye=null,De=0,Zo(),at)}function Q_(){for(;Le!==null&&!Et();)vg(Le)}function vg(n){var s=Hm(n.alternate,n,Rr);n.memoizedProps=n.pendingProps,s===null?Nl(n):Le=s}function bg(n){var s=n,i=s.alternate;switch(s.tag){case 15:case 0:s=Pm(i,s,s.pendingProps,s.type,void 0,De);break;case 11:s=Pm(i,s,s.pendingProps,s.type.render,s.ref,De);break;case 5:Xu(s);default:Vm(i,s),s=Le=yp(s,Rr),s=Hm(i,s,Rr)}n.memoizedProps=n.pendingProps,s===null?Nl(n):Le=s}function Va(n,s,i,l){mr=Us=null,Xu(s),Na=null,ji=0;var d=s.return;try{if(U_(n,d,s,i,De)){at=1,wl(n,Tn(i,n.current)),Le=null;return}}catch(h){if(d!==null)throw Le=d,h;at=1,wl(n,Tn(i,n.current)),Le=null;return}s.flags&32768?(Pe||l===1?n=!0:Ia||(De&536870912)!==0?n=!1:(Xr=n=!0,(l===2||l===9||l===3||l===6)&&(l=mn.current,l!==null&&l.tag===13&&(l.flags|=16384))),wg(s,n)):Nl(s)}function Nl(n){var s=n;do{if((s.flags&32768)!==0){wg(s,Xr);return}n=s.return;var i=I_(s.alternate,s,Rr);if(i!==null){Le=i;return}if(s=s.sibling,s!==null){Le=s;return}Le=s=n}while(s!==null);at===0&&(at=5)}function wg(n,s){do{var i=$_(n.alternate,n);if(i!==null){i.flags&=32767,Le=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!s&&(n=n.sibling,n!==null)){Le=n;return}Le=n=i}while(n!==null);at=6,Le=null}function _g(n,s,i,l,d,h,v,S,C){n.cancelPendingCommit=null;do Dl();while(bt!==0);if((Ie&6)!==0)throw Error(a(327));if(s!==null){if(s===n.current)throw Error(a(177));if(h=s.lanes|s.childLanes,h|=xu,Qt(n,i,h,v,S,C),n===Ye&&(Le=Ye=null,De=0),Ha=s,es=n,Tr=i,Ld=h,Nd=d,ug=l,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,W_(lr,function(){return Tg(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,d=Q.p,Q.p=2,v=Ie,Ie|=4;try{H_(n,s,i)}finally{Ie=v,Q.p=d,M.T=l}}bt=1,Sg(),Eg(),xg()}}function Sg(){if(bt===1){bt=0;var n=es,s=Ha,i=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||i){i=M.T,M.T=null;var l=Q.p;Q.p=2;var d=Ie;Ie|=4;try{ng(s,n);var h=Yd,v=lp(n.containerInfo),S=h.focusedElem,C=h.selectionRange;if(v!==S&&S&&S.ownerDocument&&op(S.ownerDocument.documentElement,S)){if(C!==null&&bu(S)){var B=C.start,V=C.end;if(V===void 0&&(V=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(V,S.value.length);else{var Y=S.ownerDocument||document,I=Y&&Y.defaultView||window;if(I.getSelection){var $=I.getSelection(),le=S.textContent.length,be=Math.min(C.start,le),Ke=C.end===void 0?be:Math.min(C.end,le);!$.extend&&be>Ke&&(v=Ke,Ke=be,be=v);var D=ip(S,be),L=ip(S,Ke);if(D&&L&&($.rangeCount!==1||$.anchorNode!==D.node||$.anchorOffset!==D.offset||$.focusNode!==L.node||$.focusOffset!==L.offset)){var z=Y.createRange();z.setStart(D.node,D.offset),$.removeAllRanges(),be>Ke?($.addRange(z),$.extend(L.node,L.offset)):(z.setEnd(L.node,L.offset),$.addRange(z))}}}}for(Y=[],$=S;$=$.parentNode;)$.nodeType===1&&Y.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Y.length;S++){var F=Y[S];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}Fl=!!Kd,Yd=Kd=null}finally{Ie=d,Q.p=l,M.T=i}}n.current=s,bt=2}}function Eg(){if(bt===2){bt=0;var n=es,s=Ha,i=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||i){i=M.T,M.T=null;var l=Q.p;Q.p=2;var d=Ie;Ie|=4;try{Xm(n,s.alternate,s)}finally{Ie=d,Q.p=l,M.T=i}}bt=3}}function xg(){if(bt===4||bt===3){bt=0,Yn();var n=es,s=Ha,i=Tr,l=ug;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?bt=5:(bt=0,Ha=es=null,Rg(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(Wr=null),Un(i),s=s.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(As,s,void 0,(s.current.flags&128)===128)}catch{}if(l!==null){s=M.T,d=Q.p,Q.p=2,M.T=null;try{for(var h=n.onRecoverableError,v=0;v<l.length;v++){var S=l[v];h(S.value,{componentStack:S.stack})}}finally{M.T=s,Q.p=d}}(Tr&3)!==0&&Dl(),er(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===Dd?Yi++:(Yi=0,Dd=n):Yi=0,Qi(0)}}function Rg(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,Oi(s)))}function Dl(){return Sg(),Eg(),xg(),Tg()}function Tg(){if(bt!==5)return!1;var n=es,s=Ld;Ld=0;var i=Un(Tr),l=M.T,d=Q.p;try{Q.p=32>i?32:i,M.T=null,i=Nd,Nd=null;var h=es,v=Tr;if(bt=0,Ha=es=null,Tr=0,(Ie&6)!==0)throw Error(a(331));var S=Ie;if(Ie|=4,og(h.current),sg(h,h.current,v,i),Ie=S,Qi(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(As,h)}catch{}return!0}finally{Q.p=d,M.T=l,Rg(n,s)}}function Ag(n,s,i){s=Tn(i,s),s=fd(n.stateNode,s,2),n=Kr(n,s,2),n!==null&&(nt(n,2),er(n))}function qe(n,s,i){if(n.tag===3)Ag(n,n,i);else for(;s!==null;){if(s.tag===3){Ag(s,n,i);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Wr===null||!Wr.has(l))){n=Tn(i,n),i=Cm(2),l=Kr(s,i,2),l!==null&&(Om(i,l,s,n),nt(l,2),er(l));break}}s=s.return}}function Ud(n,s,i){var l=n.pingCache;if(l===null){l=n.pingCache=new G_;var d=new Set;l.set(s,d)}else d=l.get(s),d===void 0&&(d=new Set,l.set(s,d));d.has(i)||(Od=!0,d.add(i),n=J_.bind(null,n,s,i),s.then(n,n))}function J_(n,s,i){var l=n.pingCache;l!==null&&l.delete(s),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,Ye===n&&(De&i)===i&&(at===4||at===3&&(De&62914560)===De&&300>xt()-Cl?(Ie&2)===0&&qa(n,0):kd|=i,$a===De&&($a=0)),er(n)}function Cg(n,s){s===0&&(s=$t()),n=Ds(n,s),n!==null&&(nt(n,s),er(n))}function X_(n){var s=n.memoizedState,i=0;s!==null&&(i=s.retryLane),Cg(n,i)}function Z_(n,s){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(s),Cg(n,i)}function W_(n,s){return fn(n,s)}var Ml=null,Ga=null,zd=!1,Pl=!1,Bd=!1,ns=0;function er(n){n!==Ga&&n.next===null&&(Ga===null?Ml=Ga=n:Ga=Ga.next=n),Pl=!0,zd||(zd=!0,tS())}function Qi(n,s){if(!Bd&&Pl){Bd=!0;do for(var i=!1,l=Ml;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var h=0;else{var v=l.suspendedLanes,S=l.pingedLanes;h=(1<<31-It(42|n)+1)-1,h&=d&~(v&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Lg(l,h))}else h=De,h=Ee(l,l===Ye?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||We(l,h)||(i=!0,Lg(l,h));l=l.next}while(i);Bd=!1}}function eS(){Og()}function Og(){Pl=zd=!1;var n=0;ns!==0&&dS()&&(n=ns);for(var s=xt(),i=null,l=Ml;l!==null;){var d=l.next,h=kg(l,s);h===0?(l.next=null,i===null?Ml=d:i.next=d,d===null&&(Ga=i)):(i=l,(n!==0||(h&3)!==0)&&(Pl=!0)),l=d}bt!==0&&bt!==5||Qi(n),ns!==0&&(ns=0)}function kg(n,s){for(var i=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var v=31-It(h),S=1<<v,C=d[v];C===-1?((S&i)===0||(S&l)!==0)&&(d[v]=Rt(S,s)):C<=s&&(n.expiredLanes|=S),h&=~S}if(s=Ye,i=De,i=Ee(n,n===s?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,i===0||n===s&&(He===2||He===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Ts(l),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||We(n,i)){if(s=i&-i,s===n.callbackPriority)return s;switch(l!==null&&Ts(l),Un(i)){case 2:case 8:i=Sn;break;case 32:i=lr;break;case 268435456:i=cr;break;default:i=lr}return l=jg.bind(null,n),i=fn(i,l),n.callbackPriority=s,n.callbackNode=i,s}return l!==null&&l!==null&&Ts(l),n.callbackPriority=2,n.callbackNode=null,2}function jg(n,s){if(bt!==0&&bt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(Dl()&&n.callbackNode!==i)return null;var l=De;return l=Ee(n,n===Ye?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(fg(n,l,s),kg(n,xt()),n.callbackNode!=null&&n.callbackNode===i?jg.bind(null,n):null)}function Lg(n,s){if(Dl())return null;fg(n,s,!0)}function tS(){hS(function(){(Ie&6)!==0?fn(rt,eS):Og()})}function Id(){if(ns===0){var n=ka;n===0&&(n=ca,ca<<=1,(ca&261888)===0&&(ca=256)),ns=n}return ns}function Ng(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Vo(""+n)}function Dg(n,s){var i=s.ownerDocument.createElement("input");return i.name=s.name,i.value=s.value,n.id&&i.setAttribute("form",n.id),s.parentNode.insertBefore(i,s),n=new FormData(n),i.parentNode.removeChild(i),n}function nS(n,s,i,l,d){if(s==="submit"&&i&&i.stateNode===d){var h=Ng((d[Zt]||null).action),v=l.submitter;v&&(s=(s=v[Zt]||null)?Ng(s.formAction):v.getAttribute("formAction"),s!==null&&(h=s,v=null));var S=new Yo("action","action",null,l,d);n.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ns!==0){var C=v?Dg(d,v):new FormData(d);id(i,{pending:!0,data:C,method:d.method,action:h},null,C)}}else typeof h=="function"&&(S.preventDefault(),C=v?Dg(d,v):new FormData(d),id(i,{pending:!0,data:C,method:d.method,action:h},h,C))},currentTarget:d}]})}}for(var $d=0;$d<Eu.length;$d++){var Hd=Eu[$d],rS=Hd.toLowerCase(),sS=Hd[0].toUpperCase()+Hd.slice(1);zn(rS,"on"+sS)}zn(dp,"onAnimationEnd"),zn(fp,"onAnimationIteration"),zn(hp,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(w_,"onTransitionRun"),zn(__,"onTransitionStart"),zn(S_,"onTransitionCancel"),zn(pp,"onTransitionEnd"),ga("onMouseEnter",["mouseout","mouseover"]),ga("onMouseLeave",["mouseout","mouseover"]),ga("onPointerEnter",["pointerout","pointerover"]),ga("onPointerLeave",["pointerout","pointerover"]),ks("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ks("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ks("onBeforeInput",["compositionend","keypress","textInput","paste"]),ks("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ks("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ks("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ji="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(" "),aS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ji));function Mg(n,s){s=(s&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],d=l.event;l=l.listeners;e:{var h=void 0;if(s)for(var v=l.length-1;0<=v;v--){var S=l[v],C=S.instance,B=S.currentTarget;if(S=S.listener,C!==h&&d.isPropagationStopped())break e;h=S,d.currentTarget=B;try{h(d)}catch(V){Xo(V)}d.currentTarget=null,h=C}else for(v=0;v<l.length;v++){if(S=l[v],C=S.instance,B=S.currentTarget,S=S.listener,C!==h&&d.isPropagationStopped())break e;h=S,d.currentTarget=B;try{h(d)}catch(V){Xo(V)}d.currentTarget=null,h=C}}}}function Ne(n,s){var i=s[tu];i===void 0&&(i=s[tu]=new Set);var l=n+"__bubble";i.has(l)||(Pg(s,n,2,!1),i.add(l))}function qd(n,s,i){var l=0;s&&(l|=4),Pg(i,n,l,s)}var Ul="_reactListening"+Math.random().toString(36).slice(2);function Vd(n){if(!n[Ul]){n[Ul]=!0,Oh.forEach(function(i){i!=="selectionchange"&&(aS.has(i)||qd(i,!1,n),qd(i,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Ul]||(s[Ul]=!0,qd("selectionchange",!1,s))}}function Pg(n,s,i,l){switch(dy(s)){case 2:var d=NS;break;case 8:d=DS;break;default:d=af}i=d.bind(null,s,i,n),d=void 0,!uu||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(s,i,{capture:!0,passive:d}):n.addEventListener(s,i,!0):d!==void 0?n.addEventListener(s,i,{passive:d}):n.addEventListener(s,i,!1)}function Gd(n,s,i,l,d){var h=l;if((s&1)===0&&(s&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 C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;S!==null;){if(v=ha(S),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){l=h=v;continue e}S=S.parentNode}}l=l.return}$h(function(){var B=h,V=lu(i),Y=[];e:{var I=mp.get(n);if(I!==void 0){var $=Yo,le=n;switch(n){case"keypress":if(Fo(i)===0)break e;case"keydown":case"keyup":$=Zw;break;case"focusin":le="focus",$=pu;break;case"focusout":le="blur",$=pu;break;case"beforeblur":case"afterblur":$=pu;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":$=Vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=Iw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=t_;break;case dp:case fp:case hp:$=qw;break;case pp:$=r_;break;case"scroll":case"scrollend":$=zw;break;case"wheel":$=a_;break;case"copy":case"cut":case"paste":$=Gw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Fh;break;case"toggle":case"beforetoggle":$=o_}var be=(s&4)!==0,Ke=!be&&(n==="scroll"||n==="scrollend"),D=be?I!==null?I+"Capture":null:I;be=[];for(var L=B,z;L!==null;){var F=L;if(z=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||z===null||D===null||(F=vi(L,D),F!=null&&be.push(Xi(L,F,z))),Ke)break;L=L.return}0<be.length&&(I=new $(I,le,null,i,V),Y.push({event:I,listeners:be}))}}if((s&7)===0){e:{if(I=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",I&&i!==ou&&(le=i.relatedTarget||i.fromElement)&&(ha(le)||le[fa]))break e;if(($||I)&&(I=V.window===V?V:(I=V.ownerDocument)?I.defaultView||I.parentWindow:window,$?(le=i.relatedTarget||i.toElement,$=B,le=le?ha(le):null,le!==null&&(Ke=c(le),be=le.tag,le!==Ke||be!==5&&be!==27&&be!==6)&&(le=null)):($=null,le=B),$!==le)){if(be=Vh,F="onMouseLeave",D="onMouseEnter",L="mouse",(n==="pointerout"||n==="pointerover")&&(be=Fh,F="onPointerLeave",D="onPointerEnter",L="pointer"),Ke=$==null?I:yi($),z=le==null?I:yi(le),I=new be(F,L+"leave",$,i,V),I.target=Ke,I.relatedTarget=z,F=null,ha(V)===B&&(be=new be(D,L+"enter",le,i,V),be.target=z,be.relatedTarget=Ke,F=be),Ke=F,$&&le)t:{for(be=iS,D=$,L=le,z=0,F=D;F;F=be(F))z++;F=0;for(var me=L;me;me=be(me))F++;for(;0<z-F;)D=be(D),z--;for(;0<F-z;)L=be(L),F--;for(;z--;){if(D===L||L!==null&&D===L.alternate){be=D;break t}D=be(D),L=be(L)}be=null}else be=null;$!==null&&Ug(Y,I,$,be,!1),le!==null&&Ke!==null&&Ug(Y,Ke,le,be,!0)}}e:{if(I=B?yi(B):window,$=I.nodeName&&I.nodeName.toLowerCase(),$==="select"||$==="input"&&I.type==="file")var Ue=ep;else if(Zh(I))if(tp)Ue=y_;else{Ue=m_;var pe=p_}else $=I.nodeName,!$||$.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?B&&iu(B.elementType)&&(Ue=ep):Ue=g_;if(Ue&&(Ue=Ue(n,B))){Wh(Y,Ue,i,V);break e}pe&&pe(n,I,B),n==="focusout"&&B&&I.type==="number"&&B.memoizedProps.value!=null&&au(I,"number",I.value)}switch(pe=B?yi(B):window,n){case"focusin":(Zh(pe)||pe.contentEditable==="true")&&(Sa=pe,wu=B,Ti=null);break;case"focusout":Ti=wu=Sa=null;break;case"mousedown":_u=!0;break;case"contextmenu":case"mouseup":case"dragend":_u=!1,cp(Y,i,V);break;case"selectionchange":if(b_)break;case"keydown":case"keyup":cp(Y,i,V)}var Oe;if(gu)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else _a?Jh(n,i)&&(Me="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Me="onCompositionStart");Me&&(Kh&&i.locale!=="ko"&&(_a||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&_a&&(Oe=Hh()):(Ir=V,du="value"in Ir?Ir.value:Ir.textContent,_a=!0)),pe=zl(B,Me),0<pe.length&&(Me=new Gh(Me,n,null,i,V),Y.push({event:Me,listeners:pe}),Oe?Me.data=Oe:(Oe=Xh(i),Oe!==null&&(Me.data=Oe)))),(Oe=c_?u_(n,i):d_(n,i))&&(Me=zl(B,"onBeforeInput"),0<Me.length&&(pe=new Gh("onBeforeInput","beforeinput",null,i,V),Y.push({event:pe,listeners:Me}),pe.data=Oe)),nS(Y,n,B,i,V)}Mg(Y,s)})}function Xi(n,s,i){return{instance:n,listener:s,currentTarget:i}}function zl(n,s){for(var i=s+"Capture",l=[];n!==null;){var d=n,h=d.stateNode;
vendor: 12,004 bytes, lines 9-10
9if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=vi(n,i),d!=null&&l.unshift(Xi(n,d,h)),d=vi(n,s),d!=null&&l.push(Xi(n,d,h))),n.tag===3)return l;n=n.return}return[]}function iS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Ug(n,s,i,l,d){for(var h=s._reactName,v=[];i!==null&&i!==l;){var S=i,C=S.alternate,B=S.stateNode;if(S=S.tag,C!==null&&C===l)break;S!==5&&S!==26&&S!==27||B===null||(C=B,d?(B=vi(i,h),B!=null&&v.unshift(Xi(i,B,C))):d||(B=vi(i,h),B!=null&&v.push(Xi(i,B,C)))),i=i.return}v.length!==0&&n.push({event:s,listeners:v})}var oS=/\r\n?/g,lS=/\u0000|\uFFFD/g;function zg(n){return(typeof n=="string"?n:""+n).replace(oS,` 10`).replace(lS,"")}function Bg(n,s){return s=zg(s),zg(n)===s}function Fe(n,s,i,l,d,h){switch(i){case"children":typeof l=="string"?s==="body"||s==="textarea"&&l===""||va(n,l):(typeof l=="number"||typeof l=="bigint")&&s!=="body"&&va(n,""+l);break;case"className":Ho(n,"class",l);break;case"tabIndex":Ho(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ho(n,i,l);break;case"style":Bh(n,l,h);break;case"data":if(s!=="object"){Ho(n,"data",l);break}case"src":case"href":if(l===""&&(s!=="a"||i!=="href")){n.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Vo(""+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 h=="function"&&(i==="formAction"?(s!=="input"&&Fe(n,s,"name",d.name,d,null),Fe(n,s,"formEncType",d.formEncType,d,null),Fe(n,s,"formMethod",d.formMethod,d,null),Fe(n,s,"formTarget",d.formTarget,d,null)):(Fe(n,s,"encType",d.encType,d,null),Fe(n,s,"method",d.method,d,null),Fe(n,s,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=Vo(""+l),n.setAttribute(i,l);break;case"onClick":l!=null&&(n.onclick=dr);break;case"onScroll":l!=null&&Ne("scroll",n);break;case"onScrollEnd":l!=null&&Ne("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=Vo(""+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"playsInline":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":Ne("beforetoggle",n),Ne("toggle",n),$o(n,"popover",l);break;case"xlinkActuate":ur(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ur(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ur(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ur(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ur(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ur(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ur(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ur(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ur(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":$o(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=Pw.get(i)||i,$o(n,i,l))}}function Fd(n,s,i,l,d,h){switch(i){case"style":Bh(n,l,h);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"?va(n,l):(typeof l=="number"||typeof l=="bigint")&&va(n,""+l);break;case"onScroll":l!=null&&Ne("scroll",n);break;case"onScrollEnd":l!=null&&Ne("scrollend",n);break;case"onClick":l!=null&&(n.onclick=dr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),s=i.slice(2,d?i.length-7:void 0),h=n[Zt]||null,h=h!=null?h[i]:null,typeof h=="function"&&n.removeEventListener(s,h,d),typeof l=="function")){typeof h!="function"&&h!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(s,l,d);break e}i in n?n[i]=l:l===!0?n.setAttribute(i,""):$o(n,i,l)}}}function Ut(n,s,i){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",n),Ne("load",n);var l=!1,d=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Fe(n,s,h,v,i,null)}}d&&Fe(n,s,"srcSet",i.srcSet,i,null),l&&Fe(n,s,"src",i.src,i,null);return;case"input":Ne("invalid",n);var S=h=v=d=null,C=null,B=null;for(l in i)if(i.hasOwnProperty(l)){var V=i[l];if(V!=null)switch(l){case"name":d=V;break;case"type":v=V;break;case"checked":C=V;break;case"defaultChecked":B=V;break;case"value":h=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(a(137,s));break;default:Fe(n,s,l,V,i,null)}}Mh(n,h,S,C,B,v,d,!1);return;case"select":Ne("invalid",n),l=v=h=null;for(d in i)if(i.hasOwnProperty(d)&&(S=i[d],S!=null))switch(d){case"value":h=S;break;case"defaultValue":v=S;break;case"multiple":l=S;default:Fe(n,s,d,S,i,null)}s=h,i=v,n.multiple=!!l,s!=null?ya(n,!!l,s,!1):i!=null&&ya(n,!!l,i,!0);return;case"textarea":Ne("invalid",n),h=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":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Fe(n,s,v,S,i,null)}Uh(n,l,d,h);return;case"option":for(C in i)i.hasOwnProperty(C)&&(l=i[C],l!=null)&&(C==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":Fe(n,s,C,l,i,null));return;case"dialog":Ne("beforetoggle",n),Ne("toggle",n),Ne("cancel",n),Ne("close",n);break;case"iframe":case"object":Ne("load",n);break;case"video":case"audio":for(l=0;l<Ji.length;l++)Ne(Ji[l],n);break;case"image":Ne("error",n),Ne("load",n);break;case"details":Ne("toggle",n);break;case"embed":case"source":case"link":Ne("error",n),Ne("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(B in i)if(i.hasOwnProperty(B)&&(l=i[B],l!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Fe(n,s,B,l,i,null)}return;default:if(iu(s)){for(V in i)i.hasOwnProperty(V)&&(l=i[V],l!==void 0&&Fd(n,s,V,l,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(l=i[S],l!=null&&Fe(n,s,S,l,i,null))}function cS(n,s,i,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,v=null,S=null,C=null,B=null,V=null;for($ in i){var Y=i[$];if(i.hasOwnProperty($)&&Y!=null)switch($){case"checked":break;case"value":break;case"defaultValue":C=Y;default:l.hasOwnProperty($)||Fe(n,s,$,null,l,Y)}}for(var I in l){var $=l[I];if(Y=i[I],l.hasOwnProperty(I)&&($!=null||Y!=null))switch(I){case"type":h=$;break;case"name":d=$;break;case"checked":B=$;break;case"defaultChecked":V=$;break;case"value":v=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,s));break;default:$!==Y&&Fe(n,s,I,$,l,Y)}}su(n,v,S,C,B,V,h,d);return;case"select":$=v=S=I=null;for(h in i)if(C=i[h],i.hasOwnProperty(h)&&C!=null)switch(h){case"value":break;case"multiple":$=C;default:l.hasOwnProperty(h)||Fe(n,s,h,null,l,C)}for(d in l)if(h=l[d],C=i[d],l.hasOwnProperty(d)&&(h!=null||C!=null))switch(d){case"value":I=h;break;case"defaultValue":S=h;break;case"multiple":v=h;default:h!==C&&Fe(n,s,d,h,l,C)}s=S,i=v,l=$,I!=null?ya(n,!!i,I,!1):!!l!=!!i&&(s!=null?ya(n,!!i,s,!0):ya(n,!!i,i?[]:"",!1));return;case"textarea":$=I=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:Fe(n,s,S,null,l,d)}for(v in l)if(d=l[v],h=i[v],l.hasOwnProperty(v)&&(d!=null||h!=null))switch(v){case"value":I=d;break;case"defaultValue":$=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==h&&Fe(n,s,v,d,l,h)}Ph(n,I,$);return;case"option":for(var le in i)I=i[le],i.hasOwnProperty(le)&&I!=null&&!l.hasOwnProperty(le)&&(le==="selected"?n.selected=!1:Fe(n,s,le,null,l,I));for(C in l)I=l[C],$=i[C],l.hasOwnProperty(C)&&I!==$&&(I!=null||$!=null)&&(C==="selected"?n.selected=I&&typeof I!="function"&&typeof I!="symbol":Fe(n,s,C,I,l,$));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 be in i)I=i[be],i.hasOwnProperty(be)&&I!=null&&!l.hasOwnProperty(be)&&Fe(n,s,be,null,l,I);for(B in l)if(I=l[B],$=i[B],l.hasOwnProperty(B)&&I!==$&&(I!=null||$!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(137,s));break;default:Fe(n,s,B,I,l,$)}return;default:if(iu(s)){for(var Ke in i)I=i[Ke],i.hasOwnProperty(Ke)&&I!==void 0&&!l.hasOwnProperty(Ke)&&Fd(n,s,Ke,void 0,l,I);for(V in l)I=l[V],$=i[V],!l.hasOwnProperty(V)||I===$||I===void 0&&$===void 0||Fd(n,s,V,I,l,$);return}}for(var D in i)I=i[D],i.hasOwnProperty(D)&&I!=null&&!l.hasOwnProperty(D)&&Fe(n,s,D,null,l,I);for(Y in l)I=l[Y],$=i[Y],!l.hasOwnProperty(Y)||I===$||I==null&&$==null||Fe(n,s,Y,I,l,$)}function Ig(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],h=d.transferSize,v=d.initiatorType,S=d.duration;if(h&&S&&Ig(v)){for(v=0,S=d.responseEnd,l+=1;l<i.length;l++){var C=i[l],B=C.startTime;if(B>S)break;var V=C.transferSize,Y=C.initiatorType;V&&Ig(Y)&&(C=C.responseEnd,v+=V*(C<S?1:(S-B)/(C-B)))}if(--l,s+=8*(h+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 9,435 bytes, line 10
10n:5}var Kd=null,Yd=null;function Bl(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,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Qd(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Jd=null;function dS(){var n=window.event;return n&&n.type==="popstate"?n===Jd?!1:(Jd=n,!0):(Jd=null,!1)}var qg=typeof setTimeout=="function"?setTimeout:void 0,fS=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,hS=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(n){return Vg.resolve(null).then(n).catch(pS)}:qg;function pS(n){setTimeout(function(){throw n})}function rs(n){return n==="head"}function Gg(n,s){var i=s,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),Qa(s);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Zi(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Zi(i);for(var h=i.firstChild;h;){var v=h.nextSibling,S=h.nodeName;h[gi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&Zi(n.ownerDocument.body);i=d}while(i);Qa(s)}function Fg(n,s){var i=n;n=0;do{var l=i.nextSibling;if(i.nodeType===1?s?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(s?(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 Xd(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var i=s;switch(s=s.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Xd(i),nu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function mS(n,s,i,l){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[gi])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==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(h=n.getAttribute("src"),(h!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=jn(n.nextSibling),n===null)break}return null}function gS(n,s,i){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=jn(n.nextSibling),n===null))return null;return n}function Kg(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=jn(n.nextSibling),n===null))return null;return n}function Zd(n){return n.data==="$?"||n.data==="$~"}function Wd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function yS(n,s){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||i.readyState!=="loading")s();else{var l=function(){s(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function jn(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var ef=null;function Yg(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(s===0)return jn(n.nextSibling);s--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||s++}n=n.nextSibling}return null}function Qg(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(s===0)return n;s--}else i!=="/$"&&i!=="/&"||s++}n=n.previousSibling}return null}function Jg(n,s,i){switch(s=Bl(i),n){case"html":if(n=s.documentElement,!n)throw Error(a(452));return n;case"head":if(n=s.head,!n)throw Error(a(453));return n;case"body":if(n=s.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Zi(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);nu(n)}var Ln=new Map,Xg=new Set;function Il(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ar=Q.d;Q.d={f:vS,r:bS,D:wS,C:_S,L:SS,m:ES,X:RS,S:xS,M:TS};function vS(){var n=Ar.f(),s=jl();return n||s}function bS(n){var s=pa(n);s!==null&&s.tag===5&&s.type==="form"?pm(s):Ar.r(n)}var Fa=typeof document>"u"?null:document;function Zg(n,s,i){var l=Fa;if(l&&typeof s=="string"&&s){var d=xn(s);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Xg.has(d)||(Xg.add(d),n={rel:n,crossOrigin:i,href:s},l.querySelector(d)===null&&(s=l.createElement("link"),Ut(s,"link",n),Tt(s),l.head.appendChild(s)))}}function wS(n){Ar.D(n),Zg("dns-prefetch",n,null)}function _S(n,s){Ar.C(n,s),Zg("preconnect",n,s)}function SS(n,s,i){Ar.L(n,s,i);var l=Fa;if(l&&n&&s){var d='link[rel="preload"][as="'+xn(s)+'"]';s==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+xn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+xn(i.imageSizes)+'"]')):d+='[href="'+xn(n)+'"]';var h=d;switch(s){case"style":h=Ka(n);break;case"script":h=Ya(n)}Ln.has(h)||(n=g({rel:"preload",href:s==="image"&&i&&i.imageSrcSet?void 0:n,as:s},i),Ln.set(h,n),l.querySelector(d)!==null||s==="style"&&l.querySelector(Wi(h))||s==="script"&&l.querySelector(eo(h))||(s=l.createElement("link"),Ut(s,"link",n),Tt(s),l.head.appendChild(s)))}}function ES(n,s){Ar.m(n,s);var i=Fa;if(i&&n){var l=s&&typeof s.as=="string"?s.as:"script",d='link[rel="modulepreload"][as="'+xn(l)+'"][href="'+xn(n)+'"]',h=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ya(n)}if(!Ln.has(h)&&(n=g({rel:"modulepreload",href:n},s),Ln.set(h,n),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(eo(h)))return}l=i.createElement("link"),Ut(l,"link",n),Tt(l),i.head.appendChild(l)}}}function xS(n,s,i){Ar.S(n,s,i);var l=Fa;if(l&&n){var d=ma(l).hoistableStyles,h=Ka(n);s=s||"default";var v=d.get(h);if(!v){var S={loading:0,preload:null};if(v=l.querySelector(Wi(h)))S.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":s},i),(i=Ln.get(h))&&tf(n,i);var C=v=l.createElement("link");Tt(C),Ut(C,"link",n),C._p=new Promise(function(B,V){C.onload=B,C.onerror=V}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,$l(v,s,l)}v={type:"stylesheet",instance:v,count:1,state:S},d.set(h,v)}}}function RS(n,s){Ar.X(n,s);var i=Fa;if(i&&n){var l=ma(i).hoistableScripts,d=Ya(n),h=l.get(d);h||(h=i.querySelector(eo(d)),h||(n=g({src:n,async:!0},s),(s=Ln.get(d))&&nf(n,s),h=i.createElement("script"),Tt(h),Ut(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function TS(n,s){Ar.M(n,s);var i=Fa;if(i&&n){var l=ma(i).hoistableScripts,d=Ya(n),h=l.get(d);h||(h=i.querySelector(eo(d)),h||(n=g({src:n,async:!0,type:"module"},s),(s=Ln.get(d))&&nf(n,s),h=i.createElement("script"),Tt(h),Ut(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function Wg(n,s,i,l){var d=(d=ae.current)?Il(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"?(s=Ka(i.href),i=ma(d).hoistableStyles,l=i.get(s),l||(l={type:"style",instance:null,count:0,state:null},i.set(s,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=Ka(i.href);var h=ma(d).hoistableStyles,v=h.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,v),(h=d.querySelector(Wi(n)))&&!h._p&&(v.instance=h,v.state.loading=5),Ln.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},Ln.set(n,i),h||AS(d,n,i,v.state))),s&&l===null)throw Error(a(528,""));return v}if(s&&l!==null)throw Error(a(529,""));return null;case"script":return s=i.async,i=i.src,typeof i=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?
vendor: 5,251 bytes, line 10
10(s=Ya(i),i=ma(d).hoistableScripts,l=i.get(s),l||(l={type:"script",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Ka(n){return'href="'+xn(n)+'"'}function Wi(n){return'link[rel="stylesheet"]['+n+"]"}function ey(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function AS(n,s,i,l){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=n.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),Ut(s,"link",i),Tt(s),n.head.appendChild(s))}function Ya(n){return'[src="'+xn(n)+'"]'}function eo(n){return"script[async]"+n}function ty(n,s,i){if(s.count++,s.instance===null)switch(s.type){case"style":var l=n.querySelector('style[data-href~="'+xn(i.href)+'"]');if(l)return s.instance=l,Tt(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"),Tt(l),Ut(l,"style",d),$l(l,i.precedence,n),s.instance=l;case"stylesheet":d=Ka(i.href);var h=n.querySelector(Wi(d));if(h)return s.state.loading|=4,s.instance=h,Tt(h),h;l=ey(i),(d=Ln.get(d))&&tf(l,d),h=(n.ownerDocument||n).createElement("link"),Tt(h);var v=h;return v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),Ut(h,"link",l),s.state.loading|=4,$l(h,i.precedence,n),s.instance=h;case"script":return h=Ya(i.src),(d=n.querySelector(eo(h)))?(s.instance=d,Tt(d),d):(l=i,(d=Ln.get(h))&&(l=g({},i),nf(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),Tt(d),Ut(d,"link",l),n.head.appendChild(d),s.instance=d);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(l=s.instance,s.state.loading|=4,$l(l,i.precedence,n));return s.instance}function $l(n,s,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,h=d,v=0;v<l.length;v++){var S=l[v];if(S.dataset.precedence===s)h=S;else if(h!==d)break}h?h.parentNode.insertBefore(n,h.nextSibling):(s=i.nodeType===9?i.head:i,s.insertBefore(n,s.firstChild))}function tf(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function nf(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var Hl=null;function ny(n,s,i){if(Hl===null){var l=new Map,d=Hl=new Map;d.set(i,l)}else d=Hl,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 h=i[d];if(!(h[gi]||h[Nt]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(s)||"";v=n+v;var S=l.get(v);S?S.push(h):l.set(v,[h])}}return l}function ry(n,s,i){n=n.ownerDocument||n,n.head.insertBefore(i,s==="title"?n.querySelector("head > title"):null)}function CS(n,s,i){if(i===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(n=s.disabled,typeof s.precedence=="string"&&n==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function sy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function OS(n,s,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=Ka(l.href),h=s.querySelector(Wi(d));if(h){s=h._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=ql.bind(n),s.then(n,n)),i.state.loading|=4,i.instance=h,Tt(h);return}h=s.ownerDocument||s,l=ey(l),(d=Ln.get(d))&&tf(l,d),h=h.createElement("link"),Tt(h);var v=h;v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),Ut(h,"link",l),i.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,s),(s=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=ql.bind(n),s.addEventListener("load",i),s.addEventListener("error",i))}}var rf=0;function kS(n,s){return n.stylesheets&&n.count===0&&Gl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var l=setTimeout(function(){if(n.stylesheets&&Gl(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+s);0<n.imgBytes&&rf===0&&(rf=62500*uS());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Gl(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>rf?50:800)+s);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function ql(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Vl=null;function Gl(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Vl=new Map,s.forEac
vendor: 10,988 bytes, line 10
10h(jS,n),Vl=null,ql.call(n))}function jS(n,s){if(!(s.state.loading&4)){var i=Vl.get(n);if(i)var l=i.get(null);else{i=new Map,Vl.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var v=d[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}d=s.instance,v=d.getAttribute("data-precedence"),h=i.get(v)||l,h===l&&i.set(null,d),i.set(v,d),this.count++,l=ql.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),h?h.parentNode.insertBefore(d,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),s.state.loading|=4}}var to={$$typeof:N,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function LS(n,s,i,l,d,h,v,S,C){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zr(0),this.hiddenUpdates=zr(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function ay(n,s,i,l,d,h,v,S,C,B,V,Y){return n=new LS(n,s,i,v,C,B,V,Y,S),s=1,h===!0&&(s|=24),h=pn(3,null,null,s),n.current=h,h.stateNode=n,s=Pu(),s.refCount++,n.pooledCache=s,s.refCount++,h.memoizedState={element:l,isDehydrated:i,cache:s},Iu(h),n}function iy(n){return n?(n=Ra,n):Ra}function oy(n,s,i,l,d,h){d=iy(d),l.context===null?l.context=d:l.pendingContext=d,l=Fr(s),l.payload={element:i},h=h===void 0?null:h,h!==null&&(l.callback=h),i=Kr(n,l,s),i!==null&&(sn(i,n,s),Ni(i,n,s))}function ly(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<s?i:s}}function sf(n,s){ly(n,s),(n=n.alternate)&&ly(n,s)}function cy(n){if(n.tag===13||n.tag===31){var s=Ds(n,67108864);s!==null&&sn(s,n,67108864),sf(n,67108864)}}function uy(n){if(n.tag===13||n.tag===31){var s=bn();s=da(s);var i=Ds(n,s);i!==null&&sn(i,n,s),sf(n,s)}}var Fl=!0;function NS(n,s,i,l){var d=M.T;M.T=null;var h=Q.p;try{Q.p=2,af(n,s,i,l)}finally{Q.p=h,M.T=d}}function DS(n,s,i,l){var d=M.T;M.T=null;var h=Q.p;try{Q.p=8,af(n,s,i,l)}finally{Q.p=h,M.T=d}}function af(n,s,i,l){if(Fl){var d=of(l);if(d===null)Gd(n,s,l,Kl,i),fy(n,l);else if(PS(d,n,s,i,l))l.stopPropagation();else if(fy(n,l),s&4&&-1<MS.indexOf(n)){for(;d!==null;){var h=pa(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=Jn(h.pendingLanes);if(v!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var C=1<<31-It(v);S.entanglements[1]|=C,v&=~C}er(h),(Ie&6)===0&&(Ol=xt()+500,Qi(0))}}break;case 31:case 13:S=Ds(h,2),S!==null&&sn(S,h,2),jl(),sf(h,2)}if(h=of(l),h===null&&Gd(n,s,l,Kl,i),h===d)break;d=h}d!==null&&l.stopPropagation()}else Gd(n,s,l,null,i)}}function of(n){return n=lu(n),lf(n)}var Kl=null;function lf(n){if(Kl=null,n=ha(n),n!==null){var s=c(n);if(s===null)n=null;else{var i=s.tag;if(i===13){if(n=u(s),n!==null)return n;n=null}else if(i===31){if(n=f(s),n!==null)return n;n=null}else if(i===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return Kl=n,null}function dy(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ve()){case rt:return 2;case Sn:return 8;case lr:case pi:return 32;case cr:return 268435456;default:return 32}default:return 32}}var cf=!1,ss=null,as=null,is=null,no=new Map,ro=new Map,os=[],MS="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 fy(n,s){switch(n){case"focusin":case"focusout":ss=null;break;case"dragenter":case"dragleave":as=null;break;case"mouseover":case"mouseout":is=null;break;case"pointerover":case"pointerout":no.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ro.delete(s.pointerId)}}function so(n,s,i,l,d,h){return n===null||n.nativeEvent!==h?(n={blockedOn:s,domEventName:i,eventSystemFlags:l,nativeEvent:h,targetContainers:[d]},s!==null&&(s=pa(s),s!==null&&cy(s)),n):(n.eventSystemFlags|=l,s=n.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),n)}function PS(n,s,i,l,d){switch(s){case"focusin":return ss=so(ss,n,s,i,l,d),!0;case"dragenter":return as=so(as,n,s,i,l,d),!0;case"mouseover":return is=so(is,n,s,i,l,d),!0;case"pointerover":var h=d.pointerId;return no.set(h,so(no.get(h)||null,n,s,i,l,d)),!0;case"gotpointercapture":return h=d.pointerId,ro.set(h,so(ro.get(h)||null,n,s,i,l,d)),!0}return!1}function hy(n){var s=ha(n.target);if(s!==null){var i=c(s);if(i!==null){if(s=i.tag,s===13){if(s=u(i),s!==null){n.blockedOn=s,Ah(n.priority,function(){uy(i)});return}}else if(s===31){if(s=f(i),s!==null){n.blockedOn=s,Ah(n.priority,function(){uy(i)});return}}else if(s===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Yl(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var i=of(n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);ou=l,i.target.dispatchEvent(l),ou=null}else return s=pa(i),s!==null&&cy(s),n.blockedOn=i,!1;s.shift()}return!0}function py(n,s,i){Yl(n)&&i.delete(s)}function US(){cf=!1,ss!==null&&Yl(ss)&&(ss=null),as!==null&&Yl(as)&&(as=null),is!==null&&Yl(is)&&(is=null),no.forEach(py),ro.forEach(py)}function Ql(n,s){n.blockedOn===s&&(n.blockedOn=null,cf||(cf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,US)))}var Jl=null;function my(n){Jl!==n&&(Jl=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Jl===n&&(Jl=null);for(var s=0;s<n.length;s+=3){var i=n[s],l=n[s+1],d=n[s+2];if(typeof l!="function"){if(lf(l||i)===null)continue;break}var h=pa(i);h!==null&&(n.splice(s,3),s-=3,id(h,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function Qa(n){function s(C){return Ql(C,n)}ss!==null&&Ql(ss,n),as!==null&&Ql(as,n),is!==null&&Ql(is,n),no.forEach(s),ro.forEach(s);for(var i=0;i<os.length;i++){var l=os[i];l.blockedOn===n&&(l.blockedOn=null)}for(;0<os.length&&(i=os[0],i.blockedOn===null);)hy(i),i.blockedOn===null&&os.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=d[Zt]||null;if(typeof h=="function")v||my(i);else if(v){var S=null;if(h&&h.hasAttribute("formAction")){if(d=h,v=h[Zt]||null)S=v.formAction;else if(lf(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(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function s(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),d!==null&&(d(),d=null)}}}function uf(n){this._internalRoot=n}Xl.prototype.render=uf.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(a(409));var i=s.current,l=bn();oy(i,l,n,s,null,null)},Xl.prototype.unmount=uf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;oy(n.current,2,null,n,null,null),jl(),s[fa]=null}};function Xl(n){this._internalRoot=n}Xl.prototype.unstable_scheduleHydration=function(n){if(n){var s=eu();n={blockedOn:null,target:n,priority:s};for(var i=0;i<os.length&&s!==0&&s<os[i].priority;i++);os.splice(i,0,n),i===0&&hy(n)}};var yy=t.version;if(yy!=="19.2.5")throw Error(a(527,yy,"19.2.5"));Q.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(s),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var zS={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zl.isDisabled&&Zl.supportsFiber)try{As=Zl.inject(zS),Gt=Zl}catch{}}return io.createRoot=function(n,s){if(!o(n))throw Error(a(299));var i=!1,l="",d=xm,h=Rm,v=Tm;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(h=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=ay(n,1,!1,null,null,i,l,null,d,h,v,gy),n[fa]=s.current,Vd(n),new uf(s)},io.hydrateRoot=function(n,s,i){if(!o(n))throw Error(a(299));var l=!1,d="",h=xm,v=Rm,S=Tm,C=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),s=ay(n,1,!0,s,i??null,l,d,C,h,v,S,gy),s.context=iy(null),i=s.current,l=bn(),l=da(l),d=Fr(l),d.callback=null,Kr(i,d,l),i=l,s.current.lanes=i,nt(s,i),er(s),n[fa]=s.
10current,Vd(n),new Xl(s)},io.version="19.2.5",io}var Ay;function YS(){if(Ay)return hf.exports;Ay=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(),hf.exports=KS(),hf.exports}var QS=YS(),JS="__TSS_CONTEXT",If=Symbol.for("TSS_SERVER_FUNCTION"),UM=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),XS="application/x-tss-framed",Cr={JSON:0,CHUNK:1,END:2,ERROR:3},ZS=/;\s*v=(\d+)/;function WS(e){const t=e.match(ZS);return t?parseInt(t[1],10):void 0}function eE(e){const t=WS(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 E0=()=>window.__TSS_START_OPTIONS__,x0=!1;function So(e){return e[e.length-1]}function tE(e){return typeof e=="function"}function ms(e,t){return tE(e)?e(t):e}var nE=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,rE=()=>Object.create(null),Ks=(e,t)=>Zs(e,t,rE);function Zs(e,t,r=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const o=t,c=jy(e)&&jy(o);if(!c&&!(fi(e)&&fi(o)))return o;const u=c?e:Oy(e);if(!u)return o;const f=c?o:Oy(o);if(!f)return o;const p=u.length,m=f.length,y=c?new Array(m):r();let g=0;for(let b=0;b<m;b++){const w=c?b:f[b],_=e[w],R=o[w];if(_===R){y[w]=_,(c?b<p:nE.call(e,w))&&g++;continue}if(_===null||R===null||typeof _!="object"||typeof R!="object"){y[w]=R;continue}const E=Zs(_,R,r,a+1);y[w]=E,E===_&&g++}return p===m&&g===p?e:y}function Oy(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Cy.call(e,o))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const a=t;for(const o of r){if(!Cy.call(e,o))return!1;a.push(o)}return a}function fi(e){if(!ky(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!ky(r)||!r.hasOwnProperty("isPrototypeOf"))}function ky(e){return Object.prototype.toString.call(e)==="[object Object]"}function jy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ln(e,t,r){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(!ln(e[a],t[a],r))return!1;return!0}if(fi(e)&&fi(t)){const a=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!ln(e[u],t[u],r))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||!ln(e[u],t[u],r)))return!1;return o===c}return!1}function aa(e){let t,r;const a=new Promise((o,c)=>{t=o,r=c});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",r(o)},a}function sE(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 Eo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function aE(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Ly(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return aE(t)}var iE=["http:","https:","mailto:","tel:"];function Sc(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}var oE={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},lE=/[&><\u2028\u2029]/g;function cE(e){return e.replace(lE,t=>oE[t])}function oo(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 r=0,a="",o;for(;(o=t.exec(e))!==null;)a+=Ly(e.slice(r,o.index))+o[0],r=t.lastIndex;a=a+Ly(r?e.slice(r):e);let c=!1;return a.startsWith("//")&&(c=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:c}}function uE(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function dE(e,t){if(e===t)return!0;
10if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function dn(){throw new Error("Invariant failed")}function xo(e){const t=new Map;let r,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,r=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&&r){const p=r;t.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const f=t.get(c);if(f)f.value=u,o(f);else{const p={key:c,value:u,prev:a};a&&(a.next=p),a=p,r||(r=p),t.set(c,p)}},clear(){t.clear(),r=void 0,a=void 0}}}var gs=4,R0=5;function fE(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function dh(e,t,r=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,c=e.substring(t,o);if(!c||!c.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r;if(c==="$"){const f=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=f,r[4]=f,r[5]=f,r}if(c.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=o,r[4]=o,r[5]=o,r;const u=fE(c);if(u){const[f,p]=u,m=c.charCodeAt(f+1);if(m===45){if(f+2<c.length&&c.charCodeAt(f+2)===36){const y=f+3,g=p;if(y<g)return r[0]=3,r[1]=t+f,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=o,r}}else if(m===36){const y=f+1,g=f+2;return g===p?(r[0]=2,r[1]=t+f,r[2]=t+y,r[3]=t+g,r[4]=t+p+1,r[5]=e.length,r):(r[0]=1,r[1]=t+f,r[2]=t+g,r[3]=t+p,r[4]=t+p+1,r[5]=o,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r}function Bc(e,t,r,a,o,c,u){u?.(r);let f=a;{const p=r.fullPath??r.from,m=p.length,y=r.options?.caseSensitive??e,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<m;){const w=dh(p,f,t);let _;const R=f,E=w[5];switch(f=E+1,c++,w[0]){case 0:{const x=p.substring(w[2],w[3]);if(y){const j=o.static?.get(x);if(j)_=j;else{o.static??=new Map;const N=Ws(r.fullPath??r.from);N.parent=o,N.depth=c,_=N,o.static.set(x,N)}}else{const j=x.toLowerCase(),N=o.staticInsensitive?.get(j);if(N)_=N;else{o.staticInsensitive??=new Map;const P=Ws(r.fullPath??r.from);P.parent=o,P.depth=c,_=P,o.staticInsensitive.set(j,P)}}break}case 1:{const x=p.substring(R,w[1]),j=p.substring(w[4],E),N=y&&!!(x||j),P=x?N?x:x.toLowerCase():void 0,J=j?N?j:j.toLowerCase():void 0,q=!g&&o.dynamic?.find(H=>!H.skipOnParamError&&H.caseSensitive===N&&H.prefix===P&&H.suffix===J);if(q)_=q;else{const H=vf(1,r.fullPath??r.from,N,P,J);_=H,H.depth=c,H.parent=o,o.dynamic??=[],o.dynamic.push(H)}break}case 3:{const x=p.substring(R,w[1]),j=p.substring(w[4],E),N=y&&!!(x||j),P=x?N?x:x.toLowerCase():void 0,J=j?N?j:j.toLowerCase():void 0,q=!g&&o.optional?.find(H=>!H.skipOnParamError&&H.caseSensitive===N&&H.prefix===P&&H.suffix===J);if(q)_=q;else{const H=vf(3,r.fullPath??r.from,N,P,J);_=H,H.parent=o,H.depth=c,o.optional??=[],o.optional.push(H)}break}case 2:{const x=p.substring(R,w[1]),j=p.substring(w[4],E),N=y&&!!(x||j),P=x?N?x:x.toLowerCase():void 0,J=j?N?j:j.toLowerCase():void 0,q=vf(2,r.fullPath??r.from,N,P,J);_=q,q.parent=o,q.depth=c,o.wildcard??=[],o.wildcard.push(q)}}o=_}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const w=Ws(r.fullPath??r.from);w.kind=R0,w.parent=o,c++,w.depth=c,o.pathless??=[],o.pathless.push(w),o=w}const b=(r.path||!r.children)&&!r.isRoot;if(b&&p.endsWith("/")){const w=Ws(r.fullPath??r.from);w.kind=gs,w.parent=o,c++,w.depth=c,o.index=w,o=w}o.parse=r.options?.params?.parse??null,o.skipOnParamError=g,o.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=r,o.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Bc(e,t,p,f,o,c,u)}function yf(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 ds(e){if(e.pathless)for(const t of e.pathless)ds(t);
10if(e.static)for(const t of e.static.values())ds(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ds(t);if(e.dynamic?.length){e.dynamic.sort(yf);for(const t of e.dynamic)ds(t)}if(e.optional?.length){e.optional.sort(yf);for(const t of e.optional)ds(t)}if(e.wildcard?.length){e.wildcard.sort(yf);for(const t of e.wildcard)ds(t)}}function Ws(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 vf(e,t,r,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:r,prefix:a,suffix:o}}function hE(e,t){const r=Ws("/"),a=new Uint16Array(6);for(const o of e)Bc(!1,a,o,1,r,0);ds(r),t.masksTree=r,t.flatCache=xo(1e3)}function pE(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const a=fh(e,t.masksTree);return t.flatCache.set(e,a),a}function mE(e,t,r,a,o){e||="/",a||="/";const c=t?`case\0${e}`:e;let u=o.singleCache.get(c);return u||(u=Ws("/"),Bc(t,new Uint16Array(6),{from:e},1,u,0),o.singleCache.set(c,u)),fh(a,u,r)}function gE(e,t,r=!1){const a=r?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";let c;try{c=fh(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=bE(c.route)),t.matchCache.set(a,c),c}function yE(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function vE(e,t=!1,r){const a=Ws(e.fullPath),o=new Uint16Array(6),c={},u={};let f=0;return Bc(t,o,e,1,a,0,p=>{if(r?.(p,f),p.id in c&&dn(),c[p.id]=p,f!==0&&p.path){const m=yE(p.fullPath);(!u[m]||p.fullPath.endsWith("/"))&&(u[m]=p)}f++}),ds(a),{processedTree:{segmentTree:a,singleCache:xo(1e3),matchCache:xo(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function fh(e,t,r=!1){const a=e.split("/"),o=_E(e,a,t,r);if(!o)return null;const[c]=T0(e,a,o);return{route:o.node.route,rawParams:c,parsedParams:o.parsedParams}}function T0(e,t,r){const a=wE(r.node);let o=null;const c=Object.create(null);let u=r.extract?.part??0,f=r.extract?.node??0,p=r.extract?.path??0,m=r.extract?.segment??0;for(;f<a.length;u++,f++,p++,m++){const y=a[f];if(y.kind===gs)break;if(y.kind===R0){m--,u--,p--;continue}const g=t[u],b=p;if(g&&(p+=g.length),y.kind===1){o??=r.node.fullPath.split("/");const w=o[m],_=y.prefix?.length??0;if(w.charCodeAt(_)===123){const R=y.suffix?.length??0,E=w.substring(_+2,w.length-R-1),x=g.substring(_,g.length-R);c[E]=decodeURIComponent(x)}else{const R=w.substring(1);c[R]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<f){u--,p=b-1;continue}o??=r.node.fullPath.split("/");const w=o[m],_=y.prefix?.length??0,R=y.suffix?.length??0,E=w.substring(_+3,w.length-R-1),x=y.suffix||y.prefix?g.substring(_,g.length-R):g;x&&(c[E]=decodeURIComponent(x))}else if(y.kind===2){const w=y,_=e.substring(b+(w.prefix?.length??0),e.length-(w.suffix?.length??0)),R=decodeURIComponent(_);c["*"]=R,c._splat=R;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:f,path:p,segment:m}]}function bE(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function wE(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function _E(e,t,r,a){if(e==="/"&&r.index)return{node:r.index,skipped:0};
10const o=!So(t),c=o&&e!=="/",u=t.length-(o?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;f.length;){const y=f.pop(),{node:g,index:b,skipped:w,depth:_,statics:R,dynamics:E,optionals:x}=y;let{extract:j,rawParams:N,parsedParams:P}=y;if(g.kind===2&&g.route&&!ec(m,y))continue;if(g.skipOnParamError){if(!Ny(e,t,y))continue;N=y.rawParams,j=y.extract,P=y.parsedParams}a&&g.route&&g.kind!==gs&&ec(p,y)&&(p=y);const J=b===u;if(J&&(g.route&&(!c||g.kind===gs||g.kind===2)&&ec(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const q=J?void 0:t[b];let H;if(J&&g.index){const U={node:g.index,index:b,skipped:w,depth:_+1,statics:R,dynamics:E,optionals:x,extract:j,rawParams:N,parsedParams:P};let X=!0;if(g.index.skipOnParamError&&(Ny(e,t,U)||(X=!1)),X){if(!E&&!x&&!w&&SE(R,u))return U;ec(m,U)&&(m=U)}}if(g.wildcard)for(let U=g.wildcard.length-1;U>=0;U--){const X=g.wildcard[U],{prefix:oe,suffix:se}=X;if(!(oe&&(J||!(X.caseSensitive?q:H??=q.toLowerCase()).startsWith(oe)))){if(se){if(J)continue;const Se=t.slice(b).join("/").slice(-se.length);if((X.caseSensitive?Se:Se.toLowerCase())!==se)continue}f.push({node:X,index:u,skipped:w,depth:_+1,statics:R,dynamics:E,optionals:x,extract:j,rawParams:N,parsedParams:P})}}if(g.optional){const U=w|1<<_,X=_+1;for(let oe=g.optional.length-1;oe>=0;oe--){const se=g.optional[oe];f.push({node:se,index:b,skipped:U,depth:X,statics:R,dynamics:E,optionals:x,extract:j,rawParams:N,parsedParams:P})}if(!J)for(let oe=g.optional.length-1;oe>=0;oe--){const se=g.optional[oe],{prefix:Se,suffix:Te}=se;if(Se||Te){const $e=se.caseSensitive?q:H??=q.toLowerCase();if(Se&&!$e.startsWith(Se)||Te&&!$e.endsWith(Te))continue}f.push({node:se,index:b+1,skipped:w,depth:X,statics:R,dynamics:E,optionals:x+Wl(u,b),extract:j,rawParams:N,parsedParams:P})}}if(!J&&g.dynamic&&q)for(let U=g.dynamic.length-1;U>=0;U--){const X=g.dynamic[U],{prefix:oe,suffix:se}=X;if(oe||se){const Se=X.caseSensitive?q:H??=q.toLowerCase();if(oe&&!Se.startsWith(oe)||se&&!Se.endsWith(se))continue}f.push({node:X,index:b+1,skipped:w,depth:_+1,statics:R,dynamics:E+Wl(u,b),optionals:x,extract:j,rawParams:N,parsedParams:P})}if(!J&&g.staticInsensitive){const U=g.staticInsensitive.get(H??=q.toLowerCase());U&&f.push({node:U,index:b+1,skipped:w,depth:_+1,statics:R+Wl(u,b),dynamics:E,optionals:x,extract:j,rawParams:N,parsedParams:P})}if(!J&&g.static){const U=g.static.get(q);U&&f.push({node:U,index:b+1,skipped:w,depth:_+1,statics:R+Wl(u,b),dynamics:E,optionals:x,extract:j,rawParams:N,parsedParams:P})}if(g.pathless){const U=_+1;for(let X=g.pathless.length-1;X>=0;X--){const oe=g.pathless[X];f.push({node:oe,index:b,skipped:w,depth:U,statics:R,dynamics:E,optionals:x,extract:j,rawParams:N,parsedParams:P})}}}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 Wl(e,t){return 2**(e-t-1)}function SE(e,t){return e===2**(t-1)-1}function Ny(e,t,r){try{const[a,o]=T0(e,t,r);r.rawParams=a,r.extract=o;const c=r.node.parse(a);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,c),!0}catch{return null}}function ec(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===gs)>(e.node.kind===gs)||t.node.kind===gs==(e.node.kind===gs)&&t.depth>e.depth))):!0}function gc(e){return hh(e.filter(t=>t!==void 0).join("/"))}function hh(e){return e.replace(/\/{2,}/g,"/")}function A0(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function vs(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function C0(e){return vs(A0(e))}function Ec(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function EE(e,t,r){return Ec(e,r)===Ec(t,r)}function xE({base:e,to:t,trailingSlash:r="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 f;if(c)f=e.split("/");else if(o)f=t.split("/");else{for(f=e.split("/");f.length>1&&So(f)==="";)f.pop();const g=t.split("/");for(let b=0,w=g.length;b<w;b++){const _=g[b];_===""?b?b===w-1&&f.push(_):f=[_]:_===".."?f.pop():_==="."||f.push(_)}}f.length>
101&&(So(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let p,m="";for(let g=0;g<f.length;g++){g>0&&(m+="/");const b=f[g];if(!b)continue;p=dh(b,0,p);const w=p[0];if(w===0){m+=b;continue}const _=p[5],R=b.substring(0,p[1]),E=b.substring(p[4],_),x=b.substring(p[2],p[3]);w===1?m+=R||E?`${R}{$${x}}${E}`:`$${x}`:w===2?m+=R||E?`${R}{$}${E}`:"$":m+=`${R}{-$${x}}${E}`}m=hh(m);const y=m||"/";return u&&a&&a.set(u,y),y}function RE(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),r=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(r,"g");return o=>o.replace(a,c=>t.get(c)??c)}function bf(e,t,r){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>My(o,r)).join("/"):My(a,r)}function Dy({path:e,params:t,decoder:r,...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 f=0,p,m="";for(;f<u;){const y=f;p=dh(e,y,p);const g=p[5];if(f=g+1,y===g)continue;const b=p[0];if(b===0){m+="/"+e.substring(y,g);continue}if(b===2){const w=t._splat;c._splat=w,c["*"]=w;const _=e.substring(y,p[1]),R=e.substring(p[4],g);if(!w){o=!0,(_||R)&&(m+="/"+_+R);continue}const E=bf("_splat",t,r);m+="/"+_+E+R;continue}if(b===1){const w=e.substring(p[2],p[3]);!o&&!(w in t)&&(o=!0),c[w]=t[w];const _=e.substring(y,p[1]),R=e.substring(p[4],g),E=bf(w,t,r)??"undefined";m+="/"+_+E+R;continue}if(b===3){const w=e.substring(p[2],p[3]),_=t[w];if(_==null)continue;c[w]=_;const R=e.substring(y,p[1]),E=e.substring(p[4],g),x=bf(w,t,r)??"";m+="/"+R+x+E;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:c,interpolatedPath:m||"/",isMissingParams:o}}function My(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function zM(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Ot(e){return e?.isNotFound===!0}function TE(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var AE="tsr-scroll-restoration-v1_3";function CE(){const e=TE();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");fi(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=ms(a,t)||t},persist:()=>{try{e.setItem(AE,JSON.stringify(t))}catch{}}}}var Py=CE(),OE=e=>e.state.__TSR_key||e.href;function kE(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var tc=!1,lo="window",Uy="data-scroll-restoration-id";function jE(e,t){if(!Py)return;const r=Py;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,tc=!1;const a=e.options.getScrollRestorationKey||OE,o=new Map;window.history.scrollRestoration="manual";const c=f=>{if(!(tc||!e.isScrollRestoring))if(f.target===document||f.target===window)o.set(lo,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=f.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},u=f=>{if(!e.isScrollRestoring||!f||o.size===0||!r)return;const p=r.state[f]||={};for(const[m,y]of o){let g;if(m===lo)g=lo;else if(m.isConnected){const b=m.getAttribute(Uy);g=b?`[${Uy}="${b}"]`:kE(m)}g&&(p[g]=y)}};document.addEventListener("scroll",c,!0),e.subscribe("onBeforeLoad",f=>{u(f.fromLocation?a(f.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{u(a(e.stores.resolvedLocation.get()??e.stores.location.get())),r.persist()}),e.subscribe("onRendered",f=>{const p=a(f.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}))){tc=!0;try{const g=e.isScrollRestoring?r.state[p]:void 0;let b=!1;if(g)for(const w in g){const _=g[w];if(!fi(_))continue;const{scrollX:R,scrollY:E}=_;if(!(!Number.isFinite(R)||!Number.isFinite(E))){if(w===lo)window.scrollTo({top:E,left:R,behavior:m}),b=!0;else if(w){let x;try{x=document.querySelector(w)}catch{continue}x&&(x.scrollLeft=R,x.scrollTop=E,b=!0)}}}if(!b){const w=e.history.location.hash.slice(1);if(w){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const R=document.getElementById(w);R&&R.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:m};if(window.scrollTo(_),y)for(const R of y){if(R===lo)continue;const E=typeof R=="function"?R():document.querySelector(R);E&&E.scrollTo(_)}}}}finally{tc=!1}e.isScrollRestoring&&r.set(g=>(g[p]||={},g))}})}
10function O0(e,t=String){const r=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&r.set(a,t(o))}return r.toString()}function wf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function LE(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[a,o]of t.entries()){const c=r[a];c==null?r[a]=wf(o):Array.isArray(c)?c.push(wf(o)):r[a]=[c,wf(o)]}return r}var NE=ME(JSON.parse),DE=PE(JSON.stringify,JSON.parse);function ME(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=LE(t);for(const a in r){const o=r[a];if(typeof o=="string")try{r[a]=e(o)}catch{}}return r}}function PE(e,t){const r=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(r&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const c=O0(o,a);return c?`?${c}`:""}}var ra="__root__";function zt(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 r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function un(e){return e instanceof Response&&!!e.options}function UE(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return zt(e)}function zE(e){return{input:({url:t})=>{for(const r of e)t=$f(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=k0(e[r],t);return t}}}function BE(e){const t=C0(e.basepath),r=`/${t}`,a=`${r}/`,o=e.caseSensitive?r:r.toLowerCase(),c=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const f=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return f===o?u.pathname="/":f.startsWith(c)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=gc(["/",t,u.pathname]),u)}}function $f(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function k0(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function IE(e,t){const{createMutableStore:r,createReadonlyStore:a,batch:o,init:c}=t,u=new Map,f=new Map,p=new Map,m=r(e.status),y=r(e.loadedAt),g=r(e.isLoading),b=r(e.isTransitioning),w=r(e.location),_=r(e.resolvedLocation),R=r(e.statusCode),E=r(e.redirect),x=r([]),j=r([]),N=r([]),P=a(()=>_f(u,x.get())),J=a(()=>_f(f,j.get())),q=a(()=>_f(p,N.get())),H=a(()=>x.get()[0]),U=a(()=>x.get().some(Q=>u.get(Q)?.get().status==="pending")),X=a(()=>({locationHref:w.get().href,resolvedLocationHref:_.get()?.href,status:m.get()})),oe=a(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:b.get(),matches:P.get(),location:w.get(),resolvedLocation:_.get(),statusCode:R.get(),redirect:E.get()})),se=xo(64);function Se(Q){let ie=se.get(Q);return ie||(ie=a(()=>{const Ae=x.get();for(const ee of Ae){const O=u.get(ee);if(O&&O.routeId===Q)return O.get()}}),se.set(Q,ie)),ie}const Te={status:m,loadedAt:y,isLoading:g,isTransitioning:b,location:w,resolvedLocation:_,statusCode:R,redirect:E,matchesId:x,pendingIds:j,cachedIds:N,matches:P,pendingMatches:J,cachedMatches:q,firstId:H,hasPending:U,matchRouteDeps:X,matchStores:u,pendingMatchStores:f,cachedMatchStores:p,__store:oe,getRouteMatchStore:Se,setMatches:$e,setPending:je,setCached:M};$e(e.matches),c?.(Te);function $e(Q){Sf(Q,u,x,r,o)}function je(Q){Sf(Q,f,j,r,o)}function M(Q){Sf(Q,p,N,r,o)}return Te}function _f(e,t){const r=[];for(const a of t){const o=e.get(a);o&&r.push(o.get())}return r}function Sf(e,t,r,a,o){const c=e.map(f=>f.id),u=new Set(c);o(()=>{for(const f of t.keys())u.has(f)||t.delete(f);for(const f of e){const p=t.get(f.id);if(!p){const m=a(f);m.routeId=f.routeId,t.set(f.id,m);continue}p.routeId=f.routeId,p.get()!==f&&p.set(f)}dE(r.get(),c)||r.set(c)})}var Hf=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},$E=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ic=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),sa=(e,t,r=!0)=>{const a={...e.router.options.context??{}},o=r?t:t-1;for(let c=0;c<=o;c++){const u=e.matches[c];if(!u)continue;const f=e.router.getMatch(u.id);
10f&&Object.assign(a,f.__routeContext,f.__beforeLoadContext)}return a},zy=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,a=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),o=a>=0?a:0;let c=r?e.matches.findIndex(u=>u.routeId===r):e.firstBadMatchIndex??e.matches.length-1;c<0&&(c=o);for(let u=c;u>=0;u--){const f=e.matches[u];if(e.router.looseRoutesById[f.routeId].options.notFoundComponent)return u}return r?c:o},ys=(e,t,r)=>{if(!(!un(r)&&!Ot(r)))throw un(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,a=>({...a,status:un(r)?"redirected":Ot(r)?"notFound":a.status==="pending"?"success":a.status,context:sa(e,t.index),isFetching:!1,error:r})),Ot(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),un(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},j0=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},By=(e,t,r)=>{const a=sa(e,r);e.updateMatch(t,o=>({...o,context:a}))},co=(e,t,r,a)=>{const{id:o,routeId:c}=e.matches[t],u=e.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=a,e.firstBadMatchIndex??=t,ys(e,e.router.getMatch(o),r);try{u.options.onError?.(r)}catch(f){r=f,ys(e,e.router.getMatch(o),r)}e.updateMatch(o,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!un(r)&&!Ot(r)&&(e.serialError??=r)},L0=(e,t,r,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ic(e,t)&&(r.options.loader||r.options.beforeLoad||D0(r))&&typeof o=="number"&&o!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const c=setTimeout(()=>{Hf(e)},o);a._nonReactive.pendingTimeout=c}},HE=(e,t,r)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;L0(e,t,r,a);const o=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&ys(e,c,c.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},qE=(e,t,r,a)=>{const o=e.router.getMatch(t);let c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=aa(()=>{c?.resolve(),c=void 0});const{paramsError:u,searchError:f}=o;u&&co(e,r,u,"PARSE_PARAMS"),f&&co(e,r,f,"VALIDATE_SEARCH"),L0(e,t,a,o);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,e.updateMatch(t,P=>({...P,isFetching:"beforeLoad",fetchCount:P.fetchCount+1,abortController:p})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,P=>({...P,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{y(),g()});return}o._nonReactive.beforeLoadPromise=aa();const b={...sa(e,r,!1),...o.__routeContext},{search:w,params:_,cause:R}=o,E=Ic(e,t),x={search:w,abortController:p,params:_,preload:E,context:b,location:e.location,navigate:P=>e.router.navigate({...P,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":R,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},j=P=>{if(P===void 0){e.router.batch(()=>{y(),g()});return}(un(P)||Ot(P))&&(y(),co(e,r,P,"BEFORE_LOAD")),e.router.batch(()=>{y(),e.updateMatch(t,J=>({...J,__beforeLoadContext:P})),g()})};let N;try{if(N=a.options.beforeLoad(x),Eo(N))return y(),N.catch(P=>{co(e,r,P,"BEFORE_LOAD")}).then(j)}catch(P){y(),co(e,r,P,"BEFORE_LOAD")}j(N)},VE=(e,t)=>{const{id:r,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],c=()=>f(),u=()=>qE(e,r,t,o),f=()=>{if(j0(e,r))return;const p=HE(e,r,o);return Eo(p)?p.then(u):u()};return c()},GE=(e,t,r)=>{const a=e.router.getMatch(t);if(!a||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([r.options.head?.(o),r.options.scripts?.(o),r.options.headers?.(o)]).then(([c,u,f])=>
10({meta:c?.meta,links:c?.links,headScripts:c?.scripts,headers:f,scripts:u,styles:c?.styles}))},N0=(e,t,r,a,o)=>{const c=t[a-1],{params:u,loaderDeps:f,abortController:p,cause:m}=e.router.getMatch(r),y=sa(e,a),g=Ic(e,r);return{params:u,deps:f,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}},Iy=async(e,t,r,a,o)=>{try{const c=e.router.getMatch(r);try{(!(x0??e.router.isServer)||c.ssr===!0)&&Ro(o);const u=o.options.loader,f=typeof u=="function"?u:u?.handler,p=f?.(N0(e,t,r,a,o)),m=!!f&&Eo(p);if((m||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(r,g=>({...g,isFetching:"loader"})),f){const g=m?await p:p;ys(e,e.router.getMatch(r),g),g!==void 0&&e.updateMatch(r,b=>({...b,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const y=c._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,e.updateMatch(r,g=>({...g,error:void 0,context:sa(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let f=u;if(f?.name==="AbortError"){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:sa(e,a)}));return}const p=c._nonReactive.minPendingPromise;p&&await p,Ot(u)&&await o.options.notFoundComponent?.preload?.(),ys(e,e.router.getMatch(r),u);try{o.options.onError?.(u)}catch(m){f=m,ys(e,e.router.getMatch(r),m)}!un(f)&&!Ot(f)&&await Ro(o,["errorComponent"]),e.updateMatch(r,m=>({...m,error:f,context:sa(e,a),status:"error",isFetching:!1}))}}catch(c){const u=e.router.getMatch(r);u&&(u._nonReactive.loaderPromise=void 0),ys(e,u,c)}},FE=async(e,t,r)=>{async function a(w,_,R,E,x){const j=Date.now()-_.updatedAt,N=w?x.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:x.options.staleTime??e.router.options.defaultStaleTime??0,P=x.options.shouldReload,J=typeof P=="function"?P(N0(e,t,o,r,x)):P,{status:q,invalid:H}=E,U=j>=N&&(!!e.forceStaleReload||E.cause==="enter"||R!==void 0&&R!==E.id);u=q==="success"&&(H||(J??U)),w&&x.options.preload===!1||(u&&!e.sync&&y?(f=!0,(async()=>{try{await Iy(e,t,o,r,x);const X=e.router.getMatch(o);X._nonReactive.loaderPromise?.resolve(),X._nonReactive.loadPromise?.resolve(),X._nonReactive.loaderPromise=void 0,X._nonReactive.loadPromise=void 0}catch(X){un(X)&&await e.router.navigate(X.options)}})()):q!=="success"||u?await Iy(e,t,o,r,x):By(e,o,r))}const{id:o,routeId:c}=e.matches[r];let u=!1,f=!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(j0(e,o)){if(!e.router.getMatch(o))return e.matches[r];By(e,o,r)}else{const w=e.router.getMatch(o),_=e.router.stores.matchesId.get()[r],R=(_&&e.router.stores.matchStores.get(_)||null)?.routeId===c?_:e.router.stores.matches.get().find(x=>x.routeId===c)?.id,E=Ic(e,o);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!e.sync&&!w.preload&&y)return w;await w._nonReactive.loaderPromise;const x=e.router.getMatch(o),j=x._nonReactive.error||x.error;j&&ys(e,x,j),x.status==="pending"&&await a(E,w,R,x,p)}else{const x=E&&!e.router.stores.matchStores.has(o),j=e.router.getMatch(o);j._nonReactive.loaderPromise=aa(),x!==j.preload&&e.updateMatch(o,N=>({...N,preload:x})),await a(E,w,R,j,p)}}const g=e.router.getMatch(o);f||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,f||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const b=f?g.isFetching:!1;return b!==g.isFetching||g.invalid!==!1?(e.updateMatch(o,w=>({...w,isFetching:b,invalid:!1})),e.router.getMatch(o)):g};async function $y(e){const t=e,r=[];$E(t.router)&&Hf(t);let a;for(let b=0;b<t.matches.length;b++){try{const w=VE(t,b);Eo(w)&&await w}catch(w){if(un(w))throw w;if(Ot(w))a=w;else if(!t.preload)throw w;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 f,p;for(let b=0;b<u;b++)r.push(FE(t,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const _=w.reason;if(un(_))throw _;Ot(_)?f??=_:p??=_}if(p!==void 0)throw p}const m=f??(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&&dn();const w=t.matches[b],_=t.router.looseRoutesById[w.routeId],R=t.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&R&&(_.options.notFoundComponent=R),m.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,x=>({...x,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=b,await Ro(_,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Ro(b,["errorComponent"])}for(let b=0;b<=y;b++){const{id:w,routeId:_}=t.matches[b],R=t.router.looseRoutesById[_];try{const E=GE(t,w,R);if(E){const x=await E;t.updateMatch(w,j=>({...j,...x}))}}catch(E){console.error(`Error executing head for route ${_}:`,E)}}const g=Hf(t);if(Eo(g)&&await g,m)throw m;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Hy(e,t){const r=t.map(a=>
10e.options[a]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Ro(e,t=yc){!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 r=()=>e._componentsLoaded?void 0:t===yc?(()=>{if(e._componentsPromise===void 0){const a=Hy(e,yc);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(r):r()}function D0(e){for(const t of yc)if(e.options[t]?.preload)return!0;return!1}var yc=["component","errorComponent","pendingComponent","notFoundComponent"],bs="__TSR_index",qy="popstate",Vy="beforeunload";function KE(e){let t=e.getLocation();const r=new Set,a=u=>{t=e.getLocation(),r.forEach(f=>f({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},c=async({task:u,navigateOpts:f,...p})=>{if(f?.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=xc(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:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,f,p)=>{const m=t.state[bs];f=Gy(m+1,f),c({task:()=>{e.pushState(u,f),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:f})},replace:(u,f,p)=>{const m=t.state[bs];f=Gy(m,f),c({task:()=>{e.replaceState(u,f),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:f})},go:(u,f)=>{c({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:f,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[bs]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,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 r=ph();return{...t,key:r,__TSR_key:r,[bs]:e}}function YE(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,a=t.history.replaceState;let o=[];const c=()=>o,u=U=>o=U,f=(U=>U),p=(()=>xc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const U=ph();t.history.replaceState({[bs]:0,key:U,__TSR_key:U},"")}let m=p(),y,g=!1,b=!1,w=!1,_=!1;const R=()=>m;let E,x;const j=()=>{E&&(H._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),H._ignoreSubscribers=!1,E=void 0,x=void 0,y=void 0)},N=(U,X,oe)=>{const se=f(X);x||(y=m),m=xc(X,oe),E={href:se,state:oe,isPush:E?.isPush||U==="push"},x||(x=Promise.resolve().then(()=>j()))},P=U=>{m=p(),H.notify({type:U})},J=async()=>{if(b){b=!1;return}const U=p(),X=U.state[bs]-m.state[bs],oe=X===1,se=X===-1,Se=!oe&&!se||g;g=!1;const Te=Se?"GO":se?"BACK":"FORWARD",$e=Se?{type:"GO",index:X}:{type:se?"BACK":"FORWARD"};if(w)w=!1;else{const je=c();if(typeof document<"u"&&je.length){for(const M of je)if(await M.blockerFn({currentLocation:m,nextLocation:U,action:Te}
10)){b=!0,t.history.go(1),H.notify($e);return}}}m=p(),H.notify($e)},q=U=>{if(_){_=!1;return}let X=!1;const oe=c();if(typeof document<"u"&&oe.length)for(const se of oe){const Se=se.enableBeforeUnload??!0;if(Se===!0){X=!0;break}if(typeof Se=="function"&&Se()===!0){X=!0;break}}if(X)return U.preventDefault(),U.returnValue=""},H=KE({getLocation:R,getLength:()=>t.history.length,pushState:(U,X)=>N("push",U,X),replaceState:(U,X)=>N("replace",U,X),back:U=>(U&&(w=!0),_=!0,t.history.back()),forward:U=>{U&&(w=!0),_=!0,t.history.forward()},go:U=>{g=!0,t.history.go(U)},createHref:U=>f(U),flush:j,destroy:()=>{t.history.pushState=r,t.history.replaceState=a,t.removeEventListener(Vy,q,{capture:!0}),t.removeEventListener(qy,J)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Vy,q,{capture:!0}),t.addEventListener(qy,J),t.history.pushState=function(...U){const X=r.apply(t.history,U);return H._ignoreSubscribers||P("PUSH"),X},t.history.replaceState=function(...U){const X=a.apply(t.history,U);return H._ignoreSubscribers||P("REPLACE"),X},H}function QE(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function xc(e,t){const r=QE(e),a=r.indexOf("#"),o=r.indexOf("?"),c=ph();return{href:r,pathname:r.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:r.length),hash:a>-1?r.substring(a):"",search:o>-1?r.slice(o,a===-1?void 0:a):"",state:t||{[bs]:0,key:c,__TSR_key:c}}}function ph(){return(Math.random()+1).toString(36).substring(7)}function JE(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function oi(e,t){const r=t,a=e;return{fromLocation:r,toLocation:a,pathChanged:r?.pathname!==a.pathname,hrefChanged:r?.href!==a.href,hashChanged:r?.hash!==a.hash}}var XE=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=r=>r(),this.update=r=>{const a=this.options,o=this.basepath??a?.basepath??"/",c=this.basepath===void 0,u=a?.rewrite;if(this.options={...a,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=RE(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=YE()),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=xo(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=IE(WE(this.latestLocation),y),jE(this)}let f=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(c||o!==p||u!==m){this.basepath=p;
10const y=[],g=C0(p);g&&g!=="/"&&y.push(BE({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:zE(y),this.history&&this.updateLatestLocation(),f=!0}f&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=vE(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&hE(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,a)=>{const o={eventType:r,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>{this.subscribers.forEach(a=>{a.eventType===r.type&&a.fn(r)})},this.parseLocation=(r,a)=>{const o=({pathname:p,search:m,hash:y,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const x=this.options.parseSearch(m),j=this.options.stringifySearch(x);return{href:p+j+y,publicHref:p+j+y,pathname:oo(p).path,external:!1,searchStr:j,search:Ks(a?.search,x),hash:oo(y.slice(1)).path,state:Zs(a?.state,b)}}const w=new URL(g,this.origin),_=$f(this.rewrite,w),R=this.options.parseSearch(_.search),E=this.options.stringifySearch(R);return _.search=E,{href:_.href.replace(_.origin,""),publicHref:g,pathname:oo(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:E,search:Ks(a?.search,R),hash:oo(_.hash.slice(1)).path,state:Zs(a?.state,b)}},c=o(r),{__tempLocation:u,__tempKey:f}=c.state;if(u&&(!f||f===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=(r,a)=>xE({base:r,to:hh(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,a,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:a},o):this.matchRoutesInternal(r,a),this.getMatchedRoutes=r=>e1({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const a=this.getMatch(r);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const a=this.stores.matchStores.get(r)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const a=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(u);c.from;const p=c.unsafeRelative==="path"?u.pathname:c.from??f.fullPath,m=this.resolvePathWithBase(p,"."),y=f.search,g=Object.assign(Object.create(null),f.params),b=c.to?this.resolvePathWithBase(m,`${c.to}`):this.resolvePathWithBase(m,"."),w=c.params===!1||c.params===null?Object.create(null):(c.params??!0)===!0?g:Object.assign(g,ms(c.params,g)),_=this.getMatchedRoutes(b);let R=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!=="/"&&_.routeParams["**"])&&this.options.notFoundRoute&&(R=[...R,this.options.notFoundRoute]),Object.keys(w).length>0)for(const oe of R){const se=oe.options.params?.stringify??oe.options.stringifyParams;if(se)try{Object.assign(w,se(w))}catch{}}const E=r.leaveParams?b:oo(Dy({path:b,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=y;if(r._includeValidateSearch&&this.options.search?.strict){const oe={};R.forEach(se=>{if(se.options.validateSearch)try{Object.assign(oe,vc(se.options.validateSearch,{...oe,...x}))}catch{}}),x=oe}x=t1({search:x,dest:c,destRoutes:R,_includeValidateSearch:r._includeValidateSearch}),x=Ks(y,x);const j=this.options.stringifySearch(x),N=c.hash===!0?u.hash:c.hash?ms(c.hash,u.hash):void 0,P=N?`#${N}`:"";let J=c.state===!0?u.state:c.state?ms(c.state,u.state):{};J=Zs(u.state,J);const q=`${E}${j}${P}`;let H,U,X=!1;if(this.rewrite){const oe=new URL(q,this.origin),se=k0(this.rewrite,oe);H=oe.href.replace(oe.origin,""),se.origin!==this.origin?(U=se.href,X=!0):U=se.pathname+se.search+se.hash}else H=uE(q),U=H;return{publicHref:U,href:H,pathname:E,search:x,searchStr:j,state:J,hash:N??"",external:X,unmaskOnReload:c.unmaskOnReload}},o=(c={},u)=>{const f=a(c);let p=u?a(u):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=pE(f.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:b,...w}
10=y.route,_=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,ms(b,m));u={from:r.from,...w,params:_},p=a(u)}}}return p&&(f.maskedLocation=p),f};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,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=ln(o.state,this.latestLocation.state);return p.forEach(y=>{delete o.state[y]}),m},u=vs(this.latestLocation.href)===vs(o.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=aa(()=>{f?.resolve(),f=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=r,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:r,resetScroll:a,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,href:f,...p}={})=>{if(f){const g=this.history.location.state.__TSR_index,b=xc(f,{__TSR_index:r?g:g+1}),w=new URL(b.pathname,this.origin);p.to=$f(this.rewrite,w).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:r,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:a,href:o,publicHref:c,...u})=>{let f=!1;if(o)try{new URL(`${o}`),f=!0}catch{}if(f&&!a&&(a=!0),a){if(r!==void 0||!o){const m=this.buildLocation({to:r,...u});o=o??m.publicHref,c=c??m.publicHref}const p=!f&&c?c:o;if(Sc(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:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(o=>!r.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(r),this.stores.setCached(a)})},this.load=async r=>{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=oi(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await $y({router:this,sync:r?.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,w=null,_=null;this.batch(()=>{const R=this.stores.pendingMatches.get(),E=R.length,x=this.stores.matches.get();g=E?x.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const j=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&j.add(P.routeId);const N=new Set;for(const P of this.stores.matchStores.values())P.routeId&&N.add(P.routeId);b=E?x.filter(P=>!j.has(P.routeId)):null,w=E?R.filter(P=>!N.has(P.routeId)):null,_=E?R.filter(P=>N.has(P.routeId)):x,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(R),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.f
10ilter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[R,E]of[[b,"onLeave"],[w,"onEnter"],[_,"onStay"]])if(R)for(const x of R)this.looseRoutesById[x.routeId].options[E]?.(x)})})}})}catch(m){un(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):Ot(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 f;this.hasNotFoundMatch()?f=404:this.stores.matches.get().some(p=>p.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.set(f)},this.startViewTransition=r=>{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(),f=typeof a.types=="function"?a.types(oi(c,u)):a.types;if(f===!1){r();return}o={update:r,types:f}}else o=r;document.startViewTransition(o)}else r()},this.updateMatch=(r,a)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(r);if(o){o.set(a);return}const c=this.stores.matchStores.get(r);if(c){c.set(a);return}const u=this.stores.cachedMatchStores.get(r);if(u){const f=a(u.get());f.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==r)):u.set(f)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const a=o=>r?.filter?.(o)??!0?{...o,invalid:!0,...r?.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:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const a=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const o=r.options._builtLocation??this.buildLocation(r.options),c=this.getParsedLocationHref(o);r.options.href=c,r.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;r.options.href=c,r.headers.set("Location",c)}}catch{}if(r.options.href&&!r.options._builtLocation&&Sc(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const a=r?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!a(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=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:r-o.updatedAt>=u};this.clearCache({filter:a})},this.loadRouteChunk=Ro,this.preloadRoute=async r=>{const a=r._builtLocation??this.buildLocation(r);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...c,...this.stores.cachedIds.get()]),f=o.filter(p=>!u.has(p.id));if(f.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...f])}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(un(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:a});Ot(p)||console.error(p);return}},this.matchRoute=(r,a)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{}
10,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(),f=mE(c.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,u.pathname,this.processedTree);return!f||r.params&&!ln(f.rawParams,r.params,{partial:!0})?!1:a?.includeSearch??!0?ln(u.search,c.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.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??DE,parseSearch:e.parseSearch??NE,protocolAllowlist:e.protocolAllowlist??iE}),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:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;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 r=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:o,parsedParams:c}=r;let{matchedRoutes:u}=r,f=!1;(a?a.path!=="/"&&o["**"]:vs(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:f=!0);const p=f?r1(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],w=m[g-1];let _,R,E;{const Te=w?.search??e.search,$e=w?._strictSearch??void 0;try{const je=vc(b.options.validateSearch,{...Te})??void 0;_={...Te,...je},R={...$e,...je},E=void 0}catch(je){let M=je;if(je instanceof Rc||(M=new Rc(je.message,{cause:je})),t?.throwOnError)throw M;_=Te,R={},E=M}}const x=b.options.loaderDeps?.({search:_})??"",j=x?JSON.stringify(x):"",{interpolatedPath:N,usedParams:P}=Dy({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),J=b.id+N+j,q=this.getMatch(J),H=y.get(b.id),U=q?._strictParams??P;let X;if(!q)try{Fy(b,P,c,U)}catch(Te){if(Ot(Te)||un(Te)?X=Te:X=new ZE(Te.message,{cause:Te}),t?.throwOnError)throw X}Object.assign(o,U);const oe=H?"stay":"enter";let se;if(q)se={...q,cause:oe,params:H?.params??o,_strictParams:U,search:Ks(H?H.search:q.search,_),_strictSearch:R};else{const Te=b.options.loader||b.options.beforeLoad||b.lazyFn||D0(b)?"pending":"success";se={id:J,ssr:b.options.ssr,index:g,routeId:b.id,params:H?.params??o,_strictParams:U,pathname:N,updatedAt:Date.now(),search:H?Ks(H.search,_):_,_strictSearch:R,searchError:void 0,status:Te,isFetching:!1,error:void 0,paramsError:X,__routeContext:void 0,_nonReactive:{loadPromise:aa()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:oe,loaderDeps:H?Zs(H.loaderDeps,x):x,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=E;const Se=this.getParentContext(w);se.context={...Se,...se.__routeContext,...se.__beforeLoadContext},m[g]=se}for(let g=0;g<m.length;g++){const b=m[g],w=this.looseRoutesById[b.routeId],_=this.getMatch(b.id),R=y.get(b.routeId);if(b.params=R?Ks(R.params,o):o,!_){const E=m[g-1],x=this.getParentContext(E);if(w.options.context){const j={deps:b.loaderDeps,params:b.params,context:x??{},location:e,navigate:N=>this.navigate({...N,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:w.id};b.__routeContext=w.options.context(j)??void 0}b.context={...x,...b.__routeContext,...b.__beforeLoadContext}}}return m}
10matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:r,parsedParams:a}=this.getMatchedRoutes(e.pathname),o=So(t),c={...e.search};for(const y of t)try{Object.assign(c,vc(y.options.validateSearch,c))}catch{}const u=So(this.stores.matchesId.get()),f=u&&this.stores.matchStores.get(u)?.get(),p=f&&f.routeId===o.id&&f.pathname===e.pathname;let m;if(p)m=f.params;else{const y=Object.assign(Object.create(null),r);for(const g of t)try{Fy(g,r,a??{},y)}catch{}m=y}return{matchedRoutes:t,fullPath:o.fullPath,search:c,params:m}}},Rc=class extends Error{},ZE=class extends Error{};function WE(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function vc(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Rc("Async validation not supported");if(r.issues)throw new Rc(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function e1({pathname:e,routesById:t,processedTree:r}){const a=Object.create(null),o=vs(e);let c,u;const f=gE(o,r,!0);return f&&(c=f.route,Object.assign(a,f.rawParams),u=Object.assign(Object.create(null),f.parsedParams)),{matchedRoutes:f?.branch||[t.__root__],routeParams:a,foundRoute:c,parsedParams:u}}function t1({search:e,dest:t,destRoutes:r,_includeValidateSearch:a}){return n1(r)(e,t,a??!1)}function n1(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:f})=>{let p=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(p=o.options.preSearchFilters.reduce((y,g)=>g(y),u));const m=f(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:f})=>{const p=f(u);if(!t._includeValidateSearch)return p;try{return{...p,...vc(o.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(c)}}const r=({search:o})=>{const c=t.dest;return c.search?c.search===!0?o:ms(c.search,o):{}};t.middlewares.push(r);const a=(o,c,u)=>{if(o>=u.length)return c;const f=u[o];return f({search:c,next:m=>a(o+1,m,u)})};return function(c,u,f){return t.dest=u,t._includeValidateSearch=f,a(0,c,t.middlewares)}}function r1(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const a=t[r];if(a.children)return a.id}return ra}function Fy(e,t,r,a){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const c in t)c in r&&(a[c]=r[c]);else{const c=o(a);Object.assign(a,c)}}var sr=Symbol.for("TSR_DEFERRED_PROMISE");function s1(e,t){const r=e;return r[sr]||(r[sr]={status:"pending"},r.then(a=>{r[sr].status="success",r[sr].data=a}).catch(a=>{r[sr].status="error",r[sr].error={data:JE(a),__isServerError:!0}})),r}var a1="Error preloading route! âï¸";function Ky(e,t){if(e)return typeof e=="string"?e:e[t]}function i1(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function o1(e){if(e.tag!=="link")return;const t=e.attrs?.rel,r=e.attrs?.href;if(typeof r=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return r}function l1(e,t){const r=o1(t);return!!r&&e?.inlineCss?.styles[r]!==void 0}var M0=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 r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=ra:this.parentRoute||dn();let o=a?ra:r?.path;o&&o!=="/"&&(o=A0(o));const c=r?.id||o;let u=a?ra:gc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=gc(["/",u]));const f=u==="__root__"?"/":gc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=f,this._to=vs(f)},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=>zt({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.")}},c1=class extends M0{constructor(e){super(e)}};function u1(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(r)}}}var d1=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="Ob
10jectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(d1||{}),Dr=Symbol.asyncIterator,P0=Symbol.hasInstance,li=Symbol.isConcatSpreadable,Mr=Symbol.iterator,U0=Symbol.match,z0=Symbol.matchAll,B0=Symbol.replace,I0=Symbol.search,$0=Symbol.species,H0=Symbol.split,q0=Symbol.toPrimitive,ci=Symbol.toStringTag,V0=Symbol.unscopables,G0={[Dr]:0,[P0]:1,[li]:2,[Mr]:3,[U0]:4,[z0]:5,[B0]:6,[I0]:7,[$0]:8,[H0]:9,[q0]:10,[ci]:11,[V0]:12},f1={0:Dr,1:P0,2:li,3:Mr,4:U0,5:z0,6:B0,7:I0,8:$0,9:H0,10:q0,11:ci,12:V0},A=void 0,h1={2:!0,3:!1,1:A,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},p1={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},m1={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Be(e,t,r,a,o,c,u,f,p,m,y,g){return{t:e,i:t,s:r,c:a,m:o,p:c,e:u,a:f,f:p,b:m,o:y,l:g}}function ws(e){return Be(2,A,e,A,A,A,A,A,A,A,A,A)}var F0=ws(2),K0=ws(3),g1=ws(1),y1=ws(0),v1=ws(4),b1=ws(5),w1=ws(6),_1=ws(7);function S1(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 A}}function _s(e){let t="",r=0,a;for(let o=0,c=e.length;o<c;o++)a=S1(e[o]),a&&(t+=e.slice(r,o)+a,r=o+1);return r===0?t=e:t+=e.slice(r),t}function E1(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 Ss(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,E1)}var nc="__SEROVAL_REFS__",Y0=new Map,ai=new Map;function Q0(e){return Y0.has(e)}function x1(e){return ai.has(e)}function R1(e){if(Q0(e))return Y0.get(e);throw new nx(e)}function T1(e){if(x1(e))return ai.get(e);throw new rx(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,nc,{value:ai,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,nc,{value:ai,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,nc,{value:ai,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,nc,{value:ai,configurable:!0,writable:!1,enumerable:!1});function mh(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 A1(e){let t=p1[mh(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function J0(e,t){let r=A1(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&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function X0(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function C1(e){switch(e){case Number.POSITIVE_INFINITY:return b1;case Number.NEGATIVE_INFINITY:return w1}return e!==e?_1:Object.is(e,-0)?v1:Be(0,A,e,A,A,A,A,A,A,A,A,A)}function Z0(e){return Be(1,A,_s(e),A,A,A,A,A,A,A,A,A)}function O1(e){return Be(3,A,""+e,A,A,A,A,A,A,A,A,A)}function k1(e){return Be(4,e,A,A,A,A,A,A,A,A,A,A)}function j1(e,t){let r=t.valueOf();return Be(5,e,r!==r?"":t.toISOString(),A,A,A,A,A,A,A,A,A)}function L1(e,t){return Be(6,e,A,_s(t.source),t.flags,A,A,A,A,A,A,A)}function N1(e,t){return Be(17,e,G0[t],A,A,A,A,A,A,A,A,A)}function D1(e,t){return Be(18,e,_s(R1(t)),A,A,A,A,A,A,A,A,A)}function M1(e,t,r){return Be(25,e,r,_s(t),A,A,A,A,A,A,A,A)}function P1(e,t,r){return Be(9,e,A,A,A,A,A,r,A,A,X0(t),A)}function U1(e,t){return Be(21,e,A,A,A,A,A,A,t,A,A,A)}function z1(e,t,r){return Be(15,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.length)}function B1(e,t,r){return Be(16,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function I1(e,t,r){return Be(20,e,A,A,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function $1(e,t,r){return Be(13,e,mh(t),A,_s(t.message),r,A,A,A,A,A,A)}function H1(e,t,r){return Be(14,e,mh(t),A,_s(t.message),r,A,A,A,A,A,A)}function q1(e,t){return Be(7,e,A,A,A,A,A,t,A,A,A,A)}function V1(e,t){return Be(28,A,A,A,A,A,A,[e,t],A,A,A,A)}function G1(e,t){return Be(30,A,A,A,A,A,A,[e,t],A,A,A,A)}function F1(e,t,r){return Be(31,e,A,A,A,A,A,r,t,A,A,A)}function K1(e,t){return Be(32,e,A,A,A,A,A,A,t,A,A,A)}function Y1(e,t){return Be(33,e,A,A,A,A,A,A,t,A,A,A)}function Q1(e,t){return Be(34,e,A,A,A,A,A,A,t,A,A,A)}function J1(e,t,r,a){return Be(35,e,r,A,A,A,A,t,A,A,A,a)}
12var X1={parsing:1,serialization:2,deserialization:3};function Z1(e){return`Seroval Error (step: ${X1[e]})`}var W1=(e,t)=>Z1(e),W0=class extends Error{constructor(e,t){super(W1(e)),this.cause=t}},Yy=class extends W0{constructor(e){super("parsing",e)}},ex=class extends W0{constructor(e){super("deserialization",e)}};function Pr(e){return`Seroval Error (specific: ${e})`}var $c=class extends Error{constructor(t){super(Pr(1)),this.value=t}},eb=class extends Error{constructor(t){super(Pr(2))}},tx=class extends Error{constructor(e){super(Pr(3))}},zo=class extends Error{constructor(e){super(Pr(4))}},nx=class extends Error{constructor(e){super(Pr(5)),this.value=e}},rx=class extends Error{constructor(e){super(Pr(6))}},sx=class extends Error{constructor(e){super(Pr(7))}},Es=class extends Error{constructor(e){super(Pr(8))}},ax=class extends Error{constructor(t){super(Pr(9))}},ix=class{constructor(e,t){this.value=e,this.replacement=t}},Hc=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},ox=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},lx=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Hc.toString();ox.toString();lx.toString();var cx=()=>{let e=[],t=[],r=!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],!r&&m===y-1?p[a?"return":"throw"](g):p.next(g)},f=(p,m)=>(r&&(m=o++,t[m]=p),u(p),()=>{r&&(t[m]=t[o],t[o--]=void 0)});return{__SEROVAL_STREAM__:!0,on:p=>f(p),next:p=>{r&&(e.push(p),c(p,"next"))},throw:p=>{r&&(e.push(p),c(p,"throw"),r=!1,a=!1,t.length=0)},return:p=>{r&&(e.push(p),c(p,"return"),r=!1,a=!0,t.length=0)}}},ux=e=>t=>()=>{let r=0,a={[e]:()=>a,next:()=>{if(r>t.d)return{done:!0,value:void 0};let o=r++,c=t.v[o];if(o===t.t)throw c;return{done:o===t.d,value:c}}};return a},dx=(e,t)=>r=>()=>{let a=0,o=-1,c=!1,u=[],f=[],p=(y=0,g=f.length)=>{for(;y<g;y++)f[y].s({done:!0,value:void 0})};r.on({next:y=>{let g=f.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw:y=>{let g=f.shift();g&&g.f(y),p(),o=u.length,c=!0,u.push(y)},return:y=>{let g=f.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 w=t();return f.push(w),w.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},tb=e=>{let t=atob(e),r=t.length,a=new Uint8Array(r);for(let o=0;o<r;o++)a[o]=t.charCodeAt(o);return a.buffer};tb.toString();function fx(e){return"__SEROVAL_SEQUENCE__"in e}function nb(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function hx(e){let t=[],r=-1,a=-1,o=e[Mr]();for(;;)try{let c=o.next();if(t.push(c.value),c.done){a=t.length-1;break}}catch(c){r=t.length,t.push(c)}return nb(t,r,a)}var px=ux(Mr);function mx(e){return px(e)}var gx={},yx={},vx={0:{},1:{},2:{},3:{},4:{},5:{}};function qc(e){return"__SEROVAL_STREAM__"in e}function ia(){return cx()}function bx(e){let t=ia(),r=e[Dr]();async function a(){try{let o=await r.next();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var wx=dx(Dr,Hc);function _x(e){return wx(e)}async function Sx(e){try{return[1,await e]}catch(t){return[0,t]}}function Ex(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 bc(e,t){e.marked.add(t)}function xx(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function Vc(e,t){let r=e.refs.get(t);return r!=null?(bc(e,r),{type:1,value:k1(r)}):{type:0,value:xx(e,t)}}function gh(e,t){let r=Vc(e,t);return r.type===1?r:Q0(t)?{type:2,value:D1(r.value,t)}:r}function ea(e,t){let r=gh(e,t);if(r.type!==0)return r.value;if(t in G0)return N1(r.value,t);throw new $c(t)}function Gc(e,t){let r=Vc(e,vx[t]);return r.type===1?r.value:Be(26,r.value,t,A,A,A,A,A,A,A,A,A)}function Rx(e){let t=Vc(e,gx);return t.type===1?t.value:Be(27,t.value,A,A,A,A,A,A,ea(e,Mr),A,A,A)}function Tx(e){let t=Vc(e,yx);return t.type===1?t.value:Be(29,t.value,A,A,A,A,A,[Gc(e,1),ea(e,Dr)],A,A,A,A)}function Ax(e,t,r,a){return Be(r?11:10,e,A,A,A,a,A,A,A,A,X0(t),A)}function Cx(e,t,r,a){return Be(8,t,A,A,A,A,{k:r,v:a},A,Gc(e,0),A,A,A)}
12function Ox(e,t,r){let a=new Uint8Array(r),o="";for(let c=0,u=a.length;c<u;c++)o+=String.fromCharCode(a[c]);return Be(19,t,_s(btoa(o)),A,A,A,A,A,Gc(e,5),A,A,A)}function kx(e,t){return{base:Ex(e,t),child:void 0}}var jx=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return _t(this._p,this.depth,e)}};async function Lx(e,t,r){let a=[];for(let o=0,c=r.length;o<c;o++)o in r?a[o]=await _t(e,t,r[o]):a[o]=0;return a}async function Nx(e,t,r,a){return P1(r,a,await Lx(e,t,a))}async function yh(e,t,r){let a=Object.entries(r),o=[],c=[];for(let u=0,f=a.length;u<f;u++)o.push(_s(a[u][0])),c.push(await _t(e,t,a[u][1]));return Mr in r&&(o.push(ea(e.base,Mr)),c.push(V1(Rx(e.base),await _t(e,t,hx(r))))),Dr in r&&(o.push(ea(e.base,Dr)),c.push(G1(Tx(e.base),await _t(e,t,bx(r))))),ci in r&&(o.push(ea(e.base,ci)),c.push(Z0(r[ci]))),li in r&&(o.push(ea(e.base,li)),c.push(r[li]?F0:K0)),{k:o,v:c}}async function Ef(e,t,r,a,o){return Ax(r,a,o,await yh(e,t,a))}async function Dx(e,t,r,a){return U1(r,await _t(e,t,a.valueOf()))}async function Mx(e,t,r,a){return z1(r,a,await _t(e,t,a.buffer))}async function Px(e,t,r,a){return B1(r,a,await _t(e,t,a.buffer))}async function Ux(e,t,r,a){return I1(r,a,await _t(e,t,a.buffer))}async function Qy(e,t,r,a){let o=J0(a,e.base.features);return $1(r,a,o?await yh(e,t,o):A)}async function zx(e,t,r,a){let o=J0(a,e.base.features);return H1(r,a,o?await yh(e,t,o):A)}async function Bx(e,t,r,a){let o=[],c=[];for(let[u,f]of a.entries())o.push(await _t(e,t,u)),c.push(await _t(e,t,f));return Cx(e.base,r,o,c)}async function Ix(e,t,r,a){let o=[];for(let c of a.keys())o.push(await _t(e,t,c));return q1(r,o)}async function rb(e,t,r,a){let o=e.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){let f=o[c];if(f.parse.async&&f.test(a))return M1(r,f.tag,await f.parse.async(a,new jx(e,t),{id:r}))}return A}async function $x(e,t,r,a){let[o,c]=await Sx(a);return Be(12,r,o,A,A,A,A,A,await _t(e,t,c),A,A,A)}function Hx(e,t,r,a,o){let c=[],u=r.on({next:f=>{bc(this.base,t),_t(this,e,f).then(p=>{c.push(K1(t,p))},p=>{o(p),u()})},throw:f=>{bc(this.base,t),_t(this,e,f).then(p=>{c.push(Y1(t,p)),a(c),u()},p=>{o(p),u()})},return:f=>{bc(this.base,t),_t(this,e,f).then(p=>{c.push(Q1(t,p)),a(c),u()},p=>{o(p),u()})}})}async function qx(e,t,r,a){return F1(r,Gc(e.base,4),await new Promise(Hx.bind(e,t,r,a)))}async function Vx(e,t,r,a){let o=[];for(let c=0,u=a.v.length;c<u;c++)o[c]=await _t(e,t,a.v[c]);return J1(r,o,a.t,a.d)}async function Gx(e,t,r,a){if(Array.isArray(a))return Nx(e,t,r,a);if(qc(a))return qx(e,t,r,a);if(fx(a))return Vx(e,t,r,a);let o=a.constructor;if(o===ix)return _t(e,t,a.replacement);let c=await rb(e,t,r,a);if(c)return c;switch(o){case Object:return Ef(e,t,r,a,!1);case A:return Ef(e,t,r,a,!0);case Date:return j1(r,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Qy(e,t,r,a);case Number:case Boolean:case String:case BigInt:return Dx(e,t,r,a);case ArrayBuffer:return Ox(e.base,r,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Mx(e,t,r,a);case DataView:return Ux(e,t,r,a);case Map:return Bx(e,t,r,a);case Set:return Ix(e,t,r,a)}if(o===Promise||a instanceof Promise)return $x(e,t,r,a);let u=e.base.features;if(u&32&&o===RegExp)return L1(r,a);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return Px(e,t,r,a)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||a instanceof AggregateError))return zx(e,t,r,a);if(a instanceof Error)return Qy(e,t,r,a);if(Mr in a||Dr in a)return Ef(e,t,r,a,!!o);throw new $c(a)}async function Fx(e,t,r){let a=gh(e.base,r);if(a.type!==0)return a.value;let o=await rb(e,t,a.value,r);if(o)return o;throw new $c(r)}async function _t(e,t,r){switch(typeof r){case"boolean":return r?F0:K0;case"undefined":return g1;case"string":return Z0(r);case"number":return C1(r);case"bigint":return O1(r);case"object":{if(r){let a=gh(e.base,r);return a.type===0?await Gx(e,t+1,a.value,r):a.value}return y1}case"symbol":return ea(e.base,r);case"function":return Fx(e,t,r);default:throw new $c(r)}}async function Kx(e,t){try{return await _t(e,0,t)}catch(r){throw r instanceof Yy?r:new Yy(r)}}var Yx=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(Yx||{});
12function sb(e,t){for(let r=0,a=t.length;r<a;r++){let o=t[r];e.has(o)||(e.add(o),o.extends&&sb(e,o.extends))}}function ab(e){if(e){let t=new Set;return sb(t,e),[...t]}}function Qx(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 sx(e)}}var Jx=1e6,Xx=1e4,Zx=2e4;function ib(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 Wx=1e3;function eR(e,t){var r;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||Wx}}function tR(e){return{mode:2,base:eR(2,e),child:A}}var nR=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Qe(this._p,this.depth,e)}};function ob(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Es({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function rR(e,t,r){return ob(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function sR(e,t,r){return ob(e.base,t),e.base.refs.set(t,r),r}function St(e,t,r){return e.mode===1?rR(e,t,r):sR(e,t,r)}function qf(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new Es(e)}function aR(e,t){return St(e,t.i,T1(Ss(t.s)))}function iR(e,t,r){let a=r.a,o=a.length,c=St(e,r.i,new Array(o));for(let u=0,f;u<o;u++)f=a[u],f&&(c[u]=Qe(e,t,f));return ib(c,r.o),c}function oR(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function lR(e){switch(e){case Dr:case li:case ci:case Mr:return!0;default:return!1}}function Jy(e,t,r){oR(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function cR(e,t,r,a,o){if(typeof a=="string")Jy(r,Ss(a),Qe(e,t,o));else{let c=Qe(e,t,a);switch(typeof c){case"string":Jy(r,c,Qe(e,t,o));break;case"symbol":lR(c)&&(r[c]=Qe(e,t,o));break;default:throw new Es(a)}}}function lb(e,t,r,a){let o=r.k;if(o.length>0)for(let c=0,u=r.v,f=o.length;c<f;c++)cR(e,t,a,o[c],u[c]);return a}function uR(e,t,r){let a=St(e,r.i,r.t===10?{}:Object.create(null));return lb(e,t,r.p,a),ib(a,r.o),a}function dR(e,t){return St(e,t.i,new Date(t.s))}function fR(e,t){if(e.base.features&32){let r=Ss(t.c);if(r.length>Zx)throw new Es(t);return St(e,t.i,new RegExp(r,t.m))}throw new eb(t)}function hR(e,t,r){let a=St(e,r.i,new Set);for(let o=0,c=r.a,u=c.length;o<u;o++)a.add(Qe(e,t,c[o]));return a}function pR(e,t,r){let a=St(e,r.i,new Map);for(let o=0,c=r.e.k,u=r.e.v,f=c.length;o<f;o++)a.set(Qe(e,t,c[o]),Qe(e,t,u[o]));return a}function mR(e,t){if(t.s.length>Jx)throw new Es(t);return St(e,t.i,tb(Ss(t.s)))}function gR(e,t,r){var a;let o=Qx(r.c),c=Qe(e,t,r.f),u=(a=r.b)!=null?a:0;if(u<0||u>c.byteLength)throw new Es(r);return St(e,r.i,new o(c,u,r.l))}function yR(e,t,r){var a;let o=Qe(e,t,r.f),c=(a=r.b)!=null?a:0;if(c<0||c>o.byteLength)throw new Es(r);return St(e,r.i,new DataView(o,c,r.l))}function cb(e,t,r,a){if(r.p){let o=lb(e,t,r.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(o))}return a}function vR(e,t,r){let a=St(e,r.i,new AggregateError([],Ss(r.m)));return cb(e,t,r,a)}function bR(e,t,r){let a=qf(r,m1,r.s),o=St(e,r.i,new a(Ss(r.m)));return cb(e,t,r,o)}function wR(e,t,r){let a=Hc(),o=St(e,r.i,a.p),c=Qe(e,t,r.f);return r.s?a.s(c):a.f(c),o}function _R(e,t,r){return St(e,r.i,Object(Qe(e,t,r.f)))}function SR(e,t,r){let a=e.base.plugins;if(a){let o=Ss(r.c);for(let c=0,u=a.length;c<u;c++){let f=a[c];if(f.tag===o)return St(e,r.i,f.deserialize(r.s,new nR(e,t),{id:r.i}))}}throw new tx(r.c)}function ER(e,t){return St(e,t.i,St(e,t.s,Hc()).p)}function xR(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.s(Qe(e,t,r.a[1])),A;throw new zo("Promise")}function RR(e,t,r){let a=e.base.refs.get(r.i);if(a)return a.f(Qe(e,t,r.a[1])),A;throw new zo("Promise")}function TR(e,t,r){Qe(e,t,r.a[0]);let a=Qe(e,t,r.a[1]);return mx(a)}function AR(e,t,r){Qe(e,t,r.a[0]);let a=Qe(e,t,r.a[1]);return _x(a)}function CR(e,t,r){let a=St(e,r.i,ia()),o=r.a,c=o.length;if(c)for(let u=0;u<c;u++)Qe(e,t,o[u]);return a}function OR(e,t,r){let a=e.base.refs.get(r.i);if(a&&qc(a))return a.next(Qe(e,t,r.f)),A;throw new zo("Stream")}function kR(e,t,r){let a=e.base.refs.get(r.i);if(a&&qc(a))return a.throw(Qe(e,t,r.f)),A;throw new zo("Stream")}function jR(e,t,r){let a=e.base.refs.get(r.i);if(a&&qc(a))return a.return(Qe(e,t,r.f)),A;throw new zo("Stream")}function LR(e,t,r){return Qe(e,t,r.f),A}function NR(e,t,r){return Qe(e,t,r.a[1]),A}function DR(e,t,r){let a=St(e,r.i,nb([],r.s,r.l));for(let o=0,c=r.a.length;o<c;o++)a.v[o]=Qe(e,t,r.a[o]);return a}function Qe(e,t,r){if(t>e.base.depthLimit)throw new ax(e.base.depthLimit);switch(t+=1,r.t){case 2:return qf(r,h1,r.s);case 0:return Number(r.s);case 1:return Ss(String(r.s));case 3:if(String(r.s).length>Xx)throw new Es(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return aR(e,r);case 9:return iR(e,t,r);case 10:case 11:return uR(e,t,r);case 5:return dR(e,r);case 6:return fR(e,r);case 7:return hR(e,t,r);case 8:return pR(e,t,r);case 19:return mR(e,r);case 16:case 15:return gR(e,t,r);case 20:return yR(e,t,r);case 14:return vR(e,t,r);case 13:return bR(e,t,r);case 12:return wR(e,t,r);case 17:return qf(r,f1,r.s);case 21:return _R(e,t,r);case 25:return SR(e,t,r);case 22:return ER(e,r);case 23:return xR(e,t,r);case 24:return RR(e,t,r);case 28:return TR(e,t,r);case 30:return AR(e,t,r);case 31:return CR(e,t,r);case 32:return OR(e,t,r);case 33:return kR(e,t,r);case 34:return jR(e,t,r);case 27:return LR(e,t,r);case 29:return NR(e,t,r);case 35:return DR(e,t,r);default:throw new eb(r)}}function MR(e,t){try{return Qe(e,0,t)}catch(r){throw new ex(r)}}var PR=()=>T;PR.toString();function Xy(e,t){let r=ab(t.plugins),a=tR({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return MR(a,e)}async function UR(e,t={}){let r=ab(t.plugins),a=kx(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await Kx(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function zR(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r,a){return{v:r.parse(e.toSerializable(t))}},async async(t,r,a){return{v:await r.parse(e.toSerializable(t))}},stream(t,r,a){return{v:r.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,r,a){return e.fromSerializable(r.deserialize(t.v))}}}var BR=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Tc=globalThis.Buffer,ub=!!Tc&&typeof Tc.from=="function";function db(e){if(e.length===0)return"";if(ub)return Tc.from(e).toString("base64");const t=32768,r=[];for(let a=0;a<e.length;a+=t){const o=e.subarray(a,a+t);r.push(String.fromCharCode.apply(null,o))}return btoa(r.join(""))}function fb(e){if(e.length===0)return new Uint8Array(0);if(ub){const a=Tc.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return r}var uo=Object.create(null),fo=Object.create(null),IR=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(fb(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),$R=new TextEncoder,HR=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue($R.encode(r)):t.enqueue(fb(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),qR="(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(_){}}})}}))",VR="(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=ia(),r=e.getReader();return(async()=>{try{for(;;){const{done:a,value:o}=await r.read();if(a){t.return(void 0);break}t.next(db(o))}}catch(a){t.throw(a)}finally{r.releaseLock()}})(),t}function Wy(e){const t=ia(),r=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:c}=await r.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:db(c)})}}}catch(o){t.throw(o)}finally{r.releaseLock()}})(),t}var GR={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===uo},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return qR},deserialize(e,t,r){return uo}},{tag:"tss/RawStreamFactoryText",test(e){return e===fo},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return VR},deserialize(e,t,r){return fo}}],test(e){return e instanceof BR},parse:{sync(e,t,r){const a=e.hint==="text"?fo:uo;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(ia())}},async async(e,t,r){const a=e.hint==="text"?fo:uo,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,r){const a=e.hint==="text"?fo:uo,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,r){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,r){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?HR(a):IR(a)}};function FR(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,r,a){return e(typeof r?.deserialize=="function"?r.deserialize(t.streamId):t.streamId)}}}var KR={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))}},fs={},hb=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),YR={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===fs},parse:{sync(){return fs},async async(){return await Promise.resolve(fs)},stream(){return fs}},serialize(){return hb.toString()},deserialize(){return fs}};function ev(e){let t=ia(),r=e.getReader();async function a(){try{let o=await r.read();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var QR={tag:"seroval/plugins/web/ReadableStream",extends:[YR],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(fs),stream:t.parse(ia())}},async async(e,t){return{factory:await t.parse(fs),stream:await t.parse(ev(e))}},stream(e,t){return{factory:t.parse(fs),stream:t.parse(ev(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return hb(r)}},JR=QR,XR=[KR,GR,JR];function ZR(){return[...E0()?.serializationAdapters?.map(zR)??[],...XR]}var tv=new TextDecoder,WR=new Uint8Array(0),nv=16*1024*1024,rv=32*1024*1024,sv=1024,av=1e5;function eT(e){const t=new Map,r=new Map,a=new Set;let o=!1,c=null,u=0,f;const p=new ReadableStream({start(g){f=g},cancel(){o=!0;try{c?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),a.clear()}});function m(g){const b=r.get(g);if(b)return b;if(a.has(g))return new ReadableStream({start(_){_.close()}});if(r.size>
12=sv)throw new Error(`Too many raw streams in framed response (max ${sv})`);const w=new ReadableStream({start(_){t.set(g,_)},cancel(){a.add(g),t.delete(g),r.delete(g)}});return r.set(g,w),w}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();c=g;const b=[];let w=0;function _(){if(w<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const x=new Uint8Array(9);let j=0,N=9;for(let P=0;P<b.length&&N>0;P++){const J=b[P],q=Math.min(J.length,N);x.set(J.subarray(0,q),j),j+=q,N-=q}return{type:x[0],streamId:(x[1]<<24|x[2]<<16|x[3]<<8|x[4])>>>0,length:(x[5]<<24|x[6]<<16|x[7]<<8|x[8])>>>0}}function R(E){if(E===0)return WR;const x=new Uint8Array(E);let j=0,N=E;for(;N>0&&b.length>0;){const P=b[0];if(!P)break;const J=Math.min(P.length,N);x.set(P.subarray(0,J),j),j+=J,N-=J,J===P.length?b.shift():b[0]=P.subarray(J)}return w-=E,x}try{for(;;){const{done:E,value:x}=await g.read();if(o||E)break;if(x){if(w+x.length>rv)throw new Error(`Framed response buffer exceeded ${rv} bytes`);for(b.push(x),w+=x.length;;){const j=_();if(!j)break;const{type:N,streamId:P,length:J}=j;if(N!==Cr.JSON&&N!==Cr.CHUNK&&N!==Cr.END&&N!==Cr.ERROR)throw new Error(`Unknown frame type: ${N}`);if(N===Cr.JSON){if(P!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(P===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(J>nv)throw new Error(`Frame payload too large: ${J} bytes (max ${nv})`);const q=9+J;if(w<q)break;if(++u>av)throw new Error(`Too many frames in framed response (max ${av})`);R(9);const H=R(J);switch(N){case Cr.JSON:try{f.enqueue(tv.decode(H))}catch{}break;case Cr.CHUNK:{const U=y(P);U&&U.enqueue(H);break}case Cr.END:{const U=y(P);if(a.add(P),U){try{U.close()}catch{}t.delete(P)}break}case Cr.ERROR:{const U=y(P);if(a.add(P),U){const X=tv.decode(H);U.error(new Error(X)),t.delete(P)}break}}}}}if(w!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}t.forEach(E=>{try{E.close()}catch{}}),t.clear()}catch(E){try{f.error(E)}catch{}t.forEach(x=>{try{x.error(E)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}c=null}})(),{getOrCreateStream:m,jsonChunks:p}}var To=null;async function Vf(e){e.length>0&&await Promise.allSettled(e)}var tT=Object.prototype.hasOwnProperty;function pb(e){for(const t in e)if(tT.call(e,t))return!0;return!1}async function nT(e,t,r){To||(To=ZR());const a=t[0],o=a.fetch??r,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",`${XS}, application/x-ndjson, application/json`),a.method==="GET"){if(c==="formData")throw new Error("FormData is not supported with GET requests");const p=await mb(a);if(p!==void 0){const m=O0({payload:p});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let f;if(a.method==="POST"){const p=await rT(a);p?.contentType&&u.set("content-type",p.contentType),f=p?.body}return await sT(async()=>o(e,{method:a.method,headers:u,signal:a.signal,body:f}))}async function mb(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&pb(e.context)&&(t=!0,r.context=e.context),t)return gb(r)}async function gb(e){return JSON.stringify(await Promise.resolve(UR(e,{plugins:To})))}async function rT(e){if(e.data instanceof FormData){let r;return e.context&&pb(e.context)&&(r=await gb(e.context)),r!==void 0&&e.data.set(JS,r),{body:e.data}}const t=await mb(e);if(t)return{body:t,contentType:"application/json"}}async function sT(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 r=t.headers.get("content-type");if(r||dn(),t.headers.get("x-tss-serialized")){let a;if(r.includes("application/x-tss-framed")){if(eE(r),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:c}=eT(t.body),u=[FR(o),...To||[]],f=new Map;a=await aT({jsonStream:c,onMessage:p=>Xy(p,{refs:f,plugins:u}),onError(p,m){console.error(p,m)}})}else if(r.includes("application/json")){const o=await t.json(),c=[];a=Xy(o,{plugins:To}),await Vf(c)}
12if(a||dn(),a instanceof Error)throw a;return a}if(r.includes("application/json")){const a=await t.json(),o=UE(a);if(o)throw o;if(Ot(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function aT({jsonStream:e,onMessage:t,onError:r}){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 f=!1;const p=(async()=>{try{for(;;){const{value:g,done:b}=await a.read();if(b)break;if(g)try{const w=[];try{t(JSON.parse(g))}finally{}await Vf(w)}catch(w){r?.(`Invalid JSON: ${g}`,w)}}}catch(g){f||r?.("Stream processing error:",g)}})();let m;const y=[];try{m=t(u)}catch(g){throw f=!0,a.cancel().catch(()=>{}),g}return await Vf(y),Promise.resolve(m).catch(()=>{f=!0,a.cancel().catch(()=>{})}),p.finally(()=>{try{a.releaseLock()}catch{}}),m}function iT(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const c=E0()?.serverFns?.fetch;return nT(t,o,c??fetch)},{url:t,serverFnMeta:{id:e},[If]:!0})}var oT={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(If in e)?!1:!!e[If],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>iT(e)};function iv(e){return e.replaceAll("\0","/").replaceAll("�","/")}function lT(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 cT(e){window.$_TSR||dn();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.forEach(x=>{E.set(x.key,x.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(x=>x())}window.$_TSR.initialized=!0,window.$_TSR.router||dn();const r=window.$_TSR.router;r.matches.forEach(E=>{E.i=iv(E.i)}),r.lastMatchId&&(r.lastMatchId=iv(r.lastMatchId));const{manifest:a,dehydratedData:o,lastMatchId:c}=r;e.ssr={manifest:a};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const f=e.matchRoutes(e.stores.location.get()),p=Promise.all(f.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function m(E){const x=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(x){const j=aa();E._nonReactive.minPendingPromise=j,E._forcePending=!0,setTimeout(()=>{j.resolve(),e.updateMatch(E.id,N=>(N._nonReactive.minPendingPromise=void 0,{...N,_forcePending:void 0}))},x)}}function y(E){const x=e.looseRoutesById[E.routeId];x&&(x.options.ssr=E.ssr)}let g;f.forEach(E=>{const x=r.matches.find(j=>j.i===E.id);if(!x){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}lT(E,x),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&g===void 0&&(g=E.index,m(E))}),e.stores.setMatches(f),await e.options.hydrate?.(o);const b=e.stores.matches.get(),w=e.stores.location.get();await Promise.all(b.map(async E=>{try{const x=e.looseRoutesById[E.routeId],j=b[E.index-1]?.context??e.options.context;if(x.options.context){const q={deps:E.loaderDeps,params:E.params,context:j??{},location:w,navigate:H=>e.navigate({...H,_fromLocation:w}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:f,routeId:x.id};E.__routeContext=x.options.context(q)??void 0}E.context={...j,...E.__routeContext,...E.__beforeLoadContext};const N={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},P=await x.options.head?.(N),J=await x.options.scripts?.(N);E.meta=P?.meta,E.links=P?.links,E.headScripts=P?.scripts,E.styles=P?.styles,E.scripts=J}catch(x){if(Ot(x))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,x);else throw E.error=x,console.error(`Error during hydration for route ${E.routeId}:`,x),x}}));const _=f[f.length-1].id!==c;if(!f.some(E=>E.ssr===!1)&&!_)return f.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),p;const R=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(_){const E=f[1];E||dn(),m(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=R,R.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(E.id,x=>({...x,_displayPending:void 0,displayPendingPromise:void 0}))})})}return p}var Ac=re.use,go=typeof window<"u"?re.useLayoutEffect:re.useEffect;function xf(e){const t=re.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function uT(e,t,r={},a={}){re.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([c])=>{t(c)},r);return o.observe(e.current),()=>{o.disconnect()}},[t,r,a.disabled,e])}function dT(e){const t=re.useRef(null);return re.useImperativeHandle(e,()=>t.current,[]),t}function fT({promise:e}){if(Ac)return Ac(e);const t=s1(e);if(t[sr].status==="pending")throw t;if(t[sr].status==="error")throw t[sr].error;return t[sr].data}function hT(e){const t=k.jsx(pT,{...e});
12return e.fallback?k.jsx(re.Suspense,{fallback:e.fallback,children:t}):t}function pT(e){const t=fT(e);return e.children(t)}function vh(e){const t=e.errorComponent??bh;return k.jsx(mT,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:a})=>r?re.createElement(t,{error:r,reset:a}):e.children})}var mT=class extends re.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const r=e.getResetKey();return t.error&&t.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}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 bh({error:e}){const[t,r]=re.useState(!1);return k.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[k.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),k.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(a=>!a),children:t?"Hide Error":"Show Error"})]}),k.jsx("div",{style:{height:".25rem"}}),t?k.jsx("div",{children:k.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?k.jsx("code",{children:e.message}):null})}):null]})}function gT({children:e,fallback:t=null}){return wh()?k.jsx(te.Fragment,{children:e}):k.jsx(te.Fragment,{children:t})}function wh(){return te.useSyncExternalStore(yT,()=>!0,()=>!1)}function yT(){return()=>{}}var yb=re.createContext(null);function Bt(e){return re.useContext(yb)}var Fc=re.createContext(void 0),vT=re.createContext(void 0),tt=(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))(tt||{});function bT({update:e,notify:t,unwatched:r}){return{link:a,unlink:o,propagate:c,checkDirty:u,shallowPropagate:f};function a(m,y,g){const b=y.depsTail;if(b!==void 0&&b.dep===m)return;const w=b!==void 0?b.nextDep:y.deps;if(w!==void 0&&w.dep===m){w.version=g,y.depsTail=w;return}const _=m.subsTail;if(_!==void 0&&_.version===g&&_.sub===y)return;const R=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:b,nextDep:w,prevSub:_,nextSub:void 0};w!==void 0&&(w.prevDep=R),b!==void 0?b.nextDep=R:y.deps=R,_!==void 0?_.nextSub=R:m.subs=R}function o(m,y=m.sub){const g=m.dep,b=m.prevDep,w=m.nextDep,_=m.nextSub,R=m.prevSub;return w!==void 0?w.prevDep=b:y.depsTail=b,b!==void 0?b.nextDep=w:y.deps=w,_!==void 0?_.prevSub=R:g.subsTail=R,R!==void 0?R.nextSub=_:(g.subs=_)===void 0&&r(g),w}function c(m){let y=m.nextSub,g;e:do{const b=m.sub;let w=b.flags;if(w&60?w&12?w&4?!(w&48)&&p(m,b)?(b.flags=w|40,w&=1):w=0:b.flags=w&-9|32:w=0:b.flags=w|32,w&2&&t(b),w&1){const _=b.subs;if(_!==void 0){const R=(m=_).nextSub;R!==void 0&&(g={value:y,prev:g},y=R);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,w=!1;e:do{const _=m.dep,R=_.flags;if(y.flags&16)w=!0;else if((R&17)===17){if(e(_)){const E=_.subs;E.nextSub!==void 0&&f(E),w=!0}}else if((R&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=_.deps,y=_,++b;continue}if(!w){const E=m.nextDep;if(E!==void 0){m=E;continue}}for(;b--;){const E=y.subs,x=E.nextSub!==void 0;if(x?(m=g.value,g=g.prev):m=E,w){if(e(y)){x&&f(E),y=m.sub;continue}w=!1}else y.flags&=-33;y=m.sub;const j=m.nextDep;if(j!==void 0){m=j;continue e}}return w}while(!0)}function f(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 wT(e,t,r){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),c
12omplete:(a?e.complete:r)?.bind(o)}}const Gf=[];let wc=0;const{link:ov,unlink:_T,propagate:ST,checkDirty:vb,shallowPropagate:lv}=bT({update(e){return e._update()},notify(e){Gf[Ff++]=e,e.flags&=~tt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=tt.Mutable|tt.Dirty,Cc(e))}});let rc=0,Ff=0,nr,Kf=0;function bb(e){try{++Kf,e()}finally{--Kf||wb()}}function Cc(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=_T(r,e)}function wb(){if(!(Kf>0)){for(;rc<Ff;){const e=Gf[rc];Gf[rc++]=void 0,e.notify()}rc=0,Ff=0}}function cv(e,t){const r=typeof e=="function",a=e,o={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?tt.None:tt.Mutable,get(){return nr!==void 0&&ov(o,nr,wc),o._snapshot},subscribe(c){const u=wT(c),f={current:!1},p=ET(()=>{o.get(),f.current?u.next?.(o._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const u=nr,f=t?.compare??Object.is;if(r)nr=o,++wc,o.depsTail=void 0;else if(c===void 0)return!1;r&&(o.flags=tt.Mutable|tt.RecursedCheck);try{const p=o._snapshot,m=typeof c=="function"?c(p):c===void 0&&r?a(p):c;return p===void 0||!f(p,m)?(o._snapshot=m,!0):!1}finally{nr=u,r&&(o.flags&=~tt.RecursedCheck),Cc(o)}}};return r?(o.flags=tt.Mutable|tt.Dirty,o.get=function(){const c=o.flags;if(c&tt.Dirty||c&tt.Pending&&vb(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&lv(u)}}else c&tt.Pending&&(o.flags=c&~tt.Pending);return nr!==void 0&&ov(o,nr,wc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(ST(u),lv(u),wb())}},o}function ET(e){const t=()=>{const a=nr;nr=r,++wc,r.depsTail=void 0,r.flags=tt.Watching|tt.RecursedCheck;try{return e()}finally{nr=a,r.flags&=~tt.RecursedCheck,Cc(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:tt.Watching|tt.RecursedCheck,notify(){const a=this.flags;a&tt.Dirty||a&tt.Pending&&vb(this.deps,this)?t():this.flags=tt.Watching},stop(){this.flags=tt.None,this.depsTail=void 0,Cc(this)}};return t(),r}var Rf={exports:{}},Tf={},Af={exports:{}},Cf={};var uv;function xT(){if(uv)return Cf;uv=1;var e=Uo();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function f(g,b){var w=b(),_=a({inst:{value:w,getSnapshot:b}}),R=_[0].inst,E=_[1];return c(function(){R.value=w,R.getSnapshot=b,p(R)&&E({inst:R})},[g,w,b]),o(function(){return p(R)&&E({inst:R}),g(function(){p(R)&&E({inst:R})})},[g]),u(w),w}function p(g){var b=g.getSnapshot;g=g.value;try{var w=b();return!r(g,w)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return Cf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Cf}var dv;function RT(){return dv||(dv=1,Af.exports=xT()),Af.exports}var fv;function TT(){if(fv)return Tf;fv=1;var e=Uo(),t=RT();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var a=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,f=e.useMemo,p=e.useDebugValue;return Tf.useSyncExternalStoreWithSelector=function(m,y,g,b,w){var _=c(null);if(_.current===null){var R={hasValue:!1,value:null};_.current=R}else R=_.current;
12_=f(function(){function x(q){if(!j){if(j=!0,N=q,q=b(q),w!==void 0&&R.hasValue){var H=R.value;if(w(H,q))return P=H}return P=q}if(H=P,a(N,q))return H;var U=b(q);return w!==void 0&&w(H,U)?(N=q,H):(N=q,P=U)}var j=!1,N,P,J=g===void 0?null:g;return[function(){return x(y())},J===null?void 0:function(){return x(J())}]},[y,g,b,w]);var E=o(m,_[0],_[1]);return u(function(){R.hasValue=!0,R.value=E},[E]),p(E),E},Tf}var hv;function AT(){return hv||(hv=1,Rf.exports=TT()),Rf.exports}var CT=AT();function OT(e,t){return e===t}function gt(e,t,r=OT){const a=re.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:f}=e.subscribe(u);return f},[e]),o=re.useCallback(()=>e?.get(),[e]);return CT.useSyncExternalStoreWithSelector(a,o,o,t,r)}var kT={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function oa(e){const t=Bt(),r=re.useContext(e.from?vT:Fc),a=e.from??r,o=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,c=re.useRef(void 0);return gt(o??kT,u=>{if((e.shouldThrow??!0)&&!u&&dn(),u===void 0)return;const f=e.select?e.select(u):u;if(e.structuralSharing??t.options.defaultStructuralSharing){const p=Zs(c.current,f);return c.current=p,p}return f})}function _b(e){return oa({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Sb(e){const{select:t,...r}=e;return oa({...r,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function Eb(e){return oa({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function xb(e){return oa({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Rb(e){const t=Bt();return re.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function Tb(e){return oa({...e,select:t=>e.select?e.select(t.context):t.context})}var Ab=S0();const jT=_0(Ab);function LT(e,t){const r=Bt(),a=dT(t),{activeProps:o,inactiveProps:c,activeOptions:u,to:f,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:b,startTransition:w,resetScroll:_,viewTransition:R,children:E,target:x,disabled:j,style:N,className:P,onClick:J,onBlur:q,onFocus:H,onMouseEnter:U,onMouseLeave:X,onTouchStart:oe,ignoreBlocker:se,params:Se,search:Te,hash:$e,state:je,mask:M,reloadDocument:Q,unsafeRelative:ie,from:Ae,_fromLocation:ee,...O}=e,G=wh(),K=re.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=gt(r.stores.location,Ve=>Ve,(Ve,rt)=>Ve.href===rt.href),Z=re.useMemo(()=>{const Ve={_fromLocation:W,...K};return r.buildLocation(Ve)},[r,W,K]),ae=Z.maskedLocation?Z.maskedLocation.publicHref:Z.publicHref,xe=Z.maskedLocation?Z.maskedLocation.external:Z.external,we=re.useMemo(()=>zT(ae,xe,r.history,j),[j,xe,ae,r.history]),ye=re.useMemo(()=>{if(we?.external)return Sc(we.href,r.protocolAllowlist)?void 0:we.href;if(!BT(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),Sc(f,r.protocolAllowlist)?void 0:f}catch{}},[f,we,r.protocolAllowlist]),jt=re.useMemo(()=>{if(ye)return!1;if(u?.exact){if(!EE(W.pathname,Z.pathname,r.basepath))return!1}else{const Ve=Ec(W.pathname,r.basepath),rt=Ec(Z.pathname,r.basepath);if(!(Ve.startsWith(rt)&&(Ve.length===rt.length||Ve[rt.length]==="/")))return!1}return(u?.includeSearch??!0)&&!ln(W.search,Z.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?G&&W.hash===Z.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,W,ye,G,Z.hash,Z.pathname,Z.search,r.basepath]),yt=jt?ms(o,{})??NT:Of,ct=jt?Of:ms(c,{})??Of,Mn=[P,yt.className,ct.className].filter(Boolean).join(" "),vt=(N||yt.style||ct.style)&&{...N,...yt.style,...ct.style},[Rs,or]=re.useState(!1),Kn=re.useRef(!1),_n=e.reloadDocument||ye?!1:p??r.options.defaultPreload,Lt=m??r.options.defaultPreloadDelay??0,fn=re.useCallback(()=>{r.preloadRoute({...K,_builtLocation:Z}).catch(Ve=>{console.warn(Ve),console.warn(a1)})},[r,K,Z]);uT(a,re.useCallback(Ve=>{Ve?.isIntersecting&&fn()},[fn]),UT,{disabled:!!j||_n!=="viewport"}),re.useEffect(()=>{Kn.current||!j&&_n==="render"&&(fn(),Kn.current=!0)},[j,fn,_n]);const Ts=Ve=>{const rt=Ve.currentTarget.getAttribute("target"),Sn=x!==void 0?x:rt;if(!j&&!IT(Ve)&&!Ve.defaultPrevented&&(!Sn||Sn==="_self")&&Ve.button===0){Ve.preventDefault(),Ab.flushSync(()=>{or(!0)});const lr=r.subscribe("onResolved",()=>{lr(),or(!1)});r.navigate({...K,replace:b,resetScroll:_,hashScrollIntoView:g,startTransition:w,viewTransition:R,ignoreBlocker:se})}};if(ye)return{...O,ref:a,href:ye,...E&&{children:E},...x&&{target:x},...j&&{disabled:j},...N&&{style:N},...P&&{className:P},...J&&{onClick:J},...q&&{onBlur:q},...H&&{onFocus:H},...U&&{onMouseEnter:U},...X&&{onMouseLeave:X},...oe&&{onTouchStart:oe}};const Et=Ve=>{if(j||_n!=="intent")return;if(!Lt){fn();return}const rt=Ve.currentTarget;if(ho.has(rt))return;const Sn=setTimeout(()=>{ho.delete(rt),fn()},Lt);ho.set(rt,Sn)},Yn=Ve=>{j||_n!=="intent"||fn()},xt=Ve=>{if(j||!_n||!Lt)return;const rt=Ve.currentTarget,Sn=ho.get(rt);Sn&&(clearTimeout(Sn),ho.delete(rt))};return{...O,...yt,...ct,href:we?.href,ref:a,onClick:Ja([J,Ts]),onBlur:Ja([q,xt]),onFocus:Ja([H,Et]),onMouseEnter:Ja([U,Et]),onMouseLeave:Ja([X,xt]),onTouchStart:Ja([oe,Yn]),disabled:!!j,target:x,...vt&&{style:vt},...Mn&&{className:Mn},...j&&DT,...jt&&MT,...G&&Rs&&PT}}
12var Of={},NT={className:"active"},DT={role:"link","aria-disabled":!0},MT={"data-status":"active","aria-current":"page"},PT={"data-transitioning":"transitioning"},ho=new WeakMap,UT={rootMargin:"100px"},Ja=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function zT(e,t,r,a){if(!a)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function BT(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var cn=re.forwardRef((e,t)=>{const{_asChild:r,...a}=e,{type:o,...c}=LT(a,t),u=typeof a.children=="function"?a.children({isActive:c["data-status"]==="active"}):a.children;if(!r){const{disabled:f,...p}=c;return re.createElement("a",p,u)}return re.createElement(r,c,u)});function IT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var $T=class extends M0{constructor(t){super(t),this.useMatch=r=>oa({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>Tb({...r,from:this.id}),this.useSearch=r=>xb({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Eb({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Sb({...r,from:this.id}),this.useLoaderData=r=>_b({...r,from:this.id}),this.useNavigate=()=>Rb({from:this.fullPath}),this.Link=te.forwardRef((r,a)=>k.jsx(cn,{ref:a,from:this.fullPath,...r}))}};function HT(e){return new $T(e)}function qT(){return e=>GT(e)}var VT=class extends c1{constructor(e){super(e),this.useMatch=t=>oa({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Tb({...t,from:this.id}),this.useSearch=t=>xb({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Eb({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Sb({...t,from:this.id}),this.useLoaderData=t=>_b({...t,from:this.id}),this.useNavigate=()=>Rb({from:this.fullPath}),this.Link=te.forwardRef((t,r)=>k.jsx(cn,{ref:r,from:this.fullPath,...t}))}};function GT(e){return new VT(e)}function ge(e){return new FT(e,{silent:!0}).createRoute}var FT=class{constructor(e,t){this.path=e,this.createRoute=r=>{const a=HT(r);return a.isRoot=!1,a},this.silent=t?.silent}};function he(e,t){let r,a,o,c;const u=()=>(r||(r=e().then(p=>{r=void 0,a=p[t??"default"]}).catch(p=>{if(o=p,sE(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)}})),r),f=function(m){if(c)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(Ac)Ac(u());else throw u();return re.createElement(a,m)};return f.preload=u,f}function KT(e){const t=Bt(),r=`not-found-${gt(t.stores.location,a=>a.pathname)}-${gt(t.stores.status,a=>a)}`;return k.jsx(vh,{getResetKey:()=>r,onCatch:(a,o)=>{if(Ot(a))e.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(Ot(a))return e.fallback?.(a);throw a},children:e.children})}function YT(){return k.jsx("p",{children:"Not Found"})}function ti(e){return k.jsx(k.Fragment,{children:e.children})}function Cb(e,t,r){return t.options.notFoundComponent?k.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?k.jsx(e.options.defaultNotFoundComponent,{...r}):k.jsx(YT,{})}function QT(e){return null}function JT(){return QT(Bt()),null}var Ob=re.memo(function({matchId:t}){const r=Bt(),a=r.stores.matchStores.get(t);a||dn();const o=gt(r.stores.loadedAt,u=>u),c=gt(a,u=>u);return k.jsx(XT,{router:r,matchId:t,resetKey:o,matchState:re.useMemo(()=>{const u=c.routeId,f=r.routesById[u].parentRoute?.id;return{routeId:u,ssr:c.ssr,_displayPending:c._displayPending,parentRouteId:f}},[c._displayPending,c.routeId,c.ssr,r.routesById])})});function XT({router:e,matchId:t,resetKey:r,matchState:a}){const o=e.routesById[a.routeId],c=o.options.pendingComponent??e.options.defaultPendingComponent,u=c?k.jsx(c,{}):null,f=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))?re.Suspense:ti,b=f?vh:ti,w=m?KT:ti;return k.jsxs(o.isRoot?o.options.shellComponent??ti:ti,{children:[k.jsx(Fc.Provider,{value:t,children:k.jsx(g,{fallback:u,children:k.jsx(b,{getResetKey:()=>r,errorComponent:f||bh,onCatch:(_,R)=>{if(Ot(_))throw _.routeId??=a.routeId,_;p?.(_,R)},children:k.jsx(w,{fallback:_=>{if(_.routeId??=a.routeId,!m||_.routeId&&_.routeId!==a.routeId||!_.routeId&&
12!o.isRoot)throw _;return re.createElement(m,_)},children:y||a._displayPending?k.jsx(gT,{fallback:u,children:k.jsx(pv,{matchId:t})}):k.jsx(pv,{matchId:t})})})})}),a.parentRouteId===ra?k.jsxs(k.Fragment,{children:[k.jsx(ZT,{resetKey:r}),e.options.scrollRestoration&&x0?k.jsx(JT,{}):null]}):null]})}function ZT({resetKey:e}){const t=Bt(),r=re.useRef(void 0);return go(()=>{const a=t.latestLocation.href;(r.current===void 0||r.current!==a)&&(t.emit({type:"onRendered",...oi(t.stores.location.get(),t.stores.resolvedLocation.get())}),r.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var pv=re.memo(function({matchId:t}){const r=Bt(),a=(y,g)=>r.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],o=r.stores.matchStores.get(t);o||dn();const c=gt(o,y=>y),u=c.routeId,f=r.routesById[u],p=re.useMemo(()=>{const y=(r.routesById[u].options.remountDeps??r.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,r.options.defaultRemountDeps,r.routesById]),m=re.useMemo(()=>{const y=f.options.component??r.options.defaultComponent;return y?k.jsx(y,{},p):k.jsx(kb,{})},[p,f.options.component,r.options.defaultComponent]);if(c._displayPending)throw a(c,"displayPendingPromise");if(c._forcePending)throw a(c,"minPendingPromise");if(c.status==="pending"){const y=f.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const g=r.getMatch(c.id);if(g&&!g._nonReactive.minPendingPromise){const b=aa();g._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw a(c,"loadPromise")}if(c.status==="notFound")return Ot(c.error)||dn(),Cb(r,f,c.error);if(c.status==="redirected")throw un(c.error)||dn(),a(c,"loadPromise");if(c.status==="error")throw c.error;return m}),kb=re.memo(function(){const t=Bt(),r=re.useContext(Fc);let a,o=!1,c;{const m=r?t.stores.matchStores.get(r):void 0;[a,o]=gt(m,y=>[y?.routeId,y?.globalNotFound??!1]),c=gt(t.stores.matchesId,y=>y[y.findIndex(g=>g===r)+1])}const u=a?t.routesById[a]:void 0,f=t.options.defaultPendingComponent?k.jsx(t.options.defaultPendingComponent,{}):null;if(o)return u||dn(),Cb(t,u,void 0);if(!c)return null;const p=k.jsx(Ob,{matchId:c});return a===ra?k.jsx(re.Suspense,{fallback:f,children:p}):p});function WT(){const e=Bt(),t=re.useRef({router:e,mounted:!1}),[r,a]=re.useState(!1),o=gt(e.stores.isLoading,g=>g),c=gt(e.stores.hasPending,g=>g),u=xf(o),f=o||r||c,p=xf(f),m=o||c,y=xf(m);return e.startTransition=g=>{a(!0),re.startTransition(()=>{g(),a(!1)})},re.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 vs(e.latestLocation.publicHref)!==vs(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),go(()=>{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]),go(()=>{u&&!o&&e.emit({type:"onLoad",...oi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,e,o]),go(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...oi(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,y,e]),go(()=>{if(p&&!f){const g=oi(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...g}),bb(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),g.hrefChanged&&u1(e)}},[f,p,e]),null}function eA(){const e=Bt(),t=e.routesById[ra].options.pendingComponent??e.options.defaultPendingComponent,r=t?k.jsx(t,{}):null,a=k.jsxs(typeof document<"u"&&e.ssr?ti:re.Suspense,{fallback:r,children:[k.jsx(WT,{}),k.jsx(tA,{})]});return e.options.InnerWrap?k.jsx(e.options.InnerWrap,{children:a}):a}function tA(){const e=Bt(),t=gt(e.stores.firstId,o=>o),r=gt(e.stores.loadedAt,o=>o),a=t?k.jsx(Ob,{matchId:t}):null;return k.jsx(Fc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:k.jsx(vh,{getResetKey:()=>r,errorComponent:bh,onCatch:void 0,children:a})})}var nA=e=>({createMutableStore:cv,createReadonlyStore:cv,batch:bb}),rA=e=>new sA(e),sA=class extends XE{constructor(e){super(e,nA)}};function aA({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const a=k.jsx(yb.Provider,{value:e,children:t});return e.options.Wrap?k.jsx(e.options.Wrap,{children:a}):a}function iA({router:e,...t}){return k.jsx(aA,{router:e,...t,children:k.jsx(eA,{})})}function jb(e){const{attrs:t,children:r,nonce:a}=e;switch(e.tag){case"title":return k.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return k.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return k.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,k.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:a});case"script":return k.jsx(oA,{attrs:t,children:r});default:return null}}function oA({attrs:e,children:t}){Bt();const r=wh(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(re.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,f]of Object.entries(e))u!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(u,typeof f=="boolean"?"":String(f));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(f=>{if(!(f instanceof HTMLScriptElement))return!1;const p=f.getAttribute("type")??"text/javascript",m=f.getAttribute("nonce")??void 0;return f.textContent===t&&p===o&&m===c}))return;const u=document.createElement("script");
12if(u.textContent=t,e)for(const[f,p]of Object.entries(e))f!=="suppressHydrationWarning"&&p!==void 0&&p!==!1&&u.setAttribute(f,typeof p=="boolean"?"":String(p));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[e,t,a]),a&&typeof t=="string")return k.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return k.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return k.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var lA=e=>{const t=Bt(),r=t.options.ssr?.nonce,a=gt(t.stores.matches,m=>m.map(y=>y.meta).filter(Boolean),ln),o=re.useMemo(()=>{const m=[],y={};let g;for(let b=a.length-1;b>=0;b--){const w=a[b];for(let _=w.length-1;_>=0;_--){const R=w[_];if(R)if(R.title)g||(g={tag:"title",children:R.title});else if("script:ld+json"in R)try{const E=JSON.stringify(R["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:cE(E)})}catch{}else{const E=R.name??R.property;if(E){if(y[E])continue;y[E]=!0}m.push({tag:"meta",attrs:{...R,nonce:r}})}}}return g&&m.push(g),r&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),m.reverse(),m},[a,r]),c=gt(t.stores.matches,m=>{const y=m.map(w=>w.links).filter(Boolean).flat(1).map(w=>({tag:"link",attrs:{...w,nonce:r}})),g=t.ssr?.manifest,b=m.map(w=>g?.routes[w.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(w=>w.tag==="link"?l1(g,w)?[]:[{tag:"link",attrs:{...w.attrs,crossOrigin:Ky(e,"stylesheet")??w.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}]:w.tag==="style"?[{tag:"style",attrs:{...w.attrs,nonce:r},children:w.children,...w.inlineCss?{inlineCss:!0}:{}}]:[]);return[...y,...b]},ln),u=gt(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 w=i1(b);y.push({tag:"link",attrs:{rel:"modulepreload",href:w.href,crossOrigin:Ky(e,"modulepreload")??w.crossOrigin,nonce:r}})})),y}
12,ln),f=gt(t.stores.matches,m=>m.map(y=>y.styles).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"style",attrs:{...g,nonce:r},children:y})),ln),p=gt(t.stores.matches,m=>m.map(y=>y.headScripts).flat(1).filter(Boolean).map(({children:y,...g})=>({tag:"script",attrs:{...g,nonce:r},children:y})),ln);return cA([...o,...u,...c,...f,...p],m=>JSON.stringify(m))};function cA(e,t){const r=new Set;return e.filter(a=>{const o=t(a);return r.has(o)?!1:(r.add(o),!0)})}function uA(e){const t=lA(e.assetCrossOrigin),r=Bt().options.ssr?.nonce;return k.jsx(k.Fragment,{children:t.map(a=>re.createElement(jb,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:r}))})}var dA=()=>{const e=Bt(),t=e.options.ssr?.nonce,r=c=>{const u=[],f=e.ssr?.manifest;return f?(c.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>f.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,...f})=>({tag:"script",attrs:{...f,suppressHydrationWarning:!0,nonce:t},children:u})),o=gt(e.stores.matches,r,ln);return fA(e,gt(e.stores.matches,a,ln),o)};function fA(e,t,r){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const o=[...t,...r];return a&&o.unshift(a),k.jsx(k.Fragment,{children:o.map((c,u)=>re.createElement(jb,{...c,key:`tsr-scripts-${c.tag}-${u}`}))})}var ta=(e,t)=>{const r={type:"request",...t||e};return{options:r,middleware:a=>ta({},Object.assign(r,{middleware:a})),inputValidator:a=>ta({},Object.assign(r,{inputValidator:a})),client:a=>ta({},Object.assign(r,{client:a})),server:a=>ta({},Object.assign(r,{server:a}))}};
12function Lb(e,t){for(let r=0,a=t.length;r<a;r++){const o=t[r];e.has(o)||(e.add(o),o.extends&&Lb(e,o.extends))}}var hA=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const r=new Set;Lb(r,t.serializationAdapters),t.serializationAdapters=Array.from(r)}return t},createMiddleware:ta}),mv=function(){return mv=Object.assign||function(t){for(var r,a=1,o=arguments.length;a<o;a++){r=arguments[a];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(t[c]=r[c])}return t},mv.apply(this,arguments)};function Kc(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[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])&&(r[a[o]]=e[a[o]]);return r}function pA(e,t,r,a){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function f(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(f,p)}m((a=a.apply(e,t||[])).next())})}function qM(e,t,r){if(r||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 mA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class _h extends Error{constructor(t,r="FunctionsError",a){super(t),this.name=r,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class gA extends _h{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class gv extends _h{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class yv extends _h{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Yf;(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"})(Yf||(Yf={}));class yA{constructor(t,{headers:r={},customFetch:a,region:o=Yf.Any}={}){this.url=t,this.headers=r,this.region=o,this.fetch=mA(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return pA(this,arguments,void 0,function*(r,a={}){var o;let c,u;try{const{headers:f,method:p,body:m,signal:y,timeout:g}=a;let b={},{region:w}=a;w||(w=this.region);const _=new URL(`${this.url}/${r}`);w&&w!=="any"&&(b["x-region"]=w,_.searchParams.set("forceFunctionRegion",w));let R;const E=!!f&&Object.keys(f).some(q=>q.toLowerCase()==="content-type");m&&!E?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",R=m):typeof m=="string"?(b["Content-Type"]="text/plain",R=m):typeof FormData<"u"&&m instanceof FormData?R=m:(b["Content-Type"]="application/json",R=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?R=JSON.stringify(m):R=m;let x=y;g&&(u=new AbortController,c=setTimeout(()=>u.abort(),g),y?(x=u.signal,y.addEventListener("abort",()=>u.abort())):x=u.signal);const j=yield this.fetch(_.toString(),{method:p||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),f),body:R,signal:x}).catch(q=>{throw new gA(q)}),N=j.headers.get("x-relay-error");if(N&&N==="true")throw new gv(j);if(!j.ok)throw new yv(j);let P=((o=j.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),J;return P==="application/json"?J=yield j.json():P==="application/octet-stream"||P==="application/pdf"?J=yield j.blob():P==="text/event-stream"?J=j:P==="multipart/form-data"?J=yield j.formData():J=yield j.text(),{data:J,error:null,response:j}}catch(f){return{data:null,error:f,response:f instanceof yv||f instanceof gv?f.context:void 0}}finally{c&&clearTimeout(c)}})}}const Nb=3,vv=e=>Math.min(1e3*2**e,3e4),vA=[520,503],Db=["GET","HEAD","OPTIONS"];
12var bv=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function wv(e,t){return new Promise(r=>{if(t?.aborted){r();return}const a=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e);function o(){clearTimeout(a),r()}t?.addEventListener("abort",o)})}function bA(e,t,r,a){return!(!a||r>=Nb||!Db.includes(e)||!vA.includes(t))}var wA=class{constructor(e){var t,r,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=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!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 r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const 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={};r.headers.forEach((g,b)=>{m[b]=g}),u>0&&(m["X-Retry-Count"]=String(u));let y;try{y=await a(r.url.toString(),{method:r.method,headers:m,body:JSON.stringify(r.body,(g,b)=>typeof b=="bigint"?b.toString():b),signal:r.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!Db.includes(r.method))throw g;if(r.retryEnabled&&u<Nb){const b=vv(u);u++,await wv(b,r.signal);continue}throw g}if(bA(r.method,y.status,u,r.retryEnabled)){var f,p;const g=(f=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&f!==void 0?f:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:vv(u);await y.text(),u++,await wv(b,r.signal);continue}return await r.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var f;let p="",m="",y="";const g=u?.cause;if(g){var b,w,_,R;const j=(b=g?.message)!==null&&b!==void 0?b:"",N=(w=g?.code)!==null&&w!==void 0?w:"";p=`${(_=u?.name)!==null&&_!==void 0?_:"FetchError"}: ${u?.message}`,p+=` 13 14Caused by: ${(R=g?.name)!==null&&R!==void 0?R:"Error"}: ${j}`,N&&(p+=` (${N})`),g?.stack&&(p+=` 15${g.stack}`)}else{var E;p=(E=u?.stack)!==null&&E!==void 0?E:""}const x=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${x} 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)",x>this.urlLengthLimit&&(m+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(f=u?.name)!==null&&f!==void 0?f:"FetchError"}: ${u?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}}
15)),c.then(e,t)}async processResponse(e){var t=this;let r=null,a=null,o=null,c=e.status,u=e.statusText;if(e.ok){var f,p;if(t.method!=="HEAD"){var m;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")a=b;else if(t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(r={message:b},a=null,t.shouldThrowOnError)throw new bv({message:b,details:"",hint:"",code:""})}}const y=(f=t.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),g=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");y&&g&&g.length>1&&(o=parseInt(g[1])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(r={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{r=JSON.parse(y),Array.isArray(r)&&e.status===404&&(a=[],r=null,c=200,u="OK")}catch{e.status===404&&y===""?(c=204,u="No Content"):r={message:y}}if(r&&t.shouldThrowOnError)throw new bv(r)}return{success:r===null,error:r,data:a,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},_A=class extends wA{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,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"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:a=r}={}){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:r=!1,buffers:a=!1,wal:o=!1,format:c="text"}={}){var u;const f=[e?"analyze":null,t?"verbose":null,r?"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=${f};`),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 ni=class extends _A{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(a=>
15typeof a=="string"&&_v.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(a=>typeof a=="string"&&_v.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),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:r,type:a}={}){let o="";a==="plain"?o="pl":a==="phrase"?o="ph":a==="websearch"&&(o="w");const c=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${o}fts${c}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const a=r?`${r}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},SA=class{constructor(e,{headers:t={},schema:r,fetch:a,urlLengthLimit:o=8e3,retry:c}){this.url=e,this.headers=new Headers(t),this.schema=r,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:r=!1,count:a}=t??{},o=r?"HEAD":"GET";let c=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:f,headers:p}=this.cloneRequestState();return f.searchParams.set("select",u),a&&p.append("Prefer",`count=${a}`),new ni({method:o,url:f,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var a;const o="POST",{url:c,headers:u}=this.cloneRequestState();
15if(t&&u.append("Prefer",`count=${t}`),r||u.append("Prefer","missing=default"),Array.isArray(e)){const f=e.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(f.length>0){const p=[...new Set(f)].map(m=>`"${m}"`);c.searchParams.set("columns",p.join(","))}}return new ni({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:r=!1,count:a,defaultToNull:o=!0}={}){var c;const u="POST",{url:f,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&f.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}"`);f.searchParams.set("columns",y.join(","))}}return new ni({method:u,url:f,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 r;const a="PATCH",{url:o,headers:c}=this.cloneRequestState();return t&&c.append("Prefer",`count=${t}`),new ni({method:a,url:o,headers:c,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:a,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new ni({method:r,url:a,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ao(e){"@babel/helpers - typeof";return Ao=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},Ao(e)}function EA(e,t){if(Ao(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Ao(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xA(e){var t=EA(e,"string");return Ao(t)=="symbol"?t:t+""}function RA(e,t,r){return(t=xA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function sc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sv(Object(r),!0).forEach(function(a){RA(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var TA=class Mb{constructor(t,{headers:r={},schema:a,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:f}={}){this.url=t,this.headers=new Headers(r),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),w=y?.signal;if(w){if(w.aborted)return clearTimeout(b),p(m,y);const _=()=>{clearTimeout(b),g.abort()};return w.addEventListener("abort",_,{once:!0}),p(m,sc(sc({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",_)})}return p(m,sc(sc({},y),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=p,this.retry=f}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new SA(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 Mb(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:a=!1,get:o=!1,count:c}={}){var u;let f;const p=new URL(`${this.url}/rpc/${t}`);let m;const y=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(y)),g=a&&Object.values(r).some(y);g?(f="POST",m=r):a||o?(f=a?"HEAD":"GET",Object.entries(r).filter(([w,_])=>_!==void 0).map(([w,_])=>[w,Array.isArray(_)?`{${_.join(",")}}`:`${_}
15`]).forEach(([w,_])=>{p.searchParams.append(w,_)})):(f="POST",m=r);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 ni({method:f,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 AA{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((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)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 16 17Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const CA="2.110.7",OA=`realtime-js/${CA}`,kA="1.0.0",Pb="2.0.0",jA=Pb,LA=1e4,NA=100,hs={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Ub={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Qf={connecting:"connecting",closing:"closing",closed:"closed"};class DA{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,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,a;const o=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var r,a;const o=(a=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&a!==void 0?a:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,r,a){var o,c;const u=new TextEncoder,f=u.encode(t.topic),p=u.encode((o=t.ref)!==null&&o!==void 0?o:""),m=u.encode((c=t.join_ref)!==null&&c!==void 0?c:""),y=u.encode(t.payload.event),g=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},b=u.encode(Object.keys(g).length===0?"":JSON.stringify(g));if(m.length>255)throw new Error(`joinRef length ${m.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`ref length ${p.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`topic length ${f.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`userEvent length ${y.length} exceeds maximum of 255`);if(b.length>255)throw new Error(`metadata length ${b.length} exceeds maximum of 255`);const w=this.USER_BROADCAST_PUSH_META_LENGTH+m.length+p.length+f.length+y.length+b.length,_=new ArrayBuffer(this.HEADER_LENGTH+w),R=new DataView(_),E=new Uint8Array(_);let x=0;R.setUint8(x++,this.KINDS.userBroadcastPush),R.setUint8(x++,m.length),R.setUint8(x++,p.length),R.setUint8(x++,f.length),R.setUint8(x++,y.length),R.setUint8(x++,b.length),R.setUint8(x++,r),E.set(m,x),x+=m.length,E.set(p,x),x+=p.length,E.set(f,x),x+=f.length,E.set(y,x),x+=y.length,E.set(b,x),x+=b.length;var j=new Uint8Array(_.byteLength+a.byteLength);return j.set(new Uint8Array(_),0),j.set(new Uint8Array(a),_.byteLength),j.buffer}decode(t,r){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return r(a)}if(typeof t=="string"){const a=JSON.parse(t),[o,c,u,f,p]=a;return r({join_ref:o,ref:c,topic:u,event:f,payload:p})}return r({})}_binaryDecode(t){const r=new DataView(t),a=r.getUint8(0),o=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,r,o)}_decodeUserBroadcast(t,r,a){const o=r.getUint8(1),c=r.getUint8(2),u=r.getUint8(3),f=r.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),w=f===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,_={type:this.BROADCAST_EVENT,event:y,payload:w};return u>0&&(_.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:_}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t?.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>r.includes(a)))}}var Je;(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"})(Je||(Je={}));const Ev=(e,t,r={})=>{var a;const o=(a=r.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((c,u)=>(c[u]=MA(u,e,t,o),c),{}):{}},MA=(e,t,r,a)=>{const o=t.find(f=>f.name===e),c=o?.type,u=r[e];return c&&!a.includes(c)?zb(c,u):Jf(u)},zb=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return BA(t,r)}switch(e){case Je.bool:return PA(t);case Je.float4:case Je.float8:case Je.int2:case Je.int4:case Je.int8:case Je.numeric:case Je.oid:return UA(t);case Je.json:case Je.jsonb:return zA(t);case Je.timestamp:return IA(t);case Je.abstime:case Je.date:case Je.daterange:case Je.int4range:case Je.int8range:case Je.money:case Je.reltime:case Je.text:case Je.time:case Je.timestamptz:case Je.timetz:case Je.tsrange:case Je.tstzrange:return Jf(t);default:return Jf(t)}},Jf=e=>e,PA=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},UA=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 4,780 bytes, line 17
17if(!Number.isNaN(t))return t}return e},zA=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},BA=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,a=e[r];if(e[0]==="{"&&a==="}"){let c;const u=e.slice(1,r);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(f=>zb(t,f))}return e},IA=e=>typeof e=="string"?e.replace(" ","T"):e,Bb=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 ui=e=>typeof e=="function"?e:function(){return e},$A=typeof self<"u"?self:null,ri=typeof window<"u"?window:null,rr=$A||ri||globalThis,HA="2.0.0",qA=1e4,VA=1e3,GA=100,ar={connecting:0,open:1,closing:2,closed:3},an={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},jr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Xf={longpoll:"longpoll",websocket:"websocket"},FA={complete:4},Zf="base64url.bearer.phx.",ac=class{constructor(e,t,r,a){this.channel=e,this.event=t,this.payload=r||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()}matchReceive({status:e,response:t,_ref:r}){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})}},Ib=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))}},KA=class{constructor(e,t,r){this.state=an.closed,this.topic=e,this.params=ui(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ac(this,jr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Ib(()=>{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=an.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=an.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=an.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=an.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 ac(this,jr.leave,ui({}),this.timeout).send(),this.state=an.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(jr.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}
vendor: 18,220 bytes, lines 17-18
17teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=an.closed,this.bindings=[]}onClose(e){this.on(jr.close,e)}onError(e){return this.on(jr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=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 ac(this,e,function(){return t},r);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=an.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(jr.close,"leave")},r=new ac(this,jr.leave,ui({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,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:r,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=an.joining,this.joinPush.resend(e))}trigger(e,t,r,a){let o=this.onMessage(e,t,r,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,r));for(let u=0;u<c.length;u++)c[u].callback(o,r,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===an.closed}isErrored(){return this.state===an.errored}isJoined(){return this.state===an.joined}isJoining(){return this.state===an.joining}isLeaving(){return this.state===an.leaving}},Oc=class{static request(e,t,r,a,o,c,u){if(rr.XDomainRequest){let f=new rr.XDomainRequest;return this.xdomainRequest(f,e,t,a,o,c,u)}else if(rr.XMLHttpRequest){let f=new rr.XMLHttpRequest;return this.xhrRequest(f,e,t,r,a,o,c,u)}else{if(rr.fetch&&rr.AbortController)return this.fetchRequest(e,t,r,a,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,a,o,c,u){let f={method:e,headers:r,body:a},p=null;return o&&(p=new AbortController,setTimeout(()=>p.abort(),o),f.signal=p.signal),rr.fetch(t,f).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,r,a,o,c,u){return e.timeout=o,e.open(t,r),e.onload=()=>{let f=this.parseJSON(e.responseText);u&&u(f)},c&&(e.ontimeout=c),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,r,a,o,c,u,f){e.open(t,r,!0),e.timeout=c;for(let[p,m]of Object.entries(a))e.setRequestHeader(p,m);return e.onerror=()=>f&&f(null),e.onreadystatechange=()=>{if(e.readyState===FA.complete&&f){let p=this.parseJSON(e.responseText);f(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 r=[];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"?r.push(this.serialize(c,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},YA=e=>{let t="",r=new Uint8Array(e),a=r.byteLength;for(let o=0;o<a;o++)t+=String.fromCharCode(r[o]);return btoa(t)},Xa=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Zf)&&(this.authToken=atob(t[1].slice(Zf.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=ar.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Xf.websocket),"$1/"+Xf.longpoll)}endpointURL(){return Oc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=ar.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ar.open||this.readyState===ar.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:r,token:a,messages:o}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else r=0;switch(r){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ar.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=YA(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,t=0){this.awaitingBatchAck=!0;const r=t+GA,a=e.slice(t,r);this.ajax("POST",{"Content-Type":"application/x-ndjson"},a.join(` 18`),()=>this.onerror("timeout"),o=>{!o||o.status!==200?(this.awaitingBatchAck=!1,this.onerror(o&&o.status),this.closeAndRetry(1011,"internal server error",!1)):r<e.length?this.batchSend(e,r):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,r){for(let o of this.reqs)o.abort();this.readyState=ar.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,r,a,o){let c,u=()=>{this.reqs.delete(c),a()};c=Oc.request(e,this.endpointURL(),t,r,this.timeout,u,f=>{this.reqs.delete(c),this.isActive()&&o(f)}),this.reqs.add(c)}},QA=class yo{constructor(t,r={}){let a=r.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),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:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=yo.syncState(this.state,o,c,u),this.pendingDiffs.forEach(p=>{this.state=yo.syncDiff(this.state,p,c,u)}),this.pendingDiffs=[],f()}),this.channel.on(a.diff,o=>{let{onJoin:c,onLeave:u,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=yo.syncDiff(this.state,o,c,u),f())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return yo.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,a,o){let c=this.toNullProtoObj(this.clone(t));r=this.toNullProtoObj(r);let u=Object.create(null),f=Object.create(null);return this.map(c,(p,m)=>{r[p]||(f[p]=m)}),this.map(r,(p,m)=>{let y=c[p];if(y){let g=m.metas.map(R=>R.phx_ref),b=y.metas.map(R=>R.phx_ref),w=m.metas.filter(R=>b.indexOf(R.phx_ref)<0),_=y.metas.filter(R=>g.indexOf(R.phx_ref)<0);w.length>0&&(u[p]=m,u[p].metas=w),_.length>0&&(f[p]=this.clone(y),f[p].metas=_)}else u[p]=m}),this.syncDiff(c,{joins:u,leaves:f},a,o)}static syncDiff(t,r,a,o){t=this.toNullProtoObj(t);let{joins:c,leaves:u}=this.clone(r);return a||(a=function(){}),o||(o=function(){}),this.map(c,(f,p)=>{let m=t[f];if(t[f]=this.clone(p),m){let y=t[f].metas.map(b=>b.phx_ref),g=m.metas.filter(b=>y.indexOf(b.phx_ref)<0);t[f].metas.unshift(...g)}a(f,m,p)}),this.map(u,(f,p)=>{let m=t[f];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(f,m,p),m.metas.length===0&&delete t[f]}),t}static list(t,r){return r||(r=function(a,o){return o}),this.map(t,(a,o)=>r(a,o))}static map(t,r){return Object.getOwnPropertyNames(t).map(a=>r(a,t[a]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let r=Object.create(null);return Object.getOwnPropertyNames(t).forEach(a=>{r[a]=t[a]}),r}static clone(t){return JSON.parse(JSON.stringify(t))}},ic={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 r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,a,o,c,u]=JSON.parse(e);return t({join_ref:r,ref:a,topic:o,event:c,payload:u})}},binaryEncode(e){let{join_ref:t,ref:r,event:a,topic:o,payload:c}=e,u=new TextEncoder,f=u.encode(t),p=u.encode(r),m=u.encode(o),y=u.encode(a);this.assertFieldSize(f.byteLength,"join_ref"),this.assertFieldSize(p.byteLength,"ref"),this.assertFieldSize(m.byteLength,"topic"),this.assertFieldSize(y.byteLength,"event");let g=this.META_LENGTH+f.byteLength+p.byteLength+m.byteLength+y.byteLength,b=new ArrayBuffer(this.HEADER_LENGTH+g),w=new Uint8Array(b),_=new DataView(b),R=0;_.setUint8(R++,this.KINDS.push),_.setUint8(R++,f.byteLength),_.setUint8(R++,p.byteLength),_.setUint8(R++,m.byteLength),_.setUint8(R++,y.byteLength),w.set(f,R),R+=f.byteLength,w.set(p,R),R+=p.byteLength,w.set(m,R),R+=m.byteLength,w.set(y,R),R+=y.byteLength;var E=new Uint8Array(b.byteLength+c.byteLength);return E.set(w,0),E.set(new Uint8Array(c),b.byteLength),E.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),a=new TextDecoder;switch(r){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,r){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,f=r.decode(e.slice(u,u+a));u=u+a;let p=r.decode(e.slice(u,u+o));u=u+o;let m=r.decode(e.slice(u,u+c));u=u+c;let y=e.slice(u,e.byteLength);return{join_ref:f,ref:null,topic:p,event:m,payload:y}},decodeReply(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=t.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(e.slice(f,f+a));f=f+a;let m=r.decode(e.slice(f,f+o));f=f+o;let y=r.decode(e.slice(f,f+c));f=f+c;let g=r.decode(e.slice(f,f+u));f=f+u;let b=e.slice(f,e.byteLength),w={status:g,response:b};return{join_ref:p,ref:m,topic:y,event:jr.reply,payload:w}},decodeBroadcast(e,t,r){let a=t.getUint8(1),o=t.getUint8(2),c=this.HEADER_LENGTH+2,u=r.decode(e.slice(c,c+a));c=c+a;let f=r.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:f,payload:p}}},JA=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||qA,this.transport=t.transport||rr.WebSocket||Xa,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=rr&&rr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=ic.encode.bind(ic),this.defaultDecoder=ic.decode.bind(ic),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!==Xa?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;ri&&ri.addEventListener&&(ri.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),a=this.connectClock)}),ri.addEventListener("pageshow",o=>{a===this.connectClock&&(a=null,this.connect())}),ri.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=ui(t.params||{}),this.endPoint=`${e}/${Xf.websocket}`,this.vsn=t.vsn||HA,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Ib(()=>{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&&ui(t.authToken)}getLongPollTransport(){return Xa}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,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ui(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Xa?this.connectWithFallback(Xa,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}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(),r=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()-r))});return!0}transportName(e){return e===Xa?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Zf}${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 r=!1,a=!0,o,c,u=this.transportName(e),f=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 f("memorized");this.fallbackTimer=setTimeout(f,t),c=this.onError(p=>{this.log("transport","error",p),a&&!r&&(clearTimeout(this.fallbackTimer),f(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!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(f,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(),VA,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,r||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 4,876 bytes, line 18
18,this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===ar.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}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,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(jr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case ar.connecting:return"connecting";case ar.open:return"open";case ar.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(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new KA(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:a,ref:o,join_ref:c}=e;this.log("push",`${t} ${r} (${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:r,event:a,payload:o,ref:c,join_ref:u}=t;if(c&&c===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",f)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${r} ${a} ${c&&"("+c+")"||""}`.trim(),o);for(let f=0;f<this.channels.length;f++){const p=this.channels[f];p.isMember(r,a,o,u)&&p.trigger(a,o,c,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,a])=>{try{a(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class wo{constructor(t,r){const a=ZA(r);this.presence=new QA(t.getChannel(),a),this.presence.onJoin((o,c,u)=>{const f=wo.onJoinPayload(o,c,u);t.getChannel().trigger("presence",f)}),this.presence.onLeave((o,c,u)=>{const f=wo.onLeavePayload(o,c,u);t.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return wo.transformState(this.presence.state)}static transformState(t){return t=XA(t),Object.getOwnPropertyNames(t).reduce((r,a)=>{const o=t[a];return r[a]=_c(o),r},{})}static onJoinPayload(t,r,a){const o=xv(r),c=_c(a);return{event:"join",key:t,currentPresences:o,newPresences:c}}static onLeavePayload(t,r,a){const o=xv(r),c=_c(a);return{event:"leave",key:t,currentPresences:o,leftPresences:c}}}function _c(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function XA(e){return JSON.parse(JSON.stringify(e))}function ZA(e){return e?.events&&{events:e.events}}function xv(e){return e?.metas?_c(e):[]}var Rv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Rv||(Rv={}));class WA{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new wo(this.channel.channelAdapter,r)}}function eC(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
18if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class tC{constructor(t,r,a){const o=nC(a);this.channel=t.getSocket().channel(r,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,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}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,r,a){let o;try{o=this.channel.push(t,r,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>NA){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 r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===hs.joined}isJoined(){return this.state===hs.joined}isJoining(){return this.state===hs.joining}isClosed(){return this.state===hs.closed}isLeaving(){return this.state===hs.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function nC(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const rC=/[,()"\\]/,sC=e=>rC.test(e)||e!==e.trim(),aC=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Tv=e=>{const t=e===null?"null":String(e);return sC(t)?aC(t):t},iC=e=>e===null?"null":String(e),oC=(e,t)=>{if(e==="in"){const r=Array.isArray(t)?t:[t];if(r.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(r)).map(o=>Tv(o)).join(",")})`}return e==="is"?`is.${iC(t)}`:`${e}.${Tv(t)}`};class lC{constructor(){this.filters=[]}add(t,r,a,o=!1){const c=o?"not.":"";return this.filters.push(`${t}=${c}${oC(r,a)}`),this}eq(t,r){return this.add(t,"eq",r)}neq(t,r){return this.add(t,"neq",r)}gt(t,r){return this.add(t,"gt",r)}gte(t,r){return this.add(t,"gte",r)}lt(t,r){return this.add(t,"lt",r)}lte(t,r){return this.add(t,"lte",r)}in(t,r){return this.add(t,"in",r)}like(t,r){return this.add(t,"like",r)}ilike(t,r){return this.add(t,"ilike",r)}match(t,r){return this.add(t,"match",r)}imatch(t,r){return this.add(t,"imatch",r)}is(t,r){return this.add(t,"is",r)}isDistinct(t,r){return this.add(t,"isdistinct",r)}not(t,r,a){return this.add(t,r,a,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Av;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Av||(Av={}));var ii;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ii||(ii={}));var Lr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Lr||(Lr={}));class _o{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,r={config:{}},a){var o,c;if(this.topic=t,this.params=r,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},r.config),this.channelAdapter=new tC(this.socket.socketAdapter,t,this.params),this.presence=new WA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Bb(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((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,r=this.timeout){var a,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:f,private:p}}=this.params,m=(o=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(w=>w.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[ii.PRESENCE]&&this.bindings[ii.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({},f),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(w=>{t?.(Lr.CHANNEL_ERROR,eC(w))}),this._onClose(()=>t?.(Lr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){t?.(Lr.SUBSCRIBED);return}this._updatePostgresBindings(w,t)}).receive("error",w=>{this.state=hs.errored;const _=Object.values(w).join(", ")||"error";t?.(Lr.CHANNEL_ERROR,new Error(_,{cause:w}))}).receive("timeout",()=>{t?.(Lr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var a;const o=this.bindings.postgres_changes,c=(a=o?.length)!==null&&a!==void 0?a:0,u=[];for(let f=0;f<c;f++){const p=o[f],{filter:{event:m,schema:y,table:g,filter:b}}=p,w=t&&t[f];if(w&&w.event===m&&_o.isFilterValueEqual(w.schema,y)&&_o.isFilterValueEqual(w.table,g)&&_o.isFilterValueEqual(w.filter,b))u.push(Object.assign(Object.assign({},p),{id:w.id}));else{this.unsubscribe(),this.state=hs.errored,r?.(Lr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=hs.errored&&r&&r(Lr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,a){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=t===ii.PRESENCE||t===ii.PO
18STGRES_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,r,a)}async httpSend(t,r,a={}){var o;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c=r instanceof ArrayBuffer||ArrayBuffer.isView(r),u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":c?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f=new URL(this.broadcastEndpointURL);f.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&f.searchParams.set("private","true");const p={method:"POST",headers:u,body:c?r:JSON.stringify(r)},m=await this._fetchWithTimeout(f.toString(),p,(o=a.timeout)!==null&&o!==void 0?o:this.timeout);if(m.status===202)return{success:!0};if(m.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let y=m.statusText;try{const g=await m.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(t,r={}){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
18in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=t,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(a=r.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,f,p;const m=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(f=(u=this.params)===null||u===void 0?void 0:u.config)===null||f===void 0?void 0:f.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(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,a){const o=new AbortController,c=setTimeout(()=>o.abort(),a),u=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(c),u}_on(t,r,a){const o=t.toLocaleLowerCase(),c=r?.filter;(c instanceof lC||typeof c=="object"&&c!==null&&typeof c.build=="function")&&(r=Object.assign(Object.assign({},r),{filter:c.build()}));const u=this.channelAdapter.on(t,a),f={type:o,filter:r,callback:a,ref:u};return this.bindings[o]?this.bindings[o].push(f):this.bindings[o]=[f],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,a)=>{var o,c,u,f,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(w=>w.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const w=b.id,_=(c=b.filter)===null||c===void 0?void 0:c.event;return w&&((u=r.ids)===null||u===void 0?void 0:u.includes(w))&&(_==="*"||_?.toLocaleLowerCase()===((f=r.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const w=(m=(p=b?.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===((y=r?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,r){const{close:a,error:o,leave:c,join:u}=Ub;return r&&[a,o,c,u].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,a)=>{if(typeof r=="object"&&"ids"in r){const o=r.data,{schema:c,table:u,commit_timestamp:f,type:p,errors:m}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:f,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const a of t.bindings[r])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Ev(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Ev(t.columns,t.old_record)),r}}class cC{constructor(t,r){this.socket=new JA(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(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,r,a,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{t(),c("ok")},r,a)})}push(t){this.socket.push(t)}log(t,r,a){this.socket.log(t,r,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()==Qf.connecting}isDisconnecting(){return this.socket.connectionState()==Qf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Cv={HEARTBEAT_INTERVAL:25e3},uC=[1e3,2e3,5e3,1e4],dC=1e4;function fC(){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 r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function hC(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return fC()}const pC=` 19 addEventListener("message", (e) => { 20 if (e.data.event === "start") { 21 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 22 } 23 });`;class mC{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,r){var a;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
23,this.ref=0,this.serializer=new DA,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=r?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const o=this._initializeOptions(r);this.socketAdapter=new cC(t,o),this.httpEndpoint=Bb(t),this.fetch=this._resolveFetch(r?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async a=>{const o=await a.unsubscribe();return a.teardown(),o}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,a){this.socketAdapter.log(t,r,a)}connectionState(){return this.socketAdapter.connectionState()||Qf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const a=`realtime:${t}`,o=this.getChannels().find(c=>c.topic===a);if(o)return o;{const c=new _o(`realtime:${t}`,r,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(r=>r.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}
23this._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 r,a=!1;if(t)r=t,a=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),r=this.accessTokenValue}else r=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const c={access_token:r,version:OA};r&&o.updateJoinPayload(c),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(Ub.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,a)=>{r!=="disconnected"&&(r=="sent"&&this._setAuthSafely(),t&&t(r,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=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const a=new Blob([pC],{type:"application/javascript"});r=URL.createObjectURL(a)}return r}_initializeOptions(t){var r,a,o,c,u,f,p,m,y,g,b,w;this.worker=(r=t?.worker)!==null&&r!==void 0?r:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const _={};_.timeout=(o=t?.timeout)!==null&&o!==void 0?o:LA,_.heartbeatIntervalMs=(c=t?.heartbeatIntervalMs)!==null&&c!==void 0?c:Cv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((f=t?.heartbeatIntervalMs)!==null&&f!==void 0?f:Cv.HEARTBEAT_INTERVAL),_.transport=(p=t?.transport)!==null&&p!==void 0?p:AA.getWebSocketConstructor(),_.params=t?.params,_.logger=t?.logger,_.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),_.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:hC(),_.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(j=>uC[j-1]||dC);let R,E;const x=(g=t?.vsn)!==null&&g!==void 0?g:jA;switch(x){case kA:R=(j,N)=>N(JSON.stringify(j)),E=(j,N)=>N(JSON.parse(j));break;case Pb:R=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${_.vsn}`)}if(_.vsn=x,_.encode=(b=t?.encode)!==null&&b!==void 0?b:R,_.decode=(w=t?.decode)!==null&&w!==void 0?w:E,_.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,_.params=Object.assign(Object.assign({},_.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,_.autoSendHeartbeat=!this.worker}return _}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 4,863 bytes, line 23
23var Co=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 gC(e,t,r){const a=new URL(t,e);if(r)for(const[o,c]of Object.entries(r))c!==void 0&&a.searchParams.set(o,c);return a.toString()}async function yC(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 vC(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:a,query:o,body:c,headers:u}){const f=gC(e.baseUrl,a,o),p=await yC(e.auth),m=await t(f,{method:r,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 w=g?b:void 0,_=w?.error;throw new Co(_?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:_?.type,icebergCode:_?.code,details:w})}return{status:m.status,headers:m.headers,data:b}}}}function oc(e){return e.join("�")}var bC=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:oc(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 r={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${oc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${oc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${oc(e.namespace)}`}),!0}catch(t){if(t instanceof Co&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Co&&r.status===409)return;throw r}}};function Za(e){return e.join("�")}var wC=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Za(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Za(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Za(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Za(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/${Za(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/${Za(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Co&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Co&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},_C=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=vC({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new bC(this.client,t),this.tableOps=new wC(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)}
23async 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 Oo(e){"@babel/helpers - typeof";return Oo=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},Oo(e)}function SC(e,t){if(Oo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Oo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EC(e){var t=SC(e,"string");return Oo(t)=="symbol"?t:t+""}function xC(e,t,r){return(t=EC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ov(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ov(Object(r),!0).forEach(function(a){xC(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ov(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var Yc=class extends Error{constructor(e,t="storage",r,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Qc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Wf=class extends Yc{constructor(e,t,r,a="storage"){super(e,a,t,r),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return ve({},super.toJSON())}},$b=class extends Yc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function kc(e,t,r){const a=ve({},e),o=t.toLowerCase();for(const c of Object.keys(a))c.toLowerCase()===o&&delete a[c];return a[o]=r,a}function RC(e){const t={};for(const[r,a]of Object.entries(e))t[r.toLowerCase()]=a;return t}const TC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),AC=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)},eh=e=>{if(Array.isArray(e))return e.map(r=>eh(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,a])=>{const o=r.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));t[o]=eh(a)}),t},CC=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),kv=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 r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},OC=async(e,t,r,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 f=u?.statusCode||u?.code||c+"";t(new Wf(kv(u),c,f,a))}).catch(()=>{const u=c+"";t(new Wf(o.statusText||`HTTP ${c} error`,c,u,a))})}else t(new $b(kv(e),e,a))},kC=(e,t,r,a)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return ve(ve({},o),r);if(AC(a)){var c;const u=t?.headers||{};let f;for(const[p,m]of Object.entries(u))p.toLowerCase()==="content-type"&&(f=m);o.headers=kc(u,"Content-Type",(c=f)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(a)}else o.body=a;return t?.duplex&&(o.duplex=t.duplex),ve(ve({},o),r)};async function po(e,t,r,a,o,c,u){return new Promise((f,p)=>{e(r,kC(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=>f(m)).catch(m=>OC(m,p,a,u))})}function Hb(e="storage"){return{get:async(t,r,a,o)=>po(t,"GET",r,a,o,void 0,e),post:async(t,r,a,o,c)=>po(t,"POST",r,o,c,a,e),put:async(t,r,a,o,c)=>po(t,"PUT",r,o,c,a,e),head:async(t,r,a,o)=>po(t,"HEAD",r,ve(ve({},a),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,r,a,o,c)=>po(t,"DELETE",r,o,c,a,e)}}const jC=Hb("storage"),{get:ko,post:qn,put:th,head:LC,remove:jo}=jC,wn=Hb("vectors");var hi=class{constructor(e,t={},r,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=RC(t),this.fetch=TC(r),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=kc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Qc(r))return{data:null,error:r};throw r}}};let qb;qb=Symbol.toStringTag;var NC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[qb]="StreamDownloadBuilder",this.promise=null}
23then(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(Qc(t))return{data:null,error:t};throw t}}};let Vb;Vb=Symbol.toStringTag;var DC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Vb]="BlobDownloadBuilder",this.promise=null}asStream(){return new NC(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(Qc(t))return{data:null,error:t};throw t}}};const kf={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},jv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var MC=class extends hi{constructor(e,t={},r,a){super(e,t,a,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,a){var o=this;return o.handleOperation(async()=>{let c;const u=ve(ve({},jv),a);let f=ve(ve({},o.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const p=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),p&&c.append("metadata",o.encodeMetadata(p)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),p&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(p))):(c=r,f["cache-control"]=`max-age=${u.cacheControl}`,f["content-type"]=u.contentType,p&&(f["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,w]of Object.entries(a.headers))f=kc(f,b,w);const m=o._removeEmptyFolders(t),y=o._getFinalPath(m),g=await(e=="PUT"?th:qn)(o.fetch,`${o.url}/object/${y}`,c,ve({headers:f},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,a){var o=this;const c=o._removeEmptyFolders(e),u=o._getFinalPath(c),f=new URL(o.url+`/object/upload/sign/${u}`);return f.searchParams.set("token",t),o.handleOperation(async()=>{let p;const m=ve(ve({},jv),a);let y=ve(ve({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&r instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",o.encodeMetadata(g)),p.append("",r)):typeof FormData<"u"&&r instanceof FormData?(p=r,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",o.encodeMetadata(g))):(p=r,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,w]of Object.entries(a.headers))y=kc(y,b,w);return{path:c,fullPath:(await th(o.fetch,f.toString(),p,ve({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let a=r._getFinalPath(e);const o=ve({},r.headers);t?.upsert&&(o["x-upsert"]="true");const c=await qn(r.fetch,`${r.url}/object/upload/sign/${a}`,{},{headers:o}),u=new URL(r.url+c.url),f=u.searchParams.get("token");if(!f)throw new Yc("No token returned by API");return{signedUrl:u.toString(),path:e,token:f}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var a=this;return a.handleOperation(async()=>await qn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
23stinationBucket:r?.destinationBucket},{headers:a.headers}))}async copy(e,t,r){var a=this;return a.handleOperation(async()=>({path:(await qn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,r){var a=this;return a.handleOperation(async()=>{let o=a._getFinalPath(e);const c=typeof r?.transform=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let u=await qn(a.fetch,`${a.url}/object/sign/${o}`,ve({expiresIn:t},c?{transform:r.transform}:{}),{headers:a.headers});const f=new URLSearchParams;r?.download&&f.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&f.set("cacheNonce",String(r.cacheNonce));const p=f.toString();return{signedUrl:encodeURI(`${a.url}${u.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,r){var a=this;return a.handleOperation(async()=>{const o=await qn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),c=new URLSearchParams;r?.download&&c.set("download",r.download===!0?"":r.download),r?.cacheNonce!=null&&c.set("cacheNonce",String(r.cacheNonce));const u=c.toString();return o.map(f=>ve(ve({},f),{},{signedUrl:f.signedURL?encodeURI(`${a.url}${f.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,r){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),f=()=>ko(this.fetch,`${this.url}/${a}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new DC(f,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>eh(await ko(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await LC(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if(Qc(o)){var a;const c=o instanceof Wf?o.status:o instanceof $b?(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 r=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/${r}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await jo(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,r){var a=this;return a.handleOperation(async()=>{const o=a._getFinalPath(e),c=new URLSearchParams;t?.transformations&&c.set("transformations","true");const u=c.toString();return await jo(a.fetch,`${a.url}/cdn/${o}${u?`?${u}`:""}`,{},{headers:a.headers},r)})}async list(e,t,r){var a=this;return a.handleOperation(async()=>{const o=t?.sortBy?ve(ve({},kf.sortBy),t.sortBy):kf.sortBy,c=ve(ve(ve({},kf),t),{},{sortBy:o,prefix:e||""});return await qn(a.fetch,`${a.url}/object/list/${a.bucketId}`,c,{headers:a.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const a=ve({},e);return await qn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,a,{headers:r.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("qual
23ity",t.quality.toString()),e}};const PC="2.110.7",Bo={"X-Client-Info":`storage-js/${PC}`};var UC=class extends hi{constructor(e,t={},r,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=ve(ve({},Bo),t);super(c,u,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await ko(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ko(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await qn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await th(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await qn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await jo(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,r){var a=this;return a.handleOperation(async()=>{const o=new URLSearchParams;t?.transformations&&o.set("transformations","true");const c=o.toString();return await jo(a.fetch,`${a.url}/cdn/${e}${c?`?${c}`:""}`,{},{headers:a.headers},r)})}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():""}},zC=class extends hi{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ve(ve({},Bo),t);super(a,o,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await qn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=new URLSearchParams;e?.limit!==void 0&&r.set("limit",e.limit.toString()),e?.offset!==void 0&&r.set("offset",e.offset.toString()),e?.sortColumn&&r.set("sortColumn",e.sortColumn),e?.sortOrder&&r.set("sortOrder",e.sortOrder),e?.search&&r.set("search",e.search);const a=r.toString(),o=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await ko(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await jo(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!CC(e))throw new Yc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new _C({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(r,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...f)=>{try{return{data:await u.apply(o,f),error:null}}catch(p){if(a)throw p;return{data:null,error:p}}}}})}},BC=class extends hi{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ve(ve({},Bo),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await wn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await wn.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await wn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await wn.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},IC=class extends hi{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ve(ve({},Bo),{},{"Content-Type":"application/json"},t);super(a,o,r,"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 wn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await wn.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");
23if(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 wn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await wn.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 wn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},$C=class extends hi{constructor(e,t={},r){const a=e.replace(/\/$/,""),o=ve(ve({},Bo),{},{"Content-Type":"application/json"},t);super(a,o,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await wn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await wn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await wn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},HC=class extends $C{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new qC(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},qC=class extends BC{constructor(e,t,r,a){super(e,t,a),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,ve(ve({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,ve(ve({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new VC(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},VC=class extends IC{constructor(e,t,r,a,o){super(e,t,o),this.vectorBucketName=r,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,ve(ve({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,ve(ve({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,ve(ve({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,ve(ve({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,ve(ve({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},GC=class extends UC{constructor(e,t={},r,a){super(e,t,r,a)}from(e){return new MC(this.url,this.headers,e,this.fetch)}get vectors(){return new HC(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new zC(this.url+"/iceberg",this.headers,this.fetch)}};const Gb="2.110.7",Nr=30*1e3,vo=3,jf=vo*Nr,FC=2*Nr,KC="http://localhost:9999",YC="supabase.auth.token",QC={"X-Client-Info":`gotrue-js/${Gb}`},nh="X-Supabase-Api-Version",Fb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},JC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,XC=600*1e3;class Lo extends Error{constructor(t,r,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ne(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class ZC extends Lo{constructor(t,r,a){super(t,r,a),this.name="AuthApiError",this.status=r,this.co
23de=a}}function WC(e){return ne(e)&&e.name==="AuthApiError"}class Gn extends Lo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class ir extends Lo{constructor(t,r,a,o){super(t,a,o),this.name=r,this.status=a}}class Ct extends ir{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function lc(e){return ne(e)&&e.name==="AuthSessionMissingError"}class Wa extends ir{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class cc extends ir{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class uc extends ir{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function eO(e){return ne(e)&&e.name==="AuthImplicitGrantRedirectError"}class Lv extends ir{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class tO extends ir{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 rh extends ir{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Nv(e){return ne(e)&&e.name==="AuthRetryableFetchError"}class Dv extends ir{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function nO(e){return ne(e)&&e.name==="AuthRefreshDiscardedError"}class Mv extends ir{constructor(t,r,a){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class jc extends ir{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Lc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Pv=` 24\r=`.split(""),rO=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Pv.length;t+=1)e[Pv[t].charCodeAt(0)]=-2;for(let t=0;t<Lc.length;t+=1)e[Lc[t].charCodeAt(0)]=t;return e})();function Uv(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;r(Lc[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;r(Lc[a]),t.queuedBits-=6}}function Kb(e,t,r){const a=rO[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)r(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 zv(e){const t=[],r=u=>{t.push(String.fromCodePoint(u))},a={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{iO(u,a,r)};for(let u=0;u<e.length;u+=1)Kb(e.charCodeAt(u),o,c);return t.join("")}function sO(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 aO(e,t){for(let r=0;r<e.length;r+=1){let a=e.charCodeAt(r);if(a>55295&&a<=56319){const o=(a-55296)*1024&65535;a=(e.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}sO(a,t)}}function iO(e,t,r){if(t.utf8seq===0){if(e<=127){r(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&&r(t.codepoint)}}function di(e){const t=[],r={queue:0,queuedBits:0},a=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)Kb(e.charCodeAt(o),r,a);return new Uint8Array(t)}function oO(e){const t=[];return aO(e,r=>t.push(r)),new Uint8Array(t)}function na(e){const t=[],r={queue:0,queuedBits:0},a=o=>{t.push(o)};return e.forEach(o=>Uv(o,r,a)),Uv(null,r,a),t.join("")}function lO(e){return Math.round(Date.now()/1e3)+e}function cO(){return Symbol("auth-callback")}const qt=()=>typeof window<"u"&&typeof document<"u",Ys={tested:!1,writable:!1},Yb=()=>{if(!qt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ys.tested)return Ys.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ys.tested=!0,Ys.writable=!0}catch{Ys.tested=!0,Ys.writable=!1}return Ys.writable};function uO(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
24h((o,c)=>{t[c]=o})}catch{}return r.searchParams.forEach((a,o)=>{t[o]=a}),t}const Qb=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),dO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",si=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},$n=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},pt=async(e,t)=>{await e.removeItem(t)};class Jc{constructor(){this.promise=new Jc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Jc.promiseConstructor=Promise;function dc(e){const t=e.split(".");if(t.length!==3)throw new jc("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!JC.test(t[a]))throw new jc("JWT not in base64url format");return{header:JSON.parse(zv(t[0])),payload:JSON.parse(zv(t[1])),signature:di(t[2]),raw:{header:t[0],payload:t[1]}}}async function fO(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function hO(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 pO(e){return("0"+e.toString(16)).substr(-2)}function mO(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=r.length;let o="";for(let c=0;c<56;c++)o+=r.charAt(Math.floor(Math.random()*a));return o}return crypto.getRandomValues(t),Array.from(t,pO).join("")}async function gO(e){const r=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(a);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function yO(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 r=await gO(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Qs(e,t,r=!1){const a=mO();let o=a;r&&(o+="/recovery"),await si(e,`${t}-code-verifier`,o);const c=await yO(a);return[c,a===c?"plain":"s256"]}const vO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function bO(e){const t=e.headers.get(nh);if(!t||!t.match(vO))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function wO(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 _O(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 SO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Or(e){if(!SO.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Hn(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 Lf(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const a=r.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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function EO(e,t){return new Proxy(e,{get:(r,a,o)=>
24{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(r,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(r,a,o)}})}function Bv(e){return JSON.parse(JSON.stringify(e))}const Xs=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)},xO=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Iv(e){var t;if(!dO(e))throw new rh(Xs(e),0);if(xO.includes(e.status))throw new rh(Xs(e),e.status);let r;try{r=await e.json()}catch(c){throw new Gn(Xs(c),c)}let a;const o=bO(e);if(o&&o.getTime()>=Fb["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?a=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(a=r.error_code),a){if(a==="weak_password")throw new Mv(Xs(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new Ct}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new Mv(Xs(r),e.status,r.weak_password.reasons);throw new ZC(Xs(r),e.status||500,a)}const RO=(e,t,r,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),r))};async function de(e,t,r,a){var o;const c=Object.assign({},a?.headers);c[nh]||(c[nh]=Fb["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 f=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",p=await TO(e,t,r+f,{headers:c,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(p):{data:Object.assign({},p),error:null}}async function TO(e,t,r,a,o,c){const u=RO(t,a,o,c);let f;try{f=await e(r,Object.assign({},u))}catch(p){throw console.error(p),new rh(Xs(p),0)}if(f.ok||await Iv(f),a?.noResolveJson)return f;try{return await f.json()}catch(p){await Iv(p)}}function Dn(e){var t;let r=null;OO(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=lO(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:r,user:a},error:null}}function $v(e){const t=Dn(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((r,a)=>r&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function ps(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function AO(e){return{data:e,error:null}}function CO(e){const{action_link:t,email_otp:r,hashed_token:a,redirect_to:o,verification_type:c}=e,u=Kc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:t,email_otp:r,hashed_token:a,redirect_to:o,verification_type:c},p=Object.assign({},u);return{data:{properties:f,user:p},error:null}}function Hv(e){return e}function OO(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Nf=["global","local","others"];class kO{constructor({url:t="",headers:r={},fetch:a,experimental:o}
vendor: 5,566 bytes, line 24
24){this.url=t,this.headers=r,this.fetch=Qb(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,r=Nf[0]){if(Nf.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Nf.join(", ")}`);try{return await de(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(ne(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,r={}){try{return await de(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ps})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:r}=t,a=Kc(t,["options"]),o=Object.assign(Object.assign({},a),r);return"newEmail"in a&&(o.new_email=a?.newEmail,delete o.newEmail),await de(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:CO,redirectTo:r?.redirectTo})}catch(r){if(ne(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await de(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:ps})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,a,o,c,u,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await de(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.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:Hv});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,w=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const R=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);m[`${E}Page`]=R}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ne(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){Or(t);try{return await de(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ps})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Or(t);try{return await de(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:ps})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,r=!1){Or(t);try{return await de(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:ps})}catch(a){if(ne(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){Or(t.userId);try{const{data:r,error:a}=await de(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:a}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Or(t.userId),Or(t.id);try{return{data:await de(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,a,o,c,u,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await de(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(r=t?.page)===null||r===void 0?void 0:r.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:Hv});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,w=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return w.length>0&&(w.forEach(_=>{const R=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(_.split(";")[1].split("=")[1]);m[`${E}Page`]=R}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ne(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await de(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await de(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(ne(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{return await de(this.fetch,"DELET
24E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t?.type&&(r.type=t.type),await de(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:a=>{var o;return{data:{providers:(o=a?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(r){if(ne(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await de(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await de(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await de(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(ne(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{return await de(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){Hn(this.experimental),Or(t.userId);try{return await de(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){Hn(this.experimental),Or(t.userId),Or(t.passkeyId);try{return await de(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}}function qv(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&Yb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class jO extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function LO(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Jb(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function NO(e){return parseInt(e,16)}function DO(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function MO(e){var t;const{chainId:r,domain:a,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:f,requestId:p,resources:m,scheme:y,uri:g,version:b}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!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(` 25`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const w=Jb(e.address),_=y?`${y}://${a}`:a,R=e.statement?`${e.statement} 26`:"",E=`${_} wants you to sign in with your Ethereum account: 27${w} 28 29${R}`;let x=`URI: ${g} 30Version: ${b} 31Chain ID: ${r}${u?` 32Nonce: ${u}`:""} 33Issued At: ${c.toISOString()}`;
33if(o&&(x+=` 34Expiration Time: ${o.toISOString()}`),f&&(x+=` 35Not Before: ${f.toISOString()}`),p&&(x+=` 36Request ID: ${p}`),m){let j=` 37Resources:`;for(const N of m){if(!N||typeof N!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${N}`);j+=` 38- ${N}`}x+=j}return`${E} 39${x}`}class mt extends Error{constructor({message:t,code:r,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=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Nc extends mt{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function PO({error:e,options:t}){var r,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 mt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=c.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new mt({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 mt({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 mt({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 mt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new mt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return c.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new mt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new mt({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(Xb(u)){if(c.rp.id!==u)return new mt({message:`The RP ID "${c.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new mt({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 mt({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 mt({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 mt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function UO({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new mt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new mt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(Xb(a)){if(r.rpId!==a)return new mt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new mt({message:`${window.location.hostname}
39 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new mt({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 mt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class zO{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}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 sh=new zO;function Vv(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:r,excludeCredentials:a}=e,o=Kc(e,["challenge","user","excludeCredentials"]),c=di(t).buffer,u=Object.assign(Object.assign({},r),{id:di(r.id).buffer}),f=Object.assign(Object.assign({},o),{challenge:c,user:u});if(a&&a.length>0){f.excludeCredentials=new Array(a.length);for(let p=0;p<a.length;p++){const m=a[p];f.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:di(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return f}function Gv(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:r}=e,a=Kc(e,["challenge","allowCredentials"]),o=di(t).buffer,c=Object.assign(Object.assign({},a),{challenge:o});if(r&&r.length>0){c.allowCredentials=new Array(r.length);for(let u=0;u<r.length;u++){const f=r[u];c.allowCredentials[u]=Object.assign(Object.assign({},f),{id:di(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return c}function Fv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:na(new Uint8Array(e.response.attestationObject)),clientDataJSON:na(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Kv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,a=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:na(new Uint8Array(o.authenticatorData)),clientDataJSON:na(new Uint8Array(o.clientDataJSON)),signature:na(new Uint8Array(o.signature)),userHandle:o.userHandle?na(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Xb(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Dc(){var e,t;return!!(qt()&&"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 Zb(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Nc("Browser returned unexpected credential type",t)}:{data:null,error:new Nc("Empty credential response",t)}}catch(t){return{data:null,error:PO({error:t,options:e})}}}async function Wb(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Nc("Browser returned unexpected credential type",t)}:{data:null,error:new Nc("Empty credential response",t)}}
39catch(t){return{data:null,error:UO({error:t,options:e})}}}const BO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},IO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Mc(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=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(r(u))a[c]=u;else if(t(u)){const f=a[c];t(f)?a[c]=Mc(f,u):a[c]=Mc(u)}else a[c]=u}return a}function $O(e,t){return Mc(BO,e,t||{})}function HO(e,t){return Mc(IO,e,t||{})}class qO{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:r,friendlyName:a,signal:o},c){var u;try{const{data:f,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!f)return{data:null,error:p};const m=o??sh.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:y}=f.webauthn.credential_options.publicKey;if(!y.name){const g=a;if(g)y.name=`${y.id}:${g}`;else{const w=(await this.client.getUser()).data.user,_=((u=w?.user_metadata)===null||u===void 0?void 0:u.name)||w?.email||w?.id||"User";y.name=`${y.id}:${_}`}}y.displayName||(y.displayName=y.name)}switch(f.webauthn.type){case"create":{const y=$O(f.webauthn.credential_options.publicKey,c?.create),{data:g,error:b}=await Zb({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const y=HO(f.webauthn.credential_options.publicKey,c?.request),{data:g,error:b}=await Wb(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(f){return ne(f)?{data:null,error:f}:{data:null,error:new Gn("Unexpected error in challenge",f)}}}async _verify({challengeId:t,factorId:r,webauthn:a}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new Lo("rpId is required for WebAuthn authentication")};try{if(!Dc())return{data:null,error:new Gn("Browser does not support WebAuthn",null)};const{data:u,error:f}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:a},signal:o},{request:c});if(!u)return{data:null,error:f};const{webauthn:p}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:p.type,rpId:r,rpOrigins:a,credential_response:p.credential_response}})}catch(u){return ne(u)?{data:null,error:u}:{data:null,error:new Gn("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!r)return{data:null,error:new Lo("rpId is required for WebAuthn registration")};try{if(!Dc())return{data:null,error:new Gn("Browser does not support WebAuthn",null)};const{data:u,error:f}=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:f};const{data:p,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:r,rpOrigins:a},signal:o},{create:c});return p?this._verify({factorId:u.id,challengeId:p.challengeId,webauthn:{rpId:r,rpOrigins:a,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(u){return ne(u)?{data:null,error:u}:{data:null,error:new Gn("Unexpected error in register",u)}}}}LO();const VO={url:KC,storageKey:YC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:QC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ei={};class No{get jwks(){var t,r;return(r=(t=ei[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){ei[this.storageKey]=Object.assign(Object.assign({},ei[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=ei[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ei[this.storageKey]=Object.assign(Object.assign({},ei[this.storageKey]),{cachedAt:t})}constructor(t){var r,a,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},VO),t);if(this.storageKey=c.storageKey,this.instanceID=(r=No.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,No.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&qt()){const u=`${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(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(a=c.experimental)!==null&&a!==void 0?a:{},this.admin=new kO({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}
39),this.url=c.url,this.headers=c.headers,this.fetch=Qb(c.fetch),this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock!=null&&(this.lock=c.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new qO(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(c.storage?this.storage=c.storage:Yb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=qv(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=qv(this.memoryStorage)),qt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u),(u.data.event==="TOKEN_REFRESHED"||u.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}c.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Gb}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();
39const r=await this.initializePromise,a=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const o of a)await this._notifyAllSubscribers(o.event,o.session,o.broadcast);return r}async _initialize(){var t;try{let r={},a="none";if(qt()&&(r=uO(window.location.href),this._isImplicitGrantCallback(r)?a="implicit":await this._isPKCECallback(r)&&(a="pkce")),qt()&&this.detectSessionInUrl&&a!=="none"){const{data:o,error:c}=await this._getSessionFromURL(r,a);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),eO(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:f}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",f),await this._saveSession(u),setTimeout(async()=>{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ne(r)?this._returnResult({error:r}):this._returnResult({error:new Gn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,a,o;try{const c=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(r=t?.options)===null||r===void 0?void 0:r.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:Dn}),{data:u,error:f}=c;if(f||!u)return this._returnResult({data:{user:null,session:null},error:f});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(ne(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(t){var r,a,o;try{let c;if("email"in t){const{email:y,password:g,options:b}=t;let w=null,_=null;this.flowType==="pkce"&&([w,_]=await Qs(this.storage,this.storageKey)),c=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:y,password:g,data:(r=b?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:w,code_challenge_method:_},xform:Dn})}else if("phone"in t){const{phone:y,password:g,options:b}=t;c=await de(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:Dn})}else throw new cc("You must provide either an email or phone number and a password");const{data:u,error:f}=c;if(f||!u)return await pt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});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 pt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(t){try{let r;if("email"in t){const{email:c,password:u,options:f}=t;r=await de(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:$v})}else if("phone"in t){const{phone:c,password:u,options:f}=t;r=await de(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:$v})}else throw new cc("You must provide either an email or phone number and a password");const{data:a,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!a||!a.session||!a.user){const c=new Wa;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(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,a,o,c;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.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.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,a,o,c,u,f,p,m,y,g,b;let w,_;if("message"in t)w=t.message,_=t.signature;else{const{chain:R,wallet:E,statement:x,options:j}=t;let N;if(qt())if(typeof E=="object")N=E;else{const X=window;if("ethereum"in X&&typeof X.ethereum=="object"&&"request"in X.ethereum&&typeof X.ethereum.request=="function")N=X.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof E!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=E}const P=new URL((r=j?.url)!==null&&r!==void 0?r:window.location.href),J=await N.request({method:"eth_requestAccounts"}).then(X=>X).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!J||J.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const q=Jb(J[0]);let H=(a=j?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!H){const X=await N.request({method:"eth_chainId"});H=NO(X)}const U={domain:P.host,address:q,statement:x,uri:P.href,version:"1",chainId:H,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:(f=j?.signInWithEthereum)===null||f===void 0?void 0:f.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};w=MO(U),_=await N.request({method:"personal_sign",params:[DO(w),q]})}try{const{data:R,error:E}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:_},!((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:Dn});if(E)throw E;if(!R||!R.session||!R.user){const x=new Wa;return this._returnResult({data:{user:null,session:null},error:x})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:E})}catch(R){if(ne(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async signInWithSolana(t){var r,a,o,c,u,f,p,m,y,g,b,w;let _,R;if("message"in t)_=t.message,R=t.signature;else{const{chain:E,wallet:x,statement:j,options:N}=t;let P;if(qt())if(typeof x=="object")P=x;else{const q=window;if("solana"in q&&typeof q.solana=="object"&&("signIn"in q.solana&&typeof q.solana.signIn=="function"||"signMessage"in q.solana&&typeof q.solana.signMessage=="function"))P=q.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 x!="object"||!N?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");P=x}const J=new URL((r=N?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in P&&P.signIn){const q=await P.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},N?.signInWithSolana),{version:"1",domain:J.host,uri:J.href}),j?{statement:j}:null));let H;if(Array.isArray(q)&&q[0]&&typeof q[0]=="object")H=q[0];else if(q&&typeof q=="object"&&"signedMessage"in q&&"signature"in q)H=q;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in H&&"signature"in H&&(typeof H.signedMessage=="string"||H.signedMessage instanceof Uint8Array)&&H.signature instanceof Uint8Array)_=typeof H.signedMessage=="string"?H.signedMessage:new TextDecoder().decode(H.signedMessage),R=H.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in P)||typeof P.signMessage!="function"||!("publicKey"in P)||typeof P!="object"||!P.publicKey||!("toBase58"in P.publicKey)||typeof P.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");_=[`${J.host} wants you to sign in with your Solana account:`,P.publicKey.toBase58(),...j?["",j,""]:[""],"Version: 1",`URI: ${J.href}`,`Issued At: ${(o=(a=N?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=N?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${N.signInWithSolana.notBefore}`]:[],...!((u=N?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${N.signInWithSolana.expirationTime}`]:[],...!((f=N?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${N.signInWithSolana.chainId}`]:[],...!((p=N?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${N.signInWithSolana.nonce}`]:[],...!((m=N?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${N.signInWithSolana.requestId}`]:[],...!((g=(y=N?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...N.signInWithSolana.resources.map(H=>`- ${H}`)]:[]].join(` 40`);const q=await P.signMessage(new TextEncoder().encode(_),"utf8");if(!q||!(q instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");R=q}}try{const{data:E,error:x}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:na(R)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:Dn});if(x)throw x;if(!E||!E.session||!E.user){const j=new Wa;return this._returnResult({data:{user:null,session:null},error:j})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:x})}
40catch(E){if(ne(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const r=await $n(this.storage,`${this.storageKey}-code-verifier`),[a,o]=(r??"").split("/");try{if(!a&&this.flowType==="pkce")throw new tO;const{data:c,error:u}=await de(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:Dn});if(await pt(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const f=new Wa;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}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 pt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(t){try{const{options:r,provider:a,token:o,access_token:c,nonce:u}=t,f=await de(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:r?.captchaToken}},xform:Dn}),{data:p,error:m}=f;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new Wa;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(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,a,o,c,u;try{if("email"in t){const{email:f,options:p}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await Qs(this.storage,this.storageKey));const{error:g}=await de(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(r=p?.data)!==null&&r!==void 0?r:{},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:f,options:p}=t,{data:m,error:y}=await de(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,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 cc("You must provide either an email or phone number.")}catch(f){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ne(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(t){var r,a;try{let o,c;"options"in t&&(o=(r=t.options)===null||r===void 0?void 0:r.redirectTo,c=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:u,error:f}=await de(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:Dn});if(f)throw f;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(ne(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var r,a,o,c,u;try{let f=null,p=null;this.flowType==="pkce"&&([f,p]=await Qs(this.storage,this.storageKey));const m=await de(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=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&a!==void 0?a:void 0}
40),!((o=t?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:p}),headers:this.headers,xform:AO});return!((c=m.data)===null||c===void 0)&&c.url&&qt()&&!(!((u=t.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(f){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ne(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)throw a;if(!r)throw new Ct;const{error:o}=await de(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(ne(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:a,type:o,options:c}=t;let u=null,f=null;this.flowType==="pkce"&&([u,f]=await Qs(this.storage,this.storageKey));const{error:p}=await de(this.fetch,"POST",r,{headers:this.headers,body:{email:a,type:o,gotrue_meta_security:{captcha_token:c?.captchaToken},code_challenge:u,code_challenge_method:f},redirectTo:c?.emailRedirectTo});return p&&await pt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in t){const{phone:a,type:o,options:c}=t,{data:u,error:f}=await de(this.fetch,"POST",r,{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:f})}throw new cc("You must provide either an email or phone number and a type")}catch(r){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){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 r()))();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=r();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 r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await $n(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(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()<jf:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const u=await $n(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=Lf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=EO(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);if(c){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const f=await $n(this.storage,this.storageKey);if(f&&f.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:c})}return 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;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await de(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:ps}):await this._useSession(async r=>{var a,o,c;const{data:u,error:f}=r;if(f)throw f;return!(!((a=u.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ct}:await de(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:ps})})}catch(r){if(ne(r))return lc(r)&&(await this._removeSession(),await pt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){try{return await this._useSession(async a=>{const{data:o,error:c}=a;if(c)throw c;if(!o.session)throw new Ct;const u=o.session;let f=null,p=null;this.flowType==="pkce"&&t.email!=null&&([f,p]=await Qs(this.storage,this.storageKey));const{data:m,error:y}=await de(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:f,code_challenge_method:p}),jwt:u.access_token,xform:ps});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 pt(this.storage,`${this.storageKey}-code-verifier`),ne(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ct;const r=Date.now()/1e3;let a=r,o=!0,c=null;const{payload:u}=dc(t.access_token);if(u.exp&&(a=u.exp,o=a<=r),o){const{data:f,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f)return{data:{user:null,session:null},error:null};c=f}else{const{data:f,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:f.user,token_type:"bearer",expires_in:a-r,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(r){if(ne(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var a;if(!t){const{data:u,error:f}=r;if(f)throw f;t=(a=u.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new Ct;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(r){if(ne(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var a;try{if(!qt())throw new uc("No browser detected.");
40if(t.error||t.error_description||t.error_code)throw new uc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Lv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new uc("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Lv("No code detected.");const{data:N,error:P}=await this._exchangeCodeForSession(t.code);if(P)throw P;const J=new URL(window.location.href);return J.searchParams.delete("code"),window.history.replaceState(window.history.state,"",J.toString()),{data:{session:N.session,redirectType:(a=N.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:f,expires_in:p,expires_at:m,token_type:y}=t;if(!u||!p||!f||!y)throw new uc("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(p);let w=g+b;m&&(w=parseInt(m));const _=w-g;_*1e3<=Nr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${_}s, should have been closer to ${b}s`);const R=w-b;g-R>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",R,w,g):g-R<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",R,w,g);const{data:E,error:x}=await this._getUser(u);if(x)throw x;const j={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:b,expires_at:w,refresh_token:f,token_type:y,user:E.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(ne(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||t.error_description||t.error_code)}async _isPKCECallback(t){const r=await $n(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var a;const o=async()=>{await this._removeSession(),await pt(this.storage,`${this.storageKey}-code-verifier`)},{data:c,error:u}=r;if(u&&!lc(u))return this._returnResult({error:u});const f=(a=c.session)===null||a===void 0?void 0:a.access_token;if(f){const{error:p}=await this.admin.signOut(f,t);if(p&&!(WC(p)&&(p.status===404||p.status===401||p.status===403)||lc(p)))return t!=="others"&&await o(),this._returnResult({error:p})}return t!=="others"&&await o(),this._returnResult({error:null})})}onAuthStateChange(t){const r=cO(),a={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async r=>{var a,o;try{const{data:{session:c},error:u}=r;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),lc(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(t,r={}){let a=null,o=null;this.flowType==="pkce"&&([a,o]=await Qs(this.storage,this.storageKey,!0));try{return await de(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(c){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ne(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var t;try{const{data:r,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:a,error:o}=await this._useSession(async c=>{var u,f,p,m,y;const{data:g,error:b}=c;if(b)throw b;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(f=t.options)===null||f===void 0?void 0:f.scopes,queryParams:(p=t.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return await de(this.fetch,"GET",w,{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 qt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(ne(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var a;try{const{error:o,data:{session:c}}=r;if(o)throw o;const{options:u,provider:f,token:p,access_token:m,nonce:y}=t,g=await de(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:f,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:Dn}),{data:b,error:w}=g;return w?this._returnResult({data:{user:null,session:null},error:w}
40):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new Wa}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(o){if(await pt(this.storage,`${this.storageKey}-code-verifier`),ne(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var a,o;const{data:c,error:u}=r;if(u)throw u;return await de(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(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const a=Date.now();return await hO(async o=>(o>0&&await fO(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await de(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Dn})),(o,c)=>{const u=200*Math.pow(2,o);return c&&Nv(c)&&Date.now()+u-a<Nr})}catch(a){if(this._debug(r,"error",a),ne(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",a),qt()&&!r.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,r;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const o=await $n(this.storage,this.storageKey);if(o&&this.userStorage){let u=await $n(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await si(this.userStorage,this.storageKey+"-user",u)),o.user=(t=u?.user)!==null&&t!==void 0?t:Lf()}else if(o&&!o.user&&!o.user){const u=await $n(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await pt(this.storage,this.storageKey+"-user"),await si(this.storage,this.storageKey,o)):o.user=Lf()}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=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<jf;if(this._debug(a,`session has${c?"":" not"} expired with margin of ${jf}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(nO(u)?this._debug(a,"refresh discarded by commit guard",u):this._debug(a,"refresh failed",u))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:f}=await this._getUser(o.access_token);!f&&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 r,a;if(!t)throw new Ct;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new Jc;const c=await $n(this.storage,this.storageKey),{data:u,error:f}=await this._refreshAccessToken(t);if(f)throw f;if(!u.session)throw new Ct;const p=await $n(this.storage,this.storageKey);if(c!==null&&(p===null||p.refresh_token!==c.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const b={data:null,error:new Dv};return this.refreshingDeferred.resolve(b),b}const y=this._sessionRemovalEpoch;if(await this._saveSession(u.session),this._sessionRemovalEpoch!==y){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, und
40oing write"),await pt(this.storage,this.storageKey),this.userStorage&&await pt(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Dv};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const g={data:u.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(g),g}catch(c){if(this._debug(o,"error",c),ne(c)){const u={data:null,error:c};if(!Nv(c)){const f=await $n(this.storage,this.storageKey);!!(f?.expires_at&&f.expires_at*1e3>Date.now())?this._debug(o,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:u,expiresAt:Date.now()+FC},(r=this.refreshingDeferred)===null||r===void 0||r.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,r,a=!0){if(this._pendingInitNotifications!==null&&a){this._pendingInitNotifications.push({event:t,session:r,broadcast:a});return}const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",r,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:r});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(t,r)}catch(p){c.push(p)}});if(await Promise.all(u),c.length>0){for(let f=0;f<c.length;f+=1)console.error(c[f]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const r=Object.assign({},t),a=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&r.user&&await si(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const c=Bv(o);await si(this.storage,this.storageKey,c)}else{const o=Bv(r);await si(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await pt(this.storage,this.storageKey),await pt(this.storage,this.storageKey+"-code-verifier"),await pt(this.storage,this.storageKey+"-user"),this.userStorage&&await pt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&qt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Nr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/Nr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Nr}ms, refresh threshold is ${vo} ticks`),o<=vo&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof jO)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:a}}=r;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/Nr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${Nr}ms, refresh threshold is ${vo} ticks`),o<=vo&&await this._callRefreshToken(a.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!qt()||!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 r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
40{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,a){const o=[`provider=${encodeURIComponent(r)}`];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 Qs(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(f.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 r=>{var a;const{data:o,error:c}=r;return c?this._returnResult({data:null,error:c}):await de(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(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var a,o;const{data:c,error:u}=r;if(u)return this._returnResult({data:null,error:u});const f=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 de(this.fetch,"POST",`${this.url}/factors`,{body:f,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(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const f=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Fv(t.webauthn.credential_response):Kv(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:m}=await de(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:f,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:m}))})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async a=>{var o;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const f=await de(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});if(f.error)return f;const{data:p}=f;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:Vv(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:Gv(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:a}=await this.getUser();if(a)return{data:null,error:a};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(t=r?.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 r,a,o,c;if(t)try{const{payload:w}=dc(t);let _=null;w.aal&&(_=w.aal);let R=_;const{data:{user:E},error:x}=await this.getUser(t);if(x)return this._returnResult({data:null,error:x});((a=(r=E?.factors)===null||r===void 0?void 0:r.filter(P=>P.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(R="aal2");const N=w.amr||[];return{data:{currentLevel:_,nextLevel:R,currentAuthenticationMethods:N},error:null}}catch(w){if(ne(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:u},error:f}
40=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=dc(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(w=>w.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 r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?await de(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 Ct})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){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 Ct});const u=await de(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return u.data&&u.data.redirect_url&&qt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,r){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 Ct});const u=await de(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return u.data&&u.data.redirect_url&&qt()&&!r?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;return a?this._returnResult({data:null,error:a}):r?await de(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Ct})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;return o?this._returnResult({data:null,error:o}):a?(await de(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 Ct})})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let a=r.keys.find(f=>f.kid===t);if(a)return a;const o=Date.now();if(a=this.jwks.keys.find(f=>f.kid===t),a&&this.jwks_cached_at+XC>o)return a;const{data:c,error:u}=await de(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(f=>f.kid===t),!a)?null:a}async getClaims(t,r={}){try{let a=t;if(!a){const{data:w,error:_}
40=await this.getSession();if(_||!w.session)return this._returnResult({data:null,error:_});a=w.session.access_token}const{header:o,payload:c,signature:u,raw:{header:f,payload:p}}=dc(a);if(!r?.allowExpired)try{wO(c.exp)}catch(w){throw new jc(w instanceof Error?w.message:"JWT validation failed")}const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!m){const{error:w}=await this.getUser(a);if(w)throw w;return{data:{claims:c,header:o,signature:u},error:null}}const y=_O(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,oO(`${f}.${p}`)))throw new jc("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var r,a,o;Hn(this.experimental);try{if(!Dc())return this._returnResult({data:null,error:new Gn("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const f=Gv(c.options),p=(o=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&o!==void 0?o:sh.createNewAbortSignal(),{data:m,error:y}=await Wb({publicKey:f,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new Gn("WebAuthn ceremony failed",null)});const g=Kv(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(ne(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(t){var r,a;Hn(this.experimental);try{if(!Dc())return this._returnResult({data:null,error:new Gn("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=Vv(o.options),f=(a=(r=t?.options)===null||r===void 0?void 0:r.signal)!==null&&a!==void 0?a:sh.createNewAbortSignal(),{data:p,error:m}=await Zb({publicKey:u,signal:f});if(m||!p)return this._returnResult({data:null,error:m??new Gn("WebAuthn ceremony failed",null)});const y=Fv(p);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(ne(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){Hn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new Ct});const{data:o,error:c}=await de(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Hn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Ct});const{data:c,error:u}=await de(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(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;Hn(this.experimental);try{const{data:a,error:o}=await de(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t?.options)===null||r===void 0?void 0:r.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})}catch(a){if(ne(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){Hn(this.experimental);try{const{data:r,error:a}=await de(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Dn});return a?this._returnResult({data:null,error:a}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){Hn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!r)return this._returnResult({data:null,error:new Ct});const{data:o,error:c}=await de(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.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(ne(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Hn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Ct});const{data:c,error:u}=await de(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(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){Hn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:a},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new Ct});const{error:c}
40=await de(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(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}}No.nextInstanceID={};const GO=No,FO="2.110.7";let bo="",Pc;if(typeof Deno<"u"){var Df;bo="deno",Pc=(Df=Deno.version)===null||Df===void 0?void 0:Df.deno}else if(typeof document<"u")bo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")bo="react-native";else{var Mf;bo="node";const e=globalThis.process;Pc=e==null||(Mf=e.version)===null||Mf===void 0?void 0:Mf.replace(/^v/,"")}const ew=[`runtime=${bo}`];Pc&&ew.push(`runtime-version=${Pc}`);const KO={"X-Client-Info":`supabase-js/${FO}; ${ew.join("; ")}`},YO={headers:KO},QO={schema:"public"},JO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},XO={},ZO={enabled:!1,respectSamplingDecision:!0};function WO(e,t,r,a){function o(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function f(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(f,p)}m((a=a.apply(e,[])).next())})}let Pf=null;const ek="@opentelemetry/api";function tk(){return Pf===null&&(Pf=import(ek).catch(()=>null)),Pf}function nk(){return WO(this,void 0,void 0,function*(){try{const e=yield tk();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function rk(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,a,o,c]=t;if(r.length!==2||a.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(r)||!u.test(a)||!u.test(o)||!u.test(c)||a==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:r,traceId:a,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function sk(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(ak(r.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(r.hostname))return!0}else if(typeof a=="function"&&a(r))return!0}catch{continue}return!1}function ak(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function ik(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Do(e){"@babel/helpers - typeof";return Do=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},Do(e)}function ok(e,t){if(Do(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Do(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lk(e){var t=ok(e,"string");return Do(t)=="symbol"?t:t+""}function ck(e,t,r){return(t=lk(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yv(Object(r),!0).forEach(function(a){ck(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yv(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}const uk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),dk=()=>Headers,tw=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),fk="sb_temp_",Qv=new Set,hk=e=>{var t,r;if(!e.startsWith("sb_")||tw(e)||e.startsWith(fk))return;const a=(t=(r=e.match(/^sb_[a-zA-Z0-9]+_/))===null||r===void 0?void 0:r[0])!==null&&t!==void 0?t:"unknown";Qv.has(a)||(Qv.add(a),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is;
40 if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},Jv=(e,t,r,a,o,c)=>{const u=uk(a),f=dk(),p=o?.enabled===!0,m=o?.respectSamplingDecision!==!1,y=p?ik(t):null,g=!(c?.omitApiKeyAsBearer&&tw(e));return async(b,w)=>{const _=await r();let R=new f(w?.headers);if(R.has("apikey")||R.set("apikey",e),!R.has("Authorization")){const E=_??(g?e:null);E&&R.set("Authorization",`Bearer ${E}`)}if(y){const E=await pk(b,y,m);E&&(E.traceparent&&!R.has("traceparent")&&R.set("traceparent",E.traceparent),E.tracestate&&!R.has("tracestate")&&R.set("tracestate",E.tracestate),E.baggage&&!R.has("baggage")&&R.set("baggage",E.baggage))}return u(b,it(it({},w),{},{headers:R}))}};async function pk(e,t,r){if(!sk(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await nk();if(!a||!a.traceparent)return null;if(r){const o=rk(a.traceparent);if(o&&!o.isSampled)return null}return a}function Xv(e){return typeof e=="boolean"?{enabled:e}:e}function mk(e){return e.endsWith("/")?e:e+"/"}function gk(e,t){var r,a,o,c,u,f;const{db:p,auth:m,realtime:y,global:g}=e,{db:b,auth:w,realtime:_,global:R}=t,E=Xv(e.tracePropagation),x=Xv(t.tracePropagation),j={db:it(it({},b),p),auth:it(it({},w),m),realtime:it(it({},_),y),storage:{},global:it(it(it({},R),g),{},{headers:it(it({},(r=R?.headers)!==null&&r!==void 0?r:{}),(a=g?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(o=(c=E?.enabled)!==null&&c!==void 0?c:x?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(f=E?.respectSamplingDecision)!==null&&f!==void 0?f:x?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?j.accessToken=e.accessToken:delete j.accessToken,j}function yk(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(mk(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var vk=class extends GO{constructor(e){super(e)}},bk=class{constructor(e,t,r){var a,o;this.supabaseUrl=e,this.supabaseKey=t;const c=yk(e);if(!t)throw new Error("supabaseKey is required.");hk(t),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`,f={db:QO,realtime:XO,auth:it(it({},JO),{},{storageKey:u}),global:YO,tracePropagation:ZO},p=gk(r??{},f);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=Jv(t,e,this._getSessionToken.bind(this),p.global.fetch,p.tracePropagation),this.functionsFetch=Jv(t,e,this._getSessionToken.bind(this),p.global.fetch,p.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(it({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 TA(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 GC(this.storageUrl.href,this.headers,this.fetch,r?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new yA(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
40channel(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 _getSessionToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:o,storageKey:c,flowType:u,lock:f,debug:p,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:b},w,_){const R={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new vk({url:this.authUrl.href,headers:it(it({},R),w),storageKey:c,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:a,userStorage:o,flowType:u,lock:f,debug:p,throwOnError:m,experimental:y,fetch:_,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new mC(this.realtimeUrl.href,it(it({},e),{},{params:it(it({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN"||e==="INITIAL_SESSION")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const wk=(e,t,r)=>new bk(e,t,r);function _k(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=20:!1}_k()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function Sk(){if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(E=>e===E||e.endsWith("."+E)),a="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=r?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"),f=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&&f.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),w=(E,x,j)=>new Promise(N=>{const P=b();let J=!1,q;const H=oe=>{J||(J=!0,clearTimeout(q),window.removeEventListener("message",U),N(oe))},U=oe=>{if(m.indexOf(oe.origin)<0)return;const se=oe.data;se&&se.type===y&&se.requestId===P&&H(se)};window.addEventListener("message",U);const X={type:E,requestId:P,projectId:o,key:x};j!==void 0&&(X.value=j);for(const oe of m)window.parent.postMessage(X,oe);q=setTimeout(()=>H(null),g)});let _=!0;const R=250;return{getItem:async E=>{let x=await w("lovable-preview-auth:get",E);return!x&&_&&(await new Promise(j=>setTimeout(j,R)),x=await w("lovable-preview-auth:get",E)),_=!1,x&&x.ok&&typeof x.value=="string"?x.value===""?(localStorage.removeItem(E),null):x.value:localStorage.getItem(E)},setItem:(E,x)=>(localStorage.setItem(E,x),w("lovable-preview-auth:set",E,x).then(()=>{})),removeItem:E=>(localStorage.removeItem(E),w("lovable-preview-auth:remove",E).then(()=>{}))}}function Ek(){return wk("https://lqnippzjvjluzmsifgcu.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxxbmlwcHpqdmpsdXptc2lmZ2N1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODA1NDU4NzAsImV4cCI6MjA5NjEyMTg3MH0.95UsX6etq40feT64qjwtQDkhd7atask7EOFP7RDfReM",{auth:{storage:Sk(),persistSession:!0,autoRefreshToken:!0}})}let Uf;
vendor: 25,390 bytes, line 40
40const kt=new Proxy({},{get(e,t,r){return Uf||(Uf=Ek()),Reflect.get(Uf,t,r)}}),xk=ta({type:"function"}).client(async({next:e})=>{const{data:t}=await kt.auth.getSession(),r=t.session?.access_token;return e({headers:r?{Authorization:`Bearer ${r}`}:{}})}),Rk=ta(),Zv=hA(()=>({functionMiddleware:[xk],requestMiddleware:[Rk]}));var Xc=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(){}},Tk=class extends Xc{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},nw=new Tk,Ak={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ck=class{#e=Ak;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ah=new Ck;function Ok(e){setTimeout(e,0)}var kk=typeof window>"u"||"Deno"in globalThis;function Vn(){}function jk(e,t){return typeof e=="function"?e(t):e}function Lk(e){return typeof e=="number"&&e>=0&&e!==1/0}function Nk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ih(e,t){return typeof e=="function"?e(t):e}function Dk(e,t){return typeof e=="function"?e(t):e}function Wv(e,t){const{type:r="all",exact:a,fetchStatus:o,predicate:c,queryKey:u,stale:f}=e;if(u){if(a){if(t.queryHash!==Sh(u,t.options))return!1}else if(!Po(t.queryKey,u))return!1}if(r!=="all"){const p=t.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||o&&o!==t.state.fetchStatus||c&&!c(t))}function e0(e,t){const{exact:r,status:a,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(Mo(t.options.mutationKey)!==Mo(c))return!1}else if(!Po(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function Sh(e,t){return(t?.queryKeyHashFn||Mo)(e)}function Mo(e){return JSON.stringify(e,(t,r)=>oh(r)?Object.keys(r).sort().reduce((a,o)=>(a[o]=r[o],a),{}):r)}function Po(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Po(e[r],t[r])):!1}var Mk=Object.prototype.hasOwnProperty;function rw(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=t0(e)&&t0(t);if(!a&&!(oh(e)&&oh(t)))return t;const c=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),f=u.length,p=a?new Array(f):{};let m=0;for(let y=0;y<f;y++){const g=a?y:u[y],b=e[g],w=t[g];if(b===w){p[g]=b,(a?y<c:Mk.call(e,g))&&m++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[g]=w;continue}const _=rw(b,w,r+1);p[g]=_,_===b&&m++}return c===f&&m===c?e:p}function t0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oh(e){if(!n0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!n0(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function n0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pk(e){return new Promise(t=>{ah.setTimeout(t,e)})}function Uk(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?rw(e,t):t}function zk(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function Bk(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var Eh=Symbol();function sw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Eh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ik(e,t,r){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var aw=(()=>{let e=()=>kk;return{isServer(){return e()},setIsServer(t){e=t}}})();function $k(){let e,t;const r=new Promise((o,c)=>{e=o,t=c});r.status="pending",r.catch(()=>{});function a(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},r.reject=o=>{a({status:"rejected",reason:o}),t(o)},r}var Hk=Ok;function qk(){let e=[],t=0,r=f=>{f()},a=f=>{f()},o=Hk;const c=f=>{t?e.push(f):o(()=>{r(f)})},u=()=>{const f=e;e=[],f.length&&o(()=>{a(()=>{f.forEach(p=>{r(p)})})})};return{batch:f=>{let p;t++;try{p=f()}finally{t--,t||u()}return p},batchCalls:f=>(...p)=>{c(()=>{f(...p)})},schedule:c,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{o=f}}}var Kt=qk(),Vk=class extends Xc{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},Uc=new Vk;function Gk(e){return Math.min(1e3*2**e,3e4)}function iw(e){return(e??"online")==="online"?Uc.isOnline():!0}var lh=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function ow(e){let t=!1,r=0,a;const o=$k(),c=()=>o.status!=="pending",u=R=>{if(!c()){const E=new lh(R);b(E),e.onCancel?.(E)}},f=()=>{t=!0},p=()=>{t=!1},m=()=>nw.isFocused()&&(e.networkMode==="always"||Uc.isOnline())&&e.canRun(),y=()=>iw(e.networkMode)&&e.canRun(),g=R=>{c()||(a?.(),o.resolve(R))},b=R=>{c()||(a?.(),o.reject(R))},w=()=>new Promise(R=>{a=E=>{(c()||m())&&R(E)},e.onPause?.()}).then(()=>{a=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let R;const E=r===0?e.initialPromise:void 0;try{R=E??e.fn()}catch(x){R=Promise.reject(x)}Promise.resolve(R).then(g).catch(x=>{if(c())return;const j=e.retry??(aw.isServer()?0:3),N=e.retryDelay??Gk,P=typeof N=="function"?N(r,x):N,J=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,x);if(t||!J){b(x);return}r++,e.onFail?.(r,x),Pk(P).then(()=>m()?void 0:w()).then(()=>{t?b(x):_()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:f,continueRetry:p,canStart:y,start:()=>(y()?_():w().then(_),o)}}var lw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lk(this.gcTime)&&(this.#e=ah.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(aw.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ah.clearTimeout(this.#e),this.#e=void 0)}},Fk=class extends lw{#e;#n;#t;#s;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=s0(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=s0(this.options);t.data!==void 0&&(this.setState(r0(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const r=Uk(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Vn).catch(Vn):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=>Dk(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Eh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ih(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Nk(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#i=!0,r.signal)})},o=()=>{const f=sw(this.options,t),m=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(y),y})();return this.#i=!1,this.options.persister?this.options.persister(f,m,this):f(m)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return a(f),f})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=ow({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof lh&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(f,p)=>{this.#o({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof lh){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Kk(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...r0(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Kt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function Kk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function r0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function s0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function a0(e){return{onFetch:(t,r)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=_=>{Ik(_,()=>t.signal,()=>y=!0)},b=sw(t.options,t.fetchOptions),w=async(_,R,E)=>{if(y)return Promise.reject();if(R==null&&_.pages.length)return Promise.resolve(_);const j=(()=>{const q={client:t.client,queryKey:t.queryKey,pageParam:R,direction:E?"backward":"forward",meta:t.options.meta};return g(q),q})(),N=await b(j),{maxPages:P}=t.options,J=E?Bk:zk;return{pages:J(_.pages,N,P),pageParams:J(_.pageParams,R,P)}};if(o&&c.length){const _=o==="backward",R=_?Yk:i0,E={pages:c,pageParams:u},x=R(a,E);f=await w(E,x,_)}else{const _=e??c.length;do{const R=p===0?u[0]??a.initialPageParam:i0(a,f);if(p>0&&R==null)break;f=await w(f,R),p++}while(p<_)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function i0(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function Yk(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var Qk=class extends lw{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||Jk(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=ow({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#r({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",o=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const c=await this.#s.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,r),await this.options.onSuccess?.(c,e,this.state.context,r),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(c,null,e,this.state.context,r),this.#r({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Kt.batch(()=>{this.#n.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Jk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xk=class extends Xc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,r){const a=new Qk({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=fc(e);if(typeof t=="string"){const r=this.#n.get(t);r?r.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=fc(e);if(typeof t=="string"){const r=this.#n.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=fc(e);if(typeof t=="string"){const a=this.#n.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=fc(e);return typeof t=="string"?this.#n.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Kt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>e0(t,r))}findAll(e={}){return this.getAll().filter(t=>e0(e,t))}notify(e){Kt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Kt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Vn))))}};function fc(e){return e.options.scope?.id}var Zk=class extends Xc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,o=t.queryHash??Sh(a,t);let c=this.get(o);return c||(c=new Fk({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:r,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(){Kt.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(r=>Wv(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Wv(e,r)):t}notify(e){Kt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wk=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new Zk,this.#n=e.mutationCache||new Xk,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=nw.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Uc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ih(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(a.queryHash)?.state.data,u=jk(t,c);if(u!==void 0)return this.#e.build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Kt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Kt.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Kt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(a).then(Vn).catch(Vn)}invalidateQueries(e,t={}){return Kt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Kt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,r);return r.throwOnError||(c=c.catch(Vn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(Vn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(ih(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vn).catch(Vn)}fetchInfiniteQuery(e){return e.behavior=a0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vn).catch(Vn)}ensureInfiniteQueryData(e){return e.behavior=a0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Uc.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#s.set(Mo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],r={};return t.forEach(a=>{Po(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Mo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{Po(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sh(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===Eh&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},e2=re.createContext(void 0),t2=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(e2.Provider,{value:e,children:t}));function n2(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const r2=e=>{switch(e){case"success":return i2;case"info":return l2;case"warning":return o2;case"error":return c2;default:return null}},s2=Array(12).fill(0),a2=({visible:e,className:t})=>te.createElement("div",{className:["sonner-loading-wrapper",t].filter(
vendor: 5,609 bytes, line 40
40Boolean).join(" "),"data-visible":e},te.createElement("div",{className:"sonner-spinner"},s2.map((r,a)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),i2=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),o2=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.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"})),l2=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),c2=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),u2=te.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"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),d2=()=>{const[e,t]=te.useState(document.hidden);return te.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let ch=1;class f2{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:a,...o}=t,c=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:ch++,u=this.toasts.find(p=>p.id===c),f=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:f,title:a}):p):this.addToast({title:a,...o,dismissible:f,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let c=a!==void 0,u;const f=o.then(async m=>{if(u=["resolve",m],te.isValidElement(m))c=!1,this.create({id:a,type:"default",message:m});else if(p2(m)&&!m.ok){c=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,..._})}else if(m instanceof Error){c=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:b,..._})}else if(r.success!==void 0){c=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,_=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:b,..._})}}).catch(async m=>{if(u=["reject",m],r.error!==void 0){c=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,w=typeof y=="object"&&!te.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:g,...w})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((m,y)=>f.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,r)=>{const a=r?.id||ch++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const on=new f2,h2=(e,t)=>
40{const r=t?.id||ch++;return on.addToast({title:e,...t,id:r}),r},p2=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",m2=h2,g2=()=>on.toasts,y2=()=>on.getActiveToasts(),VM=Object.assign(m2,{success:on.success,info:on.info,warning:on.warning,error:on.error,custom:on.custom,message:on.message,promise:on.promise,dismiss:on.dismiss,loading:on.loading},{getHistory:g2,getToasts:y2});n2
vendor: 14,873 bytes, line 40
40("[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;left: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,433 bytes, line 40
40hc(e){return e.label!==void 0}const v2=3,b2="24px",w2="16px",o0=4e3,_2=356,S2=14,E2=45,x2=200;function tr(...e){return e.filter(Boolean).join(" ")}function R2(e){const[t,r]=e.split("-"),a=[];return t&&a.push(t),r&&a.push(r),a}const T2=e=>{var t,r,a,o,c,u,f,p,m;const{invert:y,toast:g,unstyled:b,interacting:w,setHeights:_,visibleToasts:R,heights:E,index:x,toasts:j,expanded:N,removeToast:P,defaultRichColors:J,closeButton:q,style:H,cancelButtonStyle:U,actionButtonStyle:X,className:oe="",descriptionClassName:se="",duration:Se,position:Te,gap:$e,expandByDefault:je,classNames:M,icons:Q,closeButtonAriaLabel:ie="Close toast"}=e,[Ae,ee]=te.useState(null),[O,G]=te.useState(null),[K,W]=te.useState(!1),[Z,ae]=te.useState(!1),[xe,we]=te.useState(!1),[ye,jt]=te.useState(!1),[yt,ct]=te.useState(!1),[Mn,vt]=te.useState(0),[Rs,or]=te.useState(0),Kn=te.useRef(g.duration||Se||o0),_n=te.useRef(null),Lt=te.useRef(null),fn=x===0,Ts=x+1<=R,Et=g.type,Yn=g.dismissible!==!1,xt=g.className||"",Ve=g.descriptionClassName||"",rt=te.useMemo(()=>E.findIndex(Ee=>Ee.toastId===g.id)||0,[E,g.id]),Sn=te.useMemo(()=>{var Ee;return(Ee=g.closeButton)!=null?Ee:q},[g.closeButton,q]),lr=te.useMemo(()=>g.duration||Se||o0,[g.duration,Se]),pi=te.useRef(0),cr=te.useRef(0),Io=te.useRef(0),Ur=te.useRef(null),[As,Gt]=Te.split("-"),Pn=te.useMemo(()=>E.reduce((Ee,We,Rt)=>Rt>=rt?Ee:Ee+We.height,0),[E,rt]),It=d2(),Wc=g.invert||y,mi=Et==="loading";cr.current=te.useMemo(()=>rt*$e+Pn,[rt,Pn]),te.useEffect(()=>{Kn.current=lr},[lr]),te.useEffect(()=>{W(!0)},[]),te.useEffect(()=>{const Ee=Lt.current;if(Ee){const We=Ee.getBoundingClientRect().height;return or(We),_(Rt=>[{toastId:g.id,height:We,position:g.position},...Rt]),()=>_(Rt=>Rt.filter($t=>$t.toastId!==g.id))}},[_,g.id]),te.useLayoutEffect(()=>{if(!K)return;const Ee=Lt.current,We=Ee.style.height;Ee.style.height="auto";const Rt=Ee.getBoundingClientRect().height;Ee.style.height=We,or(Rt),_($t=>$t.find(nt=>nt.toastId===g.id)?$t.map(nt=>nt.toastId===g.id?{...nt,height:Rt}:nt):[{toastId:g.id,height:Rt,position:g.position},...$t])},[K,g.title,g.description,_,g.id,g.jsx,g.action,g.cancel]);const Qn=te.useCallback(()=>{ae(!0),vt(cr.current),_(Ee=>Ee.filter(We=>We.toastId!==g.id)),setTimeout(()=>{P(g)},x2)},[g,P,_,cr]);te.useEffect(()=>{if(g.promise&&Et==="loading"||g.duration===1/0||g.type==="loading")return;let Ee;return N||w||It?(()=>{if(Io.current<pi.current){const $t=new Date().getTime()-pi.current;
vendor: 5,628 bytes, line 40
40Kn.current=Kn.current-$t}Io.current=new Date().getTime()})():Kn.current!==1/0&&(pi.current=new Date().getTime(),Ee=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Qn()},Kn.current)),()=>clearTimeout(Ee)},[N,w,g,Et,It,Qn]),te.useEffect(()=>{g.delete&&(Qn(),g.onDismiss==null||g.onDismiss.call(g,g))},[Qn,g.delete]);function ca(){var Ee;if(Q?.loading){var We;return te.createElement("div",{className:tr(M?.loader,g==null||(We=g.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":Et==="loading"},Q.loading)}return te.createElement(a2,{className:tr(M?.loader,g==null||(Ee=g.classNames)==null?void 0:Ee.loader),visible:Et==="loading"})}const ua=g.icon||Q?.[Et]||r2(Et);var Cs,Jn;return te.createElement("li",{tabIndex:0,ref:Lt,className:tr(oe,xt,M?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,M?.default,M?.[Et],g==null||(r=g.classNames)==null?void 0:r[Et]),"data-sonner-toast":"","data-rich-colors":(Cs=g.richColors)!=null?Cs:J,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":K,"data-promise":!!g.promise,"data-swiped":yt,"data-removed":Z,"data-visible":Ts,"data-y-position":As,"data-x-position":Gt,"data-index":x,"data-front":fn,"data-swiping":xe,"data-dismissible":Yn,"data-type":Et,"data-invert":Wc,"data-swipe-out":ye,"data-swipe-direction":O,"data-expanded":!!(N||je&&K),"data-testid":g.testId,style:{"--index":x,"--toasts-before":x,"--z-index":j.length-x,"--offset":`${Z?Mn:cr.current}px`,"--initial-height":je?"auto":`${Rs}px`,...H,...g.style},onDragEnd:()=>{we(!1),ee(null),Ur.current=null},onPointerDown:Ee=>{Ee.button!==2&&(mi||!Yn||(_n.current=new Date,vt(cr.current),Ee.target.setPointerCapture(Ee.pointerId),Ee.target.tagName!=="BUTTON"&&(we(!0),Ur.current={x:Ee.clientX,y:Ee.clientY})))},onPointerUp:()=>{var Ee,We,Rt;if(ye||!Yn)return;Ur.current=null;const $t=Number(((Ee=Lt.current)==null?void 0:Ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zr=Number(((We=Lt.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),nt=new Date().getTime()-((Rt=_n.current)==null?void 0:Rt.getTime()),Qt=Ae==="x"?$t:zr,Os=Math.abs(Qt)/nt;if(Math.abs(Qt)>=E2||Os>.11){vt(cr.current),g.onDismiss==null||g.onDismiss.call(g,g),G(Ae==="x"?$t>0?"right":"left":zr>0?"down":"up"),Qn(),jt(!0);return}else{var Jt,Xt;(Jt=Lt.current)==null||Jt.style.setProperty("--swipe-amount-x","0px"),(Xt=Lt.current)==null||Xt.style.setProperty("--swipe-amount-y","0px")}ct(!1),we(!1),ee(null)},onPointerMove:Ee=>{var We,Rt,$t;if(!Ur.current||!Yn||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const nt=Ee.clientY-Ur.current.y,Qt=Ee.clientX-Ur.current.x;var Os;const Jt=(Os=e.swipeDirections)!=null?Os:R2(Te);!Ae&&(Math.abs(Qt)>1||Math.abs(nt)>1)&&ee(Math.abs(Qt)>Math.abs(nt)?"x":"y");let Xt={x:0,y:0};const da=Un=>1/(1.5+Math.abs(Un)/20);if(Ae==="y"){if(Jt.includes("top")||Jt.includes("bottom"))if(Jt.includes("top")&&nt<0||Jt.includes("bottom")&&nt>0)Xt.y=nt;else{const Un=nt*da(nt);Xt.y=Math.abs(Un)<Math.abs(nt)?Un:nt}}else if(Ae==="x"&&(Jt.includes("left")||Jt.includes("right")))if(Jt.includes("left")&&Qt<0||Jt.includes("right")&&Qt>0)Xt.x=Qt;else{const Un=Qt*da(Qt);Xt.x=Math.abs(Un)<Math.abs(Qt)?Un:Qt}(Math.abs(Xt.x)>0||Math.abs(Xt.y)>0)&&ct(!0),(Rt=Lt.current)==null||Rt.style.setProperty("--swipe-amount-x",`${Xt.x}px`),($t=Lt.current)==null||$t.style.setProperty("--swipe-amount-y",`${Xt.y}px`)}},Sn&&!g.jsx&&Et!=="loading"?te.createElement("button",{"aria-label":ie,"data-disabled":mi,"data-close-button":!0,onClick:mi||!Yn?()=>{}:()=>{Qn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:tr(M?.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Jn=Q?.close)!=null?Jn:u2):null,(Et||g.icon||g.promise)&&g.icon!==null&&(Q?.[Et]!==null||g.icon)?te.createElement("div",{"data-icon":"",className:tr(M?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||ca():null,g.type!=="loading"?ua:null):null,te.createElement("div",{"data-content":"",className:tr(M?.content,g==null||(c=g.classNames)==null?void 0:c.content)},te.createElement("div",{"data-title":"",className:tr(M?.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?te.createElement("div",{"data-description":"",className:tr(se,Ve,M?.description,g==null||(f=g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),te.isValidElement(g.cancel)?g.cancel:g.cancel&&hc(g.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||U,onClick:Ee=>{hc(g.cancel)&&Yn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Ee),Qn())},className:tr(M?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,te.isValidElement(g.action)?g.action:g.action&&hc(g.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||X,onClick:Ee=>{hc(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Ee),!Ee.defaultPrevented&&Qn())},className:tr(M?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function l0(){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 A2(e,t){const r={};return[e,t].forEach((a,o)=>{const c=o===1,u=c?"--mobile-offset":"--offset",f=c?w2:b2;function p(m){["top","right","bottom","left"].forEach(y=>{r[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}
vendor: 4,180 bytes, line 40
40typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(m=>{a[m]===void 0?r[`${u}-${m}`]=f:r[`${u}-${m}`]=typeof a[m]=="number"?`${a[m]}px`:a[m]}):p(f)}),r}const C2=te.forwardRef(function(t,r){const{id:a,invert:o,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:w,duration:_,style:R,visibleToasts:E=v2,toastOptions:x,dir:j=l0(),gap:N=S2,icons:P,containerAriaLabel:J="Notifications"}=t,[q,H]=te.useState([]),U=te.useMemo(()=>a?q.filter(K=>K.toasterId===a):q.filter(K=>!K.toasterId),[q,a]),X=te.useMemo(()=>Array.from(new Set([c].concat(U.filter(K=>K.position).map(K=>K.position)))),[U,c]),[oe,se]=te.useState([]),[Se,Te]=te.useState(!1),[$e,je]=te.useState(!1),[M,Q]=te.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ie=te.useRef(null),Ae=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=te.useRef(null),O=te.useRef(!1),G=te.useCallback(K=>{H(W=>{var Z;return(Z=W.find(ae=>ae.id===K.id))!=null&&Z.delete||on.dismiss(K.id),W.filter(({id:ae})=>ae!==K.id)})},[]);return te.useEffect(()=>on.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{H(W=>W.map(Z=>Z.id===K.id?{...Z,delete:!0}:Z))});return}setTimeout(()=>{jT.flushSync(()=>{H(W=>{const Z=W.findIndex(ae=>ae.id===K.id);return Z!==-1?[...W.slice(0,Z),{...W[Z],...K},...W.slice(Z+1)]:[K,...W]})})})}),[q]),te.useEffect(()=>{if(b!=="system"){Q(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:W})=>{Q(W?"dark":"light")})}catch{K.addListener(({matches:Z})=>{try{Q(Z?"dark":"light")}catch(ae){console.error(ae)}})}},[b]),te.useEffect(()=>{q.length<=1&&Te(!1)},[q]),te.useEffect(()=>{const K=W=>{var Z;if(u.every(we=>W[we]||W.code===we)){var xe;Te(!0),(xe=ie.current)==null||xe.focus()}W.code==="Escape"&&(document.activeElement===ie.current||(Z=ie.current)!=null&&Z.contains(document.activeElement))&&Te(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[u]),te.useEffect(()=>{if(ie.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,O.current=!1)}},[ie.current]),te.createElement("section",{ref:r,"aria-label":`${J} ${Ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},X.map((K,W)=>{var Z;const[ae,xe]=K.split("-");return U.length?te.createElement("ol",{key:K,dir:j==="auto"?l0():j,tabIndex:-1,ref:ie,className:m,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":ae,"data-x-position":xe,style:{"--front-toast-height":`${((Z=oe[0])==null?void 0:Z.height)||0}px`,"--width":`${_2}px`,"--gap":`${N}px`,...R,...A2(y,g)},onBlur:we=>{O.current&&!we.currentTarget.contains(we.relatedTarget)&&(O.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||O.current||(O.current=!0,ee.current=we.relatedTarget)},onMouseEnter:()=>Te(!0),onMouseMove:()=>Te(!0),onMouseLeave:()=>{$e||Te(!1)},onDragEnd:()=>Te(!1),onPointerDown:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||je(!0)},onPointerUp:()=>je(!1)},U.filter(we=>!we.position&&W===0||we.position===K).map((we,ye)=>{var jt,yt;return te.createElement(T2,{key:we.id,icons:P,index:ye,toast:we,defaultRichColors:w,duration:(jt=x?.duration)!=null?jt:_,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(yt=x?.closeButton)!=null?yt:p,interacting:$e,position:K,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,closeButtonAriaLabel:x?.closeButtonAriaLabel,removeToast:G,toasts:U.filter(ct=>ct.position==we.position),heights:oe.filter(ct=>ct.position==we.position),setHeights:se,expandByDefault:f,gap:N,exp
40anded:Se,swipeDirections:t.swipeDirections})})):null}))}),O2="/assets/styles-DgxVdgR9.css";function k2(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function j2(){return k.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:k.jsxs("div",{className:"max-w-md text-center",children:[k.jsx("h1",{className:"font-display text-7xl font-extrabold text-ink",children:"404"}),k.jsx("h2",{className:"mt-4 font-display text-xl font-bold text-ink",children:"Page not found"}),k.jsx("p",{className:"mt-2 text-sm text-ink-soft",children:"The page you're looking for doesn't exist or has been moved."}),k.jsx("div",{className:"mt-6",children:k.jsx(cn,{to:"/",className:"inline-flex items-center justify-center rounded-full bg-ink px-5 py-2 text-sm font-semibold text-paper transition-colors hover:opacity-90",children:"Go home"})})]})})}function L2({error:e,reset:t}){console.error(e);const r=Bt();return re.useEffect(()=>{k2(e,{boundary:"tanstack_root_error_component"})},[e]),k.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:k.jsxs("div",{className:"max-w-md text-center",children:[k.jsx("h1",{className:"font-display text-xl font-bold text-ink",children:"This page didn't load"}),k.jsx("p",{className:"mt-2 text-sm text-ink-soft",children:"Something went wrong on our end. You can try refreshing or head back home."}),k.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[k.jsx("button",{onClick:()=>{r.invalidate(),t()},className:"inline-flex items-center justify-center rounded-full bg-ink px-5 py-2 text-sm font-semibold text-paper transition-colors hover:opacity-90",children:"Try again"}),k.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-full border border-border bg-card px-5 py-2 text-sm font-semibold text-ink transition-colors hover:bg-secondary",children:"Go home"})]})]})})}const _e=qT()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Le Collectif â Brief-led content, faster"},{name:"description",content:"Brief-led video content shot by vetted local creators. AI-powered social listening, auto subclipping, and asset library."},{name:"author",content:"Le Collectif"},{property:"og:title",content:"Le Collectif â Brief-led content, faster"},{property:"og:description",content:"Brief-led video content shot by vetted local creators. AI-powered social listening, auto subclipping, and asset library."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Le Collectif â Brief-led content, faster"},{name:"description",content:"Trend Spark is a content creation platform that uses social listening to generate briefs and stock footage."},{property:"og:description",content:"Trend Spark is a content creation platform that uses social listening to generate briefs and stock footage."},{name:"twitter:description",content:"Trend Spark is a content creation platform that uses social listening to generate briefs and stock footage."},{property:"og:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/25d36690-3e3f-4ead-af86-084fc381a613/id-preview-29cd9fd3--d6a84931-957b-4aa4-9c70-05affc7ace21.lovable.app-1780550700452.png"},{name:"twitter:image",content:"https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/25d36690-3e3f-4ead-af86-084fc381a613/id-preview-29cd9fd3--d6a84931-957b-4aa4-9c70-05affc7ace21.lovable.app-1780550700452.png"},{name:"theme-color",content:"#0D0D0D"}],links:[{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap"},{rel:"stylesheet",href:O2}]}),shellComponent:N2,component:D2,notFoundComponent:j2,errorComponent:L2});function N2({children:e}){return k.jsxs("html",{lang:"en",children:[k.jsxs("head",{children:[k.jsx("link",{rel:"icon",type:"image/svg+xml",href:"/favicon.svg"}),k.jsx("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32.png"}),k.jsx("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16.png"}),k.jsx("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/favicon-180.png"}),k.jsx("script",{async:!0,src:"https://www.googletagmanager.com/gtag/js?i
40d=G-X06NCV58EN"}),k.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`
vendor: 127 bytes, lines 40-43
40window.dataLayer = window.dataLayer || []; 41function gtag(){dataLayer.push(arguments);} 42gtag('js', new Date()); 43gtag('config', '
43G-X06NCV58EN
vendor: 3 bytes, line 43
43');
43`}}),k.jsx(uA,{})]}),k.jsxs("body",{children:[e,k.jsx(dA,{})]})]})}function D2(){const{queryClient:e}=_e.useRouteContext();return k.jsxs(t2,{client:e,children:[k.jsx(kb,{}),k.jsx(C2,{position:"top-right",richColors:!0,closeButton:!0})]})}const M2="modulepreload",P2=function(e){return"/"+e},c0={},ce=function(t,r,a){let o=Promise.resolve();if(r&&r.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]"),f=u?.nonce||u?.getAttribute("nonce");o=p(r.map(m=>{if(m=P2(m),m in c0)return;c0[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":M2,y||(b.as="script"),b.crossOrigin="",b.href=m,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((w,_)=>{b.addEventListener("load",w),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})},U2=()=>ce(()=>import("./terms-CNTM5PZD.js"),__vite__mapDeps([0,1,2,3])),z2=ge("/terms")({head:()=>({meta:[{title:"Terms of Service â Le Collectif"},{name:"description",content:"Le Collectif Terms of Service â the rules governing use of our platform by creators and brands."}],links:[{rel:"canonical",href:"https://lecollectif-tv.lovable.app/terms"}]}),component:he(U2,"component")});const cw=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();const B2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const I2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());const u0=e=>{const t=I2(e);return t.charAt(0).toUpperCase()+t.slice(1)};var $2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const H2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const q2=re.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:o="",children:c,iconNode:u,...f},p)=>re.createElement("svg",{ref:p,...$2,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:cw("lucide",o),...!c&&!H2(f)&&{"aria-hidden":"true"},...f},[...u.map(([m,y])=>re.createElement(m,y)),...Array.isArray(c)?c:[c]]));const Fn=(e,t)=>{const r=re.forwardRef(({className:a,...o},c)=>re.createElement(q2,{ref:c,iconNode:t,className:cw(`lucide-${B2(u0(e))}`,`lucide-${e}`,a),...o}));return r.displayName=u0(e),r};const V2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],G2=Fn("arrow-right",V2);const F2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],K2=Fn("circle-check",F2);const Y2=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],Q2=Fn("coins",Y2);const J2=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],X2=Fn("eye-off",J2);const Z2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],W2=Fn("eye",Z2);const ej=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],tj=Fn("file-text",ej);const nj=[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]],rj=Fn("hand",nj);const sj=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],d0=Fn("instagram",sj);const aj=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],ij=Fn("log-out",aj);
vendor: 4,919 bytes, line 43
43const oj=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],lj=Fn("upload",oj);const cj=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],f0=Fn("youtube",cj);function uw(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=uw(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function uj(){for(var e,t,r=0,a="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=uw(e))&&(a&&(a+=" "),a+=t);return a}const dj=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},fj=(e,t)=>({classGroupId:e,validator:t}),dw=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),zc="-",h0=[],hj="arbitrary..",pj=e=>{const t=gj(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return mj(u);const f=u.split(zc),p=f[0]===""&&f.length>1?1:0;return fw(f,p,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const p=a[u],m=r[u];return p?m?dj(m,p):p:m||h0}return r[u]||h0}}},fw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],c=r.nextPart.get(o);if(c){const m=fw(e,t+1,c);if(m)return m}const u=r.validators;if(u===null)return;const f=t===0?e.join(zc):e.slice(t).join(zc),p=u.length;for(let m=0;m<p;m++){const y=u[m];if(y.validator(f))return y.classGroupId}},mj=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?hj+a:void 0})(),gj=e=>{const{theme:t,classGroups:r}=e;return yj(r,t)},yj=(e,t)=>{const r=dw();for(const a in e){const o=e[a];xh(o,r,a,t)}return r},xh=(e,t,r,a)=>{const o=e.length;for(let c=0;c<o;c++){const u=e[c];vj(u,t,r,a)}},vj=(e,t,r,a)=>{if(typeof e=="string"){bj(e,t,r);return}if(typeof e=="function"){wj(e,t,r,a);return}_j(e,t,r,a)},bj=(e,t,r)=>{const a=e===""?t:hw(t,e);a.classGroupId=r},wj=(e,t,r,a)=>{if(Sj(e)){xh(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(fj(r,e))},_j=(e,t,r,a)=>{const o=Object.entries(e),c=o.length;for(let u=0;u<c;u++){const[f,p]=o[u];xh(p,hw(t,f),r,a)}},hw=(e,t)=>{let r=e;const a=t.split(zc),o=a.length;for(let c=0;c<o;c++){const u=a[c];let f=r.nextPart.get(u);f||(f=dw(),r.nextPart.set(u,f)),r=f}return r},Sj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ej=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const o=(c,u)=>{r[c]=u,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=a[c])!==void 0)return o(c,u),u},set(c,u){c in r?r[c]=u:o(c,u)}}},uh="!",p0=":",xj=[],m0=(e,t,r,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:o}),Rj=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=o=>{const c=[];let u=0,f=0,p=0,m;const y=o.length;for(let R=0;R<y;R++){const E=o[R];if(u===0&&f===0){if(E===p0){c.push(o.slice(p,R)),p=R+1;continue}if(E==="/"){m=R;continue}}E==="["?u++:E==="]"?u--:E==="("?f++:E===")"&&f--}const g=c.length===0?o:o.slice(p);let b=g,w=!1;g.endsWith(uh)?(b=g.slice(0,-1),w=!0):g.startsWith(uh)&&(b=g.slice(1),w=!0);const _=m&&m>p?m-p:void 0;return m0(c,w,b,_)};if(t){const o=t+p0,c=a;a=u=>u.startsWith(o)?c(u.slice(o.length)):m0(xj,!1,u,void 0,!0)}if(r){const o=a;a=c=>r({className:c,parseClassName:o})}return a},Tj=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let o=[];for(let c=0;c<r.length;c++){const u=r[c],f=u[0]==="[",p=t.has(u);f||p?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},Aj=e=>({cache:Ej(e.cacheSize),parseClassName:Rj(e),sortModifiers:Tj(e),...pj(e)}),Cj=/\s+/,Oj=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:c}=t,u=[],f=e.trim().split(Cj);let p="";for(let m=f.length-1;m>=0;m-=1){const y=f[m],{isExternal:g,modifiers:b,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:R}=r(y);if(g){p=y+(p.length>0?" "+p:p);continue}let E=!!R,x=a(E?_.substring(0,R):_);if(!x){if(!E){p=y+(p.length>0?" "+p:p);continue}if(x=a(_),!x){p=y+(p.length>0?" "+p:p);continue}E=!1}const j=b.length===0?"":b.length===1?b[0]:c(b).join(":"),N=w?j+uh:j,P=N+x;if(u.indexOf(P)>-1)continue;u.push(P);const J=o(x,E);for(let q=0;q<J.length;++q){const H=J[q];u.push(N+H)}p=y+(p.length>0?" "+p:p)}return p},kj=(...e)=>{let t=0,r,a,o="";for(;t<e.length;)(r=e[t++])&&(a=pw(r))&&(o&&(o+=" "),o+=a);return o},pw=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;
vendor: 4,254 bytes, line 43
43a++)e[a]&&(t=pw(e[a]))&&(r&&(r+=" "),r+=t);return r},jj=(e,...t)=>{let r,a,o,c;const u=p=>{const m=t.reduce((y,g)=>g(y),e());return r=Aj(m),a=r.cache.get,o=r.cache.set,c=f,f(p)},f=p=>{const m=a(p);if(m)return m;const y=Oj(p,r);return o(p,y),y};return c=u,(...p)=>c(kj(...p))},Lj=[],wt=e=>{const t=r=>r[e]||Lj;return t.isThemeGetter=!0,t},mw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Nj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Dj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Pj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cs=e=>Nj.test(e),ke=e=>!!e&&!Number.isNaN(Number(e)),us=e=>!!e&&Number.isInteger(Number(e)),zf=e=>e.endsWith("%")&&ke(e.slice(0,-1)),kr=e=>Dj.test(e),yw=()=>!0,Bj=e=>Mj.test(e)&&!Pj.test(e),Rh=()=>!1,Ij=e=>Uj.test(e),$j=e=>zj.test(e),Hj=e=>!ue(e)&&!fe(e),qj=e=>xs(e,ww,Rh),ue=e=>mw.test(e),Js=e=>xs(e,_w,Bj),g0=e=>xs(e,Xj,ke),Vj=e=>xs(e,Ew,yw),Gj=e=>xs(e,Sw,Rh),y0=e=>xs(e,vw,Rh),Fj=e=>xs(e,bw,$j),pc=e=>xs(e,xw,Ij),fe=e=>gw.test(e),mo=e=>la(e,_w),Kj=e=>la(e,Sw),v0=e=>la(e,vw),Yj=e=>la(e,ww),Qj=e=>la(e,bw),mc=e=>la(e,xw,!0),Jj=e=>la(e,Ew,!0),xs=(e,t,r)=>{const a=mw.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},la=(e,t,r=!1)=>{const a=gw.exec(e);return a?a[1]?t(a[1]):r:!1},vw=e=>e==="position"||e==="percentage",bw=e=>e==="image"||e==="url",ww=e=>e==="length"||e==="size"||e==="bg-size",_w=e=>e==="length",Xj=e=>e==="number",Sw=e=>e==="family-name",Ew=e=>e==="number"||e==="weight",xw=e=>e==="shadow",Zj=()=>{const e=wt("color"),t=wt("font"),r=wt("text"),a=wt("font-weight"),o=wt("tracking"),c=wt("leading"),u=wt("breakpoint"),f=wt("container"),p=wt("spacing"),m=wt("radius"),y=wt("shadow"),g=wt("inset-shadow"),b=wt("text-shadow"),w=wt("drop-shadow"),_=wt("blur"),R=wt("perspective"),E=wt("aspect"),x=wt("ease"),j=wt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...P(),fe,ue],q=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],U=()=>[fe,ue,p],X=()=>[cs,"full","auto",...U()],oe=()=>[us,"none","subgrid",fe,ue],se=()=>["auto",{span:["full",us,fe,ue]},us,fe,ue],Se=()=>[us,"auto",fe,ue],Te=()=>["auto","min","max","fr",fe,ue],$e=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],je=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...U()],Q=()=>[cs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],ie=()=>[cs,"screen","full","dvw","lvw","svw","min","max","fit",...U()],Ae=()=>[cs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],ee=()=>[e,fe,ue],O=()=>[...P(),v0,y0,{position:[fe,ue]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",Yj,qj,{size:[fe,ue]}],W=()=>[zf,mo,Js],Z=()=>["","none","full",m,fe,ue],ae=()=>["",ke,mo,Js],xe=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[ke,zf,v0,y0],jt=()=>["","none",_,fe,ue],yt=()=>["none",ke,fe,ue],ct=()=>["none",ke,fe,ue],Mn=()=>[ke,fe,ue],vt=()=>[cs,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[kr],breakpoint:[kr],color:[yw],container:[kr],"drop-shadow":[kr],ease:["in","out","in-out"],font:[Hj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[kr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[kr],shadow:[kr],spacing:["px",ke],text:[kr],"text-shadow":[kr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cs,ue,fe,E]}
vendor: 6,120 bytes, line 43
43],container:["container"],columns:[{columns:[ke,ue,fe,f]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:J()}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{"inset-s":X(),start:X()}],end:[{"inset-e":X(),end:X()}],"inset-bs":[{"inset-bs":X()}],"inset-be":[{"inset-be":X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[us,"auto",fe,ue]}],basis:[{basis:[cs,"full","auto",f,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,cs,"auto","initial","none",ue]}],grow:[{grow:["",ke,fe,ue]}],shrink:[{shrink:["",ke,fe,ue]}],order:[{order:[us,"first","last","none",fe,ue]}],"grid-cols":[{"grid-cols":oe()}],"col-start-end":[{col:se()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":oe()}],"row-start-end":[{row:se()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Te()}],"auto-rows":[{"auto-rows":Te()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...$e(),"normal"]}],"justify-items":[{"justify-items":[...je(),"normal"]}],"justify-self":[{"justify-self":["auto",...je()]}],"align-content":[{content:["normal",...$e()]}],"align-items":[{items:[...je(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...je(),{baseline:["","last"]}]}],"place-content":[{"place-content":$e()}],"place-items":[{"place-items":[...je(),"baseline"]}],"place-self":[{"place-self":["auto",...je()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...Ae()]}],"min-block-size":[{"min-block":["auto",...Ae()]}],"max-block-size":[{"max-block":["none",...Ae()]}],w:[{w:[f,"screen",...Q()]}],"min-w":[{"min-w":[f,"screen","none",...Q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,mo,Js]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Jj,Vj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zf,ue]}],"font-family":[{font:[Kj,Gj,t]}],"font-features":[{"font-features":[ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,fe,ue]}],"line-clamp":[{"line-clamp":[ke,"none",fe,g0]}],leading:[{leading:[c,...U()]}],"list-image":[{"list-image":["none",fe,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",fe,Js]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[ke,"auto",fe,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},us,fe,ue],radial:["",fe,ue],conic:[us,fe,ue]},Qj,Fj]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:W()}
vendor: 6,819 bytes, line 43
43],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,fe,ue]}],"outline-w":[{outline:["",ke,mo,Js]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",y,mc,pc]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",g,mc,pc]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[ke,Js]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",b,mc,pc]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[ke,fe,ue]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[fe,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,ue]}],filter:[{filter:["","none",fe,ue]}],blur:[{blur:jt()}],brightness:[{brightness:[ke,fe,ue]}],contrast:[{contrast:[ke,fe,ue]}],"drop-shadow":[{"drop-shadow":["","none",w,mc,pc]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",ke,fe,ue]}],"hue-rotate":[{"hue-rotate":[ke,fe,ue]}],invert:[{invert:["",ke,fe,ue]}],saturate:[{saturate:[ke,fe,ue]}],sepia:[{sepia:["",ke,fe,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,ue]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,fe,ue]}],"backdrop-contrast":[{"backdrop-contrast":[ke,fe,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,fe,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,fe,ue]}],"backdrop-invert":[{"backdrop-invert":["",ke,fe,ue]}],"backdrop-opacity":[{"backdrop-opacity":[ke,fe,ue]}],"backdrop-saturate":[{"backdrop-saturate":[ke,fe,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,fe,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",fe,ue]}],ease:[{ease:["linear","initial",x,fe,ue]}],delay:[{delay:[ke,fe,ue]}],animate:[{animate:["none",j,fe,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,fe,ue]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:yt()}],"rotate-x":[{"rotate-x":yt()}],"rotate-y":[{"rotate-y":yt()}],"rotate-z":[{"rotate-z":yt()}
vendor: 5,718 bytes, line 43
43],scale:[{scale:ct()}],"scale-x":[{"scale-x":ct()}],"scale-y":[{"scale-y":ct()}],"scale-z":[{"scale-z":ct()}],"scale-3d":["scale-3d"],skew:[{skew:Mn()}],"skew-x":[{"skew-x":Mn()}],"skew-y":[{"skew-y":Mn()}],transform:[{transform:[fe,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:vt()}],"translate-x":[{"translate-x":vt()}],"translate-y":[{"translate-y":vt()}],"translate-z":[{"translate-z":vt()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",fe,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",fe,ue]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[ke,mo,Js,g0]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Wj=jj(Zj);function eL(...e){return Wj(uj(e))}const tL="/__l5e/assets-v1/0d5b20d4-59f9-4773-8503-209338185b55/logo-lc-white.svg",nL={url:tL},rL=()=>ce(()=>import("./sign-up-u_lBGM4N.js"),__vite__mapDeps([4,5,6,7])),sL=ge("/sign-up")({head:()=>({meta:[{title:"Sign Up â Le Collectif"},{name:"description",content:"Create your Le Collectif account."}]}),component:he(rL,"component")});
43function GM({title:e,subtitle:t,children:r}){return k.jsxs("div",{className:"flex min-h-screen flex-col bg-[#0D0D0D] text-white",children:[k.jsx("header",{className:"mx-auto flex w-full max-w-[1400px] items-center justify-between px-6 py-6 lg:px-10",children:k.jsx(cn,{to:"/",className:"flex items-center",children:k.jsx("img",{src:nL.url,alt:"LeCollectif",className:"h-8 w-auto"})})}),k.jsx("main",{className:"flex flex-1 items-center justify-center px-6 py-12",children:k.jsxs("div",{className:"w-full max-w-md rounded-3xl border border-white/10 bg-white/[0.03] p-8 backdrop-blur",children:[k.jsx("h1",{className:"font-display text-3xl font-extrabold tracking-tight",children:e}),t?k.jsx("p",{className:"mt-2 text-sm text-white/60",children:t}):null,k.jsx("div",{className:"mt-8",children:r})]})})]})}function FM({label:e,value:t,onChange:r,type:a="text",required:o}){const[c,u]=re.useState(!1),f=a==="password",p=f?c?"text":"password":a;return k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-xs font-semibold uppercase tracking-wider text-white/60",children:e}),k.jsxs("div",{className:"relative",children:[k.jsx("input",{type:p,required:o,value:t,onChange:m=>r(m.target.value),className:eL("w-full rounded-xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white placeholder:text-white/30 focus:border-white/30 focus:outline-none",f&&"pr-10")}),f?k.jsx("button",{type:"button",onClick:()=>u(m=>!m),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/40 hover:text-white focus:outline-none","aria-label":c?"Hide password":"Show password",children:c?k.jsx(X2,{className:"size-4"}):k.jsx(W2,{className:"size-4"})}):null]})]})}function KM({children:e,tone:t="error"}){const r=t==="error"?"border-red-500/30 bg-red-500/10 text-red-200":"border-emerald-500/30 bg-emerald-500/10 text-emerald-200";return k.jsx("div",{className:`mt-4 rounded-xl border px-4 py-3 text-xs ${r}`,children:e})}const aL=()=>ce(()=>import("./sign-in-wPB28jdw.js"),__vite__mapDeps([8,5,6])),iL=ge("/sign-in")({head:()=>({meta:[{title:"Sign In â Le Collectif"},{name:"description",content:"Sign in to Le Collectif."}]}),component:he(aL,"component")}),oL=()=>ce(()=>import("./reset-password-_iLoIW4m.js"),__vite__mapDeps([9,6])),lL=ge("/reset-password")({head:()=>({meta:[{title:"Reset Password â Le Collectif"},{name:"description",content:"Reset your Le Collectif password."}]}),component:he(oL,"component")}),cL=()=>ce(()=>import("./privacy-2NCCv5el.js"),__vite__mapDeps([10,1,2,3])),uL=ge("/privacy")({head:()=>({meta:[{title:"Privacy Policy â Le Collectif"},{name:"description",content:"Le Collectif Privacy Policy â how we collect, use, and protect your personal data."}],links:[{rel:"canonical",href:"https://lecollectif-tv.lovable.app/privacy"}]}),component:he(cL,"component")}),dL=()=>ce(()=>import("./onboarding-DzAvkx2s.js"),__vite__mapDeps([11,6])),fL=ge("/onboarding")({head:()=>({meta:[{title:"Onboarding â Le Collectif"},{name:"description",content:"Tell us about your property."}]}),beforeLoad:async()=>{const{data:e}=await kt.auth.getUser();if(!e.user)throw zt({to:"/sign-in"});const{data:t}=await kt.from("user_roles").select("role").eq("user_id",e.user.id).eq("role","admin").maybeSingle();if(t)throw zt({to:"/admin"});const{data:r}=await kt.from("properties").select("id").eq("user_id",e.user.id).maybeSingle();if(r)throw zt({to:"/app/dashboard"})},component:he(dL,"component")}),hL=()=>ce(()=>import("./login-D_NKEV-q.js"),__vite__mapDeps([12,6])),pL=ge("/login")({head:()=>({meta:[{title:"Login â Le Collectif"},{name:"description",content:"Sign in to Le Collectif to manage briefs, creators, and your content library."}]}),component:he(hL,"component")}),mL=()=>ce(()=>import("./lc-login-DKOdCuKJ.js"),__vite__mapDeps([13,14,15,16,6])),gL=ge("/lc-login")({head:()=>({meta:[{title:"LC Team Login â Le Collectif"},{name:"description",content:"Le Collectif internal team login."},{name:"robots",content:"noindex"}]}),component:he(mL,"component")}),yL=()=>ce(()=>import("./dashboard-DtqBFgK5.js"),[]),vL=ge("/dashboard")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();throw e.session?zt({to:"/app/dashboard"}):zt({to:"/sign-in"})},component:he(yL,"component")}),bL=()=>ce(()=>import("./cookies-C_yXd0ve.js"),__vite__mapDeps([17,1,2,3])),wL=ge("/cookies")({head:()=>({meta:[{title:"Cookie Policy â Le Collectif"},{name:"description",content:"Le Collectif Cookie Policy â what cookies we use and how to control them."}],links:[{rel:"canonical",href:"https://lecollectif-tv.lovable.app/cookie
43s"}]}),component:he(bL,"component")}),_L="/assets/brief-resort-B9u3DEPa.jpg",SL=()=>ce(()=>import("./index-CrUH-W7F.js"),__vite__mapDeps([18,2,19,20,21,22,7])),EL=ge("/")({head:()=>({meta:[{title:"Le Collectif â Brief-led content. More direct bookings."},{name:"description",content:"Brief-led video content shot by vetted local creators â delivered in 14 days. Every direct booking you win back saves 15â30% in OTA commission."},{property:"og:title",content:"Le Collectif â Brief-led content. More direct bookings."},{property:"og:description",content:"Brief-led video content shot by vetted local creators â delivered in 14 days. Every direct booking you win back saves 15â30% in OTA commission."},{property:"og:image",content:_L}]}),component:he(SL,"component")}),xL=()=>ce(()=>import("./briefs.index-CByi3QFk.js"),__vite__mapDeps([23,2,24,25,6,26])),RL=ge("/briefs/")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/sign-in"})},head:()=>({meta:[{title:"My Briefs â Le Collectif"}]}),component:he(xL,"component")});function TL(){const[e,t]=re.useState(null),[r,a]=re.useState(null),[o,c]=re.useState(!0);return re.useEffect(()=>{let u=!0;const f=async m=>{if(!m){u&&(a(null),t(null),c(!1));return}u&&t(m);const{data:y}=await kt.from("creators").select("id, display_name, email, country, platforms, paypal_email, tiktok_handle, instagram_handle, youtube_handle").eq("id",m.id).maybeSingle();u&&(a(y??null),c(!1))};kt.auth.getUser().then(({data:m})=>f(m.user??null));const{data:p}=kt.auth.onAuthStateChange((m,y)=>{(m==="SIGNED_IN"||m==="SIGNED_OUT"||m==="USER_UPDATED")&&f(y?.user??null)});return()=>{u=!1,p.subscription.unsubscribe()}},[]),{user:e,creator:r,loading:o,isAuthenticated:!!e}}const AL="#C9A96E",Rw="amplify_cookie_consent";function CL(){if(typeof window>"u")return null;const e=window.localStorage.getItem(Rw);return e==="accepted"||e==="declined"?e:null}function b0(e){try{const t=window.gtag;typeof t=="function"&&t("consent","update",{analytics_storage:e==="accepted"?"granted":"denied"})}catch{}}function OL(){const[e,t]=re.useState(!1);if(re.useEffect(()=>{const a=CL();a?b0(a):t(!0)},[]),!e)return null;const r=a=>{window.localStorage.setItem(Rw,a),b0(a),t(!1)};return k.jsx("div",{role:"dialog","aria-label":"Cookie consent",className:"fixed inset-x-0 bottom-0 z-[90] border-t border-white/10 bg-[#111]/95 backdrop-blur",children:k.jsxs("div",{className:"mx-auto flex w-full max-w-[1400px] flex-col items-start gap-4 px-6 py-4 sm:flex-row sm:items-center sm:justify-between lg:px-10",children:[k.jsxs("p",{className:"max-w-2xl text-xs leading-relaxed text-white/70",children:["We use cookies for analytics (GA4) and to keep you signed in. We do not use advertising cookies. See our"," ",k.jsx(cn,{to:"/amplify/cookie-policy",className:"underline hover:text-white",children:"Cookie Policy"}),"."]}),k.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[k.jsx("button",{type:"button",onClick:()=>r("declined"),className:"rounded-full border border-white/25 px-4 py-2 text-xs font-semibold text-white/80 hover:border-white/60",children:"Decline"}),k.jsx("button",{type:"button",onClick:()=>r("accepted"),className:"rounded-full px-4 py-2 text-xs font-semibold text-black",style:{backgroundColor:AL},children:"Accept"})]})]})})}const kL="/__l5e/assets-v1/4349479e-4dd0-45c3-a0f4-af45a2071a0f/LeCollectif_Amplify_Dark.svg",jL={url:kL},LL="#C9A96E";function NL(){const{creator:e,isAuthenticated:t,loading:r}=TL();return k.jsxs(k.Fragment,{children:[k.jsx(OL,{}),k.jsxs("header",{className:"mx-auto flex w-full max-w-[1400px] items-center justify-between px-6 py-6 lg:px-10",children:[k.jsx("div",{className:"flex items-center gap-8",children:k.jsx(cn,{to:"/amplify",className:"flex items-center",children:k.jsx("img",{src:jL.url,alt:"Le Collectif Amplify",className:"h-10 w-auto"})})}),k.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[k.jsx(cn,{to:"/amplify/briefs",className:"rounded-full border border-white/20 px-4 py-1.5 text-xs font-semibold text-white/85 hover:border-white/60 hover:text-white",children:"Browse Briefs"}),r?null:t&&e?k.jsxs(k.Fragment,{children:[k.jsx(cn,{to:"/amplify/dashboard",className:"text-white/80 hover:text-white",children:e.display_name}),k.jsxs("button",{type:"button",onClick:async()=>{await kt.auth.signOut(),window.location.href="/amplify"},className:"inline-flex items-center gap-1.5 rounded-full border border-white/20 px-3 py-1.5 text-xs text-white/70 hover:border-white/50 hover:text-white","aria-label":"Sign out",children:[k.jsx(ij,{className:"size-3.5"})," Sign out"]})]}):k.jsxs(k.Fragment,{children:[k.jsx(cn,{to:"/amplify/login",className:"text-white/70 hover:text-white",children:"Log in"}),k.jsx(cn,{to:"/amplify/join",className:"rounded-full px-4 py-1.5 text-xs font-semibold text-black",style:{backgroundColor:LL},children:"Join"})]})]})]})]})}function DL(){return k.jsx("footer",{className:"border-t border-white/10",children:k.jsxs("div",{className:"mx-auto flex w-full max-w-[1400px] flex-col items-center justify-between gap-3 px-6 py-8 text-xs text-white/40 sm:flex-row lg:px-10",children:[k.jsxs("div",{children:["Le Collectif Pte. Ltd. · Singapore · UEN: 202439088N ·"," ",k.jsx("a",{href:"mailto:[email protected]",className:"hover:text-white/80",children:"[email protected]"})]}),k.jsxs("div",{className:"flex items-center gap-5",children:[k.jsx(cn,{to:"/amplify/cookie-policy",className:"hover:text-white/80",children:"Cookie Policy"}),k.jsx(cn,{to:"/amplify/terms",className:"hover:text-white/80",children:"Terms & Conditions"}),k.jsx(cn,{to:"/",className:"hover:text-white/80",children:"â Back to Le Collectif"})]})]})})}const Vt=[{rel:"icon",type:"image/svg+xml",href:"/amplify-favicon.svg"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/amplify-favicon-32.png"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/amplify-favicon-16.png"},{rel:"apple-touch-icon",sizes:"180x180",href:"/amplify-favicon-180.png"}],ML=ge("/amplify/")({head:()=>({links:[...Vt],meta:[{title:"Amplify â Clip it. Post it. Get paid. | Le Collectif"},{name:"description",content:"Amplify connects brands with short-form creators. Brands fund a pool. Earn $1.25+ per 1,000 views â up to $200 per platform, $600 maximum per creator."},{property:"og:title",content:"Amplify â Creator distribution by Le Collectif"},{property:"og:description",content:"Clip it. Post it. Get paid. Earn from verified views on brand-funded short-form campaigns."}]}),component:zL}),Nn="#C9A96E";function w0({className:e,style:t}
43){return k.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:e,style:t,"aria-hidden":"true",children:k.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5.8 20.1a6.34 6.34 0 0 0 10.86-4.43V8.87a8.16 8.16 0 0 0 4.77 1.52V6.94a4.85 4.85 0 0 1-1.84-.25z"})})}const PL=[{n:"01",label:"Client funds pool",icon:Q2,body:"A brand deposits a fixed budget. Creators earn from this pool based on verified views â no auctions, no bidding."},{n:"02",label:"Brief page goes live",icon:tj,body:"We publish a public brief with the hook, tone, assets and slot count. Anyone can read it; only registered creators can claim."},{n:"03",label:"Creator claims a slot",icon:rj,body:"Accept the T&Cs to lock a slot. Slots are first-come, first-served and close automatically when the pool is full."},{n:"04",label:"Creator posts & submits link",icon:lj,body:"Download the assets, cut your clip, publish on TikTok, Instagram or YouTube Shorts, then paste the URL back in your dashboard."},{n:"05",label:"Day 30 payout",icon:K2,body:"Submit your post URL to your dashboard. Views are verified 720 hours (30 days) after your post goes live â not from the campaign start date. Clips that reach 10,000+ views earn $1.25 per 1,000 views, up to $200 per platform."}],UL=[{value:"$1.25+",label:"per 1,000 views"},{value:"$200",label:"cap per platform"},{value:"$600",label:"max per creator"},{value:"10,000",label:"minimum views"},{value:"30 days",label:"after your post goes live"}];function zL(){return k.jsx(BL,{})}function BL(){return k.jsxs("div",{className:"min-h-screen bg-[#0D0D0D] text-white",style:{fontFamily:"var(--font-sans)"},children:[k.jsx(NL,{}),k.jsx("section",{className:"mx-auto w-full max-w-[1400px] px-6 pb-24 pt-16 lg:px-10 lg:pt-24",children:k.jsxs("div",{className:"grid grid-cols-1 items-center gap-16 lg:grid-cols-[minmax(0,1fr)_auto]",children:[k.jsxs("div",{className:"max-w-3xl",children:[k.jsx("div",{className:"mb-6 inline-flex items-center gap-2 rounded-full border px-4 py-1.5 text-[11px] uppercase tracking-[0.25em]",style:{borderColor:`${Nn}55`,color:Nn},children:"For content creators"}),k.jsx("h1",{className:"font-display text-6xl font-bold leading-[0.95] tracking-tight sm:text-7xl lg:text-8xl",style:{letterSpacing:"-0.03em"},children:"Amplify"}),k.jsx("p",{className:"mt-6 font-display text-2xl font-semibold sm:text-3xl",style:{color:Nn},children:"Clip it. Post it. Get paid."}),k.jsxs("p",{className:"mt-8 max-w-2xl text-base leading-relaxed text-white/70 sm:text-lg",children:["Amplify connects brands with short-form creators. A brand funds a pool. Creators make clips using brand footage."," ",k.jsx("span",{className:"text-white",children:"Earn $1.25+ per 1,000 views"})," â up to"," ",k.jsx("span",{className:"text-white",children:"$200 per platform"}),","," ",k.jsx("span",{className:"text-white",children:"$600 maximum per creator"}),"."]})]}),k.jsxs("div",{className:"hidden lg:block",children:[k.jsx("div",{className:"mb-4 text-[10px] uppercase tracking-[0.3em] text-white/40",children:"Post on"}),k.jsx("div",{className:"flex flex-col gap-3",children:[{name:"TikTok",Icon:w0},{name:"Instagram Reels",Icon:d0},{name:"YouTube Shorts",Icon:f0}].map(({name:e,Icon:t})=>
43k.jsxs("div",{className:"flex items-center gap-4 rounded-2xl border border-white/10 bg-white/[0.03] px-5 py-4 transition-colors hover:border-white/25",children:[k.jsx(t,{className:"size-6",style:{color:Nn}}),k.jsx("span",{className:"text-sm font-medium text-white/90",children:e})]},e))})]}),k.jsxs("div",{className:"flex items-center gap-3 lg:hidden",children:[k.jsx("span",{className:"text-[10px] uppercase tracking-[0.3em] text-white/40",children:"Post on"}),k.jsx(w0,{className:"size-5",style:{color:Nn}}),k.jsx(d0,{className:"size-5",style:{color:Nn}}),k.jsx(f0,{className:"size-5",style:{color:Nn}})]})]})}),k.jsx("section",{className:"border-t border-white/10",children:k.jsxs("div",{className:"mx-auto w-full max-w-[1400px] px-6 py-20 lg:px-10",children:[k.jsxs("div",{className:"mb-12 flex items-baseline justify-between",children:[k.jsx("h2",{className:"font-display text-3xl font-bold sm:text-4xl",children:"How it works"}),k.jsx("span",{className:"text-xs uppercase tracking-[0.3em] text-white/40",children:"Process"})]}),k.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-5",children:PL.map(e=>{const t=e.icon;return k.jsxs("div",{className:"group relative flex flex-col rounded-2xl border border-white/10 bg-white/[0.02] p-6 transition-colors hover:border-white/20",children:[k.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[k.jsx("span",{className:"font-display text-xs font-bold tracking-widest",style:{color:Nn},children:e.n}),k.jsx(t,{className:"size-5",style:{color:Nn}})]}),k.jsx("p",{className:"text-sm font-semibold leading-snug text-white",children:e.label}),k.jsx("p",{className:"mt-2 text-xs leading-relaxed text-white/55",children:e.body})]},e.n)})})]})}),k.jsx("section",{className:"border-t border-white/10",children:k.jsxs("div",{className:"mx-auto w-full max-w-[1400px] px-6 py-20 lg:px-10",children:[k.jsxs("div",{className:"mb-12 flex items-baseline justify-between",children:[k.jsx("h2",{className:"font-display text-3xl font-bold sm:text-4xl",children:"The numbers"}),k.jsx("span",{className:"text-xs uppercase tracking-[0.3em] text-white/40",children:"Payout terms"})]}),k.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",children:UL.map(e=>k.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/[0.02] p-8 transition-colors hover:border-white/20",children:[k.jsx("div",{className:"font-display text-4xl font-bold sm:text-5xl",style:{color:Nn},children:e.value}),k.jsx("div",{className:"mt-3 text-xs uppercase tracking-[0.15em] text-white/60",children:e.label})]},e.label))})]})}),k.jsx("section",{className:"border-t border-white/10",children:k.jsxs("div",{className:"mx-auto w-full max-w-[1400px] px-6 py-24 text-center lg:px-10",children:[k.jsxs("h2",{className:"mx-auto max-w-2xl font-display text-4xl font-bold leading-tight sm:text-5xl",children:["Ready to ",k.jsx("span",{style:{color:Nn},children:"amplify"}),"?"]}),k.jsxs("div",{className:"mt-10 flex flex-col items-center justify-center gap-3 sm:flex-row",children:[k.jsxs(cn,{to:"/amplify/briefs",className:"inline-flex items-center gap-2 rounded-full px-7 py-3.5 text-sm font-semibold text-black transition-transform hover:-translate-y-0.5",style:{backgroundColor:Nn},children:["Browse Briefs ",k.jsx(G2,{className:"size-4"})]}),k.jsx("a",{href:"mailto:[email protected]?subject=Amplify%20â%20Brand%20inquiry",className:"inline-flex items-center gap-2 rounded-full border border-white/25 px-7 py-3.5 text-sm font-semibold text-white transition-colors hover:border-white/60",children:"I'm a brand"})]})]})}),k.jsx(DL,{})]})}const IL=()=>ce(()=>import("./admin.index-Dt1mCBRn.js"),[]),$L=()=>ce(()=>import("./admin.index-BZOSfWcS.js"),[]),HL=()=>ce(()=>import("./admin.index-DROec-iV.js"),__vite__mapDeps([27,14,15,16,2,7,6,28])),qL=ge("/admin/")({beforeLoad:async()=>{const{requireAdmin:e}=await ce(async()=>{const{requireAdmin:t}=await import("./admin-guard-Uy6eshYF.js");return{requireAdmin:t}},[]);await e()},head:()=>({meta:[{title:"Admin â Le Collectif"}]}),component:he(HL,"component"),errorComponent:he($L,"errorComponent"),notFoundComponent:he(IL,"notFoundComponent")});async function Yt(){const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/login"})}const VL=()=>ce(()=>import("./creator.submissions-B_DI9a-t.js"),__vite__mapDeps([29,30,2,31,22,20,32,33,34])),GL=ge("/creator/submissions")({beforeLoad:Yt,head:()=>({meta:[{title:"My submissions â Le Collectif"}]}),component:he(VL,"component")}),FL=()=>ce(()=>import("./creator.dashboard-IV7vNtNF.js"),__vite__mapDeps([35,30,2,31,22,20,36,19,37,32])),KL=ge("/creator/dashboard")({beforeLoad:Yt,head:()=>({meta:[{title:"Creator dashboard â Le Collectif"}]}),component:he(FL,"component")}),YL=()=>ce(()=>import("./client.dashboard-B8ZP1xfr.js"),__vite__mapDeps([38,30,2,31,22,20,36,19,37,39,28,21,40,41,42,43,32,33,34,25,44,45])),QL=ge("/client/dashboard")({head:()=>({meta:[{title:"Client dashboard â Le Collectif"}]}),component:he(YL,"component")}),JL=()=>ce(()=>import("./client.content-performance-DPsck8D3.js"),__vite__mapDeps([46,30,2,31,22,20,3,42])),XL=ge("/client/content-performance")({beforeLoad:Yt,head:()=>({meta:[{title:"Top performing content â Le Collectif"}]}),component:he(JL,"component")}),ZL=()=>ce(()=>import("./client.account-BJ7kX8rM.js"),__vite__mapDeps([47,30,2,31,22,20,32])),WL=ge("/client/account")({beforeLoad:Yt,component:he(ZL,"component")}),eN=()=>ce(()=>import("./briefs._id-L6mXayM9.js"),[]),tN=()=>ce(()=>import("./briefs._id-BXkK1VKh.js"),[]),nN=()=>ce(()=>import("./briefs._id-BWZWSWDY.js"),__vite__mapDeps([48,2,24,3,6,49,21,50])),rN=ge("/briefs/$id")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/sign-in"})},head:()=>({meta:[{title:"Brief â Le Collectif"}]}),component:he(nN,"component"),errorComponent:he(tN,"errorComponent"),notFoundComponent:he(eN,"notFoundComponent")}),sN=()=>ce(()=>import("./app.dashboard-BI050soS.js"),__vite__mapDeps([51,30,2,31,22,20,25,6,21,50])),aN=ge("/app/dashboard")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/sign-in"})},head:()=>({meta:[{title:"Dashboard â Le Collectif"}]}),component:he(sN,"component")}),iN=()=>ce(()=>import("./amplify.terms-c9bHwBTR.js"),__vite__mapDeps([52,53])),oN=ge("/amplify/terms")({head:()=>({links:[...Vt],meta:[{title:"Terms & Conditions â Amplify | Le Collectif"},{name:"description",content:"Creator Agreement for Amplify campaigns by Le Collectif â eligibility, earnings, payout, and content standards."},{property:"og:title",content:"Terms & Conditions â Amplify | Le Collectif"},{property:"og:description",content:"Creator Agreement for Amplify campaigns by Le Collectif â eligibility, earnings, payout, and content standards."}]}),component:he(iN,"component")}),lN=()=>ce(()=>import("./amplify.login-B9JGct4R.js"),__vite__mapDeps([54,6])),cN=ge("/amplify/login")({head:()=>({links:[...Vt],meta:[{title:"Log in â Amplify | Le Collectif"}]}),component:he(lN,"component")}),uN=()=>ce(()=>import("./amplify.join-CHOHmrmg.js"),__vite__mapDeps([55,56,6,57])),dN=ge("/amplify/join")({head:()=>({links:[...Vt],meta:[{title:"Join Amplify â Le Collectif"},{name:"description",content:"Create your Amplify creator account. Clip brand footage, post to your channels, and get paid on verified views."}]}),component:he(uN,"component")}),fN=()=>ce(()=>import("./amplify.dashboard-CaGytjWD.js"),__vite__mapDeps([58,56,59,21,50,60,
436,40])),hN=ge("/amplify/dashboard")({head:()=>({links:[...Vt],meta:[{title:"Dashboard â Amplify | Le Collectif"}]}),component:he(fN,"component")}),pN=()=>ce(()=>import("./amplify.cookie-policy-B92Gjixd.js"),[]),mN=ge("/amplify/cookie-policy")({head:()=>({links:[...Vt],meta:[{title:"Cookie Policy â Amplify | Le Collectif"},{name:"description",content:"How Amplify by Le Collectif uses cookies: GA4 analytics, session cookies, and no advertising cookies."},{property:"og:title",content:"Cookie Policy â Amplify | Le Collectif"},{property:"og:description",content:"How Amplify by Le Collectif uses cookies: GA4 analytics, session cookies, and no advertising cookies."}]}),component:he(pN,"component")}),gN=()=>ce(()=>import("./amplify.admin-5NZIfBb9.js"),__vite__mapDeps([61,14,62,16,6,22,21,7,60,42])),yN=ge("/amplify/admin")({head:()=>({links:[...Vt],meta:[{title:"Admin â Amplify | Le Collectif"}]}),component:he(gN,"component")}),vN=()=>ce(()=>import("./admin.metrics-rA_1ybF4.js"),[]),bN=()=>ce(()=>import("./admin.metrics-CTIpHlya.js"),[]),wN=()=>ce(()=>import("./admin.metrics-BuenmaKj.js"),__vite__mapDeps([63,14,15,16,6,41])),_N=ge("/admin/metrics")({beforeLoad:async()=>{const{requireAdmin:e}=await ce(async()=>{const{requireAdmin:t}=await import("./admin-guard-Uy6eshYF.js");return{requireAdmin:t}},[]);await e()},head:()=>({meta:[{title:"Metrics â Le Collectif Admin"}]}),component:he(wN,"component"),errorComponent:he(bN,"errorComponent"),notFoundComponent:he(vN,"notFoundComponent")}),SN=()=>ce(()=>import("./creator.briefs.index-Cxxnjgi4.js"),__vite__mapDeps([64,30,2,31,22,20,36,19,37,32])),EN=ge("/creator/briefs/")({beforeLoad:Yt,head:()=>({meta:[{title:"Open briefs â Le Collectif"}]}),component:he(SN,"component")}),xN=()=>ce(()=>import("./client.library.index-DEDRlnTp.js"),__vite__mapDeps([65,34,30,2,31,22,20,66,42,28])),RN=ge("/client/library/")({beforeLoad:Yt,head:()=>({meta:[{title:"Asset library â Le Collectif"}]}),component:he(xN,"component")}),TN=()=>ce(()=>import("./client.briefs.index-BO88weJy.js"),__vite__mapDeps([67,30,2,31,22,20,36,19,37,32,25])),AN=ge("/client/briefs/")({beforeLoad:Yt,head:()=>({meta:[{title:"Briefs â Le Collectif"}]}),component:he(TN,"component")}),CN=()=>ce(()=>import("./brief.new.index-DtqBFgK5.js"),[]),ON=ge("/brief/new/")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();throw e.session?zt({to:"/brief/new/step-1"}):zt({to:"/sign-in"})},component:he(CN,"component")}),kN=()=>ce(()=>import("./amplify.briefs.index-Bkwyo1as.js"),__vite__mapDeps([68,53])),jN=ge("/amplify/briefs/")({head:()=>({links:[...Vt],meta:[{title:"Active Briefs â Amplify | Le Collectif"},{name:"description",content:"Choose a campaign, claim your slot, and start creating."},{property:"og:title",content:"Active Briefs â Amplify"},{property:"og:description",content:"Choose a campaign, claim your slot, and start creating."}]}),component:he(kN,"component")}),LN=()=>ce(()=>import("./creator.upload._briefId-CR8KGwOg.js"),__vite__mapDeps([69,14,30,2,31,22,20,70,16,57,32,33,34,3,6,71,21])),NN=ge("/creator/upload/$briefId")({beforeLoad:Yt,head:()=>({meta:[{title:"Upload footage â Le Collectif"}]}),component:he(LN,"component")}),DN=()=>ce(()=>import("./creator.briefs._id-BgS5OG3D.js"),__vite__mapDeps([72,30,2,31,22,20,32,3,19,37,73,21,7])),MN=ge("/creator/briefs/$id")({beforeLoad:Yt,head:({params:e})=>({meta:[{title:`Brief ${e.id} â Le Collectif`}]}),component:he(DN,"component")}),PN=()=>ce(()=>import("./client.review.brief-0000131-Dj7Z2S61.js"),[]),UN=ge("/client/review/brief-0000131")({beforeLoad:Yt,head:()=>({meta:[{title:"Assets Ready for Review â Le Collectif"}]}),component:he(PN,"component")}),zN=()=>ce(()=>import("./client.briefs.new-CUxtnTkj.js"),__vite__mapDeps([74,14,30,2,31,22,20,70,16,57,32,33,34,21,6,73,45,28,75,7,3,71])),BN=ge("/client/briefs/new")({beforeLoad:Yt,head:()=>({meta:[{title:"New brief â Le Collectif"}]}),component:he(zN,"component")}),IN=[{name:"Property & Architecture",blurb:"Exterior identity, first impressions and brand feel.",items:["Hotel facade","Entrance arrival","Lobby","Hallways","Architectural details","Signage","Aerial / drone","Day vs night"]}
43,{name:"Rooms & Interiors",blurb:"The highest-converting booking content.",items:["Room walkthrough","Bed setup","Bathroom","Bathtub","Balcony views","Interior styling","Luxury details","Room service moments","Lighting moods"]},{name:"Pool, Beach & Outdoor",blurb:"Pools, beach access, gardens, cabanas, sunsets.",items:["Infinity pool","Beach access","Gardens","Outdoor lounges","Sunsets","Cabanas","Landscape shots","Couples / family pool moments"]},{name:"Food, Beverage & Dining",blurb:"Signature dishes, drinks, dining moments.",items:["Signature dishes","Breakfast buffet","Fine dining","Cocktails","Coffee","Wine pouring","Chef prep","Street-food proximity","Romantic dining setups"]},{name:"Wellness & Spa",blurb:"Treatments, rituals, slow-living recovery.",items:["Massage treatments","Yoga","Meditation","Gym","Sauna","Wellness rituals","Slow living moments","Sound healing","Recovery experiences"]},{name:"Guest Experience & Lifestyle",blurb:"Emotional storytelling â identity and aspiration.",items:["Couple moments","Family activities","Kids experiences","Digital nomad moments","Friends travelling","Reading by pool","Morning routines","Sunset cocktails","Luxury lifestyle behaviours"]},{name:"Destination & Local Culture",blurb:"Position the property inside the destination.",items:["Nearby attractions","Local markets","Cultural experiences","Temples","Local food","Nature","Adventure","Transportation arrival","Walking tours"]},{name:"Staff, Service & Hospitality",blurb:"Builds trust through human warmth.",items:["Concierge moments","Welcome drinks","Staff greetings","Housekeeping touches","Chef interactions","Butler service","Human warmth","Behind-the-scenes hospitality"]},{name:"Events & Celebrations",blurb:"High-revenue moments for resorts and luxury stays.",items:["Weddings","Honeymoons","Birthdays","Corporate retreats","Beach dinners","Proposal setups","Private events"]},{name:"Seasonal & Campaign",blurb:"Reusable cycles for scalable marketing.",items:["Christmas","Tet / Lunar New Year","Summer campaign","Rainy season","Valentine's","School holidays","Flash promotion","Limited offer"]}];IN.map(e=>e.name);const $N=()=>ce(()=>import("./client.briefs._id-BWFZ0NDP.js"),__vite__mapDeps([76,30,2,31,22,20])),HN=()=>ce(()=>import("./client.briefs._id-BX798-sZ.js"),__vite__mapDeps([77,30,2,31,22,20,33,34,32,3,21,26,6,19,37,7,73,44,42])),qN=ge("/client/briefs/$id")({beforeLoad:Yt,head:({params:e})=>({meta:[{title:`Brief ${e.id} â Le Collectif`}]}),component:he(HN,"component"),notFoundComponent:he($N,"notFoundComponent")}),VN=()=>ce(()=>import("./brief.new.step-3-KQnSpew1.js"),__vite__mapDeps([78,79,21,24,73,25,43])),GN=ge("/brief/new/step-3")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/sign-in"})},head:()=>({meta:[{title:"New brief â Shot list â Le Collectif"}]}),component:he(VN,"component")}),FN=()=>ce(()=>import("./brief.new.step-2-Dt6eG4ip.js"),__vite__mapDeps([80,79,21,24,60,50])),KN=ge("/brief/new/step-2")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/sign-in"})},head:()=>({meta:[{title:"New brief â Insights â Le Collectif"}]}),component:he(FN,"component")}),YN=()=>ce(()=>import("./brief.new.step-1-CAzqlGc-.js"),__vite__mapDeps([81,79,21,24])),QN=ge("/brief/new/step-1")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/sign-in"})},head:()=>({meta:[{title:"New brief â Campaign â Le Collectif"}]}),component:he(YN,"component")}),JN=()=>ce(()=>import("./brief.new.review-vmUOfYkR.js"),__vite__mapDeps([82,79,21,24,50,6])),XN=ge("/brief/new/review")({beforeLoad:async()=>{const{data:e}=await kt.auth.getSession();if(!e.session)throw zt({to:"/sign-in"})},head:()=>({meta:[{title:"Review & submit â Le Collectif"}]}),component:he(JN,"component")}),ZN=()=>ce(()=>import("./amplify.briefs._briefSlug-CedSA8QK.js"),__vite__mapDeps([83,53,14,62,16,59,21,50,60,6,7,42])),WN=ge("/amplify/briefs/$briefSlug")({head:()=>({links:[...Vt],meta:[{title:"Brief â Amplify | Le Collectif"}]}),component:he(ZN,"component")}),eD=()=>ce(()=>import("./admin.clients._userId-DCWCDAHE.js"),[]),tD=()=>ce(()=>import("./admin.clients._userId-DlAMjhbI.js"),[]),nD=()=>ce(()=>import("./admin.clients._userId-dGuvxcEv.js"),__vite__mapDeps([84,14,15,16,2,31,3,6,7])),rD=ge("/admin/clients/$userId")({beforeLoad:async()=>{const{requireAdmin:e}=await ce(async()=>{const{requireAdmin:t}=await import("./admin-guard-Uy6eshYF.js");return{requireAdmin:t}},[]);await e()},head:()=>({meta:[{title:"Client â Le Collectif Admin"}]}),component:he(nD,"component"),errorComponent:he(tD,"errorComponent"),notFoundComponent:he(eD,"notFoundComponent")}),sD=()=>ce(()=>import("./amplify.admin.briefs-CwmPI4HW.js"),__vite__mapDeps([85,86,6,25,26,60])),aD=ge("/amplify/admin/briefs")({head:()=>({links:[...Vt],meta:[{title:"Briefs â Admin | Amplify"}]}
43),component:he(sD,"component")}),iD=()=>ce(()=>import("./client.library.asset._assetId-oEOP_Ccw.js"),__vite__mapDeps([87,88,89,39,7,30,2,31,22,20,66,49,42,21,3])),oD=ge("/client/library/asset/$assetId")({beforeLoad:Yt,head:()=>({meta:[{title:"Asset Detail â Le Collectif"}]}),component:he(iD,"component")}),lD=()=>ce(()=>import("./amplify.campaigns._campaignSlug.report-OnbyxUzH.js"),__vite__mapDeps([90,14,91,16,6,50,60])),cD=ge("/amplify/campaigns/$campaignSlug/report")({head:()=>({links:[...Vt],meta:[{title:"Day 30 Report â Le Collectif"},{name:"robots",content:"noindex"}]}),component:he(lD,"component")}),uD=()=>ce(()=>import("./client.review.brief-0000131.index-d73datyS.js"),__vite__mapDeps([92,30,2,31,22,20,89,39,7,3,21])),dD=ge("/client/review/brief-0000131/")({beforeLoad:Yt,head:()=>({meta:[{title:"Assets Ready for Review â Le Collectif"}]}),component:he(uD,"component")}),fD=()=>ce(()=>import("./amplify.dashboard.verify._submissionId-CnCF3I5w.js"),__vite__mapDeps([93,6,75])),hD=ge("/amplify/dashboard/verify/$submissionId")({head:()=>({links:[...Vt],meta:[{title:"Verify submission â Amplify | Le Collectif"}]}),component:he(fD,"component")}),pD=()=>ce(()=>import("./amplify.admin.briefs.new-CDUEyWAH.js"),__vite__mapDeps([94,95,86,6,75])),mD=ge("/amplify/admin/briefs/new")({head:()=>({links:[...Vt],meta:[{title:"New brief â Admin | Amplify"}]}),component:he(pD,"component")}),gD=()=>ce(()=>import("./client.review.brief-0000131.asset._assetId-CrF6S-IH.js"),__vite__mapDeps([96,88,89,39,7,30,2,31,22,20,49,42,21,3])),yD=ge("/client/review/brief-0000131/asset/$assetId")({beforeLoad:Yt,head:()=>({meta:[{title:"Asset Detail â Le Collectif"}]}),component:he(gD,"component")}),vD=()=>ce(()=>import("./amplify.admin.briefs._id.preview-B6UMabsc.js"),__vite__mapDeps([97,86,6,75,21,7,49])),bD=ge("/amplify/admin/briefs/$id/preview")({head:()=>({links:[...Vt],meta:[{title:"Preview â Admin | Amplify"}]}),component:he(vD,"component")}),wD=()=>ce(()=>import("./amplify.admin.briefs._id.edit-DYcIwiz0.js"),__vite__mapDeps([98,95,86,6,75])),_D=ge("/amplify/admin/briefs/$id/edit")({head:()=>({links:[...Vt],meta:[{title:"Edit brief â Admin | Amplify"}]}),component:he(wD,"component")}),SD=()=>ce(()=>import("./amplify.campaigns._campaignSlug.report.public._token-Dgsj38e3.js"),__vite__mapDeps([99,14,91,16,6])),ED=ge("/amplify/campaigns/$campaignSlug/report/public/$token")({head:()=>({links:[...Vt],meta:[{title:"Campaign Report â Le Collectif"},{name:"robots",content:"noindex"}]}),component:he(SD,"component")}),xD=z2.update({id:"/terms",path:"/terms",getParentRoute:()=>_e}),RD=sL.update({id:"/sign-up",path:"/sign-up",getParentRoute:()=>_e}),TD=iL.update({id:"/sign-in",path:"/sign-in",getParentRoute:()=>_e}),AD=lL.update({id:"/reset-password",path:"/reset-password",getParentRoute:()=>_e}),CD=uL.update({id:"/privacy",path:"/privacy",getParentRoute:()=>_e}),OD=fL.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>_e}),kD=pL.update({id:"/login",path:"/login",getParentRoute:()=>_e}),jD=gL.update({id:"/lc-login",path:"/lc-login",getParentRoute:()=>_e}),LD=vL.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>_e}),ND=wL.update({id:"/cookies",path:"/cookies",getParentRoute:()=>_e}),DD=EL.update({id:"/",path:"/",getParentRoute:()=>_e}),MD=RL.update({id:"/briefs/",path:"/briefs/",getParentRoute:()=>_e}),PD=ML.update({id:"/amplify/",path:"/amplify/",getParentRoute:()=>_e}),UD=qL.update({id:"/admin/",path:"/admin/",getParentRoute:()=>_e}),zD=GL.update({id:"/creator/submissions",path:"/creator/submissions",getParentRoute:()=>_e}),BD=KL.update({id:"/creator/dashboard",path:"/creator/dashboard",getParentRoute:()=>_e}),ID=QL.update({id:"/client/dashboard",path:"/client/dashboard",getParentRoute:()=>_e}),$D=XL.update({id:"/client/content-performance",path:"/client/content-performance",getParentRoute:()=>_e}),HD=WL.update({id:"/client/account",path:"/client/account",getParentRoute:()=>_e}),qD=rN.update({id:"/briefs/$id",path:"/briefs/$id",getParentRoute:()=>_e}),VD=aN.update({id:"/app/dashboard",path:"/app/dashboard",getParentRoute:()=>_e}
43),GD=oN.update({id:"/amplify/terms",path:"/amplify/terms",getParentRoute:()=>_e}),FD=cN.update({id:"/amplify/login",path:"/amplify/login",getParentRoute:()=>_e}),KD=dN.update({id:"/amplify/join",path:"/amplify/join",getParentRoute:()=>_e}),Tw=hN.update({id:"/amplify/dashboard",path:"/amplify/dashboard",getParentRoute:()=>_e}),YD=mN.update({id:"/amplify/cookie-policy",path:"/amplify/cookie-policy",getParentRoute:()=>_e}),Aw=yN.update({id:"/amplify/admin",path:"/amplify/admin",getParentRoute:()=>_e}),QD=_N.update({id:"/admin/metrics",path:"/admin/metrics",getParentRoute:()=>_e}),JD=EN.update({id:"/creator/briefs/",path:"/creator/briefs/",getParentRoute:()=>_e}),XD=RN.update({id:"/client/library/",path:"/client/library/",getParentRoute:()=>_e}),ZD=AN.update({id:"/client/briefs/",path:"/client/briefs/",getParentRoute:()=>_e}),WD=ON.update({id:"/brief/new/",path:"/brief/new/",getParentRoute:()=>_e}),eM=jN.update({id:"/amplify/briefs/",path:"/amplify/briefs/",getParentRoute:()=>_e}),tM=NN.update({id:"/creator/upload/$briefId",path:"/creator/upload/$briefId",getParentRoute:()=>_e}),nM=MN.update({id:"/creator/briefs/$id",path:"/creator/briefs/$id",getParentRoute:()=>_e}),Th=UN.update({id:"/client/review/brief-0000131",path:"/client/review/brief-0000131",getParentRoute:()=>_e}),rM=BN.update({id:"/client/briefs/new",path:"/client/briefs/new",getParentRoute:()=>_e}),sM=qN.update({id:"/client/briefs/$id",path:"/client/briefs/$id",getParentRoute:()=>_e}),aM=GN.update({id:"/brief/new/step-3",path:"/brief/new/step-3",getParentRoute:()=>_e}),iM=KN.update({id:"/brief/new/step-2",path:"/brief/new/step-2",getParentRoute:()=>_e}),oM=QN.update({id:"/brief/new/step-1",path:"/brief/new/step-1",getParentRoute:()=>_e}),lM=XN.update({id:"/brief/new/review",path:"/brief/new/review",getParentRoute:()=>_e}),cM=WN.update({id:"/amplify/briefs/$briefSlug",path:"/amplify/briefs/$briefSlug",getParentRoute:()=>_e}),uM=rD.update({id:"/admin/clients/$userId",path:"/admin/clients/$userId",getParentRoute:()=>_e}),Zc=aD.update({id:"/briefs",path:"/briefs",getParentRoute:()=>Aw}),dM=oD.update({id:"/client/library/asset/$assetId",path:"/client/library/asset/$assetId",getParentRoute:()=>_e}),Cw=cD.update({id:"/amplify/campaigns/$campaignSlug/report",path:"/amplify/campaigns/$campaignSlug/report",getParentRoute:()=>_e}),fM=dD.update({id:"/",path:"/",getParentRoute:()=>Th}),hM=hD.update({id:"/verify/$submissionId",path:"/verify/$submissionId",getParentRoute:()=>Tw}),pM=mD.update({id:"/new",path:"/new",getParentRoute:()=>Zc}),mM=yD.update({id:"/asset/$assetId",path:"/asset/$assetId",getParentRoute:()=>Th}),gM=bD.update({id:"/$id/preview",path:"/$id/preview",getParentRoute:()=>Zc}),yM=_D.update({id:"/$id/edit",path:"/$id/edit",getParentRoute:()=>Zc}),vM=ED.update({id:"/public/$token",path:"/public/$token",getParentRoute:()=>Cw}),bM={AmplifyAdminBriefsNewRoute:pM,AmplifyAdminBriefsIdEditRoute:yM,AmplifyAdminBriefsIdPreviewRoute:gM},wM=Zc._addFileChildren(bM),_M={AmplifyAdminBriefsRoute:wM},SM=Aw._addFileChildren(_M),EM={AmplifyDashboardVerifySubmissionIdRoute:hM},xM=Tw._addFileChildren(EM),RM={ClientReviewBrief0000131IndexRoute:fM,ClientReviewBrief0000131AssetAssetIdRoute:mM},TM=Th._addFileChildren(RM),AM={AmplifyCampaignsCampaignSlugReportPublicTokenRoute:vM},CM=Cw._addFileChildren(AM),OM={IndexRoute:DD,CookiesRoute:ND,DashboardRoute:LD,LcLoginRoute:jD,LoginRoute:kD,OnboardingRoute:OD,PrivacyRoute:CD,ResetPasswordRoute:AD,SignInRoute:TD,SignUpRoute:RD,TermsRoute:xD,AdminMetricsRoute:QD,AmplifyAdminRoute:SM,AmplifyCookiePolicyRoute:YD,AmplifyDashboardRoute:xM,AmplifyJoinRoute:KD,AmplifyLoginRoute:FD,AmplifyTermsRoute:GD,AppDashboardRoute:VD,BriefsIdRoute:qD,ClientAccountRoute:HD,ClientContentPerformanceRoute:$D,ClientDashboardRoute:ID,CreatorDashboardRoute:BD,CreatorSubmissionsRoute:zD,AdminIndexRoute:UD,AmplifyIndexRoute:PD,BriefsIndexRoute:MD,AdminClientsUserIdRoute:uM,AmplifyBriefsBriefSlugRoute:cM,BriefNewReviewRoute:lM,BriefNewStep1Route:oM,BriefNewStep2Route:iM,BriefNewStep3Route:aM,ClientBriefsIdRoute:sM,ClientBriefsNewRoute:rM,ClientReviewBrief0000131Route:TM,CreatorBriefsIdRoute:nM,CreatorUploadBriefIdRoute:tM,AmplifyBriefsIndexRoute:eM,BriefNewIndexRoute:WD,ClientBriefsIndexRoute:ZD,ClientLibraryIndexRoute:XD,CreatorBriefsIndexRoute:JD,AmplifyCampaignsCampaignSlugReportRoute:CM,ClientLibraryAssetAssetIdRoute:dM},kM=_e._addFileChildren(OM),jM=()=>{const e=new Wk;return rA({routeTree:kM,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function LM(){const e=await jM();let t;if(Zv){const r=await Zv.getOptions();r.serializationAdapters=r.serializationAdapters??[],window.__TSS_START_OPTIONS__=r,t=r.serializationAdapters,e.options.defaultSsr=r.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};
43return t.push(oT),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await cT(e),e}async function NM(){const e=await LM();return window.$_TSR?.h(),e}var Bf;function DM(){return Bf||(Bf=NM()),k.jsx(hT,{promise:Bf,children:e=>k.jsx(iA,{router:e})})}re.startTransition(()=>{QS.hydrateRoot(document,k.jsx(re.StrictMode,{children:k.jsx(DM,{})}))});export{K2 as $,GM as A,Zs as B,_L as C,MM as D,X2 as E,FM as F,_0 as G,uj as H,PM as I,jT as J,mv as K,cn as L,Kc as M,qM as N,NN as O,zM as P,MN as Q,te as R,kb as S,UM as T,lj as U,qN as V,WN as W,rD as X,oD as Y,cD as Z,ce as _,W2 as a,hD as a0,yD as a1,bD as a2,_D as a3,ED as a4,KM as b,eL as c,Fn as d,G2 as e,tj as f,Bt as g,zt as h,Ab as i,k as j,rN as k,nL as l,aN as m,NL as n,DL as o,TL as p,un as q,re as r,kt as s,VM as t,Rb as u,iT as v,UE as w,E0 as x,ta as y,gt 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.