PageSourceSearch

https://chck.ai/assets/index-B3rTWz36.js

js chck.ai collected 2026-10-05 11:54:30 UTC 846,395 bytes, 146 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cfv_6rr_.js","assets/Partners-DQWed-uR.js","assets/types-DBfBKqAD.js","assets/SiteFooter-DjghSlDE.js","assets/StaticFilmFallback-BzzeZGBU.js","assets/check-CzXjd51s.js","assets/about-vzHkHzvL.js","assets/apple-CTe02dJM.js","assets/zap-DNd-jAtT.js","assets/camera-Ut8_NzUj.js","assets/shield-check-BE4y2a6t.js","assets/blog-hexW2b11.js","assets/useSuspenseQuery-C0QBmVAs.js","assets/cert-8DK-a6ig.js","assets/useMutation-CKcfiSBh.js","assets/chck-C5F8etJa.js","assets/upload-queue-B_iYrInD.js","assets/CameraCapture-DTvu7Z_m.js","assets/link-2-26rXOj71.js","assets/identify.functions-BvDJ3gFY.js","assets/deals-CqZoiziT.js","assets/deals.functions-DGylfDGK.js","assets/tag-DDVbEvLC.js","assets/refresh-cw-BtCUARik.js","assets/feed-DVEihelt.js","assets/SlabViewer-B9keyUcj.js","assets/download-DJI0FOYy.js","assets/message-circle-BYtVzRmJ.js","assets/flame-DUVyWBRq.js","assets/pricing-xiWm-k04.js","assets/billing.config-C45YJEi0.js","assets/arrow-left-CBroj30O.js","assets/privacy-3FolJIo2.js","assets/reset-password-qnAZQ7FJ.js","assets/key-round-e2LdOHhm.js","assets/search-DKc
vendor: 8,571 bytes, lines 1-2
1QduXZ.js","assets/services-D8Qc6u3I.js","assets/support-CeYyCQN3.js","assets/index-Bu-s0sq5.js","assets/copy-CHy75kn9.js","assets/terms-CDsPuNTW.js","assets/try-Cb6X97tn.js","assets/GradeDialog-BEukrE3O.js","assets/info-Dd5eimrS.js","assets/account-BZDx8Obe.js","assets/ebay-connect.functions-QnQOVHfk.js","assets/RemapCardPanel-DdgwBKmP.js","assets/trash-2-CtsJBlRx.js","assets/admin-CnwN4gdm.js","assets/feedback-DHRJB2qh.js","assets/button-B04i3vAT.js","assets/textarea-C_mwG9gr.js","assets/rewards-BDS63cHt.js","assets/rewards.functions-CG0DNzt1.js","assets/blog_._slug-DfhTnSzc.js","assets/RichText-kA-VoAg2.js","assets/mermaid-GHXKKRXX-CSQDh6oq.js","assets/card-bounds-mu1IPLkm.js","assets/docs.api-B5qWb0cp.js","assets/grade.index-DtpOEwLC.js","assets/grade.full-DG0aDXdv.js","assets/m.grade-D0clNPZ6.js","assets/admin_.api-keys-CWtSDTga.js","assets/admin_.blog-LfoX75oO.js","assets/plus-CQxN48r6.js","assets/admin_.rewards-D5_FdOBb.js","assets/admin_.seed-comps-bJ52HBcd.js","assets/ebay.connect-wQUAYmli.js","assets/admin_.users._userId-B-_ivwvs.js"])))=>i.map(i=>d[i]);
2function xA(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(s,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function BS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tp={exports:{}},Rl={};var Fb;function EA(){if(Fb)return Rl;Fb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:e,type:s,key:c,ref:i!==void 0?i:null,props:l}}return Rl.Fragment=t,Rl.jsx=n,Rl.jsxs=n,Rl}var Vb;function RA(){return Vb||(Vb=1,Tp.exports=EA()),Tp.exports}var E=RA(),kp={exports:{}},je={};var Gb;function TA(){if(Gb)return je;Gb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),v=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function R(P,K,Q){this.props=P,this.context=K,this.refs=x,this.updater=Q||S}R.prototype.isReactComponent={},R.prototype.setState=function(P,K){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,K,"setState")},R.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(P,K,Q){this.props=P,this.context=K,this.refs=x,this.updater=Q||S}var D=C.prototype=new A;D.constructor=C,_(D,R.prototype),D.isPureReactComponent=!0;var z=Array.isArray;function N(){}var O={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function W(P,K,Q){var re=Q.ref;return{$$typeof:e,type:P,key:K,ref:re!==void 0?re:null,props:Q}}function ne(P,K){return W(P.type,K,P.props)}function F(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function V(P){var K={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(Q){return K[Q]})}var ee=/\/+/g;function le(P,K){return typeof P=="object"&&P!==null&&P.key!=null?V(""+P.key):K.toString(36)}function oe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(N,N):(P.status="pending",P.then(function(K){P.status==="pending"&&(P.status="fulfilled",P.value=K)},function(K){P.status==="pending"&&(P.status="rejected",P.reason=K)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function M(P,K,Q,re,ie){var ue=typeof P;(ue==="undefined"||ue==="boolean")&&(P=null);var fe=!1;if(P===null)fe=!0;else switch(ue){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(P.$$typeof){case e:case t:fe=!0;break;case g:return fe=P._init,M(fe(P._payload),K,Q,re,ie)}}if(fe)return ie=ie(P),fe=re===""?"."+le(P,0):re,z(ie)?(Q="",fe!=null&&(Q=fe.replace(ee,"$&/")+"/"),M(ie,K,Q,"",function(bt){return bt})):ie!=null&&(F(ie)&&(ie=ne(ie,Q+(ie.key==null||P&&P.key===ie.key?"":(""+ie.key).replace(ee,"$&/")+"/")+fe)),K.push(ie)),1;fe=0;var be=re===""?".":re+":";if(z(P))for(var Re=0;Re<P.length;Re++)re=P[Re],ue=be+le(re,Re),fe+=M(re,K,Q,ue,ie);else if(Re=b(P),typeof Re=="function")for(P=Re.call(P),Re=0;!(re=P.next()).done;)re=re.value,ue=be+le(re,Re++),fe+=M(re,K,Q,ue,ie);else if(ue==="object"){if(typeof P.then=="function")return M(oe(P),K,Q,re,ie);throw K=String(P),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return fe}function G(P,K,Q){if(P==null)return P;var re=[],ie=0;return M(P,re,"","",function(ue){return K.call(Q,ue,ie++)}),re}function te(P){if(P._status===-1){var K=P._result;K=K(),K.then(function(Q){(P._status===0||P._status===-1)&&(P._status=1,P._result=Q)},function(Q){(P._status===0||P._status===-1)&&(P._status=2,P._result=Q)}),P._status===-1&&(P._status=0,P._result=K)}if(P._status===1)return P._result.default;throw P._result}var Se=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},J={map:G,forEach:function(P,K,Q){G(P,function(){K.apply(this,arguments)},Q)},count:function(P){var K=0;return G(P,function(){K++}),K},toArray:function(P){return G(P,function(K){return K})||[]},only:function(P){if(!F(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return je.Activity=m,je.Children=J,je.Component=R,je.Fragment=n,je.Profiler=i,je.PureComponent=C,je.StrictMode=s,je.Suspense=f,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,je.__COMPILER_RUNTIME={__proto__:null,c:function(P){return O.H.useMemoCache(P)}},je.cache=function(P){return function(){return P.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(P,K,Q){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var re=_({},P.props),ie=P.key;if(K!=null)for(ue in K.key!==void 0&&(ie=""+K.key),K)!I.call(K,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&K.ref===void 0||(re[ue]=K[ue]);var ue=arguments.length-2;if(ue===1)re.children=Q;else if(1<ue){for(var fe=Array(ue),be=0;be<ue;be++)fe[be]=arguments[be+2];re.children=fe}return W(P.type,ie,re)},je.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},je.createElement=function(P,K,Q){var re,ie={},ue=null;if(K!=null)for(re in K.key!==void 0&&(ue=""+K.key),K)I.call(K,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ie[re]=K[re]);var fe=arguments.length-2;if(fe===1)ie.children=Q;else if(1<fe){for(var be=Array(fe),Re=0;Re<fe;Re++)be[Re]=arguments[Re+2];ie.children=be}if(P&&P.defaultProps)for(re in fe=P.defaultProps,fe)ie[re]===void 0&&(ie[re]=fe[re]);return W(P,ue,ie)},je.createRef=function(){return{current:null}},je.forwardRef=function(P){return{$$typeof:d,render:P}},je.isValidElement=F,je.lazy=function(P){return{$$typeof:g,_payload:{_status:-1,_result:P},_init:te}},je.memo=function(P,K){return{$$typeof:h,type:P,compare:K===void 0?null:K}},je.startTransition=function(P){var K=O.T,Q={};O.T=Q;try{var re=P(),ie=O.S;ie!==null&&ie(Q,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(N,Se)}catch(ue){Se(ue)}finally{K!==null&&Q.types!==null&&(K.types=Q.types),O.T=K}
vendor: 5,029 bytes, line 2
2},je.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},je.use=function(P){return O.H.use(P)},je.useActionState=function(P,K,Q){return O.H.useActionState(P,K,Q)},je.useCallback=function(P,K){return O.H.useCallback(P,K)},je.useContext=function(P){return O.H.useContext(P)},je.useDebugValue=function(){},je.useDeferredValue=function(P,K){return O.H.useDeferredValue(P,K)},je.useEffect=function(P,K){return O.H.useEffect(P,K)},je.useEffectEvent=function(P){return O.H.useEffectEvent(P)},je.useId=function(){return O.H.useId()},je.useImperativeHandle=function(P,K,Q){return O.H.useImperativeHandle(P,K,Q)},je.useInsertionEffect=function(P,K){return O.H.useInsertionEffect(P,K)},je.useLayoutEffect=function(P,K){return O.H.useLayoutEffect(P,K)},je.useMemo=function(P,K){return O.H.useMemo(P,K)},je.useOptimistic=function(P,K){return O.H.useOptimistic(P,K)},je.useReducer=function(P,K,Q){return O.H.useReducer(P,K,Q)},je.useRef=function(P){return O.H.useRef(P)},je.useState=function(P){return O.H.useState(P)},je.useSyncExternalStore=function(P,K,Q){return O.H.useSyncExternalStore(P,K,Q)},je.useTransition=function(){return O.H.useTransition()},je.version="19.2.5",je}var Kb;function hc(){return Kb||(Kb=1,kp.exports=TA()),kp.exports}var k=hc();const ae=BS(k),rg=xA({__proto__:null,default:ae},[k]);var Ap={exports:{}},Tl={},Cp={exports:{}},Op={};var Yb;function kA(){return Yb||(Yb=1,(function(e){function t(M,G){var te=M.length;M.push(G);e:for(;0<te;){var Se=te-1>>>1,J=M[Se];if(0<i(J,G))M[Se]=G,M[te]=J,te=Se;else break e}}function n(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var G=M[0],te=M.pop();if(te!==G){M[0]=te;e:for(var Se=0,J=M.length,P=J>>>1;Se<P;){var K=2*(Se+1)-1,Q=M[K],re=K+1,ie=M[re];if(0>i(Q,te))re<J&&0>i(ie,Q)?(M[Se]=ie,M[re]=te,Se=re):(M[Se]=Q,M[K]=te,Se=K);else if(re<J&&0>i(ie,te))M[Se]=ie,M[re]=te,Se=re;else break e}}return G}function i(M,G){var te=M.sortIndex-G.sortIndex;return te!==0?te:M.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],g=1,m=null,v=3,b=!1,S=!1,_=!1,x=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function D(M){for(var G=n(h);G!==null;){if(G.callback===null)s(h);else if(G.startTime<=M)s(h),G.sortIndex=G.expirationTime,t(f,G);else break;G=n(h)}}function z(M){if(_=!1,D(M),!S)if(n(f)!==null)S=!0,N||(N=!0,V());else{var G=n(h);G!==null&&oe(z,G.startTime-M)}}var N=!1,O=-1,I=5,W=-1;function ne(){return x?!0:!(e.unstable_now()-W<I)}function F(){if(x=!1,N){var M=e.unstable_now();W=M;var G=!0;try{e:{S=!1,_&&(_=!1,A(O),O=-1),b=!0;var te=v;try{t:{for(D(M),m=n(f);m!==null&&!(m.expirationTime>M&&ne());){var Se=m.callback;if(typeof Se=="function"){m.callback=null,v=m.priorityLevel;var J=Se(m.expirationTime<=M);if(M=e.unstable_now(),typeof J=="function"){m.callback=J,D(M),G=!0;break t}m===n(f)&&s(f),D(M)}else s(f);m=n(f)}if(m!==null)G=!0;else{var P=n(h);P!==null&&oe(z,P.startTime-M),G=!1}}break e}finally{m=null,v=te,b=!1}G=void 0}}finally{G?V():N=!1}}}var V;if(typeof C=="function")V=function(){C(F)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,le=ee.port2;ee.port1.onmessage=F,V=function(){le.postMessage(null)}}else V=function(){R(F,0)};function oe(M,G){O=R(function(){M(e.unstable_now())},G)}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"):I=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(M){switch(v){case 1:case 2:case 3:var G=3;break;default:G=v}var te=v;v=G;try{return M()}finally{v=te}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(M,G){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var te=v;v=M;try{return G()}finally{v=te}},e.unstable_scheduleCallback=function(M,G,te){var Se=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?Se+te:Se):te=Se,M){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=te+J,M={id:g++,callback:G,priorityLevel:M,startTime:te,expirationTime:J,sortIndex:-1},te>Se?(M.sortIndex=te,t(h,M),n(f)===null&&M===n(h)&&(_?(A(O),O=-1):_=!0,oe(z,te-Se))):(M.sortIndex=J,t(f,M),S||b||(S=!0,N||(N=!0,V()))),M},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(M){var G=v;return function(){var te=v;v=G;try{return M.apply(this,arguments)}finally{v=te}}}})(Op)),Op}var Wb;function AA(){return Wb||(Wb=1,Cp.exports=kA()),Cp.exports}
vendor: 8,042 bytes, lines 2-4
2var Np={exports:{}},Yt={};var Qb;function CA(){if(Qb)return Yt;Qb=1;var e=hc();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var s={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,g){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:h,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Yt.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,g)},Yt.flushSync=function(f){var h=c.T,g=s.p;try{if(c.T=null,s.p=2,f)return f()}finally{c.T=h,s.p=g,s.d.f()}},Yt.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(f,h))},Yt.prefetchDNS=function(f){typeof f=="string"&&s.d.D(f)},Yt.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,m=d(g,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?s.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:v,fetchPriority:b}):g==="script"&&s.d.X(f,{crossOrigin:m,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Yt.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);s.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(f)},Yt.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,m=d(g,h.crossOrigin);s.d.L(f,g,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Yt.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);s.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(f)},Yt.requestFormReset=function(f){s.d.r(f)},Yt.unstable_batchedUpdates=function(f,h){return f(h)},Yt.useFormState=function(f,h,g){return c.H.useFormState(f,h,g)},Yt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Yt.version="19.2.5",Yt}var Zb;function HS(){if(Zb)return Np.exports;Zb=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(),Np.exports=CA(),Np.exports}var Xb;function OA(){if(Xb)return Tl;Xb=1;var e=AA(),t=hc(),n=HS();function s(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,o=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(o=a.return),r=a.return;while(r)}return a.tag===3?o:null}function c(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(s(188))}function h(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(s(188));return a!==r?null:r}for(var o=r,u=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return f(p),r;if(y===u)return f(p),a;y=y.sibling}throw Error(s(188))}if(o.return!==u.return)o=p,u=y;else{for(var w=!1,T=p.child;T;){if(T===o){w=!0,o=p,u=y;break}if(T===u){w=!0,u=p,o=y;break}T=T.sibling}if(!w){for(T=y.child;T;){if(T===o){w=!0,o=y,u=p;break}if(T===u){w=!0,u=y,o=p;break}T=T.sibling}if(!w)throw Error(s(189))}}if(o.alternate!==u)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?r:a}function g(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=g(r),a!==null)return a;r=r.sibling}return null}var m=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function V(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var ee=Symbol.for("react.client.reference");function le(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ee?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case _:return"Fragment";case R:return"Profiler";case x:return"StrictMode";case z:return"Suspense";case N:return"SuspenseList";case W:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case D:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case O:return a=r.displayName||null,a!==null?a:le(r.type)||"Memo";case I:a=r._payload,r=r._init;try{return le(r(a))}catch{}}return null}var oe=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},Se=[],J=-1;function P(r){return{current:r}}function K(r){0>J||(r.current=Se[J],Se[J]=null,J--)}function Q(r,a){J++,Se[J]=r.current,r.current=a}var re=P(null),ie=P(null),ue=P(null),fe=P(null);function be(r,a){switch(Q(ue,a),Q(ie,r),Q(re,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?hb(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=hb(a),r=pb(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}K(re),Q(re,r)}function Re(){K(re),K(ie),K(ue)}function bt(r){r.memoizedState!==null&&Q(fe,r);var a=re.current,o=pb(a,r.type);a!==o&&(Q(ie,r),Q(re,o))}function kt(r){ie.current===r&&(K(re),K(ie)),fe.current===r&&(K(fe),_l._currentValue=te)}var ft,vn;function Vt(r){if(ft===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);ft=a&&a[1]||"",vn=-1<o.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+ft+r+vn}var Oo=!1;
vendor: 6,995 bytes, lines 4-9
4function ni(r,a){if(!r||Oo)return"";Oo=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(q){var H=q}Reflect.construct(r,[],X)}else{try{X.call()}catch(q){H=q}r.call(X.prototype)}}else{try{throw Error()}catch(q){H=q}(X=r())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(q){if(q&&H&&typeof q.stack=="string")return[q.stack,H.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),w=y[0],T=y[1];if(w&&T){var j=w.split(`
5`),B=T.split(`
6`);for(p=u=0;u<j.length&&!j[u].includes("DetermineComponentFrameRoot");)u++;for(;p<B.length&&!B[p].includes("DetermineComponentFrameRoot");)p++;if(u===j.length||p===B.length)for(u=j.length-1,p=B.length-1;1<=u&&0<=p&&j[u]!==B[p];)p--;for(;1<=u&&0<=p;u--,p--)if(j[u]!==B[p]){if(u!==1||p!==1)do if(u--,p--,0>p||j[u]!==B[p]){var Y=`
7`+j[u].replace(" at new "," at ");return r.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",r.displayName)),Y}while(1<=u&&0<=p);break}}}finally{Oo=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?Vt(o):""}function ma(r,a){switch(r.tag){case 26:case 27:case 5:return Vt(r.type);case 16:return Vt("Lazy");case 13:return r.child!==a&&a!==null?Vt("Suspense Fallback"):Vt("Suspense");case 19:return Vt("SuspenseList");case 0:case 15:return ni(r.type,!1);case 11:return ni(r.type.render,!1);case 1:return ni(r.type,!0);case 31:return Vt("Activity");default:return""}}function No(r){try{var a="",o=null;do a+=ma(r,o),o=r,r=r.return;while(r);return a}catch(u){return`
8Error generating stack: `+u.message+`
9`+u.stack}}var bn=Object.prototype.hasOwnProperty,jo=e.unstable_scheduleCallback,Do=e.unstable_cancelCallback,Zt=e.unstable_shouldYield,ms=e.unstable_requestPaint,Xt=e.unstable_now,pf=e.unstable_getCurrentPriorityLevel,ga=e.unstable_ImmediatePriority,wc=e.unstable_UserBlockingPriority,ya=e.unstable_NormalPriority,Po=e.unstable_LowPriority,jr=e.unstable_IdlePriority,_c=e.log,gs=e.unstable_setDisableYieldValue,va=null,Jt=null;function Yn(r){if(typeof _c=="function"&&gs(r),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(va,r)}catch{}}var Gt=Math.clz32?Math.clz32:hr,mf=Math.log,Mo=Math.LN2;function hr(r){return r>>>=0,r===0?32:31-(mf(r)/Mo|0)|0}var ri=256,si=262144,ba=4194304;function pr(r){var a=r&42;if(a!==0)return a;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ne(r,a,o){var u=r.pendingLanes;if(u===0)return 0;var p=0,y=r.suspendedLanes,w=r.pingedLanes;r=r.warmLanes;var T=u&134217727;return T!==0?(u=T&~y,u!==0?p=pr(u):(w&=T,w!==0?p=pr(w):o||(o=T&~r,o!==0&&(p=pr(o))))):(T=u&~y,T!==0?p=pr(T):w!==0?p=pr(w):o||(o=u&~r,o!==0&&(p=pr(o)))),p===0?0:a!==0&&a!==p&&(a&y)===0&&(y=p&-p,o=a&-a,y>=o||y===32&&(o&4194048)!==0)?a:p}function ut(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function jt(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Kt(){var r=ba;return ba<<=1,(ba&62914560)===0&&(ba=4194304),r}function ys(r){for(var a=[],o=0;31>o;o++)a.push(r);return a}function ht(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function nn(r,a,o,u,p,y){var w=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var T=r.entanglements,j=r.expirationTimes,B=r.hiddenUpdates;for(o=w&~o;0<o;){var Y=31-Gt(o),X=1<<Y;T[Y]=0,j[Y]=-1;var H=B[Y];if(H!==null)for(B[Y]=null,Y=0;Y<H.length;Y++){var q=H[Y];q!==null&&(q.lane&=-536870913)}o&=~X}u!==0&&wa(r,u,0),y!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=y&~(w&~a))}function wa(r,a,o){r.pendingLanes|=a,r.suspendedLanes&=~a;var u=31-Gt(a);r.entangledLanes|=a,r.entanglements[u]=r.entanglements[u]|1073741824|o&261930}function rn(r,a){var o=r.entangledLanes|=a;for(r=r.entanglements;o;){var u=31-Gt(o),p=1<<u;p&a|r[u]&a&&(r[u]|=a),o&=~p}}function sn(r,a){var o=a&-a;return o=(o&42)!==0?1:ai(o),(o&(r.suspendedLanes|a))!==0?0:o}function ai(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Wn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function gf(){var r=G.p;return r!==0?r:(r=window.event,r===void 0?32:Ib(r.type))}function Jg(r,a){var o=G.p;try{return G.p=r,a()}finally{G.p=o}}var vs=Math.random().toString(36).slice(2),Ut="__reactFiber$"+vs,an="__reactProps$"+vs,ii="__reactContainer$"+vs,yf="__reactEvents$"+vs,fT="__reactListeners$"+vs,hT="__reactHandles$"+vs,ey="__reactResources$"+vs,Lo="__reactMarker$"+vs;function vf(r){delete r[Ut],delete r[an],delete r[yf],delete r[fT],delete r[hT]}function oi(r){var a=r[Ut];if(a)return a;for(var o=r.parentNode;o;){if(a=o[ii]||o[Ut]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(r=_b(r);r!==null;){if(o=r[Ut])return o;r=_b(r)}return a}r=o,o=r.parentNode}return null}function li(r){if(r=r[Ut]||r[ii]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Io(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(s(33))}function ci(r){var a=r[ey];return a||(a=r[ey]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Dt(r){r[Lo]=!0}var ty=new Set,ny={};function _a(r,a){ui(r,a),ui(r+"Capture",a)}function ui(r,a){for(ny[r]=a,r=0;r<a.length;r++)ty.add(a[r])}var pT=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 9
9037D\\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]*$"),ry={},sy={};function mT(r){return bn.call(sy,r)?!0:bn.call(ry,r)?!1:pT.test(r)?sy[r]=!0:(ry[r]=!0,!1)}function Sc(r,a,o){if(mT(a))if(o===null)r.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+o)}}function xc(r,a,o){if(o===null)r.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+o)}}function Dr(r,a,o,u){if(u===null)r.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(a,o,""+u)}}function Pn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ay(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function gT(r,a,o){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return p.call(this)},set:function(w){o=""+w,y.call(this,w)}}),Object.defineProperty(r,a,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function bf(r){if(!r._valueTracker){var a=ay(r)?"checked":"value";r._valueTracker=gT(r,a,""+r[a])}}function iy(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return r&&(u=ay(r)?r.checked?"true":"false":r.value),r=u,r!==o?(a.setValue(r),!0):!1}function Ec(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var yT=/[\n"\\]/g;function Mn(r){return r.replace(yT,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function wf(r,a,o,u,p,y,w,T){r.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.type=w:r.removeAttribute("type"),a!=null?w==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Pn(a)):r.value!==""+Pn(a)&&(r.value=""+Pn(a)):w!=="submit"&&w!=="reset"||r.removeAttribute("value"),a!=null?_f(r,w,Pn(a)):o!=null?_f(r,w,Pn(o)):u!=null&&r.removeAttribute("value"),p==null&&y!=null&&(r.defaultChecked=!!y),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?r.name=""+Pn(T):r.removeAttribute("name")}function oy(r,a,o,u,p,y,w,T){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(r.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){bf(r);return}o=o!=null?""+Pn(o):"",a=a!=null?""+Pn(a):o,T||a===r.value||(r.value=a),r.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=T?r.checked:!!u,r.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(r.name=w),bf(r)}function _f(r,a,o){a==="number"&&Ec(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function di(r,a,o,u){if(r=r.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<r.length;o++)p=a.hasOwnProperty("$"+r[o].value),r[o].selected!==p&&(r[o].selected=p),p&&u&&(r[o].defaultSelected=!0)}else{for(o=""+Pn(o),a=null,p=0;p<r.length;p++){if(r[p].value===o){r[p].selected=!0,u&&(r[p].defaultSelected=!0);return}a!==null||r[p].disabled||(a=r[p])}a!==null&&(a.selected=!0)}}function ly(r,a,o){if(a!=null&&(a=""+Pn(a),a!==r.value&&(r.value=a),o==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=o!=null?""+Pn(o):""}function cy(r,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(s(92));if(oe(u)){if(1<u.length)throw Error(s(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=Pn(a),r.defaultValue=o,u=r.textContent,u===o&&u!==""&&u!==null&&(r.value=u),bf(r)}function fi(r,a){if(a){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=a;return}}r.textContent=a}var vT=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 uy(r,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":u?r.setProperty(a,o):typeof o!="number"||o===0||vT.has(a)?a==="float"?r.cssFloat=o:r[a]=(""+o).trim():r[a]=o+"px"}function dy(r,a,o){if(a!=null&&typeof a!="object")throw Error(s(62));if(r=r.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&uy(r,p,u)}else for(var y in a)a.hasOwnProperty(y)&&uy(r,y,a[y])}function Sf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 bT=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"]]),wT=/^[\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 Rc(r){return wT.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Pr(){}var xf=null;function Ef(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var hi=null,pi=null;function fy(r){var a=li(r);if(a&&(r=a.stateNode)){var o=r[an]||null;e:switch(r=a.stateNode,a.type){case"input":if(wf(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Mn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==r&&u.form===r.form){var p=u[an]||null;if(!p)throw Error(s(90));wf(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===r.form&&iy(u)}break e;case"textarea":ly(r,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&di(r,!!o.multiple,a,!1)}}}var Rf=!1;function hy(r,a,o){if(Rf)return r(a,o);Rf=!0;try{var u=r(a);return u}finally{if(Rf=!1,(hi!==null||pi!==null)&&(fu(),hi&&(a=hi,r=pi,pi=hi=null,fy(a),r)))for(a=0;a<r.length;a++)fy(r[a])}}function Uo(r,a){var o=r.stateNode;if(o===null)return null;var u=o[an]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(s(231,a,typeof o));return o}var Mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tf=!1;if(Mr)try{var zo={};Object.defineProperty(zo,"passive",{get:function(){Tf=!0}}),window.addEventListener("test",zo,zo),window.removeEventListener("test",zo,zo)}catch{Tf=!1}var bs=null,kf=null,Tc=null;function py(){if(Tc)return Tc;var r,a=kf,o=a.length,u,p="value"in bs?bs.value:bs.textContent,y=p.length;for(r=0;r<o&&a[r]===p[r];r++);var w=o-r;for(u=1;u<=w&&a[o-u]===p[y-u];u++);return Tc=p.slice(r,1<u?1-u:void 0)}function kc(r){var a=r.keyCode;
vendor: 5,232 bytes, line 9
9return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Ac(){return!0}function my(){return!1}function on(r){function a(o,u,p,y,w){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var T in r)r.hasOwnProperty(T)&&(o=r[T],this[T]=o?o(y):y[T]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ac:my,this.isPropagationStopped=my,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Ac)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ac)},persist:function(){},isPersistent:Ac}),a}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cc=on(Sa),$o=m({},Sa,{view:0,detail:0}),_T=on($o),Af,Cf,Bo,Oc=m({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Bo&&(Bo&&r.type==="mousemove"?(Af=r.screenX-Bo.screenX,Cf=r.screenY-Bo.screenY):Cf=Af=0,Bo=r),Af)},movementY:function(r){return"movementY"in r?r.movementY:Cf}}),gy=on(Oc),ST=m({},Oc,{dataTransfer:0}),xT=on(ST),ET=m({},$o,{relatedTarget:0}),Of=on(ET),RT=m({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),TT=on(RT),kT=m({},Sa,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),AT=on(kT),CT=m({},Sa,{data:0}),yy=on(CT),OT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NT={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"},jT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DT(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=jT[r])?!!a[r]:!1}function Nf(){return DT}var PT=m({},$o,{key:function(r){if(r.key){var a=OT[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=kc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?NT[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nf,charCode:function(r){return r.type==="keypress"?kc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?kc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),MT=on(PT),LT=m({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vy=on(LT),IT=m({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nf}),UT=on(IT),zT=m({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),$T=on(zT),BT=m({},Oc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),HT=on(BT),qT=m({},Sa,{newState:0,oldState:0}),FT=on(qT),VT=[9,13,27,32],jf=Mr&&"CompositionEvent"in window,Ho=null;Mr&&"documentMode"in document&&(Ho=document.documentMode);var GT=Mr&&"TextEvent"in window&&!Ho,by=Mr&&(!jf||Ho&&8<Ho&&11>=Ho),wy=" ",_y=!1;function Sy(r,a){switch(r){case"keyup":return VT.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xy(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var mi=!1;function KT(r,a){switch(r){case"compositionend":return xy(a);case"keypress":return a.which!==32?null:(_y=!0,wy);case"textInput":return r=a.data,r===wy&&_y?null:r;default:return null}}function YT(r,a){if(mi)return r==="compositionend"||!jf&&Sy(r,a)?(r=py(),Tc=kf=bs=null,mi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return by&&a.locale!=="ko"?null:a.data;default:return null}}var WT={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 Ey(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!WT[r.type]:a==="textarea"}
vendor: 5,602 bytes, line 9
9function Ry(r,a,o,u){hi?pi?pi.push(u):pi=[u]:hi=u,a=bu(a,"onChange"),0<a.length&&(o=new Cc("onChange","change",null,o,u),r.push({event:o,listeners:a}))}var qo=null,Fo=null;function QT(r){ob(r,0)}function Nc(r){var a=Io(r);if(iy(a))return r}function Ty(r,a){if(r==="change")return a}var ky=!1;if(Mr){var Df;if(Mr){var Pf="oninput"in document;if(!Pf){var Ay=document.createElement("div");Ay.setAttribute("oninput","return;"),Pf=typeof Ay.oninput=="function"}Df=Pf}else Df=!1;ky=Df&&(!document.documentMode||9<document.documentMode)}function Cy(){qo&&(qo.detachEvent("onpropertychange",Oy),Fo=qo=null)}function Oy(r){if(r.propertyName==="value"&&Nc(Fo)){var a=[];Ry(a,Fo,r,Ef(r)),hy(QT,a)}}function ZT(r,a,o){r==="focusin"?(Cy(),qo=a,Fo=o,qo.attachEvent("onpropertychange",Oy)):r==="focusout"&&Cy()}function XT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Nc(Fo)}function JT(r,a){if(r==="click")return Nc(a)}function ek(r,a){if(r==="input"||r==="change")return Nc(a)}function tk(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var wn=typeof Object.is=="function"?Object.is:tk;function Vo(r,a){if(wn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var o=Object.keys(r),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!bn.call(a,p)||!wn(r[p],a[p]))return!1}return!0}function Ny(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function jy(r,a){var o=Ny(r);r=0;for(var u;o;){if(o.nodeType===3){if(u=r+o.textContent.length,r<=a&&u>=a)return{node:o,offset:a-r};r=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Ny(o)}}function Dy(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?Dy(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Py(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Ec(r.document);a instanceof r.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)r=a.contentWindow;else break;a=Ec(r.document)}return a}function Mf(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var nk=Mr&&"documentMode"in document&&11>=document.documentMode,gi=null,Lf=null,Go=null,If=!1;function My(r,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;If||gi==null||gi!==Ec(u)||(u=gi,"selectionStart"in u&&Mf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Go&&Vo(Go,u)||(Go=u,u=bu(Lf,"onSelect"),0<u.length&&(a=new Cc("onSelect","select",null,a,o),r.push({event:a,listeners:u}),a.target=gi)))}function xa(r,a){var o={};return o[r.toLowerCase()]=a.toLowerCase(),o["Webkit"+r]="webkit"+a,o["Moz"+r]="moz"+a,o}var yi={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionrun:xa("Transition","TransitionRun"),transitionstart:xa("Transition","TransitionStart"),transitioncancel:xa("Transition","TransitionCancel"),transitionend:xa("Transition","TransitionEnd")},Uf={},Ly={};Mr&&(Ly=document.createElement("div").style,"AnimationEvent"in window||(delete yi.animationend.animation,delete yi.animationiteration.animation,delete yi.animationstart.animation),"TransitionEvent"in window||delete yi.transitionend.transition);function Ea(r){if(Uf[r])return Uf[r];if(!yi[r])return r;var a=yi[r],o;for(o in a)if(a.hasOwnProperty(o)&&o in Ly)return Uf[r]=a[o];return r}var Iy=Ea("animationend"),Uy=Ea("animationiteration"),zy=Ea("animationstart"),rk=Ea("transitionrun"),sk=Ea("transitionstart"),ak=Ea("transitioncancel"),$y=Ea("transitionend"),By=new Map,zf="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(" ");zf.push("scrollEnd");function Qn(r,a){By.set(r,a),_a(a,[r])}var jc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Ln=[],vi=0,$f=0;function Dc(){for(var r=vi,a=$f=vi=0;a<r;){var o=Ln[a];Ln[a++]=null;var u=Ln[a];Ln[a++]=null;var p=Ln[a];Ln[a++]=null;var y=Ln[a];if(Ln[a++]=null,u!==null&&p!==null){var w=u.pending;w===null?p.next=p:(p.next=w.next,w.next=p),u.pending=p}y!==0&&Hy(o,p,y)}}function Pc(r,a,o,u){Ln[vi++]=r,Ln[vi++]=a,Ln[vi++]=o,Ln[vi++]=u,$f|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function Bf(r,a,o,u){return Pc(r,a,o,u),Mc(r)}
vendor: 15,362 bytes, line 9
9function Ra(r,a){return Pc(r,null,null,a),Mc(r)}function Hy(r,a,o){r.lanes|=o;var u=r.alternate;u!==null&&(u.lanes|=o);for(var p=!1,y=r.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(r=y.stateNode,r===null||r._visibility&1||(p=!0)),r=y,y=y.return;return r.tag===3?(y=r.stateNode,p&&a!==null&&(p=31-Gt(o),r=y.hiddenUpdates,u=r[p],u===null?r[p]=[a]:u.push(a),a.lane=o|536870912),y):null}function Mc(r){if(50<pl)throw pl=0,Qh=null,Error(s(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var bi={};function ik(r,a,o,u){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(r,a,o,u){return new ik(r,a,o,u)}function Hf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Lr(r,a){var o=r.alternate;return o===null?(o=_n(r.tag,a,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=a,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,a=r.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function qy(r,a){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,a=o.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Lc(r,a,o,u,p,y){var w=0;if(u=r,typeof r=="function")Hf(r)&&(w=1);else if(typeof r=="string")w=dA(r,o,re.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case W:return r=_n(31,o,a,p),r.elementType=W,r.lanes=y,r;case _:return Ta(o.children,p,y,a);case x:w=8,p|=24;break;case R:return r=_n(12,o,a,p|2),r.elementType=R,r.lanes=y,r;case z:return r=_n(13,o,a,p),r.elementType=z,r.lanes=y,r;case N:return r=_n(19,o,a,p),r.elementType=N,r.lanes=y,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:w=10;break e;case A:w=9;break e;case D:w=11;break e;case O:w=14;break e;case I:w=16,u=null;break e}w=29,o=Error(s(130,r===null?"null":typeof r,"")),u=null}return a=_n(w,o,a,p),a.elementType=r,a.type=u,a.lanes=y,a}function Ta(r,a,o,u){return r=_n(7,r,u,a),r.lanes=o,r}function qf(r,a,o){return r=_n(6,r,null,a),r.lanes=o,r}function Fy(r){var a=_n(18,null,null,0);return a.stateNode=r,a}function Ff(r,a,o){return a=_n(4,r.children!==null?r.children:[],r.key,a),a.lanes=o,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Vy=new WeakMap;function In(r,a){if(typeof r=="object"&&r!==null){var o=Vy.get(r);return o!==void 0?o:(a={value:r,source:a,stack:No(a)},Vy.set(r,a),a)}return{value:r,source:a,stack:No(a)}}var wi=[],_i=0,Ic=null,Ko=0,Un=[],zn=0,ws=null,mr=1,gr="";function Ir(r,a){wi[_i++]=Ko,wi[_i++]=Ic,Ic=r,Ko=a}function Gy(r,a,o){Un[zn++]=mr,Un[zn++]=gr,Un[zn++]=ws,ws=r;var u=mr;r=gr;var p=32-Gt(u)-1;u&=~(1<<p),o+=1;var y=32-Gt(a)+p;if(30<y){var w=p-p%5;y=(u&(1<<w)-1).toString(32),u>>=w,p-=w,mr=1<<32-Gt(a)+p|o<<p|u,gr=y+r}else mr=1<<y|o<<p|u,gr=r}function Vf(r){r.return!==null&&(Ir(r,1),Gy(r,1,0))}function Gf(r){for(;r===Ic;)Ic=wi[--_i],wi[_i]=null,Ko=wi[--_i],wi[_i]=null;for(;r===ws;)ws=Un[--zn],Un[zn]=null,gr=Un[--zn],Un[zn]=null,mr=Un[--zn],Un[zn]=null}function Ky(r,a){Un[zn++]=mr,Un[zn++]=gr,Un[zn++]=ws,mr=a.id,gr=a.overflow,ws=r}var zt=null,lt=null,Fe=!1,_s=null,$n=!1,Kf=Error(s(519));function Ss(r){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yo(In(a,r)),Kf}function Yy(r){var a=r.stateNode,o=r.type,u=r.memoizedProps;switch(a[Ut]=r,a[an]=u,o){case"dialog":$e("cancel",a),$e("close",a);break;case"iframe":case"object":case"embed":$e("load",a);break;case"video":case"audio":for(o=0;o<gl.length;o++)$e(gl[o],a);break;case"source":$e("error",a);break;case"img":case"image":case"link":$e("error",a),$e("load",a);break;case"details":$e("toggle",a);break;case"input":$e("invalid",a),oy(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":$e("invalid",a);break;case"textarea":$e("invalid",a),cy(a,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||db(a.textContent,o)?(u.popover!=null&&($e("beforetoggle",a),$e("toggle",a)),u.onScroll!=null&&$e("scroll",a),u.onScrollEnd!=null&&$e("scrollend",a),u.onClick!=null&&(a.onclick=Pr),a=!0):a=!1,a||Ss(r,!0)}function Wy(r){for(zt=r.return;zt;)switch(zt.tag){case 5:case 31:case 13:$n=!1;return;case 27:case 3:$n=!0;return;default:zt=zt.return}}function Si(r){if(r!==zt)return!1;if(!Fe)return Wy(r),Fe=!0,!1;var a=r.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||dp(r.type,r.memoizedProps)),o=!o),o&&lt&&Ss(r),Wy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(317));lt=wb(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(317));lt=wb(r)}else a===27?(a=lt,Ls(r.type)?(r=gp,gp=null,lt=r):lt=a):lt=zt?Hn(r.stateNode.nextSibling):null;return!0}function ka(){lt=zt=null,Fe=!1}function Yf(){var r=_s;return r!==null&&(dn===null?dn=r:dn.push.apply(dn,r),_s=null),r}function Yo(r){_s===null?_s=[r]:_s.push(r)}var Wf=P(null),Aa=null,Ur=null;function xs(r,a,o){Q(Wf,a._currentValue),a._currentValue=o}function zr(r){r._currentValue=Wf.current,K(Wf)}function Qf(r,a,o){for(;r!==null;){var u=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),r===o)break;r=r.return}}function Zf(r,a,o,u){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var y=p.dependencies;if(y!==null){var w=p.child;y=y.firstContext;e:for(;y!==null;){var T=y;y=p;for(var j=0;j<a.length;j++)if(T.context===a[j]){y.lanes|=o,T=y.alternate,T!==null&&(T.lanes|=o),Qf(y.return,o,r),u||(w=null);break e}y=T.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(s(341));w.lanes|=o,y=w.alternate,y!==null&&(y.lanes|=o),Qf(w,o,r),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===r){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}function xi(r,a,o,u){r=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var T=p.type;wn(p.pendingProps.value,w.value)||(r!==null?r.push(T):r=[T])}}else if(p===fe.current){if(w=p.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(_l):r=[_l])}p=p.return}r!==null&&Zf(a,r,o,u),a.flags|=262144}function Uc(r){for(r=r.firstContext;r!==null;){if(!wn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ca(r){Aa=r,Ur=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function $t(r){return Qy(Aa,r)}function zc(r,a){return Aa===null&&Ca(r),Qy(r,a)}function Qy(r,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},Ur===null){if(r===null)throw Error(s(308));Ur=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Ur=Ur.next=a;return o}var ok=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(o,u){r.push(u)}};this.abort=function(){a.aborted=!0,r.forEach(function(o){return o()})}},lk=e.unstable_scheduleCallback,ck=e.unstable_NormalPriority,wt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xf(){return{controller:new ok,data:new Map,refCount:0}}function Wo(r){r.refCount--,r.refCount===0&&lk(ck,function(){r.controller.abort()})}var Qo=null,Jf=0,Ei=0,Ri=null;function uk(r,a){if(Qo===null){var o=Qo=[];Jf=0,Ei=np(),Ri={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Jf++,a.then(Zy,Zy),a}function Zy(){if(--Jf===0&&Qo!==null){Ri!==null&&(Ri.status="fulfilled");var r=Qo;Qo=null,Ei=0,Ri=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function dk(r,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return r.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var Xy=M.S;M.S=function(r,a){M0=Xt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&uk(r,a),Xy!==null&&Xy(r,a)};var Oa=P(null);function eh(){var r=Oa.current;return r!==null?r:st.pooledCache}function $c(r,a){a===null?Q(Oa,Oa.current):Q(Oa,a.pool)}function Jy(){var r=eh();return r===null?null:{parent:wt._currentValue,pool:r}}var Ti=Error(s(460)),th=Error(s(474)),Bc=Error(s(542)),Hc={then:function(){}};function ev(r){return r=r.status,r==="fulfilled"||r==="rejected"}function tv(r,a,o){switch(o=r[o],o===void 0?r.push(a):o!==a&&(a.then(Pr,Pr),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,rv(r),r;default:if(typeof a.status=="string")a.then(Pr,Pr);else{if(r=st,r!==null&&100<r.shellSuspendCounter)throw Error(s(482));r=a,r.status="pending",r.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,rv(r),r}throw ja=a,Ti}}function Na(r){try{var a=r._init;return a(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(ja=o,Ti):o}}var ja=null;function nv(){if(ja===null)throw Error(s(459));var r=ja;return ja=null,r}function rv(r){if(r===Ti||r===Bc)throw Error(s(483))}var ki=null,Zo=0;function qc(r){var a=Zo;return Zo+=1,ki===null&&(ki=[]),tv(ki,r,a)}function Xo(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Fc(r,a){throw a.$$typeof===v?Error(s(525)):(r=Object.prototype.toString.call(a),Error(s(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function sv(r){function a(U,L){if(r){var $=U.deletions;$===null?(U.deletions=[L],U.flags|=16):$.push(L)}}function o(U,L){if(!r)return null;for(;L!==null;)a(U,L),L=L.sibling;return null}function u(U){for(var L=new Map;U!==null;)U.key!==null?L.set(U.key,U):L.set(U.index,U),U=U.sibling;return L}function p(U,L){return U=Lr(U,L),U.index=0,U.sibling=null,U}function y(U,L,$){return U.index=$,r?($=U.alternate,$!==null?($=$.index,$<L?(U.flags|=67108866,L):$):(U.flags|=67108866,L)):(U.flags|=1048576,L)}function w(U){return r&&U.alternate===null&&(U.flags|=67108866),U}function T(U,L,$,Z){return L===null||L.tag!==6?(L=qf($,U.mode,Z),L.return=U,L):(L=p(L,$),L.return=U,L)}function j(U,L,$,Z){var Ee=$.type;return Ee===_?Y(U,L,$.props.children,Z,$.key):L!==null&&(L.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===I&&Na(Ee)===L.type)?(L=p(L,$.props),Xo(L,$),L.return=U,L):(L=Lc($.type,$.key,$.props,null,U.mode,Z),Xo(L,$),L.return=U,L)}function B(U,L,$,Z){return L===null||L.tag!==4||L.stateNode.containerInfo!==$.containerInfo||L.stateNode.implementation!==$.implementation?(L=Ff($,U.mode,Z),L.return=U,L):(L=p(L,$.children||[]),L.return=U,L)}function Y(U,L,$,Z,Ee){return L===null||L.tag!==7?(L=Ta($,U.mode,Z,Ee),L.return=U,L):(L=p(L,$),L.return=U,L)}function X(U,L,$){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=qf(""+L,U.mode,$),L.return=U,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case b:return $=Lc(L.type,L.key,L.props,null,U.mode,$),Xo($,L),$.return=U,$;case S:return L=Ff(L,U.mode,$),L.return=U,L;case I:return L=Na(L),X(U,L,$)}if(oe(L)||V(L))return L=Ta(L,U.mode,$,null),L.return=U,L;if(typeof L.then=="function")return X(U,qc(L),$);if(L.$$typeof===C)return X(U,zc(U,L),$);Fc(U,L)}return null}function H(U,L,$,Z){var Ee=L!==null?L.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return Ee!==null?null:T(U,L,""+$,Z);if(typeof $=="object"&&$!==null){switch($.$$typeof){case b:return $.key===Ee?j(U,L,$,Z):null;case S:return $.key===Ee?B(U,L,$,Z):null;case I:return $=Na($),H(U,L,$,Z)}if(oe($)||V($))return Ee!==null?null:Y(U,L,$,Z,null);if(typeof $.then=="function")return H(U,L,qc($),Z);if($.$$typeof===C)return H(U,L,zc(U,$),Z);Fc(U,$)}return null}function q(U,L,$,Z,Ee){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return U=U.get($)||null,T(L,U,""+Z,Ee);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return U=U.get(Z.key===null?$:Z.key)||null,j(L,U,Z,Ee);case S:return U=U.get(Z.key===null?$:Z.key)||null,B(L,U,Z,Ee);case I:return Z=Na(Z),q(U,L,$,Z,Ee)}if(oe(Z)||V(Z))return U=U.get($)||null,Y(L,U,Z,Ee,null);if(typeof Z.then=="function")return q(U,L,$,qc(Z),Ee);if(Z.$$typeof===C)return q(U,L,$,zc(L,Z),Ee);Fc(L,Z)}return null}function me(U,L,$,Z){for(var Ee=null,Ke=null,_e=L,Le=L=0,He=null;_e!==null&&Le<$.length;Le++){_e.index>Le?(He=_e,_e=null):He=_e.sibling;var Ye=H(U,_e,$[Le],Z);if(Ye===null){_e===null&&(_e=He);break}r&&_e&&Ye.alternate===null&&a(U,_e),L=y(Ye,L,Le),Ke===null?Ee=Ye:Ke.sibling=Ye,Ke=Ye,_e=He}if(Le===$.length)return o(U,_e),Fe&&Ir(U,Le),Ee;if(_e===null){for(;Le<$.length;Le++)_e=X(U,$[Le],Z),_e!==null&&(L=y(_e,L,Le),Ke===null?Ee=_e:Ke.sibling=_e,Ke=_e);return Fe&&Ir(U,Le),Ee}for(_e=u(_e);Le<$.length;Le++)He=q(_e,U,Le,$[Le],Z),He!==null&&(r&&He.alternate!==null&&_e.delete(He.key===null?Le:He.key),L=y(He,L,Le),Ke===null?Ee=He:Ke.sibling=He,Ke=He);return r&&_e.forEach(function(Bs){return a(U,Bs)}),Fe&&Ir(U,Le),Ee}function ke(U,L,$,Z){if($==null)throw Error(s(151));for(var Ee=null,Ke=null,_e=L,Le=L=0,He=null,Ye=$.next();_e!==null&&!Ye.done;Le++,Ye=$.next()){_e.index>Le?(He=_e,_e=null):He=_e.sibling;var Bs=H(U,_e,Ye.value,Z);if(Bs===null){_e===null&&(_e=He);break}r&&_e&&Bs.alternate===null&&a(U,_e),L=y(Bs,L,Le),Ke===null?Ee=Bs:Ke.sibling=Bs,Ke=Bs,_e=He}if(Ye.done)return o(U,_e),Fe&&Ir(U,Le),Ee;if(_e===null){for(;!Ye.done;Le++,Ye=$.next())Ye=X(U,Ye.value,Z),Ye!==null&&(L=y(Ye,L,Le),Ke===null?Ee=Ye:Ke.sibling=Ye,Ke=Ye);return Fe&&Ir(U,Le),Ee}for(_e=u(_e);!Ye.done;Le++,Ye=$.next())Ye=q(_e,U,Le,Ye.value,Z),Ye!==null&&(r&&Ye.alternate!==null&&_e.delete(Ye.key===null?Le:Ye.key),L=y(Ye,L,Le),Ke===null?Ee=Ye:Ke.sibling=Ye,Ke=Ye);return r&&_e.forEach(function(SA){return a(U,SA)}),Fe&&Ir(U,Le),Ee}function nt(U,L,$,Z){if(typeof $=="object"&&$!==null&&$.type===_&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case b:e:{for(var Ee=$.key;L!==null;){if(L.key===Ee){if(Ee=$.type,Ee===_){if(L.tag===7){o(U,L.sibling),Z=p(L,$.props.children),Z.return=U,U=Z;break e}}else if(L.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===I&&Na(Ee)===L.t
vendor: 4,160 bytes, line 9
9ype){o(U,L.sibling),Z=p(L,$.props),Xo(Z,$),Z.return=U,U=Z;break e}o(U,L);break}else a(U,L);L=L.sibling}$.type===_?(Z=Ta($.props.children,U.mode,Z,$.key),Z.return=U,U=Z):(Z=Lc($.type,$.key,$.props,null,U.mode,Z),Xo(Z,$),Z.return=U,U=Z)}return w(U);case S:e:{for(Ee=$.key;L!==null;){if(L.key===Ee)if(L.tag===4&&L.stateNode.containerInfo===$.containerInfo&&L.stateNode.implementation===$.implementation){o(U,L.sibling),Z=p(L,$.children||[]),Z.return=U,U=Z;break e}else{o(U,L);break}else a(U,L);L=L.sibling}Z=Ff($,U.mode,Z),Z.return=U,U=Z}return w(U);case I:return $=Na($),nt(U,L,$,Z)}if(oe($))return me(U,L,$,Z);if(V($)){if(Ee=V($),typeof Ee!="function")throw Error(s(150));return $=Ee.call($),ke(U,L,$,Z)}if(typeof $.then=="function")return nt(U,L,qc($),Z);if($.$$typeof===C)return nt(U,L,zc(U,$),Z);Fc(U,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,L!==null&&L.tag===6?(o(U,L.sibling),Z=p(L,$),Z.return=U,U=Z):(o(U,L),Z=qf($,U.mode,Z),Z.return=U,U=Z),w(U)):o(U,L)}return function(U,L,$,Z){try{Zo=0;var Ee=nt(U,L,$,Z);return ki=null,Ee}catch(_e){if(_e===Ti||_e===Bc)throw _e;var Ke=_n(29,_e,null,U.mode);return Ke.lanes=Z,Ke.return=U,Ke}}}var Da=sv(!0),av=sv(!1),Es=!1;function nh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rh(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Rs(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Ts(r,a,o){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(Qe&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=Mc(r),Hy(r,null,o),a}return Pc(r,u,a,o),Mc(r)}function Jo(r,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=r.pendingLanes,o|=u,a.lanes=o,rn(r,o)}}function sh(r,a){var o=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=w:y=y.next=w,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=a:r.next=a,o.lastBaseUpdate=a}var ah=!1;function el(){if(ah){var r=Ri;if(r!==null)throw r}}function tl(r,a,o,u){ah=!1;var p=r.updateQueue;Es=!1;var y=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var j=T,B=j.next;j.next=null,w===null?y=B:w.next=B,w=j;var Y=r.alternate;Y!==null&&(Y=Y.updateQueue,T=Y.lastBaseUpdate,T!==w&&(T===null?Y.firstBaseUpdate=B:T.next=B,Y.lastBaseUpdate=j))}if(y!==null){var X=p.baseState;w=0,Y=B=j=null,T=y;do{var H=T.lane&-536870913,q=H!==T.lane;if(q?(Be&H)===H:(u&H)===H){H!==0&&H===Ei&&(ah=!0),Y!==null&&(Y=Y.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var me=r,ke=T;H=a;var nt=o;switch(ke.tag){case 1:if(me=ke.payload,typeof me=="function"){X=me.call(nt,X,H);break e}X=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ke.payload,H=typeof me=="function"?me.call(nt,X,H):me,H==null)break e;X=m({},X,H);break e;case 2:Es=!0}}H=T.callback,H!==null&&(r.flags|=64,q&&(r.flags|=8192),q=p.callbacks,q===null?p.callbacks=[H]:q.push(H))}else q={lane:H,tag:T.tag,payload:T.payload,callback:T.callback,next:null},Y===null?(B=Y=q,j=X):Y=Y.next=q,w|=H;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;q=T,T=q.next,q.next=null,p.lastBaseUpdate=q,p.shared.pending=null}}while(!0);Y===null&&(j=X),p.baseState=j,p.firstBaseUpdate=B,p.lastBaseUpdate=Y,y===null&&(p.shared.lanes=0),Ns|=w,r.lanes=w,r.memoizedState=X}}function iv(r,a){if(typeof r!="function")throw Error(s(191,r));r.call(a)}function ov(r,a){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)iv(o[r],a)}var Ai=P(null),Vc=P(0);function lv(r,a){r=Yr,Q(Vc,r),Q(Ai,a),Yr=r|a.baseLanes}function ih(){Q(Vc,Yr),Q(Ai,Ai.current)}
vendor: 4,722 bytes, line 9
9function oh(){Yr=Vc.current,K(Ai),K(Vc)}var Sn=P(null),Bn=null;function ks(r){var a=r.alternate;Q(yt,yt.current&1),Q(Sn,r),Bn===null&&(a===null||Ai.current!==null||a.memoizedState!==null)&&(Bn=r)}function lh(r){Q(yt,yt.current),Q(Sn,r),Bn===null&&(Bn=r)}function cv(r){r.tag===22?(Q(yt,yt.current),Q(Sn,r),Bn===null&&(Bn=r)):As()}function As(){Q(yt,yt.current),Q(Sn,Sn.current)}function xn(r){K(Sn),Bn===r&&(Bn=null),K(yt)}var yt=P(0);function Gc(r){for(var a=r;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||pp(o)||mp(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var $r=0,Me=null,et=null,_t=null,Kc=!1,Ci=!1,Pa=!1,Yc=0,nl=0,Oi=null,fk=0;function pt(){throw Error(s(321))}function ch(r,a){if(a===null)return!1;for(var o=0;o<a.length&&o<r.length;o++)if(!wn(r[o],a[o]))return!1;return!0}function uh(r,a,o,u,p,y){return $r=y,Me=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,M.H=r===null||r.memoizedState===null?Gv:Rh,Pa=!1,y=o(u,p),Pa=!1,Ci&&(y=dv(a,o,u,p)),uv(r),y}function uv(r){M.H=al;var a=et!==null&&et.next!==null;if($r=0,_t=et=Me=null,Kc=!1,nl=0,Oi=null,a)throw Error(s(300));r===null||St||(r=r.dependencies,r!==null&&Uc(r)&&(St=!0))}function dv(r,a,o,u){Me=r;var p=0;do{if(Ci&&(Oi=null),nl=0,Ci=!1,25<=p)throw Error(s(301));if(p+=1,_t=et=null,r.updateQueue!=null){var y=r.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}M.H=Kv,y=a(o,u)}while(Ci);return y}function hk(){var r=M.H,a=r.useState()[0];return a=typeof a.then=="function"?rl(a):a,r=r.useState()[0],(et!==null?et.memoizedState:null)!==r&&(Me.flags|=1024),a}function dh(){var r=Yc!==0;return Yc=0,r}function fh(r,a,o){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~o}function hh(r){if(Kc){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Kc=!1}$r=0,_t=et=Me=null,Ci=!1,nl=Yc=0,Oi=null}function en(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Me.memoizedState=_t=r:_t=_t.next=r,_t}function vt(){if(et===null){var r=Me.alternate;r=r!==null?r.memoizedState:null}else r=et.next;var a=_t===null?Me.memoizedState:_t.next;if(a!==null)_t=a,et=r;else{if(r===null)throw Me.alternate===null?Error(s(467)):Error(s(310));et=r,r={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},_t===null?Me.memoizedState=_t=r:_t=_t.next=r}return _t}function Wc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rl(r){var a=nl;return nl+=1,Oi===null&&(Oi=[]),r=tv(Oi,r,a),a=Me,(_t===null?a.memoizedState:_t.next)===null&&(a=a.alternate,M.H=a===null||a.memoizedState===null?Gv:Rh),r}function Qc(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return rl(r);if(r.$$typeof===C)return $t(r)}throw Error(s(438,String(r)))}function ph(r){var a=null,o=Me.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=Me.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=Wc(),Me.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(r),u=0;u<r;u++)o[u]=ne;return a.index++,o}function Br(r,a){return typeof a=="function"?a(r):a}function Zc(r){var a=vt();return mh(a,et,r)}function mh(r,a,o){var u=r.queue;if(u===null)throw Error(s(311));u.lastRenderedReducer=o;var p=r.baseQueue,y=u.pending;if(y!==null){if(p!==null){var w=p.next;p.next=y.next,y.next=w}a.baseQueue=p=y,u.pending=null}if(y=r.baseState,p===null)r.memoizedState=y;else{a=p.next;var T=w=null,j=null,B=a,Y=!1;do{var X=B.lane&-536870913;if(X!==B.lane?(Be&X)===X:($r&X)===X){var H=B.revertLane;if(H===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),X===Ei&&(Y=!0);else if(($r&H)===H){B=B.next,H===Ei&&(Y=!0);continue}else X={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},j===null?(T=j=X,w=y):j=j.next=X,Me.lanes|=H,Ns|=H;X=B.action,Pa&&o(y,X),y=B.hasEagerState?B.eagerState:o(y,X)}else H={lane:X,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}
vendor: 4,422 bytes, line 9
9,j===null?(T=j=H,w=y):j=j.next=H,Me.lanes|=X,Ns|=X;B=B.next}while(B!==null&&B!==a);if(j===null?w=y:j.next=T,!wn(y,r.memoizedState)&&(St=!0,Y&&(o=Ri,o!==null)))throw o;r.memoizedState=y,r.baseState=w,r.baseQueue=j,u.lastRenderedState=y}return p===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function gh(r){var a=vt(),o=a.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=r;var u=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var w=p=p.next;do y=r(y,w.action),w=w.next;while(w!==p);wn(y,a.memoizedState)||(St=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,u]}function fv(r,a,o){var u=Me,p=vt(),y=Fe;if(y){if(o===void 0)throw Error(s(407));o=o()}else o=a();var w=!wn((et||p).memoizedState,o);if(w&&(p.memoizedState=o,St=!0),p=p.queue,bh(mv.bind(null,u,p,r),[r]),p.getSnapshot!==a||w||_t!==null&&_t.memoizedState.tag&1){if(u.flags|=2048,Ni(9,{destroy:void 0},pv.bind(null,u,p,o,a),null),st===null)throw Error(s(349));y||($r&127)!==0||hv(u,a,o)}return o}function hv(r,a,o){r.flags|=16384,r={getSnapshot:a,value:o},a=Me.updateQueue,a===null?(a=Wc(),Me.updateQueue=a,a.stores=[r]):(o=a.stores,o===null?a.stores=[r]:o.push(r))}function pv(r,a,o,u){a.value=o,a.getSnapshot=u,gv(a)&&yv(r)}function mv(r,a,o){return o(function(){gv(a)&&yv(r)})}function gv(r){var a=r.getSnapshot;r=r.value;try{var o=a();return!wn(r,o)}catch{return!0}}function yv(r){var a=Ra(r,2);a!==null&&fn(a,r,2)}function yh(r){var a=en();if(typeof r=="function"){var o=r;if(r=o(),Pa){Yn(!0);try{o()}finally{Yn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:r},a}function vv(r,a,o,u){return r.baseState=o,mh(r,et,typeof u=="function"?u:Br)}function pk(r,a,o,u,p){if(eu(r))throw Error(s(485));if(r=a.action,r!==null){var y={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){y.listeners.push(w)}};M.T!==null?o(!0):y.isTransition=!1,u(y),o=a.pending,o===null?(y.next=a.pending=y,bv(a,y)):(y.next=o.next,a.pending=o.next=y)}}function bv(r,a){var o=a.action,u=a.payload,p=r.state;if(a.isTransition){var y=M.T,w={};M.T=w;try{var T=o(p,u),j=M.S;j!==null&&j(w,T),wv(r,a,T)}catch(B){vh(r,a,B)}finally{y!==null&&w.types!==null&&(y.types=w.types),M.T=y}}else try{y=o(p,u),wv(r,a,y)}catch(B){vh(r,a,B)}}function wv(r,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){_v(r,a,u)},function(u){return vh(r,a,u)}):_v(r,a,o)}function _v(r,a,o){a.status="fulfilled",a.value=o,Sv(a),r.state=o,a=r.pending,a!==null&&(o=a.next,o===a?r.pending=null:(o=o.next,a.next=o,bv(r,o)))}function vh(r,a,o){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,Sv(a),a=a.next;while(a!==u)}r.action=null}function Sv(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function xv(r,a){return a}function Ev(r,a){if(Fe){var o=st.formState;if(o!==null){e:{var u=Me;if(Fe){if(lt){t:{for(var p=lt,y=$n;p.nodeType!==8;){if(!y){p=null;break t}if(p=Hn(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){lt=Hn(p.nextSibling),u=p.data==="F!";break e}}Ss(u)}u=!1}u&&(a=o[0])}}return o=en(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xv,lastRenderedState:a},o.queue=u,o=qv.bind(null,Me,u),u.dispatch=o,u=yh(!1),y=Eh.bind(null,Me,!1,u.queue),u=en(),p={state:a,dispatch:null,action:r,pending:null},u.queue=p,o=pk.bind(null,Me,p,y,o),p.dispatch=o,u.memoizedState=r,[a,o,!1]}function Rv(r){var a=vt();return Tv(a,et,r)}function Tv(r,a,o){if(a=mh(r,a,xv)[0],r=Zc(Br)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=rl(a)}catch(w){throw w===Ti?Bc:w}else u=a;a=vt();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Me.flags|=2048,Ni(9,{destroy:void 0},mk.bind(null,p,o),null)),[u,y,r]}function mk(r,a){r.action=a}function kv(r){var a=vt(),o=et;if(o!==null)return Tv(a,o,r);vt(),a=a.memoizedState,o=vt();var u=o.queue.dispatch;return o.memoizedState=r,[a,u,!1]}function Ni(r,a,o,u){return r={tag:r,create:o,deps:u,inst:a,next:null},a=Me.updateQueue,a===null&&(a=Wc(),Me.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=r.next=r:(u=o.next,o.next=r,r.next=u,a.lastEffect=r),r}function Av(){return vt().memoizedState}function Xc(r,a,o,u){var p=en();Me.flags|=r,p.memoizedState=Ni(1|a,{destroy:void 0},o,u===void 0?null:u)}
vendor: 5,146 bytes, line 9
9function Jc(r,a,o,u){var p=vt();u=u===void 0?null:u;var y=p.memoizedState.inst;et!==null&&u!==null&&ch(u,et.memoizedState.deps)?p.memoizedState=Ni(a,y,o,u):(Me.flags|=r,p.memoizedState=Ni(1|a,y,o,u))}function Cv(r,a){Xc(8390656,8,r,a)}function bh(r,a){Jc(2048,8,r,a)}function gk(r){Me.flags|=4;var a=Me.updateQueue;if(a===null)a=Wc(),Me.updateQueue=a,a.events=[r];else{var o=a.events;o===null?a.events=[r]:o.push(r)}}function Ov(r){var a=vt().memoizedState;return gk({ref:a,nextImpl:r}),function(){if((Qe&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function Nv(r,a){return Jc(4,2,r,a)}function jv(r,a){return Jc(4,4,r,a)}function Dv(r,a){if(typeof a=="function"){r=r();var o=a(r);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function Pv(r,a,o){o=o!=null?o.concat([r]):null,Jc(4,4,Dv.bind(null,a,r),o)}function wh(){}function Mv(r,a){var o=vt();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&ch(a,u[1])?u[0]:(o.memoizedState=[r,a],r)}function Lv(r,a){var o=vt();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&ch(a,u[1]))return u[0];if(u=r(),Pa){Yn(!0);try{r()}finally{Yn(!1)}}return o.memoizedState=[u,a],u}function _h(r,a,o){return o===void 0||($r&1073741824)!==0&&(Be&261930)===0?r.memoizedState=a:(r.memoizedState=o,r=I0(),Me.lanes|=r,Ns|=r,o)}function Iv(r,a,o,u){return wn(o,a)?o:Ai.current!==null?(r=_h(r,o,u),wn(r,a)||(St=!0),r):($r&42)===0||($r&1073741824)!==0&&(Be&261930)===0?(St=!0,r.memoizedState=o):(r=I0(),Me.lanes|=r,Ns|=r,a)}function Uv(r,a,o,u,p){var y=G.p;G.p=y!==0&&8>y?y:8;var w=M.T,T={};M.T=T,Eh(r,!1,a,o);try{var j=p(),B=M.S;if(B!==null&&B(T,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var Y=dk(j,u);sl(r,a,Y,Tn(r))}else sl(r,a,u,Tn(r))}catch(X){sl(r,a,{then:function(){},status:"rejected",reason:X},Tn())}finally{G.p=y,w!==null&&T.types!==null&&(w.types=T.types),M.T=w}}function yk(){}function Sh(r,a,o,u){if(r.tag!==5)throw Error(s(476));var p=zv(r).queue;Uv(r,p,a,te,o===null?yk:function(){return $v(r),o(u)})}function zv(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:te},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:o},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function $v(r){var a=zv(r);a.next===null&&(a=r.alternate.memoizedState),sl(r,a.next.queue,{},Tn())}function xh(){return $t(_l)}function Bv(){return vt().memoizedState}function Hv(){return vt().memoizedState}function vk(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var o=Tn();r=Rs(o);var u=Ts(a,r,o);u!==null&&(fn(u,a,o),Jo(u,a,o)),a={cache:Xf()},r.payload=a;return}a=a.return}}function bk(r,a,o){var u=Tn();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},eu(r)?Fv(a,o):(o=Bf(r,a,o,u),o!==null&&(fn(o,r,u),Vv(o,a,u)))}function qv(r,a,o){var u=Tn();sl(r,a,o,u)}function sl(r,a,o,u){var p={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(eu(r))Fv(a,p);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var w=a.lastRenderedState,T=y(w,o);if(p.hasEagerState=!0,p.eagerState=T,wn(T,w))return Pc(r,a,p,0),st===null&&Dc(),!1}catch{}if(o=Bf(r,a,p,u),o!==null)return fn(o,r,u),Vv(o,a,u),!0}return!1}function Eh(r,a,o,u){if(u={lane:2,revertLane:np(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},eu(r)){if(a)throw Error(s(479))}else a=Bf(r,o,u,2),a!==null&&fn(a,r,2)}function eu(r){var a=r.alternate;return r===Me||a!==null&&a===Me}function Fv(r,a){Ci=Kc=!0;var o=r.pending;o===null?a.next=a:(a.next=o.next,o.next=a),r.pending=a}function Vv(r,a,o){if((o&4194048)!==0){var u=a.lanes;u&=r.pendingLanes,o|=u,a.lanes=o,rn(r,o)}}var al={readContext:$t,use:Qc,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};al.useEffectEvent=pt;var Gv={readContext:$t,use:Qc,useCallback:function(r,a){return en().memoizedState=[r,a===void 0?null:a],r},useContext:$t,useEffect:Cv,useImperativeHandle:function(r,a,o){o=o!=null?o.concat([r]):null,Xc(4194308,4,Dv.bind(null,a,r),o)},useLayoutEffect:function(r,a){return Xc(4194308,4,r,a)},useInsertionEffect:function(r,a){Xc(4,2,r,a)},useMemo:function(r,a){var o=en();a=a===void 0?null:a;var u=r();if(Pa){Yn(!0);try{r()}finally{Yn(!1)}}return o.memoizedState=[u,a],u},useReducer:function(r,a,o){var u=en();if(o!==void 0){var p=o(a);if(Pa){Yn(!0);try{o(a)}finally{Yn(!1)}}}else p=a;return u.memoizedState=u.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},u.queue=r,r=r.dispatch=bk.bind(null,Me,r),[u.memoizedState,r]}
vendor: 4,283 bytes, line 9
9,useRef:function(r){var a=en();return r={current:r},a.memoizedState=r},useState:function(r){r=yh(r);var a=r.queue,o=qv.bind(null,Me,a);return a.dispatch=o,[r.memoizedState,o]},useDebugValue:wh,useDeferredValue:function(r,a){var o=en();return _h(o,r,a)},useTransition:function(){var r=yh(!1);return r=Uv.bind(null,Me,r.queue,!0,!1),en().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,o){var u=Me,p=en();if(Fe){if(o===void 0)throw Error(s(407));o=o()}else{if(o=a(),st===null)throw Error(s(349));(Be&127)!==0||hv(u,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,Cv(mv.bind(null,u,y,r),[r]),u.flags|=2048,Ni(9,{destroy:void 0},pv.bind(null,u,y,o,a),null),o},useId:function(){var r=en(),a=st.identifierPrefix;if(Fe){var o=gr,u=mr;o=(u&~(1<<32-Gt(u)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Yc++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=fk++,a="_"+a+"r_"+o.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:xh,useFormState:Ev,useActionState:Ev,useOptimistic:function(r){var a=en();a.memoizedState=a.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Eh.bind(null,Me,!0,o),o.dispatch=a,[r,a]},useMemoCache:ph,useCacheRefresh:function(){return en().memoizedState=vk.bind(null,Me)},useEffectEvent:function(r){var a=en(),o={impl:r};return a.memoizedState=o,function(){if((Qe&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}},Rh={readContext:$t,use:Qc,useCallback:Mv,useContext:$t,useEffect:bh,useImperativeHandle:Pv,useInsertionEffect:Nv,useLayoutEffect:jv,useMemo:Lv,useReducer:Zc,useRef:Av,useState:function(){return Zc(Br)},useDebugValue:wh,useDeferredValue:function(r,a){var o=vt();return Iv(o,et.memoizedState,r,a)},useTransition:function(){var r=Zc(Br)[0],a=vt().memoizedState;return[typeof r=="boolean"?r:rl(r),a]},useSyncExternalStore:fv,useId:Bv,useHostTransitionStatus:xh,useFormState:Rv,useActionState:Rv,useOptimistic:function(r,a){var o=vt();return vv(o,et,r,a)},useMemoCache:ph,useCacheRefresh:Hv};Rh.useEffectEvent=Ov;var Kv={readContext:$t,use:Qc,useCallback:Mv,useContext:$t,useEffect:bh,useImperativeHandle:Pv,useInsertionEffect:Nv,useLayoutEffect:jv,useMemo:Lv,useReducer:gh,useRef:Av,useState:function(){return gh(Br)},useDebugValue:wh,useDeferredValue:function(r,a){var o=vt();return et===null?_h(o,r,a):Iv(o,et.memoizedState,r,a)},useTransition:function(){var r=gh(Br)[0],a=vt().memoizedState;return[typeof r=="boolean"?r:rl(r),a]},useSyncExternalStore:fv,useId:Bv,useHostTransitionStatus:xh,useFormState:kv,useActionState:kv,useOptimistic:function(r,a){var o=vt();return et!==null?vv(o,et,r,a):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:ph,useCacheRefresh:Hv};Kv.useEffectEvent=Ov;function Th(r,a,o,u){a=r.memoizedState,o=o(u,a),o=o==null?a:m({},a,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var kh={enqueueSetState:function(r,a,o){r=r._reactInternals;var u=Tn(),p=Rs(u);p.payload=a,o!=null&&(p.callback=o),a=Ts(r,p,u),a!==null&&(fn(a,r,u),Jo(a,r,u))},enqueueReplaceState:function(r,a,o){r=r._reactInternals;var u=Tn(),p=Rs(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ts(r,p,u),a!==null&&(fn(a,r,u),Jo(a,r,u))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var o=Tn(),u=Rs(o);u.tag=2,a!=null&&(u.callback=a),a=Ts(r,u,o),a!==null&&(fn(a,r,o),Jo(a,r,o))}};function Yv(r,a,o,u,p,y,w){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,y,w):a.prototype&&a.prototype.isPureReactComponent?!Vo(o,u)||!Vo(p,y):!0}function Wv(r,a,o,u){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==r&&kh.enqueueReplaceState(a,a.state,null)}function Ma(r,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(r=r.defaultProps){o===a&&(o=m({},o));for(var p in r)o[p]===void 0&&(o[p]=r[p])}return o}function Qv(r){jc(r)}function Zv(r){console.error(r)}function Xv(r){jc(r)}function tu(r,a){try{var o=r.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function Jv(r,a,o){try{var u=r.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}
vendor: 12,326 bytes, line 9
9catch(p){setTimeout(function(){throw p})}}function Ah(r,a,o){return o=Rs(o),o.tag=3,o.payload={element:null},o.callback=function(){tu(r,a)},o}function e0(r){return r=Rs(r),r.tag=3,r}function t0(r,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;r.payload=function(){return p(y)},r.callback=function(){Jv(a,o,u)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(r.callback=function(){Jv(a,o,u),typeof p!="function"&&(js===null?js=new Set([this]):js.add(this));var T=u.stack;this.componentDidCatch(u.value,{componentStack:T!==null?T:""})})}function wk(r,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&xi(a,o,p,!0),o=Sn.current,o!==null){switch(o.tag){case 31:case 13:return Bn===null?hu():o.alternate===null&&mt===0&&(mt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===Hc?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Jh(r,u,p)),!1;case 22:return o.flags|=65536,u===Hc?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Jh(r,u,p)),!1}throw Error(s(435,o.tag))}return Jh(r,u,p),hu(),!1}if(Fe)return a=Sn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==Kf&&(r=Error(s(422),{cause:u}),Yo(In(r,o)))):(u!==Kf&&(a=Error(s(423),{cause:u}),Yo(In(a,o))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,u=In(u,o),p=Ah(r.stateNode,u,p),sh(r,p),mt!==4&&(mt=2)),!1;var y=Error(s(520),{cause:u});if(y=In(y,o),hl===null?hl=[y]:hl.push(y),mt!==4&&(mt=2),a===null)return!0;u=In(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,r=p&-p,o.lanes|=r,r=Ah(o.stateNode,u,r),sh(o,r),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(js===null||!js.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=e0(p),t0(p,r,o,u),sh(o,p),!1}o=o.return}while(o!==null);return!1}var Ch=Error(s(461)),St=!1;function Bt(r,a,o,u){a.child=r===null?av(a,null,o,u):Da(a,r.child,o,u)}function n0(r,a,o,u,p){o=o.render;var y=a.ref;if("ref"in u){var w={};for(var T in u)T!=="ref"&&(w[T]=u[T])}else w=u;return Ca(a),u=uh(r,a,o,w,y,p),T=dh(),r!==null&&!St?(fh(r,a,p),Hr(r,a,p)):(Fe&&T&&Vf(a),a.flags|=1,Bt(r,a,u,p),a.child)}function r0(r,a,o,u,p){if(r===null){var y=o.type;return typeof y=="function"&&!Hf(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,s0(r,a,y,u,p)):(r=Lc(o.type,null,u,a,a.mode,p),r.ref=a.ref,r.return=a,a.child=r)}if(y=r.child,!Ih(r,p)){var w=y.memoizedProps;if(o=o.compare,o=o!==null?o:Vo,o(w,u)&&r.ref===a.ref)return Hr(r,a,p)}return a.flags|=1,r=Lr(y,u),r.ref=a.ref,r.return=a,a.child=r}function s0(r,a,o,u,p){if(r!==null){var y=r.memoizedProps;if(Vo(y,u)&&r.ref===a.ref)if(St=!1,a.pendingProps=u=y,Ih(r,p))(r.flags&131072)!==0&&(St=!0);else return a.lanes=r.lanes,Hr(r,a,p)}return Oh(r,a,o,u,p)}function a0(r,a,o,u){var p=u.children,y=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,r!==null){for(u=a.child=r.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,a.child=null;return i0(r,a,y,o,u)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&$c(a,y!==null?y.cachePool:null),y!==null?lv(a,y):ih(),cv(a);else return u=a.lanes=536870912,i0(r,a,y!==null?y.baseLanes|o:o,o,u)}else y!==null?($c(a,y.cachePool),lv(a,y),As(),a.memoizedState=null):(r!==null&&$c(a,null),ih(),As());return Bt(r,a,p,o),a.child}function il(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function i0(r,a,o,u,p){var y=eh();return y=y===null?null:{parent:wt._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},r!==null&&$c(a,null),ih(),cv(a),r!==null&&xi(r,a,u,!0),a.childLanes=p,null}function nu(r,a){return a=su({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function o0(r,a,o){return Da(a,r.child,null,o),r=nu(a,a.pendingProps),r.flags|=2,xn(a),a.memoizedState=null,r}function _k(r,a,o){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Fe){if(u.mode==="hidden")return r=nu(a,u),a.lanes=536870912,il(null,r);if(lh(a),(r=lt)?(r=bb(r,$n),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ws!==null?{id:mr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},o=Fy(r),o.return=a,a.child=o,zt=a,lt=null)):r=null,r===null)throw Ss(a);return a.lanes=536870912,null}return nu(a,u)}var y=r.memoizedState;if(y!==null){var w=y.dehydrated;if(lh(a),p)if(a.flags&256)a.flags&=-257,a=o0(r,a,o);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(s(558));else if(St||xi(r,a,o,!1),p=(o&r.childLanes)!==0,St||p){if(u=st,u!==null&&(w=sn(u,o),w!==0&&w!==y.retryLane))throw y.retryLane=w,Ra(r,w),fn(u,r,w),Ch;hu(),a=o0(r,a,o)}else r=y.treeContext,lt=Hn(w.nextSibling),zt=a,Fe=!0,_s=null,$n=!1,r!==null&&Ky(a,r),a=nu(a,u),a.flags|=4096;return a}return r=Lr(r.child,{mode:u.mode,children:u.children}),r.ref=a.ref,a.child=r,r.return=a,r}function ru(r,a){var o=a.ref;if(o===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(s(284));(r===null||r.ref!==o)&&(a.flags|=4194816)}}function Oh(r,a,o,u,p){return Ca(a),o=uh(r,a,o,u,void 0,p),u=dh(),r!==null&&!St?(fh(r,a,p),Hr(r,a,p)):(Fe&&u&&Vf(a),a.flags|=1,Bt(r,a,o,p),a.child)}function l0(r,a,o,u,p,y){return Ca(a),a.updateQueue=null,o=dv(a,u,o,p),uv(r),u=dh(),r!==null&&!St?(fh(r,a,y),Hr(r,a,y)):(Fe&&u&&Vf(a),a.flags|=1,Bt(r,a,o,y),a.child)}function c0(r,a,o,u,p){if(Ca(a),a.stateNode===null){var y=bi,w=o.contextType;typeof w=="object"&&w!==null&&(y=$t(w)),y=new o(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=kh,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},nh(a),w=o.contextType,y.context=typeof w=="object"&&w!==null?$t(w):bi,y.state=a.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Th(a,o,w,u),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(w=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),w!==y.state&&kh.enqueueReplaceState(y,y.state,null),tl(a,u,y,p),el(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(r===null){y=a.stateNode;var T=a.memoizedProps,j=Ma(o,T);y.props=j;var B=y.context,Y=o.contextType;w=bi,typeof Y=="object"&&Y!==null&&(w=$t(Y));var X=o.getDerivedStateFromProps;Y=typeof X=="function"||typeof y.getSnapshotBeforeUpdate=="function",T=a.pendingProps!==T,Y||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(T||B!==w)&&Wv(a,y,u,w),Es=!1;var H=a.memoizedState;y.state=H,tl(a,u,y,p),el(),B=a.memoizedState,T||H!==B||Es?(typeof X=="function"&&(Th(a,o,X,u),B=a.memoizedState),(j=Es||Yv(a,o,j,u,H,B,w))?(Y||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=B),y.props=u,y.state=B,y.context=w,u=j):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,rh(r,a),w=a.memoizedProps,Y=Ma(o,w),y.props=Y,X=a.pendingProps,H=y.context,B=o.contextType,j=bi,typeof B=="object"&&B!==null&&(j=$t(B)),T=o.getDerivedStateFromProps,(B=typeof T=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(w!==X||H!==j)&&Wv(a,y,u,j),Es=!1,H=a.memoizedState,y.state=H,tl(a,u,y,p),el();var q=a.memoizedState;w!==X||H!==q||Es||r!==null&&r.dependencies!==null&&Uc(r.dependencies)?(typeof T=="function"&&(Th(a,o,T,u),q=a.memoizedState),(Y=Es||Yv(a,o,Y,u,H,q,j)||r!==null&&r.dependencies!==null&&Uc(r.dependencies))?(B||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,q,j),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,q,j)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||w===r.memoizedProps&&H===r.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&H===r.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=q),y.props=u,y.state=q,y.context=j,u=Y):(typeof y.componentDidUpdate!="function"||w===r.memoizedProps&&H===r.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&H===r.memoizedState||(a.flags|=1024),u=!1)}return y=u,ru(r,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,r!==null&&u?(a.child=Da(a,r.child,null,p),a.child=Da(a,null,o,p)):Bt(r,a,o,p),a.memoizedState=y.state,r=a.child):r=Hr(r,a,p),r}function u0(r,a,o,u){return ka(),a.flags|=256,Bt(r,a,o,u),a.child}var Nh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jh(r){return{baseLanes:r,cachePool:Jy()}}function Dh(r,a,o){return r=r!==null?r.childLanes&~o:0,a&&(r|=Rn),r}function d0(r,a,o){var u=a.pendingProps,p=!1,y=(a.flags&128)!==0,w;if((w=y)||(w=r!==null&&r.memoizedState===null?!1:(yt.current&2)!==0),w&&(p=!0,a.flags&=-129),w=(a.flags&32)!==0,a.flags&=-33,r===null){if(Fe){if(p?ks(a):As(),(r=lt)?(r=bb(r,$n),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ws!==null?{id:mr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},o=Fy(r),o.return=a,a.child=o,zt=a,lt=null)):r=null,r===null)throw Ss(a);return mp(r)?a.lanes=32:a.lanes=536870912,null}var T=u.children;return u=u.fallback,p?(As(),p=a.mode,T=su({mode:"hidden",children:T},p),u=Ta(u,p,o,null),T.return=a,u.return=a,T.sibling=u,a.child=T,u=a.child,u.memoizedState=jh(o),u.childLanes=Dh(r,w,o),a.memoizedState=Nh,il(null,u)):(ks(a),Ph(a,T))}var j=r.memoizedState;if(j!==null&&(T=j.dehydrated,T!==null)){if(y)a.flags&256?(ks(a),a.flags&=-257,a=Mh(r,a,o)):a.memoizedState!==null?(As(),a.child=r.child,a.flags|=128,a=null):(As(),T=u.fallback,p=a.mode,u=su({mode:"visible",children:u.children},p),T=Ta(T,p,o,null),T.flags|=2,u.return=a,T.return=a,u.sibling=T,a.child=u,Da(a,r.child,null,o),u=a.child,u.memoizedState=jh(o),u.childLanes=Dh(r,w,o),a.memoizedState=Nh,a=il(null,u));else if(ks(a),mp(T)){if(w=T.nextSibling&&T.nextSibling.dataset,w)var B=w.dgst;w=B,u=Error(s(419)),u.stack="",u.digest=w,Yo({value:u,source:null,stack:null}),a=Mh(r,a,o)}else if(St||xi(r,a,o,!1),w=(o&r.childLanes)!==0,St||w){if(w=st,w!==null&&(u=sn(w,o),u!==0&&u!==j.retryLane))throw j.retryLane=u,Ra(r,u),fn(w,r,u),Ch;pp(T)||hu(),a=Mh(r,a,o)}else pp(T)?(a.flags|=192,a.child=r.child,a=null):(r=j.treeContext,lt=Hn(T.nextSibling),zt=a,Fe=!0,_s=null,$n=!1,r!==null&&Ky(a,r),a=Ph(a,u.children),a.flags|=4096);return a}return p?(As(),T=u.fallback,p=a.mode,j=r.child,B=j.sibling,u=Lr(j,{mode:"hidden",children:u.children}),u.subtreeFlags=j.subtreeFlags&65011712,B!==null?T=Lr(B,T):(T=Ta(T,p,o,null),T.flags|=2),T.return=a,u.return=a,u.sibling=T,a.child=u,il(null,u),u=a.child,T=r.child.memoizedState,T===null?T=jh(o):(p=T.cachePool,p!==null?(j=wt._currentValue,p=p.parent!==j?{parent:j,pool:j}:p):p=Jy(),T={baseLanes:T.baseLanes|o,cachePool:p}),u.memoizedState=T,u.childLanes=Dh(r,w,o),a.memoizedState=Nh,il(r.child,u)):(ks(a),o=r.child,r=o.sibling,o=Lr(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,r!==null&&(w=a.deletions,w===null?(a.deleti
vendor: 2,764 bytes, line 9
9ons=[r],a.flags|=16):w.push(r)),a.child=o,a.memoizedState=null,o)}function Ph(r,a){return a=su({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function su(r,a){return r=_n(22,r,null,a),r.lanes=0,r}function Mh(r,a,o){return Da(a,r.child,null,o),r=Ph(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function f0(r,a,o){r.lanes|=a;var u=r.alternate;u!==null&&(u.lanes|=a),Qf(r.return,a,o)}function Lh(r,a,o,u,p,y){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p,treeForkCount:y}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=u,w.tail=o,w.tailMode=p,w.treeForkCount=y)}function h0(r,a,o){var u=a.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var w=yt.current,T=(w&2)!==0;if(T?(w=w&1|2,a.flags|=128):w&=1,Q(yt,w),Bt(r,a,u,o),u=Fe?Ko:0,!T&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&f0(r,o,a);else if(r.tag===19)f0(r,o,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)r=o.alternate,r!==null&&Gc(r)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Lh(a,!1,p,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(r=p.alternate,r!==null&&Gc(r)===null){a.child=p;break}r=p.sibling,p.sibling=o,o=p,p=r}Lh(a,!0,o,null,y,u);break;case"together":Lh(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Hr(r,a,o){if(r!==null&&(a.dependencies=r.dependencies),Ns|=a.lanes,(o&a.childLanes)===0)if(r!==null){if(xi(r,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(s(153));if(a.child!==null){for(r=a.child,o=Lr(r,r.pendingProps),a.child=o,o.return=a;r.sibling!==null;)r=r.sibling,o=o.sibling=Lr(r,r.pendingProps),o.return=a;o.sibling=null}return a.child}function Ih(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Uc(r)))}function Sk(r,a,o){switch(a.tag){case 3:be(a,a.stateNode.containerInfo),xs(a,wt,r.memoizedState.cache),ka();break;case 27:case 5:bt(a);break;case 4:be(a,a.stateNode.containerInfo);break;case 10:xs(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,lh(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(ks(a),a.flags|=128,null):(o&a.child.childLanes)!==0?d0(r,a,o):(ks(a),r=Hr(r,a,o),r!==null?r.sibling:null);ks(a);break;case 19:var p=(r.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(xi(r,a,o,!1),u=(o&a.childLanes)!==0),p){
vendor: 4,705 bytes, line 9
9if(u)return h0(r,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Q(yt,yt.current),u)break;return null;case 22:return a.lanes=0,a0(r,a,o,a.pendingProps);case 24:xs(a,wt,r.memoizedState.cache)}return Hr(r,a,o)}function p0(r,a,o){if(r!==null)if(r.memoizedProps!==a.pendingProps)St=!0;else{if(!Ih(r,o)&&(a.flags&128)===0)return St=!1,Sk(r,a,o);St=(r.flags&131072)!==0}else St=!1,Fe&&(a.flags&1048576)!==0&&Gy(a,Ko,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(r=Na(a.elementType),a.type=r,typeof r=="function")Hf(r)?(u=Ma(r,u),a.tag=1,a=c0(null,a,r,u,o)):(a.tag=0,a=Oh(null,a,r,u,o));else{if(r!=null){var p=r.$$typeof;if(p===D){a.tag=11,a=n0(null,a,r,u,o);break e}else if(p===O){a.tag=14,a=r0(null,a,r,u,o);break e}}throw a=le(r)||r,Error(s(306,a,""))}}return a;case 0:return Oh(r,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Ma(u,a.pendingProps),c0(r,a,u,p,o);case 3:e:{if(be(a,a.stateNode.containerInfo),r===null)throw Error(s(387));u=a.pendingProps;var y=a.memoizedState;p=y.element,rh(r,a),tl(a,u,null,o);var w=a.memoizedState;if(u=w.cache,xs(a,wt,u),u!==y.cache&&Zf(a,[wt],o,!0),el(),u=w.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:w.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=u0(r,a,u,o);break e}else if(u!==p){p=In(Error(s(424)),a),Yo(p),a=u0(r,a,u,o);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,lt=Hn(r.firstChild),zt=a,Fe=!0,_s=null,$n=!0,o=av(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ka(),u===p){a=Hr(r,a,o);break e}Bt(r,a,u,o)}a=a.child}return a;case 26:return ru(r,a),r===null?(o=Rb(a.type,null,a.pendingProps,null))?a.memoizedState=o:Fe||(o=a.type,r=a.pendingProps,u=wu(ue.current).createElement(o),u[Ut]=a,u[an]=r,Ht(u,o,r),Dt(u),a.stateNode=u):a.memoizedState=Rb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return bt(a),r===null&&Fe&&(u=a.stateNode=Sb(a.type,a.pendingProps,ue.current),zt=a,$n=!0,p=lt,Ls(a.type)?(gp=p,lt=Hn(u.firstChild)):lt=p),Bt(r,a,a.pendingProps.children,o),ru(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Fe&&((p=u=lt)&&(u=Xk(u,a.type,a.pendingProps,$n),u!==null?(a.stateNode=u,zt=a,lt=Hn(u.firstChild),$n=!1,p=!0):p=!1),p||Ss(a)),bt(a),p=a.type,y=a.pendingProps,w=r!==null?r.memoizedProps:null,u=y.children,dp(p,y)?u=null:w!==null&&dp(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=uh(r,a,hk,null,null,o),_l._currentValue=p),ru(r,a),Bt(r,a,u,o),a.child;case 6:return r===null&&Fe&&((r=o=lt)&&(o=Jk(o,a.pendingProps,$n),o!==null?(a.stateNode=o,zt=a,lt=null,r=!0):r=!1),r||Ss(a)),null;case 13:return d0(r,a,o);case 4:return be(a,a.stateNode.containerInfo),u=a.pendingProps,r===null?a.child=Da(a,null,u,o):Bt(r,a,u,o),a.child;case 11:return n0(r,a,a.type,a.pendingProps,o);case 7:return Bt(r,a,a.pendingProps,o),a.child;case 8:return Bt(r,a,a.pendingProps.children,o),a.child;case 12:return Bt(r,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,xs(a,a.type,u.value),Bt(r,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Ca(a),p=$t(p),u=u(p),a.flags|=1,Bt(r,a,u,o),a.child;case 14:return r0(r,a,a.type,a.pendingProps,o);case 15:return s0(r,a,a.type,a.pendingProps,o);case 19:return h0(r,a,o);case 31:return _k(r,a,o);case 22:return a0(r,a,o,a.pendingProps);case 24:return Ca(a),u=$t(wt),r===null?(p=eh(),p===null&&(p=st,y=Xf(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:u,cache:p},nh(a),xs(a,wt,p)):((r.lanes&o)!==0&&(rh(r,a),tl(a,null,null,o),el()),p=r.memoizedState,y=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),xs(a,wt,u)):(u=y.cache,xs(a,wt,u),u!==p.cache&&Zf(a,[wt],o,!0))),Bt(r,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function qr(r){r.flags|=4}function Uh(r,a,o,u,p){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(B0())r.flags|=8192;else throw ja=Hc,th}else r.flags&=-16777217}function m0(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Ob(a))if(B0())r.flags|=8192;else throw ja=Hc,th}function au(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Kt():536870912,r.lanes|=a,Mi|=a)}function ol(r,a){if(!Fe)switch(r.tailMode){case"hidden":a=r.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;
vendor: 8,221 bytes, line 9
9u===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function ct(r){var a=r.alternate!==null&&r.alternate.child===r.child,o=0,u=0;if(a)for(var p=r.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=u,r.childLanes=o,a}function xk(r,a,o){var u=a.pendingProps;switch(Gf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(a),null;case 1:return ct(a),null;case 3:return o=a.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),zr(wt),Re(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(Si(a)?qr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Yf())),ct(a),null;case 26:var p=a.type,y=a.memoizedState;return r===null?(qr(a),y!==null?(ct(a),m0(a,y)):(ct(a),Uh(a,p,null,u,o))):y?y!==r.memoizedState?(qr(a),ct(a),m0(a,y)):(ct(a),a.flags&=-16777217):(r=r.memoizedProps,r!==u&&qr(a),ct(a),Uh(a,p,r,u,o)),null;case 27:if(kt(a),o=ue.current,p=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&qr(a);else{if(!u){if(a.stateNode===null)throw Error(s(166));return ct(a),null}r=re.current,Si(a)?Yy(a):(r=Sb(p,u,o),a.stateNode=r,qr(a))}return ct(a),null;case 5:if(kt(a),p=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&qr(a);else{if(!u){if(a.stateNode===null)throw Error(s(166));return ct(a),null}if(y=re.current,Si(a))Yy(a);else{var w=wu(ue.current);switch(y){case 1:y=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=w.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}y[Ut]=a,y[an]=u;e:for(w=a.child;w!==null;){if(w.tag===5||w.tag===6)y.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===a)break e;for(;w.sibling===null;){if(w.return===null||w.return===a)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}a.stateNode=y;e:switch(Ht(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&qr(a)}}return ct(a),Uh(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,o),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==u&&qr(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(s(166));if(r=ue.current,Si(a)){if(r=a.stateNode,o=a.memoizedProps,u=null,p=zt,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}r[Ut]=a,r=!!(r.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||db(r.nodeValue,o)),r||Ss(a,!0)}else r=wu(r).createTextNode(u),r[Ut]=a,a.stateNode=r}return ct(a),null;case 31:if(o=a.memoizedState,r===null||r.memoizedState!==null){if(u=Si(a),o!==null){if(r===null){if(!u)throw Error(s(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(557));r[Ut]=a}else ka(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),r=!1}else o=Yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return a.flags&256?(xn(a),a):(xn(a),null);if((a.flags&128)!==0)throw Error(s(558))}return ct(a),null;case 13:if(u=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=Si(a),u!==null&&u.dehydrated!==null){if(r===null){if(!p)throw Error(s(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[Ut]=a}else ka(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),p=!1}else p=Yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(xn(a),a):(xn(a),null)}return xn(a),(a.flags&128)!==0?(a.lanes=o,a):(o=u!==null,r=r!==null&&r.memoizedState!==null,o&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),o!==r&&o&&(a.child.flags|=8192),au(a,a.updateQueue),ct(a),null);case 4:return Re(),r===null&&ip(a.stateNode.containerInfo),ct(a),null;case 10:return zr(a.type),ct(a),null;case 19:if(K(yt),u=a.memoizedState,u===null)return ct(a),null;if(p=(a.flags&128)!==0,y=u.rendering,y===null)if(p)ol(u,!1);else{if(mt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(y=Gc(r),y!==null){for(a.flags|=128,ol(u,!1),r=y.updateQueue,a.updateQueue=r,au(a,r),a.subtreeFlags=0,r=o,o=a.child;o!==null;)qy(o,r),o=o.sibling;return Q(yt,yt.current&1|2),Fe&&Ir(a,u.treeForkCount),a.child}r=r.sibling}u.tail!==null&&Xt()>uu&&(a.flags|=128,p=!0,ol(u,!1),a.lanes=4194304)}else{if(!p)if(r=Gc(y),r!==null){if(a.flags|=128,p=!0,r=r.updateQueue,a.updateQueue=r,au(a,r),ol(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!Fe)return ct(a),null}else 2*Xt()-u.renderingStartTime>uu&&o!==536870912&&(a.flags|=128,p=!0,ol(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(r=u.last,r!==null?r.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=Xt(),r.sibling=null,o=yt.current,Q(yt,p?o&1|2:o&1),Fe&&Ir(a,u.treeForkCount),r):(ct(a),null);case 22:case 23:return xn(a),oh(),u=a.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(ct(a),a.subtreeFlags&6&&(a.flags|=8192)):ct(a),o=a.updateQueue,o!==null&&au(a,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),r!==null&&K(Oa),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),zr(wt),ct(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function Ek(r,a){switch(Gf(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return zr(wt),Re(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return kt(a),null;case 31:if(a.memoizedState!==null){if(xn(a),a.alternate===null)throw Error(s(340));ka()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(xn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(s(340));ka()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return K(yt),null;case 4:return Re(),null;case 10:return zr(a.type),null;case 22:case 23:return xn(a),oh(),r!==null&&K(Oa),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return zr(wt),null;case 25:return null;default:return null}}function g0(r,a){switch(Gf(a),a.tag){case 3:zr(wt),Re();break;case 26:case 27:case 5:kt(a);break;case 4:Re();break;case 31:a.memoizedState!==null&&xn(a);break;case 13:xn(a);break;case 19:K(yt);break;case 10:zr(a.type);break;case 22:case 23:xn(a),oh(),r!==null&&K(Oa);break;case 24:zr(wt)}}function ll(r,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&r)===r){u=void 0;var y=o.create,w=o.inst;u=y(),w.destroy=u}o=o.next}while(o!==p)}}catch(T){Xe(a,a.return,T)}}function Cs(r,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&r)===r){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=a;var j=o,B=T;try{B()}catch(Y){Xe(p,j,Y)}}}u=u.next}while(u!==y)}}catch(Y){Xe(a,a.return,Y)}}function y0(r){var a=r.updateQueue;if(a!==null){var o=r.stateNode;try{ov(a,o)}catch(u){Xe(r,r.return,u)}}}function v0(r,a,o){o.props=Ma(r.type,r.memoizedProps),o.state=r.memoizedState;
vendor: 18,420 bytes, line 9
9try{o.componentWillUnmount()}catch(u){Xe(r,a,u)}}function cl(r,a){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof o=="function"?r.refCleanup=o(u):o.current=u}}catch(p){Xe(r,a,p)}}function yr(r,a){var o=r.ref,u=r.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){Xe(r,a,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){Xe(r,a,p)}else o.current=null}function b0(r){var a=r.type,o=r.memoizedProps,u=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){Xe(r,r.return,p)}}function zh(r,a,o){try{var u=r.stateNode;Gk(u,r.type,o,a),u[an]=a}catch(p){Xe(r,r.return,p)}}function w0(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Ls(r.type)||r.tag===4}function $h(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||w0(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Ls(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Bh(r,a,o){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(r),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Pr));else if(u!==4&&(u===27&&Ls(r.type)&&(o=r.stateNode,a=null),r=r.child,r!==null))for(Bh(r,a,o),r=r.sibling;r!==null;)Bh(r,a,o),r=r.sibling}function iu(r,a,o){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?o.insertBefore(r,a):o.appendChild(r);else if(u!==4&&(u===27&&Ls(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(iu(r,a,o),r=r.sibling;r!==null;)iu(r,a,o),r=r.sibling}function _0(r){var a=r.stateNode,o=r.memoizedProps;try{for(var u=r.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Ht(a,u,o),a[Ut]=r,a[an]=o}catch(y){Xe(r,r.return,y)}}var Fr=!1,xt=!1,Hh=!1,S0=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function Rk(r,a){if(r=r.containerInfo,cp=ku,r=Py(r),Mf(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var w=0,T=-1,j=-1,B=0,Y=0,X=r,H=null;t:for(;;){for(var q;X!==o||p!==0&&X.nodeType!==3||(T=w+p),X!==y||u!==0&&X.nodeType!==3||(j=w+u),X.nodeType===3&&(w+=X.nodeValue.length),(q=X.firstChild)!==null;)H=X,X=q;for(;;){if(X===r)break t;if(H===o&&++B===p&&(T=w),H===y&&++Y===u&&(j=w),(q=X.nextSibling)!==null)break;X=H,H=X.parentNode}X=q}o=T===-1||j===-1?null:{start:T,end:j}}else o=null}o=o||{start:0,end:0}}else o=null;for(up={focusedElem:r,selectionRange:o},ku=!1,Pt=a;Pt!==null;)if(a=Pt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,Pt=r;else for(;Pt!==null;){switch(a=Pt,y=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)p=r[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&y!==null){r=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var me=Ma(o.type,p);r=u.getSnapshotBeforeUpdate(me,y),u.__reactInternalSnapshotBeforeUpdate=r}catch(ke){Xe(o,o.return,ke)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,o=r.nodeType,o===9)hp(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":hp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(s(163))}if(r=a.sibling,r!==null){r.return=a.return,Pt=r;break}Pt=a.return}}function x0(r,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:Gr(r,o),u&4&&ll(5,o);break;case 1:if(Gr(r,o),u&4)if(r=o.stateNode,a===null)try{r.componentDidMount()}catch(w){Xe(o,o.return,w)}else{var p=Ma(o.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(p,a,r.__reactInternalSnapshotBeforeUpdate)}catch(w){Xe(o,o.return,w)}}u&64&&y0(o),u&512&&cl(o,o.return);break;case 3:if(Gr(r,o),u&64&&(r=o.updateQueue,r!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{ov(r,a)}catch(w){Xe(o,o.return,w)}}break;case 27:a===null&&u&4&&_0(o);case 26:case 5:Gr(r,o),a===null&&u&4&&b0(o),u&512&&cl(o,o.return);break;case 12:Gr(r,o);break;case 31:Gr(r,o),u&4&&T0(r,o);break;case 13:Gr(r,o),u&4&&k0(r,o),u&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=Pk.bind(null,o),eA(r,o))));break;case 22:if(u=o.memoizedState!==null||Fr,!u){a=a!==null&&a.memoizedState!==null||xt,p=Fr;var y=xt;Fr=u,(xt=a)&&!y?Kr(r,o,(o.subtreeFlags&8772)!==0):Gr(r,o),Fr=p,xt=y}break;case 30:break;default:Gr(r,o)}}function E0(r){var a=r.alternate;a!==null&&(r.alternate=null,E0(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&vf(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var dt=null,ln=!1;function Vr(r,a,o){for(o=o.child;o!==null;)R0(r,a,o),o=o.sibling}function R0(r,a,o){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(va,o)}catch{}switch(o.tag){case 26:xt||yr(o,a),Vr(r,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:xt||yr(o,a);var u=dt,p=ln;Ls(o.type)&&(dt=o.stateNode,ln=!1),Vr(r,a,o),vl(o.stateNode),dt=u,ln=p;break;case 5:xt||yr(o,a);case 6:if(u=dt,p=ln,dt=null,Vr(r,a,o),dt=u,ln=p,dt!==null)if(ln)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(o.stateNode)}catch(y){Xe(o,a,y)}else try{dt.removeChild(o.stateNode)}catch(y){Xe(o,a,y)}break;case 18:dt!==null&&(ln?(r=dt,yb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),qi(r)):yb(dt,o.stateNode));break;case 4:u=dt,p=ln,dt=o.stateNode.containerInfo,ln=!0,Vr(r,a,o),dt=u,ln=p;break;case 0:case 11:case 14:case 15:Cs(2,o,a),xt||Cs(4,o,a),Vr(r,a,o);break;case 1:xt||(yr(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&v0(o,a,u)),Vr(r,a,o);break;case 21:Vr(r,a,o);break;case 22:xt=(u=xt)||o.memoizedState!==null,Vr(r,a,o),xt=u;break;default:Vr(r,a,o)}}function T0(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{qi(r)}catch(o){Xe(a,a.return,o)}}}function k0(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{qi(r)}catch(o){Xe(a,a.return,o)}}function Tk(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new S0),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new S0),a;default:throw Error(s(435,r.tag))}}function ou(r,a){var o=Tk(r);a.forEach(function(u){if(!o.has(u)){o.add(u);var p=Mk.bind(null,r,u);u.then(p,p)}})}function cn(r,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],y=r,w=a,T=w;e:for(;T!==null;){switch(T.tag){case 27:if(Ls(T.type)){dt=T.stateNode,ln=!1;break e}break;case 5:dt=T.stateNode,ln=!1;break e;case 3:case 4:dt=T.stateNode.containerInfo,ln=!0;break e}T=T.return}if(dt===null)throw Error(s(160));R0(y,w,p),dt=null,ln=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)A0(a,r),a=a.sibling}var Zn=null;function A0(r,a){var o=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:cn(a,r),un(r),u&4&&(Cs(3,r,r.return),ll(3,r),Cs(5,r,r.return));break;case 1:cn(a,r),un(r),u&512&&(xt||o===null||yr(o,o.return)),u&64&&Fr&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=Zn;if(cn(a,r),un(r),u&512&&(xt||o===null||yr(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=r.memoizedState,o===null)if(u===null)if(r.stateNode===null){e:{u=r.type,o=r.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[Lo]||y[Ut]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),Ht(y,u,o),y[Ut]=r,Dt(y),u=y;break e;case"link":var w=Ab("link","href",p).get(u+(o.href||""));if(w){for(var T=0;T<w.length;T++)if(y=w[T],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(T,1);break t}}y=p.createElement(u),Ht(y,u,o),p.head.appendChild(y);break;case"meta":if(w=Ab("meta","content",p).get(u+(o.content||""))){for(T=0;T<w.length;T++)if(y=w[T],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(T,1);break t}}y=p.createElement(u),Ht(y,u,o),p.head.appendChild(y);break;default:throw Error(s(468,u))}y[Ut]=r,Dt(y),u=y}r.stateNode=u}else Cb(p,r.type,r.stateNode);else r.stateNode=kb(p,u,r.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?Cb(p,r.type,r.stateNode):kb(p,u,r.memoizedProps)):u===null&&r.stateNode!==null&&zh(r,r.memoizedProps,o.memoizedProps)}break;case 27:cn(a,r),un(r),u&512&&(xt||o===null||yr(o,o.return)),o!==null&&u&4&&zh(r,r.memoizedProps,o.memoizedProps);break;case 5:if(cn(a,r),un(r),u&512&&(xt||o===null||yr(o,o.return)),r.flags&32){p=r.stateNode;try{fi(p,"")}catch(me){Xe(r,r.return,me)}}u&4&&r.stateNode!=null&&(p=r.memoizedProps,zh(r,p,o!==null?o.memoizedProps:p)),u&1024&&(Hh=!0);break;case 6:if(cn(a,r),un(r),u&4){if(r.stateNode===null)throw Error(s(162));u=r.memoizedProps,o=r.stateNode;try{o.nodeValue=u}catch(me){Xe(r,r.return,me)}}break;case 3:if(xu=null,p=Zn,Zn=_u(a.containerInfo),cn(a,r),Zn=p,un(r),u&4&&o!==null&&o.memoizedState.isDehydrated)try{qi(a.containerInfo)}catch(me){Xe(r,r.return,me)}Hh&&(Hh=!1,C0(r));break;case 4:u=Zn,Zn=_u(r.stateNode.containerInfo),cn(a,r),un(r),Zn=u;break;case 12:cn(a,r),un(r);break;case 31:cn(a,r),un(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,ou(r,u)));break;case 13:cn(a,r),un(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(cu=Xt()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,ou(r,u)));break;case 22:p=r.memoizedState!==null;var j=o!==null&&o.memoizedState!==null,B=Fr,Y=xt;if(Fr=B||p,xt=Y||j,cn(a,r),xt=Y,Fr=B,un(r),u&8192)e:for(a=r.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||j||Fr||xt||La(r)),o=null,a=r;;){if(a.tag===5||a.tag===26){if(o===null){j=o=a;try{if(y=j.stateNode,p)w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{T=j.stateNode;var X=j.memoizedProps.style,H=X!=null&&X.hasOwnProperty("display")?X.display:null;T.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(me){Xe(j,j.return,me)}}}else if(a.tag===6){if(o===null){j=a;try{j.stateNode.nodeValue=p?"":j.memoizedProps}catch(me){Xe(j,j.return,me)}}}else if(a.tag===18){if(o===null){j=a;try{var q=j.stateNode;p?vb(q,!0):vb(j.stateNode,!1)}catch(me){Xe(j,j.return,me)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=r.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,ou(r,o))));break;case 19:cn(a,r),un(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,ou(r,u)));break;case 30:break;case 21:break;default:cn(a,r),un(r)}}function un(r){var a=r.flags;if(a&2){try{for(var o,u=r.return;u!==null;){if(w0(u)){o=u;break}u=u.return}if(o==null)throw Error(s(160));switch(o.tag){case 27:var p=o.stateNode,y=$h(r);iu(r,y,p);break;case 5:var w=o.stateNode;o.flags&32&&(fi(w,""),o.flags&=-33);var T=$h(r);iu(r,T,w);break;case 3:case 4:var j=o.stateNode.containerInfo,B=$h(r);Bh(r,B,j);break;default:throw Error(s(161))}}catch(Y){Xe(r,r.return,Y)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function C0(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;C0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Gr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)x0(r,a.alternate,a),a=a.sibling}function La(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Cs(4,a,a.return),La(a);break;case 1:yr(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&v0(a,a.return,o),La(a);break;case 27:vl(a.stateNode);case 26:case 5:yr(a,a.return),La(a);break;case 22:a.memoizedState===null&&La(a);break;case 30:La(a);break;default:La(a)}r=r.sibling}}function Kr(r,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=r,y=a,w=y.flags;switch(y.tag){case 0:case 11:case 15:Kr(p,y,o),ll(4,y);break;case 1:if(Kr(p,y,o),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(B){Xe(u,u.return,B)}if(u=y,p=u.updateQueue,p!==null){var T=u.stateNode;try{var j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)iv(j[p],T)}catch(B){Xe(u,u.return,B)}}o&&w&64&&y0(y),cl(y,y.return);break;case 27:_0(y);case 26:case 5:Kr(p,y,o),o&&u===null&&w&4&&b0(y),cl(y,y.return);break;case 12:Kr(p,y,o);break;case 31:Kr(p,y,o),o&&w&4&&T0(p,y);break;case 13:Kr(p,y,o),o&&w&4&&k0(p,y);break;case 22:y.memoizedState===null&&Kr(p,y,o),cl(y,y.return);break;case 30:break;default:Kr(p,y,o)}a=a.sibling}}function qh(r,a){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&Wo(o))}function Fh(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Wo(r))}function Xn(r,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)O0(r,a,o,u),a=a.sibling}function O0(r,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Xn(r,a,o,u),p&2048&&ll(9,a);break;case 1:Xn(r,a,o,u);break;case 3:Xn(r,a,o,u),p&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Wo(r)));break;case 12:if(p&2048){Xn(r,a,o,u),r=a.stateNode;try{var y=a.memoizedProps,w=y.id,T=y.onPostCommit;typeof T=="function"&&T(w,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(j){Xe(a,a.return,j)}}else Xn(r,a,o,u);break;case 31:Xn(r,a,o,u);break;case 13:Xn(r,a,o,u);break;case 23:break;case 22:y=a.stateNode,w=a.alternate,a.memoizedState!==null?y._visibility&2?Xn(r,a,o,u):ul(r,a):y._visibility&2?Xn(r,a,o,u):(y._visibility|=2,ji(r,a,o,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&qh(w,a);break;case 24:Xn(r,a,o,u),p&2048&&Fh(a.alternate,a);break;default:Xn(r,a,o,u)}}function ji(r,a,o,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=r,w=a,T=o,j=u,B=w.flags;switch(w.tag){case 0:case 11:case 15:ji(y,w,T,j,p),ll(8,w);break;case 23:break;case 22:var Y=w.stateNode;w.memoizedState!==null?Y._visibility&2?ji(y,w,T,j,p):ul(y,w):(Y._visibility|=2,ji(y,w,T,j,p)),p&&B&2048&&qh(w.alternate,w);break;case 24:ji(y,w,T,j,p),p&&B&2048&&Fh(w.alternate,w);break;default:ji(y,w,T,j,p)}a=a.sibling}}function ul(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=r,u=a,p=u.flags;switch(u.tag){case 22:ul(o,u),p&2048&&qh(u.alternate,u);break;case 24:ul(o,u),p&2048&&Fh(u.alternate,u);break;default:ul(o,u)}a=a.sibling}}var dl=8192;function Di(r,a,o){if(r.subtreeFlags&dl)for(r=r.child;r!==null;)N0(r,a,o),r=r.sibling}function N0(r,a,o){switch(r.tag){case 26:Di(r,a,o),r.flags&dl&&r.memoizedState!==null&&fA(o,Zn,r.memoizedState,r.memoizedProps);break;case 5:Di(r,a,o);break;case 3:case 4:var u=Zn;Zn=_u(r.stateNode.containerInfo),Di(r,a,o),Zn=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=dl,dl=16777216,Di(r,a,o),dl=u):Di(r,a,o));break;default:Di(r,a,o)}}function j0(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function fl(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];Pt=u,P0(u,r)}j0(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)D0(r),r=r.sibling}function D0(r){switch(r.tag){case 0:case 11:case 15:fl(r),r.flags&2048&&Cs(9,r,r.return);break;case 3:fl(r);break;case 12:fl(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,lu(r)):fl(r);break;default:fl(r)}}function lu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];Pt=u,P0(u,r)}j0(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Cs(8,a,a.return),lu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,lu(a));break;default:lu(a)}r=r.sibling}}function P0(r,a){for(;Pt!==null;){var o=Pt;switch(o.tag){case 0:case 11:case 15:Cs(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Wo(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,Pt=u;else e:for(o=r;Pt!==null;){u=Pt;var p=u.sibling,y=u.return;if(E0(u),u===o){Pt=null;break e}if(p!==null){p.return=y,Pt=p;break e}Pt=y}}}var kk={getCacheForType:function(r){var a=$t(wt),o=a.data.get(r);return o===void 0&&(o=r(),a.data.set(r,o)),o},cacheSignal:function(){return $t(wt).controller.signal}},Ak=typeof WeakMap=="function"?WeakMap:Map,Qe=0,st=null,ze=null,Be=0,Ze=0,En=null,Os=!1,Pi=!1,Vh=!1,Yr=0,mt=0,Ns=0,Ia=0,Gh=0,Rn=0,Mi=0,hl=null,dn=null,Kh=!1,cu=0,M0=0,uu=1/0,du=null,js=null,At=0,Ds=null,Li=null,Wr=0,Yh=0,Wh=null,
vendor: 14,608 bytes, line 9
9L0=null,pl=0,Qh=null;function Tn(){return(Qe&2)!==0&&Be!==0?Be&-Be:M.T!==null?np():gf()}function I0(){if(Rn===0)if((Be&536870912)===0||Fe){var r=si;si<<=1,(si&3932160)===0&&(si=262144),Rn=r}else Rn=536870912;return r=Sn.current,r!==null&&(r.flags|=32),Rn}function fn(r,a,o){(r===st&&(Ze===2||Ze===9)||r.cancelPendingCommit!==null)&&(Ii(r,0),Ps(r,Be,Rn,!1)),ht(r,o),((Qe&2)===0||r!==st)&&(r===st&&((Qe&2)===0&&(Ia|=o),mt===4&&Ps(r,Be,Rn,!1)),vr(r))}function U0(r,a,o){if((Qe&6)!==0)throw Error(s(327));var u=!o&&(a&127)===0&&(a&r.expiredLanes)===0||ut(r,a),p=u?Nk(r,a):Xh(r,a,!0),y=u;do{if(p===0){Pi&&!u&&Ps(r,a,0,!1);break}else{if(o=r.current.alternate,y&&!Ck(o)){p=Xh(r,a,!1),y=!1;continue}if(p===2){if(y=a,r.errorRecoveryDisabledLanes&y)var w=0;else w=r.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){a=w;e:{var T=r;p=hl;var j=T.current.memoizedState.isDehydrated;if(j&&(Ii(T,w).flags|=256),w=Xh(T,w,!1),w!==2){if(Vh&&!j){T.errorRecoveryDisabledLanes|=y,Ia|=y,p=4;break e}y=dn,dn=p,y!==null&&(dn===null?dn=y:dn.push.apply(dn,y))}p=w}if(y=!1,p!==2)continue}}if(p===1){Ii(r,0),Ps(r,a,0,!0);break}e:{switch(u=r,y=p,y){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:Ps(u,a,Rn,!Os);break e;case 2:dn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(p=cu+300-Xt(),10<p)){if(Ps(u,a,Rn,!Os),Ne(u,0,!0)!==0)break e;Wr=a,u.timeoutHandle=mb(z0.bind(null,u,o,dn,du,Kh,a,Rn,Ia,Mi,Os,y,"Throttled",-0,0),p);break e}z0(u,o,dn,du,Kh,a,Rn,Ia,Mi,Os,y,null,-0,0)}}break}while(!0);vr(r)}function z0(r,a,o,u,p,y,w,T,j,B,Y,X,H,q){if(r.timeoutHandle=-1,X=a.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pr},N0(a,y,X);var me=(y&62914560)===y?cu-Xt():(y&4194048)===y?M0-Xt():0;if(me=hA(X,me),me!==null){Wr=y,r.cancelPendingCommit=me(K0.bind(null,r,a,y,o,u,p,w,T,j,Y,X,null,H,q)),Ps(r,y,w,!B);return}}K0(r,a,y,o,u,p,w,T,j)}function Ck(r){for(var a=r;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],y=p.getSnapshot;p=p.value;try{if(!wn(y(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ps(r,a,o,u){a&=~Gh,a&=~Ia,r.suspendedLanes|=a,r.pingedLanes&=~a,u&&(r.warmLanes|=a),u=r.expirationTimes;for(var p=a;0<p;){var y=31-Gt(p),w=1<<y;u[y]=-1,p&=~w}o!==0&&wa(r,o,a)}function fu(){return(Qe&6)===0?(ml(0),!1):!0}function Zh(){if(ze!==null){if(Ze===0)var r=ze.return;else r=ze,Ur=Aa=null,hh(r),ki=null,Zo=0,r=ze;for(;r!==null;)g0(r.alternate,r),r=r.return;ze=null}}function Ii(r,a){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,Wk(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),Wr=0,Zh(),st=r,ze=o=Lr(r.current,null),Be=a,Ze=0,En=null,Os=!1,Pi=ut(r,a),Vh=!1,Mi=Rn=Gh=Ia=Ns=mt=0,dn=hl=null,Kh=!1,(a&8)!==0&&(a|=a&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=a;0<u;){var p=31-Gt(u),y=1<<p;a|=r[p],u&=~y}return Yr=a,Dc(),o}function $0(r,a){Me=null,M.H=al,a===Ti||a===Bc?(a=nv(),Ze=3):a===th?(a=nv(),Ze=4):Ze=a===Ch?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,En=a,ze===null&&(mt=1,tu(r,In(a,r.current)))}function B0(){var r=Sn.current;return r===null?!0:(Be&4194048)===Be?Bn===null:(Be&62914560)===Be||(Be&536870912)!==0?r===Bn:!1}function H0(){var r=M.H;return M.H=al,r===null?al:r}function q0(){var r=M.A;return M.A=kk,r}function hu(){mt=4,Os||(Be&4194048)!==Be&&Sn.current!==null||(Pi=!0),(Ns&134217727)===0&&(Ia&134217727)===0||st===null||Ps(st,Be,Rn,!1)}function Xh(r,a,o){var u=Qe;Qe|=2;var p=H0(),y=q0();(st!==r||Be!==a)&&(du=null,Ii(r,a)),a=!1;var w=mt;e:do try{if(Ze!==0&&ze!==null){var T=ze,j=En;switch(Ze){case 8:Zh(),w=6;break e;case 3:case 2:case 9:case 6:Sn.current===null&&(a=!0);var B=Ze;if(Ze=0,En=null,Ui(r,T,j,B),o&&Pi){w=0;break e}break;default:B=Ze,Ze=0,En=null,Ui(r,T,j,B)}}Ok(),w=mt;break}catch(Y){$0(r,Y)}while(!0);return a&&r.shellSuspendCounter++,Ur=Aa=null,Qe=u,M.H=p,M.A=y,ze===null&&(st=null,Be=0,Dc()),w}function Ok(){for(;ze!==null;)F0(ze)}function Nk(r,a){var o=Qe;Qe|=2;var u=H0(),p=q0();st!==r||Be!==a?(du=null,uu=Xt()+500,Ii(r,a)):Pi=ut(r,a);e:do try{if(Ze!==0&&ze!==null){a=ze;var y=En;t:switch(Ze){case 1:Ze=0,En=null,Ui(r,a,y,1);break;case 2:case 9:if(ev(y)){Ze=0,En=null,V0(a);break}a=function(){Ze!==2&&Ze!==9||st!==r||(Ze=7),vr(r)},y.then(a,a);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:ev(y)?(Ze=0,En=null,V0(a)):(Ze=0,En=null,Ui(r,a,y,7));break;case 5:var w=null;switch(ze.tag){case 26:w=ze.memoizedState;case 5:case 27:var T=ze;if(w?Ob(w):T.stateNode.complete){Ze=0,En=null;var j=T.sibling;if(j!==null)ze=j;else{var B=T.return;B!==null?(ze=B,pu(B)):ze=null}break t}}Ze=0,En=null,Ui(r,a,y,5);break;case 6:Ze=0,En=null,Ui(r,a,y,6);break;case 8:Zh(),mt=6;break e;default:throw Error(s(462))}}jk();break}catch(Y){$0(r,Y)}while(!0);return Ur=Aa=null,M.H=u,M.A=p,Qe=o,ze!==null?0:(st=null,Be=0,Dc(),mt)}function jk(){for(;ze!==null&&!Zt();)F0(ze)}function F0(r){var a=p0(r.alternate,r,Yr);r.memoizedProps=r.pendingProps,a===null?pu(r):ze=a}function V0(r){var a=r,o=a.alternate;switch(a.tag){case 15:case 0:a=l0(o,a,a.pendingProps,a.type,void 0,Be);break;case 11:a=l0(o,a,a.pendingProps,a.type.render,a.ref,Be);break;case 5:hh(a);default:g0(o,a),a=ze=qy(a,Yr),a=p0(o,a,Yr)}r.memoizedProps=r.pendingProps,a===null?pu(r):ze=a}function Ui(r,a,o,u){Ur=Aa=null,hh(a),ki=null,Zo=0;var p=a.return;try{if(wk(r,p,a,o,Be)){mt=1,tu(r,In(o,r.current)),ze=null;return}}catch(y){if(p!==null)throw ze=p,y;mt=1,tu(r,In(o,r.current)),ze=null;return}a.flags&32768?(Fe||u===1?r=!0:Pi||(Be&536870912)!==0?r=!1:(Os=r=!0,(u===2||u===9||u===3||u===6)&&(u=Sn.current,u!==null&&u.tag===13&&(u.flags|=16384))),G0(a,r)):pu(a)}function pu(r){var a=r;do{if((a.flags&32768)!==0){G0(a,Os);return}r=a.return;var o=xk(a.alternate,a,Yr);if(o!==null){ze=o;return}if(a=a.sibling,a!==null){ze=a;return}ze=a=r}while(a!==null);mt===0&&(mt=5)}function G0(r,a){do{var o=Ek(r.alternate,r);if(o!==null){o.flags&=32767,ze=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(r=r.sibling,r!==null)){ze=r;return}ze=r=o}while(r!==null);mt=6,ze=null}function K0(r,a,o,u,p,y,w,T,j){r.cancelPendingCommit=null;do mu();while(At!==0);if((Qe&6)!==0)throw Error(s(327));if(a!==null){if(a===r.current)throw Error(s(177));if(y=a.lanes|a.childLanes,y|=$f,nn(r,o,y,w,T,j),r===st&&(ze=st=null,Be=0),Li=a,Ds=r,Wr=o,Yh=y,Wh=p,L0=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Lk(ya,function(){return X0(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=M.T,M.T=null,p=G.p,G.p=2,w=Qe,Qe|=4;try{Rk(r,a,o)}finally{Qe=w,G.p=p,M.T=u}}At=1,Y0(),W0(),Q0()}}function Y0(){if(At===1){At=0;var r=Ds,a=Li,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var u=G.p;G.p=2;var p=Qe;Qe|=4;try{A0(a,r);var y=up,w=Py(r.containerInfo),T=y.focusedElem,j=y.selectionRange;if(w!==T&&T&&T.ownerDocument&&Dy(T.ownerDocument.documentElement,T)){if(j!==null&&Mf(T)){var B=j.start,Y=j.end;if(Y===void 0&&(Y=B),"selectionStart"in T)T.selectionStart=B,T.selectionEnd=Math.min(Y,T.value.length);else{var X=T.ownerDocument||document,H=X&&X.defaultView||window;if(H.getSelection){var q=H.getSelection(),me=T.textContent.length,ke=Math.min(j.start,me),nt=j.end===void 0?ke:Math.min(j.end,me);!q.extend&&ke>nt&&(w=nt,nt=ke,ke=w);var U=jy(T,ke),L=jy(T,nt);if(U&&L&&(q.rangeCount!==1||q.anchorNode!==U.node||q.anchorOffset!==U.offset||q.focusNode!==L.node||q.focusOffset!==L.offset)){var $=X.createRange();$.setStart(U.node,U.offset),q.removeAllRanges(),ke>nt?(q.addRange($),q.extend(L.node,L.offset)):($.setEnd(L.node,L.offset),q.addRange($))}}}}for(X=[],q=T;q=q.parentNode;)q.nodeType===1&&X.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<X.length;T++){var Z=X[T];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}ku=!!cp,up=cp=null}finally{Qe=p,G.p=u,M.T=o}}r.current=a,At=2}}function W0(){if(At===2){At=0;var r=Ds,a=Li,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var u=G.p;G.p=2;var p=Qe;Qe|=4;try{x0(r,a.alternate,a)}finally{Qe=p,G.p=u,M.T=o}}At=3}}function Q0(){if(At===4||At===3){At=0,ms();var r=Ds,a=Li,o=Wr,u=L0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?At=5:(At=0,Li=Ds=null,Z0(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(js=null),Wn(o),a=a.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(va,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=M.T,p=G.p,G.p=2,M.T=null;try{for(var y=r.onRecoverableError,w=0;w<u.length;w++){var T=u[w];y(T.value,{componentStack:T.stack})}}finally{M.T=a,G.p=p}}(Wr&3)!==0&&mu(),vr(r),p=r.pendingLanes,(o&261930)!==0&&(p&42)!==0?r===Qh?pl++:(pl=0,Qh=r):pl=0,ml(0)}}function Z0(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Wo(a)))}function mu(){return Y0(),W0(),Q0(),X0()}function X0(){if(At!==5)return!1;var r=Ds,a=Yh;Yh=0;var o=Wn(Wr),u=M.T,p=G.p;try{G.p=32>o?32:o,M.T=null,o=Wh,Wh=null;var y=Ds,w=Wr;if(At=0,Li=Ds=null,Wr=0,(Qe&6)!==0)throw Error(s(331));var T=Qe;if(Qe|=4,D0(y.current),O0(y,y.current,w,o),Qe=T,ml(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(va,y)}catch{}return!0}finally{G.p=p,M.T=u,Z0(r,a)}}function J0(r,a,o){a=In(o,a),a=Ah(r.stateNode,a,2),r=Ts(r,a,2),r!==null&&(ht(r,2),vr(r))}function Xe(r,a,o){if(r.tag===3)J0(r,r,o);else for(;a!==null;){if(a.tag===3){J0(a,r,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(js===null||!js.has(u))){r=In(o,r),o=e0(2),u=Ts(a,o,2),u!==null&&(t0(o,u,a,r),ht(u,2),vr(u));break}}a=a.return}}function Jh(r,a,o){var u=r.pingCache;if(u===null){u=r.pingCache=new Ak;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||(Vh=!0,p.add(o),r=Dk.bind(null,r,a,o),a.then(r,r))}function Dk(r,a,o){var u=r.pingCache;u!==null&&u.delete(a),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,st===r&&(Be&o)===o&&(mt===4||mt===3&&(Be&62914560)===Be&&300>Xt()-cu?(Qe&2)===0&&Ii(r,0):Gh|=o,Mi===Be&&(Mi=0)),vr(r)}function eb(r,a){a===0&&(a=Kt()),r=Ra(r,a),r!==null&&(ht(r,a),vr(r))}function Pk(r){var a=r.memoizedState,o=0;a!==null&&(o=a.retryLane),eb(r,o)}function Mk(r,a){var o=0;switch(r.tag){case 31:case 13:var u=r.stateNode,p=r.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(s(314))}u!==null&&u.delete(a),eb(r,o)}function Lk(r,a){return jo(r,a)}var gu=null,zi=null,ep=!1,yu=!1,tp=!1,Ms=0;function vr(r){r!==zi&&r.next===null&&(zi===null?gu=zi=r:zi=zi.next=r),yu=!0,ep||(ep=!0,Uk())}function ml(r,a){if(!tp&&yu){tp=!0;do for(var o=!1,u=gu;u!==null;){if(r!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var w=u.suspendedLanes,T=u.pingedLanes;y=(1<<31-Gt(42|r)+1)-1,y&=p&~(w&~T),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,sb(u,y))}else y=Be,y=Ne(u,u===st?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||ut(u,y)||(o=!0,sb(u,y));u=u.next}while(o);tp=!1}}function Ik(){tb()}function tb(){yu=ep=!1;var r=0;Ms!==0&&Yk()&&(r=Ms);for(var a=Xt(),o=null,u=gu;u!==null;){var p=u.next,y=nb(u,a);y===0?(u.next=null,o===null?gu=p:o.next=p,p===null&&(zi=o)):(o=u,(r!==0||(y&3)!==0)&&(yu=!0)),u=p}At!==0&&At!==5||ml(r),Ms!==0&&(Ms=0)}function nb(r,a){for(var o=r.suspendedLanes,u=r.pingedLanes,p=r.expirationTimes,y=r.pendingLanes&-62914561;0<y;){var w=31-Gt(y),T=1<<w,j=p[w];j===-1?((T&o)===0||(T&u)!==0)&&(p[w]=jt(T,a)):j<=a&&(r.expiredLanes|=T),y&=~T}if(a=st,o=Be,o=Ne(r,r===a?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,o===0||r===a&&(Ze===2||Ze===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&Do(u),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||ut(r,o)){if(a=o&-o,a===r.callbackPriority)return a;switch(u!==null&&Do(u),Wn(o)){case 2:case 8:o=wc;break;case 32:o=ya;break;case 268435456:o=jr;break;default:o=ya}return u=rb.bind(null,r),o=jo(o,u),r.callbackPriority=a,r.callbackNode=o,a}return u!==null&&u!==null&&Do(u),r.callbackPriority=2,r.callbackNode=null,2}function rb(r,a){if(At!==0&&At!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(mu()&&r.callbackNode!==o)return null;var u=Be;return u=Ne(r,r===st?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(U0(r,u,a),nb(r,Xt()),r.callbackNode!=null&&r.callbackNode===o?rb.bind(null,r):null)}function sb(r,a){if(mu())return null;U0(r,a,!0)}function Uk(){Qk(function(){(Qe&6)!==0?jo(ga,Ik):tb()})}function np(){if(Ms===0){var r=Ei;r===0&&(r=ri,ri<<=1,(ri&261888)===0&&(ri=256)),Ms=r}return Ms}function ab(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Rc(""+r)}function ib(r,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,r.id&&o.setAttribute("form",r.id),a.parentNode.insertBefore(o,a),r=new FormData(r),o.parentNode.removeChild(o),r}function zk(r,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var y=ab((p[an]||null).action),w=u.submitter;w&&(a=(a=w[an]||null)?ab(a.formAction):w.getAttribute("formAction"),a!==null&&(y=a,w=null));var T=new Cc("action","action",null,u,p);r.push({event:T,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Ms!==0){var j=w?ib(p,w):new FormData(p);Sh(o,{pending:!0,data:j,method:p.method,action:y},null,j)}}else typeof y=="function"&&(T.preventDefault(),j=w?ib(p,w):new FormData(p),Sh(o,{pending:!0,data:j,method:p.method,action:y},y,j))},currentTarget:p}]})}}for(var rp=0;rp<zf.length;rp++){var sp=zf[rp],$k=sp.toLowerCase(),Bk=sp[0].toUpperCase()+sp.slice(1);Qn($k,"on"+Bk)}Qn(Iy,"onAnimationEnd"),Qn(Uy,"onAnimationIteration"),Qn(zy,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(rk,"onTransitionRun"),Qn(sk,"onTransitionStart"),Qn(ak,"onTransitionCancel"),Qn($y,"onTransitionEnd"),ui("onMouseEnter",["mouseout","mouseover"]),ui("onMouseLeave",["mouseout","mouseover"]),ui("onPointerEnter",["pointerout","pointerover"]),ui("onPointerLeave",["pointerout","pointerover"]),_a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_a("onSelect","focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange".split(" ")),_a("onBeforeInput",["compositionend","keypress","textInput","paste"]),_a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gl="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(" "),Hk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gl));function ob(r,a){a=(a&4)!==0;for(var o=0;o<r.length;o++){var u=r[o],p=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var w=u.length-1;0<=w;w--){var T=u[w],j=T.instance,B=T.currentTarget;if(T=T.listener,j!==y&&p.isPropagationStopped())break e;y=T,p.currentTarget=B;try{y(p)}catch(Y){jc(Y)}p.currentTarget=null,y=j}else for(w=0;w<u.length;w++){if(T=u[w],j=T.instance,B=T.currentTarget,T=T.listener,j!==y&&p.isPropagationStopped())break e;y=T,p.currentTarget=B;try{y(p)}catch(Y){jc(Y)}p.currentTarget=null,y=j}}}}function $e(r,a){var o=a[yf];o===void 0&&(o=a[yf]=new Set);var u=r+"__bubble";o.has(u)||(lb(a,r,2,!1),o.add(u))}function ap(r,a,o){var u=0;a&&(u|=4),lb(o,r,u,a)}var vu="_reactListening"+Math.random().toString(36).slice(2);function ip(r){if(!r[vu]){r[vu]=!0,ty.forEach(function(o){o!=="selectionchange"&&(Hk.has(o)||ap(o,!1,r),ap(o,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[vu]||(a[vu]=!0,ap("selectionchange",!1,a))}}function lb(r,a,o,u){switch(Ib(a)){case 2:var p=gA;break;case 8:p=yA;break;default:p=_p}o=p.bind(null,a,o,r),p=void 0,!Tf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?r.addEventListener(a,o,{capture:!0,passive:p}):r.addEventListener(a,o,!0):p!==void 0?r.addEventListener(a,o,{passive:p}):r.addEventListener(a,o,!1)}function op(r,a,o,u,p){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var w=u.tag;if(w===3||w===4){var T=u.stateNode.containerInfo;if(T===p)break;if(w===4)for(w=u.return;w!==null;){var j=w.tag;if((j===3||j===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;T!==null;){if(w=oi(T),w===null)return;if(j=w.tag,j===5||j===6||j===26||j===27){u=y=w;continue e}T=T.parentNode}}u=u.return}hy(function(){var B=y,Y=Ef(o),X=[];e:{var H=By.get(r);if(H!==void 0){var q=Cc,me=r;switch(r){case"keypress":if(kc(o)===0)break e;case"keydown":case"keyup":q=MT;break;case"focusin":me="focus",q=Of;break;case"focusout":me="blur",q=Of;break;case"beforeblur":case"afterblur":q=Of;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=gy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=xT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=UT;break;case Iy:case Uy:case zy:q=TT;break;case $y:q=$T;break;case"scroll":case"scrollend":q=_T;break;case"wheel":q=HT;break;case"copy":case"cut":case"paste":q=AT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=vy;break;case"toggle":case"beforetoggle":q=FT}var ke=(a&4)!==0,nt=!ke&&(r==="scroll"||r==="scrollend"),U=ke?H!==null?H+"Capture":null:H;ke=[];for(var L=B,$;L!==null;){var Z=L;if($=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||$===null||U===null||(Z=Uo(L,U),Z!=null&&ke.push(yl(L,Z,$))),nt)break;L=L.return}0<ke.length&&(H=new q(H,me,null,o,Y),X.push({event:H,listeners:ke}))}}if((a&7)===0){e:{if(H=r==="mouseover"||r==="pointerover",q=r==="mouseout"||r==="pointerout",H&&o!==xf&&(me=o.relatedTarget||o.fromElement)&&(oi(me)||me[ii]))break e;if((q||H)&&(H=Y.window===Y?Y:(H=Y.ownerDocument)?H.defaultView||H.parentWindow:window,q?(me=o.relatedTarget||o.toElement,q=B,me=me?oi(me):null,me!==null&&(nt=l(me),ke=me.tag,me!==nt||ke!==5&&ke!==27&&ke!==6)&&(me=null)):(q=null,me=
vendor: 3,260 bytes, lines 9-10
9B),q!==me)){if(ke=gy,Z="onMouseLeave",U="onMouseEnter",L="mouse",(r==="pointerout"||r==="pointerover")&&(ke=vy,Z="onPointerLeave",U="onPointerEnter",L="pointer"),nt=q==null?H:Io(q),$=me==null?H:Io(me),H=new ke(Z,L+"leave",q,o,Y),H.target=nt,H.relatedTarget=$,Z=null,oi(Y)===B&&(ke=new ke(U,L+"enter",me,o,Y),ke.target=$,ke.relatedTarget=nt,Z=ke),nt=Z,q&&me)t:{for(ke=qk,U=q,L=me,$=0,Z=U;Z;Z=ke(Z))$++;Z=0;for(var Ee=L;Ee;Ee=ke(Ee))Z++;for(;0<$-Z;)U=ke(U),$--;for(;0<Z-$;)L=ke(L),Z--;for(;$--;){if(U===L||L!==null&&U===L.alternate){ke=U;break t}U=ke(U),L=ke(L)}ke=null}else ke=null;q!==null&&cb(X,H,q,ke,!1),me!==null&&nt!==null&&cb(X,nt,me,ke,!0)}}e:{if(H=B?Io(B):window,q=H.nodeName&&H.nodeName.toLowerCase(),q==="select"||q==="input"&&H.type==="file")var Ke=Ty;else if(Ey(H))if(ky)Ke=ek;else{Ke=XT;var _e=ZT}else q=H.nodeName,!q||q.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?B&&Sf(B.elementType)&&(Ke=Ty):Ke=JT;if(Ke&&(Ke=Ke(r,B))){Ry(X,Ke,o,Y);break e}_e&&_e(r,H,B),r==="focusout"&&B&&H.type==="number"&&B.memoizedProps.value!=null&&_f(H,"number",H.value)}switch(_e=B?Io(B):window,r){case"focusin":(Ey(_e)||_e.contentEditable==="true")&&(gi=_e,Lf=B,Go=null);break;case"focusout":Go=Lf=gi=null;break;case"mousedown":If=!0;break;case"contextmenu":case"mouseup":case"dragend":If=!1,My(X,o,Y);break;case"selectionchange":if(nk)break;case"keydown":case"keyup":My(X,o,Y)}var Le;if(jf)e:{switch(r){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else mi?Sy(r,o)&&(He="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(He="onCompositionStart");He&&(by&&o.locale!=="ko"&&(mi||He!=="onCompositionStart"?He==="onCompositionEnd"&&mi&&(Le=py()):(bs=Y,kf="value"in bs?bs.value:bs.textContent,mi=!0)),_e=bu(B,He),0<_e.length&&(He=new yy(He,r,null,o,Y),X.push({event:He,listeners:_e}),Le?He.data=Le:(Le=xy(o),Le!==null&&(He.data=Le)))),(Le=GT?KT(r,o):YT(r,o))&&(He=bu(B,"onBeforeInput"),0<He.length&&(_e=new yy("onBeforeInput","beforeinput",null,o,Y),X.push({event:_e,listeners:He}),_e.data=Le)),zk(X,r,B,o,Y)}ob(X,a)})}function yl(r,a,o){return{instance:r,listener:a,currentTarget:o}}function bu(r,a){for(var o=a+"Capture",u=[];r!==null;){var p=r,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=Uo(r,o),p!=null&&u.unshift(yl(r,p,y)),p=Uo(r,a),p!=null&&u.push(yl(r,p,y))),r.tag===3)return u;r=r.return}return[]}function qk(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function cb(r,a,o,u,p){for(var y=a._reactName,w=[];o!==null&&o!==u;){var T=o,j=T.alternate,B=T.stateNode;if(T=T.tag,j!==null&&j===u)break;T!==5&&T!==26&&T!==27||B===null||(j=B,p?(B=Uo(o,y),B!=null&&w.unshift(yl(o,B,j))):p||(B=Uo(o,y),B!=null&&w.push(yl(o,B,j)))),o=o.return}w.length!==0&&r.push({event:a,listeners:w})}var Fk=/\r\n?/g,Vk=/\u0000|\uFFFD/g;function ub(r){return(typeof r=="string"?r:""+r).replace(Fk,`
10`).replace(Vk,"")}function db(r,a){return a=ub(a),ub(r)===a}function tt(r,a,o,u,p,y){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||fi(r,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&fi(r,""+u);break;case"className":xc(r,"class",u);break;
vendor: 4,780 bytes, line 10
10case"tabIndex":xc(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":xc(r,o,u);break;case"style":dy(r,u,y);break;case"data":if(a!=="object"){xc(r,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){r.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(o);break}u=Rc(""+u),r.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(o,"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 y=="function"&&(o==="formAction"?(a!=="input"&&tt(r,a,"name",p.name,p,null),tt(r,a,"formEncType",p.formEncType,p,null),tt(r,a,"formMethod",p.formMethod,p,null),tt(r,a,"formTarget",p.formTarget,p,null)):(tt(r,a,"encType",p.encType,p,null),tt(r,a,"method",p.method,p,null),tt(r,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(o);break}u=Rc(""+u),r.setAttribute(o,u);break;case"onClick":u!=null&&(r.onclick=Pr);break;case"onScroll":u!=null&&$e("scroll",r);break;case"onScrollEnd":u!=null&&$e("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(s(60));r.innerHTML=o}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}o=Rc(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(o,""+u):r.removeAttribute(o);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":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":u===!0?r.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(o,u):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(o,u):r.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(o):r.setAttribute(o,u);break;case"popover":$e("beforetoggle",r),$e("toggle",r),Sc(r,"popover",u);break;case"xlinkActuate":Dr(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Dr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Dr(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Dr(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Dr(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Dr(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Dr(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Dr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Dr(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Sc(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=bT.get(o)||o,Sc(r,o,u))}}function lp(r,a,o,u,p,y){switch(o){case"style":dy(r,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(s(60));r.innerHTML=o}}break;case"children":typeof u=="string"?fi(r,u):(typeof u=="number"||typeof u=="bigint")&&fi(r,""+u);break;case"onScroll":u!=null&&$e("scroll",r);break;case"onScrollEnd":u!=null&&$e("scrollend",r);break;case"onClick":u!=null&&(r.onclick=Pr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;
vendor: 10,487 bytes, line 10
10default:if(!ny.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=r[an]||null,y=y!=null?y[o]:null,typeof y=="function"&&r.removeEventListener(a,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(a,u,p);break e}o in r?r[o]=u:u===!0?r.setAttribute(o,""):Sc(r,o,u)}}}function Ht(r,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",r),$e("load",r);var u=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var w=o[y];if(w!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:tt(r,a,y,w,o,null)}}p&&tt(r,a,"srcSet",o.srcSet,o,null),u&&tt(r,a,"src",o.src,o,null);return;case"input":$e("invalid",r);var T=y=w=p=null,j=null,B=null;for(u in o)if(o.hasOwnProperty(u)){var Y=o[u];if(Y!=null)switch(u){case"name":p=Y;break;case"type":w=Y;break;case"checked":j=Y;break;case"defaultChecked":B=Y;break;case"value":y=Y;break;case"defaultValue":T=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,a));break;default:tt(r,a,u,Y,o,null)}}oy(r,y,T,j,B,w,p,!1);return;case"select":$e("invalid",r),u=w=y=null;for(p in o)if(o.hasOwnProperty(p)&&(T=o[p],T!=null))switch(p){case"value":y=T;break;case"defaultValue":w=T;break;case"multiple":u=T;default:tt(r,a,p,T,o,null)}a=y,o=w,r.multiple=!!u,a!=null?di(r,!!u,a,!1):o!=null&&di(r,!!u,o,!0);return;case"textarea":$e("invalid",r),y=p=u=null;for(w in o)if(o.hasOwnProperty(w)&&(T=o[w],T!=null))switch(w){case"value":u=T;break;case"defaultValue":p=T;break;case"children":y=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(s(91));break;default:tt(r,a,w,T,o,null)}cy(r,u,p,y);return;case"option":for(j in o)o.hasOwnProperty(j)&&(u=o[j],u!=null)&&(j==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":tt(r,a,j,u,o,null));return;case"dialog":$e("beforetoggle",r),$e("toggle",r),$e("cancel",r),$e("close",r);break;case"iframe":case"object":$e("load",r);break;case"video":case"audio":for(u=0;u<gl.length;u++)$e(gl[u],r);break;case"image":$e("error",r),$e("load",r);break;case"details":$e("toggle",r);break;case"embed":case"source":case"link":$e("error",r),$e("load",r);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 o)if(o.hasOwnProperty(B)&&(u=o[B],u!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:tt(r,a,B,u,o,null)}return;default:if(Sf(a)){for(Y in o)o.hasOwnProperty(Y)&&(u=o[Y],u!==void 0&&lp(r,a,Y,u,o,void 0));return}}for(T in o)o.hasOwnProperty(T)&&(u=o[T],u!=null&&tt(r,a,T,u,o,null))}function Gk(r,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,w=null,T=null,j=null,B=null,Y=null;for(q in o){var X=o[q];if(o.hasOwnProperty(q)&&X!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":j=X;default:u.hasOwnProperty(q)||tt(r,a,q,null,u,X)}}for(var H in u){var q=u[H];if(X=o[H],u.hasOwnProperty(H)&&(q!=null||X!=null))switch(H){case"type":y=q;break;case"name":p=q;break;case"checked":B=q;break;case"defaultChecked":Y=q;break;case"value":w=q;break;case"defaultValue":T=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,a));break;default:q!==X&&tt(r,a,H,q,u,X)}}wf(r,w,T,j,B,Y,y,p);return;case"select":q=w=T=H=null;for(y in o)if(j=o[y],o.hasOwnProperty(y)&&j!=null)switch(y){case"value":break;case"multiple":q=j;default:u.hasOwnProperty(y)||tt(r,a,y,null,u,j)}for(p in u)if(y=u[p],j=o[p],u.hasOwnProperty(p)&&(y!=null||j!=null))switch(p){case"value":H=y;break;case"defaultValue":T=y;break;case"multiple":w=y;default:y!==j&&tt(r,a,p,y,u,j)}a=T,o=w,u=q,H!=null?di(r,!!o,H,!1):!!u!=!!o&&(a!=null?di(r,!!o,a,!0):di(r,!!o,o?[]:"",!1));return;case"textarea":q=H=null;for(T in o)if(p=o[T],o.hasOwnProperty(T)&&p!=null&&!u.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:tt(r,a,T,null,u,p)}for(w in u)if(p=u[w],y=o[w],u.hasOwnProperty(w)&&(p!=null||y!=null))switch(w){case"value":H=p;break;case"defaultValue":q=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==y&&tt(r,a,w,p,u,y)}ly(r,H,q);return;case"option":for(var me in o)H=o[me],o.hasOwnProperty(me)&&H!=null&&!u.hasOwnProperty(me)&&(me==="selected"?r.selected=!1:tt(r,a,me,null,u,H));for(j in u)H=u[j],q=o[j],u.hasOwnProperty(j)&&H!==q&&(H!=null||q!=null)&&(j==="selected"?r.selected=H&&typeof H!="function"&&typeof H!="symbol":tt(r,a,j,H,u,q));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 ke in o)H=o[ke],o.hasOwnProperty(ke)&&H!=null&&!u.hasOwnProperty(ke)&&tt(r,a,ke,null,u,H);for(B in u)if(H=u[B],q=o[B],u.hasOwnProperty(B)&&H!==q&&(H!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,a));break;default:tt(r,a,B,H,u,q)}return;default:if(Sf(a)){for(var nt in o)H=o[nt],o.hasOwnProperty(nt)&&H!==void 0&&!u.hasOwnProperty(nt)&&lp(r,a,nt,void 0,u,H);for(Y in u)H=u[Y],q=o[Y],!u.hasOwnProperty(Y)||H===q||H===void 0&&q===void 0||lp(r,a,Y,H,u,q);return}}for(var U in o)H=o[U],o.hasOwnProperty(U)&&H!=null&&!u.hasOwnProperty(U)&&tt(r,a,U,null,u,H);for(X in u)H=u[X],q=o[X],!u.hasOwnProperty(X)||H===q||H==null&&q==null||tt(r,a,X,H,u,q)}function fb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Kk(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var p=o[u],y=p.transferSize,w=p.initiatorType,T=p.duration;if(y&&T&&fb(w)){for(w=0,T=p.responseEnd,u+=1;u<o.length;u++){var j=o[u],B=j.startTime;if(B>T)break;var Y=j.transferSize,X=j.initiatorType;Y&&fb(X)&&(j=j.responseEnd,w+=Y*(j<T?1:(T-B)/(j-B)))}if(--u,a+=8*(y+w)/(p.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var cp=null,up=null;function wu(r){return r.nodeType===9?r:r.ownerDocument}function hb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function pb(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function dp(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var fp=null;function Yk(){var r=window.event;return r&&r.type==="popstate"?r===fp?!1:(fp=r,!0):(fp=null,!1)}var mb=typeof setTimeout=="function"?setTimeout:void 0,Wk=typeof clearTimeout=="function"?clearTimeout:void 0,gb=typeof Promise=="function"?Promise:void 0,Qk=typeof queueMicrotask=="function"?queueMicrotask:typeof gb<"u"?function(r){return gb.resolve(null).then(r).catch(Zk)}:mb;function Zk(r){setTimeout(function(){throw r})}function Ls(r){return r==="head"}function yb(r,a){var o=a,u=0;do{var p=o.nextSibling;if(r.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(u===0){r.removeChild(p),qi(a);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")vl(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,vl(o);for(var y=o.firstChild;y;){var w=y.nextSibling,T=y.nodeName;y[Lo]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=w}}else o==="body"&&vl(r.ownerDocument.body);o=p}while(o);qi(a)}function vb(r,a){var o=r;r=0;do{var u=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=u}while(o)}function hp(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":hp(o),vf(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function Xk(r,a,o,u){for(;r.nodeType===1;){var p=o;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[Lo])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(y=r.getAttribute("rel"),y==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(y!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(y=r.getAttribute("src"),(y!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===y)return r}else return r;if(r=Hn(r.nextSibling),r===null)break}return null}function Jk(r,a,o){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=Hn(r.nextSibling),r===null))return null;return r}function bb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Hn(r.nextSibling),r===null))return null;return r}function pp(r){return r.data==="$?"||r.data==="$~"}function mp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function eA(r,a){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||o.readyState!=="loading")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function Hn(r){for(;r!=null;
vendor: 5,110 bytes, line 10
10r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var gp=null;function wb(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(a===0)return Hn(r.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}r=r.nextSibling}return null}function _b(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return r;a--}else o!=="/$"&&o!=="/&"||a++}r=r.previousSibling}return null}function Sb(r,a,o){switch(a=wu(o),r){case"html":if(r=a.documentElement,!r)throw Error(s(452));return r;case"head":if(r=a.head,!r)throw Error(s(453));return r;case"body":if(r=a.body,!r)throw Error(s(454));return r;default:throw Error(s(451))}}function vl(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);vf(r)}var qn=new Map,xb=new Set;function _u(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Qr=G.d;G.d={f:tA,r:nA,D:rA,C:sA,L:aA,m:iA,X:lA,S:oA,M:cA};function tA(){var r=Qr.f(),a=fu();return r||a}function nA(r){var a=li(r);a!==null&&a.tag===5&&a.type==="form"?$v(a):Qr.r(r)}var $i=typeof document>"u"?null:document;function Eb(r,a,o){var u=$i;if(u&&typeof a=="string"&&a){var p=Mn(a);p='link[rel="'+r+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),xb.has(p)||(xb.add(p),r={rel:r,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),Ht(a,"link",r),Dt(a),u.head.appendChild(a)))}}function rA(r){Qr.D(r),Eb("dns-prefetch",r,null)}function sA(r,a){Qr.C(r,a),Eb("preconnect",r,a)}function aA(r,a,o){Qr.L(r,a,o);var u=$i;if(u&&r&&a){var p='link[rel="preload"][as="'+Mn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Mn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Mn(o.imageSizes)+'"]')):p+='[href="'+Mn(r)+'"]';var y=p;switch(a){case"style":y=Bi(r);break;case"script":y=Hi(r)}qn.has(y)||(r=m({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:r,as:a},o),qn.set(y,r),u.querySelector(p)!==null||a==="style"&&u.querySelector(bl(y))||a==="script"&&u.querySelector(wl(y))||(a=u.createElement("link"),Ht(a,"link",r),Dt(a),u.head.appendChild(a)))}}function iA(r,a){Qr.m(r,a);var o=$i;if(o&&r){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Mn(u)+'"][href="'+Mn(r)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Hi(r)}if(!qn.has(y)&&(r=m({rel:"modulepreload",href:r},a),qn.set(y,r),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(wl(y)))return}u=o.createElement("link"),Ht(u,"link",r),Dt(u),o.head.appendChild(u)}}}function oA(r,a,o){Qr.S(r,a,o);var u=$i;if(u&&r){var p=ci(u).hoistableStyles,y=Bi(r);a=a||"default";var w=p.get(y);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(bl(y)))T.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":a},o),(o=qn.get(y))&&yp(r,o);var j=w=u.createElement("link");Dt(j),Ht(j,"link",r),j._p=new Promise(function(B,Y){j.onload=B,j.onerror=Y}),j.addEventListener("load",function(){T.loading|=1}),j.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Su(w,a,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(y,w)}}}function lA(r,a){Qr.X(r,a);var o=$i;if(o&&r){var u=ci(o).hoistableScripts,p=Hi(r),y=u.get(p);y||(y=o.querySelector(wl(p)),y||(r=m({src:r,async:!0},a),(a=qn.get(p))&&vp(r,a),y=o.createElement("script"),Dt(y),Ht(y,"link",r),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function cA(r,a){Qr.M(r,a);var o=$i;if(o&&r){var u=ci(o).hoistableScripts,p=Hi(r),y=u.get(p);y||(y=o.querySelector(wl(p)),y||(r=m({src:r,async:!0,type:"module"},a),(a=qn.get(p))&&vp(r,a),y=o.createElement("script"),Dt(y),Ht(y,"link",r),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Rb(r,a,o,u){var p=(p=ue.current)?_u(p):null;if(!p)throw Error(s(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Bi(o.href),o=ci(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Bi(o.href);var y=ci(p).hoistableStyles,w=y.get(r);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(r,w),(y=p.querySelector(bl(r)))&&!y._p&&(w.instance=y,w.state.loading=5),qn.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},qn.set(r,o),y||uA(p,r,o,w.state))),a&&u===null)throw Error(s(528,""));return w}if(a&&u!==null)throw Error(s(529,""));return null;
vendor: 5,047 bytes, line 10
10case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Hi(o),o=ci(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,r))}}function Bi(r){return'href="'+Mn(r)+'"'}function bl(r){return'link[rel="stylesheet"]['+r+"]"}function Tb(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function uA(r,a,o,u){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=r.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Ht(a,"link",o),Dt(a),r.head.appendChild(a))}function Hi(r){return'[src="'+Mn(r)+'"]'}function wl(r){return"script[async]"+r}function kb(r,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=r.querySelector('style[data-href~="'+Mn(o.href)+'"]');if(u)return a.instance=u,Dt(u),u;var p=m({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),Dt(u),Ht(u,"style",p),Su(u,o.precedence,r),a.instance=u;case"stylesheet":p=Bi(o.href);var y=r.querySelector(bl(p));if(y)return a.state.loading|=4,a.instance=y,Dt(y),y;u=Tb(o),(p=qn.get(p))&&yp(u,p),y=(r.ownerDocument||r).createElement("link"),Dt(y);var w=y;return w._p=new Promise(function(T,j){w.onload=T,w.onerror=j}),Ht(y,"link",u),a.state.loading|=4,Su(y,o.precedence,r),a.instance=y;case"script":return y=Hi(o.src),(p=r.querySelector(wl(y)))?(a.instance=p,Dt(p),p):(u=o,(p=qn.get(y))&&(u=m({},o),vp(u,p)),r=r.ownerDocument||r,p=r.createElement("script"),Dt(p),Ht(p,"link",u),r.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Su(u,o.precedence,r));return a.instance}function Su(r,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,w=0;w<u.length;w++){var T=u[w];if(T.dataset.precedence===a)y=T;else if(y!==p)break}y?y.parentNode.insertBefore(r,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(r,a.firstChild))}function yp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function vp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var xu=null;function Ab(r,a,o){if(xu===null){var u=new Map,p=xu=new Map;p.set(o,u)}else p=xu,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(r))return u;for(u.set(r,null),o=o.getElementsByTagName(r),p=0;p<o.length;p++){var y=o[p];if(!(y[Lo]||y[Ut]||r==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var w=y.getAttribute(a)||"";w=r+w;var T=u.get(w);T?T.push(y):u.set(w,[y])}}return u}function Cb(r,a,o){r=r.ownerDocument||r,r.head.insertBefore(o,a==="title"?r.querySelector("head > title"):null)}function dA(r,a,o){if(o===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Ob(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function fA(r,a,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Bi(u.href),y=a.querySelector(bl(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Eu.bind(r),a.then(r,r)),o.state.loading|=4,o.instance=y,Dt(y);return}y=a.ownerDocument||a,u=Tb(u),(p=qn.get(p))&&yp(u,p),y=y.createElement("link"),Dt(y);var w=y;w._p=new Promise(function(T,j){w.onload=T,w.onerror=j}),Ht(y,"link",u),o.instance=y}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=Eu.bind(r),a.addEventListener("load",o),a.addEventListener("error",o))}}var bp=0;function hA(r,a){return r.stylesheets&&r.count===0&&Tu(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var u=setTimeout(function(){if(r.stylesheets&&Tu(r,r.stylesheets),r.unsuspend){var y=r.unsuspend;r.unsuspend=null,y()}},6e4+a);0<r.imgBytes&&bp===0&&(bp=62500*Kk());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Tu(r,r.stylesheets),r.unsuspend)){var y=r.unsuspend;r.unsuspend=null,y()}},(r.imgBytes>bp?50:800)+a);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}
vendor: 11,349 bytes, line 10
10function Eu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Ru=null;function Tu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Ru=new Map,a.forEach(pA,r),Ru=null,Eu.call(r))}function pA(r,a){if(!(a.state.loading&4)){var o=Ru.get(r);if(o)var u=o.get(null);else{o=new Map,Ru.set(r,o);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var w=p[y];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),u=w)}u&&o.set(null,u)}p=a.instance,w=p.getAttribute("data-precedence"),y=o.get(w)||u,y===u&&o.set(null,p),o.set(w,p),this.count++,u=Eu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),a.state.loading|=4}}var _l={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function mA(r,a,o,u,p,y,w,T,j){this.tag=1,this.containerInfo=r,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=ys(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ys(0),this.hiddenUpdates=ys(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Nb(r,a,o,u,p,y,w,T,j,B,Y,X){return r=new mA(r,a,o,w,j,B,Y,X,T),a=1,y===!0&&(a|=24),y=_n(3,null,null,a),r.current=y,y.stateNode=r,a=Xf(),a.refCount++,r.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:a},nh(y),r}function jb(r){return r?(r=bi,r):bi}function Db(r,a,o,u,p,y){p=jb(p),u.context===null?u.context=p:u.pendingContext=p,u=Rs(a),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Ts(r,u,a),o!==null&&(fn(o,r,a),Jo(o,r,a))}function Pb(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<a?o:a}}function wp(r,a){Pb(r,a),(r=r.alternate)&&Pb(r,a)}function Mb(r){if(r.tag===13||r.tag===31){var a=Ra(r,67108864);a!==null&&fn(a,r,67108864),wp(r,67108864)}}function Lb(r){if(r.tag===13||r.tag===31){var a=Tn();a=ai(a);var o=Ra(r,a);o!==null&&fn(o,r,a),wp(r,a)}}var ku=!0;function gA(r,a,o,u){var p=M.T;M.T=null;var y=G.p;try{G.p=2,_p(r,a,o,u)}finally{G.p=y,M.T=p}}function yA(r,a,o,u){var p=M.T;M.T=null;var y=G.p;try{G.p=8,_p(r,a,o,u)}finally{G.p=y,M.T=p}}function _p(r,a,o,u){if(ku){var p=Sp(u);if(p===null)op(r,a,u,Au,o),Ub(r,u);else if(bA(p,r,a,o,u))u.stopPropagation();else if(Ub(r,u),a&4&&-1<vA.indexOf(r)){for(;p!==null;){var y=li(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var w=pr(y.pendingLanes);if(w!==0){var T=y;for(T.pendingLanes|=2,T.entangledLanes|=2;w;){var j=1<<31-Gt(w);T.entanglements[1]|=j,w&=~j}vr(y),(Qe&6)===0&&(uu=Xt()+500,ml(0))}}break;case 31:case 13:T=Ra(y,2),T!==null&&fn(T,y,2),fu(),wp(y,2)}if(y=Sp(u),y===null&&op(r,a,u,Au,o),y===p)break;p=y}p!==null&&u.stopPropagation()}else op(r,a,u,null,o)}}function Sp(r){return r=Ef(r),xp(r)}var Au=null;function xp(r){if(Au=null,r=oi(r),r!==null){var a=l(r);if(a===null)r=null;else{var o=a.tag;if(o===13){if(r=c(a),r!==null)return r;r=null}else if(o===31){if(r=d(a),r!==null)return r;r=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Au=r,null}function Ib(r){switch(r){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(pf()){case ga:return 2;case wc:return 8;case ya:case Po:return 32;case jr:return 268435456;default:return 32}default:return 32}}var Ep=!1,Is=null,Us=null,zs=null,Sl=new Map,xl=new Map,$s=[],vA="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 Ub(r,a){switch(r){case"focusin":case"focusout":Is=null;break;case"dragenter":case"dragleave":Us=null;break;case"mouseover":case"mouseout":zs=null;break;case"pointerover":case"pointerout":Sl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":xl.delete(a.pointerId)}}function El(r,a,o,u,p,y){return r===null||r.nativeEvent!==y?(r={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},a!==null&&(a=li(a),a!==null&&Mb(a)),r):(r.eventSystemFlags|=u,a=r.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),r)}function bA(r,a,o,u,p){switch(a){case"focusin":return Is=El(Is,r,a,o,u,p),!0;case"dragenter":return Us=El(Us,r,a,o,u,p),!0;case"mouseover":return zs=El(zs,r,a,o,u,p),!0;case"pointerover":var y=p.pointerId;return Sl.set(y,El(Sl.get(y)||null,r,a,o,u,p)),!0;case"gotpointercapture":return y=p.pointerId,xl.set(y,El(xl.get(y)||null,r,a,o,u,p)),!0}return!1}function zb(r){var a=oi(r.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){r.blockedOn=a,Jg(r.priority,function(){Lb(o)});return}}else if(a===31){if(a=d(o),a!==null){r.blockedOn=a,Jg(r.priority,function(){Lb(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Cu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var o=Sp(r.nativeEvent);if(o===null){o=r.nativeEvent;var u=new o.constructor(o.type,o);xf=u,o.target.dispatchEvent(u),xf=null}else return a=li(o),a!==null&&Mb(a),r.blockedOn=o,!1;a.shift()}return!0}function $b(r,a,o){Cu(r)&&o.delete(a)}function wA(){Ep=!1,Is!==null&&Cu(Is)&&(Is=null),Us!==null&&Cu(Us)&&(Us=null),zs!==null&&Cu(zs)&&(zs=null),Sl.forEach($b),xl.forEach($b)}function Ou(r,a){r.blockedOn===a&&(r.blockedOn=null,Ep||(Ep=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,wA)))}var Nu=null;function Bb(r){Nu!==r&&(Nu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Nu===r&&(Nu=null);for(var a=0;a<r.length;a+=3){var o=r[a],u=r[a+1],p=r[a+2];if(typeof u!="function"){if(xp(u||o)===null)continue;break}var y=li(o);y!==null&&(r.splice(a,3),a-=3,Sh(y,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function qi(r){function a(j){return Ou(j,r)}Is!==null&&Ou(Is,r),Us!==null&&Ou(Us,r),zs!==null&&Ou(zs,r),Sl.forEach(a),xl.forEach(a);for(var o=0;o<$s.length;o++){var u=$s[o];u.blockedOn===r&&(u.blockedOn=null)}for(;0<$s.length&&(o=$s[0],o.blockedOn===null);)zb(o),o.blockedOn===null&&$s.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],w=p[an]||null;if(typeof y=="function")w||Bb(o);else if(w){var T=null;if(y&&y.hasAttribute("formAction")){if(p=y,w=y[an]||null)T=w.formAction;else if(xp(p)!==null)continue}else T=w.action;typeof T=="function"?o[u+1]=T:(o.splice(u,3),u-=3),Bb(o)}}}function Hb(){function r(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(w){return p=w})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function Rp(r){this._internalRoot=r}ju.prototype.render=Rp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(s(409));var o=a.current,u=Tn();Db(o,u,r,a,null,null)},ju.prototype.unmount=Rp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Db(r.current,2,null,r,null,null),fu(),a[ii]=null}};function ju(r){this._internalRoot=r}ju.prototype.unstable_scheduleHydration=function(r){if(r){var a=gf();r={blockedOn:null,target:r,priority:a};for(var o=0;o<$s.length&&a!==0&&a<$s[o].priority;o++);$s.splice(o,0,r),o===0&&zb(r)}};var qb=t.version;if(qb!=="19.2.5")throw Error(s(527,qb,"19.2.5"));G.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(s(188)):(r=Object.keys(r).join(","),Error(s(268,r)));return r=h(a),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var _A={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Du.isDisabled&&Du.supportsFiber)try{va=Du.inject(_A),Jt=Du}catch{}}return Tl.createRoot=function(r,a){if(!i(r))throw Error(s(299));var o=!1,u="",p=Qv,y=Zv,w=Xv;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),a=Nb(r,1,!1,null,null,o,u,null,p,y,w,Hb),r[ii]=a.current,ip(r),new Rp(a)},Tl.hydrateRoot=function(r,a,o){if(!i(r))throw Error(s(299));var u=!1,p="",y=Qv,w=Zv,T=Xv,j=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(T=o.onRecoverableError),o.formState!==void 0&&(j=o.formState)),a=Nb(r,1,!0,a,o??null,u,p,j,y,w,T,Hb),a.context=jb(null),o=a.current,u=Tn(),u=ai(u),p=Rs(u),p.callback=null,Ts(o,p,u),o=u,a.current.lanes=o,ht(a,o),vr(a),r[ii]=a.current,ip(r),new ju(a)},Tl.version="19.2.5",Tl}var Jb;
10function NA(){if(Jb)return Ap.exports;Jb=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(),Ap.exports=OA(),Ap.exports}var jA=NA(),DA="__TSS_CONTEXT",dm=Symbol.for("TSS_SERVER_FUNCTION"),ew=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),PA="application/x-tss-framed",sg=()=>window.__TSS_START_OPTIONS__;function qS(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Ya(e){return e?.isNotFound===!0}function Vn(e){e.statusCode=e.statusCode||e.code||307;const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ql(e){return e instanceof Response&&!!e.options}function FS(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Vn(e)}function MA(e){return e.replaceAll("\0","/").replaceAll("�","/").replace(/~([~0r])/g,(t,n)=>n==="0"?"\0":n==="r"?"�":n)}const tw=!1;function ra(e){return e[e.length-1]}function VS(e,t){return typeof e=="function"?e(t):e}const ag=Object.prototype.hasOwnProperty;function GS(e){for(const t in e)if(ag.call(e,t))return!0;return!1}const id=()=>Object.create(null),Fi=(e,t)=>Js(e,t,!0);function Js(e,t,n,s=0){if(e===t)return e;if(s++>500)return t;const i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(wd(e)&&wd(t)))return t;const l=Object.keys(e),c=l.length,d=Object.keys(t),f=d.length;if(i?c!==e.length||f!==t.length||c&&ra(l)!==`${c-1}`||f&&ra(d)!==`${f-1}`:c!==Object.getOwnPropertyNames(e).length||f!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let h=0,g,m,v;if(i){for(;h<f&&(v=h,m=e[v],g=t[v],g=m===g?m:typeof m=="object"?Js(m,g,n,s):g,g===m);h++);if(h===f&&c===f)return e}else{let S=c===f,_=!0;for(;h<f;h++){v=d[h],m=e[v];const x=t[v];g=m===x?m:typeof m=="object"?Js(m,x,n,s):x,S&&=g===m&&(l[h]===v||ag.call(e,v)),_&&=Object.is(g,x),l[h]=g}if(S)return Object.getOwnPropertySymbols(e).length?t:e;if(_)return t}const b=i?d.fill(0):n?id():{};for(let S=0;S<f;S++)v=i?S:d[S],i?(m=e[v],S>h&&(g=t[v],g=m===g?m:typeof m=="object"?Js(m,g,n,s):g),b[v]=S<h?m:g):b[v]=l[S];return b}function wd(e){return!e||typeof e!="object"?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function or(e,t,n,s){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,l=e.length;i<l;i++){const c=e[i],d=t[i];if(c!==d&&!or(c,d,n,s))return!1}return!0}if(wd(e)&&wd(t)){if(n){for(const l in t)if((s||t[l]!==void 0)&&!or(e[l],t[l],n,s))return!1;return!0}let i=0;if(s)i=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&i++;for(const l in t)if((s||t[l]!==void 0)&&(i--===0||!or(e[l],t[l],n,s)))return!1;return i===0}return!1}function LA(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")}const IA=/[\x00-\x1f\x7f"<>`{}]/g;function UA(e){return e.replace(IA,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function nw(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return UA(t)}const zA=["http:","https:","mailto:","tel:"];function Fl(e){if(e[0]!=="/"&&e.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const KS=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function YS(e,t){if(!e)return!1;if(KS.test(e))return!0;const n=Fl(e);return n?!t.has(n):!1}const $A={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},BA=/[&><\u2028\u2029]/g;function HA(e){return e.replace(BA,t=>$A[t])}function kl(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){const n=/%25|%5C/gi;let s=0,i;for(t="";(i=n.exec(e))!==null;)t+=nw(e.slice(s,i.index))+i[0],s=n.lastIndex;t+=nw(s?e.slice(s):e)}return t}function qA(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function FA(e,t){if(e===t)return!0;
10if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function uo(e){return e.replace(/\/{2,}/g,"/")}function WS(e){return e==="/"?e:e.replace(/^\/+/,"")}function Er(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/+$/,""):e}function QS(e){return Er(WS(e))}function rw(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function sw(e,t,n="never",s){if(t.includes("//")&&(t=uo(t)),t.startsWith("/"))return t.length===1||n==="preserve"?t:n==="always"?t.endsWith("/")?t:`${t}/`:t.endsWith("/")?t.slice(0,-1):t;const i=t===".";let l;if(s){l=i?e:e+"\0"+t;const h=s.get(l);if(h)return h}let c;if(i)c=e.split("/");else{for(e.includes("//")&&(e=uo(e)),c=e.split("/");c.length>1&&ra(c)==="";)c.pop();const h=t.split("/");for(let g=0,m=h.length;g<m;g++){const v=h[g];v===""?g?g===m-1&&c.push(v):c=[v]:v===".."?c.length>1?c.pop():c=[""]:v==="."||c.push(v)}}c.length>1&&(ra(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const d=c.join("/"),f=(i?uo(d):d)||"/";return l&&s&&s.set(l,f),f}function VA(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),n=new RegExp([...t.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return s=>s.replace(n,i=>t.get(i)??i)}function GA(e){return e==null||e===""}function KA(e,t,n){if(typeof t!="string")return""+(t??void 0);const s=e==="_splat";if(s&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return s&&(i=i.replaceAll("%2F","/")),n?n(i):i}function aw(e,t,n,s,i){const l=e.endsWith("/")?"/":"";let c="";for(const d of t){if(typeof d=="string"){c+=d;continue}const[f,h,g,m]=d,v=f===2,b=v&&m!==void 0?m+l:m;let S=n[h];if(!(f===3&&S==null)){if(i&&(i[h]=S,v&&(i["*"]=S)),v&&GA(S)){if(g==="/"&&!b)continue;S=""}c+=g+KA(h,S,s)+(b||"")}}return c+l||"/"}function _d(e){const t=new Map;let n,s;return{get(i){const l=t.get(i);if(l)return l.visited=!0,l.value},set(i,l){const c=t.get(i);if(c){c.value=l;return}if(t.size>=e){let f=n?.next().value;for(;!f||f.visited;)f?f.visited=!1:n=t.values(),f=n.next().value;f===s&&(n=void 0),t.delete(f.key)}const d={key:i,value:l,visited:!1};s=d,t.set(i,d)},clear(){t.clear(),n=void 0,s=void 0}}}function Vl(){throw new Error("Invariant failed")}const Qs=4,ZS=5;function YA(e){const t=e.names;if(t)return t;const n=[];for(const s of e)typeof s!="string"&&n.push(s[1]);return e.names=n}function WA(e,t,n){const s=e.substring(t,n);if(s.charCodeAt(0)===36)return s.length===1?[2,"_splat","",void 0]:[1,s.substring(1),"",""];const i=s.indexOf("{");if(i>=0){const l=s.indexOf("}",i),c=s.charCodeAt(i+1)===45,d=i+(c?3:2);if(l>=0&&s.charCodeAt(d-1)===36&&(!c||d<l)){const f=s.substring(d,l);return[c?3:f?1:2,f||"_splat",s.substring(0,i),e.substring(t+l+1,f?n:e.length)]}}return s}function Gl(e,t,n,s,i,l){let c=n;const d=t.fullPath??t.from,f=t.options,h=d.length,g=d.endsWith("/")?h-1:h,m=f?.caseSensitive??e,v=f?.params?.parse??f?.parseParams;let b,S=l?n-1:0;if(!s||d.includes("$")){b=l?.slice()??[];const R=ra(b);R&&typeof R!="string"&&R[0]===2&&(b[b.length-1]=[R[0],R[1],R[2],R[3]===void 0?void 0:R[3]+d.substring(n-(d[n-2]==="/"?2:1),g)],S=h)}for(;c<h;){const R=c,A=d.indexOf("/",R);let C=A===-1?h:A;
10const D=WA(d,R,C);c=C+1;let z;if(typeof D=="string"){if(!s)continue;let N=D,O;m?O=s.static??=new Map:(N=D.toLowerCase(),O=s.staticInsensitive??=new Map);const I=O.get(N);if(I)z=I;else{const W=qa(s);z=W,O.set(N,W)}}else{const N=D[0];let O=D[2],I=D[3]??"";if(N===2&&(C=h,c=C+1),b&&S<C&&(S<R-1&&b.push(d.substring(S,R-1)),D[2]="/"+O,N===2&&D[3]!==void 0&&g<h&&(D[3]=I.slice(0,-1)),b.push(D),S=C),!s)continue;const W=m&&!!(O||I);m||(O=O.toLowerCase(),I=I.toLowerCase());const ne=N===1?s.dynamic??=[]:N===3?s.optional??=[]:s.wildcard??=[],F=N!==2&&!v&&ne.find(V=>!V.parse&&V.caseSensitive===W&&V.prefix===O&&V.suffix===I);if(F)z=F;else{const V=qa(s,N,W,O,I);z=V,ne.push(V),ne.length===2&&i?.push(ne)}}s=z}b&&S<g&&b.push(d.substring(S,g));const _=b?.slice();if(!s)return _;if(v&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const R=qa(s,ZS);(s.pathless??=[]).push(R),s=R}const x=(t.path||!t.children)&&!t.isRoot;if(x&&g<h){const R=qa(s,Qs);s.index=R,s=R}return s.parse=v??null,s.priority=f?.params?.priority??0,s.route||(s.data=_,x&&(s.route=t)),[s,c,_]}function XS(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;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 qa(e,t=0,n,s,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:s,suffix:i}}function QA(e,t){const n=qa(),s=[];function i(l,c,d,f){const[h,g,m]=Gl(!1,l,c,d,s,f);if(l.children)for(const v of l.children)i(v,g,h,m)}for(const l of e)i(l,1,n);for(const l of s)l.sort(XS);t.masksTree=n,t.flatCache=_d(1e3)}function ZA(e,t){e||="/";const n=t.flatCache.get(e);if(n!==void 0)return n;const s=ig(e,t.masksTree);return t.flatCache.set(e,s),s}function XA(e,t,n,s,i){e||="/",s||="/";const l=t?`case\0${e}`:e;let c=i.singleCache.get(l);return c||(c=qa(),Gl(t,{from:e},1,c),i.singleCache.set(l,c)),ig(s,c,n)}function JA(e,t,n=!1){const s=n?e:`nofuzz\0${e}`,i=t.matchCache.get(s);if(i!==void 0)return i;e||="/";let l;try{l=ig(e,t.segmentTree,n)}catch(c){if(c instanceof URIError)l=null;else throw c}return l&&(l.branch=e1(l.route)),t.matchCache.set(s,l),l}function eC(e,t=!1){const n=qa(),s=[],i={},l={};let c=0;function d(f,h,g,m){if(f.init(c),f.id in i&&Vl(),i[f.id]=f,c!==0&&f.path){const _=Er(f.fullPath);(!l[_]||f.fullPath.endsWith("/"))&&(l[_]=f)}c++;const[v,b,S]=Gl(t,f,h,g,s,m);if(f._interpolation=S,f.children)for(const _ of f.children)d(_,b,v,S)}d(e,1,n);for(const f of s)f.sort(XS);return{processedTree:{segmentTree:n,singleCache:_d(1e3),matchCache:_d(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function ig(e,t,n=!1){const s=e.split("/"),i=nC(e,s,t,n);if(!i)return null;const[l]=JS(e,s,i);return{route:i.node.route,rawParams:l}}function JS(e,t,n){const s=tC(n.node),i=n.node.data&&YA(n.node.data),l=Object.create(null);let c=n.extract?.part??0,d=n.extract?.node??0,f=n.extract?.path??0,h=n.extract?.param??0;for(;d<s.length;c++,d++,f++){const g=s[d];if(g.kind===Qs)break;if(g.kind===ZS){c--,f--;continue}const m=t[c],v=f;if(m&&(f+=m.length),g.kind===1||g.kind===3){const b=i[h++];if(g.kind===3&&n.skipped&1<<d){c--,f=v-1;continue}const S=g.suffix||g.prefix?m.substring(g.prefix.length,m.length-g.suffix.length):m;(S||g.kind===1)&&(l[b]=decodeURIComponent(S))}else if(g.kind===2){const b=g,S=e.substring(v+b.prefix.length,e.length-b.suffix.length),_=decodeURIComponent(S);l["*"]=_,l._splat=_;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:c,node:d,path:f,param:h}]}function e1(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function tC(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function nC(e,t,n,s){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!ra(t),l=i&&e!=="/",c=t.length-(i?1:0),d=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let f=null,h=null;for(;d.length;){const g=d.pop(),{node:m,index:v,skipped:b,statics:S,dynamics:_,optionals:x}=g;let{extract:R,rawParams:A}=g;if(m.kind===2&&m.route&&!Mu(h,g))continue;if(m.parse){if(!iw(e,t,g))continue;A=g.rawParams,R=g.extract}s&&m.route&&m.kind!==Qs&&Mu(f,g)&&(f=g);const C=v===c;if(C&&(m.route&&(!l||m.kind===Qs||m.kind===2)&&Mu(h,g)&&(h=g),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const D=C?void 0:t[v];let z;if(C&&m.index){const N={node:m.index,index:v,skipped:b,statics:S,dynamics:_,optionals:x,extract:R,rawParams:A};let O=!0;
10if(m.index.parse&&(iw(e,t,N)||(O=!1)),O){if(!_&&!x&&!b&&rC(S,c))return N;Mu(h,N)&&(h=N)}}if(m.wildcard)for(let N=m.wildcard.length-1;N>=0;N--){const O=m.wildcard[N],{prefix:I,suffix:W}=O;if(!(I&&(C||!(O.caseSensitive?D:z??=D.toLowerCase()).startsWith(I)))){if(W){if(C)continue;const ne=t.slice(v).join("/"),F=ne.slice(-W.length);if((O.caseSensitive?F:F.toLowerCase())!==W||ne.length-W.length<I.length)continue}d.push({node:O,index:c,skipped:b,statics:S,dynamics:_,optionals:x,extract:R,rawParams:A})}}if(m.optional){const N=b|1<<m.depth+1;for(let O=m.optional.length-1;O>=0;O--){const I=m.optional[O];d.push({node:I,index:v,skipped:N,statics:S,dynamics:_,optionals:x,extract:R,rawParams:A})}if(!C)for(let O=m.optional.length-1;O>=0;O--){const I=m.optional[O],{prefix:W,suffix:ne}=I;if(W||ne){const F=I.caseSensitive?D:z??=D.toLowerCase();if(W&&!F.startsWith(W)||ne&&F.indexOf(ne,F.length-ne.length)<W.length)continue}d.push({node:I,index:v+1,skipped:b,statics:S,dynamics:_,optionals:x+Pu(c,v),extract:R,rawParams:A})}}if(!C&&m.dynamic&&D)for(let N=m.dynamic.length-1;N>=0;N--){const O=m.dynamic[N],{prefix:I,suffix:W}=O;if(I||W){const ne=O.caseSensitive?D:z??=D.toLowerCase();if(I&&!ne.startsWith(I)||W&&ne.indexOf(W,ne.length-W.length)<I.length)continue}d.push({node:O,index:v+1,skipped:b,statics:S,dynamics:_+Pu(c,v),optionals:x,extract:R,rawParams:A})}if(!C&&m.staticInsensitive){const N=m.staticInsensitive.get(z??=D.toLowerCase());N&&d.push({node:N,index:v+1,skipped:b,statics:S+Pu(c,v),dynamics:_,optionals:x,extract:R,rawParams:A})}if(!C&&m.static){const N=m.static.get(D);N&&d.push({node:N,index:v+1,skipped:b,statics:S+Pu(c,v),dynamics:_,optionals:x,extract:R,rawParams:A})}if(m.pathless)for(let N=m.pathless.length-1;N>=0;N--){const O=m.pathless[N];d.push({node:O,index:v,skipped:b,statics:S,dynamics:_,optionals:x,extract:R,rawParams:A})}}if(h)return h;if(s&&f){let g=f.index;for(let v=0;v<f.index;v++)g+=t[v].length;const m=g===e.length?"/":e.slice(g);return f.rawParams??=Object.create(null),f.rawParams["**"]=decodeURIComponent(m),f}return null}function Pu(e,t){return 2**(e-t-1)}function rC(e,t){return e===2**(t-1)-1}function iw(e,t,n){let s,i;try{[s,i]=JS(e,t,n)}catch{return null}if(n.rawParams=s,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(s)===!1)return null}catch{}return!0}function Mu(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===Qs)>(e.node.kind===Qs)||t.node.kind===Qs==(e.node.kind===Qs)&&t.node.depth>e.node.depth))):!0}function sC(){try{return sessionStorage}catch{return}}const aC="tsr-scroll-restoration-v1_3",t1=sC();function iC(){try{return JSON.parse(t1?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Vi=iC(),ow="data-scroll-restoration-id",oC=e=>e.state.__TSR_key||e.href;function lC(e){const t=e.getAttribute(ow);if(t)return`[${ow}="${t}"]`;let n="",s=e,i;for(;i=s.parentNode;){let l=1,c=s;for(;c=c.previousElementSibling;)l++;const d=`${s.localName}:nth-child(${l})`;n=n?`${d} > ${n}`:d,s=i}return n}let Lu=!1;const od="window";function fm(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function lw(e){const t=new Set;for(const n of e){if(n===od)continue;const s=fm(n);s&&t.add(s)}return t}function cC(e,t){const n=e.options.scrollRestoration,s=e._scroll;n&&(s.e=!0);const i=e.options.getScrollRestorationKey||oC,l=new Set,c=d=>{const f=Vi[d]||={};for(const h of l)h===document?f[od]={scrollX,scrollY}:h.isConnected&&(f[lC(h)]={scrollX:h.scrollLeft,scrollY:h.scrollTop})};n&&!s.s&&(s.s=!0,Lu=!1,history.scrollRestoration="manual",document.addEventListener("scroll",d=>{Lu||l.add(d.target)},!0),e.subscribe("onBeforeLoad",d=>{d.fromLocation&&c(i(d.fromLocation)),l.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",c(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{t1?.setItem(aC,JSON.stringify(Vi))}catch{}}),addEventListener("pageshow",d=>{d.persisted&&(history.scrollRestoration="manual")})),!s.r&&(s.r=!0,e.subscribe("onRendered",d=>{const f=e.options.scrollRestorationBehavior,h=e.options.scrollToTopSelectors,g=s.n,m=s.h;let v;
10if(l.clear(),s.n=!0,s.h=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const b=i(d.toLocation),S=d.fromLocation&&i(d.fromLocation);if(s.e&&S&&S!==b){const _=Vi[S];if(_){let x=Vi[b];for(const R in _){if(R===od){if(g)continue}else{const A=fm(R);if(!A||g&&h&&(v??=lw(h),v.has(A)))continue}x||(x=Vi[b]={}),x[R]??=_[R]}}}Lu=!0;try{const _=d.toLocation.hash,x=d.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(g){!_&&h&&(v??=lw(h));const A=_&&x&&m,C=s.e?Vi[b]:void 0;if(C)for(const D in C){const{scrollX:z,scrollY:N}=C[D];if(D===od){if(A)continue;scrollTo({top:N,left:z,behavior:f}),R=!0}else{const O=fm(D);O&&(O.scrollLeft=z,O.scrollTop=N,v?.delete(O))}}if(!_){const D={top:0,left:0,behavior:f};if(R||scrollTo(D),v)for(const z of v)z.scrollTo(D)}}!R&&_&&x&&document.getElementById(_)?.scrollIntoView(x)}finally{Lu=!1}}))}function n1(e,t=String){let n;for(const s in e){const i=e[s];i!==void 0&&(n||=new URLSearchParams).set(s,t(i))}return n?n.toString():""}function jp(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function uC(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[s,i]of t.entries()){const l=n[s];l==null?n[s]=jp(i):Array.isArray(l)?l.push(jp(i)):n[s]=[l,jp(i)]}return n}const r1=/^(?:\s|["[{\d-]|fa|nu|tr)/,dC=hC(JSON.parse),fC=pC(JSON.stringify,JSON.parse);function hC(e){const t=e===JSON.parse;return n=>{n[0]==="?"&&(n=n.substring(1));const s=uC(n);for(const i in s){const l=s[i];if(typeof l=="string"){if(t&&!r1.test(l))continue;try{s[i]=e(l)}catch{}}}return s}}function pC(e,t){const n=t===JSON.parse;function s(i){if(i&&typeof i=="object")try{return e(i)}catch{}else if(t&&typeof i=="string"){if(n&&!r1.test(i))return i;try{return t(i),e(i)}catch{}}return i}return i=>{const l=n1(i,s);return l?`?${l}`:""}}const fo="__root__";function mC(e,t,n){const s=QS(e),i=`/${s}`,l=t?i:i.toLowerCase(),c=`${l}/`,d={input:({url:f})=>{const h=t?f.pathname:f.pathname.toLowerCase();return h===l?f.pathname="/":h.startsWith(c)&&(f.pathname=f.pathname.slice(i.length)),f},output:({url:f})=>(f.pathname=uo(`/${s}${f.pathname}`),f)};return n?{input:({url:f})=>hm(n,d.input({url:f})),output:({url:f})=>d.output({url:s1(n,f)})}:d}function hm(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function s1(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function gC(e,t){const{createMutableStore:n,createReadonlyStore:s,batch:i}=t,l=new Map,c=n("idle"),d=n(e),f=n(void 0),h=n([]),g=s(()=>h.get().map(_=>l.get(_).get())),m=s(()=>({status:c.get(),isLoading:c.get()==="pending",matches:g.get(),location:d.get(),resolvedLocation:f.get()}));function v(_){let x=l.get(_);return x||(x=n(void 0),l.set(_,x)),x}const b={status:c,location:d,resolvedLocation:f,ids:h,matches:g,byRoute:l,__store:m,getMatchStore:v,setMatches:S};function S(_){const x=h.get(),R=_.map(A=>A.routeId);i(()=>{FA(x,R)||h.set(R);for(const A of x)R.includes(A)||l.get(A).set(()=>{});for(const A of _){const C=v(A.routeId);C.get()!==A&&C.set(A)}})}return b}var ea="__TSR_index",cw="popstate",uw="beforeunload",yC=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function ld(e){const t=yC.exec(e);return t?"/"+e.slice(t[0].length):e}function a1(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,t=>`	
11\r`.includes(t)?"":encodeURIComponent(t))),ld(e)}function vC(e){let t=e.getLocation();const n=new Set,s=c=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:c}))},i=c=>{e.notifyOnIndexChange??!0?s(c):t=e.getLocation()},l=async({task:c,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){c();return}const h=e.getBlockers?.()??[],g=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&h.length&&g)for(const m of h){const v=Sd(f.path,f.state);if(await m.blockerFn({currentLocation:t,nextLocation:v,action:f.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,d,f)=>{const h=t.state[ea];d=dw(h+1,d),l({task:()=>{e.pushState(c,d),s({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:c,state:d})},replace:(c,d,f)=>{const h=t.state[ea];d=dw(h,d),l({task:()=>{e.replaceState(c,d),s({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:c,state:d})},go:(c,d)=>
11{l({task:()=>{e.go(c,d?.ignoreBlocker??!1),i({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{l({task:()=>{e.back(c?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{l({task:()=>{e.forward(c?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[ea]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,c]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s,_getBlockers:()=>e.getBlockers?.()??[]}}function dw(e,t){const n=og();return{...t,key:n,__TSR_key:n,[ea]:e}}function bC(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,s=t.history.replaceState;let i=[];const l=()=>i,c=O=>i=O,d=O=>a1(O),f=(()=>Sd(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const O=og();t.history.replaceState({[ea]:0,key:O,__TSR_key:O},"")}let h=f(),g,m=!1,v=!1,b=!1,S=!1;const _=()=>h;let x;const R=()=>{x&&(N._ignoreSubscribers=!0,(x[2]?t.history.pushState:t.history.replaceState)(x[1],"",x[0]),N._ignoreSubscribers=!1,x=void 0,g=void 0)},A=(O,I,W)=>{const ne=!!x;ne||(g=h),h=Sd(I,W),x=[h.href,W,x?.[2]||O],ne||queueMicrotask(()=>R())},C=O=>{h=f(),N.notify({type:O})},D=async()=>{if(S=!1,v){v=!1;return}const O=f(),I=O.state[ea]-h.state[ea],W=I===1,ne=I===-1,F=!W&&!ne||m;m=!1;const V=F?"GO":ne?"BACK":"FORWARD",ee=F?{type:"GO",index:I}:{type:ne?"BACK":"FORWARD"};if(b)b=!1;else{const le=l();if(typeof document<"u"&&le.length){for(const oe of le)if(await oe.blockerFn({currentLocation:h,nextLocation:O,action:V})){v=!0,t.history.go(-I),N.notify(ee);return}}}h=f(),N.notify(ee)},z=O=>{if(S){S=!1;return}let I=!1;const W=l();if(typeof document<"u"&&W.length)for(const ne of W){const F=ne.enableBeforeUnload??!0;if(F===!0){I=!0;break}if(typeof F=="function"&&F()===!0){I=!0;break}}if(I)return O.preventDefault(),O.returnValue=""},N=vC({getLocation:_,getLength:()=>t.history.length,pushState:(O,I)=>A(!0,O,I),replaceState:(O,I)=>A(!1,O,I),back:O=>(O&&(b=!0,S=!0),t.history.back()),forward:O=>{O&&(b=!0,S=!0),t.history.forward()},go:(O,I)=>{m=!0,I&&(b=!0,S=!0),t.history.go(O)},createHref:O=>d(O),flush:R,destroy:()=>{t.history.pushState=n,t.history.replaceState=s,t.removeEventListener(uw,z,{capture:!0}),t.removeEventListener(cw,D)},onBlocked:()=>{g&&h!==g&&(h=g)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return N._ignoreNextBeforeUnload=O=>{S=!1;try{O=new URL(O,t.document.baseURI).href,S=/^https?:/.test(O)&&(!O.includes("#")||O.split("#")[0]!==t.location.href.split("#")[0])}catch{}},t.addEventListener(uw,z,{capture:!0}),t.addEventListener(cw,D),t.history.pushState=function(...O){const I=n.apply(t.history,O);return N._ignoreSubscribers||C("PUSH"),I},t.history.replaceState=function(...O){const I=s.apply(t.history,O);return N._ignoreSubscribers||C("REPLACE"),I},N}function Sd(e,t){const n=a1(e),s=n.indexOf("#"),i=n.indexOf("?");if(!t){const l=og();t={[ea]:0,key:l,__TSR_key:l}}return{href:n,pathname:n.substring(0,s>0?i>0?Math.min(s,i):s:i>0?i:n.length),hash:s>-1?n.substring(s):"",search:i>-1?n.slice(i,s===-1?void 0:s):"",state:t}}function og(){return(Math.random()+1).toString(36).substring(7)}function Dp(e,t){return e.protocol!=="http:"&&e.protocol!=="https:"||e.origin!==t||!!e.username||!!e.password}function Pp(e){return e.pathname+e.search+e.hash}function fw(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function wC(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Kd(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function hw({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:s,...i}){return i}function i1(e){return e.findIndex(t=>t.status==="error"||t.status==="notFound"||t._notFound)+1}function _C(e,t,n,s,i,l){s&&(t=t.slice(0,s)),i&&(n=n.slice(0,i));for(const c of t){if(l&&e._tx!==l)return;n.some(d=>d.routeId===c.routeId)||e.routesById[c.routeId].options.onLeave?.(c)}for(const c of n){if(l&&e._tx!==l)return;e.routesById[c.routeId].options[t.some(d=>d.routeId===c.routeId)?"onStay":"onEnter"]?.(c)}}var SC=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async n=>(n(),!1),this.update=n=>{const s=this.options;this.options={...s,...n},this.isServer=this.options.isServer??tw??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=b
11C()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const i=this.options.basepath??"/",l=this.options.rewrite,c=this.basepath!==i||s?.rewrite!==l||s?.caseSensitive!==this.options.caseSensitive;if(c&&(this.basepath=i,this.rewrite=i!=="/"&&QS(i)?mC(i,this.options.caseSensitive,l):l),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||tw){this.routeTree=this.options.routeTree;let d;d=this.buildRouteTree(),this.setRoutes(d)}if(this.stores)c&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=gC(this.latestLocation,d),cC(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=eC(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&QA(this.options.routeMasks,n.processedTree),{...n,resolvePathCache:_d(1e3)}},this.subscribe=(n,s)=>{const i={eventType:n,fn:s};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{for(const s of this.subscribers)if(s.eventType===n.type)try{s.fn(n)}catch(i){console.error(i)}},this.parseLocation=(n,s)=>{const i=({pathname:f,search:h,hash:g,href:m},v)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const x=this.options.parseSearch(h),R=this.options.stringifySearch(x);return{href:f+R+g,publicHref:f+R+g,pathname:kl(f),external:!1,searchStr:R,search:Fi(s?.search,x),hash:kl(g.slice(1)),state:Js(s?.state,v)}}const b=hm(this.rewrite,new URL(m,this.origin)),S=this.options.parseSearch(b.search),_=this.options.stringifySearch(S);return b.search=_,{href:b.href.replace(b.origin,""),publicHref:m,pathname:kl(ld(b.pathname)),external:!!this.rewrite&&Dp(b,this.origin),searchStr:_,search:Fi(s?.search,S),hash:kl(b.hash.slice(1)),state:Js(s?.state,v)}},l=i(n,n.state),{__tempLocation:c,__tempKey:d}=l.state;if(c&&(!d||d===this.tempLocationKey)){const f=i(c,{...c.state,__tempLocation:void 0,key:l.state.key,__TSR_key:l.state.__TSR_key});return f.maskedLocation=l,f}return l},this.matchRoutes=(n,s,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:s},i):this.matchRoutesInternal(n,s),this.getMatchedRoutes=n=>{const s=Object.create(null),i=JA(Er(n),this.processedTree,!0);return i&&Object.assign(s,i.rawParams),[i?.branch||[this.routesById.__root__],s,i?.route]},this.buildLocation=n=>{{const c=this.staticLocations.get(n);if(c)return c}let s=!1;const i=(c={})=>{if(c.href){const le=Sd(c.href,{});c={...c,to:hm(this.rewrite,new URL(le.pathname,this.origin)).pathname,search:this.options.parseSearch(le.search),hash:le.hash.slice(1)}}const d=c._fromLocation||this._pendingLocation||this.latestLocation;let f;const h=()=>(s=!0,d),g=()=>(s=!0,f??=this.matchRoutesLightweight(d)),m=c.to?`${c.to}`:".",v=sw(m[0]==="/"?"":c.unsafeRelative==="path"?h().pathname:c.from??g()[1],m,this.options.trailingSlash,this.resolvePathCache),b=this.routesByPath[Er(v)],S=v.includes("$");let _;if(b)_=b._branch??=e1(b);else if(S)_=[];else{const[le,oe,M]=this.getMatchedRoutes(v);_=le,this.options.notFoundRoute&&(!M||M.path!=="/"&&oe["**"])&&(_=[..._,this.options.notFoundRoute])}const x=S?b?._interpolation??Gl(!1,{fullPath:v},0):void 0;let R;for(const le of _){const oe=le.options.params?.stringify??le.options.stringifyParams;if(oe){const M=g()[3];if(R??=Mp(c.params,M),!GS(R))break;R===M&&(R=Object.assign(id(),R));try{Object.assign(R,oe(R))}catch{}}}R??=Mp(c.params,EC(c.params,x)?g()[3]:Lp);const A=n.leaveParams?v:ld(kl(x?aw(v,x,R,this.pathParamsDecoder):v)),C=RC(_,n._includeValidateSearch),D=()=>{let le=g()[2];if(n._includeValidateSearch&&this.options.search?.strict){const oe={};_.forEach(M=>{if(M.options.validateSearch)try{Object.assign(oe,cd(M.options.validateSearch,{...oe,...le}))}catch{}}),le=oe}return le},z=C.length?TC(C,D(),c):c.search===!0?D():typeof c.search=="function"?c.search(D()):c.search||Lp,N=this.options.stringifySearch(z),O=c.hash===!0?h().hash:typeof c.hash=="function"?c.hash(h().hash):c.hash||void 0,I=O?`#${O}`:"",W=c.state?c.state===!0?h().state:typeof c.state=="function"?c.state(h().state):c.state:Lp,ne=`${A}${N}${I}`;let F,V,ee=!1;if(this.rewrite){const le=new URL(ne,this.origin),oe=le.origin,M=s1(this.rewrite,le);
11F=Pp(le),Dp(M,oe)?(V=M.href,ee=!0):V=ld(Pp(M))}else F=qA(ne),V=F;return{publicHref:V,href:F,pathname:A,search:z,searchStr:N,state:W,hash:O??"",external:ee,unmaskOnReload:c.unmaskOnReload}},l=i(n);if(n.mask)l.maskedLocation=i({from:n.from,...n.mask});else if(this.options.routeMasks){const c=ZA(l.pathname,this.processedTree);if(c){const d=Object.assign(id(),c.rawParams),{from:f,params:h,...g}=c.route,m=Mp(h,d);l.maskedLocation=i({from:n.from,...g,params:m})}}return!s&&n._fromLocation&&!l.maskedLocation&&this.staticLocations.set(n,l),l},this.commitLocation=async({viewTransition:n,ignoreBlocker:s,...i})=>{const l=i.maskedLocation??i;if(l.external)return pw(this,l.publicHref,{replace:i.replace,ignoreBlocker:s});let c;const d=Er(this.latestLocation.href)===Er(i.href)&&or(hw(i.state),hw(this.latestLocation.state)),f=this._commitPromise;let h;const g=new Promise(m=>{h=m});if(g.resolve=()=>{h(),f?.resolve()},this._commitPromise=g,d)this.load();else{let{maskedLocation:m,hashScrollIntoView:v,...b}=i;m&&(b={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...b,search:b.searchStr,state:{...b.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(b.unmaskOnReload??this.options.unmaskOnReload??!1)&&(b.state.__tempKey=this.tempLocationKey)),b.state={...b.state,__hashScrollIntoViewOptions:v??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=n,c=i.replace?"REPLACE":"PUSH",this.history[c==="REPLACE"?"replace":"push"](b.publicHref,b.state,{ignoreBlocker:s}),this.history.subscribers.size||this.load({action:{type:c}})}return this._scroll.n=i.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:n,resetScroll:s,hashScrollIntoView:i,viewTransition:l,ignoreBlocker:c,...d}={})=>{const f=this.buildLocation({...d,_includeValidateSearch:!0});this._pendingLocation=f;const h=this.commitLocation({...f,viewTransition:l,replace:n,resetScroll:s,hashScrollIntoView:i,ignoreBlocker:c});return queueMicrotask(()=>{this._pendingLocation===f&&(this._pendingLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:s,href:i,publicHref:l,...c})=>{const d=i?Fl(i):void 0;if(d||s){if(n!==void 0||!i){const h=this.buildLocation({to:n,...c}),g=h.maskedLocation??h;i??=g.publicHref,l??=g.publicHref}return pw(this,!d&&l?l:i,c)}return this.buildAndCommitLocation({...c,href:i,to:n,_isNavigate:!0})},this.load=async n=>{this.updateLatestLocation(),n?.action&&(this._scroll.h=n.action.type==="PUSH"||n.action.type==="REPLACE"),await PC(this,n)},this.startViewTransition=n=>
11{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document.startViewTransition=="function"){let i;if(typeof s=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const l=this.latestLocation,c=this.stores.resolvedLocation.get(),d=typeof s.types=="function"?s.types(Kd(l,c)):s.types;if(d===!1)return n();i={update:n,types:d}}else i=n;return document.startViewTransition(i).updateCallbackDone}return n()},this.invalidate=n=>{const s=this._committed,i=n?.filter,l=this._preloads,c=new Set,d=g=>{(!i||i(g))&&c.add(g.id)};s.forEach(d),this._cache.forEach(d),l?.forEach(g=>g.forEach(d)),this._tx?.[3].forEach(d);const f=[];for(const[g,m]of l??[])m.some(v=>c.has(v.id))&&(l.delete(g),f.push(g));const h=g=>{if(c.has(g.id)){const m=this.routesById[g.routeId],v={...g,invalid:!0,...(n?.forcePending||g.status==="error"||g.status==="notFound")&&fw(m)?{status:"pending",error:void 0}:void 0};return g._flight=void 0,v}return g};this._committed=s.map(h);for(const[g,m]of this._cache)c.has(g)&&(m.invalid=!0,n?.forcePending&&(m.status="pending"));for(const g of c){const m=this._flights?.get(g);this._flights?.delete(g),m&&!m[2]&&f.push(m[1])}for(const g of f)g.abort();return this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{const s=n.options;let i=n.headers.get("Location")||s.href;if(!i){const c=this.buildLocation(s);i=(c.maskedLocation??c).publicHref||"/"}let l;if(KS.test(i)||(l=Fl(i))&&!this.protocolAllowlist.has(l))throw new Error("Redirect blocked: unsafe protocol");if(l==="http:"||l==="https:"){const c=new URL(i);c.pathname.startsWith("//")?i=c.href:Dp(c,this.origin)||(i=Pp(c),l=void 0)}return l&&(s.reloadDocument=!0),s.href=i,n.headers.set("Location",i),n},this.clearCache=n=>{const s=this._cache,i=this._preloads,l=n?.filter,c=[],d=[];for(const[h,g]of s)(!l||l(g))&&(d.push(h),c.push(g));const f=[];for(const[h,g]of i??[])(!l||g.some(l))&&(f.push(h),c.push(...g));for(const h of d)s.delete(h);for(const h of f)i.delete(h);for(const h of c){const g=h._flight;h._flight=void 0,g&&!--g[2]&&(this._flights?.get(h.id)===g&&this._flights.delete(h.id),f.push(g[1]))}for(const h of f)h.abort()},this.loadRouteChunk=as,this.preloadRoute=n=>MC(this,n),this.matchRoute=(n,s)=>{const i={...n,to:n.to?sw(n.from||"",n.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(i),c=this.stores.status.get()==="pending";if(s?.pending&&!c)return!1;const d=s?.pending??!c?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),f=XA(l.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!or(f.rawParams,n.params,!0)?!1:s?.includeSearch??!0?or(d.search,l.search,!0)?f.rawParams:!1:f.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=VA(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??fC,parseSearch:e.parseSearch??dC,protocolAllowlist:e.protocolAllowlist??zA}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Gl(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){const[n,s,i]=this.getMatchedRoutes(e.pathname);let l=n,c=!1;(i?i.path!=="/"&&s["**"]:Er(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:c=!0);const d=c?kC(this.options.notFoundMode,l):void 0,f=new Array(l.length),h=this._committed,g=(v,b)=>{const S=h[b];return S?.routeId===v.id?S:v===this.options.notFoundRoute?h.find(_=>_.routeId===v.id):void 0};let m;for(let v=0;v<l.length;v++){const b=l[v],S=f[v-1];let _,x,R;{const ee=S?.search??e.search,le=S?._strictSearch??void 0;try{const oe=cd(b.options.validateSearch,{...ee})??void 0;_={...ee,...oe},x={...le,...oe}}catch(oe){let M=oe;if(oe instanceof xd||(M=new xd(oe.message,{cause:oe})),t?.throwOnError)throw M;_=ee,x={},R=M}}let A="",C="";try{A=b.options.loaderDeps?.({search:_})??"",C=A&&JSON.stringify(A)||""}catch(ee){if(t?.throwOnError)throw ee;R??=ee}const D=id(),z=b._interpolation?aw(b.fullPath,b._interpolation,s,this.pathParamsDecoder,D):b.fullPath,N=b.id+z+C,O=g(b,v),I=this._cache.get(N)??(O?.
11id===N?O:void 0);m=I?._strictParams??Object.assign(D,m);let W;if(!I)try{mw(b,m)}catch(ee){if(Ya(ee)||ql(ee)?W=ee:W=new xC(ee.message,{cause:ee}),t?.throwOnError)throw W}const ne=O?"stay":"enter";let F;if(I)F={...I,cause:ne,search:Fi(O?O.search:I.search,_),_strictSearch:x,searchError:R};else{const ee=fw(b)?"pending":"success";F={id:N,ssr:b.options.ssr,index:v,routeId:b.id,params:O?.params??m,_strictParams:m,pathname:z,updatedAt:Date.now(),search:O?Fi(O.search,_):_,_strictSearch:x,searchError:R,status:ee,isFetching:!1,error:void 0,paramsError:W,context:{},abortController:t?._controller??new AbortController,cause:ne,loaderDeps:O?Js(O.loaderDeps,A):A,invalid:!1,preload:!1,staticData:b.options.staticData||{},fullPath:b.fullPath}}const V=d===b.id;F._notFound&&!V&&(F.error=void 0),F._notFound=V,f[v]=F}for(let v=0;v<f.length;v++){const b=f[v];b.params=b.cause==="stay"?Fi(b.params,m):m,t?._controller&&(b.context={})}return f}matchRoutesLightweight(e){const t=ra(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,s=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===s)return i[1];const[l,c]=this.getMatchedRoutes(e.pathname),d=ra(l),f={...e.search};for(const v of l)try{Object.assign(f,cd(v.options.validateSearch,f))}catch{}const h=n&&n.routeId===d.id&&n.pathname===e.pathname;let g;if(h)g=n.params;else{const v=c;for(const b of l)try{mw(b,v)}catch{}g=v}const m=[l,d.fullPath,f,g];return this.lightweightCache.set(e,[s,m]),m}};async function pw(e,t,{replace:n,ignoreBlocker:s}){if(!YS(t,e.protocolAllowlist)){if(!s){const i=e.history._getBlockers();for(const l of i)if(l?.blockerFn&&await l.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?"REPLACE":"PUSH"}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var xd=class extends Error{},xC=class extends Error{};function cd(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new xd("Async validation not supported");if(n.issues)throw new xd(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Mp(e,t){if(e===void 0||e===!0)return t;const n=Object.create(null);return e===!1||e===null?n:typeof e=="function"?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function EC(e,t){return typeof e=="function"?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(n=>typeof n!="string"&&!ag.call(e,n[1]))}const Lp=Object.freeze({});function RC(e,t){const n=[];for(let s=0;s<e.length;s++){const i=e[s].options;if("search"in i)i.search?.middlewares&&n.push(...i.search.middlewares);else if(i.preSearchFilters||i.postSearchFilters){const c=({search:d,next:f})=>{const h=f(i.preSearchFilters?i.preSearchFilters.reduce((g,m)=>m(g),d):d);return i.postSearchFilters?i.postSearchFilters.reduce((g,m)=>m(g),h):h};n.push(c)}const l=i.validateSearch;if(t&&l){const c=({search:d,next:f,meta:h})=>{const g=f(d);try{const m=cd(l,g);if(h&&m)for(const v in m)v in g||(h.defaulted||=new Map).set(v,m[v]);return{...g,...m}}catch{}return g};n.push(c)}}return n}function TC(e,t,n){const s=(i,l,c)=>{if(i>=e.length){if(!n.search)return{};if(n.search===!0)return l;const f=VS(n.search,l);return c&&(c.explicit=f),f}const d=(f,h)=>{if(h){const g=c||{};return{search:s(i+1,f,g),meta:g}}return s(i+1,f,c)};return e[i]({search:l,next:d,meta:c})};return s(0,t)}function kC(e,t){if(e!=="root"){let n;for(let s=t.length-1;s>=0;s--){const i=t[s];if(i.options.notFoundComponent)return i.id;n||=i.children&&i.id}if(n)return n}return fo}function mw(e,t){const n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function pm(e,t){return e.options[t]?.preload?.()}function AC(e,t){const n=pm(e,"component");let s=pm(e,"pendingComponent");return t&&(s?s=s.then(t):t()),n&&s?Promise.all([n,s]).then(()=>{}):n??s}function as(e,t,n){const s=()=>t===!1?void 0:t?pm(e,t):AC(e,n),i=e._lazy;if(i)return i===!0?s():i.then(s);if(!e.lazyFn)return s();const l=e.lazyFn().then(c=>{{const{id:d,...f}=c.options;Object.assign(e.options,f),e._lazy=!0}},c=>{throw e._lazy=void 0,c});return e._lazy=l,l.then(s)}function lg(e){const t=e.findIndex(n=>n.status!=="success"||n._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function o1(e){let t=e.length;for(let n=0;n<t;n++){const s=e[n];if(s._assetEnd!==void 0){t=Math.min(t,Math.max(n+1,s._assetEnd));continue}if(s.status!=="success"||s._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}const kr=0,is=1,Yd=2,tn=3,sa=[4];function Kl(e){return typeof e[0]=="number"}function os(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,s)=>{const i=()=>s(t);t.addEventListener("abort",i,{once:!0}),Promise.resolve(e).then(n,s).then(()=>t.removeEventListener("abort",i))})}function ar(e,t){return e.routesById[t.routeId]}function Yl(e,t,n){return ql(e)?[tn,e]:Ya(e)?(e.routeId||=n,[Yd,e]):t?(typeof e?.then=="function"&&(e=new Error("A Promise was thrown",{c
11ause:e})),[is,e]):[kr,e]}function cg(e,t){let n=Yl(t,!0,e.id);if(n[0]!==is)return n;try{e.options.onError?.(n[1])}catch(s){n=Yl(s,!0,e.id)}return n}function Il(e,t,n,s,i){return i[0].signal.aborted?sa:fg(e,t,n,cg(n,s),i)}async function CC(e,t,n,s,i,l){const[c,d]=t,f=n[0].signal,h=!!n[3];for(let g=n[6]??0;g<s;g++){const m=d[g],v=ar(e,m);m.abortController=n[0];const b=d[g-1]?.context??e.options.context??{},S={params:m.params,location:c,navigate:A=>e.navigate({...A,_fromLocation:c}),buildLocation:e.buildLocation,cause:h?"preload":m.cause,abortController:n[0],preload:h,matches:d,routeId:v.id};try{const A=m._ctx||=v.options.context?v.options.context({...S,deps:m.loaderDeps,context:b})||{}:void 0;m.context={...b,...A}}catch(A){return ss(e,m),[g,Il(e,t,v,A,n)]}if(f.aborted)return[g,sa];const _=m.paramsError??m.searchError;if(_!==void 0)return ss(e,m),[g,Il(e,t,v,_,n)];const x=v.options.beforeLoad;if(!x)continue;const R=m.status;g>=l&&(m.status="pending",n[7]?.());try{Wl(e,m,"beforeLoad",n[0]);const A=x({...S,search:m.search,context:m.context,...e.options.additionalContext}),C=await(typeof A?.then=="function"?os(A,f):A);if(f.aborted)return[g,sa];const D=fg(e,t,v,Yl(C,!1,v.id),n);if(D[0]!==kr)return ss(e,m),[g,D];m.context={...m.context,...C}}catch(A){return ss(e,m),[g,Il(e,t,v,A,n)]}finally{m.status=R,Wl(e,m,!1,n[0])}}i()}function ug(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(t)&&s[3].some(i=>i.id===t.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(t.id)}return n[1]}}function ss(e,t){const n=t._flight;t._flight=void 0,ug(e,t,n)?.abort()}function Qt(e,t,n,s){const i=[];for(const l of t)if(!n?.includes(l)){const c=l._flight;if(l._flight=void 0,s&&c?.[2]===1&&e._flights?.get(l.id)===c&&n?.some(d=>d.id===l.id))c[2]=0;else{const d=ug(e,l,c);d&&i.push(d)}}for(const l of i)l.abort()}function dg(e){for(const t of e){const n=t._flight;n&&n[2]++}}function Wl(e,t,n,s){if(t.isFetching=n,s&&e._tx?.[0]!==s)return;const i=e.stores.byRoute.get(t.routeId),l=i?.get();l?.id===t.id&&i.set({...l,isFetching:n})}function l1(e,t,n,s,i,l,c){const d=t[0];return{params:n.params,location:d,navigate:f=>e.navigate({...f,_fromLocation:d}),cause:c?"preload":n.cause,abortController:i,preload:c,deps:n.loaderDeps,parentMatchPromise:l,context:n.context,route:s,...e.options.additionalContext}}async function gw(e,t,n,s,i,l,c){const d=c[0],f=d.signal;if(f.aborted)return sa;if(!i)return[kr,void 0];let h=n._flight;Wl(e,n,"loader",d);try{if(!h){const g=new AbortController;h=[Promise.resolve().then(()=>i(l1(e,t,n,s,g,l,!!c[3]))).then(m=>Yl(m,!1,s.id),m=>Yl(m,!0,s.id)).then(m=>(m[0]!==kr&&e._flights?.get(n.id)===h&&(e._flights.delete(n.id),h[2]||g.abort()),m[0]===is&&h[2]?cg(s,m[1]):m)),g,1],(e._flights??=new Map).set(n.id,h)}return n._flight=h,n.abortController=h[1],fg(e,t,s,await os(h[0],f),c)}catch(g){if(g!==f||!f.aborted)throw g;return ss(e,n),sa}finally{Wl(e,n,!1,d)}}function yw(e,t,n){t[0]!==tn&&(e.status="success",e.error=void 0,t[0]===kr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function c1(e,t,n){const s=e._cache.get(t.id);if(s!==n||e._committed.some(l=>l.id===t.id&&l._flight===t._flight))return;const i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),s&&ss(e,s)}function vw(e,t){return t[0]===is||t[0]===Yd?{...e,status:t[0]===is?"error":"notFound",error:t[1],_flight:void 0}:e}function OC(e,t,n,s,i,l,c){const d=t[1][n],f=ar(e,d),h=!!l[3],g=e._cache.get(d.id);let m,v=!1,b;try{if(d.status==="success"&&(m=f.options.shouldReload,typeof m=="function"&&(m=m(l1(e,t,d,f,l[0],i,h))),l[0].signal.aborted&&(b=sa)),!b)if(d.status!=="success")v=!0;else{const V=h||d.preload?f.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:f.options.staleTime??e.options.defaultStaleTime??0;v=!!(d.invalid||m||m===void 0&&Date.now()-d.updatedAt>=V&&(l[5]||d.cause==="enter"||l[2].some(ee=>ee.routeId===d.routeId&&ee.id!==d.id)))}}catch(V){d.invalid=!0,ss(e,d),b=Il(e,t,f,V,l)}const S=f.options.loader,_=typeof S=="function",x=_?S:S?.handler,R=!h||f.options.preload!==!1;let A=R&&S?e._flights?.get(d.id):void 0;A===d._flight||b?A=void 0:A&&!v&&!h&&m===void 0?v=!0:v||(A=void 0);const C=!!(S&&v&&d.status==="success"&&!h&&!l[4]&&((_?void 0:S.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),D=v&&R,z=D&&!C&&(d.status!=="success"||!!S),N=n>=c?l[7]:void 0,O=f.lazyFn&&f._lazy!==!0?N:void 0;
11if(D&&!S&&(d.invalid=!1,d.updatedAt=Date.now()),A&&A[2]++,z){const V=d._flight;d._flight=A,ug(e,d,V)?.abort(),n>=c&&(d.status="pending"),N?.()}D||(d.isFetching=!1);const I=!b&&z?gw(e,t,d,f,x,i,l).then(V=>(yw(d,V,h),V[0]===kr&&(S&&!l[0].signal.aborted&&c1(e,d,g),n>=c&&(d.status="pending")),V)):Promise.resolve(b??[kr,d.loaderData]),W=(async()=>{try{const ee=as(f,void 0,O);ee&&await os(ee,l[0].signal)}catch(ee){if(!t[1].some((le,oe)=>oe<=n&&(le.status==="error"||le.status==="notFound"||le._notFound)))return[n,Il(e,t,f,ee,l)]}const V=await I;z&&V[0]===kr&&d.status==="pending"&&!l[0].signal.aborted&&(d.status="success",N?.())})();if(s.push([n,I,W]),!C)return I.then(V=>vw(d,V));const ne={...d,status:"pending",preload:!1,_flight:A};d.invalid=!1,d.isFetching="loader";const F=gw(e,t,ne,f,x,i,l).then(V=>(d.isFetching=!1,yw(ne,V,!1),V));return(t[2]??=[]).push([n,F,W,ne]),F.then(V=>vw(ne,V))}async function mm(e,t,n,s,i=0){const l=n?.[1][1];let c=l?.routeId?t.findIndex(d=>d.routeId===l.routeId):n?.[0]??t.length-1;c<0&&(c=0);for(let d=c;d>=0;d--){const f=ar(e,t[d]);try{const h=as(f,!1);h&&await os(h,s)}catch(h){if(h===s&&s.aborted)throw h}if(f.options.notFoundComponent)return d}return l?.routeId?c:i}function Ka(e,t){t[2]&&(Qt(e,t[2].map(n=>n[3])),t[2]=void 0)}async function bw(e,t,n,s){let i;try{await Promise.all(e.map(l=>l[1].then(async c=>{const d=l[0];if(!(s&&d>=await s)){if(c[0]>=tn)throw[d,c];!i&&c[0]!==kr&&(i=[d,c],await Promise.all((n??[]).map(f=>{if(!(f[0]<=d))return f[1].then(h=>{if(h[0]===tn)throw[f[0],h]})})))}})))}catch(l){return l}return t??i}function fg(e,t,n,s,i,l){for(;s[0]===tn;){const c=s[1],d=c.options;try{if((d.href||c.headers.has("Location"))&&(e.resolveRedirect(c),d.reloadDocument)||(d.reloadDocument?i[3]:i[1]>=20))return s;const f=e.buildLocation({...d,_fromLocation:t[0],_includeValidateSearch:!0}),h=f.maskedLocation??f;if(h.external){const g=c.clone();return g.options={...d},g.headers.set("Location",h.publicHref),e.resolveRedirect(g),i[3]?[tn,g]:[tn,g,h]}return[tn,c,f]}catch(f){s=l?[is,f]:cg(n,f),l=!0}}return s}async function u1(e,t,n,s,i,l){const c=t[1];let d=await i,f=!1;const h=c.findIndex(b=>b._notFound),g=b=>b[1][0]===Yd?mm(e,c,b,s.signal):b[0];let m=h<0?c.length:h;if((d?.[1][0]??0)>=tn)m=0;else if(d){m=d[2]??=await g(d);for(const b of n){if(b[0]>=m)break;const S=await b[1];if(S[0]!==kr&&S[0]<tn&&!("loaderData"in c[b[0]])){d=[b[0],S],m=d[2]=await g(d);break}}}for(const b of n){if(b[0]>=m)break;const S=await b[2];if(S){d=S;break}}if((d?.[1][0]??0)>=tn){const b=d[1];if(b[0]!==tn||b[1].options.reloadDocument||b[2])return Ka(e,t),b;f=!0,d=[0,[is,new Error("Too many redirects")]]}const v=d?d[2]??await g(d):h;if(v>=0){const b=d?.[1],S=b?.[0],_=c[v],x=b?.[1],R=()=>{b&&(_._notFound=void 0,S===is?_.status="error":(x.routeId=_.routeId,_.routeId===e.routeTree.id?(_.status="success",_._notFound=!0):_.status="notFound"),_.error=x,_.isFetching=!1)};R(),b||l?.();const A=ar(e,_);try{await os(b?Promise.resolve().then(()=>as(A,S===is?"errorComponent":"notFoundComponent")):Promise.all([as(A),as(A,"notFoundComponent")]),s.signal)}catch(C){if(C===s.signal&&s.signal.aborted)return Ka(e,t),sa}b?f&&(s.abort(),await Promise.all([...n.map(C=>C[1]),...n.map(C=>C[2]),...(t[2]??[]).map(C=>C[1])]),Ka(e,t),Qt(e,c),R()):_.status="success"}return t}async function hg(e,t,n,s=0,i=t[1].length){const l=t[1];for(let c=s;c<i;c++){const d=l[c],f=ar(e,d).options;if(f.head||f.scripts)try{const h={ssr:e.options.ssr,matches:l,match:d,params:d.params,loaderData:d.loaderData},[g,m]=await os(Promise.all([f.head?.(h),f.scripts?.(h)]),n);d.meta=g?.meta,d.links=g?.links,d.headScripts=g?.scripts,d.styles=g?.styles,d.scripts=m}catch(h){if(h===n&&n.aborted)break;console.error(h)}if(d.status!=="success"||d._notFound)break}return t}async function d1(e,t,n,s){const i=[t,n],l=s[0].signal;let c;try{const d=e.stores.matches.get();let f=n.findIndex(R=>R._notFound);if(e.options.notFoundMode!=="root"&&f>=0){const R=await mm(e,n,void 0,l,f);n[f]._notFound=void 0,n[R]._notFound=!0,f=R}let h=f<0?n.length:f+1,g=0;for(;g<h&&g!==f;){const R=n[g],A=s[2][g],C=d[g];if(A?.id!==R.id||A.status!=="success"||R.preload||C?.id!==R.id||C.status!=="success"||(g++,A._notFound||C._notFound))break}
11const m=[],v=s[6]??0;let b=v?Promise.resolve(n[v-1]):void 0;const S=()=>{for(let R=v;R<h&&!l.aborted;R++)b=OC(e,i,R,m,b,s,g)},_=await CC(e,i,s,h,S,g);if(_){if(s[4]=!0,h=_[0],_[1][0]===Yd){const R=await mm(e,n,_,l);_[2]=R,h=Math.min(h,R+1)}else _[1][0]>=tn&&(h=0);S()}if(!l.aborted&&!s[3]){const R=[];for(const[A,C]of e._flights??[])C[2]||(e._flights.delete(A),R.push(C[1]));for(const A of R)A.abort()}const x=u1(e,i,m,s[0],bw(m,_,i[2]),s[7]);i[2]?.length&&(i[3]=bw(i[2],void 0,void 0,x.then(R=>Kl(R)?0:lg(n).length,()=>0))),c=await x}catch(d){if(Ka(e,i),d===l&&l.aborted)return sa;throw d}return Kl(c)?c:hg(e,c,l,s[6]===n.length?s[6]:0)}function gm(e,t){if(e._tx!==t)return;const n=t[3],s=e.stores.matches.get();let i=e._pending;for(let l=0;l<n.length;l++){const c=n[l],d=c.status==="success"&&!c._notFound,f=s[l]?.id===c.id&&s[l]?.status==="pending";if(d&&!f)continue;const h=ar(e,c),g=d||c.invalid?0:h.options.pendingMs??e.options.defaultPendingMs,m=h.options.pendingComponent??e.options.defaultPendingComponent;if(!m||typeof g!="number"||g===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}const v=h.options.pendingMinMs??e.options.defaultPendingMinMs??0;let b=!1;if(i?.[1]===c.id?(b=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,c.id,f?Date.now()+v:t[4]+g,void 0,f||void 0,m]),i[4]&&!b&&i[5]===m)return;if(i[5]=m,!i[4]){clearTimeout(i[3]);const x=i[2]-Date.now();if(x>0){i[3]=setTimeout(()=>gm(e,t),x);return}i[2]=0}const S=n.map(x=>({...x,_flight:void 0}));S[l].status="pending";const _=i[4]=e.startTransition(()=>e.stores.setMatches(S),S).then(x=>(x&&e._pending===i&&i[4]===_&&!i[2]&&(i[2]=Date.now()+v),x));return}}function Al(e,t){const n=e._pending;(e._tx===t||!e._tx?.[3].some(s=>s.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function ww(e,t){const n=e._pending;if(!n)return;clearTimeout(n[3]);const s=n[2]-Date.now();if(!n[4]||s<=0||!lg(t[3]).some(l=>l.id===n[1]))return;let i;try{await os(new Promise(l=>{i=setTimeout(l,s)}),t[0].signal)}catch{}clearTimeout(i)}function f1(e,t){e._committed=t,e.stores.setMatches(t)}function NC(e,t,n,s){const i=e._committed,l=e._lifecycleEnd,c=e._cache;for(const g of n)g.preload=!1,s&&(g._assetEnd=void 0);const d=lg(n).length,f=new Map;{const g=Date.now(),m=new Set;for(let v=0;v<n.length;v++){const b=n[v];(v<d||b.status==="success")&&m.add(b.id)}for(const v of[...i,...c.values()]){if(v.status!=="success"||m.has(v.id))continue;const b=ar(e,v);!b.options.loader||g-v.updatedAt>=(v.preload?b.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:b.options.gcTime??e.options.defaultGcTime??3e5)||f.set(v.id,c.get(v.id)===v?v:{...v,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=f;const h=e._lifecycleEnd=i1(n);f1(e,n),Qt(e,[...c.values(),...i].filter(g=>g._flight&&f.get(g.id)!==g),n),_C(e,i,n,l,h,t)}async function Iu(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function h1(e,t,n){const s=n[1].options,i=n[2];if(!i)return e.navigate({...s,replace:!0,ignoreBlocker:!0});if(s.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;const l=e.commitLocation({...i,viewTransition:s.viewTransition,replace:!0,resetScroll:s.resetScroll,hashScrollIntoView:s.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),l}async function jC(e,t,n,s,i){const l=n.map(f=>({...f}));dg(l);for(const f of s)ss(e,l[f[0]]),l[f[0]]=f[3];const c=[t[2],l];let d;try{d=await u1(e,c,s,t[0],i)}catch(f){throw Qt(e,l),f}if(Kl(d)){Qt(e,l),d[0]===tn&&e._tx===t&&e._committed===n&&await h1(e,t,d);return}if(await hg(e,d,t[0].signal),e._tx!==t||e._committed!==n){Qt(e,l);return}for(const f of l){const h=e._cache.get(f.id);h?._flight&&h._flight===f._flight&&(e._cache.delete(f.id),ss(e,h))}f1(e,l),Qt(e,n,l)}async function DC(e,t,n,s,i,l){const c=await d1(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,l,s]);if(Kl(c)){const m=c[0]===tn&&e._tx===t;if((!m||c[1].options.reloadDocument)&&Al(e,t),Qt(e,t[3]),t[3]=[],!m)return;if(e._tx!==t){Al(e,t);return}await h1(e,t,c);return}const d=c[1];if(e._tx===t&&await ww(e,t),e._tx!==t){Al(e,t),Qt(e,d),Ka(e,c);return}const f=t[2],h=Kd(f,e.stores.resolvedLocation.get()),g=c[2];await e.startViewTransition(async()=>
11{if(e._tx===t&&await ww(e,t),e._tx!==t){Al(e,t),Qt(e,d),Ka(e,c);return}const m=()=>{Al(e,t),NC(e,t,d,l),e._tx===t&&(e.emit({type:"onLoad",...h}),e._tx===t&&e.emit({type:"onBeforeRouteMount",...h}))},v=await e.startTransition(m,d);if(e._tx!==t){Ka(e,c);return}g?.length&&jC(e,t,d,g,c[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(f),e.stores.status.set("idle"),e._tx===t&&e.emit({type:"onResolved",...h}),v&&e._tx===t&&e.emit({type:"onRendered",...h})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function PC(e,t){const n=e._tx,s=e.stores.resolvedLocation.get(),i=s??e.stores.location.get(),l=e.latestLocation,c=e._pendingLocation,d=c?.href===l.href?c._redirects??0:0,f=e._handoff,h=f?.[0](),g=new AbortController,m=e._preflight;if(e._preflight=g,h||f?.[1](),m?.abort(),!g.signal.aborted){const D=Kd(l,s);e.emit({type:"onBeforeNavigate",...D}),g.signal.aborted||e.emit({type:"onBeforeLoad",...D})}if(g.signal.aborted){await Iu(e,n);return}const v=i.href===l.href;let b=g;const S=e.matchRoutes(l,{_controller:g});dg(S);const _=h?f[1](S):void 0;if(_?b=h:h?.abort(),g.signal.aborted){Qt(e,S),await Iu(e,n);return}e._preflight=void 0;let x;const R=()=>DC(e,C,v,()=>gm(e,C),t?.sync,_),A=t?.sync?new Promise(D=>x=D):Promise.resolve().then(R),C=[b,d,l,S,Date.now(),A.then(()=>Iu(e,C))];if(e._tx=C,n){for(const D of e.stores.matches.get()){if(e._tx!==C)break;D.isFetching&&Wl(e,D,!1)}n[0].abort(),Qt(e,n[3],C[3],!0)}if(e._tx!==C){Qt(e,C[3]),C[3]=[],x?.(),await Iu(e,C);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(l)}),(_||!e._committed.length&&S[0]?.status!=="success"&&!S.some(D=>D._notFound))&&gm(e,C),x?.(R()),await C[5]}async function MC(e,t){let n=e.buildLocation(t);for(let s=0;;s++){const i=e._committed,l=new AbortController;let c,d,f;try{try{c=e.matchRoutes(n,{_controller:l}),dg(c),d=(e._preloads??=new Map).set(l,c),f=await d1(e,n,c,[l,s,i,!0])}finally{d&&(d=d.delete(l),Qt(e,c)),l.abort()}if(!Kl(f))return f[1];if(!d||f.length<3)return;n=f[2]}catch(h){Ya(h)||console.error(h);return}}}async function LC(e){const t=window.$_TSR,n=e.options.serializationAdapters;n?.length&&(t.t=new Map(n.map(F=>[F.key,F.fromSerializable])),t.buffer.forEach(F=>F())),t.initialized=!0;const s=t.router;e.ssr={manifest:s.manifest},e.options.ssr={nonce:document.querySelector('meta[property="csp-nonce"]')?.content};const i=s.matches,l=new AbortController,c=e._preflight;e._preflight=l,c?.abort();const d=()=>e._preflight===l;let f,h,g,m;try{if(await os(e.options.hydrate?.(s.dehydratedData),l.signal),!d())return;const F=e.history.location;g=F.href,m=F.state,e.updateLatestLocation(),f=e.latestLocation,e.stores.location.set(f),h=e.matchRoutes(f,{_controller:l})}catch(F){if(d()&&(e._preflight=void 0),l.abort(F),F!==l.signal)throw F}if(!d())return;const v=[];let b,S=0;const _=F=>{S=Math.min(S,F+1);const V=v.splice(F);for(const ee of V)ar(e,ee).options.loader&&(ee.status==="success"||!ee.invalid&&"loaderData"in ee)&&c1(e,{...ee,status:"success",error:void 0,preload:!0},e._cache.get(ee.id));Qt(e,V)},x=i.length>h.length?h.findIndex(F=>F._notFound)+1:i.length;let R=!1;for(let F=0;F<x;F++){const V=h[F],ee=i[F];if(typeof ee.i!="string"||MA(ee.i)!==V.id){b??=F;break}S=F+1;const le=ar(e,V);if(("l"in ee||ee.s==="success"&&ee.e===void 0&&le.options.loader)&&(V.loaderData=ee.l),V.status=ee.s,V.ssr=ee.ssr,le.options.ssr=V.ssr,V.updatedAt=ee.u,V.error=ee.e,V._notFound||=ee.g,V.status==="error"||V.status==="notFound"||V._notFound){R=!0,v.push(V),(V.ssr===!1||V.ssr==="data-only")&&(b??=F);break}if(V.status==="pending"){b??=F;break}v.push(V),V.ssr==="data-only"&&(b??=F)}!R&&v.length===x&&x<h.length&&(b=x);const A=v.map(async F=>{try{const V=ar(e,F);return await(F._notFound?Promise.all([as(V),as(V,"notFoundComponent")]):as(V,F.status==="error"?"errorComponent":F.status==="notFound"?"notFoundComponent":void 0)),!0}catch{return!1}});let C=0;try{for(;C<A.length&&await os(A[C],l.signal);)C++}catch{return}if(!d())return;C<v.length&&_(C);const D=Math.max(b===v.length?v.length+1:v.length,C<A.length?C:S);for(let F=0;F<D;
11F++){const V=h[F],ee=ar(e,V),le=h[F-1]?.context??e.options.context??{};let oe;if(ee.options.context){try{oe=V._ctx=ee.options.context({deps:V.loaderDeps,params:V.params,context:le,location:f,navigate:M=>e.navigate({...M,_fromLocation:f}),buildLocation:e.buildLocation,cause:V.cause,abortController:l,preload:!1,matches:h,routeId:ee.id})||{}}catch{if(!d())return;if(V.status!=="error"&&V.status!=="notFound"&&!V._notFound){b=Math.min(b??F,F),_(F);break}}if(!d())return}V.context={...le,...oe,...v[F]&&i[F].b}}if(await hg(e,[f,h],l.signal,0,S),!d())return;const z=b!==void 0||v.length<x,N=R&&v.length===x?h:v;let O=z?h:N,I;if(z&&b!==void 0){const F=O[b];I=F.ssr==="data-only"&&S>b+1?S:void 0,O=O.slice(),O[b]={...F,status:"pending",ssr:F.ssr==="data-only"?"data-only":!1,_assetEnd:I}}const W=()=>{const F=e.history.location;return z&&!e._tx&&F.href===g&&F.state===m&&e._committed===N&&N.length&&!l.signal.aborted?l:void 0},ne=[W,F=>{if(e._handoff!==ne)return;e._handoff=void 0;const V=N.length;if(!F||!W()||N.some((oe,M)=>oe.id!==F[M]?.id)){l.abort();return}let ee=I;if(ee!==void 0){for(let oe=V;oe<ee;oe++)if(h[oe]?.id!==F[oe]?.id){ee=oe>b+1?oe:void 0;break}}const le=N.map(oe=>({...oe}));ee!==void 0&&(le[b]._assetEnd=ee),Qt(e,F.splice(0,V,...le));for(let oe=V;oe<F.length;oe++){const M=F[oe],G=h[oe];G?.id===M.id&&G._ctx&&(M._ctx=G._ctx),M.abortController=l}return V}];e._committed=N,e._lifecycleEnd=i1(N),e._handoff=ne,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(O),e.stores.status.set("idle"),z||e.stores.resolvedLocation.set(e.stores.location.get())})}const ls=Symbol.asyncIterator,p1=Symbol.hasInstance,ho=Symbol.isConcatSpreadable,cs=Symbol.iterator,m1=Symbol.match,g1=Symbol.matchAll,y1=Symbol.replace,v1=Symbol.search,b1=Symbol.species,w1=Symbol.split,_1=Symbol.toPrimitive,po=Symbol.toStringTag,S1=Symbol.unscopables,x1={[ls]:0,[p1]:1,[ho]:2,[cs]:3,[m1]:4,[g1]:5,[y1]:6,[v1]:7,[b1]:8,[w1]:9,[_1]:10,[po]:11,[S1]:12},IC={0:ls,1:p1,2:ho,3:cs,4:m1,5:g1,6:y1,7:v1,8:b1,9:w1,10:_1,11:po,12:S1},UC={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},zC={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},$C={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Ve(e,t,n,s,i,l,c,d,f,h,g,m){return{t:e,i:t,s:n,c:s,m:i,p:l,e:c,a:d,f,b:h,o:g,l:m}}function da(e){return Ve(2,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const E1=da(2),R1=da(3),BC=da(1),HC=da(0),qC=da(4),FC=da(5),VC=da(6),GC=da(7),KC=64,YC=/[\x00-\x07\x0b\x0e-\x1f<\u2028\u2029\ud800-\udfff]/;function WC(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
12`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function Xa(e){if(e.length>=KC&&!YC.test(e))return JSON.stringify(e).slice(1,-1);let t="",n=0,s;for(let i=0,l=e.length;i<l;i++)s=WC(e[i]),s&&(t+=e.slice(n,i)+s,n=i+1);return n===0?t=e:t+=e.slice(n),t}function QC(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
13`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function fa(e){return typeof e=="string"&&!e.includes("\\")?e:e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,QC)}const ZC={parsing:1,serialization:2,deserialization:3};function XC(e){return`Seroval Error (step: ${ZC[e]})`}const JC=(e,t)=>XC(e);var T1=class extends Error{constructor(e,t){super(JC(e)),this.cause=t}},_w=class extends T1{constructor(e){super("parsing",e)}},eO=class extends T1{constructor(e){super("deserialization",e)}};function hs(e){return`Seroval Error (specific: ${e})`}var Ja=class extends Error{constructor(e){super(hs(1)),this.value=e}},pg=class extends Error{constructor(e){super(hs(2))}},tO=class extends Error{constructor(e){super(hs(3))}},Wd=class extends Error{constructor(e){super(hs(4))}}
13,nO=class extends Error{constructor(e){super(hs(5)),this.value=e}},rO=class extends Error{constructor(e){super(hs(6))}},sO=class extends Error{constructor(e){super(hs(7))}},Lt=class extends Error{constructor(e){super(hs(8))}},k1=class extends Error{constructor(e){super(hs(9))}};const Uu="__SEROVAL_REFS__",A1=new Map,io=new Map;function C1(e){return A1.has(e)}function aO(e){return io.has(e)}function iO(e){if(C1(e))return A1.get(e);throw new nO(e)}function oO(e){if(aO(e))return io.get(e);throw new rO(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Uu,{value:io,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Uu,{value:io,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Uu,{value:io,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Uu,{value:io,configurable:!0,writable:!1,enumerable:!1});function mg(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 lO(e){const t=zC[mg(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function O1(e,t){let n=lO(e);const s=Object.getOwnPropertyNames(e);for(let i=0,l=s.length,c;i<l;i++)c=s[i],c!=="name"&&c!=="message"&&(c==="stack"?t&4&&(n=n||{},n[c]=e[c]):(n=n||{},n[c]=e[c]));return n}function N1(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function cO(e){switch(e){case Number.POSITIVE_INFINITY:return FC;case Number.NEGATIVE_INFINITY:return VC}return e!==e?GC:Object.is(e,-0)?qC:Ve(0,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function j1(e){return Ve(1,void 0,Xa(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function uO(e){return Ve(3,void 0,""+e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function dO(e){return Ve(4,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function fO(e,t){const n=t.valueOf();return Ve(5,e,n!==n?"":t.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Hs(e,t,n){return Ve(36,e,n.toString(),t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function hO(e,t){return Ve(6,e,void 0,Xa(t.source),t.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function pO(e,t){return Ve(17,e,x1[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function mO(e,t){return Ve(18,e,Xa(iO(t)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function gO(e,t,n){return Ve(25,e,n,Xa(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function yO(e,t,n){return Ve(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,N1(t),void 0)}function vO(e,t){return Ve(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}const gg=1e6;function bO(e,t,n){if(t.length>gg)throw new Ja(t);return Ve(15,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function wO(e,t,n){if(t.length>gg)throw new Ja(t);return Ve(16,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function _O(e,t,n){if(t.byteLength>gg)throw new Ja(t);return Ve(20,e,void 0,void 0,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.byteLength)}function SO(e,t,n){return Ve(13,e,mg(t),void 0,Xa(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function xO(e,t,n){return Ve(14,e,mg(t),void 0,Xa(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function EO(e,t){return Ve(7,e,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0)}function RO(e,t){return Ve(28,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function TO(e,t){return Ve(30,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function kO(e,t,n){return Ve(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,void 0)}function AO(e,t){return Ve(32,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function CO(e,t){return Ve(33,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function OO(e,t){return Ve(34,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function NO(e,t,n,s){return Ve(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,s)}var jO=class{constructor(e,t){this.value=e,this.replacement=t}};const yg=()=>{const e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},DO=e=>t=>()=>{let n=0;const s={[e](){return s},next(){if(n>t.d)return{done:!0,value:void 0};const i=n++,l=t.v[i];if(i===t.t)throw l;return{done:i===t.d,value:l}}};return s},PO=(e,t)=>n=>()=>{let s=0,i=-1,l=!1;const c=[],d=[],f={finalize(g=0,m=d.length){for(;g<m;g++)d[g].s({done:!0,value:void 0})}};n.on({next(g){const m=d.shift();m&&m.s({done:!1,value:g}),c.push(g)},throw(g){const m=d.shift();m&&m.f(g),f.finalize(),i=c.length,l=!0,c.push(g)},return(g){const m=d.shift();m&&m.s({done:!0,value:g}),f.finalize(),i=c.length,c.push(g)}});const h={[e](){return h},next(){if(i===-1){const v=s++;if(v>=c.length){const b=t();return d.push(b),b.p}return{done:!1,value:c[v]}}if(s>i)return{done:!0,value:void 0};const g=s++,m=c[g];if(g!==i)return{done:!1,value:m};if(l)throw m;return{done:!0,value:m}}};return h},MO=e=>{const t=atob(e),n=t.length,s=new Uint8Array(n);for(let i=0;i<n;i++)s[i]=t.charCodeAt(i);return s.buffer};var D1=class{constructor(e,t,n){this.v=e,this.t=t,this.d=n}};function P1(e){return e instanceof D1}function M1(e,t,n){return new D1(e,t,n)}function LO(e){const t=[];let n=-1,s=-1;const i=e[cs]();for(;;)try{const l=i.next();if(t.push(l.value),l.done){s=t.length-1;break}}
13catch(l){n=t.length,s=n,t.push(l);break}return M1(t,n,s)}const IO=DO(cs);function UO(e){return IO(e)}const zO={},$O={},BO={0:{},1:{},2:{},3:{},4:{},5:{}};function L1(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function HO(e,t){L1(e,t),t.add(e)}function Cl(e,t,n){L1(e,t),t.set(e,n)}function oo(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function rt(e,t){return e.get(oo(e,t))}function Gi(e,t,n){return e.set(oo(e,t),n),n}var lo=new WeakMap,Jr=new WeakMap,es=new WeakMap,ud=new WeakMap,er=new WeakMap,Ol=new WeakSet,I1=class{constructor(){HO(this,Ol),Cl(this,lo,[]),Cl(this,Jr,[]),Cl(this,es,!0),Cl(this,ud,!1),Cl(this,er,0)}on(e){let t=rt(es,this),n=0;if(t){for(;n<rt(er,this)&&rt(Jr,this)[n];n++);if(n===rt(er,this)){var s;Gi(er,this,(s=rt(er,this),s++,s))}rt(Jr,this)[n]=e}return oo(Ol,this,qO).call(this,e),()=>{if(rt(es,this)&&t){for(t=!1,rt(Jr,this)[n]=void 0;rt(er,this)>0&&!rt(Jr,this)[rt(er,this)-1];){var i;Gi(er,this,(i=rt(er,this),i--,i))}rt(Jr,this).length=rt(er,this)}}}next(e){rt(es,this)&&(rt(lo,this).push(e),oo(Ol,this,Ip).call(this,e,"next"))}throw(e){rt(es,this)&&(rt(lo,this).push(e),oo(Ol,this,Ip).call(this,e,"throw"),Gi(es,this,!1),Gi(ud,this,!1),rt(Jr,this).length=0)}return(e){rt(es,this)&&(rt(lo,this).push(e),oo(Ol,this,Ip).call(this,e,"return"),Gi(es,this,!1),Gi(ud,this,!0),rt(Jr,this).length=0)}};function Ip(e,t){for(let s=0;s<rt(er,this);s++){var n;(n=rt(Jr,this)[s])===null||n===void 0||n[t](e)}}function qO(e){for(let t=0,n=rt(lo,this).length;t<n;t++){const s=rt(lo,this)[t];!rt(es,this)&&t===n-1?e[rt(ud,this)?"return":"throw"](s):e.next(s)}}function vg(e){return e instanceof I1}function pc(){return new I1}function FO(e,t){const n=pc(),s=e[ls]();let i=!1,l=!1;async function c(){try{for(;!i;){const d=await s.next();if(d.done){l=!0,n.return(d.value);break}n.next(d.value)}}catch(d){l=!0,n.throw(d)}}return c().catch(()=>{}),n}const VO=PO(ls,yg);function GO(e){return VO(e)}async function KO(e){try{return[1,await e]}catch(t){return[0,t]}}function YO(e,t){var n;return{plugins:t.plugins,mode:e,marked:new Set,features:127^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3,compactArrayBufferViews:(n=t.compactArrayBufferViews)!==null&&n!==void 0?n:!1}}function dd(e,t){e.marked.add(t)}function WO(e,t){const n=e.refs.size;return e.refs.set(t,n),n}function Qd(e,t){const n=e.refs.get(t);return n!=null?(dd(e,n),{type:1,value:dO(n)}):{type:0,value:WO(e,t)}}function bg(e,t){const n=Qd(e,t);return n.type===1?n:C1(t)?{type:2,value:mO(n.value,t)}:n}function Fa(e,t){const n=bg(e,t);if(n.type!==0)return n.value;if(t in x1)return pO(n.value,t);throw new Ja(t)}function Zd(e,t){const n=Qd(e,BO[t]);return n.type===1?n.value:Ve(26,n.value,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function QO(e){const t=Qd(e,zO);return t.type===1?t.value:Ve(27,t.value,void 0,void 0,void 0,void 0,void 0,void 0,Fa(e,cs),void 0,void 0,void 0)}function ZO(e){const t=Qd(e,$O);return t.type===1?t.value:Ve(29,t.value,void 0,void 0,void 0,void 0,void 0,[Zd(e,1),Fa(e,ls)],void 0,void 0,void 0,void 0)}function XO(e,t,n,s){return Ve(n?11:10,e,void 0,void 0,void 0,s,void 0,void 0,void 0,void 0,N1(t),void 0)}function JO(e,t,n,s){return Ve(8,t,void 0,void 0,void 0,void 0,{k:n,v:s},void 0,Zd(e,0),void 0,void 0,void 0)}function wg(e,t){if(!e.compactArrayBufferViews)return t;const n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer,s=t.constructor;return new s(n)}function e2(e){if(typeof Buffer<"u")return Buffer.from(e).toString("base64");const t=new Uint8Array(e);if(typeof t.toBase64=="function")return t.toBase64();let n="";for(let s=0,i=t.length;s<i;s++)n+=String.fromCharCode(t[s]);return btoa(n)}function t2(e,t,n){return Ve(19,t,e2(n),void 0,void 0,void 0,void 0,void 0,Zd(e,5),void 0,void 0,void 0)}function n2(e,t){return{base:YO(e,t),child:void 0}}var r2=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Nt(this._p,this.depth,e)}};async function s2(e,t,n){const s=[];for(let i=0,l=n.length;i<l;i++)i in n?s[i]=await Nt(e,t,n[i]):s[i]=0;return s}async function a2(e,t,n,s){return yO(n,s,await s2(e,t,s))}async function _g(e,t,n){const s=Object.entries(n),i=[],l=[];for(let c=0,d=s.length;c<d;c++)i.push(Xa(s[c][0])),l.push(await Nt(e,t,s[c][1]));return cs in n&&(i.push(Fa(e.base,cs)),l.push(RO(QO(e.base),await Nt(e,t,LO(n))))),ls in n&&(i.push(Fa(e.base,ls)),l.push(TO(ZO(e.base),await Nt(e,t,FO(n))))),po in n&&(i.push(Fa(e.base,po)),l.push(j1(n[po]))),ho in n&&(i.push(Fa(e.base,ho)),l.push(n[ho]?E1:R1)),{k:i,v:l}}async function Up(e,t,n,s,i){return XO(n,s,i,await _g(e,t,s))}async function i2(e,t,n,s){return vO(n,await Nt(e,t,s.valueOf()))}async function o2(e,t,n,s){return s=wg(e.base,s),bO(n,s,await Nt(e,t,s.buffer))}async function l2(e,t,n,s){return s=wg(e.base,s),wO(n,s,await Nt(e,t,s.buffer))}async function c2(e,t,n,s){return s=wg(e.base,s),_O(n,s,await Nt(e,t,s.buffer))}async function Sw(e,t,n,s){const i=O1(s,e.base.features);return SO(n,s,i?await _g(e,t,i):void 0)}async function u2(e,t,n,s){const i=O1(s,e.base.features);return xO(n,s,i?await _g(e,t,i):void 0)}async function d2(e,t,n,s){const i=[],l=[];for(const[c,d]of s.entries())i.push(await Nt(e,t,c)),l.push(await Nt(e,t,d));return JO(e.base,n,i,l)}async function f2(e,t,n,s){const i=[];for(const l of s.keys())i.push(await Nt(e,t,l));return EO(n,i)}async function U1(e,t,n,s){const i=e.base.plugins;if(i)for(let l=0,c=i.length;l<c;l++){const d=i[l];if(d.parse.async&&d.test(s))return gO(n,d.tag,await d.parse.async(s,new r2(e,t),{id:n}))}}async function h2(e,t,n,s){const[i,l]=await KO(s);return Ve(12,n,i,void 0,void 0,void 0,void 0,void 0,await Nt(e,t,l),void 0,void 0,void 0)}function p2(e,t,n,s,i){const l=[],c=n.on({next:d=>{dd(this.base,t),Nt(this,e,d).then(f=>{l.push(AO(t,f))},f=>{i(f),c()})},throw:d=>{dd(this.base,t),Nt(this,e,d).then(f=>{l.push(CO(t,f)),s(l),c()},f=>{i(f),c()})},return:d=>{dd(this.base,t),Nt(this,e,d).then(f=>{l.push(OO(t,f)),s(l),c()},f=>{i(f),c()})}})}async function m2(e,t,n,s){return kO(n,Zd(e.base,4),await new Promise(p2.bind(e,t,n,s)))}async function g2(e,t,n,s){const i=[];for(let l=0,c=s.v.length;l<c;l++)i[l]=await Nt(e,t,s.v[l]);return NO(n,i,s.t,s.d)}async function y2(e,t,n,s){if(Array.isArray(s))return a2(e,t,n,s);if(vg(s))return m2(e,t,n,s);if(P1(s))return g2(e,t,n,s);let i=s.constructor;if(i!==void 0&&typeof i!="function"){const d=Object.getPrototypeOf(s);i=d===null?void 0:d.constructor}if(i===jO)return Nt(e,t,s.replacement);const l=await U1(e,t,n,s);if(l)return l;switch(i){case Object:return Up(e,t,n,s,!1);case void 0:return Up(e,t,n,s,!0);case Date:return fO(n,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Sw(e,t,n,s);case Number:case Boolean:case String:case BigInt:return i2(e,t,n,s);case ArrayBuffer:return t2(e.base,n,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return o2(e,t,n,s);case DataView:return c2(e,t,n,s);case Map:return d2(e,t,n,s);case Set:return f2(e,t,n,s)}if(i===Promise||s instanceof Promise)return h2(e,t,n,s);const c=e.base.features;if(c&32&&i===RegExp)return hO(n,s);if(c&16)switch(i){case BigInt64Array:case BigUint64Array:return l2(e,t,n,s)}if(c&1&&typeof AggregateError<"u"&&(i===AggregateError||s instanceof AggregateError))return u2(e,t,n,s);if(c&64&&typeof Temporal<"u")switch(i){case Temporal.Instant:return Hs(n,0,s);case Temporal.Duration:return Hs(n,1,s);case Temporal.PlainDate:return Hs(n,2,s);case Temporal.PlainDateTime:return Hs(n,3,s);case Temporal.PlainMonthDay:return Hs(n,4,s);case Temporal.PlainTime:return Hs(n,5,s);case Temporal.PlainYearMonth:return Hs(n,6,s);case Temporal.ZonedDateTime:return Hs(n,7,s)}if(s instanceof Error)return Sw(e,t,n,s);if(cs in s||ls in s)return Up(e,t,n,s,!!i);throw new Ja(s)}async function v2(e,t,n){const s=bg(e.base,n);if(s.type!==0)return s.value;const i=await U1(e,t,s.value,n);if(i)return i;throw new Ja(n)}async function Nt(e,t,n){if(t>=e.base.depthLimit)throw new k1(e.base.depthLimit);switch(typeof n){case"boolean":return n?E1:R1;case"undefined":return BC;case"string":return j1(n);case"number":return cO(n);case"bigint":return uO(n);case"object":if(n){const s=bg(e.base,n);return s.type===0?await y2(e,t+1,s.value,n):s.value}return HC;case"symbol":return Fa(e.base,n);case"function":return v2(e,t,n);default:throw new Ja(n)}}async function b2(e,t){try{return await Nt(e,0,t)}catch(n){throw n instanceof _w?n:new _w(n)}}function z1(e,t){for(let n=0,s=t.length;n<s;n++){const i=t[n];e.has(i)||(e.add(i),i.extends&&z1(e,i.extends))}}function $1(e){if(e){const t=new Set;return z1(t,e),[...t]}}function w2(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 sO(e)}}function _2(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function S2(e){switch(e){case ls:case ho:case po:case cs:return!0;default:return!1}}const x2=1e6,E2=512,R2=1e4,T2=2e4;function B1(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}}const k2=1e3;function A2(e,t){var n,s;const i=(n=t.maxBase64Length)!==null&&n!==void 0?n:x2;if(!Number.isSafeInteger(i)||i<0)throw new RangeError("maxBase64Length must be a non-negative safe integer");const l=t.refs||new Map;return"types"in l||Object.assign(l,{types:new Map}),{mode:e,plugins:t.plugins,refs:l,features:(s=t.features)!==null&&s!==void 0?s:127^(t.disabledFeatures||0),depthLimit:t.depthLimit||k2,maxBase64Length:i}}
13function C2(e){return{mode:2,base:A2(2,e),child:void 0}}var O2=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return it(this._p,this.depth,e)}};function H1(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Lt({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function q1(e){return!!e&&(typeof e=="object"||typeof e=="function")&&"then"in e&&typeof e.then=="function"}function N2(e,t,n){return H1(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function j2(e,t,n){return H1(e.base,t),e.base.refs.set(t,n),n}function Tt(e,t,n){return e.mode===1?N2(e,t,n):j2(e,t,n)}function ym(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new Lt(e)}function D2(e,t){return Tt(e,t.i,oO(fa(t.s)))}function aa(e,t){if(!Array.isArray(t))throw new Lt(e)}function P2(e,t,n){const s=n.a;aa(n,s);const i=s.length,l=Tt(e,n.i,new Array(i));for(let c=0,d;c<i;c++)d=s[c],d&&(l[c]=it(e,t,d));return B1(l,n.o),l}function xw(e,t,n){_2(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function M2(e,t,n,s,i){if(typeof s=="string")xw(n,fa(s),it(e,t,i));else{const l=it(e,t,s);switch(typeof l){case"string":xw(n,l,it(e,t,i));break;case"symbol":S2(l)&&(n[l]=it(e,t,i));break;default:throw new Lt(s)}}}function F1(e,t,n){e.base.refs.types.set(t,n)}function Xd(e,t,n,s){if(e.base.refs.types.get(n)!==s)throw new Lt(t)}function V1(e,t,n,s){const i=n.k;if(aa(n,i),aa(n,n.v),i.length>0)for(let l=0,c=n.v,d=i.length;l<d;l++)M2(e,t,s,i[l],c[l]);return s}function L2(e,t,n){const s=Tt(e,n.i,n.t===10?{}:Object.create(null));return V1(e,t,n.p,s),B1(s,n.o),s}function I2(e,t){return Tt(e,t.i,new Date(t.s))}function U2(e,t){if(!(e.base.features&64))throw new pg(t);let n;switch(t.c){case 0:n=Temporal.Instant.from(t.s);break;case 1:n=Temporal.Duration.from(t.s);break;case 2:n=Temporal.PlainDate.from(t.s);break;case 3:n=Temporal.PlainDateTime.from(t.s);break;case 4:n=Temporal.PlainMonthDay.from(t.s);break;case 5:n=Temporal.PlainTime.from(t.s);break;case 6:n=Temporal.PlainYearMonth.from(t.s);break;case 7:n=Temporal.ZonedDateTime.from(t.s);break;default:throw new Lt(t)}return Tt(e,t.i,n)}function z2(e,t){if(e.base.features&32){const n=fa(t.c);if(n.length>T2)throw new Lt(t);return Tt(e,t.i,new RegExp(n,t.m))}throw new pg(t)}function $2(e,t,n){const s=Tt(e,n.i,new Set);aa(n,n.a);for(let i=0,l=n.a,c=l.length;i<c;i++)s.add(it(e,t,l[i]));return s}function B2(e,t,n){const s=Tt(e,n.i,new Map);aa(n,n.e.k),aa(n,n.e.v);for(let i=0,l=n.e.k,c=n.e.v,d=l.length;i<d;i++)s.set(it(e,t,l[i]),it(e,t,c[i]));return s}function H2(e,t){if(typeof t.s!="string")throw new Lt(t);if(t.s.length>e.base.maxBase64Length)throw new RangeError("ArrayBuffer exceeds maxBase64Length ("+e.base.maxBase64Length+")");const n=fa(t.s);let s;if(n.length<E2||typeof Buffer>"u")s=MO(n);else{const i=atob(n);s=new ArrayBuffer(i.length),Buffer.from(s).write(i,"latin1")}return Tt(e,t.i,s)}function q2(e,t,n){var s;const i=w2(n.c),l=it(e,t,n.f);if(!(l instanceof ArrayBuffer))throw new Lt(n);const c=(s=n.b)!==null&&s!==void 0?s:0;if(c<0||c>l.byteLength)throw new Lt(n);return Tt(e,n.i,new i(l,c,n.l))}function F2(e,t,n){var s;const i=it(e,t,n.f);if(!(i instanceof ArrayBuffer))throw new Lt(n);const l=(s=n.b)!==null&&s!==void 0?s:0;if(l<0||l>i.byteLength)throw new Lt(n);return Tt(e,n.i,new DataView(i,l,n.l))}function G1(e,t,n,s){if(n.p){const i=V1(e,t,n.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(i))}return s}function V2(e,t,n){return G1(e,t,n,Tt(e,n.i,new AggregateError([],fa(n.m))))}function G2(e,t,n){const s=ym(n,$C,n.s);return G1(e,t,n,Tt(e,n.i,new s(fa(n.m))))}function K2(e,t,n){const s=yg(),i=Tt(e,n.i,s.p),l=it(e,t,n.f);if(q1(l))throw new Lt(n.f);return n.s?s.s(l):s.f(l),i}function Y2(e,t,n){return Tt(e,n.i,Object(it(e,t,n.f)))}function W2(e,t,n){const s=e.base.plugins;if(s){const i=fa(n.c);for(let l=0,c=s.length;l<c;l++){const d=s[l];if(d.tag===i)return Tt(e,n.i,d.deserialize(n.s,new O2(e,t),{id:n.i}))}}throw new tO(n.c)}function Q2(e,t){const n=Tt(e,t.i,Tt(e,t.s,yg()).p);return F1(e,t.s,22),n}function Z2(e,t,n){const s=e.base.refs.get(n.i);if(s){Xd(e,n,n.i,22);const i=it(e,t,n.a[1]);if(q1(i))throw new Lt(n.a[1]);n.t===23?s.s(i):s.f(i);return}throw new Wd("Promise")}function X2(e,t,n){it(e,t,n.a[0]);const s=it(e,t,n.a[1]);if(!P1(s))throw new Lt(n.a[1]);return UO(s)}function J2(e,t,n){it(e,t,n.a[0]);const s=it(e,t,n.a[1]);if(!vg(s))throw new Lt(n.a[1]);return GO(s)}
13function eN(e,t,n){const s=Tt(e,n.i,pc());F1(e,n.i,31);const i=n.a;aa(n,i);const l=i.length;if(l)for(let c=0;c<l;c++)it(e,t,i[c]);return s}function tN(e,t,n){const s=e.base.refs.get(n.i);if(s){Xd(e,n,n.i,31),s.next(it(e,t,n.f));return}throw new Wd("Stream")}function nN(e,t,n){const s=e.base.refs.get(n.i);if(s){Xd(e,n,n.i,31),s.throw(it(e,t,n.f));return}throw new Wd("Stream")}function rN(e,t,n){const s=e.base.refs.get(n.i);if(s){Xd(e,n,n.i,31),s.return(it(e,t,n.f));return}throw new Wd("Stream")}function sN(e,t,n){it(e,t,n.f)}function aN(e,t,n){it(e,t,n.a[1])}function Ew(e,t){return Number.isInteger(e)&&e>=-1&&e<t}function iN(e,t,n){aa(n,n.a);const s=n.a.length;if(!(Ew(n.s,s)&&Ew(n.l,s)))throw new Lt(n);const i=Tt(e,n.i,M1([],n.s,n.l));for(let l=0;l<s;l++)i.v[l]=it(e,t,n.a[l]);return i}function it(e,t,n){if(t>e.base.depthLimit)throw new k1(e.base.depthLimit);switch(t+=1,n.t){case 2:return ym(n,UC,n.s);case 0:return Number(n.s);case 1:return fa(String(n.s));case 3:if(String(n.s).length>R2)throw new Lt(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return D2(e,n);case 9:return P2(e,t,n);case 10:case 11:return L2(e,t,n);case 5:return I2(e,n);case 6:return z2(e,n);case 7:return $2(e,t,n);case 8:return B2(e,t,n);case 19:return H2(e,n);case 16:case 15:return q2(e,t,n);case 20:return F2(e,t,n);case 14:return V2(e,t,n);case 13:return G2(e,t,n);case 12:return K2(e,t,n);case 17:return ym(n,IC,n.s);case 21:return Y2(e,t,n);case 25:return W2(e,t,n);case 22:return Q2(e,n);case 23:case 24:return Z2(e,t,n);case 28:return X2(e,t,n);case 30:return J2(e,t,n);case 31:return eN(e,t,n);case 32:return tN(e,t,n);case 33:return nN(e,t,n);case 34:return rN(e,t,n);case 27:return sN(e,t,n);case 29:return aN(e,t,n);case 35:return iN(e,t,n);case 36:return U2(e,n);default:throw new pg(n)}}function oN(e,t){try{return it(e,0,t)}catch(n){throw new eO(n)}}function lN(e,t){const n=$1(t.plugins);return oN(C2({maxBase64Length:t.maxBase64Length,plugins:n,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function cN(e,t={}){const n=$1(t.plugins),s=n2(1,{compactArrayBufferViews:t.compactArrayBufferViews,plugins:n,disabledFeatures:t.disabledFeatures});return{t:await b2(s,e),f:s.base.features,m:Array.from(s.base.marked)}}function uN(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,n){return{v:n.parse(e.toSerializable(t))}},async async(t,n){return{v:await n.parse(e.toSerializable(t))}},stream(t,n){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n){return e.fromSerializable(n.deserialize(t.v))}}}function K1(e){if(Array.isArray(e))return e.flatMap(g=>K1(g));if(typeof e!="string")return[];const t=[];let n=0,s,i,l,c,d;const f=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},h=()=>(i=e.charAt(n),i!=="="&&i!==";"&&i!==",");for(;n<e.length;){for(s=n,d=!1;f();)if(i=e.charAt(n),i===","){for(l=n,n+=1,f(),c=n;n<e.length&&h();)n+=1;n<e.length&&e.charAt(n)==="="?(d=!0,n=c,t.push(e.slice(s,l)),s=n):n=l+1}else n+=1;(!d||n>=e.length)&&t.push(e.slice(s))}return t}function dN(e){return e instanceof Headers?e:Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):null}function fN(...e){return e.reduce((t,n)=>{const s=dN(n);if(!s)return t;for(const[i,l]of s.entries())i==="set-cookie"?K1(l).forEach(c=>t.append("set-cookie",c)):t.set(i,l);return t},new Headers)}const hN={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))}};var pN=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}};function Y1(e){const t=[];for(let n=0;n<e.length;n+=32768)t.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(t.join(""))}function W1(e){const t=atob(e),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}const mN=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});function gN(e){try{return"t"+mN.decode(e)}catch{return"b"+Y1(e)}}const yN=new TextEncoder;function vN(e){const t=e.slice(1);return e[0]==="t"?yN.encode(t):W1(t)}function bN(e,t,n){n?.throwIfAborted();const s=pc(),i=e.getReader();let l=!0;const c=()=>{l=!1,n?.removeEventListener("abort",f),i.releaseLock()},d=h=>l?(i.cancel(h).catch(()=>{}),c(),!0):!1,f=()=>{d(n.reason)&&s.throw(n.reason)};return n?.addEventListener("abort",f),(async()=>{try{for(;l;){const{done:h,value:g}=await i.read();if(!l)return;if(h){c(),s.return(void 0);return}s.next(t(g))}}catch(h){d(h)&&s.throw(h)}})(),[s,d]}function wN(e,t){let n,s=!1;return new ReadableStream({start(i){const l=e.on({next(c){if(!s)try{i.enqueue(t(c))}catch(d){s=!0;const f=n;n=void 0,f?.(),i.error(d)}},throw(c){s||(s=!0,n=void 0,i.error(c))},return(){s||(s=!0,n=void 0,i.close())}});s?l():n=l},cancel(){const i=n;n=void 0,i?.()}})}function Q1(e){return{tag:"tss/RawStream",test:t=>t instanceof pN,parse:{async:async(t,n)=>{const s=await n.parse(t.hint==="text"),[i]=bN(t.stream,t.hint==="text"?gN:Y1,e);return{text:s,stream:await n.parse(i)}}},serialize:void 0,deserialize:void 0}}const _N=Q1(),SN={tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(e,t){return wN(t.deserialize(e.stream),t.deserialize(e.text)?vN:W1)}},Ks={},Z1=e=>new ReadableStream({start(t){e.on({next(n){try{t.enqueue(n)}catch{}},throw(n){t.error(n)},return(){try{t.close()}catch{}}})}}),xN={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Ks},parse:{sync(){return Ks},async async(){return await Promise.resolve(Ks)},stream(){return Ks}},serialize(){return Z1.toString()},deserialize(){return Ks}};async function EN(e,t){try{for(;;){const n=await t.read();if(n.done){e.return(n.value),t.releaseLock();break}e.next(n.value)}}catch(n){t.releaseLock(),e.throw(n)}}function RN(e){e.cancel().catch(()=>{}),e.releaseLock()}function Rw(e){const t=pc(),n=e.getReader(),s=RN.bind(null,n);return EN(t,n).catch(s),[t,s]}const TN={tag:"seroval/plugins/web/ReadableStream",extends:[xN],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Ks),stream:t.parse(pc())}},async async(e,t){return{factory:await t.parse(Ks),stream:await t.parse(Rw(e)[0])}},stream(e,t){const[n,s]=Rw(e);return t.addCleanup(s),{factory:t.parse(Ks),stream:t.parse(n)}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){const n=t.deserialize(e.stream);if(!n||typeof n!="object"||!vg(n))throw new Error("Expected a stream source.");return Z1(n)}};function X1(e){return[hN,e?Q1(e):_N,TN]}const kN=X1();[...kN];function AN(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(t,n){return e(n.deserialize(t.streamId))}}}function CN(e){return[...sg()?.serializationAdapters?.map(uN)??[],...e]}function J1(e){return CN(X1(e))}var Tw=new TextDecoder,br=new Uint8Array,ON=new ByteLengthQueuingStrategy({highWaterMark:0});function NN(e){const t=e.getReader(),n=new Map;let s=0,i,l;const c=()=>{i?.(),i=void 0},d=(m,v)=>{const b=m[1];m[1]=!1,b&&(v===1?b.close():b.error(v[0]))},f=new ReadableStream({start(m){l=m},pull:c,cancel(m){const v=[m===void 0?new Error("Framed response cancelled"):m];s=v,c(),t.cancel(m).catch(()=>{});for(const b of n.values())d(b,v)}});function h(m){const v=n.get(m);
13if(v)return v;if(n.size>=1024)throw new Error("Too many raw streams");let b;const S=[new ReadableStream({start(_){b=_},cancel(){S[1]!==!1&&(S[1]=null)}},ON),b];return n.set(m,S),s!==0&&d(S,s),S}function g(m){if(m===0||m>>>0!==m)throw new RangeError("Invalid raw stream ID");return h(m)[0]}return(async()=>{let m=br,v=0;async function b(){for(;v===m.byteLength;){m=br,v=0;const _=await t.read();if(s!==0||_.done)return!1;m=_.value}return!0}async function S(_,x){if(_===0)return br;if(!await b()){if(x)return;throw new Error("Incomplete frame")}if(m.byteLength-v>=_){const C=m.subarray(v,v+_);return v+=_,v===m.byteLength&&(m=br,v=0),C}const R=new Uint8Array(_);let A=0;for(;A<_;){if(!await b())throw new Error("Incomplete frame");const C=Math.min(_-A,m.byteLength-v);R.set(m.subarray(v,v+C),A),v+=C,A+=C}return v===m.byteLength&&(m=br,v=0),R}try{for(;s===0;){let _=await S(9,!0);if(s!==0)return;if(!_){for(const z of n.values())if(z[1])throw new Error("Incomplete raw stream");s=1,l.close();return}const x=_[0],R=(_[1]<<24|_[2]<<16|_[3]<<8|_[4])>>>0,A=(_[5]<<24|_[6]<<16|_[7]<<8|_[8])>>>0;if(_=br,x>3||x===0!=(R===0)||A>16777216||x===2&&A!==0)throw new Error("Invalid frame");const C=x===0?void 0:h(R);if(C?.[1]===!1)throw new Error("Raw stream already ended");let D=await S(A);if(s!==0)return;if(!C){const z=Tw.decode(D);for(D=br,l.enqueue(z);s===0&&l.desiredSize<=0;)await new Promise(N=>{i=N});continue}if(x===1){const z=C[1];if(z){if(-z.desiredSize>134217728){z.error(new Error(`Raw stream ${R} has too many unread bytes`)),C[1]=null,D=br;continue}const N=D.byteLength*4<D.buffer.byteLength?D.slice():D;D=br,z.enqueue(N)}}else d(C,x===2?1:[new Error(Tw.decode(D))])}}catch(_){if(s===0){const x=[_];s=x,t.cancel(_).catch(()=>{}),l.error(_);for(const R of n.values())d(R,x)}}finally{m=br,t.releaseLock()}})(),[f,g]}const Sr=Symbol.for("TSR_DEFERRED_PROMISE");function jN(e,t){const n=e;return n[Sr]||(n[Sr]={status:"pending"},n.then(s=>{n[Sr].status="success",n[Sr].data=s}).catch(s=>{n[Sr].status="error",n[Sr].error={data:wC(s),__isServerError:!0}})),n}const DN="Error preloading route! ☝️";function ex(e,t){if(e)return typeof e=="string"?e:e[t]}function PN(e){return e?.scriptFormat??"module"}function MN(e,t,n){const s=LN(t),i=ex(n,"script")??s.crossOrigin;return{...PN(e)==="iife"?{rel:"preload",as:"script"}:{rel:"modulepreload"},href:s.href,...i?{crossOrigin:i}:{}}}function LN(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function zu(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}const n=new Set;for(const s of t){const i=JSON.stringify(s);n.has(i)||(n.add(i),e.push(s))}}function IN(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function UN(e,t,n,s){const i=o1(e),l=[],c=[];for(const d of i)for(const f of Array.isArray(d.scripts)?d.scripts:[]){if(!f)continue;const{children:h,...g}=f;l.push({tag:"script",attrs:{...g,...s,nonce:n},children:h})}if(t)for(const d of i)for(const f of t.routes[d.routeId]?.scripts??[])c.push({tag:"script",attrs:{...f.attrs,nonce:n},children:f.children});return[l,c]}function zN([e,t],n){return[...e,...t]}var tx=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,this._branch=void 0;const n=this.options,s=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=fo:this.parentRoute||Vl();let i=s?fo:n?.path;i&&i!=="/"&&(i=WS(i));const l=n?.id||i,c=s?fo:uo((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(l??""));i==="__root__"&&(i="/");const d=c==="__root__"?"/":i===void 0?this.parentRoute.fullPath:uo(this.parentRoute.fullPath+"/"+i);this._path=i,this._id=c,this._fullPath=d,this._to=Er(d)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Vn({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.")}},$N=class extends tx{constructor(e){super(e)}};var Ql;function vm(e,t,n){try{return lN(e,t)}catch(s){throw rx(n),s}}async function nx(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function rx(e){for(const t of e)t.catch(()=>{});e.length=0}var BN=Object.prototype.hasOwnProperty;function sx(e){for(const t in e)if(BN.call(e,t))return!0;return!1}async function HN(e,t,n){Ql||(Ql=J1());const s=t[0],i=s.fetch??n,l=s.data instanceof FormData,c=new Headers(s.headers);if(c.set("x-tsr-serverFn","true"),l||c.set("accept",`${PA}, application/x-ndjson, application/json`),s.method==="GET"){if(l)throw new Error("FormData is not supported with GET requests");const f=await ax(s);if(f!==void 0){const h=n1({payload:f});e.includes("?")?e+=`&${h}`:e+=`?${h}`}}let d;
13return s.method==="POST"&&(d=await qN(s),typeof d=="string"&&c.set("content-type","application/json")),FN(()=>i(e,{method:s.method,headers:c,signal:s.signal,body:d}))}async function ax(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&sx(e.context)&&((t??={}).context=e.context),t?ix(t,e.signal):void 0}async function ix(e,t){t?.throwIfAborted();let n;try{n=await cN(e,{plugins:t?J1(t):Ql})}finally{t?.throwIfAborted()}return JSON.stringify(n)}async function qN(e){if(e.data instanceof FormData){let t;return e.context&&sx(e.context)&&(t=await ix(e.context,e.signal)),t!==void 0&&e.data.set(DA,t),e.data}return ax(e)}async function FN(e){let t;try{t=await e()}catch(s){if(s instanceof Response)t=s;else throw s}if(t.headers.get("x-tss-raw")==="true")return t;const n=t.headers.get("content-type");if(n||Vl(),t.headers.get("x-tss-serialized")){let s;if(n.includes("application/x-tss-framed")){const i=/;\s*v=(\d+)/.exec(n)?.[1];if(i&&+i!=1)throw new Error(`Unsupported framed protocol version ${i}`);if(!t.body)throw new Error("No response body for framed response");const[l,c]=NN(t.body);s=await VN(l,[AN(c),...Ql])}else if(n.includes("application/json")){const i=await t.json(),l=[];s=vm(i,{plugins:Ql},l),await nx(l)}if(s||Vl(),s instanceof Error)throw s;return s}if(n.includes("application/json")){const s=await t.json(),i=FS(s);if(i)throw i;if(Ya(s))throw s;return s}if(!t.ok)throw new Error(await t.text());return t}async function VN(e,t){const n=e.getReader(),s={refs:new Map,plugins:t},i=d=>{n.cancel(d).catch(()=>{})};let l;const c=[];try{const d=await n.read();if(d.done)throw new Error("Stream ended before first object");l=vm(JSON.parse(d.value),s,c)}catch(d){throw i(d),n.releaseLock(),d}return(async()=>{const d=[];try{for(;;){const f=await n.read();if(f.done)return;vm(JSON.parse(f.value),s,d),rx(d)}}catch(f){i(f),console.error("Stream processing error:",f)}finally{n.releaseLock()}})(),await nx(c),l}function pe(e){const t="/_serverFn/"+e;return Object.assign((...i)=>{const l=sg()?.serverFns?.fetch;return HN(t,i,l??fetch)},{url:t,serverFnMeta:{id:e},[dm]:!0})}var GN={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(dm in e)?!1:!!e[dm],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>pe(e)},Ed=k.use,ox=k.useLayoutEffect;function KN({promise:e}){if(Ed)return Ed(e);const t=jN(e);if(t[Sr].status==="pending")throw t;if(t[Sr].status==="error")throw t[Sr].error;return t[Sr].data}function YN(e){const t=E.jsx(WN,{...e});return e.fallback?E.jsx(k.Suspense,{fallback:e.fallback,children:t}):t}function WN(e){const t=KN(e);return e.children(t)}var Sg=class extends k.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){const e=this.state.error;return e?k.createElement(this.props.errorComponent??QN,{error:e[0],reset:this.reset}):this.props.children}};function QN({error:e}){const[t,n]=k.useState(!1);return E.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[E.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),E.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(s=>!s),children:t?"Hide Error":"Show Error"})]}),E.jsx("div",{style:{height:".25rem"}}),t?E.jsx("div",{children:E.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e?.message?E.jsx("code",{children:e.message}):null})}):null]})}var kw=()=>!0,ZN=()=>!1;function XN({children:e,fallback:t=null}){return E.jsx(ae.Fragment,{children:xg()?e:t})}function xg(e=!0){return ae.useSyncExternalStore(JN,kw,e?ZN:kw)}function JN(){return()=>{}}var lx=k.createContext(null);function It(e){return k.useContext(lx)}var Eg=k.createContext(void 0),ej=k.createContext(void 0);function tj({update:e,notify:t,unwatched:n}){return{link:s,unlink:i,propagate:l,checkDirty:c,shallowPropagate:d};function s(h,g,m){const v=g.depsTail;if(v!==void 0&&v.dep===h)return;const b=v!==void 0?v.nextDep:g.deps;if(b!==void 0&&b.dep===h){b.version=m,g.depsTail=b;return}const S=h.subsTail;if(S!==void 0&&S.version===m&&S.sub===g)return;const _=g.depsTail=h.subsTail={version:m,dep:h,sub:g,prevDep:v,nextDep:b,prevSub:S,nextSub:void 0};b!==void 0&&(b.prevDep=_),v!==void 0?v.nextDep=_:g.deps=_,S!==void 0?S.nextSub=_:h.subs=_}function i(h,g=h.sub){const m=h.dep,v=h.prevDep,b=h.nextDep,S=h.nextSub,_=h.prevSub;return b!==void 0?b.prevDep=v:g.depsTail=v,v!==void 0?v.nextDep=b:g.deps=b,S!==void 0?S.prevSub=_:m.subsTail=_,_!==void 0?_.nextSub=S:(m.subs=S)===void 0&&n(m),b}function l(h){let g=h.nextSub,m;e:do{const v=h.sub;let b=v.flags;if(b&60?b&12?b&4?!(b&48)&&f(h,v)?(v.flags=b|40,b&=1):b=0:v.flags=b&-9|32:b=0:v.flags=b|32,b&2&&t(v),b&1){const S=v.subs;if(S!==void 0){const _=(h=S).nextSub;_!==void 0&&(m={value:g,prev:m},g=_);continue}}if((h=g)!==void 0){g=h.nextSub;continue}for(;m!==void 0;)if(h=m.value,m=m.prev,h!==void 0){g=h.nextSub;continue e}break}while(!0)}function c(h,g){let m,v=0,b=!1;e:do{const S=h.dep,_=S.flags;if(g.flags&16)b=!0;else if((_&17)===17){if(e(S)){const x=S.subs;x.nextSub!==void 0&&d(x),b=!0}}else if((_&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(m={value:h,prev:m}),h=S.deps,g=S,++v;continue}if(!b){const x=h.nextDep;if(x!==void 0){h=x;continue}}for(;v--;){const x=g.subs,R=x.nextSub!==void 0;if(R?(h=m.value,m=m.prev):h=x,b){if(e(g)){R&&d(x),g=h.sub;continue}b=!1}else g.flags&=-33;g=h.sub;const A=h.nextDep;if(A!==void 0){h=A;continue e}}return b}while(!0)}function d(h){do{const g=h.sub,m=g.flags;(m&48)===32&&(g.flags=m|16,(m&6)===2&&t(g))}while((h=h.nextSub)!==void 0)}function f(h,g){let m=g.depsTail;for(;m!==void 0;){if(m===h)return!0;m=m.prevDep}return!1}}function nj(e,t,n){const s=typeof e=="object",i=s?e:void 0;return{next:(s?e.next:e)?.bind(i),error:(s?e.error:t)?.bind(i),complete:(s?e.complete:n)?.bind(i)}}const bm=[];let fd=0;const{link:Aw,unlink:rj,propagate:sj,checkDirty:cx,shallowPropagate:Cw}=tj({update(e){return e._update()},notify(e){bm[wm++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Rd(e))}});let $u=0,wm=0,nr,_m=0;function aj(e){try{++_m,e()}finally{--_m||ux()}}function Rd(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=rj(n,e)}function ux(){if(!(_m>0)){for(;$u<wm;){const e=bm[$u];bm[$u++]=void 0,e.notify()}$u=0,wm=0}}function Ow(e,t){const n=typeof e=="function",s=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?0:1,get(){return nr!==void 0&&Aw(i,nr,fd),i._snapshot},subscribe(l){const c=nj(l),d={current:!1},f=ij(()=>{i.get(),d.current?(nr=void 0,c.next?.(i._snapshot)):d.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(l){const c=nr,d=t?.compare??Object.is;if(n)nr=i,++fd,i.depsTail=void 0;else if(l===void 0)return!1;
13n&&(i.flags=5);try{const f=i._snapshot,h=typeof l=="function"?l(f):l===void 0&&n?s(f):l;return f===void 0||!d(f,h)?(i._snapshot=h,!0):!1}finally{nr=c,n&&(i.flags&=-5),Rd(i)}}};return n?(i.flags=17,i.get=function(){const l=i.flags;if(l&16||l&32&&cx(i.deps,i)){if(i._update()){const c=i.subs;c!==void 0&&Cw(c)}}else l&32&&(i.flags=l&-33);return nr!==void 0&&Aw(i,nr,fd),i._snapshot}):i.set=function(l){if(i._update(l)){const c=i.subs;c!==void 0&&(sj(c),Cw(c),ux())}},i}function ij(e){const t=()=>{const s=nr;nr=n,++fd,n.depsTail=void 0,n.flags=6;try{return e()}finally{nr=s,n.flags&=-5,Rd(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const s=this.flags;s&16||s&32&&cx(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Rd(this)}};return t(),n}var zp={exports:{}},$p={},Bp={exports:{}},Hp={};var Nw;function oj(){if(Nw)return Hp;Nw=1;var e=hc();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var n=typeof Object.is=="function"?Object.is:t,s=e.useState,i=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function d(m,v){var b=v(),S=s({inst:{value:b,getSnapshot:v}}),_=S[0].inst,x=S[1];return l(function(){_.value=b,_.getSnapshot=v,f(_)&&x({inst:_})},[m,b,v]),i(function(){return f(_)&&x({inst:_}),m(function(){f(_)&&x({inst:_})})},[m]),c(b),b}function f(m){var v=m.getSnapshot;m=m.value;try{var b=v();return!n(m,b)}catch{return!0}}function h(m,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return Hp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,Hp}var jw;function lj(){return jw||(jw=1,Bp.exports=oj()),Bp.exports}var Dw;function cj(){if(Dw)return $p;Dw=1;var e=hc(),t=lj();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var s=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,d=e.useMemo,f=e.useDebugValue;return $p.useSyncExternalStoreWithSelector=function(h,g,m,v,b){var S=l(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=d(function(){function R(N){if(!A){if(A=!0,C=N,N=v(N),b!==void 0&&_.hasValue){var O=_.value;if(b(O,N))return D=O}return D=N}if(O=D,s(C,N))return O;var I=v(N);return b!==void 0&&b(O,I)?(C=N,O):(C=N,D=I)}var A=!1,C,D,z=m===void 0?null:m;return[function(){return R(g())},z===null?void 0:function(){return R(z())}]},[g,m,v,b]);var x=i(h,S[0],S[1]);return c(function(){_.hasValue=!0,_.value=x},[x]),f(x),x},$p}var Pw;function uj(){return Pw||(Pw=1,zp.exports=cj()),zp.exports}var dj=uj();function fj(e,t){return e===t}function lr(e,t=s=>s,n){const s=n?.compare??fj,i=k.useCallback(c=>{const{unsubscribe:d}=e.subscribe(c);return d},[e]),l=k.useCallback(()=>e.get(),[e]);return dj.useSyncExternalStoreWithSelector(i,l,l,t,s)}var Mw={};function dx(e,t){const n=k.useRef();return s=>{const i=e?.select?e.select(s):s;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=Js(n.current,i):i}}function ei(e){const t=It(),n=k.useContext(e.from?ej:Eg),s=e.from??n,i=t.stores.getMatchStore(s),l=dx(e,t),c=lr(i,d=>d?l(d):Mw);if(c!==Mw)return c;(e.shouldThrow??!0)&&Vl()}function fx(e){return ei({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function hx(e){const{select:t,...n}=e;return ei({...n,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function px(e){return ei({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function mx(e){return ei({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function gx(e){const t=It();return k.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function yx(e){return ei({...e,select:t=>e.select?e.select(t.context):t.context})}function hj(...e){const t=k.useRef(e),n=t.current;return e.forEach((s,i)=>{or(n[i],s,!1,!0)||(n[i]=s)}),t.current}function Bu(e,t){e.preloadRoute(t).catch(n=>{console.warn(n),console.warn(DN)})}var pj={compare:(e,t)=>
13e[0]===t[0]&&e[1]===t[1]};function mj(e,t){const n=typeof e=="string"&&Fl(e);if(n)return t.has(n)?e:null}function gj(e,t,n,s,i){const l=rw(e.pathname,s),c=rw(t.pathname,s);return(n?.exact?l!==c:!(l.startsWith(c)&&(l.length===c.length||l[c.length]==="/")))||(n?.includeSearch??!0)&&!or(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:n?.includeHash?i&&e.hash===t.hash:!0}function yj(e,t,n){const s=It(),i=k.useRef(null),l=k.useCallback(fe=>{if(i.current=fe,typeof t=="function")return t(fe);t&&(t.current=fe)},[t]),{activeOptions:c,to:d,preload:f,preloadDelay:h,hashScrollIntoView:g,replace:m,startTransition:v,resetScroll:b,viewTransition:S,ignoreBlocker:_,disabled:x,target:R,onClick:A,onBlur:C,onFocus:D,onMouseEnter:z,onMouseLeave:N,onTouchStart:O}=e,I=xg(!!c?.includeHash),[W,ne,F]=hj(e.search,e.params,c),[V,ee]=k.useMemo(()=>[e,{...e}],[s,e.from,e._fromLocation,e.hash,e.to,W,ne,e.state,e.mask,e.unsafeRelative]),le=k.useMemo(()=>{const fe=mj(d,s.protocolAllowlist);if(fe!==void 0){const bt=[fe??void 0];return()=>bt}let be,Re;return bt=>{V._fromLocation||(ee._fromLocation=bt);const kt=s.buildLocation(ee),ft=Sj(kt,s,x);return(!be||be[0]!==ft)&&(be=[ft,!(x||ft&&!Fl(ft))&&void 0],Re=[ft,!0]),be[1]!==void 0&&gj(bt,kt,F,s.basepath,I)?Re:be}},[F,x,I,V,ee,s,d]),[oe,M]=lr(s.stores.location,le,pj),G=M===void 0&&oe,te=x||oe===void 0,Se=k.useRef(!1),J=e.reloadDocument||G||te?!1:f??s.options.defaultPreload,P=h??s.options.defaultPreloadDelay??0,K=k.useCallback(fe=>{const be=fe?.isIntersecting;if(!(be??J==="intent")){be===!1&&qp(i);return}if(!P){Bu(s,V);return}Ul.has(i)||Ul.set(i,setTimeout(()=>{Ul.delete(i),Bu(s,V)},P))},[s,V,i,J,P]);k.useEffect(()=>{if(!J)return;J==="render"&&!Se.current&&(Se.current=!0,Bu(s,V));let fe=!0,be;return J==="viewport"&&i.current&&typeof IntersectionObserver=="function"&&(be=new IntersectionObserver(Re=>{fe&&K(Re.pop())},{rootMargin:"100px"}),be.observe(i.current)),()=>{fe=!1,be?.disconnect(),qp(i)}},[s,V,J,K,i]);const Q=wj(e,n);if(Q.ref=t?l:i,G)return Q.href=G,Q;const re=fe=>{const be=R??fe.currentTarget.getAttribute("target");!te&&!(fe.metaKey||fe.altKey||fe.ctrlKey||fe.shiftKey)&&!fe.defaultPrevented&&(!be||be==="_self")&&fe.button===0&&(fe.preventDefault(),s.navigate({...V,replace:m,resetScroll:b,hashScrollIntoView:g,startTransition:v,viewTransition:S,ignoreBlocker:_}))},ie=()=>{J==="intent"&&Bu(s,V)},ue=()=>{J==="intent"&&qp(i)};return Q.onClick=Ki(A,re),Q.onBlur=Ki(C,ue),Q.onFocus=Ki(D,K),Q.onMouseEnter=Ki(z,K),Q.onMouseLeave=Ki(N,ue),Q.onTouchStart=Ki(O,ie),_j(Q,e,M,oe,te,n)}var vj={},bj={className:"active"},vx=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function wj(e,t){const n={};for(const s in e)vx.has(s)||s==="type"&&t!==void 0||s==="disabled"&&t==="a"||(n[s]=e[s]);return n}function _j(e,t,n,s,i,l){const{activeProps:c,inactiveProps:d,className:f,style:h,target:g}=t,m=VS(n?c:d,{})??(n?bj:vj);Object.assign(e,m),e.href=s,l!=="a"&&(e.disabled=i),e.target=g;const v=m.style;(h||v)&&(e.style=h&&v?{...h,...v}:h||v);const b=m.className;return(f||b)&&(e.className=f?b?`${f} ${b}`:f:b),i&&(e.role="link",e["aria-disabled"]=!0),n&&(e["data-status"]="active",e["aria-current"]="page"),e}var Ul=new WeakMap,qp=e=>{clearTimeout(Ul.get(e)),Ul.delete(e)},Ki=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Sj(e,t,n){if(n)return;const s=e.maskedLocation??e,i=s.external?s.publicHref:t.history.createHref(s.publicHref)||"/";if(!((s.external||i!==s.publicHref)&&YS(i,t.protocolAllowlist)))return i}var Je=k.memo(k.forwardRef((e,t)=>{const n=e._asChild||"a",s=yj(e,t,n),i=typeof e.children=="function"?e.children({isActive:s["data-status"]==="active"}):e.children;return k.createElement(n,s,i)}),xj);function xj(e,t){let n=0;for(const s in t)if(n++,e[s]!==t[s]&&(!vx.has(s)||!or(e[s],t[s],!1,!0)))return!1;for(const s in e)n--;return n===0}var Ej=class extends tx{constructor(t){super(t),this.useMatch=n=>ei({...n,from:this.id}),this.useRouteContext=n=>yx({...n,from:this.id}),this.useSearch=n=>mx({...n,from:this.id}),this.useParams=n=>px({...n,from:this.id}),this.useLoaderDeps=n=>hx({...n,from:this.id}),this.useLoaderData=n=>fx({...n,from:this.id}),this.useNavigate=()=>gx({from:this.fullPath}),this.Link=ae.forwardRef((n,s)=>E.jsx(Je,{ref:s,from:this.fullPath,...n}))}};function Rj(e){return new Ej(e)}function Tj(){return e=>Aj(e)}var kj=class extends $N{constructor(e){super(e),this.useMatch=t=>ei({...t,from:this.id}),this.useRouteContext=t=>yx({...t,from:this.id}),this.useSearch=t=>mx({...t,from:this.id}),this.useParams=t=>
13px({...t,from:this.id}),this.useLoaderDeps=t=>hx({...t,from:this.id}),this.useLoaderData=t=>fx({...t,from:this.id}),this.useNavigate=()=>gx({from:this.fullPath}),this.Link=ae.forwardRef((t,n)=>E.jsx(Je,{ref:n,from:this.fullPath,...t}))}};function Aj(e){return new kj(e)}function qe(e){return t=>{const n=Rj(t);return n.isRoot=!1,n}}function Ce(e,t){let n,s,i;const l=()=>(n||(i=void 0,n=e().then(d=>{n=void 0,c.preload=void 0,s=d[t??"default"]}).catch(d=>{n=void 0,i=d})),n),c=function(f){if(i){if(LA(i)&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(h))throw sessionStorage.setItem(h,"1"),window.location.reload(),new Promise(()=>{})}throw i}if(!s)if(Ed)Ed(l());else throw l();return k.createElement(s,f)};return c.preload=l,c}function Cj(e){const t=It(),n=`not-found-${lr(t.stores.location,s=>s.pathname)}-${lr(t.stores.status)}`;return E.jsx(Sg,{getResetKey:()=>n,onCatch:(s,i)=>{if(Ya(s))e.onCatch?.(s,i);else throw s},errorComponent:({error:s})=>{if(Ya(s))return e.fallback?.(s);throw s},children:e.children})}function Oj(){return E.jsx("p",{children:"Not Found"})}function bx(e,t,n){return t.options.notFoundComponent?E.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?E.jsx(e.options.defaultNotFoundComponent,{...n}):E.jsx(Oj,{})}function Jd(e,t){const n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?E.jsx(n,{}):null}var Nj=(e,t)=>e[0]===t[0]&&e[1]===t[1],wx=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n==="data-only"||!e.ssr,_x=k.memo(function({routeId:t}){const n=It();return E.jsx(jj,{router:n,match:lr(n.stores.getMatchStore(t))})});function jj({router:e,match:t}){const n=e.routesById[t.routeId],s=Jd(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,l=n.options.onCatch??e.options.defaultOnCatch,c=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,d=t.ssr===!1||t.ssr==="data-only",f=wx(e,n,t.ssr)&&(n.options.wrapInSuspense??s??(n.options.errorComponent?.preload||d));let h=E.jsx(Dj,{match:t});d&&(h=E.jsx(XN,{fallback:s,children:h})),c&&(h=E.jsx(Cj,{fallback:v=>{if(v.routeId??=t.routeId,v.routeId!==t.routeId)throw v;return k.createElement(c,v)},children:h})),i&&(h=E.jsx(Sg,{getResetKey:()=>t,errorComponent:i,onCatch:(v,b)=>{if(Ya(v))throw v.routeId??=t.routeId,v;l?.(v,b)},children:h})),f&&(h=E.jsx(k.Suspense,{fallback:s,children:h}));const g=null,m=n.isRoot?n.options.shellComponent:void 0;return E.jsx(Eg.Provider,{value:t.routeId,children:m?E.jsxs(m,{children:[h,g]}):E.jsxs(E.Fragment,{children:[h,g]})})}var Dj=k.memo(function({match:t}){const n=It(),s=t.routeId,i=n.routesById[s],l=k.useMemo(()=>{const d=(i.options.remountDeps??n.options.defaultRemountDeps)?.({routeId:s,loaderDeps:t.loaderDeps,params:t._strictParams,search:t._strictSearch});return d?JSON.stringify(d):void 0},[s,t.loaderDeps,t._strictParams,t._strictSearch,i.options.remountDeps,n.options.defaultRemountDeps]),c=k.useMemo(()=>{const d=i.options.component??n.options.defaultComponent;return d?E.jsx(d,{},l):E.jsx(Sx,{})},[l,i.options.component,n.options.defaultComponent]);if(t.status==="pending"){if(n.ssr&&!wx(n,i,t.ssr))return c;if(n._tx)throw n._tx[5];return Jd(n,i)}if(t.status==="notFound")return bx(n,i,t.error);if(t.status==="error")throw t.error;return c}),Sx=k.memo(function(){const t=It(),n=k.useContext(Eg);let s,i,l;{const d=t.stores.getMatchStore(n);[s,i]=lr(d,f=>[!!f._notFound,f.error],{compare:Nj}),l=lr(t.stores.ids,f=>f[f.indexOf(n)+1])}if(s)return bx(t,t.routesById[n],i);if(!l)return null;const c=E.jsx(_x,{routeId:l});return n===fo?E.jsx(k.Suspense,{fallback:Jd(t),children:c}):c});function xx(e,t){const n=e[1];e.length=0,n?.(t)}function Pj({t:e}){const t=It(),n=t._rendered??=[];return t.startTransition=(s,i)=>new Promise(l=>{xx(n,!1),n.push(i,l),e(t),k.startTransition(s)}),ox(()=>{const s=t.history.subscribe(t.load);t.updateLatestLocation();const i=t.latestLocation,l=t.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Er(i.publicHref)!==Er(l.publicHref))return t.commitLocation({...l,replace:!0,ignoreBlocker:!0}),s;const c=t.stores.resolvedLocation.get();return c?.href===i.href&&c.state.__TSR_key===i.state.__TSR_key?n.push(t.stores.matches.get(),d=>{d&&t.emit({type:"onRendered",...Kd(c,c)})}):t._tx||t.load({sync:!0}).catch(console.error),s},[t,t.history]),null}function Mj(){const e=It(),t=e.routesById[fo],n=Jd(e,t),s=E.jsxs(E.Fragment,{children:[E.jsx(Pj,{t:k.useState()[1]}),e.ssr?E.jsx(Lw,{}):E.jsx(k.Suspense,{fallback:n,children:E.jsx(Lw,{})})]});return e.options.InnerWrap?E.jsx(e.options.InnerWrap,{children:s}):s}function Lw(){const e=It(),t=e._rendered,n=lr(e.stores.matches,c=>t[0]??c),s=n[0],i=s?.routeId;ox(()=>{t[0]===n&&xx(t,!0)},[t,n]);const l=i?E.jsx(_x,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?l:E.jsx(Sg,{getResetKey:()=>s,onCatch:void 0,children:l})}var Lj=e=>({createMutableStore:Ow,createReadonlyStore:Ow,batch:aj}),Ij=e=>new Uj(e),Uj=class extends SC{constructor(e){super(e,Lj)}};function zj({router:e,children:t,...n}
13){GS(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const s=E.jsx(lx.Provider,{value:e,children:t});return e.options.Wrap?E.jsx(e.options.Wrap,{children:s}):s}function $j({router:e,...t}){return E.jsx(zj,{router:e,...t,children:E.jsx(Mj,{})})}function Ex(e){const t=It({warn:e?.router===void 0}),n=e?.router||t;return lr(n.stores.__store,dx(e,n))}function Iw(e,t){if(t)for(const[n,s]of Object.entries(t))n!=="suppressHydrationWarning"&&s!==void 0&&s!==!1&&e.setAttribute(n,typeof s=="boolean"?"":String(s))}function Rx(e){const{attrs:t,children:n,nonce:s,preventScriptHoist:i}=e,l=k.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case"title":return E.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return E.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return E.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:s,suppressHydrationWarning:!0});case"style":return e.inlineCss,E.jsx("style",{...t,dangerouslySetInnerHTML:l,nonce:s});case"script":return E.jsx(Bj,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Bj({attrs:e,children:t,preventScriptHoist:n}){It();const s=xg(),i=k.useMemo(()=>t===void 0?void 0:{__html:t},[t]),l=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(k.useEffect(()=>{if(!l){if(e?.src){const c=document.createElement("a");c.href=e.src;const d=c.href;for(const h of document.scripts)if(h.src===d)return;const f=document.createElement("script");return Iw(f,e),document.head.appendChild(f),()=>f.remove()}if(typeof t=="string"){const c=typeof e?.type=="string"?e.type:"text/javascript",d=typeof e?.nonce=="string"?e.nonce:void 0;for(const h of document.scripts){if(h.hasAttribute("src"))continue;const g=h.getAttribute("type")??"text/javascript",m=h.getAttribute("nonce")??void 0;if(h.textContent===t&&g===c&&m===d)return}const f=document.createElement("script");return f.textContent=t,Iw(f,e),document.head.appendChild(f),()=>f.remove()}}},[e,t,l]),l&&typeof t=="string")return E.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!s){if(e?.src)return E.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return E.jsx("script",{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function Hj(e,t,n,s){n=o1(n);const i=n.map(_=>_.meta).filter(_=>_!==void 0),l=[],c={};let d;for(let _=i.length-1;_>=0;_--){const x=i[_];for(let R=x.length-1;R>=0;R--){const A=x[R];if(A)if(A.title)d||(d={tag:"title",children:A.title});else if("script:ld+json"in A)try{const C=JSON.stringify(A["script:ld+json"]);l.push({tag:"script",attrs:{type:"application/ld+json"},children:HA(C)})}catch{}else{const C=A.name??A.property;if(C){if(c[C])continue;c[C]=!0}l.push({tag:"meta",attrs:{...A,nonce:t}})}}}d&&l.push(d),t&&l.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),l.reverse();const f=n.flatMap(_=>_.links??[]).filter(_=>_!==void 0).map(_=>({tag:"link",attrs:{..._,nonce:t}})),h=e.ssr?.manifest,g=[];h&&(n.forEach(_=>{h.routes[_.routeId]?.css?.forEach(x=>{const R=IN(x);g.push({tag:"link",attrs:{rel:"stylesheet",...R,crossOrigin:ex(s,"stylesheet")??R.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),h.inlineStyle&&g.push({tag:"style",attrs:{...h.inlineStyle.attrs,nonce:t},children:h.inlineStyle.children,inlineCss:!0}));const m=[];h&&n.forEach(_=>{h.routes[_.routeId]?.preloads?.forEach(x=>{m.push({tag:"link",attrs:{...MN(h,x,s),nonce:t}})})});const v=n.flatMap(_=>_.styles??[]).filter(_=>_!==void 0).map(({children:_,...x})=>({tag:"style",attrs:{...x,nonce:t},children:_})),b=n.flatMap(_=>_.headScripts??[]).filter(_=>_!==void 0).map(({children:_,...x})=>({tag:"script",attrs:{...x,nonce:t},children:_})),S=[];return zu(S,l),S.push(...m),zu(S,f),S.push(...g),zu(S,v),zu(S,b),S}var qj=e=>{const t=It(),n=t.options.ssr?.nonce,s=k.useCallback(i=>Hj(t,n,i,e),[e,n,t]);return lr(t.stores.matches,s,{compare:or})};function Fj(e){const t=qj(e.assetCrossOrigin),n=It().options.ssr?.nonce;return E.jsx(E.Fragment,{children:t.map(s=>k.createElement(Rx,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:n}))})}var Vj={suppressHydrationWarning:!0},Gj=()=>{const e=It(),t=e.options.ssr?.nonce,n=i=>{const l=UN(i,e.ssr?.manifest,t,Vj);for(const c of l[1])if(typeof c.attrs?.src=="string"){const d=c;d.preventScriptHoist=!0}return l},s=i=>zN(n(i));return Kj(lr(e.stores.matches,s,{compare:or}))};function Kj(e){return E.jsx(E.Fragment,{children:e.map((t,n)=>k.createElement(Rx,{...t,key:`tsr-scripts-${t.tag}-${n}`}))})}function zl(e){const t=It();return k.useCallback(async(...n)=>{try{const s=await e(...n);if(ql(s))throw s;return s}catch(s){if(ql(s))return s.options._fromLocation=t.stores.location.get(),t.navigate(t.resolveRedirect(s).options);throw s}},[t,e])}function Uw(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function Sm(e,t){const n=Object.create(null);if(e)for(const s of Object.keys(e))Uw(s)&&(n[s]=e[s]);if(t&&typeof t=="object")for(const s of Object.keys(t))Uw(s)&&(n[s]=t[s]);return n}function Tx(e){return Object.create(null)}var kx=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")}
13,he=(e,t)=>{const n=t||e||{};typeof n.method>"u"&&(n.method="GET");const s=c=>he(void 0,{...n,validator:c,inputValidator:c});return Object.assign(c=>he(void 0,{...n,...c}),{options:n,middleware:c=>{const d=[...n.middleware||[]];c.forEach(h=>{ew in h?h.options.middleware&&d.push(...h.options.middleware):d.push(h)});const f=he(void 0,{...n,middleware:d});return f[ew]=!0,f},validator:s,inputValidator:s,handler:(...c)=>{const[d,f]=c,h={...n,extractedFn:d,serverFn:f},g=[...h.middleware||[],Qj(h)];return d.method=n.method,Object.assign(async m=>{const v=await zw(g,"client",{...d,...h,data:m?.data,headers:m?.headers,signal:m?.signal,fetch:m?.fetch,context:Tx()}),b=FS(v.error);if(b)throw b;if(v.error)throw v.error;return v.result},{...d,method:n.method,__executeServer:async m=>{const v=kx(),b=v.contextAfterGlobalMiddlewares;return await zw(g,"server",{...d,data:m.data,method:m.method??n.method,serverFnMeta:d.serverFnMeta,context:Sm(m.context,b),request:v.request}).then(S=>({result:S.result,error:S.error,context:S.sendContext}))}})}})};async function zw(e,t,n){let s=Yj([...sg()?.functionMiddleware||[],...e]);if(t==="server"){const l=kx();l?.executedRequestMiddlewares&&(s=s.filter(c=>!l.executedRequestMiddlewares.has(c)))}const i=async l=>{const c=s.shift();if(!c)return l;try{let d="validator"in c.options?c.options.validator:void 0;!d&&"inputValidator"in c.options&&(d=c.options.inputValidator),d&&t==="server"&&(l.data=await Wj(d,l.data));let f;if(t==="client"?"client"in c.options&&(f=c.options.client):"server"in c.options&&(f=c.options.server),f){const g=await f({...l,next:async(m={})=>{const v=await i({...l,...m,context:Sm(l.context,m.context),sendContext:Sm(l.sendContext,m.sendContext),headers:fN(l.headers,m.headers),_callSiteFetch:l._callSiteFetch,fetch:l._callSiteFetch??m.fetch??l.fetch,result:m.result!==void 0?m.result:m instanceof Response?m:l.result,error:m.error??l.error});if(v.error)throw v.error;return v}});if(ql(g))return{...l,error:g};if(g instanceof Response)return{...l,result:g};if(!g)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return g}return i(l)}catch(d){return{...l,error:d}}};return i({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||Tx(),_callSiteFetch:n.fetch})}function Yj(e,t=100){const n=new Set,s=[],i=(l,c)=>{if(c>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);l.forEach(d=>{d.options.middleware&&i(d.options.middleware,c+1),n.has(d)||(n.add(d),s.push(d))})};return i(e,0),s}async function Wj(e,t){if(e==null)return{};if("~standard"in e){const n=await e["~standard"].validate(t);if(n.issues)throw new Error(JSON.stringify(n.issues,void 0,2));return n.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function Qj(e){return{"~types":void 0,options:{inputValidator:e.validator??e.inputValidator,client:async({next:t,sendContext:n,fetch:s,...i})=>{const l={...i,context:n,fetch:s};return t(await e.extractedFn?.(l))},server:async({next:t,...n})=>{const s=await e.serverFn?.(n);return t({...n,result:s})}}}}var Zs=(e,t)=>{const n={type:"request",...t||e},s=i=>Zs({},Object.assign(n,{validator:i,inputValidator:i}));return{options:n,middleware:i=>Zs({},Object.assign(n,{middleware:i})),validator:s,inputValidator:s,client:i=>Zs({},Object.assign(n,{client:i})),server:i=>Zs({},Object.assign(n,{server:i}))}};function Ax(e,t){for(let n=0,s=t.length;n<s;n++){const i=t[n];e.has(i)||(e.add(i),i.extends&&Ax(e,i.extends))}}var Zj=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const n=new Set;Ax(n,t.serializationAdapters),t.serializationAdapters=Array.from(n)}return t},createMiddleware:Zs}),Rr=function(){return Rr=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Rr.apply(this,arguments)};function Ro(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]]);return n}function Xj(e,t,n,s){function i(l){return l instanceof n?l:new n(function(c){c(l)})}
13return new(n||(n=Promise))(function(l,c){function d(g){try{h(s.next(g))}catch(m){c(m)}}function f(g){try{h(s.throw(g))}catch(m){c(m)}}function h(g){g.done?l(g.value):i(g.value).then(d,f)}h((s=s.apply(e,t||[])).next())})}function Jj(e,t,n){if(n||arguments.length===2)for(var s=0,i=t.length,l;s<i;s++)(l||!(s in t))&&(l||(l=Array.prototype.slice.call(t,0,s)),l[s]=t[s]);return e.concat(l||Array.prototype.slice.call(t))}const e4=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Rg extends Error{constructor(t,n="FunctionsError",s){super(t),this.name=n,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class t4 extends Rg{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class $w extends Rg{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Bw extends Rg{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var xm;(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"})(xm||(xm={}));class n4{constructor(t,{headers:n={},customFetch:s,region:i=xm.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=e4(s)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Xj(this,arguments,void 0,function*(n,s={}){var i;let l,c;try{const{headers:d,method:f,body:h,signal:g,timeout:m}=s;let v={},{region:b}=s;b||(b=this.region);const S=new URL(`${this.url}/${n}`);b&&b!=="any"&&(v["x-region"]=b,S.searchParams.set("forceFunctionRegion",b));let _;const x=!!d&&Object.keys(d).some(N=>N.toLowerCase()==="content-type");h&&!x?typeof Blob<"u"&&h instanceof Blob||h instanceof ArrayBuffer?(v["Content-Type"]="application/octet-stream",_=h):typeof h=="string"?(v["Content-Type"]="text/plain",_=h):typeof FormData<"u"&&h instanceof FormData?_=h:(v["Content-Type"]="application/json",_=JSON.stringify(h)):h&&typeof h!="string"&&!(typeof Blob<"u"&&h instanceof Blob)&&!(h instanceof ArrayBuffer)&&!(typeof FormData<"u"&&h instanceof FormData)?_=JSON.stringify(h):_=h;let R=g;m&&(c=new AbortController,l=setTimeout(()=>c.abort(),m),g?(R=c.signal,g.addEventListener("abort",()=>c.abort())):R=c.signal);const A=yield this.fetch(S.toString(),{method:f||"POST",headers:Object.assign(Object.assign(Object.assign({},v),this.headers),d),body:_,signal:R}).catch(N=>{throw new t4(N)}),C=A.headers.get("x-relay-error");if(C&&C==="true")throw new $w(A);if(!A.ok)throw new Bw(A);let D=((i=A.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),z;return D==="application/json"?z=yield A.json():D==="application/octet-stream"||D==="application/pdf"?z=yield A.blob():D==="text/event-stream"?z=A:D==="multipart/form-data"?z=yield A.formData():z=yield A.text(),{data:z,error:null,response:A}}catch(d){return{data:null,error:d,response:d instanceof Bw||d instanceof $w?d.context:void 0}}finally{l&&clearTimeout(l)}})}}const Cx=3,Hw=e=>Math.min(1e3*2**e,3e4),r4=[520,503],Ox=["GET","HEAD","OPTIONS"];var qw=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
13de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Fw(e,t){return new Promise(n=>{if(t?.aborted){n();return}const s=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e);function i(){clearTimeout(s),n()}t?.addEventListener("abort",i)})}function s4(e,t,n,s){return!(!s||n>=Cx||!Ox.includes(e)||!r4.includes(t))}var a4=class{constructor(e){var t,n,s,i,l;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=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(s=e.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(l=e.retry)!==null&&l!==void 0?l:!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 n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const s=this.fetch;let l=(async()=>{let c=0;for(;;){const h={};n.headers.forEach((m,v)=>{h[v]=m}),c>0&&(h["X-Retry-Count"]=String(c));let g;try{g=await s(n.url.toString(),{method:n.method,headers:h,body:JSON.stringify(n.body,(m,v)=>typeof v=="bigint"?v.toString():v),signal:n.signal})}catch(m){if(m?.name==="AbortError"||m?.code==="ABORT_ERR"||!Ox.includes(n.method))throw m;if(n.retryEnabled&&c<Cx){const v=Hw(c);c++,await Fw(v,n.signal);continue}throw m}if(s4(n.method,g.status,c,n.retryEnabled)){var d,f;const m=(d=(f=g.headers)===null||f===void 0?void 0:f.get("Retry-After"))!==null&&d!==void 0?d:null,v=m!==null?Math.max(0,parseInt(m,10)||0)*1e3:Hw(c);await g.text(),c++,await Fw(v,n.signal);continue}return await n.processResponse(g)}})();return this.shouldThrowOnError||(l=l.catch(c=>{var d;let f="",h="",g="";const m=c?.cause;if(m){var v,b,S,_;const A=(v=m?.message)!==null&&v!==void 0?v:"",C=(b=m?.code)!==null&&b!==void 0?b:"";f=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,f+=`
14
15Caused by: ${(_=m?.name)!==null&&_!==void 0?_:"Error"}: ${A}`,C&&(f+=` (${C})`),m?.stack&&(f+=`
16${m.stack}`)}else{var x;f=(x=c?.stack)!==null&&x!==void 0?x:""}const R=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(g="",h="Request was aborted (timeout or manual cancellation)",R>this.urlLengthLimit&&(h+=`. Note: Your request URL is ${R} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(m?.name==="HeadersOverflowError"||m?.code==="UND_ERR_HEADERS_OVERFLOW")&&(g="",h="HTTP headers exceeded server limits (typically 16KB)",R>this.urlLengthLimit&&(h+=`. Your request URL is ${R} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=c?.name)!==null&&d!==void 0?d:"FetchError"}: ${c?.message}`,details:f,hint:h,code:g},data:null,count:null,status:0,statusText:""}})),l.then(e,t)}async processResponse(e){var t=this;let n=null,s=null,i=null,l=e.status,c=e.statusText;if(e.ok){var d,f;if(t.method!=="HEAD"){var h;const v=await e.text();if(v!=="")if(t.headers.get("Accept")==="text/csv")s=v;else if(t.headers.get("Accept")&&(!((h=t.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text")))s=v;else try{s=JSON.parse(v)}catch{if(n={message:v},s=null,t.shouldThrowOnError)throw new qw({message:v,details:"",hint:"",code:""})}}const g=(d=t.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),m=(f=e.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");g&&m&&m.length>1&&(i=parseInt(m[1])),t.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(n={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,i=null,l=406,c="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{const g=await e.text();try{n=JSON.parse(g),Array.isArray(n)&&e.status===404&&(s=[],n=null,l=200,c="OK")}catch{e.status===404&&g===""?(l=204,c="No Content"):n={message:g}}if(n&&t.shouldThrowOnError)throw new qw(n)}return{success:n===null,error:n,data:s,count:i,status:l,statusText:c}}returns(){return this}overrideTypes(){return this}},i4=class extends a4{throwOnError(){return super.throwOnError()}select(e){let t=!1;const n=(e??"*").split("").map(s=>/\s/.test(s)&&!t?"":(s==='"'&&(t=!t),s)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:s,referencedTable:i=s}={}){const l=i?`${i}.order`:"order",c=this.url.searchParams.get(l);return this.url.searchParams.set(l,`${c?`${c},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const s=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:s=n}={}){const i=typeof s>"u"?"offset":`${s}.offset`,l=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(l,`${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}
16explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:s=!1,wal:i=!1,format:l="text"}={}){var c;const d=[e?"analyze":null,t?"verbose":null,n?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),f=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${l}; for="${f}"; options=${d};`),l==="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 Vw=new RegExp("[,()]");var no=class extends i4{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 n=Array.from(new Set(t)).map(s=>typeof s=="string"&&Vw.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(s=>typeof s=="string"&&Vw.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),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:n,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const l=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${l}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const s=n?`${n}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},o4=class{constructor(e,{headers:t={},schema:n,fetch:s,urlLengthLimit:i=8e3,retry:l}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=s,this.urlLengthLimit=i,this.retry=l}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:s}=t??{},i=n?"HEAD":"GET";let l=!1;const c=(e??"*").split("").map(h=>/\s/.test(h)&&!l?"":(h==='"'&&(l=!l),h)).join(""),{url:d,headers:f}=this.cloneRequestState();return d.searchParams.set("select",c),s&&f.append("Prefer",`count=${s}
16`),new no({method:i,url:d,headers:f,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var s;const i="POST",{url:l,headers:c}=this.cloneRequestState();if(t&&c.append("Prefer",`count=${t}`),n||c.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((f,h)=>f.concat(Object.keys(h)),[]);if(d.length>0){const f=[...new Set(d)].map(h=>`"${h}"`);l.searchParams.set("columns",f.join(","))}}return new no({method:i,url:l,headers:c,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:s,defaultToNull:i=!0}={}){var l;const c="POST",{url:d,headers:f}=this.cloneRequestState();if(f.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&d.searchParams.set("on_conflict",t),s&&f.append("Prefer",`count=${s}`),i||f.append("Prefer","missing=default"),Array.isArray(e)){const h=e.reduce((g,m)=>g.concat(Object.keys(m)),[]);if(h.length>0){const g=[...new Set(h)].map(m=>`"${m}"`);d.searchParams.set("columns",g.join(","))}}return new no({method:c,url:d,headers:f,schema:this.schema,body:e,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const s="PATCH",{url:i,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new no({method:s,url:i,headers:l,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new no({method:n,url:s,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Zl(e){"@babel/helpers - typeof";return Zl=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},Zl(e)}function l4(e,t){if(Zl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Zl(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function c4(e){var t=l4(e,"string");return Zl(t)=="symbol"?t:t+""}function u4(e,t,n){return(t=c4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function Hu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gw(Object(n),!0).forEach(function(s){u4(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gw(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}var d4=class Nx{constructor(t,{headers:n={},schema:s,fetch:i,timeout:l,urlLengthLimit:c=8e3,retry:d}={}){this.url=t,this.headers=new Headers(n),this.schemaName=s,this.urlLengthLimit=c;const f=i??globalThis.fetch;l!==void 0&&l>0?this.fetch=(h,g)=>{const m=new AbortController,v=setTimeout(()=>m.abort(),l),b=g?.signal;if(b){if(b.aborted)return clearTimeout(v),f(h,g);const S=()=>{clearTimeout(v),m.abort()};return b.addEventListener("abort",S,{once:!0}),f(h,Hu(Hu({},g),{},{signal:m.signal})).finally(()=>{clearTimeout(v),b.removeEventListener("abort",S)})}return f(h,Hu(Hu({},g),{},{signal:m.signal})).finally(()=>clearTimeout(v))}:this.fetch=f,this.retry=d}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new o4(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 Nx(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:s=!1,get:i=!1,count:l}={}){var c;let d;const f=new URL(`${this.url}/rpc/${t}`);let h;const g=b=>b!==null&&typeof b=="object"&&(!Array.isArray(b)||b.some(g)),m=s&&Object.values(n).some(g);m?(d="POST",h=n):s||i?(d=s?"HEAD":"GET",Object.entries(n).filter(([b,S])=>S!==void 0).map(([b,S])=>[b,Array.isArray(S)?`{${S.join(",")}}`:`${S}
16`]).forEach(([b,S])=>{f.searchParams.append(b,S)})):(d="POST",h=n);const v=new Headers(this.headers);return m?v.set("Prefer",l?`count=${l},return=minimal`:"return=minimal"):l&&v.set("Prefer",`count=${l}`),new no({method:d,url:f,headers:v,schema:this.schemaName,body:h,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class f4{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const s=typeof global<"u"?global:void 0;if(s&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};if(typeof globalThis<"u"&&typeof n.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"&&n.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 i=globalThis.process;if(i){const l=i.versions;if(l&&l.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 n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
17
18Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const h4="2.110.5",p4=`realtime-js/${h4}`,m4="1.0.0",jx="2.0.0",g4=jx,y4=1e4,v4=100,Ys={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Dx={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Em={connecting:"connecting",closing:"closing",closed:"closed"};class b4{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,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,s;const i=(s=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var n,s;const i=(s=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&s!==void 0?s:{},c=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(t,n,s){var i,l;const c=new TextEncoder,d=c.encode(t.topic),f=c.encode((i=t.ref)!==null&&i!==void 0?i:""),h=c.encode((l=t.join_ref)!==null&&l!==void 0?l:""),g=c.encode(t.payload.event),m=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},v=c.encode(Object.keys(m).length===0?"":JSON.stringify(m));if(h.length>255)throw new Error(`joinRef length ${h.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`topic length ${d.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(v.length>255)throw new Error(`metadata length ${v.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+h.length+f.length+d.length+g.length+v.length,S=new ArrayBuffer(this.HEADER_LENGTH+b),_=new DataView(S),x=new Uint8Array(S);let R=0;_.setUint8(R++,this.KINDS.userBroadcastPush),_.setUint8(R++,h.length),_.setUint8(R++,f.length),_.setUint8(R++,d.length),_.setUint8(R++,g.length),_.setUint8(R++,v.length),_.setUint8(R++,n),x.set(h,R),R+=h.length,x.set(f,R),R+=f.length,x.set(d,R),R+=d.length,x.set(g,R),R+=g.length,x.set(v,R),R+=v.length;var A=new Uint8Array(S.byteLength+s.byteLength);
18return A.set(new Uint8Array(S),0),A.set(new Uint8Array(s),S.byteLength),A.buffer}decode(t,n){if(this._isArrayBuffer(t)){let s=this._binaryDecode(t);return n(s)}if(typeof t=="string"){const s=JSON.parse(t),[i,l,c,d,f]=s;return n({join_ref:i,ref:l,topic:c,event:d,payload:f})}return n({})}_binaryDecode(t){const n=new DataView(t),s=n.getUint8(0),i=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,n,i)}_decodeUserBroadcast(t,n,s){const i=n.getUint8(1),l=n.getUint8(2),c=n.getUint8(3),d=n.getUint8(4);let f=this.HEADER_LENGTH+4;const h=s.decode(t.slice(f,f+i));f=f+i;const g=s.decode(t.slice(f,f+l));f=f+l;const m=s.decode(t.slice(f,f+c));f=f+c;const v=t.slice(f,t.byteLength),b=d===this.JSON_ENCODING?JSON.parse(s.decode(v)):v,S={type:this.BROADCAST_EVENT,event:g,payload:b};return c>0&&(S.meta=JSON.parse(m)),{join_ref:null,ref:null,topic:h,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t?.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([s])=>n.includes(s)))}}var at;(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"})(at||(at={}));const Kw=(e,t,n={})=>{var s;const i=(s=n.skipTypes)!==null&&s!==void 0?s:[];return t?Object.keys(t).reduce((l,c)=>(l[c]=w4(c,e,t,i),l),{}):{}},w4=(e,t,n,s)=>{const i=t.find(d=>d.name===e),l=i?.type,c=n[e];return l&&!s.includes(l)?Px(l,c):Rm(c)},Px=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return E4(t,n)}switch(e){case at.bool:return _4(t);case at.float4:case at.float8:case at.int2:case at.int4:case at.int8:case at.numeric:case at.oid:return S4(t);case at.json:case at.jsonb:return x4(t);case at.timestamp:return R4(t);case at.abstime:case at.date:case at.daterange:case at.int4range:case at.int8range:case at.money:case at.reltime:case at.text:case at.time:case at.timestamptz:case at.timetz:case at.tsrange:case at.tstzrange:return Rm(t);default:return Rm(t)}},Rm=e=>e,_4=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},S4=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},x4=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},E4=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,s=e[n];if(e[0]==="{"&&s==="}"){let l;const c=e.slice(1,n);try{l=JSON.parse("["+c+"]")}catch{l=c?c.split(","):[]}return l.map(d=>Px(t,d))}return e},R4=e=>typeof e=="string"?e.replace(" ","T"):e,Mx=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 $l=e=>typeof e=="function"?e:function(){return e},T4=typeof self<"u"?self:null,ro=typeof window<"u"?window:null,_r=T4||ro||globalThis,k4="2.0.0",A4=1e4,C4=1e3,xr={connecting:0,open:1,closing:2,closed:3},hn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ts={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Tm={longpoll:"longpoll",websocket:"websocket"},O4={complete:4},km="base64url.bearer.phx.",qu=class{constructor(e,t,n,s){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=s,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,j
vendor: 8,439 bytes, line 18
18oin_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:n}){this.recHooks.filter(s=>s.status===e).forEach(s=>s.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})}},Lx=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))}},N4=class{constructor(e,t,n){this.state=hn.closed,this.topic=e,this.params=$l(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new qu(this,ts.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Lx(()=>{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=hn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=hn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=hn.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=hn.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 qu(this,ts.leave,$l({}),this.timeout).send(),this.state=hn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ts.reply,(s,i)=>{this.trigger(this.replyEventName(i),s)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=hn.closed,this.bindings=[]}onClose(e){this.on(ts.close,e)}onError(e){return this.on(ts.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=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 s=new qu(this,e,function(){return t},n);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=hn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ts.close,"leave")},n=new qu(this,ts.leave,$l({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,s){return this.topic!==e?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=hn.joining,this.joinPush.resend(e))}trigger(e,t,n,s){let i=this.onMessage(e,t,n,s);if(t&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let l=this.bindings.filter(c=>c.event===e&&this.filterBindings(c,t,n));for(let c=0;c<l.length;c++)l[c].callback(i,n,s||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===hn.closed}isErrored(){return this.state===hn.errored}isJoined(){return this.state===hn.joined}isJoining(){return this.state===hn.joining}isLeaving(){return this.state===hn.leaving}},Td=class{static request(e,t,n,s,i,l,c){if(_r.XDomainRequest){let d=new _r.XDomainRequest;return this.xdomainRequest(d,e,t,s,i,l,c)}else if(_r.XMLHttpRequest){let d=new _r.XMLHttpRequest;return this.xhrRequest(d,e,t,n,s,i,l,c)}else{if(_r.fetch&&_r.AbortController)return this.fetchRequest(e,t,n,s,i,l,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,s,i,l,c){let d={method:e,headers:n,body:s},f=null;return i&&(f=new AbortController,setTimeout(()=>f.abort(),i),d.signal=f.signal),_r.fetch(t,d).then(h=>h.text()).then(h=>this.parseJSON(h)).then(h=>c&&c(h)).catch(h=>{h.name==="AbortError"&&l?l():c&&c(null)}),f}static xdomainRequest(e,t,n,s,i,l,c){return e.timeout=i,e.open(t,n),e.onload=()=>{let d=this.parseJSON(e.responseText);c&&c(d)},l&&(e.ontimeout=l),e.onprogress=()=>{},e.send(s),e}static xhrRequest(e,t,n,s,i,l,c,d){e.open(t,n,!0),e.timeout=l;for(let[f,h]of Object.entries(s))e.setRequestHeader(f,h);return e.onerror=()=>d&&d(null),e.onreadystatechange=()=>{if(e.readyState===O4.complete&&d){let f=this.parseJSON(e.responseText);d(f)}},c&&(e.ontimeout=c),e.send(i),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 n=[];for(var s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let i=t?`${t}[${s}]`:s,l=e[s];typeof l=="object"?n.push(this.serialize(l,i)):n.push(encodeURIComponent(i)+"="+encodeURIComponent(l))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},j4=e=>{let t="",n=new Uint8Array(e),s=n.byteLength;for(let i=0;i<s;i++)t+=String.fromCharCode(n[i]);return btoa(t)},Yi=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(km)&&(this.authToken=atob(t[1].slice(km.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=xr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Tm.websocket),"$1/"+Tm.longpoll)}endpointURL(){return Td.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=xr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===xr.open||this.readyState===xr.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:n,token:s,messages:i}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else n=0;switch(n){case 200:i.forEach(l=>{setTimeout(()=>this.onmessage({data:l}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=xr.open,this.onopen({}),this.poll();break;
18case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=j4(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
19`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let i of this.reqs)i.abort();this.readyState=xr.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(e,t,n,s,i){let l,c=()=>{this.reqs.delete(l),s()};l=Td.request(e,this.endpointURL(),t,n,this.timeout,c,d=>{this.reqs.delete(l),this.isActive()&&i(d)}),this.reqs.add(l)}},D4=class Dl{constructor(t,n={}){let s=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,i=>{let{onJoin:l,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Dl.syncState(this.state,i,l,c),this.pendingDiffs.forEach(f=>{this.state=Dl.syncDiff(this.state,f,l,c)}),this.pendingDiffs=[],d()}),this.channel.on(s.diff,i=>{let{onJoin:l,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Dl.syncDiff(this.state,i,l,c),d())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Dl.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,s,i){let l=this.clone(t),c={},d={};return this.map(l,(f,h)=>{n[f]||(d[f]=h)}),this.map(n,(f,h)=>{let g=l[f];if(g){let m=h.metas.map(_=>_.phx_ref),v=g.metas.map(_=>_.phx_ref),b=h.metas.filter(_=>v.indexOf(_.phx_ref)<0),S=g.metas.filter(_=>m.indexOf(_.phx_ref)<0);b.length>0&&(c[f]=h,c[f].metas=b),S.length>0&&(d[f]=this.clone(g),d[f].metas=S)}else c[f]=h}),this.syncDiff(l,{joins:c,leaves:d},s,i)}static syncDiff(t,n,s,i){let{joins:l,leaves:c}=this.clone(n);return s||(s=function(){}),i||(i=function(){}),this.map(l,(d,f)=>{let h=t[d];if(t[d]=this.clone(f),h){let g=t[d].metas.map(v=>v.phx_ref),m=h.metas.filter(v=>g.indexOf(v.phx_ref)<0);t[d].metas.unshift(...m)}s(d,h,f)}),this.map(c,(d,f)=>{let h=t[d];if(!h)return;let g=f.metas.map(m=>m.phx_ref);h.metas=h.metas.filter(m=>g.indexOf(m.phx_ref)<0),i(d,h,f),h.metas.length===0&&delete t[d]}),t}static list(t,n){return n||(n=function(s,i){return i}),this.map(t,(s,i)=>n(s,i))}static map(t,n){return Object.getOwnPropertyNames(t).map(s=>n(s,t[s]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Fu={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 n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,s,i,l,c]=JSON.parse(e);return t({join_ref:n,ref:s,topic:i,event:l,payload:c})}},binaryEncode(e){let{join_ref:t,ref:n,event:s,topic:i,payload:l}=e,c=this.META_LENGTH+t.length+n.length+i.length+s.length,d=new ArrayBuffer(this.HEADER_LENGTH+c),f=new DataView(d),h=0;f.setUint8(h++,this.KINDS.push),f.setUint8(h++,t.length),f.setUint8(h++,n.length),f.setUint8(h++,i.length),f.setUint8(h++,s.length),Array.from(t,m=>f.setUint8(h++,m.charCodeAt(0))),Array.from(n,m=>f.setUint8(h++,m.charCodeAt(0))),Array.from(i,m=>f.setUint8(h++,m.charCodeAt(0))),Array.from(s,m=>f.setUint8(h++,m.charCodeAt(0)));var g=new Uint8Array(d.byteLength+l.byteLength);return g.set(new Uint8Array(d),0),g.set(new Uint8Array(l),d.byteLength),g.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,s);case this.KINDS.reply:return this.decodeReply(e,t,s);
19case this.KINDS.broadcast:return this.decodeBroadcast(e,t,s)}},decodePush(e,t,n){let s=t.getUint8(1),i=t.getUint8(2),l=t.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,d=n.decode(e.slice(c,c+s));c=c+s;let f=n.decode(e.slice(c,c+i));c=c+i;let h=n.decode(e.slice(c,c+l));c=c+l;let g=e.slice(c,e.byteLength);return{join_ref:d,ref:null,topic:f,event:h,payload:g}},decodeReply(e,t,n){let s=t.getUint8(1),i=t.getUint8(2),l=t.getUint8(3),c=t.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,f=n.decode(e.slice(d,d+s));d=d+s;let h=n.decode(e.slice(d,d+i));d=d+i;let g=n.decode(e.slice(d,d+l));d=d+l;let m=n.decode(e.slice(d,d+c));d=d+c;let v=e.slice(d,e.byteLength),b={status:m,response:v};return{join_ref:f,ref:h,topic:g,event:ts.reply,payload:b}},decodeBroadcast(e,t,n){let s=t.getUint8(1),i=t.getUint8(2),l=this.HEADER_LENGTH+2,c=n.decode(e.slice(l,l+s));l=l+s;let d=n.decode(e.slice(l,l+i));l=l+i;let f=e.slice(l,e.byteLength);return{join_ref:null,ref:null,topic:c,event:d,payload:f}}},P4=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||A4,this.transport=t.transport||_r.WebSocket||Yi,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=_r&&_r.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Fu.encode.bind(Fu),this.defaultDecoder=Fu.decode.bind(Fu),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!==Yi?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;ro&&ro.addEventListener&&(ro.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),s=this.connectClock)}),ro.addEventListener("pageshow",i=>{s===this.connectClock&&(s=null,this.connect())}),ro.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=i=>t.rejoinAfterMs?t.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>t.reconnectAfterMs?t.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(i,l,c)=>{console.log(`${i}: ${l}`,c)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=$l(t.params||{}),this.endPoint=`${e}/${Tm.websocket}`,this.vsn=t.vsn||k4,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Lx(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Yi}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=Td.appendParams(Td.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,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=$l(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Yi?this.connectWithF
vendor: 4,353 bytes, line 19
19allback(Yi,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}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(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let s=this.onMessage(i=>{i.ref===t&&(this.off([s]),e(Date.now()-n))});return!0}transportName(e){return e===Yi?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${km}${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 n=!1,s=!0,i,l,c=this.transportName(e),d=f=>{this.log("transport",`falling back to ${c}...`,f),this.off([i,l]),s=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return d("memorized");this.fallbackTimer=setTimeout(d,t),l=this.onError(f=>{this.log("transport","error",f),s&&!n&&(clearTimeout(this.fallbackTimer),d(f))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!s){let f=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${f}`,"true"),this.log("transport",`established ${f} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,t),this.ping(f=>{this.log("transport","connected to primary after",f),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(),C4,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const s=this.conn;this.waitForBufferDone(s,()=>{t?s.close(t,n||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===xr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}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,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
19triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(ts.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case xr.connecting:return"connecting";case xr.open:return"open";case xr.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(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new N4(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:s,ref:i,join_ref:l}=e;this.log("push",`${t} ${n} (${l}, ${i})`,s)}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:n,event:s,payload:i,ref:l,join_ref:c}=t;if(l&&l===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",d)}catch(f){this.log("error","error in heartbeat callback",f)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${n} ${s} ${l&&"("+l+")"||""}`.trim(),i);for(let d=0;d<this.channels.length;d++){const f=this.channels[d];f.isMember(n,s,i,c)&&f.trigger(s,i,l,c)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,s])=>{try{s(...t)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Bl{constructor(t,n){const s=L4(n);this.presence=new D4(t.getChannel(),s),this.presence.onJoin((i,l,c)=>{const d=Bl.onJoinPayload(i,l,c);t.getChannel().trigger("presence",d)}),this.presence.onLeave((i,l,c)=>{const d=Bl.onLeavePayload(i,l,c);t.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Bl.transformState(this.presence.state)}static transformState(t){return t=M4(t),Object.getOwnPropertyNames(t).reduce((n,s)=>{const i=t[s];return n[s]=hd(i),n},{})}static onJoinPayload(t,n,s){const i=Yw(n),l=hd(s);return{event:"join",key:t,currentPresences:i,newPresences:l}}static onLeavePayload(t,n,s){const i=Yw(n),l=hd(s);return{event:"leave",key:t,currentPresences:i,leftPresences:l}}}function hd(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function M4(e){return JSON.parse(JSON.stringify(e))}function L4(e){return e?.events&&{events:e.events}}function Yw(e){return e?.metas?hd(e):[]}var Ww;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Ww||(Ww={}));class I4{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Bl(this.channel.channelAdapter,n)}}function U4(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
19if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class z4{constructor(t,n,s){const i=$4(s);this.channel=t.getSocket().channel(n,i),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,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}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,n,s){let i;try{i=this.channel.push(t,n,s)}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>v4){const l=this.channel.pushBuffer.shift();l.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${l.event}`,l.payload())}return i}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Ys.joined}isJoined(){return this.state===Ys.joined}isJoining(){return this.state===Ys.joining}isClosed(){return this.state===Ys.closed}isLeaving(){return this.state===Ys.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function $4(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const B4=/[,()"\\]/,H4=e=>B4.test(e)||e!==e.trim(),q4=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Qw=e=>{const t=e===null?"null":String(e);return H4(t)?q4(t):t},F4=e=>e===null?"null":String(e),V4=(e,t)=>{if(e==="in"){const n=Array.isArray(t)?t:[t];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(i=>Qw(i)).join(",")})`}return e==="is"?`is.${F4(t)}`:`${e}.${Qw(t)}`};class G4{constructor(){this.filters=[]}add(t,n,s,i=!1){const l=i?"not.":"";return this.filters.push(`${t}=${l}${V4(n,s)}`),this}eq(t,n){return this.add(t,"eq",n)}neq(t,n){return this.add(t,"neq",n)}gt(t,n){return this.add(t,"gt",n)}gte(t,n){return this.add(t,"gte",n)}lt(t,n){return this.add(t,"lt",n)}lte(t,n){return this.add(t,"lte",n)}in(t,n){return this.add(t,"in",n)}like(t,n){return this.add(t,"like",n)}ilike(t,n){return this.add(t,"ilike",n)}match(t,n){return this.add(t,"match",n)}imatch(t,n){return this.add(t,"imatch",n)}is(t,n){return this.add(t,"is",n)}isDistinct(t,n){return this.add(t,"isdistinct",n)}not(t,n,s){return this.add(t,n,s,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Zw;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Zw||(Zw={}));var co;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(co||(co={}));var ns;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ns||(ns={}));class Hl{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,n={config:{}},s){var i,l;if(this.topic=t,this.params=n,this.socket=s,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new z4(this.socket.socketAdapter,t,this.params),this.presence=new I4(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Mx(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((l=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||l===void 0)&&l.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var s,i,l;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:d,private:f}}=this.params,h=(i=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(b=>b.filter))!==null&&i!==void 0?i:[],g=!!this.bindings[co.PRESENCE]&&this.bindings[co.PRESENCE].length>0||((l=this.params.config.presence)===null||l===void 0?void 0:l.enabled)===!0,m={},v={broadcast:c,presence:Object.assign(Object.assign({},d),{enabled:g}),postgres_changes:h,private:f};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this._onError(b=>{t?.(ns.CHANNEL_ERROR,U4(b))}),this._onClose(()=>t?.(ns.CLOSED)),this.updateJoinPayload(Object.assign({config:v},m)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:b})=>{if(this.socket._isManualToken()||this.socket.setAuth(),b===void 0){t?.(ns.SUBSCRIBED);return}this._updatePostgresBindings(b,t)}).receive("error",b=>{this.state=Ys.errored;const S=Object.values(b).join(", ")||"error";t?.(ns.CHANNEL_ERROR,new Error(S,{cause:b}))}).receive("timeout",()=>{t?.(ns.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var s;const i=this.bindings.postgres_changes,l=(s=i?.length)!==null&&s!==void 0?s:0,c=[];for(let d=0;d<l;d++){const f=i[d],{filter:{event:h,schema:g,table:m,filter:v}}=f,b=t&&t[d];if(b&&b.event===h&&Hl.isFilterValueEqual(b.schema,g)&&Hl.isFilterValueEqual(b.table,m)&&Hl.isFilterValueEqual(b.filter,v))c.push(Object.assign(Object.assign({},f),{id:b.id}));else{this.unsubscribe(),this.state=Ys.errored,n?.(ns.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Ys.errored&&n&&n(ns.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,s){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),l=t===co.PRESENCE||t===co.POSTGRES_CHANGES;if(i&&l)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,n,s)}async httpSend(t,n,s={}){var i;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const l=n instanceof ArrayBuffer||ArrayBuffer.isView(n),c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":l?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&d.searchParams.set("private","true");const f={method:"POST",headers:c,body:l?n:JSON.stringify(n)},h=await this._fetchWithTimeout(d.toString(),f,(i=s.timeout)!==null&&i!==void 0?i:this.timeout);if(h.status===202)return{success:!0};if(h.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/realt
19ime-js/migrations/httpsend-server-version.md"));let g=h.statusText;try{const m=await h.json();g=m.error||m.message||g}catch{}return Promise.reject(new Error(g))}async send(t,n={}){var s,i;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:l,payload:c}=t,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:l,payload:c,private:this.private}]})};try{const h=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);return await((i=h.body)===null||i===void 0?void 0:i.cancel()),h.ok?"ok":"error"}catch(h){return h instanceof Error&&h.name==="AbortError"?"timed out":"error"}}else return new Promise(l=>{var c,d,f;const h=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((f=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||f===void 0)&&f.ack)&&l("ok"),h.receive("ok",()=>l("ok")),h.receive("error",()=>l("error")),h.receive("timeout",()=>l("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,s){const i=new AbortController,l=setTimeout(()=>i.abort(),s),c=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(l),c}_on(t,n,s){const i=t.toLocaleLowerCase(),l=n?.filter;(l instanceof G4||typeof l=="object"&&l!==null&&typeof l.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:l.build()}));const c=this.channelAdapter.on(t,s),d={type:i,filter:n,callback:s,ref:c};return this.bindings[i]?this.bindings[i].push(d):this.bindings[i]=[d],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,s)=>{var i,l,c,d,f,h,g;const m=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(m,s))return!1;const v=(i=this.bindings[m])===null||i===void 0?void 0:i.find(b=>b.ref===t.ref);if(!v)return!0;if(["broadcast","presence","postgres_changes"].includes(m))if("id"in v){const b=v.id,S=(l=v.filter)===null||l===void 0?void 0:l.event;return b&&((c=n.ids)===null||c===void 0?void 0:c.includes(b))&&(S==="*"||S?.toLocaleLowerCase()===((d=n.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const b=(h=(f=v?.filter)===null||f===void 0?void 0:f.event)===null||h===void 0?void 0:h.toLocaleLowerCase();return b==="*"||b===((g=n?.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return v.type.toLocaleLowerCase()===m})}_notThisChannelEvent(t,n){const{close:s,error:i,leave:l,join:c}=Dx;return n&&[s,i,l,c].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,s)=>{if(typeof n=="object"&&"ids"in n){const i=n.data,{schema:l,table:c,commit_timestamp:d,type:f,errors:h}=i;return Object.assign(Object.assign({},{schema:l,table:c,commit_timestamp:d,eventType:f,new:{},old:{},errors:h}),this._getPayloadRecords(i))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const s of t.bindings[n])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Kw(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Kw(t.columns,t.old_record)),n}}class K4{constructor(t,n){this.socket=new P4(t,n)}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,n,s,i=1e4){return new Promise(l=>{setTimeout(()=>l("timeout"),i),this.socket.disconnect(()=>{t(),l("ok")},n,s)})}push(t){this.socket.push(t)}log(t,n,s){this.socket.log(t,n,s)}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()==Em.connecting}isDisconnecting(){return this.socket.connectionState()==Em.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Xw={HEARTBEAT_INTERVAL:25e3},Y4=[1e3,2e3,5e3,1e4],W4=1e4;function Q4(){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 n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function Z4(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Q4()}const X4=`
20  addEventListener("message", (e) => {
21    if (e.data.event === "start") {
22      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
23    }
24  });`;class J4{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,n){var s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
24,this.ref=0,this.serializer=new b4,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=l=>l?(...c)=>l(...c):(...c)=>fetch(...c),!(!((s=n?.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const i=this._initializeOptions(n);this.socketAdapter=new K4(t,i),this.httpEndpoint=Mx(t),this.fetch=this._resolveFetch(n?.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 n=t.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async s=>{const i=await s.unsubscribe();return s.teardown(),i}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,s){this.socketAdapter.log(t,n,s)}connectionState(){return this.socketAdapter.connectionState()||Em.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const s=`realtime:${t}`,i=this.getChannels().find(l=>l.topic===s);if(i)return i;{const l=new Hl(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(l),l}}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(n=>n.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}
24this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,s=!1;if(t)n=t,s=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(i=>{const l={access_token:n,version:p4};n&&i.updateJoinPayload(l),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(Dx.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),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(n,s)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),t&&t(n,s))}}_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=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.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 n;if(t)n=t;else{const s=new Blob([X4],{type:"application/javascript"});n=URL.createObjectURL(s)}return n}_initializeOptions(t){var n,s,i,l,c,d,f,h,g,m,v,b;this.worker=(n=t?.worker)!==null&&n!==void 0?n:!1,this.accessToken=(s=t?.accessToken)!==null&&s!==void 0?s:null;const S={};S.timeout=(i=t?.timeout)!==null&&i!==void 0?i:y4,S.heartbeatIntervalMs=(l=t?.heartbeatIntervalMs)!==null&&l!==void 0?l:Xw.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=t?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((d=t?.heartbeatIntervalMs)!==null&&d!==void 0?d:Xw.HEARTBEAT_INTERVAL),S.transport=(f=t?.transport)!==null&&f!==void 0?f:f4.getWebSocketConstructor(),S.params=t?.params,S.logger=t?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),S.sessionStorage=(h=t?.sessionStorage)!==null&&h!==void 0?h:Z4(),S.reconnectAfterMs=(g=t?.reconnectAfterMs)!==null&&g!==void 0?g:(A=>Y4[A-1]||W4);let _,x;const R=(m=t?.vsn)!==null&&m!==void 0?m:g4;switch(R){case m4:_=(A,C)=>C(JSON.stringify(A)),x=(A,C)=>C(JSON.parse(A));break;case jx:_=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=R,S.encode=(v=t?.encode)!==null&&v!==void 0?v:_,S.decode=(b=t?.decode)!==null&&b!==void 0?b:x,S.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
24var Xl=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 eD(e,t,n){const s=new URL(t,e);if(n)for(const[i,l]of Object.entries(n))l!==void 0&&s.searchParams.set(i,l);return s.toString()}async function tD(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 nD(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:s,query:i,body:l,headers:c}){const d=eD(e.baseUrl,s,i),f=await tD(e.auth),h=await t(d,{method:n,headers:{...l?{"Content-Type":"application/json"}:{},...f,...c},body:l?JSON.stringify(l):void 0}),g=await h.text(),m=(h.headers.get("content-type")||"").includes("application/json"),v=m&&g?JSON.parse(g):g;if(!h.ok){const b=m?v:void 0,S=b?.error;throw new Xl(S?.message??`Request failed with status ${h.status}`,{status:h.status,icebergType:S?.type,icebergCode:S?.code,details:b})}return{status:h.status,headers:h.headers,data:v}}}}function Vu(e){return e.join("�")}var rD=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Vu(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Vu(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Vu(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Vu(e.namespace)}`}),!0}catch(t){if(t instanceof Xl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Xl&&n.status===409)return;throw n}}};function Wi(e){return e.join("�")}var sD=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wi(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Wi(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Wi(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Wi(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/${Wi(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/${Wi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Xl&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Xl&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},aD=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=nD({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new rD(this.client,t),this.tableOps=new sD(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)}
24async 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 Jl(e){"@babel/helpers - typeof";return Jl=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},Jl(e)}function iD(e,t){if(Jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Jl(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oD(e){var t=iD(e,"string");return Jl(t)=="symbol"?t:t+""}function lD(e,t,n){return(t=oD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jw(Object(n),!0).forEach(function(s){lD(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jw(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}var ef=class extends Error{constructor(e,t="storage",n,s){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function tf(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Am=class extends ef{constructor(e,t,n,s="storage"){super(e,s,t,n),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return Te({},super.toJSON())}},Ix=class extends ef{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function kd(e,t,n){const s=Te({},e),i=t.toLowerCase();for(const l of Object.keys(s))l.toLowerCase()===i&&delete s[l];return s[i]=n,s}function cD(e){const t={};for(const[n,s]of Object.entries(e))t[n.toLowerCase()]=s;return t}const uD=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),dD=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)},Cm=e=>{if(Array.isArray(e))return e.map(n=>Cm(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,s])=>{const i=n.replace(/([-_][a-z])/gi,l=>l.toUpperCase().replace(/[-_]/g,""));t[i]=Cm(s)}),t},fD=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),e_=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 n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},hD=async(e,t,n,s)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const i=e;let l=parseInt(String(i.status),10);Number.isFinite(l)||(l=500),i.json().then(c=>{const d=c?.statusCode||c?.code||l+"";t(new Am(e_(c),l,d,s))}).catch(()=>{const c=l+"";t(new Am(i.statusText||`HTTP ${l} error`,l,c,s))})}else t(new Ix(e_(e),e,s))},pD=(e,t,n,s)=>{const i={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!s)return Te(Te({},i),n);if(dD(s)){var l;const c=t?.headers||{};let d;for(const[f,h]of Object.entries(c))f.toLowerCase()==="content-type"&&(d=h);i.headers=kd(c,"Content-Type",(l=d)!==null&&l!==void 0?l:"application/json"),i.body=JSON.stringify(s)}else i.body=s;return t?.duplex&&(i.duplex=t.duplex),Te(Te({},i),n)};async function Nl(e,t,n,s,i,l,c){return new Promise((d,f)=>{e(n,pD(t,s,i,l)).then(h=>{if(!h.ok)throw h;if(s?.noResolveJson)return h;if(c==="vectors"){const g=h.headers.get("content-type");if(h.headers.get("content-length")==="0"||h.status===204)return{};if(!g||!g.includes("application/json"))return{}}return h.json()}).then(h=>
24d(h)).catch(h=>hD(h,f,s,c))})}function Ux(e="storage"){return{get:async(t,n,s,i)=>Nl(t,"GET",n,s,i,void 0,e),post:async(t,n,s,i,l)=>Nl(t,"POST",n,i,l,s,e),put:async(t,n,s,i,l)=>Nl(t,"PUT",n,i,l,s,e),head:async(t,n,s,i)=>Nl(t,"HEAD",n,Te(Te({},s),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,s,i,l)=>Nl(t,"DELETE",n,i,l,s,e)}}const mD=Ux("storage"),{get:ec,post:rr,put:Om,head:gD,remove:tc}=mD,Cn=Ux("vectors");var To=class{constructor(e,t={},n,s="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=cD(t),this.fetch=uD(n),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=kd(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(tf(n))return{data:null,error:n};throw n}}};let zx;zx=Symbol.toStringTag;var yD=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[zx]="StreamDownloadBuilder",this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(tf(t))return{data:null,error:t};throw t}}};let $x;$x=Symbol.toStringTag;var vD=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[$x]="BlobDownloadBuilder",this.promise=null}asStream(){return new yD(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(tf(t))return{data:null,error:t};throw t}}};const Fp={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},t_={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var bD=class extends To{constructor(e,t={},n,s){super(e,t,s,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,s){var i=this;return i.handleOperation(async()=>{let l;const c=Te(Te({},t_),s);let d=Te(Te({},i.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const f=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),f&&l.append("metadata",i.encodeMetadata(f)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),f&&!l.has("metadata")&&l.append("metadata",i.encodeMetadata(f))):(l=n,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,f&&(d["x-metadata"]=i.toBase64(i.encodeMetadata(f))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),s?.headers)for(const[v,b]of Object.entries(s.headers))d=kd(d,v,b);const h=i._removeEmptyFolders(t),g=i._getFinalPath(h),m=await(e=="PUT"?Om:rr)(i.fetch,`${i.url}/object/${g}`,l,Te({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{path:h,id:m.Id,fullPath:m.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,s){var i=this;const l=i._removeEmptyFolders(e),c=i._getFinalPath(l),d=new URL(i.url+`/object/upload/sign/${c}`);return d.searchParams.set("token",t),i.handleOperation(async()=>{let f;const h=Te(Te({},t_),s);let g=Te(Te({},i.headers),{"x-upsert":String(h.upsert)});const m=h.metadata;if(typeof Blob<"u"&&n instanceof Blob?(f=new FormData,f.append("cacheControl",h.cacheControl),m&&f.append("metadata",i.encodeMetadata(m)),f.append("",n)):typeof FormData<"u"&&n instanceof FormData?(f=n,f.has("cacheControl")||f.append("cacheControl",h.cacheControl),m&&!f.has("metadata")&&f.append("metadata",i.encodeMetadata(m))):(f=n,g["cache-control"]=`max-age=${h.cacheControl}`,g["content-type"]=h.contentType,m&&(g["x-metadata"]=i.toBase64(i.encodeMetadata(m))),(typeof ReadableStream<"u"&&f instanceof ReadableStream||f&&typeof f=="object"&&"pipe"in f&&typeof f.pipe=="function")&&!h.duplex&&(h.duplex="half")),s?.headers)for(const[v,b]of Object.entries(s.headers))g=kd(g,v,b);return{path:l,fullPath:(await Om(i.fetch,d.toString(),f,Te({headers:g},h?.duplex?{duplex:h.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=Te({},n.headers);t?.upsert&&(i["x-upsert"]="true");const l=await rr(n.fetch,`${n.url}/object/upload/sign/${s}`,{},{headers:i}),c=new URL(n.url+l.url),d=c.searchParams.get("token");if(!d)throw new ef("No token returned by API");return{signedUrl:c.toString(),path:e,token:d}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var s=this;return s.handleOperation(async()=>await rr(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,de
24stinationBucket:n?.destinationBucket},{headers:s.headers}))}async copy(e,t,n){var s=this;return s.handleOperation(async()=>({path:(await rr(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(e,t,n){var s=this;return s.handleOperation(async()=>{let i=s._getFinalPath(e);const l=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let c=await rr(s.fetch,`${s.url}/object/sign/${i}`,Te({expiresIn:t},l?{transform:n.transform}:{}),{headers:s.headers});const d=new URLSearchParams;n?.download&&d.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&d.set("cacheNonce",String(n.cacheNonce));const f=d.toString();return{signedUrl:encodeURI(`${s.url}${c.signedURL}${f?`&${f}`:""}`)}})}async createSignedUrls(e,t,n){var s=this;return s.handleOperation(async()=>{const i=await rr(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:t,paths:e},{headers:s.headers}),l=new URLSearchParams;n?.download&&l.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&l.set("cacheNonce",String(n.cacheNonce));const c=l.toString();return i.map(d=>Te(Te({},d),{},{signedUrl:d.signedURL?encodeURI(`${s.url}${d.signedURL}${c?`&${c}`:""}`):null}))})}download(e,t,n){const s=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set("cacheNonce",String(t.cacheNonce));const l=i.toString(),c=this._getFinalPath(e),d=()=>ec(this.fetch,`${this.url}/${s}/${c}${l?`?${l}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new vD(d,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Cm(await ec(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await gD(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(tf(i)){var s;const l=i instanceof Am?i.status:i instanceof Ix?(s=i.originalError)===null||s===void 0?void 0:s.status:void 0;if(l!==void 0&&[400,404].includes(l))return{data:!1,error:i}}throw i}}getPublicUrl(e,t){const n=this._getFinalPath(e),s=new URLSearchParams;t?.download&&s.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(s,t.transform),t?.cacheNonce!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),l=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${n}`)+(i?`?${i}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await tc(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var s=this;return s.handleOperation(async()=>{const i=s._getFinalPath(e),l=new URLSearchParams;t?.transformations&&l.set("transformations","true");const c=l.toString();return await tc(s.fetch,`${s.url}/cdn/${i}${c?`?${c}`:""}`,{},{headers:s.headers},n)})}async list(e,t,n){var s=this;return s.handleOperation(async()=>{const i=t?.sortBy?Te(Te({},Fp.sortBy),t.sortBy):Fp.sortBy,l=Te(Te(Te({},Fp),t),{},{sortBy:i,prefix:e||""});return await rr(s.fetch,`${s.url}/object/list/${s.bucketId}`,l,{headers:s.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const s=Te({},e);return await rr(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,s,{headers:n.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
24ity",t.quality.toString()),e}};const wD="2.110.5",mc={"X-Client-Info":`storage-js/${wD}`};var _D=class extends To{constructor(e,t={},n,s){const i=new URL(e);s?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const l=i.href.replace(/\/$/,""),c=Te(Te({},mc),t);super(l,c,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await ec(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ec(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await rr(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Om(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await rr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await tc(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var s=this;return s.handleOperation(async()=>{const i=new URLSearchParams;t?.transformations&&i.set("transformations","true");const l=i.toString();return await tc(s.fetch,`${s.url}/cdn/${e}${l?`?${l}`:""}`,{},{headers:s.headers},n)})}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():""}},SD=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=Te(Te({},mc),t);super(s,i,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await rr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;e?.limit!==void 0&&n.set("limit",e.limit.toString()),e?.offset!==void 0&&n.set("offset",e.offset.toString()),e?.sortColumn&&n.set("sortColumn",e.sortColumn),e?.sortOrder&&n.set("sortOrder",e.sortOrder),e?.search&&n.set("search",e.search);const s=n.toString(),i=s?`${t.url}/bucket?${s}`:`${t.url}/bucket`;return await ec(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await tc(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!fD(e))throw new ef("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 n=new aD({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(n,{get(i,l){const c=i[l];return typeof c!="function"?c:async(...d)=>{try{return{data:await c.apply(i,d),error:null}}catch(f){if(s)throw f;return{data:null,error:f}}}}})}},xD=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=Te(Te({},mc),{},{"Content-Type":"application/json"},t);super(s,i,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Cn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Cn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Cn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Cn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},ED=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=Te(Te({},mc),{},{"Content-Type":"application/json"},t);super(s,i,n,"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 Cn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Cn.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");
24if(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 Cn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Cn.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 Cn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},RD=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=Te(Te({},mc),{},{"Content-Type":"application/json"},t);super(s,i,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Cn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Cn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Cn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Cn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},TD=class extends RD{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new kD(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},kD=class extends xD{constructor(e,t,n,s){super(e,t,s),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,Te(Te({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,Te(Te({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new AD(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},AD=class extends ED{constructor(e,t,n,s,i){super(e,t,i),this.vectorBucketName=n,this.indexName=s}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,Te(Te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,Te(Te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,Te(Te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,Te(Te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,Te(Te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},CD=class extends _D{constructor(e,t={},n,s){super(e,t,n,s)}from(e){return new bD(this.url,this.headers,e,this.fetch)}get vectors(){return new TD(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new SD(this.url+"/iceberg",this.headers,this.fetch)}};const Bx="2.110.5",rs=30*1e3,Pl=3,Vp=Pl*rs,OD=2*rs,ND="http://localhost:9999",jD="supabase.auth.token",DD={"X-Client-Info":`gotrue-js/${Bx}`},Nm="X-Supabase-Api-Version",Hx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},PD=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,MD=600*1e3;class nc extends Error{constructor(t,n,s){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ce(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class LD extends nc{constructor(t,n,s){super(t,n,s),this.name="AuthApiError",this.status=n,this.code=s}}function ID(e){return ce(e)&&e.name==="AuthApiError"}class sr extends nc{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Or extends nc{constructor(t,n,s,i){super(t,s,i),this.name=n,this.status=s}}class Mt extends Or{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Gu(e){return ce(e)&&e.name==="AuthSessionMissingError"}class Qi extends Or{constructor(){super("Auth session or user missing","AuthInvalidToken
24ResponseError",500,void 0)}}class Ku extends Or{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Yu extends Or{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function UD(e){return ce(e)&&e.name==="AuthImplicitGrantRedirectError"}class n_ extends Or{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class zD extends Or{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 jm extends Or{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function r_(e){return ce(e)&&e.name==="AuthRetryableFetchError"}class s_ extends Or{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function $D(e){return ce(e)&&e.name==="AuthRefreshDiscardedError"}class a_ extends Or{constructor(t,n,s){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Ad extends Or{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Cd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),i_=` 	
25\r=`.split(""),BD=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<i_.length;t+=1)e[i_[t].charCodeAt(0)]=-2;for(let t=0;t<Cd.length;t+=1)e[Cd[t].charCodeAt(0)]=t;return e})();function o_(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;n(Cd[s]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;n(Cd[s]),t.queuedBits-=6}}function qx(e,t,n){const s=BD[e];if(s>-1)for(t.queue=t.queue<<6|s,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function l_(e){const t=[],n=c=>{t.push(String.fromCodePoint(c))},s={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},l=c=>{FD(c,s,n)};for(let c=0;c<e.length;c+=1)qx(e.charCodeAt(c),i,l);return t.join("")}function HD(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 qD(e,t){for(let n=0;n<e.length;n+=1){let s=e.charCodeAt(n);if(s>55295&&s<=56319){const i=(s-55296)*1024&65535;s=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}HD(s,t)}}function FD(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let s=1;s<6;s+=1)if((e>>7-s&1)===0){t.utf8seq=s;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&&n(t.codepoint)}}function mo(e){const t=[],n={queue:0,queuedBits:0},s=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)qx(e.charCodeAt(i),n,s);return new Uint8Array(t)}function VD(e){const t=[];return qD(e,n=>t.push(n)),new Uint8Array(t)}function Va(e){const t=[],n={queue:0,queuedBits:0},s=i=>{t.push(i)};return e.forEach(i=>o_(i,n,s)),o_(null,n,s),t.join("")}function GD(e){return Math.round(Date.now()/1e3)+e}function KD(){return Symbol("auth-callback")}const Wt=()=>typeof window<"u"&&typeof document<"u",Ua={tested:!1,writable:!1},Fx=()=>
25{if(!Wt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ua.tested)return Ua.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ua.tested=!0,Ua.writable=!0}catch{Ua.tested=!0,Ua.writable=!1}return Ua.writable};function YD(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,l)=>{t[l]=i})}catch{}return n.searchParams.forEach((s,i)=>{t[i]=s}),t}const Vx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),WD=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",so=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Jn=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Et=async(e,t)=>{await e.removeItem(t)};class nf{constructor(){this.promise=new nf.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}nf.promiseConstructor=Promise;function Wu(e){const t=e.split(".");if(t.length!==3)throw new Ad("Invalid JWT structure");for(let s=0;s<t.length;s++)if(!PD.test(t[s]))throw new Ad("JWT not in base64url format");return{header:JSON.parse(l_(t[0])),payload:JSON.parse(l_(t[1])),signature:mo(t[2]),raw:{header:t[0],payload:t[1]}}}async function QD(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ZD(e,t){return new Promise((s,i)=>{(async()=>{for(let l=0;l<1/0;l++)try{const c=await e(l);if(!t(l,null,c)){s(c);return}}catch(c){if(!t(l,c)){i(c);return}}})()})}function XD(e){return("0"+e.toString(16)).substr(-2)}function JD(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=n.length;let i="";for(let l=0;l<56;l++)i+=n.charAt(Math.floor(Math.random()*s));return i}return crypto.getRandomValues(t),Array.from(t,XD).join("")}async function e3(e){const n=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(s);return Array.from(i).map(l=>String.fromCharCode(l)).join("")}async function t3(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 n=await e3(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function za(e,t,n=!1){const s=JD();let i=s;n&&(i+="/recovery"),await so(e,`${t}-code-verifier`,i);const l=await t3(s);return[l,s===l?"plain":"s256"]}const n3=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function r3(e){const t=e.headers.get(Nm);if(!t||!t.match(n3))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function s3(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 a3(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 i3=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Zr(e){if(!i3.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function tr(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 Gp(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const s=n.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function o3(e,t){return new Proxy(e,{get:(n,s,i)=>{if(s==="__isInsecureUserWarningProxy")return!0;
25if(typeof s=="symbol"){const l=s.toString();if(l==="Symbol(Symbol.toPrimitive)"||l==="Symbol(Symbol.toStringTag)"||l==="Symbol(util.inspect.custom)"||l==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,s,i)}return!t.value&&typeof s=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,s,i)}})}function c_(e){return JSON.parse(JSON.stringify(e))}const Ha=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)},l3=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function u_(e){var t;if(!WD(e))throw new jm(Ha(e),0);if(l3.includes(e.status))throw new jm(Ha(e),e.status);let n;try{n=await e.json()}catch(l){throw new sr(Ha(l),l)}let s;const i=r3(e);if(i&&i.getTime()>=Hx["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?s=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(s=n.error_code),s){if(s==="weak_password")throw new a_(Ha(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(s==="session_not_found")throw new Mt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((l,c)=>l&&typeof c=="string",!0))throw new a_(Ha(n),e.status,n.weak_password.reasons);throw new LD(Ha(n),e.status||500,s)}const c3=(e,t,n,s)=>{const i={method:e,headers:t?.headers||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),i.body=JSON.stringify(s),Object.assign(Object.assign({},i),n))};async function ye(e,t,n,s){var i;const l=Object.assign({},s?.headers);l[Nm]||(l[Nm]=Hx["2024-01-01"].name),s?.jwt&&(l.Authorization=`Bearer ${s.jwt}`);const c=(i=s?.query)!==null&&i!==void 0?i:{};s?.redirectTo&&(c.redirect_to=s.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",f=await u3(e,t,n+d,{headers:l,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(f):{data:Object.assign({},f),error:null}}async function u3(e,t,n,s,i,l){const c=c3(t,s,i,l);let d;try{d=await e(n,Object.assign({},c))}catch(f){throw console.error(f),new jm(Ha(f),0)}if(d.ok||await u_(d),s?.noResolveJson)return d;try{return await d.json()}catch(f){await u_(f)}}function Fn(e){var t;let n=null;h3(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=GD(e.expires_in)));const s=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:n,user:s},error:null}}function d_(e){const t=Fn(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((n,s)=>n&&typeof s=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ws(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function d3(e){return{data:e,error:null}}function f3(e){const{action_link:t,email_otp:n,hashed_token:s,redirect_to:i,verification_type:l}=e,c=Ro(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:t,email_otp:n,hashed_token:s,redirect_to:i,verification_type:l},f=Object.assign({},c);return{data:{properties:d,user:f},error:null}}function f_(e){return e}function h3(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Kp=["global","local","others"];class p3{constructor({url:t="",headers:n={},fetch:s,experimental:i}){this.url=t,this.headers=n,this.fetch=Vx(s),this.experimental=i??{},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)}}
25async signOut(t,n=Kp[0]){if(Kp.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Kp.join(", ")}`);try{return await ye(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(s){if(ce(s))return{data:null,error:s};throw s}}async inviteUserByEmail(t,n={}){try{return await ye(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ws})}catch(s){if(ce(s))return{data:{user:null},error:s};throw s}}async generateLink(t){try{const{options:n}=t,s=Ro(t,["options"]),i=Object.assign(Object.assign({},s),n);return"newEmail"in s&&(i.new_email=s?.newEmail,delete i.newEmail),await ye(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:f3,redirectTo:n?.redirectTo})}catch(n){if(ce(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ws})}catch(n){if(ce(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,s,i,l,c,d,f;try{const h={nextPage:null,lastPage:0,total:0},g=await ye(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&s!==void 0?s:"",per_page:(l=(i=t?.perPage)===null||i===void 0?void 0:i.toString())!==null&&l!==void 0?l:""},xform:f_});if(g.error)throw g.error;const m=await g.json(),v=(c=g.headers.get("x-total-count"))!==null&&c!==void 0?c:0,b=(f=(d=g.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return b.length>0&&(b.forEach(S=>{const _=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(S.split(";")[1].split("=")[1]);h[`${x}Page`]=_}),h.total=parseInt(v)),{data:Object.assign(Object.assign({},m),h),error:null}}catch(h){if(ce(h))return{data:{users:[]},error:h};throw h}}async getUserById(t){Zr(t);try{return await ye(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ws})}catch(n){if(ce(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Zr(t);try{return await ye(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Ws})}catch(s){if(ce(s))return{data:{user:null},error:s};throw s}}async deleteUser(t,n=!1){Zr(t);try{return await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ws})}catch(s){if(ce(s))return{data:{user:null},error:s};throw s}}async _listFactors(t){Zr(t.userId);try{const{data:n,error:s}=await ye(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:s}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Zr(t.userId),Zr(t.id);try{return{data:await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,s,i,l,c,d,f;try{const h={nextPage:null,lastPage:0,total:0},g=await ye(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&s!==void 0?s:"",per_page:(l=(i=t?.perPage)===null||i===void 0?void 0:i.toString())!==null&&l!==void 0?l:""},xform:f_});if(g.error)throw g.error;const m=await g.json(),v=(c=g.headers.get("x-total-count"))!==null&&c!==void 0?c:0,b=(f=(d=g.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return b.length>0&&(b.forEach(S=>{const _=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(S.split(";")[1].split("=")[1]);h[`${x}Page`]=_}),h.total=parseInt(v)),{data:Object.assign(Object.assign({},m),h),error:null}}catch(h){if(ce(h))return{data:{clients:[]},error:h};throw h}}async _createOAuthClient(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await ye(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await ye(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(ce(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(t){try{return await ye(this.fetch,"DELET
25E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t?.type&&(n.type=t.type),await ye(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:s=>{var i;return{data:{providers:(i=s?.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(n){if(ce(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await ye(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await ye(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(ce(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(t){try{return await ye(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){tr(this.experimental),Zr(t.userId);try{return await ye(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){tr(this.experimental),Zr(t.userId),Zr(t.passkeyId);try{return await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}}function h_(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&Fx()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class m3 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function g3(){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 Gx(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function y3(e){return parseInt(e,16)}function v3(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,s=>s.toString(16).padStart(2,"0")).join("")}function b3(e){var t;const{chainId:n,domain:s,expirationTime:i,issuedAt:l=new Date,nonce:c,notBefore:d,requestId:f,resources:h,scheme:g,uri:m,version:v}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!s)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!m)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(v!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${v}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
26`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const b=Gx(e.address),S=g?`${g}://${s}`:s,_=e.statement?`${e.statement}
27`:"",x=`${S} wants you to sign in with your Ethereum account:
28${b}
29
30${_}`;let R=`URI: ${m}
31Version: ${v}
32Chain ID: ${n}${c?`
33Nonce: ${c}`:""}
34Issued At: ${l.toISOString()}`;if(i&&(R+=`
35Expiration Time: ${i.toISOString()}`),d&&(R+=`
36Not Before: ${d.toISOString()}`),f&&(R+=`
37Request ID: ${f}`),h){let A=`
38Resources:`;for(const C of h){if(!C||typeof C!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${C}`);A+=`
39- ${C}`}R+=A}return`${x}
40${R}`}
40class Rt extends Error{constructor({message:t,code:n,cause:s,name:i}){var l;super(t,{cause:s}),this.__isWebAuthnError=!0,this.name=(l=i??(s instanceof Error?s.name:void 0))!==null&&l!==void 0?l:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Od extends Rt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function w3({error:e,options:t}){var n,s,i;const{publicKey:l}=t;if(!l)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Rt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=l.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Rt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((s=l.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Rt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=l.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Rt({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 Rt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Rt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return l.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new Rt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Rt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const c=window.location.hostname;if(Kx(c)){if(l.rp.id!==c)return new Rt({message:`The RP ID "${l.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Rt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(l.user.id.byteLength<1||l.user.id.byteLength>64)return new Rt({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 Rt({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 Rt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function _3({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Rt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Rt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const s=window.location.hostname;if(Kx(s)){if(n.rpId!==s)return new Rt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Rt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Rt({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 Rt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class S3{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}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 Dm=new S3;function p_(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:n,excludeCredentials:s}=e,i=Ro(e,["challenge","user","excludeCredentials"]),l=mo(t).buffer,c=Object.assign(Object.assign({},n),{id:mo(n.id).buffer}),d=Object.assign(Object.assign({},i),{challenge:l,user:c});if(s&&s.length>0){d.excludeCredentials=new Array(s.length);for(let f=0;f<s.length;f++){const h=s[f];d.excludeCredentials[f]=Object.assign(Object.assign({},h),{id:mo(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return d}function m_(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:n}=e,s=Ro(e,["challenge","allowCredentials"]),i=mo(t).buffer,l=Object.assign(Object.assign({}
40,s),{challenge:i});if(n&&n.length>0){l.allowCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const d=n[c];l.allowCredentials[c]=Object.assign(Object.assign({},d),{id:mo(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return l}function g_(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Va(new Uint8Array(e.response.attestationObject)),clientDataJSON:Va(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function y_(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,s=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Va(new Uint8Array(i.authenticatorData)),clientDataJSON:Va(new Uint8Array(i.clientDataJSON)),signature:Va(new Uint8Array(i.signature)),userHandle:i.userHandle?Va(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Kx(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Nd(){var e,t;return!!(Wt()&&"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 Yx(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Od("Browser returned unexpected credential type",t)}:{data:null,error:new Od("Empty credential response",t)}}catch(t){return{data:null,error:w3({error:t,options:e})}}}async function Wx(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Od("Browser returned unexpected credential type",t)}:{data:null,error:new Od("Empty credential response",t)}}catch(t){return{data:null,error:_3({error:t,options:e})}}}const x3={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},E3={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function jd(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),s={};for(const i of e)if(i)for(const l in i){const c=i[l];if(c!==void 0)if(Array.isArray(c))s[l]=c;else if(n(c))s[l]=c;else if(t(c)){const d=s[l];t(d)?s[l]=jd(d,c):s[l]=jd(c)}else s[l]=c}return s}function R3(e,t){return jd(x3,e,t||{})}function T3(e,t){return jd(E3,e,t||{})}class k3{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:n,friendlyName:s,signal:i},l){var c;try{const{data:d,error:f}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!d)return{data:null,error:f};const h=i??Dm.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:g}=d.webauthn.credential_options.publicKey;if(!g.name){const m=s;if(m)g.name=`${g.id}:${m}`;else{const b=(await this.client.getUser()).data.user,S=((c=b?.user_metadata)===null||c===void 0?void 0:c.name)||b?.email||b?.id||"User";g.name=`${g.id}:${S}`}}g.displayName||(g.displayName=g.name)}switch(d.webauthn.type){case"create":{const g=R3(d.webauthn.credential_options.publicKey,l?.create),{data:m,error:v}=await Yx({publicKey:g,signal:h});return m?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:v}}case"request":{const g=T3(d.webauthn.credential_options.publicKey,l?.request),{data:m,error:v}=await Wx(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:g,signal:h}));return m?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:m}},error:null}:{data:null,error:v}}}}catch(d){return ce(d)?{data:null,error:d}:{data:null,error:new sr("Unexpected error in challenge",d)}}}async _verify({challengeId:t,factorId:n,webauthn:s}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:s})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},l){if(!n)return{data:null,error:new nc("rpId is required for WebAuthn authentication")};try{if(!Nd())return{data:null,error:new sr("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:s},signal:i},{request:l});if(!c)return{data:null,error:d};const{webauthn:f}=c;return this._verify({factorId:t,challengeId:c.challengeId,webauthn:{type:f.type,rpId:n,rpOrigins:s,credential_response:f.credential_response}})}catch(c){return ce(c)?{data:null,error:c}:{data:null,error:new sr("Unexpected error in authenticate",c)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},l){if(!n)return{data:null,error:new nc("rpId is required for WebAuthn registration")};try{if(!Nd())return{data:null,error:new sr("Browser does not support WebAuthn",null)};const{data:c,error:d}=await this._enroll({friendlyName:t});if(!c)return await this.client.mfa.listFactors().then(g=>{var m;return(m=g.data)===null||m===void 0?void 0:m.all.find(v=>v.factor_type==="webauthn"&&v.friendly_name===t&&v.status!=="unverified")}).then(g=>g?this.client.mfa.unenroll({factorId:g?.id}):void 0),{data:null,error:d};const{data:f,error:h}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:n,rpOrigins:s},signal:i},{create:l});return f?this._verify({factorId:c.id,challengeId:f.challengeId,webauthn:{rpId:n,rpOrigins:s,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:h}}catch(c){return ce(c)?{data:null,error:c}:{data:null,error:new sr("Unexpected error in register",c)}}}}g3();const A3={url:ND,storageKey:jD,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:DD,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Zi={};class rc{get jwks(){var t,n;return(n=(t=Zi[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Zi[this.storageKey]=Object.assign(Object.assign({},Zi[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Zi[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Zi[this.storageKey]=Object.assign(Object.assign({},Zi[this.storageKey]),{cachedAt:t})}constructor(t){var n,s,i;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 l=Object.assign(Object.assign({},A3),t);if(this.storageKey=l.storageKey,this.instanceID=(n=rc.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,rc.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!l.debug,typeof l.debug=="function"&&(this.logger=l.debug),this.instanceID>
400&&Wt()){const c=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=l.persistSession,this.autoRefreshToken=l.autoRefreshToken,this.experimental=(s=l.experimental)!==null&&s!==void 0?s:{},this.admin=new p3({url:l.url,headers:l.headers,fetch:l.fetch,experimental:this.experimental}),this.url=l.url,this.headers=l.headers,this.fetch=Vx(l.fetch),this.detectSessionInUrl=l.detectSessionInUrl,this.flowType=l.flowType,this.hasCustomAuthorizationHeader=l.hasCustomAuthorizationHeader,this.throwOnError=l.throwOnError,this.lockAcquireTimeout=l.lockAcquireTimeout,l.lock!=null&&(this.lock=l.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 k3(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?(l.storage?this.storage=l.storage:Fx()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=h_(this.memoryStorage)),l.userStorage&&(this.userStorage=l.userStorage)):(this.memoryStorage={},this.storage=h_(this.memoryStorage)),Wt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c),(c.data.event==="TOKEN_REFRESHED"||c.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}l.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Bx}) ${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())();
40const n=await this.initializePromise,s=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const i of s)await this._notifyAllSubscribers(i.event,i.session,i.broadcast);return n}async _initialize(){var t;try{let n={},s="none";if(Wt()&&(n=YD(window.location.href),this._isImplicitGrantCallback(n)?s="implicit":await this._isPKCECallback(n)&&(s="pkce")),Wt()&&this.detectSessionInUrl&&s!=="none"){const{data:i,error:l}=await this._getSessionFromURL(n,s);if(l){if(this._debug("#_initialize()","error detecting session from URL",l),UD(l)){const f=(t=l.details)===null||t===void 0?void 0:t.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:l}}return{error:l}}const{session:c,redirectType:d}=i;return this._debug("#_initialize()","detected session in URL",c,"redirect type",d),await this._saveSession(c),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ce(n)?this._returnResult({error:n}):this._returnResult({error:new sr("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,s,i;try{const l=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(n=t?.options)===null||n===void 0?void 0:n.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(i=t?.options)===null||i===void 0?void 0:i.captchaToken}},xform:Fn}),{data:c,error:d}=l;if(d||!c)return this._returnResult({data:{user:null,session:null},error:d});const f=c.session,h=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:h,session:f},error:null})}catch(l){if(ce(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signUp(t){var n,s,i;try{let l;if("email"in t){const{email:g,password:m,options:v}=t;let b=null,S=null;this.flowType==="pkce"&&([b,S]=await za(this.storage,this.storageKey)),l=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:v?.emailRedirectTo,body:{email:g,password:m,data:(n=v?.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:v?.captchaToken},code_challenge:b,code_challenge_method:S},xform:Fn})}else if("phone"in t){const{phone:g,password:m,options:v}=t;l=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:m,data:(s=v?.data)!==null&&s!==void 0?s:{},channel:(i=v?.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:v?.captchaToken}},xform:Fn})}else throw new Ku("You must provide either an email or phone number and a password");const{data:c,error:d}=l;if(d||!c)return await Et(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const f=c.session,h=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:h,session:f},error:null})}catch(l){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithPassword(t){try{let n;if("email"in t){const{email:l,password:c,options:d}=t;n=await ye(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:l,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:d_})}else if("phone"in t){const{phone:l,password:c,options:d}=t;n=await ye(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:l,password:c,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:d_})}else throw new Ku("You must provide either an email or phone number and a password");const{data:s,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!s||!s.session||!s.user){const l=new Qi;return this._returnResult({data:{user:null,session:null},error:l})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:i})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,s,i,l;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(l=t.options)===null||l===void 0?void 0:l.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:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,s,i,l,c,d,f,h,g,m,v;let b,S;if("message"in t)b=t.message,S=t.signature;else{const{chain:_,wallet:x,statement:R,options:A}=t;let C;if(Wt())if(typeof x=="object")C=x;else{const W=window;if("ethereum"in W&&typeof W.ethereum=="object"&&"request"in W.ethereum&&typeof W.ethereum.request=="function")C=W.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!A?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");C=x}const D=new URL((n=A?.url)!==null&&n!==void 0?n:window.location.href),z=await C.request({method:"eth_requestAccounts"}).then(W=>W).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!z||z.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const N=Gx(z[0]);let O=(s=A?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!O){const W=await C.request({method:"eth_chainId"});O=y3(W)}const I={domain:D.host,address:N,statement:R,uri:D.href,version:"1",chainId:O,nonce:(i=A?.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(c=(l=A?.signInWithEthereum)===null||l===void 0?void 0:l.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(d=A?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(f=A?.signInWithEthereum)===null||f===void 0?void 0:f.notBefore,requestId:(h=A?.signInWithEthereum)===null||h===void 0?void 0:h.requestId,resources:(g=A?.signInWithEthereum)===null||g===void 0?void 0:g.resources};b=b3(I),S=await C.request({method:"personal_sign",params:[v3(b),N]})}try{const{data:_,error:x}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:b,signature:S},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(v=t.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Fn});if(x)throw x;if(!_||!_.session||!_.user){const R=new Qi;return this._returnResult({data:{user:null,session:null},error:R})}return _.session&&(await this._saveSession(_.session),await this._notifyAllSubscribers("SIGNED_IN",_.session)),this._returnResult({data:Object.assign({},_),error:x})}catch(_){if(ce(_))return this._returnResult({data:{user:null,session:null},error:_});throw _}}async signInWithSolana(t){var n,s,i,l,c,d,f,h,g,m,v,b;let S,_;if("message"in t)S=t.message,_=t.signature;else{const{chain:x,wallet:R,statement:A,options:C}=t;let D;if(Wt())if(typeof R=="object")D=R;else{const N=window;if("solana"in N&&typeof N.solana=="object"&&("signIn"in N.solana&&typeof N.solana.signIn=="function"||"signMessage"in N.solana&&typeof N.solana.signMessage=="function"))D=N.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof R!="object"||!C?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");D=R}const z=new URL((n=C?.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in D&&D.signIn){const N=await D.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},C?.signInWithSolana),{version:"1",domain:z.host,uri:z.href}),A?{statement:A}:null));let O;if(Array.isArray(N)&&N[0]&&typeof N[0]=="object")O=N[0];else if(N&&typeof N=="object"&&"signedMessage"in N&&"signature"in N)O=N;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in O&&"signature"in O&&(typeof O.signedMessage=="string"||O.signedMessage instanceof Uint8Array)&&O.signature instanceof Uint8Array)S=typeof O.signedMessage=="string"?O.signedMessage:new TextDecoder().decode(O.signedMessage),_=O.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in D)||typeof D.signMessage!="function"||!("publicKey"in D)||typeof D!="object"||!D.publicKey||!("toBase58"in D.publicKey)||typeof D.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${z.host} wants you to sign in with your Solana account:`,D.publicKey.toBase58(),...A?["",A,""]:[""],"Version: 1",`URI: ${z.href}`,`Issued At: ${(i=(s=C?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((l=C?.signInWithSolana)===null||l===void 0)&&l.notBefore?[`Not Before: ${C.signInWithSolana.notBefore}`]:[],...!((c=C?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${C.signInWithSolana.expirationTime}`]:[],...!((d=C?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${C.signInWithSolana.chainId}`]:[],...!((f=C?.signInWithSolana)===null||f===void 0)&&f.nonce?[`Nonce: ${C.signInWithSolana.nonce}`]:[],...!((h=C?.signInWithSolana)===null||h===void 0)&&h.requestId?[`Request ID: ${C.signInWithSolana.requestId}`]:[],...!((m=(g=C?.signInWithSolana)===null||g===void 0?void 0:g.resources)===null||m===void 0)&&m.length?["Resources",...C.signInWithSolana.resources.map(O=>`- ${O}`)]:[]].join(`
41`);const N=await D.signMessage(new TextEncoder().encode(S),"utf8");if(!N||!(N instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");_=N}}try{const{data:x,error:R}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:Va(_)},!((v=t.options)===null||v===void 0)&&v.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Fn});if(R)throw R;if(!x||!x.session||!x.user){const A=new Qi;return this._returnResult({data:{user:null,session:null},error:A})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:R})}
41catch(x){if(ce(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const n=await Jn(this.storage,`${this.storageKey}-code-verifier`),[s,i]=(n??"").split("/");try{if(!s&&this.flowType==="pkce")throw new zD;const{data:l,error:c}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:s},xform:Fn});if(await Et(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!l||!l.session||!l.user){const d=new Qi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l.session)),this._returnResult({data:Object.assign(Object.assign({},l),{redirectType:i??null}),error:c})}catch(l){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(l))return this._returnResult({data:{user:null,session:null,redirectType:null},error:l});throw l}}async signInWithIdToken(t){try{const{options:n,provider:s,token:i,access_token:l,nonce:c}=t,d=await ye(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:i,access_token:l,nonce:c,gotrue_meta_security:{captcha_token:n?.captchaToken}},xform:Fn}),{data:f,error:h}=d;if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!f||!f.session||!f.user){const g=new Qi;return this._returnResult({data:{user:null,session:null},error:g})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:f,error:h})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,s,i,l,c;try{if("email"in t){const{email:d,options:f}=t;let h=null,g=null;this.flowType==="pkce"&&([h,g]=await za(this.storage,this.storageKey));const{error:m}=await ye(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(n=f?.data)!==null&&n!==void 0?n:{},create_user:(s=f?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},code_challenge:h,code_challenge_method:g},redirectTo:f?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in t){const{phone:d,options:f}=t,{data:h,error:g}=await ye(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(i=f?.data)!==null&&i!==void 0?i:{},create_user:(l=f?.shouldCreateUser)!==null&&l!==void 0?l:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},channel:(c=f?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:h?.message_id},error:g})}throw new Ku("You must provide either an email or phone number.")}catch(d){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(t){var n,s;try{let i,l;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,l=(s=t.options)===null||s===void 0?void 0:s.captchaToken);const{data:c,error:d}=await ye(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:l}}),redirectTo:i,xform:Fn});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const f=c.session,h=c.user;return f?.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),this._returnResult({data:{user:h,session:f},error:null})}catch(i){if(ce(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var n,s,i,l,c;try{let d=null,f=null;this.flowType==="pkce"&&([d,f]=await za(this.storage,this.storageKey));const h=await ye(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:(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&s!==void 0?s:void 0}),!((i=t?.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:f}),headers:this.headers,xform:d3});return!((l=h.data)===null||l===void 0)&&l.url&&Wt()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(h.data.url),this._returnResult(h)}catch(d){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;if(s)throw s;if(!n)throw new Mt;const{error:i}=await ye(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(ce(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:s,type:i,options:l}=t;
41let c=null,d=null;this.flowType==="pkce"&&([c,d]=await za(this.storage,this.storageKey));const{error:f}=await ye(this.fetch,"POST",n,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:l?.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l?.emailRedirectTo});return f&&await Et(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f})}else if("phone"in t){const{phone:s,type:i,options:l}=t,{data:c,error:d}=await ye(this.fetch,"POST",n,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:l?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:d})}throw new Ku("You must provide either an email or phone number and a type")}catch(n){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}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,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await s,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=n();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}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 n=await Jn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const s=t.expires_at?t.expires_at*1e3-Date.now()<Vp:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",t.expires_at),!s){if(this.userStorage){const c=await Jn(this.userStorage,this.storageKey+"-user");c?.user?t.user=c.user:t.user=Gp()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};t.user=o3(t.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:l}=await this._callRefreshToken(t.refresh_token);if(l){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const d=await Jn(this.storage,this.storageKey);if(d&&d.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:l})}return this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await ye(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ws}):await this._useSession(async n=>{var s,i,l;const{data:c,error:d}=n;if(d)throw d;return!(!((s=c.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Mt}:await ye(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(l=(i=c.session)===null||i===void 0?void 0:i.access_token)!==null&&l!==void 0?l:void 0,xform:Ws})})}catch(n){if(ce(n))return Gu(n)&&(await this._removeSession(),await Et(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n)):await this._updateUser(t,n)}async _updateUser(t,n={}){try{return await this._useSession(async s=>{const{data:i,error:l}=s;if(l)throw l;if(!i.session)throw new Mt;const c=i.session;let d=null,f=null;this.flowType==="pkce"&&t.email!=null&&([d,f]=await za(this.storage,this.storageKey));const{data:h,error:g}=await ye(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:d,code_challenge_method:f}),jwt:c.access_token,xform:Ws});if(g)throw g;return c.user=h.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(s){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(s))return this._returnResult({data:{user:null},error:s});throw s}}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 Mt;const n=Date.now()/1e3;let s=n,i=!0,l=null;const{payload:c}=Wu(t.access_token);if(c.exp&&(s=c.exp,i=s<=n),i){const{data:d,error:f}=await this._callRefreshToken(t.refresh_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!d)return{data:{user:null,session:null},error:null};l=d}else{const{data:d,error:f}=await this._getUser(t.access_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});l={access_token:t.access_token,refresh_token:t.refresh_token,user:d.user,token_type:"bearer",expires_in:s-n,expires_at:s},await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)}return this._returnResult({data:{user:l.user,session:l},error:null})}catch(n){if(ce(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}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 n=>{var s;if(!t){const{data:c,error:d}=n;
41if(d)throw d;t=(s=c.session)!==null&&s!==void 0?s:void 0}if(!t?.refresh_token)throw new Mt;const{data:i,error:l}=await this._callRefreshToken(t.refresh_token);return l?this._returnResult({data:{user:null,session:null},error:l}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var s;try{if(!Wt())throw new Yu("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Yu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new n_("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Yu("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new n_("No code detected.");const{data:C,error:D}=await this._exchangeCodeForSession(t.code);if(D)throw D;const z=new URL(window.location.href);return z.searchParams.delete("code"),window.history.replaceState(window.history.state,"",z.toString()),{data:{session:C.session,redirectType:(s=C.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:i,provider_refresh_token:l,access_token:c,refresh_token:d,expires_in:f,expires_at:h,token_type:g}=t;if(!c||!f||!d||!g)throw new Yu("No session defined in URL");const m=Math.round(Date.now()/1e3),v=parseInt(f);let b=m+v;h&&(b=parseInt(h));const S=b-m;S*1e3<=rs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${v}s`);const _=b-v;m-_>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",_,b,m):m-_<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",_,b,m);const{data:x,error:R}=await this._getUser(c);if(R)throw R;const A={provider_token:i,provider_refresh_token:l,access_token:c,expires_in:v,expires_at:b,refresh_token:d,token_type:g,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:A,redirectType:t.type},error:null})}catch(i){if(ce(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_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 n=await Jn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}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 n=>{var s;const i=async()=>{await this._removeSession(),await Et(this.storage,`${this.storageKey}-code-verifier`)},{data:l,error:c}=n;if(c&&!Gu(c))return this._returnResult({error:c});const d=(s=l.session)===null||s===void 0?void 0:s.access_token;if(d){const{error:f}=await this.admin.signOut(d,t);if(f&&!(ID(f)&&(f.status===404||f.status===401||f.status===403)||Gu(f)))return t!=="others"&&await i(),this._returnResult({error:f})}return t!=="others"&&await i(),this._returnResult({error:null})})}onAuthStateChange(t){const n=KD(),s={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,s),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:s}}}async _emitInitialSession(t){return await this._useSession(async n=>{var s,i;try{const{data:{session:l},error:c}=n;if(c)throw c;await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",l)),this._debug("INITIAL_SESSION","callback id",t,"session",l)}catch(l){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",l),Gu(l)?console.warn(l):console.error(l)}})}async resetPasswordForEmail(t,n={}){let s=null,i=null;this.flowType==="pkce"&&([s,i]=await za(this.storage,this.storageKey,!0));try{return await ye(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:s,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(l){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(l))return this._returnResult({data:null,error:l});throw l}}async getUserIdentities(){var t;try{const{data:n,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:s,error:i}=await this._useSession(async l=>{var c,d,f,h,g;const{data:m,error:v}=l;if(v)throw v;const b=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(c=t.options)===null||c===void 0?void 0:c.redirectTo,scopes:(d=t.options)===null||d===void 0?void 0:d.scopes,queryParams:(f=t.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:!0});return await ye(this.fetch,"GET",b,{headers:this.headers,jwt:(g=(h=m.session)===null||h===void 0?void 0:h.access_token)!==null&&g!==void 0?g:void 0})});if(i)throw i;return Wt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(s?.url),this._returnResult({data:{provider:t.provider,url:s?.url},error:null})}catch(s){if(ce(s))return this._returnResult({data:{provider:t.provider,url:null},error:s});throw s}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var s;try{const{error:i,data:{session:l}}=n;if(i)throw i;const{options:c,provider:d,token:f,access_token:h,nonce:g}=t,m=await ye(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=l?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:d,id_token:f,access_token:h,nonce:g,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:Fn}),{data:v,error:b}=m;return b?this._returnResult({data:{user:null,session:null},error:b}):!v||!v.session||!v.user?this._returnResult({data:{user:null,session:null},error:new Qi}):(v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("USER_UPDATED",v.session)),this._returnResult({data:v,error:b}))}catch(i){if(await Et(this.storage,`${this.storageKey}-code-verifier`),ce(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var s,i;const{data:l,error:c}=n;if(c)throw c;
41return await ye(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(s=l.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const s=Date.now();return await ZD(async i=>(i>0&&await QD(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await ye(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Fn})),(i,l)=>{const c=200*Math.pow(2,i);return l&&r_(l)&&Date.now()+c-s<rs})}catch(s){if(this._debug(n,"error",s),ce(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const s=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",s),Wt()&&!n.skipBrowserRedirect&&window.location.assign(s),{data:{provider:t,url:s},error:null}}async _recoverAndRefresh(){var t,n;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const i=await Jn(this.storage,this.storageKey);if(i&&this.userStorage){let c=await Jn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:i.user},await so(this.userStorage,this.storageKey+"-user",c)),i.user=(t=c?.user)!==null&&t!==void 0?t:Gp()}else if(i&&!i.user&&!i.user){const c=await Jn(this.storage,this.storageKey+"-user");c&&c?.user?(i.user=c.user,await Et(this.storage,this.storageKey+"-user"),await so(this.storage,this.storageKey,i)):i.user=Gp()}if(this._debug(s,"session from storage",i),!this._isValidSession(i)){this._debug(s,"session is not valid"),i!==null&&await this._removeSession();return}const l=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Vp;if(this._debug(s,`session has${l?"":" not"} expired with margin of ${Vp}s`),l){if(this.autoRefreshToken&&i.refresh_token){const{error:c}=await this._callRefreshToken(i.refresh_token);c&&($D(c)?this._debug(s,"refresh discarded by commit guard",c):this._debug(s,"refresh failed",c))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(i.access_token);!d&&c?.user?(i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(s,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(s,"error",i),console.error(i);return}finally{this._debug(s,"end")}}async _callRefreshToken(t){var n,s;if(!t)throw new Mt;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 i="#_callRefreshToken()";this._debug(i,"begin");try{this.refreshingDeferred=new nf;const l=await Jn(this.storage,this.storageKey),{data:c,error:d}=await this._refreshAccessToken(t);if(d)throw d;if(!c.session)throw new Mt;const f=await Jn(this.storage,this.storageKey);if(l!==null&&(f===null||f.refresh_token!==l.refresh_token)){this._debug(i,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:f?"replaced":"cleared"});const v={data:null,error:new s_};return this.refreshingDeferred.resolve(v),v}const g=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==g){this._debug(i,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Et(this.storage,this.storageKey),this.userStorage&&await Et(this.userStorage,this.storageKey+"-user");const v={data:null,error:new s_};return this.refreshingDeferred.resolve(v),v}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const m={data:c.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(m),m}catch(l){if(this._debug(i,"error",l),ce(l)){const c={data:null,error:l};if(!r_(l)){const d=await Jn(this.storage,this.storageKey);!!(d?.expires_at&&d.expires_at*1e3>Date.now())?this._debug(i,"proactive refresh failed, access token still valid — preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:c,expiresAt:Date.now()+OD},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(c),c}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(l),l}finally{this.refreshingDeferred=null,this._debug(i,"end")}}
41async _notifyAllSubscribers(t,n,s=!0){if(this._pendingInitNotifications!==null&&s){this._pendingInitNotifications.push({event:t,session:n,broadcast:s});return}const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:t,session:n});const l=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(t,n)}catch(f){l.push(f)}});if(await Promise.all(c),l.length>0){for(let d=0;d<l.length;d+=1)console.error(l[d]);throw l[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),s=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&n.user&&await so(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const l=c_(i);await so(this.storage,this.storageKey,l)}else{const i=c_(n);await so(this.storage,this.storageKey,i)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Et(this.storage,this.storageKey),await Et(this.storage,this.storageKey+"-code-verifier"),await Et(this.storage,this.storageKey+"-user"),this.userStorage&&await Et(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Wt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),rs);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}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 n=>{const{data:{session:s}}=n;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((s.expires_at*1e3-t)/rs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${rs}ms, refresh threshold is ${Pl} ticks`),i<=Pl&&await this._callRefreshToken(s.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof m3)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 n=>{const{data:{session:s}}=n;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((s.expires_at*1e3-t)/rs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${rs}ms, refresh threshold is ${Pl} ticks`),i<=Pl&&await this._callRefreshToken(s.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Wt()||!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 n=`#_onVisibilityChanged(${t})`;if(this._debug(n,"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()=>
41{if(document.visibilityState!=="visible"){this._debug(n,"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(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,s){const i=[`provider=${encodeURIComponent(n)}`];if(s?.redirectTo&&i.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s?.scopes&&i.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[l,c]=await za(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(l)}`,code_challenge_method:`${encodeURIComponent(c)}`});i.push(d.toString())}if(s?.queryParams){const l=new URLSearchParams(s.queryParams);i.push(l.toString())}return s?.skipBrowserRedirect&&i.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var s;const{data:i,error:l}=n;return l?this._returnResult({data:null,error:l}):await ye(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(s=i?.session)===null||s===void 0?void 0:s.access_token})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var s,i;const{data:l,error:c}=n;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:f,error:h}=await ye(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(s=l?.session)===null||s===void 0?void 0:s.access_token});return h?this._returnResult({data:null,error:h}):(t.factorType==="totp"&&f.type==="totp"&&(!((i=f?.totp)===null||i===void 0)&&i.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),this._returnResult({data:f,error:null}))})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){const n=async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?g_(t.webauthn.credential_response):y_(t.webauthn.credential_response)})}:{code:t.code}),{data:f,error:h}=await ye(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:d,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});return h?this._returnResult({data:null,error:h}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+f.expires_in},f)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",f),this._returnResult({data:f,error:h}))})}catch(s){if(ce(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(t){const n=async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:c}=s;if(c)return this._returnResult({data:null,error:c});const d=await ye(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});if(d.error)return d;const{data:f}=d;if(f.type!=="webauthn")return{data:f,error:null};switch(f.webauthn.type){case"create":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:p_(f.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({}
41,f.webauthn.credential_options),{publicKey:m_(f.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(ce(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(t){const{data:n,error:s}=await this._challenge({factorId:t.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:s}=await this.getUser();if(s)return{data:null,error:s};const i={all:[],phone:[],totp:[],webauthn:[]};for(const l of(t=n?.factors)!==null&&t!==void 0?t:[])i.all.push(l),l.status==="verified"&&i[l.factor_type].push(l);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,s,i,l;if(t)try{const{payload:b}=Wu(t);let S=null;b.aal&&(S=b.aal);let _=S;const{data:{user:x},error:R}=await this.getUser(t);if(R)return this._returnResult({data:null,error:R});((s=(n=x?.factors)===null||n===void 0?void 0:n.filter(D=>D.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(_="aal2");const C=b.amr||[];return{data:{currentLevel:S,nextLevel:_,currentAuthenticationMethods:C},error:null}}catch(b){if(ce(b))return this._returnResult({data:null,error:b});throw b}const{data:{session:c},error:d}
41=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:f}=Wu(c.access_token);let h=null;f.aal&&(h=f.aal);let g=h;((l=(i=c.user.factors)===null||i===void 0?void 0:i.filter(b=>b.status==="verified"))!==null&&l!==void 0?l:[]).length>0&&(g="aal2");const v=f.amr||[];return{data:{currentLevel:h,nextLevel:g,currentAuthenticationMethods:v},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;return i?this._returnResult({data:null,error:i}):s?await ye(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new Mt})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new Mt});const c=await ye(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&Wt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(ce(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(t,n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new Mt});const c=await ye(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return c.data&&c.data.redirect_url&&Wt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(ce(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;return s?this._returnResult({data:null,error:s}):n?await ye(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Mt})})}catch(t){if(ce(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;return i?this._returnResult({data:null,error:i}):s?(await ye(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Mt})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let s=n.keys.find(d=>d.kid===t);if(s)return s;const i=Date.now();if(s=this.jwks.keys.find(d=>d.kid===t),s&&this.jwks_cached_at+MD>i)return s;const{data:l,error:c}=await ye(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!l.keys||l.keys.length===0||(this.jwks=l,this.jwks_cached_at=i,s=l.keys.find(d=>d.kid===t),!s)?null:s}async getClaims(t,n={}){try{let s=t;if(!s){const{data:b,error:S}
41=await this.getSession();if(S||!b.session)return this._returnResult({data:null,error:S});s=b.session.access_token}const{header:i,payload:l,signature:c,raw:{header:d,payload:f}}=Wu(s);if(!n?.allowExpired)try{s3(l.exp)}catch(b){throw new Ad(b instanceof Error?b.message:"JWT validation failed")}const h=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n?.keys?{keys:n.keys}:n?.jwks);if(!h){const{error:b}=await this.getUser(s);if(b)throw b;return{data:{claims:l,header:i,signature:c},error:null}}const g=a3(i.alg),m=await crypto.subtle.importKey("jwk",h,g,!0,["verify"]);if(!await crypto.subtle.verify(g,m,c,VD(`${d}.${f}`)))throw new Ad("Invalid JWT signature");return{data:{claims:l,header:i,signature:c},error:null}}catch(s){if(ce(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(t){var n,s,i;tr(this.experimental);try{if(!Nd())return this._returnResult({data:null,error:new sr("Browser does not support WebAuthn",null)});const{data:l,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}});if(c||!l)return this._returnResult({data:null,error:c});const d=m_(l.options),f=(i=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&i!==void 0?i:Dm.createNewAbortSignal(),{data:h,error:g}=await Wx({publicKey:d,signal:f});if(g||!h)return this._returnResult({data:null,error:g??new sr("WebAuthn ceremony failed",null)});const m=y_(h);return this._verifyPasskeyAuthentication({challengeId:l.challenge_id,credential:m})}catch(l){if(ce(l))return this._returnResult({data:null,error:l});throw l}}async registerPasskey(t){var n,s;tr(this.experimental);try{if(!Nd())return this._returnResult({data:null,error:new sr("Browser does not support WebAuthn",null)});const{data:i,error:l}=await this._startPasskeyRegistration();if(l||!i)return this._returnResult({data:null,error:l});const c=p_(i.options),d=(s=(n=t?.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Dm.createNewAbortSignal(),{data:f,error:h}=await Yx({publicKey:c,signal:d});if(h||!f)return this._returnResult({data:null,error:h??new sr("WebAuthn ceremony failed",null)});const g=g_(f);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:g})}catch(i){if(ce(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){tr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Mt});const{data:i,error:l}=await ye(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:i,error:null})})}catch(t){if(ce(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){tr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Mt});const{data:l,error:c}=await ye(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:l,error:null})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;tr(this.experimental);try{const{data:s,error:i}=await ye(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})}catch(s){if(ce(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(t){tr(this.experimental);try{const{data:n,error:s}=await ye(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Fn});return s?this._returnResult({data:null,error:s}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){tr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Mt});const{data:i,error:l}=await ye(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:c=>({data:c,error:null})});return l?this._returnResult({data:null,error:l}):this._returnResult({data:i,error:null})})}catch(t){if(ce(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){tr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Mt});const{data:l,error:c}=await ye(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:t.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:l,error:null})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){tr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Mt});const{error:l}
41=await ye(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return l?this._returnResult({data:null,error:l}):this._returnResult({data:null,error:null})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}}rc.nextInstanceID={};const C3=rc,O3="2.110.5";let Ml="",Dd;if(typeof Deno<"u"){var Yp;Ml="deno",Dd=(Yp=Deno.version)===null||Yp===void 0?void 0:Yp.deno}else if(typeof document<"u")Ml="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ml="react-native";else{var Wp;Ml="node";const e=globalThis.process;Dd=e==null||(Wp=e.version)===null||Wp===void 0?void 0:Wp.replace(/^v/,"")}const Qx=[`runtime=${Ml}`];Dd&&Qx.push(`runtime-version=${Dd}`);const N3={"X-Client-Info":`supabase-js/${O3}; ${Qx.join("; ")}`},j3={headers:N3},D3={schema:"public"},P3={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},M3={},L3={enabled:!1,respectSamplingDecision:!0};function I3(e,t,n,s){function i(l){return l instanceof n?l:new n(function(c){c(l)})}return new(n||(n=Promise))(function(l,c){function d(g){try{h(s.next(g))}catch(m){c(m)}}function f(g){try{h(s.throw(g))}catch(m){c(m)}}function h(g){g.done?l(g.value):i(g.value).then(d,f)}h((s=s.apply(e,[])).next())})}let Qp=null;const U3="@opentelemetry/api";function z3(){return Qp===null&&(Qp=import(U3).catch(()=>null)),Qp}function $3(){return I3(this,void 0,void 0,function*(){try{const e=yield z3();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function B3(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,s,i,l]=t;if(n.length!==2||s.length!==32||i.length!==16||l.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(n)||!c.test(s)||!c.test(i)||!c.test(l)||s==="00000000000000000000000000000000"||i==="0000000000000000"?null:{version:n,traceId:s,parentId:i,traceFlags:l,isSampled:(parseInt(l,16)&1)===1}}function H3(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(const s of t)try{if(typeof s=="string"){if(q3(n.hostname,s))return!0}else if(s instanceof RegExp){if(s.test(n.hostname))return!0}else if(typeof s=="function"&&s(n))return!0}catch{continue}return!1}function q3(e,t){if(t===e)return!0;if(t.startsWith("*.")){const n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith("."+n)))return!0}return!1}function F3(e){const t=[];try{const n=new URL(e);t.push(n.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function sc(e){"@babel/helpers - typeof";return sc=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},sc(e)}function V3(e,t){if(sc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(sc(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G3(e){var t=V3(e,"string");return sc(t)=="symbol"?t:t+""}function K3(e,t,n){return(t=G3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v_(Object(n),!0).forEach(function(s){K3(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v_(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}const Y3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),W3=()=>Headers,Zx=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),Q3=e=>{if(e.startsWith("sb_")&&!Zx(e))throw new Error('@supabase/supabase-js: Unrecognized Supabase API key format. Expected a legacy JWT key or a new-format key (sb_publishable_… / sb_secret_…). This "sb_" key type is not supported by this version of the SDK — please upgrade @supabase/supabase-js.')},b_=(e,t,n,s,i,l)=>{const c=Y3(s),d=W3(),f=i?.enabled===!0,h=i?.respectSamplingDecision!==!1,g=f?F3(t):null,m=!(l?.om
41itApiKeyAsBearer&&Zx(e));return async(v,b)=>{const S=await n();let _=new d(b?.headers);if(_.has("apikey")||_.set("apikey",e),!_.has("Authorization")){const x=S??(m?e:null);x&&_.set("Authorization",`Bearer ${x}`)}if(g){const x=await Z3(v,g,h);x&&(x.traceparent&&!_.has("traceparent")&&_.set("traceparent",x.traceparent),x.tracestate&&!_.has("tracestate")&&_.set("tracestate",x.tracestate),x.baggage&&!_.has("baggage")&&_.set("baggage",x.baggage))}return c(v,gt(gt({},b),{},{headers:_}))}};async function Z3(e,t,n){if(!H3(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const s=await $3();if(!s||!s.traceparent)return null;if(n){const i=B3(s.traceparent);if(i&&!i.isSampled)return null}return s}function w_(e){return typeof e=="boolean"?{enabled:e}:e}function X3(e){return e.endsWith("/")?e:e+"/"}function J3(e,t){var n,s,i,l,c,d;const{db:f,auth:h,realtime:g,global:m}=e,{db:v,auth:b,realtime:S,global:_}=t,x=w_(e.tracePropagation),R=w_(t.tracePropagation),A={db:gt(gt({},v),f),auth:gt(gt({},b),h),realtime:gt(gt({},S),g),storage:{},global:gt(gt(gt({},_),m),{},{headers:gt(gt({},(n=_?.headers)!==null&&n!==void 0?n:{}),(s=m?.headers)!==null&&s!==void 0?s:{})}),tracePropagation:{enabled:(i=(l=x?.enabled)!==null&&l!==void 0?l:R?.enabled)!==null&&i!==void 0?i:!1,respectSamplingDecision:(c=(d=x?.respectSamplingDecision)!==null&&d!==void 0?d:R?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return e.accessToken?A.accessToken=e.accessToken:delete A.accessToken,A}function e5(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(X3(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var t5=class extends C3{constructor(e){super(e)}},n5=class{constructor(e,t,n){var s,i;this.supabaseUrl=e,this.supabaseKey=t;const l=e5(e);if(!t)throw new Error("supabaseKey is required.");Q3(t),this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,d={db:D3,realtime:M3,auth:gt(gt({},P3),{},{storageKey:c}),global:j3,tracePropagation:L3},f=J3(n??{},d);if(this.settings=f,this.storageKey=(s=f.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=f.global.headers)!==null&&i!==void 0?i:{},f.accessToken)this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(g,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} is not possible`)}});else{var h;this.auth=this._initSupabaseAuthClient((h=f.auth)!==null&&h!==void 0?h:{},this.headers,f.global.fetch)}this.fetch=b_(t,e,this._getSessionToken.bind(this),f.global.fetch,f.tracePropagation),this.functionsFetch=b_(t,e,this._getSessionToken.bind(this),f.global.fetch,f.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(gt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},f.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(g=>this.realtime.setAuth(g)).catch(g=>console.warn("Failed to set initial Realtime auth token:",g)),this.rest=new d4(new URL("rest/v1",l).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch,timeout:f.db.timeout,urlLengthLimit:f.db.urlLengthLimit}),this.storage=new CD(this.storageUrl.href,this.headers,this.fetch,n?.storage),f.accessToken||this._listenForAuthEvents()}get functions(){return new n4(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={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:s}=await e.auth.getSession();return(t=(n=s.session)===null||n===void 0?void 0:n.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:n,storage:s,userStorage:i,storageKey:l,flowType:c,lock:d,debug:f,throwOnError:h,experimental:g,lockAcquireTimeout:m,ski
41pAutoInitialize:v},b,S){const _={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new t5({url:this.authUrl.href,headers:gt(gt({},_),b),storageKey:l,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:s,userStorage:i,flowType:c,lock:d,debug:f,throwOnError:h,experimental:g,fetch:S,lockAcquireTimeout:m,skipAutoInitialize:v,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new J4(this.realtimeUrl.href,gt(gt({},e),{},{params:gt(gt({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const r5=(e,t,n)=>new n5(e,t,n);function s5(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}s5()&&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 a5(){if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(x=>e===x||e.endsWith("."+x)),s="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",i=n?e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+s+")(?:-dev)?(?=\\.|$)","i"))?.[1]??e.match(new RegExp("^("+s+")(?=[.-])","i"))?.[1]:void 0,l=window.parent&&window.parent!==window;if(!i||!l)return localStorage;const c=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),d=c?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,f=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),h=f&&d.test(f)?[f]:c?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],g="lovable-preview-auth:result",m=2e3,v=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),b=(x,R,A)=>new Promise(C=>{const D=v();let z=!1,N;const O=ne=>{z||(z=!0,clearTimeout(N),window.removeEventListener("message",I),C(ne))},I=ne=>{if(h.indexOf(ne.origin)<0)return;const F=ne.data;F&&F.type===g&&F.requestId===D&&O(F)};window.addEventListener("message",I);const W={type:x,requestId:D,projectId:i,key:R};A!==void 0&&(W.value=A);for(const ne of h)window.parent.postMessage(W,ne);N=setTimeout(()=>O(null),m)});let S=!0;const _=250;return{getItem:async x=>{let R=await b("lovable-preview-auth:get",x);return!R&&S&&(await new Promise(A=>setTimeout(A,_)),R=await b("lovable-preview-auth:get",x)),S=!1,R&&R.ok&&typeof R.value=="string"?R.value===""?(localStorage.removeItem(x),null):R.value:localStorage.getItem(x)},setItem:(x,R)=>(localStorage.setItem(x,R),b("lovable-preview-auth:set",x,R).then(A=>{A&&A.ok&&typeof A.value=="string"&&localStorage.getItem(x)===R&&(A.value===""?localStorage.removeItem(x):localStorage.setItem(x,A.value))})),removeItem:x=>(localStorage.removeItem(x),b("lovable-preview-auth:remove",x).then(()=>{}))}}function i5(){return r5("https://ckhnjcpzuzkispvsptew.supabase.co","sb_publishable_6O6F06MiREAcLddgyDha7Q_CALga0jt",{auth:{storage:a5(),persistSession:!0,autoRefreshToken:!0}})}let Zp;const ir=new Proxy({},{get(e,t,n){return Zp||(Zp=i5()),Reflect.get(Zp,t,n)}}),o5=Zs({type:"function"}).client(async({next:e})=>{const{data:t}=await ir.auth.getSession(),n=t.session?.access_token;return e({headers:n?{Authorization:`Bearer ${n}`}:{}})}),l5=Zs(),__=Zj(()=>({functionMiddleware:[o5],requestMiddleware:[l5]}));var gc=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(){}},c5=class extends gc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 30,947 bytes, line 41
41this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Tg=new c5,u5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},d5=class{#e=u5;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ga=new d5;function f5(e){setTimeout(e,0)}var h5=typeof window>"u"||"Deno"in globalThis;function gn(){}function p5(e,t){return typeof e=="function"?e(t):e}function Pm(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ta(e,t){return typeof e=="function"?e(t):e}function kn(e,t){return typeof e=="function"?e(t):e}function S_(e,t){const{type:n="all",exact:s,fetchStatus:i,predicate:l,queryKey:c,stale:d}=e;if(c){if(s){if(t.queryHash!==kg(c,t.options))return!1}else if(!ic(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||i&&i!==t.state.fetchStatus||l&&!l(t))}function x_(e,t){const{exact:n,status:s,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(ac(t.options.mutationKey)!==ac(l))return!1}else if(!ic(t.options.mutationKey,l))return!1}return!(s&&t.state.status!==s||i&&!i(t))}function kg(e,t){return(t?.queryKeyHashFn||ac)(e)}function ac(e){return JSON.stringify(e,(t,n)=>Lm(n)?Object.keys(n).sort().reduce((s,i)=>(s[i]=n[i],s),{}):n)}function ic(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ic(e[n],t[n])):!1}var m5=Object.prototype.hasOwnProperty;function Jx(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=E_(e)&&E_(t);if(!s&&!(Lm(e)&&Lm(t)))return t;const l=(s?e:Object.keys(e)).length,c=s?t:Object.keys(t),d=c.length,f=s?new Array(d):{};let h=0;for(let g=0;g<d;g++){const m=s?g:c[g],v=e[m],b=t[m];if(v===b){f[m]=v,(s?g<l:m5.call(e,m))&&h++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){f[m]=b;continue}const S=Jx(v,b,n+1);f[m]=S,S===v&&h++}return l===d&&h===l?e:f}function Mm(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function E_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lm(e){if(!R_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!R_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function R_(e){return Object.prototype.toString.call(e)==="[object Object]"}function g5(e){return new Promise(t=>{Ga.setTimeout(t,e)})}function Im(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Jx(e,t):t}function y5(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function v5(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Ag=Symbol();function eE(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ag?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tE(e,t){return typeof e=="function"?e(...t):!!e}function b5(e,t,n){let s=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),s||(s=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var oc=(()=>{let e=()=>h5;return{isServer(){return e()},setIsServer(t){e=t}}})();function Um(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),e(i)},n.reject=i=>{s({status:"rejected",reason:i}),t(i)},n}var w5=f5;function _5(){let e=[],t=0,n=d=>{d()},s=d=>{d()},i=w5;const l=d=>{t?e.push(d):i(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&i(()=>{s(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{i=d}}}var qt=_5(),S5=class extends gc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Pd=new S5;function x5(e){return Math.min(1e3*2**e,3e4)}function nE(e){return(e??"online")==="online"?Pd.isOnline():!0}var zm=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function rE(e){let t=!1,n=0,s;const i=Um(),l=()=>i.status!=="pending",c=_=>{if(!l()){const x=new zm(_);v(x),e.onCancel?.(x)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>Tg.isFocused()&&(e.networkMode==="always"||Pd.isOnline())&&e.canRun(),g=()=>nE(e.networkMode)&&e.canRun(),m=_=>{l()||(s?.(),i.resolve(_))},v=_=>{l()||(s?.(),i.reject(_))},b=()=>new Promise(_=>{s=x=>{(l()||h())&&_(x)},e.onPause?.()}).then(()=>{s=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let _;const x=n===0?e.initialPromise:void 0;try{_=x??e.fn()}catch(R){_=Promise.reject(R)}Promise.resolve(_).then(m).catch(R=>{if(l())return;const A=e.retry??(oc.isServer()?0:3),C=e.retryDelay??x5,D=typeof C=="function"?C(n,R):C,z=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!z){v(R);return}n++,e.onFail?.(n,R),g5(D).then(()=>h()?void 0:b()).then(()=>{t?v(R):S()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(s?.(),i),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?S():b().then(S),i)}}var sE=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pm(this.gcTime)&&(this.#e=Ga.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(oc.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ga.clearTimeout(this.#e),this.#e=void 0)}},E5=class extends sE{#e;#t;#n;#s;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=k_(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=k_(this.options);t.data!==void 0&&(this.setState(T_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Im(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(gn).catch(gn):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=>kn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ag||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ta(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:!Xx(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.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a||this.#o()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#o(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const d=eE(this.options,t),h=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return s(g),g})();return this.#a=!1,this.options.persister?this.options.persister(d,h,this):d(h)},c=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:i};return s(d),d})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=rE({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof zm&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof zm){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...aE(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...T_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?s:void 0,s;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),qt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function aE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function T_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function k_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var R5=class extends gc{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=Um(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#i;#a;#o;#l;#h;#p;#u;#d;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),A_(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $m(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $m(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#_(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Mm(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&C_(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),s&&(this.#t!==n||kn(this.options.enabled,this.#t)!==kn(t.enabled,this.#t)||ta(this.options.staleTime,this.#t)!==ta(t.staleTime,this.#t))&&this.#g();const i=this.#y();s&&(this.#t!==n||kn(this.options.enabled,this.#t)!==kn(t.enabled,this.#t)||i!==this.#c)&&this.#v(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return k5(this,n)&&(this.#s=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,s)=>(this.trackProp(s),t?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#f(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(gn)),t}#g(){this.#w();const e=ta(this.options.staleTime,this.#t);if(oc.isServer()||this.#s.isStale||!Pm(e))return;const n=Xx(this.#s.dataUpdatedAt,e)+1;this.#u=Ga.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#_(),this.#c=e,!(oc.isServer()||kn(this.options.enabled,this.#t)===!1||!Pm(this.#c)||this.#c===0)&&(this.#d=Ga.setInterval(()=>{(this.options.refetchIntervalInBackground||Tg.isFocused())&&this.#f()},this.#c))}#b(){this.#g(),this.#v(this.#y())}#w(){this.#u!==void 0&&(Ga.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#d!==void 0&&(Ga.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const n=this.#t,s=this.options,i=this.#s,l=this.#r,c=this.#i,f=e!==n?e.state:this.#n,{state:h}=e;let g={...h},m=!1,v;if(t._optimisticResults){const I=this.hasListeners(),W=!I&&A_(e,t),ne=I&&C_(e,n,t,s);(W||ne)&&(g={...g,...aE(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:S,status:_}=g;v=g.data;let x=!1;if(t.placeholderData!==void 0&&v===void 0&&_==="pending"){let I;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(I=i.data,x=!0):I=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,I!==void 0&&(_="success",v=Im(i?.data,I,t),m=!0)}if(t.select&&v!==void 0&&!x)if(i&&v===l?.data&&t.select===this.#l)v=this.#h;else try{this.#l=t.select,v=t.select(v),v=Im(i?.data,v,t),this.#h=v,this.#o=null}catch(I){this.#o=I}this.#o&&(b=this.#o,v=this.#h,S=Date.now(),_="error");const R=g.fetchStatus==="fetching",A=_==="pending",C=_==="error",D=A&&R,z=v!==void 0,O={status:_,fetchStatus:g.fetchStatus,isPending:A,isSuccess:_==="success",isError:C,isInitialLoading:D,isLoading:D,data:v,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:C&&!z,isPaused:g.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:C&&z,isStale:Cg(e,t),refetch:this.refetch,promise:this.#a,isEnabled:kn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=O.data!==void 0,W=O.status==="error"&&!I,ne=ee=>{W?ee.reject(O.error):I&&ee.resolve(O.data)},F=()=>{const ee=this.#a=O.promise=Um();ne(ee)},V=this.#a;switch(V.status){case"pending":e.queryHash===n.queryHash&&ne(V);break;case"fulfilled":(W||O.data!==V.value)&&F();break;case"rejected":(!W||O.error!==V.reason)&&F();break}}return O}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#t),Mm(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#m.size)return!0;const l=new Set(i??this.#m);return this.options.throwOnError&&l.add("error"),Object.keys(this.#s).some(c=>{const d=c;return this.#s[d]!==e[d]&&l.has(d)})};this.#x({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#x(e){qt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function T5(e,t){return kn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&kn(t.retryOnMount,e)===!1)}function A_(e,t){return T5(e,t)||e.state.data!==void 0&&$m(e,t,t.refetchOnMount)}function $m(e,t,n){if(kn(t.enabled,e)!==!1&&ta(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Cg(e,t)}return!1}function C_(e,t,n,s){return(e!==t||kn(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cg(e,n)}function Cg(e,t){return kn(t.enabled,e)!==!1&&e.isStaleByTime(ta(t.staleTime,e))}function k5(e,t){return!Mm(e.getCurrentResult(),t)}function O_(e){return{onFetch:(t,n)=>{const s=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let g=!1;const m=S=>{b5(S,()=>t.signal,()=>g=!0)},v=eE(t.options,t.fetchOptions),b=async(S,_,x)=>{if(g)return Promise.reject();if(_==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:_,direction:x?"backward":"forward",meta:t.options.meta};return m(N),N})(),C=await v(A),{maxPages:D}=t.options,z=x?v5:y5;return{pages:z(S.pages,C,D),pageParams:z(S.pageParams,_,D)}};if(i&&l.length){const S=i==="backward",_=S?A5:N_,x={pages:l,pageParams:c},R=_(s,x);d=await b(x,R,S)}else{const S=e??l.length;do{const _=f===0?c[0]??s.initialPageParam:N_(s,d);if(f>0&&_==null)break;d=await b(d,_),f++}while(f<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function N_(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function A5(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var C5=class extends sE{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||O5(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=rE({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",i=!this.#s.canStart();try{if(s)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:i})}const l=await this.#s.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),qt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function O5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var N5=class extends gc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const s=new C5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){this.#e.add(e);const t=Qu(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Qu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Qu(e);if(typeof t=="string"){const s=this.#t.get(t)?.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=Qu(e);return typeof t=="string"?this.#t.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){qt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>x_(t,n))}findAll(e={}){return this.getAll().filter(t=>x_(e,t))}notify(e){qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return qt.batch(()=>Promise.all(e.map(t=>t.continue().catch(gn))))}};function Qu(e){return e.options.scope?.id}var j5=class extends gc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const s=t.queryKey,i=t.queryHash??kg(s,t);let l=this.get(i);return l||(l=new E5({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(l)),l}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(){qt.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(n=>S_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>S_(e,n)):t}notify(e){qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},D5=class{#e;#t;#n;#s;#r;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new j5,this.#t=e.mutationCache||new N5,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Tg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Pd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ta(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(s.queryHash)?.state.data,c=p5(t,l);if(c!==void 0)return this.#e.build(this,s).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return qt.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;qt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return qt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=qt.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(s).then(gn).catch(gn)}invalidateQueries(e,t={}){return qt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=qt.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(gn)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(gn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ta(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gn).catch(gn)}fetchInfiniteQuery(e){return e.behavior=O_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gn).catch(gn)}ensureInfiniteQueryData(e){return e.behavior=O_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Pd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(ac(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(s=>{ic(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(ac(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(s=>{ic(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=kg(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===Ag&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},iE=k.createContext(void 0),oE=e=>{const t=k.useContext(iE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},P5=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(iE.Provider,{value:e,children:t})),lE=k.createContext(!1),M5=()=>k.useContext(lE);lE.Provider;function L5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
41var I5=k.createContext(L5()),U5=()=>k.useContext(I5),z5=(e,t,n)=>{const s=n?.state.error&&typeof e.throwOnError=="function"?tE(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},$5=e=>{k.useEffect(()=>{e.clearReset()},[e])},B5=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&e.data===void 0||tE(n,[e.error,s])),K$=(e,t)=>t.state.data===void 0,H5=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...i)=>n(s(...i)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},q5=(e,t)=>e.isLoading&&e.isFetching&&!t,F5=(e,t)=>e?.suspense&&t.isPending,j_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function V5(e,t,n){const s=M5(),i=U5(),l=oE(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=s?"isRestoring":"optimistic",H5(c),z5(c,i,d),$5(i);const f=!l.getQueryCache().get(c.queryHash),[h]=k.useState(()=>new t(l,c)),g=h.getOptimisticResult(c),m=!s&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(v=>{const b=m?h.subscribe(qt.batchCalls(v)):gn;return h.updateResult(),b},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),k.useEffect(()=>{h.setOptions(c)},[c,h]),F5(c,g))throw j_(c,h,i);if(B5({result:g,errorResetBoundary:i,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!oc.isServer()&&q5(g,s)&&(f?j_(c,h,i):d?.promise)?.catch(gn).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?g:h.trackResult(g)}function cE(e,t){return V5(e,R5)}function Y$(e){return e}const Bm=new Set;function lc(...e){if(typeof window>"u")return;const t=window.fbq;if(typeof t=="function")try{t(...e)}catch(n){console.warn("[pixel] fbq call failed",n)}}function uE(){lc("track","PageView")}function dE(e,t){t?lc("track",e,t):lc("track",e)}function G5(e,t){t?lc("trackCustom",e,t):lc("trackCustom",e)}function K5(e,t){typeof window>"u"||Bm.has(e)||(Bm.add(e),t())}function Y5(e){Bm.delete(e)}const W$=Object.freeze(Object.defineProperty({__proto__:null,resetOnce:Y5,trackCustom:G5,trackOnce:K5,trackPageView:uE,trackStandard:dE},Symbol.toStringTag,{value:"Module"})),W5="/assets/styles-BVNW5V7K.css";function Q5(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"})}const Ae=Zs({type:"function"}),Z5=he({method:"POST"}).handler(pe("06ba789af1da8ede67ae6e069c99820f540e1dc13ee43612ac3793d42a5bb1e3")),X5=he({method:"POST"}).handler(pe("9f1d30530d496cb4c7e4650bc76a8bdaf2f8f66b2659fab22b22ed3c4c3acda5")),J5=he({method:"GET"}).middleware([Ae]).handler(pe("0b597bcb4639dade92dcd677cd98052e74d1252c1b2c26012b7e9a8965e9fe8d")),fE=he({method:"POST"}).middleware([Ae]).handler(pe("9e9f88ab94c0b54a9d214fd5052724a0c4df5a27e3975b16d3bb46773a4a9246")),eP=he({method:"POST"}).middleware([Ae]).handler(pe("fd59c5f9dbe50eddabad0534c2ee63506e6d43ee9f2c378f33c5556da4c5ebef")),Q$=Object.freeze(Object.defineProperty({__proto__:null,backfillHubspotContacts:eP,captureGuestEmail:Z5,getGuestLeadStats:J5,markGuestGraded:X5,syncSelfToHubspot:fE},Symbol.toStringTag,{value:"Module"})),hE=k.createContext({user:null,session:null,loading:!0,signOut:async()=>{}});function tP({children:e}){const[t,n]=k.useState(null),[s,i]=k.useState(!0),l=k.useRef(new Set);k.useEffect(()=>{const d=h=>{const g=h?.user?.id;!g||l.current.has(g)||(l.current.add(g),fE().catch(m=>console.warn("hubspot sync failed",m)))},{data:{subscription:f}}=ir.auth.onAuthStateChange((h,g)=>{n(g),i(!1),(h==="SIGNED_IN"||h==="TOKEN_REFRESHED")&&d(g)});return ir.auth.getSession().then(({data:h})=>{n(h.session),i(!1),d(h.session)}),()=>f.unsubscribe()},[]);const c={user:t?.user??null,session:t,loading:s,signOut:async()=>{await ir.auth.signOut()}};return E.jsx(hE.Provider,{value:c,children:e})}const Og=()=>k.useContext(hE);var rf=HS();const pE=BS(rf);function nP(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const rP=e=>{switch(e){case"success":return iP;case"info":return lP;case"warning":return oP;case"error":return cP;default:return null}},sP=Array(12).fill(0),aP=({visible:e,className:t})=>ae.createElement("div",{className:["sonner-loading-wrapper",t].filter(
vendor: 6,040 bytes, line 41
41Boolean).join(" "),"data-visible":e},ae.createElement("div",{className:"sonner-spinner"},sP.map((n,s)=>ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),iP=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),oP=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ae.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"})),lP=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),cP=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),uP=ae.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"},ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dP=()=>{const[e,t]=ae.useState(document.hidden);return ae.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Hm=1;class fP{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:s,...i}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Hm++,c=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:s}),{...f,...t,id:l,dismissible:d,title:s}):f):this.addToast({title:s,...i,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let l=s!==void 0,c;const d=i.then(async h=>{if(c=["resolve",h],ae.isValidElement(h))l=!1,this.create({id:s,type:"default",message:h});else if(pP(h)&&!h.ok){l=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof m=="object"&&!ae.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:v,...S})}else if(h instanceof Error){l=!1;const m=typeof n.error=="function"?await n.error(h):n.error,v=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!ae.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:v,...S})}else if(n.success!==void 0){l=!1;const m=typeof n.success=="function"?await n.success(h):n.success,v=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!ae.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:v,...S})}}).catch(async h=>{if(c=["reject",h],n.error!==void 0){l=!1;const g=typeof n.error=="function"?await n.error(h):n.error,m=typeof n.description=="function"?await n.description(h):n.description,b=typeof g=="object"&&!ae.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:m,...b})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,g)=>d.then(()=>c[0]==="reject"?g(c[1]):h(c[1])).catch(g));return typeof s!="string"&&typeof s!="number"?{unwrap:f}:Object.assign(s,{unwrap:f})},this.custom=(t,n)=>{const s=n?.id||Hm++;return this.create({jsx:t(s),id:s,...n}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const mn=new fP,hP=(e,t)=>{const n=t?.id||Hm++;return mn.addToast({title:e,...t,id:n}),n},pP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",mP=hP,gP=()=>mn.toasts,yP=()=>mn.getActiveToasts(),pn=Object.assign(mP,{success:mn.success,info:mn.info,warning:mn.warning,error:mn.error,custom:mn.custom,message:mn.message,promise:mn.promise,dismiss:mn.dismiss,loading:mn.loading},{getHistory:gP,getToasts:yP});nP
vendor: 14,873 bytes, line 41
41("[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,044 bytes, line 41
41Zu(e){return e.label!==void 0}const vP=3,bP="24px",wP="16px",D_=4e3,_P=356,SP=14,xP=45,EP=200;function wr(...e){return e.filter(Boolean).join(" ")}function RP(e){const[t,n]=e.split("-"),s=[];return t&&s.push(t),n&&s.push(n),s}const TP=e=>{var t,n,s,i,l,c,d,f,h;const{invert:g,toast:m,unstyled:v,interacting:b,setHeights:S,visibleToasts:_,heights:x,index:R,toasts:A,expanded:C,removeToast:D,defaultRichColors:z,closeButton:N,style:O,cancelButtonStyle:I,actionButtonStyle:W,className:ne="",descriptionClassName:F="",duration:V,position:ee,gap:le,expandByDefault:oe,classNames:M,icons:G,closeButtonAriaLabel:te="Close toast"}=e,[Se,J]=ae.useState(null),[P,K]=ae.useState(null),[Q,re]=ae.useState(!1),[ie,ue]=ae.useState(!1),[fe,be]=ae.useState(!1),[Re,bt]=ae.useState(!1),[kt,ft]=ae.useState(!1),[vn,Vt]=ae.useState(0),[Oo,ni]=ae.useState(0),ma=ae.useRef(m.duration||V||D_),No=ae.useRef(null),bn=ae.useRef(null),jo=R===0,Do=R+1<=_,Zt=m.type,ms=m.dismissible!==!1,Xt=m.className||"",pf=m.descriptionClassName||"",ga=ae.useMemo(()=>x.findIndex(Ne=>Ne.toastId===m.id)||0,[x,m.id]),wc=ae.useMemo(()=>{var Ne;return(Ne=m.closeButton)!=null?Ne:N},[m.closeButton,N]),ya=ae.useMemo(()=>m.duration||V||D_,[m.duration,V]),Po=ae.useRef(0),jr=ae.useRef(0),_c=ae.useRef(0),gs=ae.useRef(null),[va,Jt]=ee.split("-"),Yn=ae.useMemo(()=>x.reduce((Ne,ut,jt)=>jt>=ga?Ne:Ne+ut.height,0),[x,ga]),Gt=dP(),mf=m.invert||g,Mo=Zt==="loading";jr.current=ae.useMemo(()=>ga*le+Yn,[ga,Yn]),ae.useEffect(()=>{ma.current=ya},[ya]),ae.useEffect(()=>{re(!0)},[]),ae.useEffect(()=>{const Ne=bn.current;if(Ne){const ut=Ne.getBoundingClientRect().height;return ni(ut),S(jt=>[{toastId:m.id,height:ut,position:m.position},...jt]),()=>S(jt=>jt.filter(Kt=>Kt.toastId!==m.id))}},[S,m.id]),ae.useLayoutEffect(()=>{if(!Q)return;const Ne=bn.current,ut=Ne.style.height;Ne.style.height="auto";const jt=Ne.getBoundingClientRect().height;Ne.style.height=ut,ni(jt),S(Kt=>Kt.find(ht=>ht.toastId===m.id)?Kt.map(ht=>ht.toastId===m.id?{...ht,height:jt}:ht):[{toastId:m.id,height:jt,position:m.position}
vendor: 4,061 bytes, line 41
41,...Kt])},[Q,m.title,m.description,S,m.id,m.jsx,m.action,m.cancel]);const hr=ae.useCallback(()=>{ue(!0),Vt(jr.current),S(Ne=>Ne.filter(ut=>ut.toastId!==m.id)),setTimeout(()=>{D(m)},EP)},[m,D,S,jr]);ae.useEffect(()=>{if(m.promise&&Zt==="loading"||m.duration===1/0||m.type==="loading")return;let Ne;return C||b||Gt?(()=>{if(_c.current<Po.current){const Kt=new Date().getTime()-Po.current;ma.current=ma.current-Kt}_c.current=new Date().getTime()})():ma.current!==1/0&&(Po.current=new Date().getTime(),Ne=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),hr()},ma.current)),()=>clearTimeout(Ne)},[C,b,m,Zt,Gt,hr]),ae.useEffect(()=>{m.delete&&(hr(),m.onDismiss==null||m.onDismiss.call(m,m))},[hr,m.delete]);function ri(){var Ne;if(G?.loading){var ut;return ae.createElement("div",{className:wr(M?.loader,m==null||(ut=m.classNames)==null?void 0:ut.loader,"sonner-loader"),"data-visible":Zt==="loading"},G.loading)}return ae.createElement(aP,{className:wr(M?.loader,m==null||(Ne=m.classNames)==null?void 0:Ne.loader),visible:Zt==="loading"})}const si=m.icon||G?.[Zt]||rP(Zt);var ba,pr;return ae.createElement("li",{tabIndex:0,ref:bn,className:wr(ne,Xt,M?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,M?.default,M?.[Zt],m==null||(n=m.classNames)==null?void 0:n[Zt]),"data-sonner-toast":"","data-rich-colors":(ba=m.richColors)!=null?ba:z,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":Q,"data-promise":!!m.promise,"data-swiped":kt,"data-removed":ie,"data-visible":Do,"data-y-position":va,"data-x-position":Jt,"data-index":R,"data-front":jo,"data-swiping":fe,"data-dismissible":ms,"data-type":Zt,"data-invert":mf,"data-swipe-out":Re,"data-swipe-direction":P,"data-expanded":!!(C||oe&&Q),"data-testid":m.testId,style:{"--index":R,"--toasts-before":R,"--z-index":A.length-R,"--offset":`${ie?vn:jr.current}px`,"--initial-height":oe?"auto":`${Oo}px`,...O,...m.style},onDragEnd:()=>{be(!1),J(null),gs.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Mo||!ms||(No.current=new Date,Vt(jr.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(be(!0),gs.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,ut,jt;if(Re||!ms)return;gs.current=null;const Kt=Number(((Ne=bn.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ys=Number(((ut=bn.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ht=new Date().getTime()-((jt=No.current)==null?void 0:jt.getTime()),nn=Se==="x"?Kt:ys,wa=Math.abs(nn)/ht;if(Math.abs(nn)>=xP||wa>.11){Vt(jr.current),m.onDismiss==null||m.onDismiss.call(m,m),K(Se==="x"?Kt>0?"right":"left":ys>0?"down":"up"),hr(),bt(!0);return}else{var rn,sn;(rn=bn.current)==null||rn.style.setProperty("--swipe-amount-x","0px"),(sn=bn.current)==null||sn.style.setProperty("--swipe-amount-y","0px")}ft(!1),be(!1),J(null)},onPointerMove:Ne=>{var ut,jt,Kt;if(!gs.current||!ms||((ut=window.getSelection())==null?void 0:ut.toString().length)>0)return;const ht=Ne.clientY-gs.current.y,nn=Ne.clientX-gs.current.x;var wa;const rn=(wa=e.swipeDirections)!=null?wa:RP(ee);!Se&&(Math.abs(nn)>1||Math.abs(ht)>1)&&J(Math.abs(nn)>Math.abs(ht)?"x":"y");let sn={x:0,y:0};const ai=Wn=>1/(1.5+Math.abs(Wn)/20);if(Se==="y"){if(rn.includes("top")||rn.includes("bottom"))if(rn.includes("top")&&ht<0||rn.includes("bottom")&&ht>0)sn.y=ht;else{const Wn=ht*ai(ht);sn.y=Math.abs(Wn)<Math.abs(ht)?Wn:ht}}else if(Se==="x"&&(rn.includes("left")||rn.includes("right")))if(rn.includes("left")&&nn<0||rn.includes("right")&&nn>0)sn.x=nn;else{const Wn=nn*ai(nn);sn.x=Math.abs(Wn)<Math.abs(nn)?Wn:nn}(Math.abs(sn.x)>0||Math.abs(sn.y)>0)&&ft(!0),(jt=bn.current)==null||jt.style.setProperty("--swipe-amount-x",`${sn.x}px`),(Kt=bn.current)==null||Kt.style.setProperty("--swipe-amount-y",`${sn.y}px`)}},wc&&!m.jsx&&Zt!=="loading"?ae.createElement("button",{"aria-label":te,"data-disabled":Mo,"data-close-button":!0,onClick:Mo||!ms?()=>{}:()=>{hr(),m.onDismiss==null||m.onDismiss.call(m,m)},className:wr(M?.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)}
vendor: 7,168 bytes, lines 41-47
41,(pr=G?.close)!=null?pr:uP):null,(Zt||m.icon||m.promise)&&m.icon!==null&&(G?.[Zt]!==null||m.icon)?ae.createElement("div",{"data-icon":"",className:wr(M?.icon,m==null||(i=m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ri():null,m.type!=="loading"?si:null):null,ae.createElement("div",{"data-content":"",className:wr(M?.content,m==null||(l=m.classNames)==null?void 0:l.content)},ae.createElement("div",{"data-title":"",className:wr(M?.title,m==null||(c=m.classNames)==null?void 0:c.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?ae.createElement("div",{"data-description":"",className:wr(F,pf,M?.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),ae.isValidElement(m.cancel)?m.cancel:m.cancel&&Zu(m.cancel)?ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||I,onClick:Ne=>{Zu(m.cancel)&&ms&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ne),hr())},className:wr(M?.cancelButton,m==null||(f=m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,ae.isValidElement(m.action)?m.action:m.action&&Zu(m.action)?ae.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||W,onClick:Ne=>{Zu(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ne),!Ne.defaultPrevented&&hr())},className:wr(M?.actionButton,m==null||(h=m.classNames)==null?void 0:h.actionButton)},m.action.label):null)};function P_(){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 kP(e,t){const n={};return[e,t].forEach((s,i)=>{const l=i===1,c=l?"--mobile-offset":"--offset",d=l?wP:bP;function f(h){["top","right","bottom","left"].forEach(g=>{n[`${c}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof s=="number"||typeof s=="string"?f(s):typeof s=="object"?["top","right","bottom","left"].forEach(h=>{s[h]===void 0?n[`${c}-${h}`]=d:n[`${c}-${h}`]=typeof s[h]=="number"?`${s[h]}px`:s[h]}):f(d)}),n}const AP=ae.forwardRef(function(t,n){const{id:s,invert:i,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:g,mobileOffset:m,theme:v="light",richColors:b,duration:S,style:_,visibleToasts:x=vP,toastOptions:R,dir:A=P_(),gap:C=SP,icons:D,containerAriaLabel:z="Notifications"}=t,[N,O]=ae.useState([]),I=ae.useMemo(()=>s?N.filter(Q=>Q.toasterId===s):N.filter(Q=>!Q.toasterId),[N,s]),W=ae.useMemo(()=>Array.from(new Set([l].concat(I.filter(Q=>Q.position).map(Q=>Q.position)))),[I,l]),[ne,F]=ae.useState([]),[V,ee]=ae.useState(!1),[le,oe]=ae.useState(!1),[M,G]=ae.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=ae.useRef(null),Se=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=ae.useRef(null),P=ae.useRef(!1),K=ae.useCallback(Q=>{O(re=>{var ie;return(ie=re.find(ue=>ue.id===Q.id))!=null&&ie.delete||mn.dismiss(Q.id),re.filter(({id:ue})=>ue!==Q.id)})},[]);return ae.useEffect(()=>mn.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{O(re=>re.map(ie=>ie.id===Q.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{pE.flushSync(()=>{O(re=>{const ie=re.findIndex(ue=>ue.id===Q.id);return ie!==-1?[...re.slice(0,ie),{...re[ie],...Q},...re.slice(ie+1)]:[Q,...re]})})})}),[N]),ae.useEffect(()=>{if(v!=="system"){G(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:re})=>{G(re?"dark":"light")})}catch{Q.addListener(({matches:ie})=>{try{G(ie?"dark":"light")}catch(ue){console.error(ue)}})}},[v]),ae.useEffect(()=>{N.length<=1&&ee(!1)},[N]),ae.useEffect(()=>{const Q=re=>{var ie;if(c.every(be=>re[be]||re.code===be)){var fe;ee(!0),(fe=te.current)==null||fe.focus()}re.code==="Escape"&&(document.activeElement===te.current||(ie=te.current)!=null&&ie.contains(document.activeElement))&&ee(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[c]),ae.useEffect(()=>{if(te.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,P.current=!1)}},[te.current]),ae.createElement("section",{ref:n,"aria-label":`${z} ${Se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map((Q,re)=>{var ie;const[ue,fe]=Q.split("-");return I.length?ae.createElement("ol",{key:Q,dir:A==="auto"?P_():A,tabIndex:-1,ref:te,className:h,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":ue,"data-x-position":fe,style:{"--front-toast-height":`${((ie=ne[0])==null?void 0:ie.height)||0}px`,"--width":`${_P}px`,"--gap":`${C}px`,..._,...kP(g,m)},onBlur:be=>{P.current&&!be.currentTarget.contains(be.relatedTarget)&&(P.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||P.current||(P.current=!0,J.current=be.relatedTarget)},onMouseEnter:()=>ee(!0),onMouseMove:()=>ee(!0),onMouseLeave:()=>{le||ee(!1)},onDragEnd:()=>ee(!1),onPointerDown:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},I.filter(be=>!be.position&&re===0||be.position===Q).map((be,Re)=>{var bt,kt;return ae.createElement(TP,{key:be.id,icons:D,index:Re,toast:be,defaultRichColors:b,duration:(bt=R?.duration)!=null?bt:S,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:i,visibleToasts:x,closeButton:(kt=R?.closeButton)!=null?kt:f,interacting:le,position:Q,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:K,toasts:I.filter(ft=>ft.position==be.position),heights:ne.filter(ft=>ft.position==be.position),setHeights:F,expandByDefault:d,gap:C,expanded:V,swipeDirections:t.swipeDirections})})):null}))}),CP=({...e})=>E.jsx(AP,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e}),M_="chck-theme",mE=k.createContext(null);function L_(e){typeof document>"u"||document.documentElement.setAttribute("data-theme",e)}const OP=`
42(function(){
43  try {
44    document.documentElement.setAttribute("data-theme", "light");
45  } catch (e) {}
46})();
47`.trim();function NP({children:e}){const[t,n]=k.useState("light"),[s,i]=k.useState("light");k.useEffect(()=>{n("light"),i("light"),L_("light");try{localStorage.setItem(M_,"light")}catch{}},[]);const l=f=>{n(f),i(f),L_(f);try{localStorage.setItem(M_,f)}catch{}},c=()=>
vendor: 4,101 bytes, line 47
47{l("light")},d=k.useMemo(()=>({pref:t,resolved:s,setPref:l,cyclePref:c}),[t,s]);return E.jsx(mE.Provider,{value:d,children:e})}function Z$(){const e=k.useContext(mE);return e||{pref:"light",resolved:"light",setPref:()=>{},cyclePref:()=>{}}}const gE=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();const jP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const DP=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase());const I_=e=>{const t=DP(e);return t.charAt(0).toUpperCase()+t.slice(1)};var PP={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 MP=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const LP=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:l,iconNode:c,...d},f)=>k.createElement("svg",{ref:f,...PP,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:gE("lucide",i),...!l&&!MP(d)&&{"aria-hidden":"true"},...d},[...c.map(([h,g])=>k.createElement(h,g)),...Array.isArray(l)?l:[l]]));const Ft=(e,t)=>{const n=k.forwardRef(({className:s,...i},l)=>k.createElement(LP,{ref:l,iconNode:t,className:gE(`lucide-${jP(I_(e))}`,`lucide-${e}`,s),...i}));return n.displayName=I_(e),n};const IP=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],U_=Ft("arrow-right",IP);const UP=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],z_=Ft("arrow-up-right",UP);const zP=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],$P=Ft("bell",zP);const BP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],$_=Ft("circle-alert",BP);const HP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],yE=Ft("circle-check",HP);const qP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],FP=Ft("clock",qP);const VP=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],GP=Ft("dollar-sign",VP);const KP=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],vE=Ft("external-link",KP);const YP=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qm=Ft("loader-circle",YP);const WP=[["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"}]],QP=Ft("log-out",WP);const ZP=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],B_=Ft("mail",ZP);const XP=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],JP=Ft("megaphone",XP);const eM=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],tM=Ft("menu",eM);const nM=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]],rM=Ft("scan-line",nM);const sM=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],aM=Ft("search",sM);const iM=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 
471.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],H_=Ft("sparkles",iM);const oM=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sf=Ft("x",oM);var We;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},e.getValidEnumValues=i=>{const l=e.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return e.objectValues(c)},e.objectValues=i=>e.objectKeys(i).map(function(l){return i[l]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},e.find=(i,l)=>{for(const c of i)if(l(c))return c},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function s(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}e.joinValues=s,e.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(We||(We={}));var q_;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(q_||(q_={}));const we=We.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gs=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return Number.isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}}
vendor: 38,761 bytes, line 47
47,se=We.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class us extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},s={_errors:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)s._errors.push(n(c));else{let d=s,f=0;for(;f<c.path.length;){const h=c.path[f];f===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return i(this),s}static assert(t){if(!(t instanceof us))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,We.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},s=[];for(const i of this.issues)if(i.path.length>0){const l=i.path[0];n[l]=n[l]||[],n[l].push(t(i))}else s.push(t(i));return{formErrors:s,fieldErrors:n}}get formErrors(){return this.flatten()}}us.create=e=>new us(e);const Fm=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,We.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${We.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${We.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${We.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:We.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,We.assertNever(e)}return{message:n}};let lM=Fm;function cM(){return lM}const uM=e=>{const{data:t,path:n,errorMaps:s,issueData:i}=e,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const f=s.filter(h=>!!h).slice().reverse();for(const h of f)d=h(c,{data:t,defaultError:d}).message;return{...i,path:l,message:d}};function de(e,t){const n=cM(),s=uM({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Fm?void 0:Fm].filter(i=>!!i)});e.common.issues.push(s)}class Dn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const s=[];for(const i of n){if(i.status==="aborted")return De;i.status==="dirty"&&t.dirty(),s.push(i.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,n){const s=[];for(const i of n){const l=await i.key,c=await i.value;s.push({key:l,value:c})}return Dn.mergeObjectSync(t,s)}static mergeObjectSync(t,n){const s={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return De;l.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(s[l.value]=c.value)}return{status:t.value,value:s}}}const De=Object.freeze({status:"aborted"}),Ll=e=>({status:"dirty",value:e}),Gn=e=>({status:"valid",value:e}),F_=e=>e.status==="aborted",V_=e=>e.status==="dirty",vo=e=>e.status==="valid",Md=e=>typeof Promise<"u"&&e instanceof Promise;var xe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(xe||(xe={}));class ia{constructor(t,n,s,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=s,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const G_=(e,t)=>{if(vo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new us(e.common.issues);return this._error=n,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:s,description:i}=e;if(t&&(n||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(c,d)=>{const{message:f}=e;return c.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:f??s??d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:f??n??d.defaultError}},description:i}}class Ge{get description(){return this._def.description}_getType(t){return Gs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Dn,ctx:{common:t.parent.common,data:t.data,parsedType:Gs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Md(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const s=this.safeParse(t,n);if(s.success)return s.data;throw s.error}safeParse(t,n){const s={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gs(t)},i=this._parseSync({data:t,path:s.path,parent:s});return G_(s,i)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gs(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:n});return vo(s)?{value:s.value}:{issues:n.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>vo(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){const s=await this.safeParseAsync(t,n);if(s.success)return s.data;throw s.error}async safeParseAsync(t,n){const s={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gs(t)},i=this._parse({data:t,path:s.path,parent:s}),l=await(Md(i)?i:Promise.resolve(i));return G_(s,l)}refine(t,n){const s=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=t(i),d=()=>l.addIssue({code:se.custom,...s(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(f=>f?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(t,n){return this._refinement((s,i)=>t(s)?!0:(i.addIssue(typeof n=="function"?n(s,i):n),!1))}_refinement(t){return new wo({schema:this,typeName:Pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return na.create(this,this._def)}nullable(){return _o.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ar.create(this)}promise(){return zd.create(this,this._def)}or(t){return Id.create([this,t],this._def)}and(t){return Ud.create(this,t,this._def)}transform(t){return new wo({...Ue(this._def),schema:this,typeName:Pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gm({...Ue(this._def),innerType:this,defaultValue:n,typeName:Pe.ZodDefault})}brand(){return new DM({typeName:Pe.ZodBranded,type:this,...Ue(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Km({...Ue(this._def),innerType:this,catchValue:n,typeName:Pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ng.create(this,t)}readonly(){return Ym.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dM=/^c[^\s-]{8,}$/i,fM=/^[0-9a-z]+$/,hM=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pM=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mM=/^[a-z0-9_-]{21}$/i,gM=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Xp;const wM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_M=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,SM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,EM=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,RM=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",TM=new RegExp(`^${bE}$`);function wE(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function kM(e){return new RegExp(`^${wE(e)}$`)}function AM(e){let t=`${bE}T${wE(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function CM(e,t){return!!((t==="v4"||!t)&&wM.test(e)||(t==="v6"||!t)&&SM.test(e))}function OM(e,t){if(!gM.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const s=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(s));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function NM(e,t){return!!((t==="v4"||!t)&&_M.test(e)||(t==="v6"||!t)&&xM.test(e))}class Xs extends Ge{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const l=this._getOrReturnCtx(t);return de(l,{code:se.invalid_type,expected:we.string,received:l.parsedType}),De}const s=new Dn;let i;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:se.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="max")t.data.length>l.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:se.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="length"){const c=t.data.length>l.value,d=t.data.length<l.value;(c||d)&&(i=this._getOrReturnCtx(t,i),c?de(i,{code:se.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&de(i,{code:se.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),s.dirty())}else if(l.kind==="email")vM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"email",code:se.invalid_string,message:l.message}),s.dirty());else if(l.kind==="emoji")Xp||(Xp=new RegExp(bM,"u")),Xp.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"emoji",code:se.invalid_string,message:l.message}),s.dirty());else if(l.kind==="uuid")pM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"uuid",code:se.invalid_string,message:l.message}),s.dirty());else if(l.kind==="nanoid")mM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"nanoid",code:se.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid")dM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"cuid",code:se.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid2")fM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"cuid2",code:se.invalid_string,message:l.message}),s.dirty());else if(l.kind==="ulid")hM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"ulid",code:se.invalid_string,message:l.message}),s.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),de(i,{validation:"url",code:se.invalid_string,message:l.message}),s.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"regex",code:se.invalid_string,message:l.message}),s.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(i=this._getOrReturnCtx(t,i),de(i,{code:se.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),s.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(i=this._getOrReturnCtx(t,i),de(i,{code:se.invalid_string,validation:{startsWith:l.value},message:l.message}),s.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(i=this._getOrReturnCtx(t,i),de(i,{code:se.invalid_string,validation:{endsWith:l.value},message:l.message}),s.dirty()):l.kind==="datetime"?AM(l).test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:se.invalid_string,validation:"datetime",message:l.message}),s.dirty()):l.kind==="date"?TM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:se.invalid_string,validation:"date",message:l.message}),s.dirty()):l.kind==="time"?kM(l).test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:se.invalid_string,validation:"time",message:l.message}),s.dirty()):l.kind==="duration"?yM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"duration",code:se.invalid_string,message:l.message}),s.dirty()):l.kind==="ip"?CM(t.data,l.version)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"ip",code:se.invalid_string,message:l.message}),s.dirty()):l.kind==="jwt"?OM(t.data,l.alg)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"jwt",code:se.invalid_string,message:l.message}),s.dirty()):l.kind==="cidr"?NM(t.data,l.version)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"cidr",code:se.invalid_string,message:l.message}),s.dirty()):l.kind==="base64"?EM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"base64",code:se.invalid_string,message:l.message}),s.dirty()):l.kind==="base64url"?RM.test(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{validation:"base64url",code:se.invalid_string,message:l.message}),s.dirty()):We.assertNever(l);return{status:s.value,value:t.data}}_regex(t,n,s){return this.refinement(i=>t.test(i),{validation:n,code:se.invalid_string,...xe.errToObj(s)})}_addCheck(t){return new Xs({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...xe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...xe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...xe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...xe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...xe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...xe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...xe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...xe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...xe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...xe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...xe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...xe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...xe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...xe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...xe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...xe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...xe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...xe.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...xe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...xe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...xe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...xe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...xe.errToObj(n)})}nonempty(t){return this.min(1,xe.errToObj(t))}trim(){return new Xs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Xs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Xs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Xs.create=e=>new Xs({checks:[],typeName:Pe.ZodString,coerce:e?.coerce??!1,...Ue(e)});function jM(e,t){const n=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,i=n>s?n:s,l=Number.parseInt(e.toFixed(i).replace(".","")),c=Number.parseInt(t.toFixed(i).replace(".",""));return l%c/10**i}class cc extends Ge{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==we.number){const l=this._getOrReturnCtx(t);return de(l,{code:se.invalid_type,expected:we.number,received:l.parsedType}),De}let s;const i=new Dn;for(const l of this._def.checks)l.kind==="int"?We.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),de(s,{code:se.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(s=this._getOrReturnCtx(t,s),de(s,{code:se.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(s=this._getOrReturnCtx(t,s),de(s,{code:se.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?jM(t.data,l.value)!==0&&(s=this._getOrReturnCtx(t,s),de(s,{code:se.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),de(s,{code:se.not_finite,message:l.message}),i.dirty()):We.assertNever(l);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,xe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,xe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,xe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,xe.toString(n))}setLimit(t,n,s,i){return new cc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:s,message:xe.toString(i)}]})}_addCheck(t){return new cc({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:xe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:xe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:xe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:xe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:xe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:xe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&We.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(n===null||s.value>n)&&(n=s.value):s.kind==="max"&&(t===null||s.value<t)&&(t=s.value)}return Number.isFinite(n)&&Number.isFinite(t)}}cc.create=e=>new cc({checks:[],typeName:Pe.ZodNumber,coerce:e?.coerce||!1,...Ue(e)});class uc extends Ge{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==we.bigint)return this._getInvalidInput(t);let s;const i=new Dn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(s=this._getOrReturnCtx(t,s),de(s,{code:se.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(s=this._getOrReturnCtx(t,s),de(s,{code:se.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),de(s,{code:se.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):We.assertNever(l);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return de(n,{code:se.invalid_type,expected:we.bigint,received:n.parsedType}),De}gte(t,n){return this.setLimit("min",t,!0,xe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,xe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,xe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,xe.toString(n))}setLimit(t,n,s,i){return new uc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:s,message:xe.toString(i)}]})}_addCheck(t){return new uc({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:xe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:xe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}uc.create=e=>new uc({checks:[],typeName:Pe.ZodBigInt,coerce:e?.coerce??!1,...Ue(e)});class K_ extends Ge{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const s=this._getOrReturnCtx(t);return de(s,{code:se.invalid_type,expected:we.boolean,received:s.parsedType}),De}return Gn(t.data)}}K_.create=e=>new K_({typeName:Pe.ZodBoolean,coerce:e?.coerce||!1,...Ue(e)});class Ld extends Ge{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const l=this._getOrReturnCtx(t);return de(l,{code:se.invalid_type,expected:we.date,received:l.parsedType}),De}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return de(l,{code:se.invalid_date}),De}const s=new Dn;let i;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:se.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),s.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(i=this._getOrReturnCtx(t,i),de(i,{code:se.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),s.dirty()):We.assertNever(l);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ld({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:xe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:xe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ld.create=e=>new Ld({checks:[],coerce:e?.coerce||!1,typeName:Pe.ZodDate,...Ue(e)});class Y_ extends Ge{_parse(t){if(this._getType(t)!==we.symbol){const s=this._getOrReturnCtx(t);return de(s,{code:se.invalid_type,expected:we.symbol,received:s.parsedType}),De}return Gn(t.data)}}Y_.create=e=>new Y_({typeName:Pe.ZodSymbol,...Ue(e)});class W_ extends Ge{_parse(t){if(this._getType(t)!==we.undefined){const s=this._getOrReturnCtx(t);return de(s,{code:se.invalid_type,expected:we.undefined,received:s.parsedType}),De}return Gn(t.data)}}W_.create=e=>new W_({typeName:Pe.ZodUndefined,...Ue(e)});class Q_ extends Ge{_parse(t){if(this._getType(t)!==we.null){const s=this._getOrReturnCtx(t);return de(s,{code:se.invalid_type,expected:we.null,received:s.parsedType}),De}return Gn(t.data)}}Q_.create=e=>new Q_({typeName:Pe.ZodNull,...Ue(e)});class Z_ extends Ge{constructor(){super(...arguments),this._any=!0}_parse(t){return Gn(t.data)}}Z_.create=e=>new Z_({typeName:Pe.ZodAny,...Ue(e)});class X_ extends Ge{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Gn(t.data)}}X_.create=e=>new X_({typeName:Pe.ZodUnknown,...Ue(e)});class oa extends Ge{_parse(t){const n=this._getOrReturnCtx(t);return de(n,{code:se.invalid_type,expected:we.never,received:n.parsedType}),De}}oa.create=e=>new oa({typeName:Pe.ZodNever,...Ue(e)});class J_ extends Ge{_parse(t){if(this._getType(t)!==we.undefined){const s=this._getOrReturnCtx(t);return de(s,{code:se.invalid_type,expected:we.void,received:s.parsedType}),De}return Gn(t.data)}}J_.create=e=>new J_({typeName:Pe.ZodVoid,...Ue(e)});class Ar extends Ge{_parse(t){const{ctx:n,status:s}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return de(n,{code:se.invalid_type,expected:we.array,received:n.parsedType}),De;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(de(n,{code:c?se.too_big:se.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),s.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(de(n,{code:se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),s.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(de(n,{code:se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),s.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new ia(n,c,n.path,d)))).then(c=>Dn.mergeArray(s,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new ia(n,c,n.path,d)));return Dn.mergeArray(s,l)}get element(){return this._def.type}min(t,n){return new Ar({...this._def,minLength:{value:t,message:xe.toString(n)}})}max(t,n){return new Ar({...this._def,maxLength:{value:t,message:xe.toString(n)}})}length(t,n){return new Ar({...this._def,exactLength:{value:t,message:xe.toString(n)}})}nonempty(t){return this.min(1,t)}}Ar.create=(e,t)=>new Ar({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Pe.ZodArray,...Ue(t)});function ao(e){if(e instanceof Ot){const t={};for(const n in e.shape){const s=e.shape[n];t[n]=na.create(ao(s))}return new Ot({...e._def,shape:()=>t})}else return e instanceof Ar?new Ar({...e._def,type:ao(e.element)}):e instanceof na?na.create(ao(e.unwrap())):e instanceof _o?_o.create(ao(e.unwrap())):e instanceof Wa?Wa.create(e.items.map(t=>ao(t))):e}class Ot extends Ge{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=We.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==we.object){const h=this._getOrReturnCtx(t);return de(h,{code:se.invalid_type,expected:we.object,received:h.parsedType}),De}const{status:s,ctx:i}=this._processInputParams(t),{shape:l,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof oa&&this._def.unknownKeys==="strip"))for(const h in i.data)c.includes(h)||d.push(h);const f=[];for(const h of c){const g=l[h],m=i.data[h];f.push({key:{status:"valid",value:h},value:g._parse(new ia(i,m,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof oa){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of d)f.push({key:{status:"valid",value:g},value:{status:"valid",value:i.data[g]}});else if(h==="strict")d.length>0&&(de(i,{code:se.unrecognized_keys,keys:d}),s.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of d){const m=i.data[g];f.push({key:{status:"valid",value:g},value:h._parse(new ia(i,m,i.path,g)),alwaysSet:g in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of f){const m=await g.key,v=await g.value;h.push({key:m,value:v,alwaysSet:g.alwaysSet})}return h}).then(h=>Dn.mergeObjectSync(s,h)):Dn.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(t){return xe.errToObj,new Ot({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,s)=>{const i=this._def.errorMap?.(n,s).message??s.defaultError;return n.code==="unrecognized_keys"?{message:xe.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new Ot({...this._def,unknownKeys:"strip"})}passthrough(){return new Ot({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ot({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ot({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ot({...this._def,catchall:t})}pick(t){const n={};for(const s of We.objectKeys(t))t[s]&&this.shape[s]&&(n[s]=this.shape[s]);return new Ot({...this._def,shape:()=>n})}omit(t){const n={};for(const s of We.objectKeys(this.shape))t[s]||(n[s]=this.shape[s]);return new Ot({...this._def,shape:()=>n})}deepPartial(){return ao(this)}partial(t){const n={};for(const s of We.objectKeys(this.shape)){const i=this.shape[s];t&&!t[s]?n[s]=i:n[s]=i.optional()}return new Ot({...this._def,shape:()=>n})}required(t){const n={};for(const s of We.objectKeys(this.shape))if(t&&!t[s])n[s]=this.shape[s];else{let l=this.shape[s];for(;l instanceof na;)l=l._def.innerType;n[s]=l}return new Ot({...this._def,shape:()=>n})}keyof(){return _E(We.objectKeys(this.shape))}}Ot.create=(e,t)=>new Ot({shape:()=>e,unknownKeys:"strip",catchall:oa.create(),typeName:Pe.ZodObject,...Ue(t)});Ot.strictCreate=(e,t)=>new Ot({shape:()=>e,unknownKeys:"strict",catchall:oa.create(),typeName:Pe.ZodObject,...Ue(t)});Ot.lazycreate=(e,t)=>new Ot({shape:e,unknownKeys:"strip",catchall:oa.create(),typeName:Pe.ZodObject,...Ue(t)});class Id extends Ge{_parse(t){const{ctx:n}=this._processInputParams(t),s=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new us(d.ctx.common.issues));return de(n,{code:se.invalid_union,unionErrors:c}),De}if(n.common.async)return Promise.all(s.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(i);{let l;const c=[];for(const f of s){const h={...n,common:{...n.common,issues:[]},parent:null},g=f._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(f=>new us(f));return de(n,{code:se.invalid_union,unionErrors:d}),De}}get options(){return this._def.options}}Id.create=(e,t)=>
vendor: 4,409 bytes, line 47
47new Id({options:e,typeName:Pe.ZodUnion,...Ue(t)});function Vm(e,t){const n=Gs(e),s=Gs(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&s===we.object){const i=We.objectKeys(t),l=We.objectKeys(e).filter(d=>i.indexOf(d)!==-1),c={...e,...t};for(const d of l){const f=Vm(e[d],t[d]);if(!f.valid)return{valid:!1};c[d]=f.data}return{valid:!0,data:c}}else if(n===we.array&&s===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let l=0;l<e.length;l++){const c=e[l],d=t[l],f=Vm(c,d);if(!f.valid)return{valid:!1};i.push(f.data)}return{valid:!0,data:i}}else return n===we.date&&s===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ud extends Ge{_parse(t){const{status:n,ctx:s}=this._processInputParams(t),i=(l,c)=>{if(F_(l)||F_(c))return De;const d=Vm(l.value,c.value);return d.valid?((V_(l)||V_(c))&&n.dirty(),{status:n.value,value:d.data}):(de(s,{code:se.invalid_intersection_types}),De)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([l,c])=>i(l,c)):i(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}Ud.create=(e,t,n)=>new Ud({left:e,right:t,typeName:Pe.ZodIntersection,...Ue(n)});class Wa extends Ge{_parse(t){const{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==we.array)return de(s,{code:se.invalid_type,expected:we.array,received:s.parsedType}),De;if(s.data.length<this._def.items.length)return de(s,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),De;!this._def.rest&&s.data.length>this._def.items.length&&(de(s,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...s.data].map((c,d)=>{const f=this._def.items[d]||this._def.rest;return f?f._parse(new ia(s,c,s.path,d)):null}).filter(c=>!!c);return s.common.async?Promise.all(l).then(c=>Dn.mergeArray(n,c)):Dn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new Wa({...this._def,rest:t})}}Wa.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Wa({items:e,typeName:Pe.ZodTuple,rest:null,...Ue(t)})};class eS extends Ge{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==we.map)return de(s,{code:se.invalid_type,expected:we.map,received:s.parsedType}),De;const i=this._def.keyType,l=this._def.valueType,c=[...s.data.entries()].map(([d,f],h)=>({key:i._parse(new ia(s,d,s.path,[h,"key"])),value:l._parse(new ia(s,f,s.path,[h,"value"]))}));if(s.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const f of c){const h=await f.key,g=await f.value;if(h.status==="aborted"||g.status==="aborted")return De;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const f of c){const h=f.key,g=f.value;if(h.status==="aborted"||g.status==="aborted")return De;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}}}}eS.create=(e,t,n)=>new eS({valueType:t,keyType:e,typeName:Pe.ZodMap,...Ue(n)});class dc extends Ge{_parse(t){const{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==we.set)return de(s,{code:se.invalid_type,expected:we.set,received:s.parsedType}),De;const i=this._def;i.minSize!==null&&s.data.size<i.minSize.value&&(de(s,{code:se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&s.data.size>i.maxSize.value&&(de(s,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(f){const h=new Set;for(const g of f){if(g.status==="aborted")return De;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const d=[...s.data.values()].map((f,h)=>l._parse(new ia(s,f,s.path,h)));return s.common.async?Promise.all(d).then(f=>c(f)):c(d)}min(t,n){return new dc({...this._def,minSize:{value:t,message:xe.toString(n)}})}max(t,n){return new dc({...this._def,maxSize:{value:t,message:xe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}dc.create=(e,t)=>
vendor: 4,655 bytes, line 47
47new dc({valueType:e,minSize:null,maxSize:null,typeName:Pe.ZodSet,...Ue(t)});class tS extends Ge{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}tS.create=(e,t)=>new tS({getter:e,typeName:Pe.ZodLazy,...Ue(t)});class nS extends Ge{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return de(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}}nS.create=(e,t)=>new nS({value:e,typeName:Pe.ZodLiteral,...Ue(t)});function _E(e,t){return new bo({values:e,typeName:Pe.ZodEnum,...Ue(t)})}class bo extends Ge{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),s=this._def.values;return de(n,{expected:We.joinValues(s),received:n.parsedType,code:se.invalid_type}),De}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),s=this._def.values;return de(n,{received:n.data,code:se.invalid_enum_value,options:s}),De}return Gn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return bo.create(t,{...this._def,...n})}exclude(t,n=this._def){return bo.create(this.options.filter(s=>!t.includes(s)),{...this._def,...n})}}bo.create=_E;class rS extends Ge{_parse(t){const n=We.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==we.string&&s.parsedType!==we.number){const i=We.objectValues(n);return de(s,{expected:We.joinValues(i),received:s.parsedType,code:se.invalid_type}),De}if(this._cache||(this._cache=new Set(We.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=We.objectValues(n);return de(s,{received:s.data,code:se.invalid_enum_value,options:i}),De}return Gn(t.data)}get enum(){return this._def.values}}rS.create=(e,t)=>new rS({values:e,typeName:Pe.ZodNativeEnum,...Ue(t)});class zd extends Ge{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return de(n,{code:se.invalid_type,expected:we.promise,received:n.parsedType}),De;const s=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return Gn(s.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zd.create=(e,t)=>new zd({type:e,typeName:Pe.ZodPromise,...Ue(t)});class wo extends Ge{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:s}=this._processInputParams(t),i=this._def.effect||null,l={addIssue:c=>{de(s,c),c.fatal?n.abort():n.dirty()},get path(){return s.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(s.data,l);if(s.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return De;const f=await this._def.schema._parseAsync({data:d,path:s.path,parent:s});return f.status==="aborted"?De:f.status==="dirty"||n.value==="dirty"?Ll(f.value):f});{if(n.value==="aborted")return De;const d=this._def.schema._parseSync({data:c,path:s.path,parent:s});return d.status==="aborted"?De:d.status==="dirty"||n.value==="dirty"?Ll(d.value):d}}if(i.type==="refinement"){const c=d=>{const f=i.refinement(d,l);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return d.status==="aborted"?De:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>d.status==="aborted"?De:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!vo(c))return De;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>vo(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):De);We.assertNever(i)}}
vendor: 4,191 bytes, line 47
47wo.create=(e,t,n)=>new wo({schema:e,typeName:Pe.ZodEffects,effect:t,...Ue(n)});wo.createWithPreprocess=(e,t,n)=>new wo({schema:t,effect:{type:"preprocess",transform:e},typeName:Pe.ZodEffects,...Ue(n)});class na extends Ge{_parse(t){return this._getType(t)===we.undefined?Gn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}na.create=(e,t)=>new na({innerType:e,typeName:Pe.ZodOptional,...Ue(t)});class _o extends Ge{_parse(t){return this._getType(t)===we.null?Gn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}_o.create=(e,t)=>new _o({innerType:e,typeName:Pe.ZodNullable,...Ue(t)});class Gm extends Ge{_parse(t){const{ctx:n}=this._processInputParams(t);let s=n.data;return n.parsedType===we.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gm.create=(e,t)=>new Gm({innerType:e,typeName:Pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class Km extends Ge{_parse(t){const{ctx:n}=this._processInputParams(t),s={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Md(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new us(s.common.issues)},input:s.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new us(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Km.create=(e,t)=>new Km({innerType:e,typeName:Pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class sS extends Ge{_parse(t){if(this._getType(t)!==we.nan){const s=this._getOrReturnCtx(t);return de(s,{code:se.invalid_type,expected:we.nan,received:s.parsedType}),De}return{status:"valid",value:t.data}}}sS.create=e=>new sS({typeName:Pe.ZodNaN,...Ue(e)});class DM extends Ge{_parse(t){const{ctx:n}=this._processInputParams(t),s=n.data;return this._def.type._parse({data:s,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ng extends Ge{_parse(t){const{status:n,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?De:l.status==="dirty"?(n.dirty(),Ll(l.value)):this._def.out._parseAsync({data:l.value,path:s.path,parent:s})})();{const i=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?De:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:s.path,parent:s})}}static create(t,n){return new Ng({in:t,out:n,typeName:Pe.ZodPipeline})}}class Ym extends Ge{_parse(t){const n=this._def.innerType._parse(t),s=i=>(vo(i)&&(i.value=Object.freeze(i.value)),i);return Md(n)?n.then(i=>s(i)):s(n)}unwrap(){return this._def.innerType}}Ym.create=(e,t)=>new Ym({innerType:e,typeName:Pe.ZodReadonly,...Ue(t)});var Pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Pe||(Pe={}));const SE=Xs.create;oa.create;Ar.create;Id.create;Ud.create;Wa.create;bo.create;zd.create;na.create;_o.create;function On(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function aS(e,t){if(typeof e=="function")return e(t);
vendor: 11,343 bytes, line 47
47e!=null&&(e.current=t)}function yc(...e){return t=>{let n=!1;const s=e.map(i=>{const l=aS(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<s.length;i++){const l=s[i];typeof l=="function"?l():aS(e[i],null)}}}}function dr(...e){return k.useCallback(yc(...e),e)}function PM(e,t){const n=k.createContext(t),s=l=>{const{children:c,...d}=l,f=k.useMemo(()=>d,Object.values(d));return E.jsx(n.Provider,{value:f,children:c})};s.displayName=e+"Provider";function i(l){const c=k.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[s,i]}function jg(e,t=[]){let n=[];function s(l,c){const d=k.createContext(c),f=n.length;n=[...n,c];const h=m=>{const{scope:v,children:b,...S}=m,_=v?.[e]?.[f]||d,x=k.useMemo(()=>S,Object.values(S));return E.jsx(_.Provider,{value:x,children:b})};h.displayName=l+"Provider";function g(m,v){const b=v?.[e]?.[f]||d,S=k.useContext(b);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[h,g]}const i=()=>{const l=n.map(c=>k.createContext(c));return function(d){const f=d?.[e]||l;return k.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[s,MM(i,...t)]}function MM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=s.reduce((d,{useScope:f,scopeName:h})=>{const m=f(l)[`__scope${h}`];return{...d,...m}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var la=globalThis?.document?k.useLayoutEffect:()=>{},LM=rg[" useId ".trim().toString()]||(()=>{}),IM=0;function pd(e){const[t,n]=k.useState(LM());return la(()=>{n(s=>s??String(IM++))},[e]),e||(t?`radix-${t}`:"")}var UM=rg[" useInsertionEffect ".trim().toString()]||la;function xE({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,l,c]=zM({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:i;{const g=k.useRef(e!==void 0);k.useEffect(()=>{const m=g.current;m!==d&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,s])}const h=k.useCallback(g=>{if(d){const m=$M(g)?g(e):g;m!==e&&c.current?.(m)}else l(g)},[d,e,l,c]);return[f,h]}function zM({defaultProp:e,onChange:t}){const[n,s]=k.useState(e),i=k.useRef(n),l=k.useRef(t);return UM(()=>{l.current=t},[t]),k.useEffect(()=>{i.current!==n&&(l.current?.(n),i.current=n)},[n,i]),[n,s,l]}function $M(e){return typeof e=="function"}function BM(e){const t=HM(e),n=k.forwardRef((s,i)=>{const{children:l,...c}=s,d=k.Children.toArray(l),f=d.find(FM);if(f){const h=f.props.children,g=d.map(m=>m===f?k.Children.count(h)>1?k.Children.only(null):k.isValidElement(h)?h.props.children:null:m);return E.jsx(t,{...c,ref:i,children:k.isValidElement(h)?k.cloneElement(h,void 0,g):null})}return E.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function HM(e){const t=k.forwardRef((n,s)=>{const{children:i,...l}=n;if(k.isValidElement(i)){const c=GM(i),d=VM(l,i.props);return i.type!==k.Fragment&&(d.ref=s?yc(s,c):c),k.cloneElement(i,d)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qM=Symbol("radix.slottable");function FM(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qM}function VM(e,t){const n={...t};for(const s in t){const i=e[s],l=t[s];/^on[A-Z]/.test(s)?i&&l?n[s]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[s]=i):s==="style"?n[s]={...i,...l}:s==="className"&&(n[s]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function GM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var KM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yn=KM.reduce((e,t)=>{const n=BM(`Primitive.${t}`),s=k.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function YM(e,t){e&&rf.flushSync(()=>e.dispatchEvent(t))}function So(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}function WM(e,t=globalThis?.document){const n=So(e);k.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var QM="DismissableLayer",Wm="dismissableLayer.update",ZM="dismissableLayer.pointerDownOutside",XM="dismissableLayer.focusOutside",iS,EE=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Dg=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...f}=e,h=k.useContext(EE),[g,m]=k.useState(null),v=g?.ownerDocument??globalThis?.document,[,b]=k.useState({}),S=dr(t,O=>m(O)),_=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=_.indexOf(x),A=g?_.indexOf(g):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,D=A>=R,z=tL(O=>{const I=O.target,W=[...h.branches].some(ne=>ne.contains(I));!D||W||(i?.(O),c?.(O),O.defaultPrevented||d?.())},v),N=nL(O=>{const I=O.target;[...h.branches].some(ne=>ne.contains(I))||(l?.(O),c?.(O),O.defaultPrevented||d?.())},v);return WM(O=>{A===h.layers.size-1&&(s?.(O),!O.defaultPrevented&&d&&(O.preventDefault(),d()))},v),k.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(iS=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),oS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=iS)}},[g,v,n,h]),k.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),oS())},[g,h]),k.useEffect(()=>{const O=()=>b({});return document.addEventListener(Wm,O),()=>document.removeEventListener(Wm,O)},[]),E.jsx(yn.div,{...f,ref:S,style:{pointerEvents:C?D?"auto":"none":void 0,...e.style},onFocusCapture:On(e.onFocusCapture,N.onFocusCapture),onBlurCapture:On(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:On(e.onPointerDownCapture,z.onPointerDownCapture)})});Dg.displayName=QM;var JM="DismissableLayerBranch",eL=k.forwardRef((e,t)=>{const n=k.useContext(EE),s=k.useRef(null),i=dr(t,s);return k.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),E.jsx(yn.div,{...e,ref:i})});eL.displayName=JM;function tL(e,t=globalThis?.document){const n=So(e),s=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){RE(ZM,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);s.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function nL(e,t=globalThis?.document){const n=So(e),s=k.useRef(!1);return k.useEffect(()=>{const i=l=>{l.target&&!s.current&&RE(XM,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function oS(){const e=new CustomEvent(Wm);document.dispatchEvent(e)}function RE(e,t,n,{discrete:s}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?YM(i,l):i.dispatchEvent(l)}var Jp="focusScope.autoFocusOnMount",em="focusScope.autoFocusOnUnmount",lS={bubbles:!1,cancelable:!0},rL="FocusScope",Pg=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[d,f]=k.useState(null),h=So(i),g=So(l),m=k.useRef(null),v=dr(t,_=>f(_)),b=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(s){let _=function(C){if(b.paused||!d)return;const D=C.target;d.contains(D)?m.current=D:Vs(m.current,{select:!0})},x=function(C){if(b.paused||!d)return;const D=C.relatedTarget;D!==null&&(d.contains(D)||Vs(m.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(const z of C)z.removedNodes.length>0&&Vs(d)};document.addEventListener("focusin",_),document.addEventListener("focusout",x);const A=new MutationObserver(R);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",x),A.disconnect()}}},[s,d,b.paused]),k.useEffect(()=>{if(d){uS.add(b);const _=document.activeElement;if(!d.contains(_)){const R=new CustomEvent(Jp,lS);d.addEventListener(Jp,h),d.dispatchEvent(R),R.defaultPrevented||(sL(cL(TE(d)),{select:!0}),document.activeElement===_&&Vs(d))}return()=>{d.removeEventListener(Jp,h),setTimeout(()=>{const R=new CustomEvent(em,lS);d.addEventListener(em,g),d.dispatchEvent(R),R.defaultPrevented||Vs(_??document.body,{select:!0}),d.removeEventListener(em,g),uS.remove(b)},0)}}},[d,h,g,b]);const S=k.useCallback(_=>{if(!n&&!s||b.paused)return;const x=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,R=document.activeElement;if(x&&R){const A=_.currentTarget,[C,D]=aL(A);C&&D?!_.shiftKey&&R===D?(_.preventDefault(),n&&Vs(C,{select:!0})):_.shiftKey&&R===C&&(_.preventDefault(),n&&Vs(D,{select:!0})):R===A&&_.preventDefault()}},[n,s,b.paused]);return E.jsx(yn.div,{tabIndex:-1,...c,ref:v,onKeyDown:S})});Pg.displayName=rL;function sL(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(Vs(s,{select:t}),document.activeElement!==n)return}function aL(e){const t=TE(e),n=cS(t,e),s=cS(t.reverse(),e);return[n,s]}function TE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cS(e,t){for(const n of e)if(!iL(n,{upTo:t}))return n}function iL(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oL(e){return e instanceof HTMLInputElement&&"select"in e}function Vs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oL(e)&&t&&e.select()}}var uS=lL();function lL(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=dS(e,t),e.unshift(t)},remove(t){e=dS(e,t),e[0]?.resume()}}}function dS(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function cL(e){return e.filter(t=>t.tagName!=="A")}var uL="Portal",Mg=k.forwardRef((e,t)=>
vendor: 3,369 bytes, line 47
47{const{container:n,...s}=e,[i,l]=k.useState(!1);la(()=>l(!0),[]);const c=n||i&&globalThis?.document?.body;return c?pE.createPortal(E.jsx(yn.div,{...s,ref:t}),c):null});Mg.displayName=uL;function dL(e,t){return k.useReducer((n,s)=>t[n][s]??n,e)}var ko=e=>{const{present:t,children:n}=e,s=fL(t),i=typeof n=="function"?n({present:s.isPresent}):k.Children.only(n),l=dr(s.ref,hL(i));return typeof n=="function"||s.isPresent?k.cloneElement(i,{ref:l}):null};ko.displayName="Presence";function fL(e){const[t,n]=k.useState(),s=k.useRef(null),i=k.useRef(e),l=k.useRef("none"),c=e?"mounted":"unmounted",[d,f]=dL(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const h=Xu(s.current);l.current=d==="mounted"?h:"none"},[d]),la(()=>{const h=s.current,g=i.current;if(g!==e){const v=l.current,b=Xu(h);e?f("MOUNT"):b==="none"||h?.display==="none"?f("UNMOUNT"):f(g&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),la(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,m=b=>{const _=Xu(s.current).includes(CSS.escape(b.animationName));if(b.target===t&&_&&(f("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=b=>{b.target===t&&(l.current=Xu(s.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:k.useCallback(h=>{s.current=h?getComputedStyle(h):null,n(h)},[])}}function Xu(e){return e?.animationName||"none"}function hL(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tm=0;function kE(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fS()),document.body.insertAdjacentElement("beforeend",e[1]??fS()),tm++,()=>{tm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tm--}},[])}function fS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var md="right-scroll-bar-position",gd="width-before-scroll-bar",pL="with-scroll-bars-hidden",mL="--removed-body-scroll-bar-size";function nm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gL(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=t,n.facade}var yL=typeof window<"u"?k.useLayoutEffect:k.useEffect,hS=new WeakMap;function vL(e,t){var n=gL(null,function(s){return e.forEach(function(i){return nm(i,s)})});return yL(function(){var s=hS.get(n);if(s){var i=new Set(s),l=new Set(e),c=n.current;
vendor: 4,196 bytes, lines 47-62
47i.forEach(function(d){l.has(d)||nm(d,null)}),l.forEach(function(d){i.has(d)||nm(d,c)})}hS.set(n,e)},[e]),n}function bL(e){return e}function wL(e,t){t===void 0&&(t=bL);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,s);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(s=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){s=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var f=function(){var g=c;c=[],g.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(g){c.push(g),h()},filter:function(g){return c=c.filter(g),n}}}};return i}function _L(e){e===void 0&&(e={});var t=wL(null);return t.options=Rr({async:!0,ssr:!1},e),t}var AE=function(e){var t=e.sideCar,n=Ro(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return k.createElement(s,Rr({},n))};AE.isSideCarExport=!0;function SL(e,t){return e.useMedium(t),AE}var CE=_L(),rm=function(){},af=k.forwardRef(function(e,t){var n=k.useRef(null),s=k.useState({onScrollCapture:rm,onWheelCapture:rm,onTouchMoveCapture:rm}),i=s[0],l=s[1],c=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,g=e.enabled,m=e.shards,v=e.sideCar,b=e.noRelative,S=e.noIsolation,_=e.inert,x=e.allowPinchZoom,R=e.as,A=R===void 0?"div":R,C=e.gapMode,D=Ro(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=v,N=vL([n,t]),O=Rr(Rr({},D),i);return k.createElement(k.Fragment,null,g&&k.createElement(z,{sideCar:CE,removeScrollBar:h,shards:m,noRelative:b,noIsolation:S,inert:_,setCallbacks:l,allowPinchZoom:!!x,lockRef:n,gapMode:C}),c?k.cloneElement(k.Children.only(d),Rr(Rr({},O),{ref:N})):k.createElement(A,Rr({},O,{className:f,ref:N}),d))});af.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};af.classNames={fullWidth:gd,zeroRight:md};var xL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function EL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xL();return t&&e.setAttribute("nonce",t),e}function RL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function TL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=EL())&&(RL(t,n),TL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},AL=function(){var e=kL();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},OE=function(){var e=AL(),t=function(n){var s=n.styles,i=n.dynamic;return e(s,i),null};return t},CL={left:0,top:0,right:0,gap:0},sm=function(e){return parseInt(e||"",10)||0},OL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[sm(n),sm(s),sm(i)]},NL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return CL;var t=OL(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},jL=OE(),go="data-scroll-locked",DL=function(e,t,n,s){var i=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
48  .`.concat(pL,` {
49   overflow: hidden `).concat(s,`;
50   padding-right: `).concat(d,"px ").concat(s,`;
51  }
52  body[`).concat(go,`] {
53    overflow: hidden `).concat(s,`;
54    overscroll-behavior: contain;
55    `).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&`
56    padding-left: `.concat(i,`px;
57    padding-top: `).concat(l,`px;
58    padding-right: `).concat(c,`px;
59    margin-left:0;
60    margin-top:0;
61    margin-right: `).concat(d,"px ").concat(s,`;
62    `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";
62")].filter(Boolean).join(""),`
63  }
64  
65  .`).concat(md,` {
66    right: `).concat(d,"px ").concat(s,`;
67  }
68  
69  .`).concat(gd,` {
70    margin-right: `).concat(d,"px ").concat(s,`;
71  }
72  
73  .`).concat(md," .").concat(md,` {
74    right: 0 `).concat(s,`;
75  }
76  
77  .`).concat(gd," .").concat(gd,` {
78    margin-right: 0 `).concat(s,`;
79  }
80  
81  body[`).concat(go,`] {
82    `).concat(mL,": ").concat(d,`px;
83  }
84`)},pS=function(){var e=parseInt(document.body.getAttribute(go)||"0",10);return isFinite(e)?e:0},PL=function(){k.useEffect(function(){return document.body.setAttribute(go,(pS()+1).toString()),function(){var e=pS()-1;e<=0?document.body.removeAttribute(go):document.body.setAttribute(go,e.toString())}},[])},ML=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;PL();var l=k.useMemo(function(){return NL(i)},[i]);return k.createElement(jL,{styles:DL(l,!t,i,n?"":"!important")})},Qm=!1;if(typeof window<"u")try{var Ju=Object.defineProperty({},"passive",{get:function(){return Qm=!0,!0}});window.addEventListener("test",Ju,Ju),window.removeEventListener("test",Ju,Ju)}catch{Qm=!1}var Xi=Qm?{passive:!1}:!1,LL=function(e){return e.tagName==="TEXTAREA"},NE=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!LL(e)&&n[t]==="visible")},IL=function(e){return NE(e,"overflowY")},UL=function(e){return NE(e,"overflowX")},mS=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=jE(e,s);if(i){var l=DE(e,s),c=l[1],d=l[2];if(c>d)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},zL=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},$L=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},jE=function(e,t){return e==="v"?IL(t):UL(t)},DE=function(e,t){return e==="v"?zL(t):$L(t)},BL=function(e,t){return e==="h"&&t==="rtl"?-1:1},HL=function(e,t,n,s,i){var l=BL(e,window.getComputedStyle(t).direction),c=l*s,d=n.target,f=t.contains(d),h=!1,g=c>0,m=0,v=0;do{if(!d)break;var b=DE(e,d),S=b[0],_=b[1],x=b[2],R=_-x-l*S;(S||R)&&jE(e,d)&&(m+=R,v+=S);var A=d.parentNode;d=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(g&&Math.abs(m)<1||!g&&Math.abs(v)<1)&&(h=!0),h},ed=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gS=function(e){return[e.deltaX,e.deltaY]},yS=function(e){return e&&"current"in e?e.current:e},qL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FL=function(e){return`
85  .block-interactivity-`.concat(e,` {pointer-events: none;}
86  .allow-interactivity-`).concat(e,` {pointer-events: all;}
87`)},VL=0,Ji=[];function GL(e){var t=k.useRef([]),n=k.useRef([0,0]),s=k.useRef(),i=k.useState(VL++)[0],l=k.useState(OE)[0],c=k.useRef(e);k.useEffect(function(){c.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var _=Jj([e.lockRef.current],(e.shards||[]).map(yS),!0).filter(Boolean);return _.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=k.useCallback(function(_,x){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!c.current.allowPinchZoom;var R=ed(_),A=n.current,C="deltaX"in _?_.deltaX:A[0]-R[0],D="deltaY"in _?_.deltaY:A[1]-R[1],z,N=_.target,O=Math.abs(C)>Math.abs(D)?"h":"v";if("touches"in _&&O==="h"&&N.type==="range")return!1;var I=window.getSelection(),W=I&&I.anchorNode,ne=W?W===N||W.contains(N):!1;if(ne)return!1;var F=mS(O,N);if(!F)return!0;if(F?z=O:(z=O==="v"?"h":"v",F=mS(O,N)),!F)return!1;if(!s.current&&"changedTouches"in _&&(C||D)&&(s.current=z),!z)return!0;var V=s.current||z;return HL(V,x,_,V==="h"?C:D)},[]),f=k.useCallback(function(_){var x=_;if(!(!Ji.length||Ji[Ji.length-1]!==l)){var R="deltaY"in x?gS(x):ed(x),A=t.current.filter(function(z){return z.name===x.type&&(z.target===x.target||x.target===z.shadowParent)&&qL(z.delta,R)})[0];if(A&&A.should){x.cancelable&&x.preventDefault();return}
vendor: 10,120 bytes, lines 87-91
87if(!A){var C=(c.current.shards||[]).map(yS).filter(Boolean).filter(function(z){return z.contains(x.target)}),D=C.length>0?d(x,C[0]):!c.current.noIsolation;D&&x.cancelable&&x.preventDefault()}}},[]),h=k.useCallback(function(_,x,R,A){var C={name:_,delta:x,target:R,should:A,shadowParent:KL(R)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(D){return D!==C})},1)},[]),g=k.useCallback(function(_){n.current=ed(_),s.current=void 0},[]),m=k.useCallback(function(_){h(_.type,gS(_),_.target,d(_,e.lockRef.current))},[]),v=k.useCallback(function(_){h(_.type,ed(_),_.target,d(_,e.lockRef.current))},[]);k.useEffect(function(){return Ji.push(l),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Xi),document.addEventListener("touchmove",f,Xi),document.addEventListener("touchstart",g,Xi),function(){Ji=Ji.filter(function(_){return _!==l}),document.removeEventListener("wheel",f,Xi),document.removeEventListener("touchmove",f,Xi),document.removeEventListener("touchstart",g,Xi)}},[]);var b=e.removeScrollBar,S=e.inert;return k.createElement(k.Fragment,null,S?k.createElement(l,{styles:FL(i)}):null,b?k.createElement(ML,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function KL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const YL=SL(CE,GL);var Lg=k.forwardRef(function(e,t){return k.createElement(af,Rr({},e,{ref:t,sideCar:YL}))});Lg.classNames=af.classNames;var WL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},eo=new WeakMap,td=new WeakMap,nd={},am=0,PE=function(e){return e&&(e.host||PE(e.parentNode))},QL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=PE(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ZL=function(e,t,n,s){var i=QL(t,Array.isArray(e)?e:[e]);nd[n]||(nd[n]=new WeakMap);var l=nd[n],c=[],d=new Set,f=new Set(i),h=function(m){!m||d.has(m)||(d.add(m),h(m.parentNode))};i.forEach(h);var g=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(v){if(d.has(v))g(v);else try{var b=v.getAttribute(s),S=b!==null&&b!=="false",_=(eo.get(v)||0)+1,x=(l.get(v)||0)+1;eo.set(v,_),l.set(v,x),c.push(v),_===1&&S&&td.set(v,!0),x===1&&v.setAttribute(n,"true"),S||v.setAttribute(s,"true")}catch(R){console.error("aria-hidden: cannot operate on ",v,R)}})};return g(t),d.clear(),am++,function(){c.forEach(function(m){var v=eo.get(m)-1,b=l.get(m)-1;eo.set(m,v),l.set(m,b),v||(td.has(m)||m.removeAttribute(s),td.delete(m)),b||m.removeAttribute(n)}),am--,am||(eo=new WeakMap,eo=new WeakMap,td=new WeakMap,nd={})}},ME=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=WL(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),ZL(s,i,n,"aria-hidden")):function(){return null}};function XL(e){const t=JL(e),n=k.forwardRef((s,i)=>{const{children:l,...c}=s,d=k.Children.toArray(l),f=d.find(t6);if(f){const h=f.props.children,g=d.map(m=>m===f?k.Children.count(h)>1?k.Children.only(null):k.isValidElement(h)?h.props.children:null:m);return E.jsx(t,{...c,ref:i,children:k.isValidElement(h)?k.cloneElement(h,void 0,g):null})}return E.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function JL(e){const t=k.forwardRef((n,s)=>{const{children:i,...l}=n;if(k.isValidElement(i)){const c=r6(i),d=n6(l,i.props);return i.type!==k.Fragment&&(d.ref=s?yc(s,c):c),k.cloneElement(i,d)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var e6=Symbol("radix.slottable");function t6(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===e6}function n6(e,t){const n={...t};for(const s in t){const i=e[s],l=t[s];/^on[A-Z]/.test(s)?i&&l?n[s]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[s]=i):s==="style"?n[s]={...i,...l}:s==="className"&&(n[s]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function r6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var of="Dialog",[LE]=jg(of),[s6,fr]=LE(of),IE=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,d=k.useRef(null),f=k.useRef(null),[h,g]=xE({prop:s,defaultProp:i??!1,onChange:l,caller:of});return E.jsx(s6,{scope:t,triggerRef:d,contentRef:f,contentId:pd(),titleId:pd(),descriptionId:pd(),open:h,onOpenChange:g,onOpenToggle:k.useCallback(()=>g(m=>!m),[g]),modal:c,children:n})};IE.displayName=of;var UE="DialogTrigger",a6=k.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=fr(UE,n),l=dr(t,i.triggerRef);return E.jsx(yn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zg(i.open),...s,ref:l,onClick:On(e.onClick,i.onOpenToggle)})});a6.displayName=UE;var Ig="DialogPortal",[i6,zE]=LE(Ig,{forceMount:void 0}),$E=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,l=fr(Ig,t);return E.jsx(i6,{scope:t,forceMount:n,children:k.Children.map(s,c=>E.jsx(ko,{present:n||l.open,children:E.jsx(Mg,{asChild:!0,container:i,children:c})}))})};$E.displayName=Ig;var $d="DialogOverlay",BE=k.forwardRef((e,t)=>{const n=zE($d,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,l=fr($d,e.__scopeDialog);return l.modal?E.jsx(ko,{present:s||l.open,children:E.jsx(l6,{...i,ref:t})}):null});BE.displayName=$d;var o6=XL("DialogOverlay.RemoveScroll"),l6=k.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=fr($d,n);return E.jsx(Lg,{as:o6,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(yn.div,{"data-state":zg(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Qa="DialogContent",HE=k.forwardRef((e,t)=>{const n=zE(Qa,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,l=fr(Qa,e.__scopeDialog);return E.jsx(ko,{present:s||l.open,children:l.modal?E.jsx(c6,{...i,ref:t}):E.jsx(u6,{...i,ref:t})})});HE.displayName=Qa;var c6=k.forwardRef((e,t)=>{const n=fr(Qa,e.__scopeDialog),s=k.useRef(null),i=dr(t,n.contentRef,s);return k.useEffect(()=>{const l=s.current;if(l)return ME(l)},[]),E.jsx(qE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:On(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:On(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:On(e.onFocusOutside,l=>l.preventDefault())})}),u6=k.forwardRef((e,t)=>{const n=fr(Qa,e.__scopeDialog),s=k.useRef(!1),i=k.useRef(!1);return E.jsx(qE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(s.current||n.triggerRef.current?.focus(),l.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;n.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),qE=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:l,...c}=e,d=fr(Qa,n),f=k.useRef(null),h=dr(t,f);return kE(),E.jsxs(E.Fragment,{children:[E.jsx(Pg,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:l,children:E.jsx(Dg,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":zg(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(d6,{titleId:d.titleId}),E.jsx(h6,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Ug="DialogTitle",FE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=fr(Ug,n);return E.jsx(yn.h2,{id:i.titleId,...s,ref:t})});FE.displayName=Ug;var VE="DialogDescription",GE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=fr(VE,n);return E.jsx(yn.p,{id:i.descriptionId,...s,ref:t})});GE.displayName=VE;var KE="DialogClose",YE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=fr(KE,n);return E.jsx(yn.button,{type:"button",...s,ref:t,onClick:On(e.onClick,()=>i.onOpenChange(!1))})});YE.displayName=KE;function zg(e){return e?"open":"closed"}var WE="DialogTitleWarning",[X$,QE]=PM(WE,{contentName:Qa,titleName:Ug,docsSlug:"dialog"}),d6=({titleId:e})=>{const t=QE(WE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
88
89If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
90
91For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},f6="DialogDescriptionWarning",h6=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${QE(f6).contentName}}.`;return k.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},p6=IE,m6=$E,ZE=BE,XE=HE,JE=FE,eR=GE,g6=YE;function tR(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=tR(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function nR(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tR(e))&&(s&&(s+=" "),s+=t);return s}const y6=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},v6=(e,t)=>({classGroupId:e,validator:t}),rR=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bd="-",vS=[],b6="arbitrary..",w6=e=>{const t=S6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return _6(c);
vendor: 4,316 bytes, line 91
91const d=c.split(Bd),f=d[0]===""&&d.length>1?1:0;return sR(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=s[c],h=n[c];return f?h?y6(h,f):f:h||vS}return n[c]||vS}}},sR=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const h=sR(e,t+1,l);if(h)return h}const c=n.validators;if(c===null)return;const d=t===0?e.join(Bd):e.slice(t).join(Bd),f=c.length;for(let h=0;h<f;h++){const g=c[h];if(g.validator(d))return g.classGroupId}},_6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?b6+s:void 0})(),S6=e=>{const{theme:t,classGroups:n}=e;return x6(n,t)},x6=(e,t)=>{const n=rR();for(const s in e){const i=e[s];$g(i,n,s,t)}return n},$g=(e,t,n,s)=>{const i=e.length;for(let l=0;l<i;l++){const c=e[l];E6(c,t,n,s)}},E6=(e,t,n,s)=>{if(typeof e=="string"){R6(e,t,n);return}if(typeof e=="function"){T6(e,t,n,s);return}k6(e,t,n,s)},R6=(e,t,n)=>{const s=e===""?t:aR(t,e);s.classGroupId=n},T6=(e,t,n,s)=>{if(A6(e)){$g(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(v6(n,e))},k6=(e,t,n,s)=>{const i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){const[d,f]=i[c];$g(f,aR(t,d),n,s)}},aR=(e,t)=>{let n=e;const s=t.split(Bd),i=s.length;for(let l=0;l<i;l++){const c=s[l];let d=n.nextPart.get(c);d||(d=rR(),n.nextPart.set(c,d)),n=d}return n},A6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,C6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const i=(l,c)=>{n[l]=c,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=s[l])!==void 0)return i(l,c),c},set(l,c){l in n?n[l]=c:i(l,c)}}},Zm="!",bS=":",O6=[],wS=(e,t,n,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),N6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const l=[];let c=0,d=0,f=0,h;const g=i.length;for(let _=0;_<g;_++){const x=i[_];if(c===0&&d===0){if(x===bS){l.push(i.slice(f,_)),f=_+1;continue}if(x==="/"){h=_;continue}}x==="["?c++:x==="]"?c--:x==="("?d++:x===")"&&d--}const m=l.length===0?i:i.slice(f);let v=m,b=!1;m.endsWith(Zm)?(v=m.slice(0,-1),b=!0):m.startsWith(Zm)&&(v=m.slice(1),b=!0);const S=h&&h>f?h-f:void 0;return wS(l,b,v,S)};if(t){const i=t+bS,l=s;s=c=>c.startsWith(i)?l(c.slice(i.length)):wS(O6,!1,c,void 0,!0)}if(n){const i=s;s=l=>n({className:l,parseClassName:i})}return s},j6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let l=0;l<n.length;l++){const c=n[l],d=c[0]==="[",f=t.has(c);d||f?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(c)):i.push(c)}return i.length>0&&(i.sort(),s.push(...i)),s}},D6=e=>({cache:C6(e.cacheSize),parseClassName:N6(e),sortModifiers:j6(e),...w6(e)}),P6=/\s+/,M6=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:l}=t,c=[],d=e.trim().split(P6);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:m,modifiers:v,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:_}=n(g);if(m){f=g+(f.length>0?" "+f:f);continue}let x=!!_,R=s(x?S.substring(0,_):S);if(!R){if(!x){f=g+(f.length>0?" "+f:f);continue}if(R=s(S),!R){f=g+(f.length>0?" "+f:f);continue}x=!1}const A=v.length===0?"":v.length===1?v[0]:l(v).join(":"),C=b?A+Zm:A,D=C+R;if(c.indexOf(D)>-1)continue;c.push(D);const z=i(R,x);for(let N=0;N<z.length;++N){const O=z[N];c.push(C+O)}f=g+(f.length>0?" "+f:f)}return f},L6=(...e)=>{let t=0,n,s,i="";for(;t<e.length;)(n=e[t++])&&(s=iR(n))&&(i&&(i+=" "),i+=s);return i},iR=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=iR(e[s]))&&(n&&(n+=" "),n+=t);return n},I6=(e,...t)=>{let n,s,i,l;const c=f=>{const h=t.reduce((g,m)=>m(g),e());return n=D6(h),s=n.cache.get,i=n.cache.set,l=d,d(f)},d=f=>{const h=s(f);if(h)return h;const g=M6(f,n);return i(f,g),g};return l=c,(...f)=>l(L6(...f))},U6=[],Ct=e=>{const t=n=>n[e]||U6;return t.isThemeGetter=!0,t},oR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,z6=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,B6=/\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$/,H6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,q
vendor: 4,741 bytes, line 91
916=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qs=e=>z6.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),Fs=e=>!!e&&Number.isInteger(Number(e)),im=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),Xr=e=>$6.test(e),cR=()=>!0,V6=e=>B6.test(e)&&!H6.test(e),Bg=()=>!1,G6=e=>q6.test(e),K6=e=>F6.test(e),Y6=e=>!ge(e)&&!ve(e),W6=e=>ha(e,fR,Bg),ge=e=>oR.test(e),$a=e=>ha(e,hR,V6),_S=e=>ha(e,r8,Ie),Q6=e=>ha(e,mR,cR),Z6=e=>ha(e,pR,Bg),SS=e=>ha(e,uR,Bg),X6=e=>ha(e,dR,K6),rd=e=>ha(e,gR,G6),ve=e=>lR.test(e),jl=e=>ti(e,hR),J6=e=>ti(e,pR),xS=e=>ti(e,uR),e8=e=>ti(e,fR),t8=e=>ti(e,dR),sd=e=>ti(e,gR,!0),n8=e=>ti(e,mR,!0),ha=(e,t,n)=>{const s=oR.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},ti=(e,t,n=!1)=>{const s=lR.exec(e);return s?s[1]?t(s[1]):n:!1},uR=e=>e==="position"||e==="percentage",dR=e=>e==="image"||e==="url",fR=e=>e==="length"||e==="size"||e==="bg-size",hR=e=>e==="length",r8=e=>e==="number",pR=e=>e==="family-name",mR=e=>e==="number"||e==="weight",gR=e=>e==="shadow",s8=()=>{const e=Ct("color"),t=Ct("font"),n=Ct("text"),s=Ct("font-weight"),i=Ct("tracking"),l=Ct("leading"),c=Ct("breakpoint"),d=Ct("container"),f=Ct("spacing"),h=Ct("radius"),g=Ct("shadow"),m=Ct("inset-shadow"),v=Ct("text-shadow"),b=Ct("drop-shadow"),S=Ct("blur"),_=Ct("perspective"),x=Ct("aspect"),R=Ct("ease"),A=Ct("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...D(),ve,ge],N=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],I=()=>[ve,ge,f],W=()=>[qs,"full","auto",...I()],ne=()=>[Fs,"none","subgrid",ve,ge],F=()=>["auto",{span:["full",Fs,ve,ge]},Fs,ve,ge],V=()=>[Fs,"auto",ve,ge],ee=()=>["auto","min","max","fr",ve,ge],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...I()],G=()=>[qs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],te=()=>[qs,"screen","full","dvw","lvw","svw","min","max","fit",...I()],Se=()=>[qs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],J=()=>[e,ve,ge],P=()=>[...D(),xS,SS,{position:[ve,ge]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",e8,W6,{size:[ve,ge]}],re=()=>[im,jl,$a],ie=()=>["","none","full",h,ve,ge],ue=()=>["",Ie,jl,$a],fe=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>[Ie,im,xS,SS],bt=()=>["","none",S,ve,ge],kt=()=>["none",Ie,ve,ge],ft=()=>["none",Ie,ve,ge],vn=()=>[Ie,ve,ge],Vt=()=>[qs,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xr],breakpoint:[Xr],color:[cR],container:[Xr],"drop-shadow":[Xr],ease:["in","out","in-out"],font:[Y6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xr],shadow:[Xr],spacing:["px",Ie],text:[Xr],"text-shadow":[Xr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qs,ge,ve,x]}],container:["container"],columns:[{columns:[Ie,ge,ve,d]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:z()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W
vendor: 4,961 bytes, line 91
91()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Fs,"auto",ve,ge]}],basis:[{basis:[qs,"full","auto",d,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,qs,"auto","initial","none",ge]}],grow:[{grow:["",Ie,ve,ge]}],shrink:[{shrink:["",Ie,ve,ge]}],order:[{order:[Fs,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],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":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...Se()]}],"min-block-size":[{"min-block":["auto",...Se()]}],"max-block-size":[{"max-block":["none",...Se()]}],w:[{w:[d,"screen",...G()]}],"min-w":[{"min-w":[d,"screen","none",...G()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",n,jl,$a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,n8,Q6]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",im,ge]}],"font-family":[{font:[J6,Z6,t]}],"font-features":[{"font-features":[ge]}],"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:[i,ve,ge]}],"line-clamp":[{"line-clamp":[Ie,"none",ve,_S]}],leading:[{leading:[l,...I()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ve,$a]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[Ie,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],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",ve,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fs,ve,ge],radial:["",ve,ge],conic:[Fs,ve,ge]},t8,X6]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:re()}
vendor: 7,402 bytes, line 91
91],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-bs":[{"border-bs":J()}],"border-color-be":[{"border-be":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ve,ge]}],"outline-w":[{outline:["",Ie,jl,$a]}],"outline-color":[{outline:J()}],shadow:[{shadow:["","none",g,sd,rd]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",m,sd,rd]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[Ie,$a]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":J()}],"text-shadow":[{"text-shadow":["none",v,sd,rd]}],"text-shadow-color":[{"text-shadow":J()}],opacity:[{opacity:[Ie,ve,ge]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"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":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":Re()}],"mask-image-linear-to-pos":[{"mask-linear-to":Re()}],"mask-image-linear-from-color":[{"mask-linear-from":J()}],"mask-image-linear-to-color":[{"mask-linear-to":J()}],"mask-image-t-from-pos":[{"mask-t-from":Re()}],"mask-image-t-to-pos":[{"mask-t-to":Re()}],"mask-image-t-from-color":[{"mask-t-from":J()}],"mask-image-t-to-color":[{"mask-t-to":J()}],"mask-image-r-from-pos":[{"mask-r-from":Re()}],"mask-image-r-to-pos":[{"mask-r-to":Re()}],"mask-image-r-from-color":[{"mask-r-from":J()}],"mask-image-r-to-color":[{"mask-r-to":J()}],"mask-image-b-from-pos":[{"mask-b-from":Re()}],"mask-image-b-to-pos":[{"mask-b-to":Re()}],"mask-image-b-from-color":[{"mask-b-from":J()}],"mask-image-b-to-color":[{"mask-b-to":J()}],"mask-image-l-from-pos":[{"mask-l-from":Re()}],"mask-image-l-to-pos":[{"mask-l-to":Re()}],"mask-image-l-from-color":[{"mask-l-from":J()}],"mask-image-l-to-color":[{"mask-l-to":J()}],"mask-image-x-from-pos":[{"mask-x-from":Re()}],"mask-image-x-to-pos":[{"mask-x-to":Re()}],"mask-image-x-from-color":[{"mask-x-from":J()}],"mask-image-x-to-color":[{"mask-x-to":J()}],"mask-image-y-from-pos":[{"mask-y-from":Re()}],"mask-image-y-to-pos":[{"mask-y-to":Re()}],"mask-image-y-from-color":[{"mask-y-from":J()}],"mask-image-y-to-color":[{"mask-y-to":J()}],"mask-image-radial":[{"mask-radial":[ve,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":Re()}],"mask-image-radial-to-pos":[{"mask-radial-to":Re()}],"mask-image-radial-from-color":[{"mask-radial-from":J()}],"mask-image-radial-to-color":[{"mask-radial-to":J()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":Re()}],"mask-image-conic-to-pos":[{"mask-conic-to":Re()}],"mask-image-conic-from-color":[{"mask-conic-from":J()}],"mask-image-conic-to-color":[{"mask-conic-to":J()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ge]}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:bt()}],brightness:[{brightness:[Ie,ve,ge]}],contrast:[{contrast:[Ie,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",b,sd,rd]}],"drop-shadow-color":[{"drop-shadow":J()}],grayscale:[{grayscale:["",Ie,ve,ge]}],"hue-rotate":[{"hue-rotate":[Ie,ve,ge]}],invert:[{invert:["",Ie,ve,ge]}],saturate:[{saturate:[Ie,ve,ge]}],sepia:[{sepia:["",Ie,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":bt()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ve,ge]}],ease:[{ease:["linear","initial",R,ve,ge]}],delay:[{delay:[Ie,ve,ge]}],animate:[{animate:["none",A,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,ve,ge]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:kt()}],"rotate-x":[{"rotate-x":kt()}],"rotate-y":[{"rotate-y":kt()}],"rotate-z":[{"rotate-z":kt()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:vn()}],"skew-x":[{"skew-x":vn()}],"skew-y":[{"skew-y":vn()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"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:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}
vendor: 5,582 bytes, line 91
91],"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",ve,ge]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",ve,ge]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[Ie,jl,$a,_S]}],stroke:[{stroke:["none",...J()]}],"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"]}},a8=I6(s8);function Nn(...e){return a8(nR(e))}const i8=p6,o8=m6,yR=k.forwardRef(({className:e,...t},n)=>E.jsx(ZE,{ref:n,className:Nn("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));yR.displayName=ZE.displayName;const vR=k.forwardRef(({className:e,children:t,...n},s)=>E.jsxs(o8,{children:[E.jsx(yR,{}),E.jsxs(XE,{ref:s,className:Nn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",e),...n,children:[t,E.jsxs(g6,{className:"absolute right-4 top-4 roun
91ded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[E.jsx(sf,{className:"h-4 w-4"}),E.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));vR.displayName=XE.displayName;const bR=({className:e,...t})=>E.jsx("div",{className:Nn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});bR.displayName="DialogHeader";const wR=k.forwardRef(({className:e,...t},n)=>E.jsx(JE,{ref:n,className:Nn("text-lg font-semibold leading-none tracking-tight",e),...t}));wR.displayName=JE.displayName;const _R=k.forwardRef(({className:e,...t},n)=>E.jsx(eR,{ref:n,className:Nn("text-sm text-muted-foreground",e),...t}));_R.displayName=eR.displayName;const yd=k.forwardRef(({className:e,type:t,...n},s)=>E.jsx("input",{type:t,className:Nn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...n}));yd.displayName="Input";var l8=Symbol.for("react.lazy"),Hd=rg[" use ".trim().toString()];function c8(e){return typeof e=="object"&&e!==null&&"then"in e}function SR(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===l8&&"_payload"in e&&c8(e._payload)}function xR(e){const t=u8(e),n=k.forwardRef((s,i)=>{let{children:l,...c}=s;SR(l)&&typeof Hd=="function"&&(l=Hd(l._payload));const d=k.Children.toArray(l),f=d.find(f8);if(f){const h=f.props.children,g=d.map(m=>m===f?k.Children.count(h)>1?k.Children.only(null):k.isValidElement(h)?h.props.children:null:m);return E.jsx(t,{...c,ref:i,children:k.isValidElement(h)?k.cloneElement(h,void 0,g):null})}return E.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}var J$=xR("Slot");function u8(e){const t=k.forwardRef((n,s)=>{let{children:i,...l}=n;if(SR(i)&&typeof Hd=="function"&&(i=Hd(i._payload)),k.isValidElement(i)){const c=p8(i),d=h8(l,i.props);return i.type!==k.Fragment&&(d.ref=s?yc(s,c):c),k.cloneElement(i,d)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var d8=Symbol("radix.slottable");function f8(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===d8}function h8(e,t){const n={...t};for(const s in t){const i=e[s],l=t[s];/^on[A-Z]/.test(s)?i&&l?n[s]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[s]=i):s==="style"?n[s]={...i,...l}:s==="className"&&(n[s]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function p8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var m8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],g8=m8.reduce((e,t)=>{const n=xR(`Primitive.${t}`),s=k.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),y8="Label",ER=k.forwardRef((e,t)=>E.jsx(g8.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ER.displayName=y8;var RR=ER;const ES=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,RS=nR,v8=(e,t)=>n=>{var s;if(t?.variants==null)return RS(e,n?.class,n?.className);const{variants:i,defaultVariants:l}=t,c=Object.keys(i).map(h=>{const g=n?.[h],m=l?.[h];if(g===null)return null;const v=ES(g)||ES(m);return i[h][v]}),d=n&&Object.entries(n).reduce((h,g)=>{let[m,v]=g;return v===void 0||(h[m]=v),h},{}),f=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((h,g)=>{let{class:m,className:v,...b}=g;return Object.entries(b).every(S=>{let[_,x]=S;return Array.isArray(x)?x.includes({...l,...d}[_]):{...l,...d}[_]===x})?[...h,m,v]:h},[]);return RS(e,c,f,n?.class,n?.className)},b8=v8("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),vd=k.forwardRef(({className:e,...t},n)=>E.jsx(RR,{ref:n,className:Nn(b8(),e),...t}));vd.displayName=RR.displayName;var w8={version:"1.1.2"},_8="authorization_response",S8="/~oauth/initiate",x8=["https://oauth.lovable.app","https://lovable.dev"],E8="lovable://oauth-callback",R8="http://127.0.0.1/iframe-oauth/callback",T8=500,k8=12e4;function A8(e){let t;const n=new Promise(l=>{t=l}),s=l=>{if(!e.some(f=>l.origin===f))return;const d=l.data;!d||typeof d!="object"||d.type===_8&&t(d.response)},i=()=>{window.removeEventListener("message",s)};return window.addEventListener("message",s),{cleanup:i,messagePromise:n}}function C8(e){const t=window.screenX!==0||window.screenY!==0||!e,n=t?window.outerWidth*.5:window.screen.width*.5,s=t?window.outerHeight*.5:window.screen.height*.5,i=t?window.screenX+(window.outerWidth-n)/2:(window.screen.width-n)/2,l=t?window.screenY+(window.outerHeight-s)/2:(window.screen.height-s)/2;return{width:n,height:s,left:i,top:l}}function TS(e,t){return e.state!==t?{error:new Error("State is invali
91d")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function O8(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function N8(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function j8(e={}){const t=e.oauthBrokerUrl??S8,n=e.supportedOAuthOrigins??x8;async function s(i,l={}){let c=!1;try{c=window.self!==window.top}catch{c=!0}const d=navigator.userAgent,f=/LovableApp\//.test(d),h=!f&&/lovable/i.test(d),g=N8();let m=l.redirect_uri??window.location.origin;f&&c?m=E8:h&&c&&(m=R8);const v=new URLSearchParams({...l.extraParams,provider:i,redirect_uri:m,state:g});if(!c)return window.location.href=`${t}?${v.toString()}`,{error:null,redirected:!0};!f&&!h&&v.set("response_mode","web_message");const b=`${t}?${v.toString()}`,S=h?[...n,window.location.origin]:n,{messagePromise:_,cleanup:x}=A8(S);let R;if(O8())R=window.open(b,"_blank");else{const{width:D,height:z,left:N,top:O}=C8(c);R=window.open(b,"oauth",`width=${D},height=${z},left=${N},top=${O}`)}if(!R&&(f||h)){let D;const z=new Promise((N,O)=>{D=setTimeout(()=>{O(new Error("OAuth timed out waiting for response"))},k8)});try{const N=await Promise.race([_,z]);return TS(N,g)}catch(N){return{error:N instanceof Error?N:new Error(String(N))}}finally{D&&clearTimeout(D),x()}}if(!R)return x(),{error:new Error("Popup was blocked")};let A;const C=new Promise((D,z)=>{A=setInterval(()=>{R.closed&&(clearInterval(A),z(new Error("Sign in was cancelled")))},T8)});try{const D=await Promise.race([_,C]);return TS(D,g)}catch(D){return{error:D instanceof Error?D:new Error(String(D))}}finally{clearInterval(A),x(),R?.close()}}return{signInWithOAuth:s}}typeof window<"u"&&(window.__lovable_cloud_auth_js_version=w8.version);function D8(e={}){return j8(e)}const P8=D8(),M8={auth:{signInWithOAuth:async(e,t)=>{const n=await P8.signInWithOAuth(e,{...t,extraParams:{...t?.extraParams}});if(n.redirected||n.error)return n;try{await ir.auth.setSession(n.tokens)}catch(s){return{error:s instanceof Error?s:new Error(String(s))}}return n}}},Xm="chck_guest_token";function L8(){if(typeof window>"u")return"";let e=localStorage.getItem(Xm);return e||(e=crypto.randomUUID(),localStorage.setItem(Xm,e)),e}function I8(){typeof window>"u"||localStorage.removeItem(Xm)}const eB=he({method:"POST"}).handler(pe("e5a0418fd36b087f232b5aae8080dd584bec780590c5a0984fd96501f086c3ce")),tB=he({method:"POST"}).handler(pe("966ec7de01eb74a9a8cb5cd5e0a310089209c21c9821869017871d5b83b326ec")),nB=he({method:"POST"}).handler(pe("b0cd5c592ed089d8886bf1aed54fe86597f66c449fcba1712cb8a6ca5b807967")),rB=he({method:"POST"}).handler(pe("22cf48dbcef072f82c4e4caef99a9ef32d0d2567c81bef67b1728de3927c2820")),sB=he({method:"POST"}).handler(pe("0894627c3a4c89544bb091785ac595091baf00f59a3215bc6ad0f4c4f1537903")),U8=he({method:"POST"}).middleware([Ae]).handler(pe("dc631b9d42b8b98a45c8b131fc0bd79a5fb2c20abf85d24e0d691df3c96628dd"));he({method:"POST"}).middleware([Ae]).handler(pe("5e7ec0b7f2069dc28f44e6a9533f54716e81898ecb97c44d2b3bf9539ed556a4"));const aB=he({method:"POST"}).middleware([Ae]).handler(pe("75c46de3590ed0e1776d6b73b9c19994b08c94fb43b622d9f5ee7e6f3ad2ba1d")),iB=he({method:"POST"}).middleware([Ae]).handler(pe("4e27e9da201d3ea54d263786728266642e33fdcc11d7c7edfe0679fbcbc0a821")),z8=he({method:"POST"}).middleware([Ae]).handler(pe("334814815632f62d24a28a3240da85fd52105e40fe0828ae4dfcbe70875bf74c")),oB=he({method:"GET"}).middleware([Ae]).handler(pe("ace8723e03e7b9f8faa0ea514ad174d2027936e35a04baf84cbb162b53847879")),TR=he({method:"POST"}).middleware([Ae]).handler(pe("8bc06953e08167610a0726584b118351d696a0fafa8347d5830e0438e598e6c5")),Hg="chck_ref_
91code";function $8(){if(!(typeof window>"u"))try{const e=new URLSearchParams(window.location.search).get("ref");if(!e)return;const t=e.trim().toUpperCase().slice(0,16);if(!/^[A-Z0-9]{4,16}$/.test(t))return;localStorage.setItem(Hg,t)}catch{}}function kR(){if(typeof window>"u")return null;try{return localStorage.getItem(Hg)}catch{return null}}function AR(){if(!(typeof window>"u"))try{localStorage.removeItem(Hg)}catch{}}const kS=SE().trim().email("Enter a valid email").max(255),B8=SE().min(8,"At least 8 characters").max(72);function H8({open:e,onOpenChange:t,intent:n="grade"}){const[s,i]=k.useState("signup"),[l,c]=k.useState(""),[d,f]=k.useState(""),[h,g]=k.useState(!1),m=zl(U8),v=zl(z8),b=zl(TR),S=It(),_=oE(),x=async()=>{try{const N=L8();if(!N)return;const O=await m({data:{guestToken:N}});O.reassigned>0&&(I8(),pn.success(`Saved ${O.reassigned} card${O.reassigned>1?"s":""} to your binder`))}catch{}},R=async()=>{const N=kR();if(N)try{const O=await b({data:{code:N}});AR(),O.ok&&pn.success("Invite applied — your friend just earned free grades")}catch{}},A=async(N=4e3)=>{const O=Date.now();for(;Date.now()-O<N;){const{data:I}=await ir.auth.getSession();if(I.session)return I.session;await new Promise(W=>setTimeout(W,100))}return null},C=async N=>{g(!0);const O=await M8.auth.signInWithOAuth(N,{redirect_uri:window.location.origin});if(O.error){pn.error(O.error.message||`Couldn't sign in with ${N}`),g(!1);return}if(O.redirected)return;if(!await A()){pn.error("Signed in, but the session didn't load. Please refresh."),g(!1);return}await x(),await R(),await _.invalidateQueries(),await S.invalidate(),pn.success("Signed in"),t(!1),g(!1)},D=async N=>{N.preventDefault();const O=kS.safeParse(l);if(!O.success)return pn.error(O.error.issues[0].message);g(!0);try{const{error:I}=await ir.auth.resetPasswordForEmail(O.data,{redirectTo:`${window.location.origin}/reset-password`});if(I)throw I;pn.success("Password reset link sent — check your email"),i("signin")}catch(I){pn.error(I instanceof Error?I.message:"Something went wrong")}finally{g(!1)}},z=async N=>{N.preventDefault();const O=kS.safeParse(l),I=B8.safeParse(d);if(!O.success)return pn.error(O.error.issues[0].message);if(!I.success)return pn.error(I.error.issues[0].message);g(!0);try{if(s==="signup"){const{data:W,error:ne}=await ir.auth.signUp({email:O.data,password:I.data,options:{emailRedirectTo:`${window.location.origin}/auth/callback`}});if(ne)throw ne;dE("CompleteRegistration",{method:"email"}),W.session?(v().catch(()=>{}),await x(),await R(),await _.invalidateQueries(),await S.invalidate(),pn.success("Account created — check your email to confirm")):pn.success("Check your email to confirm your account"),t(!1)}else{const{error:W}=await ir.auth.signInWithPassword({email:O.data,password:I.data});if(W)throw W;await x(),pn.success("Welcome back"),t(!1)}}catch(W){pn.error(W instanceof Error?W.message:"Something went wrong")}finally{g(!1)}};return E.jsx(i8,{open:e,onOpenChange:t,children:E.jsxs(vR,{className:"sm:max-w-md",children:[E.jsxs(bR,{children:[E.jsx(wR,{className:"font-display text-3xl font-light",children:s==="signup"?n==="identify"?"Scan & match your cards":"Start grading":s==="forgot"?"Reset your password":"Welcome back"}),E.jsx(_R,{children:s==="signup"?n==="identify"?"Create a free account to identify any card from two photos and see its current ungraded market value. New accounts get 1 free scan.":"Create an account to grade your card and save your slabs.":s==="forgot"?"Enter your email and we'll send you a link to set a new password.":"Sign in to pick up where you left off."})]}),s==="forgot"&&E.jsxs("form",{onSubmit:D,className:"grid gap-3",children:[E.jsxs("div",{className:"grid gap-1.5",children:[E.jsx(vd,{htmlFor:"reset-email",children:"Email"}),E.jsx(yd,{id:"reset-email",type:"email",autoComplete:"email",value:l,onChange:N=>c(N.target.value),required:!0})]}),E.jsxs("button",{type:"submit",disabled:h,className:"glow-green mt-2 inline-flex h-11 items-center justify-center gap-2 rounded-full bg-primary text-sm font-medium text-primary-foreground transition hover:brightness-110 disabled:opacity-50",children:[h?E.jsx(qm,{className:"h-4 w-4 animate-spin"}):E.jsx(B_,{className:"h-4 w-4"}),"Send reset link",E.jsx(U_,{className:"h-4 w-4"})]})]}),n==="identify"&&s==="signup"&&E.jsxs("div",{className:"grid gap-2 rounded-xl border border-rule bg-card p-3",children:[E.jsxs("div",{className:"flex items-center gap-2 text-sm text-ink",children:[E.jsx(rM,{className:"h-4 w-4 text-verify"}),"Scan the front and back"]}),E.jsxs("div",{className:"flex items-center gap-2 text-sm text-ink",children:[E.jsx(aM,{className:"h-4 w-4 text-verify"}),"Match to our card database"]}),E.jsxs("div",{className:"flex items-center gap-2 text-sm text-ink",children:[E.jsx(GP,{className:"h-4 w-4 text-verify"}),"Get an ungraded market value"]})]}),s!=="forgot"&&E.jsxs("div",{className:"grid gap-3",children:[E.jsxs("button",{type:"button",disabled:h,onClick:()=>C("google"),className:"inline-flex h-10 items-center justify-center gap-2 rounded-md border border-rule bg-background text-sm font-medium transition hover:bg-card disabled:opacity-50",children:[E.jsx(q8,{})," Continue with Google"]}),E.jsxs("button",{type:"button",disabled:h,onClick:()=>C("apple"),className:"inline-flex h-10 items-center justify-center gap-2 rounded-md border border-rule bg-background text-sm font-medium transition hover:bg-card disabled:opacity-50",children:[E.jsx("svg",{viewBox:"0 0 384 512","aria-hidden":"true",className:"h-4 w-4 fill-current",children:E.jsx("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})}),"Continue with Apple"]})]}),s!=="forgot"&&E.jsxs("div",{className:"my-1 flex items-center gap-3 text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:[E.jsx("span",{className:"h-px flex-1 bg-rule"})," or ",E.jsx("span",{className:"h-px flex-1 bg-rule"})]}),s!=="forgot"&&E.jsxs("form",{onSubmit:z,className:"grid gap-3",children:[E.jsxs("div",{className:"grid gap-1.5",children:[E.jsx(vd,{htmlFor:"email",children:"Email"}),E.jsx(yd,{id:"email",type:"email",autoComplete:"email",value:l,onCh
91ange:N=>c(N.target.value),required:!0})]}),E.jsxs("div",{className:"grid gap-1.5",children:[E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx(vd,{htmlFor:"password",children:"Password"}),s==="signin"&&E.jsx("button",{type:"button",onClick:()=>i("forgot"),className:"text-xs text-muted-foreground transition hover:text-foreground",children:"Forgot password?"})]}),E.jsx(yd,{id:"password",type:"password",autoComplete:s==="signup"?"new-password":"current-password",value:d,onChange:N=>f(N.target.value),required:!0,minLength:8})]}),E.jsxs("button",{type:"submit",disabled:h,className:"glow-green mt-2 inline-flex h-11 items-center justify-center gap-2 rounded-full bg-primary text-sm font-medium text-primary-foreground transition hover:brightness-110 disabled:opacity-50",children:[h?E.jsx(qm,{className:"h-4 w-4 animate-spin"}):E.jsx(B_,{className:"h-4 w-4"}),s==="signup"?"Create account":"Sign in",E.jsx(U_,{className:"h-4 w-4"})]})]}),E.jsx("button",{type:"button",onClick:()=>i(s==="signup"||s==="forgot"?"signin":"signup"),className:"text-center text-xs text-muted-foreground transition hover:text-foreground",children:s==="signup"?"Already have an account? Sign in":s==="forgot"?"Back to sign in":"New here? Create an account"})]})})}function q8(){return E.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 48 48","aria-hidden":"true",children:[E.jsx("path",{fill:"#FFC107",d:"M43.6 20.5H42V20H24v8h11.3C33.7 32.4 29.3 35.5 24 35.5c-6.4 0-11.5-5.1-11.5-11.5S17.6 12.5 24 12.5c2.9 0 5.6 1.1 7.6 2.9l5.7-5.7C33.9 6.5 29.2 4.5 24 4.5 13.2 4.5 4.5 13.2 4.5 24S13.2 43.5 24 43.5 43.5 34.8 43.5 24c0-1.2-.1-2.3-.4-3.5z"}),E.jsx("path",{fill:"#FF3D00",d:"M6.3 14.7l6.6 4.8C14.7 16 19 12.5 24 12.5c2.9 0 5.6 1.1 7.6 2.9l5.7-5.7C33.9 6.5 29.2 4.5 24 4.5 16.3 4.5 9.7 8.9 6.3 14.7z"}),E.jsx("path",{fill:"#4CAF50",d:"M24 43.5c5.1 0 9.8-2 13.3-5.1l-6.1-5c-2 1.4-4.5 2.1-7.2 2.1-5.3 0-9.7-3.1-11.3-7.5l-6.5 5C9.6 39 16.3 43.5 24 43.5z"}),E.jsx("path",{fill:"#1976D2",d:"M43.6 20.5H42V20H24v8h11.3c-.8 2.2-2.2 4-4.1 5.4l6.1 5c-.4.4 6.7-4.9 6.7-14.4 0-1.2-.1-2.3-.4-3.5z"})]})}const lB=he({method:"POST"}).middleware([Ae]).handler(pe("dee872744813923db880ee7747156cef61f1df485143a63bc18294c626484287")),cB=he({method:"POST"}).middleware([Ae]).handler(pe("a58766b05eade5e9dd6f24614bdb74c044a8fe682de8446b6c6c15e48bfd1c09")),uB=he({method:"POST"}).middleware([Ae]).handler(pe("867ce9c78c5c395004a78bc208f2b1400e4a4111e98a7eafa622685eabfcf9f6")),qg=he({method:"GET"}).middleware([Ae]).handler(pe("f896e9b00cdb095ee6c38368b4863ff453e25d19b14af6126f8cf37f185ab7eb")),F8="/__l5e/assets-v1/02ad2c17-1a5e-4311-a034-d25111b605b6/chck-logo.png",V8={url:F8},G8="/__l5e/assets-v1/7e4172f2-22bc-4e49-802d-2095290d2e62/chck-logo-light.png",K8={url:G8};function Y8({onDark:e=!1,className:t="h-6"}){const n=e?V8.url:K8.url;return E.jsx("img",{src:n,alt:"chck.ai logo",className:`${t} w-auto max-w-none select-none object-contain`,draggable:!1})}const W8=["top","right","bottom","left"],ca=Math.min,An=Math.max,qd=Math.round,ad=Math.floor,Cr=e=>({x:e,y:e}),Q8={left:"right",right:"left",bottom:"top",top:"bottom"};function Jm(e,t,n){return An(e,ca(t,n))}function ds(e,t){return typeof e=="function"?e(t):e}function fs(e){return e.split("-")[0]}function Ao(e){return e.split("-")[1]}function Fg(e){return e==="x"?"y":"x"}function Vg(e){return e==="y"?"height":"width"}function Tr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Gg(e){return Fg(Tr(e))}function Z8(e,t,n){n===void 0&&(n=!1);const s=Ao(e),i=Gg(e),l=Vg(i);let c=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=Fd(c)),[c,Fd(c)]}function X8(e){const t=Fd(e);return[eg(e),t,eg(t)]}function eg(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const AS=["left","right"],CS=["right","left"],J8=["top","bottom"],eI=["bottom","top"];function tI(e,t,n){switch(e){case"top":case"bottom":return n?t?CS:AS:t?AS:CS;case"left":case"right":return t?J8:eI;default:return[]}}function nI(e,t,n,s){const i=Ao(e);let l=tI(fs(e),n==="start",s);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(eg)))),l}function Fd(e){const t=fs(e);return Q8[t]+e.slice(t.length)}function rI(e){return{top:0,right:0,bottom:0,left:0,...e}}function CR(e){return typeof e!="number"?rI(e):{top:e,right:e,bottom:e,left:e}}function Vd(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function OS(e,t,n){let{reference:s,floating:i}=e;const l=Tr(t),c=Gg(t),d=Vg(c),f=fs(t),h=l==="y",g=s.x+s.width/2-i.width/2,m=s.y+s.height/2-i.height/2,v=s[d]/2-i[d]/2;let b;switch(f){case"top":b={x:g,y:s.y-i.height};break;case"bottom":b={x:g,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:m};break;case"left":b={x:s.x-i.width,y:m};break;default:b={x:s.x,y:s.y}}switch(Ao(t)){case"start":b[c]-=v*(n&&h?-1:1);break;case"end":b[c]+=v*(n&&h?-1:1);break}return b}async function sI(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:l,rects:c,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:v=!1,padding:b=0}=ds(t,e),S=CR(b),x=d[v?m==="floating"?"reference":"floating":m],R=Vd(await l.getClippingRect
vendor: 4,869 bytes, line 91
91({element:(n=await(l.isElement==null?void 0:l.isElement(x)))==null||n?x:x.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:g,strategy:f})),A=m==="floating"?{x:s,y:i,width:c.floating.width,height:c.floating.height}:c.reference,C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),D=await(l.isElement==null?void 0:l.isElement(C))?await(l.getScale==null?void 0:l.getScale(C))||{x:1,y:1}:{x:1,y:1},z=Vd(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:C,strategy:f}):A);return{top:(R.top-z.top+S.top)/D.y,bottom:(z.bottom-R.bottom+S.bottom)/D.y,left:(R.left-z.left+S.left)/D.x,right:(z.right-R.right+S.right)/D.x}}const aI=50,iI=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:sI},f=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:m}=OS(h,s,f),v=s,b=0;const S={};for(let _=0;_<l.length;_++){const x=l[_];if(!x)continue;const{name:R,fn:A}=x,{x:C,y:D,data:z,reset:N}=await A({x:g,y:m,initialPlacement:s,placement:v,strategy:i,middlewareData:S,rects:h,platform:d,elements:{reference:e,floating:t}});g=C??g,m=D??m,S[R]={...S[R],...z},N&&b<aI&&(b++,typeof N=="object"&&(N.placement&&(v=N.placement),N.rects&&(h=N.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:g,y:m}=OS(h,v,f)),_=-1)}return{x:g,y:m,placement:v,strategy:i,middlewareData:S}},oI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:l,platform:c,elements:d,middlewareData:f}=t,{element:h,padding:g=0}=ds(e,t)||{};if(h==null)return{};const m=CR(g),v={x:n,y:s},b=Gg(i),S=Vg(b),_=await c.getDimensions(h),x=b==="y",R=x?"top":"left",A=x?"bottom":"right",C=x?"clientHeight":"clientWidth",D=l.reference[S]+l.reference[b]-v[b]-l.floating[S],z=v[b]-l.reference[b],N=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let O=N?N[C]:0;(!O||!await(c.isElement==null?void 0:c.isElement(N)))&&(O=d.floating[C]||l.floating[S]);const I=D/2-z/2,W=O/2-_[S]/2-1,ne=ca(m[R],W),F=ca(m[A],W),V=ne,ee=O-_[S]-F,le=O/2-_[S]/2+I,oe=Jm(V,le,ee),M=!f.arrow&&Ao(i)!=null&&le!==oe&&l.reference[S]/2-(le<V?ne:F)-_[S]/2<0,G=M?le<V?le-V:le-ee:0;return{[b]:v[b]+G,data:{[b]:oe,centerOffset:le-oe-G,...M&&{alignmentOffset:G}},reset:M}}}),lI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:l,rects:c,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0,...x}=ds(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const R=fs(i),A=Tr(d),C=fs(d)===d,D=await(f.isRTL==null?void 0:f.isRTL(h.floating)),z=v||(C||!_?[Fd(d)]:X8(d)),N=S!=="none";!v&&N&&z.push(...nI(d,_,S,D));const O=[d,...z],I=await f.detectOverflow(t,x),W=[];let ne=((s=l.flip)==null?void 0:s.overflows)||[];if(g&&W.push(I[R]),m){const le=Z8(i,c,D);W.push(I[le[0]],I[le[1]])}if(ne=[...ne,{placement:i,overflows:W}],!W.every(le=>le<=0)){var F,V;const le=(((F=l.flip)==null?void 0:F.index)||0)+1,oe=O[le];if(oe&&(!(m==="alignment"?A!==Tr(oe):!1)||ne.every(te=>Tr(te.placement)===A?te.overflows[0]>0:!0)))return{data:{index:le,overflows:ne},reset:{placement:oe}};let M=(V=ne.filter(G=>G.overflows[0]<=0).sort((G,te)=>G.overflows[1]-te.overflows[1])[0])==null?void 0:V.placement;if(!M)switch(b){case"bestFit":{var ee;const G=(ee=ne.filter(te=>{if(N){const Se=Tr(te.placement);return Se===A||Se==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(Se=>Se>0).reduce((Se,J)=>Se+J,0)]).sort((te,Se)=>te[1]-Se[1])[0])==null?void 0:ee[0];G&&(M=G);break}case"initialPlacement":M=d;break}if(i!==M)return{reset:{placement:M}}}return{}}}};function NS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jS(e){return W8.some(t=>e[t]>=0)}const cI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...l}=ds(e,t);switch(i){case"referenceHidden":{const c=await s.detectOverflow(t,{...l,elementContext:"reference"}),d=NS(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:jS(d)}}}case"escaped":{const c=await s.detectOverflow(t,{...l,altBoundary:!0}),d=NS(c,n.floating);return{data:{escapedOffsets:d,escaped:jS(d)}}}default:return{}}}}},OR=new Set(["left","top"]);async function uI(e,t){const{placement:n,platform:s,elements:i}=e,l=await(s.isRTL==null?void 0:s.isRTL(i.floating)),c=fs(n),d=Ao(n),f=Tr(n)==="y",h=OR.has(c)?-1:1,g=l&&f?-1:1,m=ds(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}
91:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof S=="number"&&(b=d==="end"?S*-1:S),f?{x:b*g,y:v*h}:{x:v*h,y:b*g}}const dI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:l,placement:c,middlewareData:d}=t,f=await uI(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:i+f.x,y:l+f.y,data:{...f,placement:c}}}}},fI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:R=>{let{x:A,y:C}=R;return{x:A,y:C}}},...h}=ds(e,t),g={x:n,y:s},m=await l.detectOverflow(t,h),v=Tr(fs(i)),b=Fg(v);let S=g[b],_=g[v];if(c){const R=b==="y"?"top":"left",A=b==="y"?"bottom":"right",C=S+m[R],D=S-m[A];S=Jm(C,S,D)}if(d){const R=v==="y"?"top":"left",A=v==="y"?"bottom":"right",C=_+m[R],D=_-m[A];_=Jm(C,_,D)}const x=f.fn({...t,[b]:S,[v]:_});return{...x,data:{x:x.x-n,y:x.y-s,enabled:{[b]:c,[v]:d}}}}}},hI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:i,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=ds(e,t),g={x:n,y:s},m=Tr(i),v=Fg(m);let b=g[v],S=g[m];const _=ds(d,t),x=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(f){const C=v==="y"?"height":"width",D=l.reference[v]-l.floating[C]+x.mainAxis,z=l.reference[v]+l.reference[C]-x.mainAxis;b<D?b=D:b>z&&(b=z)}if(h){var R,A;const C=v==="y"?"width":"height",D=OR.has(fs(i)),z=l.reference[m]-l.floating[C]+(D&&((R=c.offset)==null?void 0:R[m])||0)+(D?0:x.crossAxis),N=l.reference[m]+l.reference[C]+(D?0:((A=c.offset)==null?void 0:A[m])||0)-(D?x.crossAxis:0);S<z?S=z:S>N&&(S=N)}return{[v]:b,[m]:S}}}},pI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:l,platform:c,elements:d}=t,{apply:f=()=>{},...h}=ds(e,t),g=await c.detectOverflow(t,h),m=fs(i),v=Ao(i),b=Tr(i)==="y",{width:S,height:_}=l.floating;let x,R;m==="top"||m==="bottom"?(x=m,R=v===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(R=m,x=v==="end"?"top":"bottom");const A=_-g.top-g.bottom,C=S-g.left-g.right,D=ca(_-g[x],A),z=ca(S-g[R],C),N=!t.middlewareData.shift;let O=D,I=z;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=C),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(O=A),N&&!v){const ne=An(g.left,0),F=An(g.right,0),V=An(g.top,0),ee=An(g.bottom,0);b?I=S-2*(ne!==0||F!==0?ne+F:An(g.left,g.right)):O=_-2*(V!==0||ee!==0?V+ee:An(g.top,g.bottom))}await f({...t,availableWidth:I,availableHeight:O});const W=await c.getDimensions(d.floating);return S!==W.width||_!==W.height?{reset:{rects:!0}}:{}}}};function lf(){return typeof window<"u"}function Co(e){return NR(e)?(e.nodeName||"").toLowerCase():"#document"}function jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nr(e){var t;return(t=(NR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function NR(e){return lf()?e instanceof Node||e instanceof jn(e).Node:!1}function cr(e){return lf()?e instanceof Element||e instanceof jn(e).Element:!1}function ps(e){return lf()?e instanceof HTMLElement||e instanceof jn(e).HTMLElement:!1}function DS(e){return!lf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jn(e).ShadowRoot}function vc(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&i!=="inline"&&i!=="contents"}function mI(e){return/^(table|td|th)$/.test(Co(e))}function cf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const gI=/transform|translate|scale|rotate|perspective|filter/,yI=/paint|layout|strict|content/,Ba=e=>!!e&&e!=="none";let om;function Kg(e){const t=cr(e)?ur(e):e;return Ba(t.transform)||Ba(t.translate)||Ba(t.scale)||Ba(t.rotate)||Ba(t.perspective)||!Yg()&&(Ba(t.backdropFilter)||Ba(t.filter))||gI.test(t.willChange||"")||yI.test(t.contain||"")}function vI(e){let t=ua(e);for(;ps(t)&&!xo(t);){if(Kg(t))return t;if(cf(t))return null;t=ua(t)}return null}function Yg(){return om==null&&(om=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),om}function xo(e){return/^(html|body|#document)$/.test(Co(e))}function ur(e){return jn(e).getComputedStyle(e)}function uf(e){return cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ua(e){if(Co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||DS(e)&&e.host||Nr(e);return DS(t)?t.host:t}function jR(e){const t=ua(e);return xo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ps(t)&&vc(t)?t:jR(t)}
vendor: 5,764 bytes, line 91
91function fc(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=jR(e),l=i===((s=e.ownerDocument)==null?void 0:s.body),c=jn(i);if(l){const d=tg(c);return t.concat(c,c.visualViewport||[],vc(i)?i:[],d&&n?fc(d):[])}else return t.concat(i,fc(i,[],n))}function tg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DR(e){const t=ur(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=ps(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:s,d=qd(n)!==l||qd(s)!==c;return d&&(n=l,s=c),{width:n,height:s,$:d}}function Wg(e){return cr(e)?e:e.contextElement}function yo(e){const t=Wg(e);if(!ps(t))return Cr(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:l}=DR(t);let c=(l?qd(n.width):n.width)/s,d=(l?qd(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const bI=Cr(0);function PR(e){const t=jn(e);return!Yg()||!t.visualViewport?bI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jn(e)?!1:t}function Za(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=Wg(e);let c=Cr(1);t&&(s?cr(s)&&(c=yo(s)):c=yo(e));const d=wI(l,n,s)?PR(l):Cr(0);let f=(i.left+d.x)/c.x,h=(i.top+d.y)/c.y,g=i.width/c.x,m=i.height/c.y;if(l){const v=jn(l),b=s&&cr(s)?jn(s):s;let S=v,_=tg(S);for(;_&&s&&b!==S;){const x=yo(_),R=_.getBoundingClientRect(),A=ur(_),C=R.left+(_.clientLeft+parseFloat(A.paddingLeft))*x.x,D=R.top+(_.clientTop+parseFloat(A.paddingTop))*x.y;f*=x.x,h*=x.y,g*=x.x,m*=x.y,f+=C,h+=D,S=jn(_),_=tg(S)}}return Vd({width:g,height:m,x:f,y:h})}function df(e,t){const n=uf(e).scrollLeft;return t?t.left+n:Za(Nr(e)).left+n}function MR(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-df(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function _I(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const l=i==="fixed",c=Nr(s),d=t?cf(t.floating):!1;if(s===c||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=Cr(1);const g=Cr(0),m=ps(s);if((m||!m&&!l)&&((Co(s)!=="body"||vc(c))&&(f=uf(s)),m)){const b=Za(s);h=yo(s),g.x=b.x+s.clientLeft,g.y=b.y+s.clientTop}const v=c&&!m&&!l?MR(c,f):Cr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+g.x+v.x,y:n.y*h.y-f.scrollTop*h.y+g.y+v.y}}function SI(e){return Array.from(e.getClientRects())}function xI(e){const t=Nr(e),n=uf(e),s=e.ownerDocument.body,i=An(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),l=An(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let c=-n.scrollLeft+df(e);const d=-n.scrollTop;return ur(s).direction==="rtl"&&(c+=An(t.clientWidth,s.clientWidth)-i),{width:i,height:l,x:c,y:d}}const PS=25;function EI(e,t){const n=jn(e),s=Nr(e),i=n.visualViewport;let l=s.clientWidth,c=s.clientHeight,d=0,f=0;if(i){l=i.width,c=i.height;const g=Yg();(!g||g&&t==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}const h=df(s);if(h<=0){const g=s.ownerDocument,m=g.body,v=getComputedStyle(m),b=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(s.clientWidth-m.clientWidth-b);S<=PS&&(l-=S)}else h<=PS&&(l+=h);return{width:l,height:c,x:d,y:f}}function RI(e,t){const n=Za(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,l=ps(e)?yo(e):Cr(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,f=i*l.x,h=s*l.y;return{width:c,height:d,x:f,y:h}}function MS(e,t,n){let s;if(t==="viewport")s=EI(e,n);else if(t==="document")s=xI(Nr(e));else if(cr(t))s=RI(t,n);else{const i=PR(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Vd(s)}function LR(e,t){const n=ua(e);return n===t||!cr(n)||xo(n)?!1:ur(n).position==="fixed"||LR(n,t)}function TI(e,t){const n=t.get(e);if(n)return n;let s=fc(e,[],!1).filter(d=>cr(d)&&Co(d)!=="body"),i=null;const l=ur(e).position==="fixed";let c=l?ua(e):e;for(;cr(c)&&!xo(c);){const d=ur(c),f=Kg(c);!f&&d.position==="fixed"&&(i=null),(l?!f&&!i:!f&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||vc(c)&&!f&&LR(e,c))?s=s.filter(g=>g!==c):i=d,c=ua(c)}return t.set(e,s),s}function kI(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const c=[...n==="clippingAncestors"?cf(t)?[]:TI(t,this._c):[].concat(n),s],d=MS(t,c[0],i);let f=d.top,h=d.right,g=d.bottom,m=d.left;for(let v=1;v<c.length;v++){const b=MS(t,c[v],i);f=An(b.top,f),h=ca(b.right,h),g=ca(b.bottom,g),m=An(b.left,m)}return{width:h-m,height:g-f,x:m,y:f}}function AI(e){const{width:t,height:n}=DR(e);return{width:t,height:n}}function CI(e,t,n){const s=ps(t),i=Nr(t),l=n==="fixed",c=Za(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=Cr(0);function h(){f.x=df(i)}if(s||!s&&!l)if((Co(t)!=="body"||vc(i))&&(d=uf(t)),s){const b=Za(t,!0,l,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}else i&&h();l&&!s&&i&&h();const g=i&&!s&&!l?MR(i,d):Cr(0),m=c.left+d.scrollLeft-f.x-g.x,v=c.top+d.scrollTop-f.y-g.y;return{x:m,y:v,width:c.width,height:c.height}}function lm(e){return ur(e).position==="static"}function LS(e,t){if(!ps(e)||ur(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nr(e)===n&&(n=n.ownerDocument.body),n}function IR(e,t){const n=jn(e);if(cf(e))return n;if(!ps(e)){let i=ua(e);for(;i&&!xo(i);){if(cr(i)&&!lm(i))return i;i=ua(i)}return n}let s=LS(e,t);for(;s&&mI(s)&&lm(s);)s=LS(s,t);return s&&xo(s)&&lm(s)&&!Kg(s)?n:s||vI(e)||n}const OI=async function(e){const t=this.getOffsetParent||IR,n=this.getDimensions,s=await n(e.floating);return{reference:CI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function NI(e){return ur(e).direction==="rtl"}const jI={convertOffsetParentRelativeRectToViewportRelativeRect:_I,getDocumentElement:Nr,getClippingRect:kI,getOffsetParent:IR,getElementRects:OI,getClientRects:SI,getDimensions:AI,getScale:yo,isElement:cr,
vendor: 5,127 bytes, line 91
91isRTL:NI};function UR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function DI(e,t){let n=null,s;const i=Nr(e);function l(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function c(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:g,top:m,width:v,height:b}=h;if(d||t(),!v||!b)return;const S=ad(m),_=ad(i.clientWidth-(g+v)),x=ad(i.clientHeight-(m+b)),R=ad(g),C={rootMargin:-S+"px "+-_+"px "+-x+"px "+-R+"px",threshold:An(0,ca(1,f))||1};let D=!0;function z(N){const O=N[0].intersectionRatio;if(O!==f){if(!D)return c();O?c(!1,O):s=setTimeout(()=>{c(!1,1e-7)},1e3)}O===1&&!UR(h,e.getBoundingClientRect())&&c(),D=!1}try{n=new IntersectionObserver(z,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(z,C)}n.observe(e)}return c(!0),l}function PI(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,h=Wg(e),g=i||l?[...h?fc(h):[],...t?fc(t):[]]:[];g.forEach(R=>{i&&R.addEventListener("scroll",n,{passive:!0}),l&&R.addEventListener("resize",n)});const m=h&&d?DI(h,n):null;let v=-1,b=null;c&&(b=new ResizeObserver(R=>{let[A]=R;A&&A.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=b)==null||C.observe(t)})),n()}),h&&!f&&b.observe(h),t&&b.observe(t));let S,_=f?Za(e):null;f&&x();function x(){const R=Za(e);_&&!UR(_,R)&&n(),_=R,S=requestAnimationFrame(x)}return n(),()=>{var R;g.forEach(A=>{i&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),m?.(),(R=b)==null||R.disconnect(),b=null,f&&cancelAnimationFrame(S)}}const MI=dI,LI=fI,II=lI,UI=pI,zI=cI,IS=oI,$I=hI,BI=(e,t,n)=>{const s=new Map,i={platform:jI,...n},l={...i.platform,_c:s};return iI(e,t,{...i,platform:l})};var HI=typeof document<"u",qI=function(){},bd=HI?k.useLayoutEffect:qI;function Gd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!Gd(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const l=i[s];if(!(l==="_owner"&&e.$$typeof)&&!Gd(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function zR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function US(e,t){const n=zR(e);return Math.round(t*n)/n}function cm(e){const t=k.useRef(e);return bd(()=>{t.current=e}),t}function FI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[g,m]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=k.useState(s);Gd(v,s)||b(s);const[S,_]=k.useState(null),[x,R]=k.useState(null),A=k.useCallback(te=>{te!==N.current&&(N.current=te,_(te))},[]),C=k.useCallback(te=>{te!==O.current&&(O.current=te,R(te))},[]),D=l||S,z=c||x,N=k.useRef(null),O=k.useRef(null),I=k.useRef(g),W=f!=null,ne=cm(f),F=cm(i),V=cm(h),ee=k.useCallback(()=>{if(!N.current||!O.current)return;const te={placement:t,strategy:n,middleware:v};F.current&&(te.platform=F.current),BI(N.current,O.current,te).then(Se=>{const J={...Se,isPositioned:V.current!==!1};le.current&&!Gd(I.current,J)&&(I.current=J,rf.flushSync(()=>{m(J)}))})},[v,t,n,F,V]);bd(()=>{h===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,m(te=>({...te,isPositioned:!1})))},[h]);const le=k.useRef(!1);bd(()=>(le.current=!0,()=>{le.current=!1}),[]),bd(()=>{if(D&&(N.current=D),z&&(O.current=z),D&&z){if(ne.current)return ne.current(D,z,ee);ee()}},[D,z,ee,ne,W]);const oe=k.useMemo(()=>({reference:N,floating:O,setReference:A,setFloating:C}),[A,C]),M=k.useMemo(()=>({reference:D,floating:z}),[D,z]),G=k.useMemo(()=>{const te={position:n,left:0,top:0};if(!M.floating)return te;const Se=US(M.floating,g.x),J=US(M.floating,g.y);return d?{...te,transform:"translate("+Se+"px, "+J+"px)",...zR(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Se,top:J}},[n,d,M.floating,g.x,g.y]);return k.useMemo(()=>({...g,update:ee,refs:oe,elements:M,floatingStyles:G}),[g,ee,oe,M,G])}const VI=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?IS({element:s.current,padding:i}).fn(n):{}:s?IS({element:s,padding:i}).fn(n):{}}}},GI=(e,t)=>{const n=MI(e);return{name:n.name,fn:n.fn,options:[e,t]}},KI=(e,t)=>{const n=LI(e);return{name:n.name,fn:n.fn,options:[e,t]}},YI=(e,t)=>({fn:$I(e).fn,options:[e,t]}),WI=(e,t)=>{const n=II(e);return{name:n.name,fn:n.fn,options:[e,t]}},QI=(e,t)=>{const n=UI(e);return{name:n.name,fn:n.fn,options:[e,t]}},ZI=(e,t)=>{const n=zI(e);return{name:n.name,fn:n.fn,options:[e,t]}},XI=(e,t)=>{const n=VI(e);return{name:n.name,fn:n.fn,options:[e,t]}};var JI="Arrow",$R=k.forwardRef((e,t)=>
vendor: 4,662 bytes, line 91
91{const{children:n,width:s=10,height:i=5,...l}=e;return E.jsx(yn.svg,{...l,ref:t,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});$R.displayName=JI;var eU=$R;function tU(e){const[t,n]=k.useState(void 0);return la(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let c,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;c=h.inlineSize,d=h.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Qg="Popper",[BR,HR]=jg(Qg),[nU,qR]=BR(Qg),FR=e=>{const{__scopePopper:t,children:n}=e,[s,i]=k.useState(null);return E.jsx(nU,{scope:t,anchor:s,onAnchorChange:i,children:n})};FR.displayName=Qg;var VR="PopperAnchor",GR=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...i}=e,l=qR(VR,n),c=k.useRef(null),d=dr(t,c),f=k.useRef(null);return k.useEffect(()=>{const h=f.current;f.current=s?.current||c.current,h!==f.current&&l.onAnchorChange(f.current)}),s?null:E.jsx(yn.div,{...i,ref:d})});GR.displayName=VR;var Zg="PopperContent",[rU,sU]=BR(Zg),KR=k.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:S,..._}=e,x=qR(Zg,n),[R,A]=k.useState(null),C=dr(t,fe=>A(fe)),[D,z]=k.useState(null),N=tU(D),O=N?.width??0,I=N?.height??0,W=s+(l!=="center"?"-"+l:""),ne=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},F=Array.isArray(h)?h:[h],V=F.length>0,ee={padding:ne,boundary:F.filter(iU),altBoundary:V},{refs:le,floatingStyles:oe,placement:M,isPositioned:G,middlewareData:te}=FI({strategy:"fixed",placement:W,whileElementsMounted:(...fe)=>PI(...fe,{animationFrame:b==="always"}),elements:{reference:x.anchor},middleware:[GI({mainAxis:i+I,alignmentAxis:c}),f&&KI({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?YI():void 0,...ee}),f&&WI({...ee}),QI({...ee,apply:({elements:fe,rects:be,availableWidth:Re,availableHeight:bt})=>{const{width:kt,height:ft}=be.reference,vn=fe.floating.style;vn.setProperty("--radix-popper-available-width",`${Re}px`),vn.setProperty("--radix-popper-available-height",`${bt}px`),vn.setProperty("--radix-popper-anchor-width",`${kt}px`),vn.setProperty("--radix-popper-anchor-height",`${ft}px`)}}),D&&XI({element:D,padding:d}),oU({arrowWidth:O,arrowHeight:I}),v&&ZI({strategy:"referenceHidden",...ee})]}),[Se,J]=QR(M),P=So(S);la(()=>{G&&P?.()},[G,P]);const K=te.arrow?.x,Q=te.arrow?.y,re=te.arrow?.centerOffset!==0,[ie,ue]=k.useState();return la(()=>{R&&ue(window.getComputedStyle(R).zIndex)},[R]),E.jsx("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:G?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" "),...te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(rU,{scope:n,placedSide:Se,onArrowChange:z,arrowX:K,arrowY:Q,shouldHideArrow:re,children:E.jsx(yn.div,{"data-side":Se,"data-align":J,..._,ref:C,style:{..._.style,animation:G?void 0:"none"}})})})});KR.displayName=Zg;var YR="PopperArrow",aU={top:"bottom",right:"left",bottom:"top",left:"right"},WR=k.forwardRef(function(t,n){const{__scopePopper:s,...i}=t,l=sU(YR,s),c=aU[l.placedSide];return E.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:E.jsx(eU,{...i,ref:n,style:{...i.style,display:"block"}})})});WR.displayName=YR;function iU(e){return e!==null}var oU=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:i}=t,c=i.arrow?.centerOffset!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,g]=QR(n),m={start:"0%",center:"50%",end:"100%"}[g],v=(i.arrow?.x??0)+d/2,b=(i.arrow?.y??0)+f/2;let S="",_="";return h==="bottom"?(S=c?m:`${v}px`,_=`${-f}px`):h==="top"?(S=c?m:`${v}px`,_=`${s.floating.height+f}px`):h==="right"?(S=`${-f}px`,_=c?m:`${b}px`):h==="left"&&(S=`${s.floating.width+f}px`,_=c?m:`${b}px`),{data:{x:S,y:_}}}});function QR(e){const[t,n="center"]=e.split("-");return[t,n]}
vendor: 4,439 bytes, line 91
91var lU=FR,ZR=GR,cU=KR,uU=WR;function dU(e){const t=fU(e),n=k.forwardRef((s,i)=>{const{children:l,...c}=s,d=k.Children.toArray(l),f=d.find(pU);if(f){const h=f.props.children,g=d.map(m=>m===f?k.Children.count(h)>1?k.Children.only(null):k.isValidElement(h)?h.props.children:null:m);return E.jsx(t,{...c,ref:i,children:k.isValidElement(h)?k.cloneElement(h,void 0,g):null})}return E.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function fU(e){const t=k.forwardRef((n,s)=>{const{children:i,...l}=n;if(k.isValidElement(i)){const c=gU(i),d=mU(l,i.props);return i.type!==k.Fragment&&(d.ref=s?yc(s,c):c),k.cloneElement(i,d)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hU=Symbol("radix.slottable");function pU(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hU}function mU(e,t){const n={...t};for(const s in t){const i=e[s],l=t[s];/^on[A-Z]/.test(s)?i&&l?n[s]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[s]=i):s==="style"?n[s]={...i,...l}:s==="className"&&(n[s]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function gU(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ff="Popover",[XR]=jg(ff,[HR]),bc=HR(),[yU,pa]=XR(ff),JR=e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:i,onOpenChange:l,modal:c=!1}=e,d=bc(t),f=k.useRef(null),[h,g]=k.useState(!1),[m,v]=xE({prop:s,defaultProp:i??!1,onChange:l,caller:ff});return E.jsx(lU,{...d,children:E.jsx(yU,{scope:t,contentId:pd(),triggerRef:f,open:m,onOpenChange:v,onOpenToggle:k.useCallback(()=>v(b=>!b),[v]),hasCustomAnchor:h,onCustomAnchorAdd:k.useCallback(()=>g(!0),[]),onCustomAnchorRemove:k.useCallback(()=>g(!1),[]),modal:c,children:n})})};JR.displayName=ff;var eT="PopoverAnchor",vU=k.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=pa(eT,n),l=bc(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:d}=i;return k.useEffect(()=>(c(),()=>d()),[c,d]),E.jsx(ZR,{...l,...s,ref:t})});vU.displayName=eT;var tT="PopoverTrigger",nT=k.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=pa(tT,n),l=bc(n),c=dr(t,i.triggerRef),d=E.jsx(yn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":oT(i.open),...s,ref:c,onClick:On(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?d:E.jsx(ZR,{asChild:!0,...l,children:d})});nT.displayName=tT;var Xg="PopoverPortal",[bU,wU]=XR(Xg,{forceMount:void 0}),rT=e=>{const{__scopePopover:t,forceMount:n,children:s,container:i}=e,l=pa(Xg,t);return E.jsx(bU,{scope:t,forceMount:n,children:E.jsx(ko,{present:n||l.open,children:E.jsx(Mg,{asChild:!0,container:i,children:s})})})};rT.displayName=Xg;var Eo="PopoverContent",sT=k.forwardRef((e,t)=>{const n=wU(Eo,e.__scopePopover),{forceMount:s=n.forceMount,...i}=e,l=pa(Eo,e.__scopePopover);return E.jsx(ko,{present:s||l.open,children:l.modal?E.jsx(SU,{...i,ref:t}):E.jsx(xU,{...i,ref:t})})});sT.displayName=Eo;var _U=dU("PopoverContent.RemoveScroll"),SU=k.forwardRef((e,t)=>{const n=pa(Eo,e.__scopePopover),s=k.useRef(null),i=dr(t,s),l=k.useRef(!1);return k.useEffect(()=>{const c=s.current;if(c)return ME(c)},[]),E.jsx(Lg,{as:_U,allowPinchZoom:!0,children:E.jsx(aT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:On(e.onCloseAutoFocus,c=>{c.preventDefault(),l.current||n.triggerRef.current?.focus()}),onPointerDownOutside:On(e.onPointerDownOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,h=d.button===2||f;l.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:On(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),xU=k.forwardRef((e,t)=>{const n=pa(Eo,e.__scopePopover),s=k.useRef(!1),i=k.useRef(!1);return E.jsx(aT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(s.current||n.triggerRef.current?.focus(),l.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;n.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),aT=k.forwardRef((e,t)=>
91{const{__scopePopover:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:g,...m}=e,v=pa(Eo,n),b=bc(n);return kE(),E.jsx(Pg,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:l,children:E.jsx(Dg,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:g,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>v.onOpenChange(!1),children:E.jsx(cU,{"data-state":oT(v.open),role:"dialog",id:v.contentId,...b,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),iT="PopoverClose",EU=k.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=pa(iT,n);return E.jsx(yn.button,{type:"button",...s,ref:t,onClick:On(e.onClick,()=>i.onOpenChange(!1))})});EU.displayName=iT;var RU="PopoverArrow",TU=k.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=bc(n);return E.jsx(uU,{...i,...s,ref:t})});TU.displayName=RU;function oT(e){return e?"open":"closed"}var kU=JR,AU=nT,CU=rT,lT=sT;const OU=kU,NU=AU,cT=k.forwardRef(({className:e,align:t="center",sideOffset:n=4,...s},i)=>E.jsx(CU,{children:E.jsx(lT,{ref:i,align:t,sideOffset:n,className:Nn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",e),...s})}));cT.displayName=lT.displayName;const jU=new Set(["complete","completed","graded"]),DU=600*1e3;function PU(e){const t=e.toLowerCase();return t==="complete"||t==="completed"||t==="graded"?{icon:yE,color:"text-emerald-500",label:"Graded"}:t==="failed"||t==="error"||t==="rejected"?{icon:$_,color:"text-red-500",label:e}:t==="abandoned"?{icon:$_,color:"text-muted-foreground",label:"Abandoned"}:t==="pending"||t==="queued"||t==="submitted"?{icon:FP,color:"text-amber-500",label:"Pending"}:{icon:qm,color:"text-blue-500 animate-spin",label:e}}const MU=new Set(["complete","completed","graded","failed","error","rejected","abandoned"]);function LU({onDark:e=!1}){const{user:t}=Og(),{data:n}=cE({queryKey:["account-summary"],queryFn:()=>qg(),enabled:!!t,refetchInterval:4e3}),s=n?.gradings??[],i="chck.gradeReveal.seen.v1",l=k.useRef(null),c=()=>{if(l.current)try{localStorage.setItem(i,JSON.stringify(Array.from(l.current)))}catch{}};if(k.useEffect(()=>{if(!t)return;const f=l.current===null;if(f){let g=[];try{g=JSON.parse(localStorage.getItem(i)??"[]")}catch{}l.current=new Set(g)}const h=l.current;for(const g of s){if(!jU.has(g.status.toLowerCase())||h.has(g.id)||(h.add(g.id),f)||!g.certificateSlug)continue;const m=Date.parse(g.finishedAt??g.createdAt??"");!Number.isFinite(m)||Date.now()-m>DU||typeof window<"u"&&window.dispatchEvent(new CustomEvent("chck:grade-complete",{detail:{gradingId:g.id}}))}c()},[s,t]),k.useEffect(()=>{if(!t)return;const f=h=>{const g=h.detail;if(!(!g||!g.id)){if(l.current===null)try{const m=JSON.parse(localStorage.getItem(i)??"[]");l.current=new Set(m)}catch{l.current=new Set}l.current.has(g.id)||(l.current.add(g.id),c())}};return window.addEventListener("chck:grade-reveal",f),()=>window.removeEventListener("chck:grade-reveal",f)},[t]),!t)return null;const d=s.filter(f=>!MU.has(f.status.toLowerCase())).length;return E.jsx(E.Fragment,{children:E.jsxs(OU,{children:[E.jsx(NU,{asChild:!0,children:E.jsxs("button",{type:"button","aria-label":"Notifications",className:Nn("relative inline-flex h-9 w-9 items-center justify-center rounded-full border transition",e?"border-[color:var(--nav-world-rule)] bg-[
91color:var(--nav-world-control)] text-[color:var(--nav-world-dim)] hover:text-[color:var(--nav-world-ink)]":"border-rule bg-surface text-ink-dim hover:text-ink"),children:[E.jsx($P,{className:"h-3.5 w-3.5"}),d>0&&E.jsx("span",{className:"absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-verify px-1 font-mono text-[9px] font-bold text-[color:var(--verify-fg)]",children:d})]})}),E.jsxs(cT,{align:"end",className:"w-[360px] p-0",children:[E.jsxs("div",{className:"border-b border-rule px-4 py-3",children:[E.jsx("div",{className:"font-display text-sm",children:"Notifications"}),E.jsx("div",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:"Your grading activity"})]}),E.jsx("div",{className:"max-h-[420px] overflow-y-auto",children:s.length===0?E.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No submissions yet. Grade a card to get started."}):E.jsx("ul",{className:"divide-y divide-rule",children:s.map(f=>{const h=PU(f.status),g=h.icon,m=E.jsxs("div",{className:"flex items-start gap-3 px-4 py-3 transition hover:bg-card/60",children:[E.jsx(g,{className:Nn("mt-0.5 h-4 w-4 shrink-0",h.color)}),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsxs("div",{className:"flex items-center justify-between gap-2",children:[E.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:h.label}),f.fullGrade!=null&&E.jsx("span",{className:"font-mono text-sm tabular-nums text-primary",children:f.fullGrade.toFixed(1)})]}),E.jsx("div",{className:"mt-0.5 truncate text-sm",children:f.certificateSlug?`Certificate ${f.certificateSlug}`:"Submission in progress"}),E.jsxs("div",{className:"mt-0.5 flex items-center justify-between font-mono text-[10px] text-muted-foreground",children:[E.jsx("span",{children:new Date(f.createdAt).toLocaleString()}),f.certificateSlug&&E.jsx(vE,{className:"h-3 w-3"})]})]})]});return E.jsx("li",{children:f.certificateSlug?E.jsx(Je,{to:"/c/$slug",params:{slug:f.certificateSlug},className:"block",children:m}):m},f.id)})})}),E.jsx(Je,{to:"/account",className:"block border-t border-rule px-4 py-3 text-right font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground transition hover:bg-card/60 hover:text-ink hover:underline",children:"View all in account →"})]})]})})}function IU({sticky:e=!0}){const{user:t,signOut:n}=Og(),s=Ex({select:_=>_.location.pathname}),[i,l]=k.useState(!1),[c]=k.useState("grade"),{data:d}=cE({queryKey:["account-summary"],queryFn:()=>qg(),enabled:!!t,staleTime:6e4}),f=!!t&&d?.canGrade===!1,[h,g]=k.useState(!1),[m,v]=k.useState(!1),b=s==="/";k.useEffect(()=>{g(!1)},[s]),k.useEffect(()=>{const _=()=>v(window.scrollY>24);return _(),window.addEventListener("scroll",_,{passive:!0}),()=>window.removeEventListener("scroll",_)},[]);const S=b?"nav-over-world text-[color:var(--nav-world-dim)] hover:text-[color:var(--nav-world-ink)]":"text-ink-dim hover:text-ink";return E.jsxs(E.Fragment,{children:[E.jsxs("header",{className:`${e?"sticky top-0":"relative"} z-40 transition-[background-color,backdrop-filter,border-color] duration-300 ${b?m?"border-b border-[color:var(--nav-world-rule)] bg-[color:var(--nav-world-control)] backdrop-blur-xl":"bg-transparent":m?"border-b border-rule bg-background/85 backdrop-blur-xl":"border-b border-rule bg-background"}`,children:[E.jsxs("div",{className:"mx-auto flex h-16 max-w-6xl items-center justify-between px-5",children:[E.jsx(Je,{to:"/",search:{home:1},className:"group inline-flex items-center",children:E.jsx(Y8,{onDark:b,className:"h-7 transition group-hover:opacity-90"})}),E.jsxs("nav",{className:"hidden items-center gap-1 md:flex",children:[E.jsx(Je,{to:"/feed",className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"Feed"}),E.jsx(Je,{to:"/deals",className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"Deals"}),E.jsx(Je,{to:"/blog",className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"Blog"}),E.jsx(Je,{to:"/services",className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"Services"}),E.jsx(Je,{to:"/pricing",className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"Pricing"}),E.jsx(Je,{to:"/about",className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"About"}),E.jsx(Je,{to:"/search",className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"Registry"})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[t?E.jsxs(E.Fragment,{children:[E.jsx(LU,{onDark:b}),E.jsx(Je,{to:"/account",className:`hidden rounded-full px-3 py-2 text-xs font-medium transition sm:inline-flex ${S}`,children:"Collection"}),E.jsx("button",{type:"button",onClick:()=>n(),"aria-label":"Sign out",className:`inline-flex h-9 w-9 items-center justify-center rounded-full border transition ${b?"border-[color:var(--nav-world-rule)] bg-[
91color:var(--nav-world-control)] text-[color:var(--nav-world-dim)] hover:text-[color:var(--nav-world-ink)]":"border-rule bg-surface text-ink-dim hover:text-ink"}`,children:E.jsx(QP,{className:"h-3.5 w-3.5"})})]}):E.jsx("button",{type:"button",onClick:()=>l(!0),className:`rounded-full px-3 py-2 text-sm transition ${S}`,children:"Sign in"}),!f&&E.jsx(Je,{to:"/chck",className:`hidden items-center gap-1 rounded-full border px-2.5 py-2 text-xs font-medium transition sm:inline-flex ${b?"border-[color:var(--nav-world-rule)] bg-[color:var(--nav-world-control)] text-[color:var(--nav-world-ink)] hover:bg-[color:var(--nav-world-rule)]":"border-rule bg-surface text-ink hover:bg-[color:var(--bg-2)]"}`,children:"Scan a card"}),E.jsxs(Je,{to:f?"/chck":"/grade",className:"hidden items-center gap-1.5 rounded-full bg-verify px-4 py-2 text-sm font-semibold text-[color:var(--verify-fg)] transition hover:brightness-110 sm:inline-flex",children:[f?"Scan a card":"Grade a card",E.jsx(z_,{className:"h-3.5 w-3.5",strokeWidth:2.5})]}),E.jsx("button",{type:"button",onClick:()=>g(_=>!_),"aria-label":h?"Close menu":"Open menu","aria-expanded":h,className:`inline-flex h-9 w-9 items-center justify-center rounded-full border transition md:hidden ${b?"border-[color:var(--nav-world-rule)] bg-[color:var(--nav-world-control)] text-[color:var(--nav-world-ink)]":"border-rule bg-surface text-ink"}`,children:h?E.jsx(sf,{className:"h-4 w-4"}):E.jsx(tM,{className:"h-4 w-4"})})]})]}),h&&E.jsx("div",{className:"md:hidden border-t border-rule bg-background",children:E.jsxs("nav",{className:"mx-auto flex max-w-6xl flex-col px-5 py-3",children:[t&&E.jsx(E.Fragment,{children:E.jsx(Je,{to:"/account",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Collection"})}),E.jsx(Je,{to:"/feed",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Feed"}),E.jsx(Je,{to:"/deals",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Deals"}),E.jsx(Je,{to:"/blog",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Blog"}),E.jsx(Je,{to:"/services",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Services"}),E.jsx(Je,{to:"/pricing",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Pricing"}),E.jsx(Je,{to:"/about",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"About"}),E.jsx(Je,{to:"/search",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Registry"}),E.jsx(Je,{to:"/support",className:"rounded-md px-3 py-3 text-sm text-ink hover:bg-[color:var(--bg-2)]",children:"Support"}),!f&&E.jsx(Je,{to:"/chck",onClick:()=>g(!1),className:"mt-2 inline-flex items-center justify-center gap-1 rounded-full border border-rule bg-surface px-4 py-2.5 text-sm font-medium text-ink hover:bg-[color:var(--bg-2)]",children:"Scan a card"}),E.jsxs(Je,{to:f?"/chck":"/grade",onClick:()=>g(!1),className:"mt-2 inline-flex items-center justify-center gap-1.5 rounded-full bg-verify px-4 py-3 text-sm font-semibold text-[color:var(--verify-fg)]",children:[f?"Scan a card":"Grade a card",E.jsx(z_,{className:"h-3.5 w-3.5",strokeWidth:2.5})]})]})})]}),E.jsx(H8,{open:i,onOpenChange:l,intent:c})]})}const UU=he({method:"GET"}).middleware([Ae]).handler(pe("f389762bb4459e58faa9db3f1adcb72d040ab8b2bbe5447d9ca2c4fd19b29513")),zU=he({method:"POST"}).middleware([Ae]).handler(pe("84745e4d84fd2f607490bcd66661309e604030190270490107319ee648e31ae8")),dB=he({method:"GET"}).middleware([Ae]).handler(pe("fca38b9775a9d87cc77343cf58b14fe2f8fda94b80940a03f03a444f8593a8f8")),fB=he({method:"POST"}).middleware([Ae]).handler(pe("90aee8343f5a87d4ce1d3ff5bf1c7946bc881ac78ef85c72a58092ca58c624e7")),hB=he({method:"POST"}).middleware([Ae]).handler(pe("35edada81c16b6b747e2e3c53641bd9e9889e08fbcb63956fc4d405f64cb9fd3")),pB=he({method:"POST"}).middleware([Ae]).handler(pe("14ea4ea360b6ae4f9e4f7f62a2b791a12a3666858967c7734b8d202c5c2e1d46"));function $U(){const{user:e,loading:t}=Og(),n=zl(UU),s=zl(zU),[i,l]=k.useState([]);k.useEffect(()=>{if(t||!e){l([]);return}let f=!1;const h=setTimeout(()=>{n().then(g=>{f||l(g.broadcasts??[])}).catch(()=>{})},600);return()=>{f=!0,clearTimeout(h)}},[e?.id,t,n]);const c=f=>{l(h=>h.filter(g=>g.id!==f)),s({data:{broadcastId:f}}).catch(()=>{})};if(!i.length)return null;const d=i[0];return E.jsx("div",{className:"fixed inset-x-0 bottom-4 z-50 flex justify-center px-4 pointer-events-none",children:E.jsxs("div",{className:"pointer-events-auto w-full max-w-md rounded-2xl border border-rule bg-surface/95 p-4 shadow-[0_20px_60px_-2
910px_rgba(0,0,0,0.4)] backdrop-blur",children:[E.jsxs("div",{className:"flex items-start gap-3",children:[E.jsx("div",{className:"mt-0.5 rounded-full bg-verify/15 p-2 text-verify",children:E.jsx(JP,{className:"h-4 w-4"})}),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsx("div",{className:"font-display text-sm font-medium text-ink",children:d.title}),E.jsx("p",{className:"mt-1 text-xs leading-relaxed text-ink-dim",children:d.body}),d.link_url?E.jsxs("a",{href:d.link_url,target:d.link_url.startsWith("http")?"_blank":void 0,rel:"noreferrer",className:"mt-2 inline-flex text-xs font-medium text-verify hover:underline",children:[d.link_label||"Learn more"," →"]}):null]}),E.jsx("button",{type:"button",onClick:()=>c(d.id),"aria-label":"Dismiss",className:"rounded-full p-1 text-ink-dim hover:bg-card hover:text-ink",children:E.jsx(sf,{className:"h-4 w-4"})})]}),i.length>1?E.jsxs("div",{className:"mt-2 text-right text-[10px] uppercase tracking-widest text-ink-dim",children:["+",i.length-1," more"]}):null]})})}const BU="/__l5e/assets-v1/1b32e7db-df3e-40e6-8805-0084ea419826/slab_front.png",HU={url:BU},qU="/__l5e/assets-v1/6414f117-104e-4608-b0d1-06168509bece/slab_back.png",FU={url:qU},to={x1:52/905,y1:354/1524,x2:852/905,y2:1460/1524};function VU(e){return e==null?"":e>=10?"GEM MINT":e>=9.5?"GEM":e>=9?"MINT":e>=8?"NM-MT":e>=7?"NM":e>=6?"EX-MT":"EX"}function ng(e){return new Promise(t=>{if(!e)return t(null);const n=new Image;n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=()=>t(null),n.src=e})}function GU(e,t,n,s){if(!t)return;const i=to.x1*n,l=to.y1*s,c=(to.x2-to.x1)*n,d=(to.y2-to.y1)*s,f=t.naturalWidth,h=t.naturalHeight;if(!f||!h)return;const g=f>h,m=i+c/2,v=l+d/2;if(e.save(),e.translate(m,v),g){e.rotate(Math.PI/2);const b=Math.min(c/h,d/f);e.drawImage(t,-f*b/2,-h*b/2,f*b,h*b)}else{const b=Math.min(c/f,d/h);e.drawImage(t,-f*b/2,-h*b/2,f*b,h*b)}e.restore()}function KU(e,t,n,s){if(t!=="front"||n==null)return;const i=n%1===0?n.toFixed(0):n.toFixed(1),l=VU(n),c=s?.toUpperCase()??"",d=150,f=180;e.save(),e.textAlign="center",e.textBaseline="middle",e.fillStyle="#ffffff",e.shadowColor="rgba(0,0,0,0.45)",e.shadowBlur=12,e.shadowOffsetY=2,l&&(e.font="32px Inter, system-ui, sans-serif",e.fillText(l,d,f-74)),e.font="84px Inter, system-ui, sans-serif",e.fillText(i,d,f),c&&(e.font="28px Inter, system-ui, sans-serif",e.fillText(c,d,f+72)),e.restore()}async function YU(e){const t=e.side==="front"?HU.url:FU.url,[n,s]=await Promise.all([ng(e.url??null),ng(t)]);if(!s)return null;const i=e.canvas??document.createElement("canvas"),l=s.naturalWidth||960,c=s.naturalHeight||1524;i.width=l,i.height=c;const d=i.getContext("2d");return d?(d.clearRect(0,0,l,c),GU(d,n,l,c),d.drawImage(s,0,0,l,c),KU(d,e.side,e.grade,e.certId),i):null}async function WU(e,t){const n=await ng(e??null);if(!n)return null;const s=n.naturalWidth,i=n.naturalHeight;if(!s||!i)return null;const l=t?Math.min(1,t/Math.max(s,i)):1,c=Math.round(s*l),d=Math.round(i*l),f=document.createElement("canvas"),h=c>d;f.width=h?d:c,f.height=h?c:d;const g=f.getContext("2d");
91return g?(g.fillStyle="#ffffff",g.fillRect(0,0,f.width,f.height),h?(g.translate(f.width/2,f.height/2),g.rotate(Math.PI/2),g.drawImage(n,-c/2,-d/2,c,d)):g.drawImage(n,0,0,c,d),f):null}function mB(e,t=.9){const n=document.createElement("canvas");n.width=e.width,n.height=e.height;const s=n.getContext("2d");if(!s)throw new Error("Canvas 2D context unavailable");s.fillStyle="#ffffff",s.fillRect(0,0,n.width,n.height),s.drawImage(e,0,0);const i=n.toDataURL("image/jpeg",t);return i.slice(i.indexOf(",")+1)}function QU({url:e,side:t="front",label:n,grade:s,certId:i,className:l}){const c=k.useRef(null),[d,f]=k.useState(!1);return k.useEffect(()=>{let h=!1;return f(!1),(async()=>{const g=c.current;if(!g)return;const m=await YU({url:e,side:t,grade:s,certId:i,canvas:g});h||!m||f(!0)})(),()=>{h=!0}},[e,t,s,i]),E.jsxs("div",{className:"relative mx-auto aspect-[960/1524] w-full overflow-hidden rounded-lg bg-stage "+(l??""),children:[E.jsx("canvas",{ref:c,className:"absolute inset-0 h-full w-full","aria-label":n??"Graded slab",role:"img"}),!d&&!e&&E.jsx("span",{className:"absolute inset-0 flex items-center justify-center font-mono text-[10px] text-muted-foreground",children:"No image"})]})}function ZU({url:e,alt:t,className:n,maxDim:s}){const i=k.useRef(null),[l,c]=k.useState(!1);return k.useEffect(()=>{let d=!1;c(!1),(async()=>{const h=i.current;if(!h||!e)return;
91const g=await WU(e,s);if(d||!g)return;h.width=g.width,h.height=g.height;const m=h.getContext("2d");m&&(m.drawImage(g,0,0),g.width=0,g.height=0,c(!0))})();const f=i.current;return()=>{d=!0,f&&(f.width=0,f.height=0)}},[e,s]),E.jsx("canvas",{ref:i,role:"img","aria-label":t,className:(n??"")+(l?"":" opacity-0")+" transition-opacity duration-300"})}function XU({reveal:e,onDismiss:t}){const[n,s]=k.useState(!1),i=e?.id??null,l=e?.fullGrade??0,c=l>=9.5,d=e?.fullGrade==null;k.useEffect(()=>{if(!i){s(!1);return}s(!1);const g=setTimeout(()=>s(!0),1050);return()=>{clearTimeout(g)}},[i]);const f=k.useMemo(()=>Array.from({length:64}).map((g,m)=>{const v=m/64*Math.PI*2+m%3*.12,b=260+m%9*42,S=m%4;return{i:m,dx:Math.cos(v)*b,dy:Math.sin(v)*b,rot:m*37%360,delay:.22+m%11*.028,size:6+m%5*2,shape:S,color:m%3===0?"var(--primary)":m%3===1?"color-mix(in oklab, var(--primary) 45%, white)":"color-mix(in oklab, var(--primary) 22%, gold)"}}),[]),h=k.useMemo(()=>Array.from({length:16}).map((g,m)=>({i:m,left:6+m*37%88,top:4+m*53%92,delay:.35+m%7*.16,size:6+m%3*5})),[]);return k.useEffect(()=>{if(!i)return;const g=m=>{m.key==="Escape"&&t()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[i,t]),!e||typeof document>"u"?null:rf.createPortal(E.jsxs("div",{onClick:g=>{g.target===g.currentTarget&&t()},className:"pointer-events-auto fixed inset-0 z-[120] flex items-center justify-center overflow-hidden px-3 py-4 backdrop-blur-md animate-fade-in sm:px-6",role:"status","aria-live":"polite",style:{background:"radial-gradient(circle at 18% 12%, color-mix(in oklab, var(--primary) 18%, transparent) 0 15%, transparent 32%), radial-gradient(circle at 50% 55%, color-mix(in oklab, var(--primary) 20%, transparent) 0 22%, transparent 58%), linear-gradient(135deg, color-mix(in oklab, var(--primary) 9%, var(--background)) 0%, var(--background) 48%, color-mix(in oklab, var(--primary) 14%, var(--background)) 100%)"},children:[E.jsx("span",{className:"pointer-events-none absolute inset-0 bg-white [animation:chck-flash_0.6s_ease-out_forwards]"}),e.fullGrade!=null&&E.jsx("span",{className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 select-none font-display font-light tabular-nums text-primary/10 [animation:chck-ghost_2s_ease-out_forwards]",style:{fontSize:"min(78vw, 44rem)",lineHeight:1,letterSpacing:"-0.05em"},"aria-hidden":!0,children:l.toFixed(1)}),E.jsx("span",{className:"pointer-events-none absolute left-1/2 top-1/2 h-[420px] w-[420px] -translate-x-1/2 -translate-y-1/2 rounded-full border border-primary/25 [animation:chck-ring_1.65s_ease-out_forwards] sm:h-[620px] sm:w-[620px]"}),E.jsx("span",{className:"pointer-events-none absolute left-1/2 top-1/2 h-[260px] w-[260px] -translate-x-1/2 -translate-y-1/2 rounded-full border border-primary/35 [animation:chck-ring_1.65s_ease-out_0.18s_forwards] sm:h-[420px] sm:w-[420px]"}),E.jsx("span",{className:"pointer-events-none absolute left-1/2 top-1/2 h-[160px] w-[160px] -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-primary/55 [animation:chck-ring_1.9s_ease-out_0.34s_forwards] sm:h-[280px] sm:w-[280px]"}),E.jsx("div",{className:"pointer-events-none absolute inset-0",children:h.map(g=>E.jsx(H_,{className:"absolute text-primary opacity-0 [animation:chck-twinkle_2.4s_ease-out_infinite]",style:{left:`${g.left}%`,top:`${g.top}%`,width:g.size,height:g.size,animationDelay:`${g.delay}s`,filter:"drop-shadow(0 0 8px currentColor)"}},g.i))}),E.jsx("div",{className:"pointer-events-none absolute inset-0",children:f.map(g=>E.jsx("span",{className:Nn("absolute left-1/2 top-1/2 opacity-0",g.shape===0?"rounded-full":g.shape===1?"rounded-[2px]":g.shape===2?"rounded-sm rotate-45":"rounded-full"),style:{width:g.size,height:g.shape===1?g.size*2:g.size,background:g.color,color:g.color,boxShadow:"0 0 18px currentColor",animation:`chck-burst 1.9s cubic-bezier(0.16,0.9,0.3,1) ${g.delay}s forwards`,"--dx":`${g.dx}px`,"--dy":`${g.dy}px`,"--rot":`${g.rot}deg`}},g.i))}),E.jsxs("div",{className:Nn("relative max-h-[calc(100vh-2rem)] w-full max-w-[560px] overflow-hidden rounded-[28px] border border-primary/55 bg-surface shadow-2xl","[animation:chck-panel_0.58s_cubic-bezier(0.18,1.22,0.32,1)_forwards]"),style:{boxShadow:"0 34px 120px -34px color-mix(in oklab, var(--primary) 72%, transparent), 0 0 0 1px color-mix(in oklab, var(--primary) 40%, transparent)"},children:[E.jsx("button",{type:"button",onClick:t,"aria-label":"Dismiss",className:"absolute right-3 top-3 z-20 inline-flex h-10 w-10 items-center justify-center rounded-full bg-surface/80 text-muted-foreground backdrop-blur transition hover:bg-card hover:text-foreground active:scale-95",children:E.jsx(sf,{className:"h-5 w-5"})}),E.jsxs("div",{className:"relative z-10 flex max-h-[calc(100vh-2rem)] flex-col items-center overflow-y-auto px-5 pb-6 pt-8 text-center sm:px-8 sm:pb-8 sm:pt-10",children:[E.jsxs("div",{className:"mono-eyebrow flex items-center gap-2 text-primary",style:{letterSpacing:"0.34em"},children:[E.jsx(H_,{className:"h-3.5 w-3.5"}),d?"Card Ready":"Grade Ready"]}),E.jsxs("div",{className:"relative mt-6 sm:mt-7",children:[E.jsx("span",{className:"pointer-events-none absolute -inset-10 -z-10 rounded-[36px] bg-primary/20 blur-3xl [animation:chck-glow_1.35s_ease-out_infinite_alternate]"}),E.jsxs("div",{className:"relative w-[min(64vw,300px)] [animation:chck-slab-drop_0.72s_cubic-bezier(0.16,1.28,0.34,1)_forwards]",style:{filter:"drop-shadow(0 30px 44px color-mix(in oklab, var(--foreground) 32%, transparent))"},children:[d?E.jsx(ZU,{url:e.thumbnailUrl,alt:"Identified card",className:"h-auto w-full rounded-lg"}):E.jsx(QU,{url:e.thumbnailUrl,side:"front",grade:e.fullGrade,certId:e.slug,label:"Graded slab"}),E.jsxs("div",{className:"pointer-events-none absolute inset-0 overflow-hidden rounded-lg",children:[E.jsx("div",{className:"absolute -left-1/2 top-0 h-full w-1/2 skew-x-[-18deg] bg-white/40 [animation:chck-shine_1.4s_ease-out_0.35s_forwards]"}),E.jsx("div",{className:"absolute -left-1/2 top-0 h-full w-1/3 skew-x-[-18deg] bg-gradient-to-r from-transparent via-white/45 to-transparent [animation:chck-shine-loop_3.4s_ease-in-out_1.8s_infinite]"})]})]})]}),E.jsxs("div",{className:Nn("mt-6 inline-flex items-center gap-2 rounded-full border border-primary/60 bg-primary/10 px-4 py-1.5 text-[11px] font-semibold uppercase text-primary transition-all duration-300",n?"scale-100 opacity-100":"scale-110 opacity-0"),style:{letterSpacing:"0.26em",boxShadow:n?"0 0 26px color-mix(in oklab, var(--primary) 55%, transparent)":void 0},children:[E.jsx(yE,{className:"h-3.5 w-3.5"}),d?"Card Certified":c?"Gem Mint · Certified":"Grade Certified"]}),E.jsxs(Je,{to:"/c/$slug",params:{slug:e.slug},onClick:t,className:"glow-green mt-7 inline-flex w-full max-w-[620px] items-center justify-center gap-2 rounded-full bg-primary px-6 py-4 text-base font-medium text-primary-foreground transition hover:brightness-110",children:["View report",E.jsx(vE,{className:"h-4 w-4"})]})]})]}),E.jsx("style",{children:`
92        @keyframes chck-flash {
93          0%   { opacity: 0.9; }
94          100% { opacity: 0; }
95        }
96        @keyframes chck-ghost {
97          0%   { transform: translate(-50%, -50%) scale(0.4);
97 opacity: 0; }
98          35%  { transform: translate(-50%, -50%) scale(1.08); opacity: 0.9; }
99          100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
100        }
101        @keyframes chck-twinkle {
102          0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
103          50%      { opacity: 1; transform: scale(1) rotate(45deg); }
104        }
105        @keyframes chck-panel {
106          0%   { transform: translateY(24px) scale(0.9); opacity: 0; filter: blur(8px); }
107          58%  { transform: translateY(0) scale(1.018); opacity: 1; filter: blur(0); }
108          100% { transform: translateY(0) scale(1); opacity: 1; }
109        }
110        @keyframes chck-ring {
111          0%   { transform: translate(-50%, -50%) scale(0.35); opacity: 0.9; }
112          100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
113        }
114        @keyframes chck-burst {
115          0%   { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
116          100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.35) rotate(var(--rot)); opacity: 0; }
117        }
118        @keyframes chck-slab-drop {
119          0%   { transform: translateY(60px) rotate(-9deg) scale(0.68); opacity: 0; }
120          45%  { transform: translateY(-8px) rotate(3deg) scale(1.08); opacity: 1; }
121          72%  { transform: translateY(2px) rotate(-1.5deg) scale(0.98); }
122          100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
123        }
124        @keyframes chck-shine {
125          0%   { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
126          25%  { opacity: 0.9; }
127          100% { transform: translateX(360%) skewX(-18deg); opacity: 0; }
128        }
129        @keyframes chck-shine-loop {
130          0%, 55%  { transform: translateX(-140%) skewX(-18deg); opacity: 0; }
131          65%      { opacity: 0.55; }
132          100%     { transform: translateX(360%) skewX(-18deg); opacity: 0; }
133        }
134        @keyframes chck-grade-lock {
135          0%   { transform: scale(1); }
136          30%  { transform: scale(1.24); text-shadow: 0 0 32px color-mix(in oklab, var(--primary) 95%, transparent); }
137          100% { transform: scale(1); }
138        }
139        @keyframes chck-glow {
140          0%   { opacity: 0.5; transform: scale(0.96); }
141          100% { opacity: 0.9; transform: scale(1.06); }
142        }
143        @media (prefers-reduced-motion: reduce) {
144          [style*="chck-"], [class*="chck-"] { animation-duration: 0.01s !important; }
145        }
146      `})]}),document.body)}const uT="chck:grade-reveal:shown";function zS(){if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(uT);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function JU(e){if(!(typeof window>"u"))try{const t=Array.from(e).slice(-500);window.localStorage.setItem(uT,JSON.stringify(t))}catch{}}function ez(){const[e,t]=k.useState(null),n=k.useRef(null);return k.useEffect(()=>{n.current=zS();const s=i=>{const l=i.detail;if(!l||!l.id||!l.slug)return;const c=n.current??zS();n.current=c,!c.has(l.id)&&(c.add(l.id),JU(c),t(l))};return window.addEventListener("chck:grade-reveal",s),()=>window.removeEventListener("chck:grade-reveal",s)},[]),E.jsx(XU,{reveal:e,onDismiss:()=>t(null)})}function tz(){return E.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 py-24",children:E.jsx("div",{className:"w-full max-w-lg",children:E.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-rule bg-surface p-8 shadow-[0_30px_80px_-40px_rgba(0,0,0,0.35)]",children:[E.jsx("div",{className:"absolute inset-x-0 top-0 h-[3px] bg-gradient-to-r from-transparent via-verify to-transparent opacity-80"}),E.jsxs("div",{className:"flex items-center justify-between font-mono text-[10px] uppercase tracking-[0.22em] text-ink-dim",children:[E.jsx("span",{children:"chck.ai · certificate"}),E.jsx("span",{children:"#404"})]}),E.jsxs("div",{className:"mt-8 flex items-end justify-between gap-6",children:[E.jsxs("div",{children:[E.jsx("div",{className:"mono-eyebrow",children:"Grade"}),E.jsx("div",{className:"mt-1 font-display text-7xl font-light leading-none tabular-nums text-ink",children:"N/A"})]}),E.jsxs("div",{className:"text-right",children:[E.jsx("div",{className:"mono-eyebrow",children:"Status"}),E.jsx("div",{className:"mt-1 font-mono text-sm text-warn",children:"NOT FOUND"})]})]}),E.jsxs("div",{className:"mt-8 border-t border-rule pt-4",children:[E.jsx("h1",{className:"font-display text-xl text-ink",children:"This card isn't in the registry."}),E.jsx("p",{className:"mt-2 text-sm text-ink-dim",children:"The page you tried to open doesn't exist or was moved. Search the registry or head home."})]}),E.jsxs("div",{className:"mt-6 flex flex-wrap gap-2",children:[E.jsx(Je,{to:"/",className:"inline-flex items-center justify-center rounded-full bg-verify px-4 py-2 text-sm font-semibold text-[color:var(--ver
146ify-fg)] transition hover:brightness-110",children:"Go home"}),E.jsx(Je,{to:"/search",className:"inline-flex items-center justify-center rounded-full border border-rule bg-surface px-4 py-2 text-sm font-medium text-ink transition hover:bg-[color:var(--bg-2)]",children:"Search the registry"})]})]})})})}function nz({error:e,reset:t}){console.error(e);const n=It();return k.useEffect(()=>{Q5(e,{boundary:"tanstack_root_error_component"})},[e]),E.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:E.jsxs("div",{className:"max-w-md text-center",children:[E.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),E.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),E.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[E.jsx("button",{onClick:()=>{n.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),E.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const ot=Tj()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"CHCK.AI Grading"},{name:"description",content:"CHCK.AI Grading transforms your card collection into actionable selling insights and a verifiable digital certificate."},{name:"author",content:"Chck.ai"},{property:"og:title",content:"CHCK.AI Grading"},{property:"og:description",content:"CHCK.AI Grading transforms your card collection into actionable selling insights and a verifiable digital certificate."},{property:"og:type",content:"website"},{property:"og:site_name",content:"chck.ai"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:site",content:"@chckai"},{name:"twitter:title",content:"CHCK.AI Grading"},{name:"twitter:description",content:"CHCK.AI Grading transforms your card collection into actionable selling insights and a verifiable digital certificate."}],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=Manrope:wght@300;400;500;600;700&family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap"},{rel:"stylesheet",href:W5},{rel:"icon",type:"image/png",href:"/favicon.png"},{rel:"apple-touch-icon",href:"/favicon.png"}],scripts:[{children:OP},{children:"
vendor: 388 bytes, line 146
146!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init','
1461038534278721127
vendor: 27 bytes, line 146
146');fbq('track','PageView');
146"},{async:!0,src:"https://www.googletagmanager.com/gtag/js?id=G-5PDWWJEE42"},{children:"
vendor: 118 bytes, line 146
146window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','
146G-5PDWWJEE42
vendor: 3 bytes, line 146
146');
146"},{children:'(function(c,l,a,r,i,t,y){c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);})(window, document, "clarity", "script", "xpp3qpqnl2");'},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@graph":[{"@type":"Organization",name:"chck.ai",url:"https://chck.ai",logo:"https://chck.ai/favicon.png",sameAs:["https://twitter.com/chckai"]},{"@type":"WebSite",name:"chck.ai",url:"https://chck.ai",potentialAction:{"@type":"SearchAction",target:"https://chck.ai/search?q={search_term_string}","query-input":"required name=search_term_string"}}]})}]}),shellComponent:rz,component:sz,notFoundComponent:tz,errorComponent:nz});function rz({children:e}){return E.jsxs("html",{lang:"en",children:[E.jsx("head",{children:E.jsx(Fj,{})}),E.jsxs("body",{children:[e,E.jsx(Gj,{})]})]})}function sz(){const{queryClient:e}=ot.useRouteContext(),t=Ex({select:s=>s.location.pathname});k.useEffect(()=>{$8()},[t]),k.useEffect(()=>{const{data:s}=ir.auth.onAuthStateChange(i=>{if(i!=="SIGNED_IN")return;const l=kR();l&&TR({data:{code:l}}).then(()=>AR()).catch(()=>{})});return()=>s.subscription.unsubscribe()},[]);const n=k.useRef(null);return k.useEffect(()=>{if(n.current===null){n.current=t;return}n.current!==t&&(n.current=t,uE())},[t]),k.useEffect(()=>{if(typeof window>"u")return;const s=new URLSearchParams(window.location.search),i=s.get("code"),l=s.get("state");i&&l&&l.includes(".")&&!window.location.pathname.startsWith("/auth")&&!window.location.pathname.startsWith("/api/public/ebay/callback")&&window.location.replace(`/api/public/ebay/callback${window.location.search}`)},[t]),E.jsx(P5,{client:e,children:E.jsx(NP,{children:E.jsxs(tP,{children:[E.jsx(IU,{sticky:t!=="/docs/api"}),E.jsx(Sx,{}),!["/grade","/chck"].includes(t)&&E.jsx($U,{}),E.jsx(ez,{}),E.jsx(CP,{})]})})})}const az="modulepreload",iz=function(e){return"/"+e},$S={},Oe=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let f=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");i=f(n.map(h=>{if(h=iz(h),h in $S)return;$S[h]=!0;const g=h.endsWith(".css"),m=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const v=document.createElement("link");if(v.rel=g?"stylesheet":az,g||(v.as="script"),v.crossOrigin="",v.href=h,d&&v.setAttribute("nonce",d),document.head.appendChild(v),g)return new Promise((b,S)=>{v.addEventListener("load",b),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},oz=()=>Oe(()=>import("./index-Cfv_6rr_.js"),__vite__mapDeps([0,1,2,3,4,5])),lz=qe()({head:()=>({meta:[{title:"Quick CHCK — Instant card grading in seconds · chck.ai"},{name:"description",content:"Grade your trading cards from two photos in seconds. Instant condition read, no mailing, no waiting — with a full CHCK certification path when you need it."},{property:"og:title",content:"Quick CHCK — Instant card grading in seconds"},{property:"og:description",content:"Two photos in. Instant grade out. Quick CHCK is the fast lane — Full CHCK is the certification-grade path."},{property:"og:url",content:"https://chck.ai/"},{property:"og:image",content:"https://chck.ai/__l5e/assets-v1/98f2ca6c-107a-4a71-a2a1-f82e081e82ef/og-cover.jpg"},{property:"og:image:width",content:"1200"},{property:"og:image:height",content:"630"},{property:"og:image:alt",content:"chck.ai — instant card grading"},{name:"twitter:image",content:"https://chck.ai/__l5e/assets-v1/98f2ca6c-107a-4a71-a2a1-f82e081e82ef/og-cover.jpg"}],links:[{rel:"canonical",href:"https://chck.ai/"}]}
146),component:Ce(oz,"component")}),cz=()=>Oe(()=>import("./route-BNr1g9jV.js"),[]),uz=qe()({beforeLoad:async()=>{const{data:e,error:t}=await ir.auth.getUser();if(t||!e.user)throw Vn({to:"/"});return{user:e.user}},component:Ce(cz,"component")}),dz=()=>Oe(()=>import("./about-vzHkHzvL.js"),__vite__mapDeps([6,3,7,8,9,10])),fz=qe()({head:()=>({meta:[{title:"About · chck.ai"},{name:"description",content:"From IAC incubator to Shoebox to chck.ai — the AI condition layer for collectibles and high-value physical assets."},{property:"og:title",content:"About chck.ai"},{property:"og:description",content:"The chck.ai story: smartphone-first digital grading, real-time market intelligence, and the future of condition confidence."},{property:"og:url",content:"https://chck.ai/about"}],links:[{rel:"canonical",href:"https://chck.ai/about"}]}),component:Ce(dz,"component")}),hz=()=>Oe(()=>import("./auth-DcJekkJL.js"),[]),pz=qe()({validateSearch:e=>({redirect:typeof e.redirect=="string"?e.redirect:void 0}),head:()=>({meta:[{title:"Sign in · chck.ai"},{name:"robots",content:"noindex,nofollow"}]}),component:Ce(hz,"component")}),mz=he({method:"GET"}).handler(pe("6351dd567a2efc370b72d7b188a5a7a689d6b683e5e6c83ee4efd518cc34e526")),gz=he({method:"GET"}).handler(pe("4995d7bffebb9ed4a92f02657e6deee80fdcb2564ff34f71858c78610a528be4")),gB=he({method:"GET"}).middleware([Ae]).handler(pe("54472cf223af013e5b03020faae365cbbe245ace9eedcc75d3a9cccbee08c08b")),yB=he({method:"POST"}).middleware([Ae]).handler(pe("46f46ca645508c38219ef28dcd3a8d6dcf0e7afa7e96d1a8eb04cef515591a34")),vB=he({method:"POST"}).middleware([Ae]).handler(pe("44a2caf0dd6bfdcc451728fdea2f8bb09c27f85093227f8038b99248f7362698")),bB=he({method:"POST"}).middleware([Ae]).handler(pe("c0032371b30d01ed67079c505e1fa8609b66dddaa3bc1f755b249b54994afeec")),yz={queryKey:["blog","posts"],queryFn:()=>mz(),staleTime:6e4},vz=()=>Oe(()=>import("./blog-DVrvFYID.js"),[]),bz=()=>Oe(()=>import("./blog-DsI6VAR_.js"),[]),wz=()=>Oe(()=>import("./blog-hexW2b11.js"),__vite__mapDeps([11,12,3])),_z=qe()({head:()=>({meta:[{title:"Blog · chck.ai"},{name:"description",content:"Grading insights, market notes, and product updates from the CHCK team — written for collectors."},{property:"og:title",content:"CHCK Blog — grading and market insights"},{property:"og:description",content:"Grading insights, market notes, and product updates from the CHCK team."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://chck.ai/blog"}]}),loader:({context:e})=>e.queryClient.ensureQueryData(yz),component:Ce(wz,"component"),errorComponent:Ce(bz,"errorComponent"),notFoundComponent:Ce(vz,"notFoundComponent")}),Sz=()=>Oe(()=>import("./cert-8DK-a6ig.js"),__vite__mapDeps([13,14,3])),xz=qe()({head:()=>({meta:[{title:"Cert Verification — look up a PSA or CHCK cert number"},{name:"description",content:"Search PSA's certification database and the CHCK registry by cert number. See grade, label, population and front/back card images."},{property:"og:title",content:"Cert Verification — PSA & CHCK lookup"},{property:"og:description",content:"Enter a PSA or CHCK cert number to verify a graded card and view its grade, images and details."},{property:"og:type",content:"website"},{property:"og:url",content:"https://chck.ai/cert"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://chck.ai/cert"}]}),component:Ce(Sz,"component")}),Ez=()=>Oe(()=>import("./chck-C5F8etJa.js"),__vite__mapDeps([15,16,17,9,5,18,19,3])),Rz=qe()({head:()=>({meta:[{title:"Scan a card — instant card identification · chck.ai"},{name:"description",content:"Snap or upload two photos and CHCK identifies the player, set, number and current market value in seconds."},{property:"og:title",content:"Scan a card — chck.ai"},{property:"og:description",content:"Identify any trading card from two photos, with live market pricing."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]}),component:Ce(Ez,"component")}),Tz=()=>Oe(()=>import("./deals-DVrvFYID.js"),[]),kz=()=>Oe(()=>import("./deals-tFgE8Joj.js"),[]),Az=()=>Oe(()=>import("./deals-CqZoiziT.js"),__vite__mapDeps([20,3,14,2,21,22,23])),Cz=qe()({head:()=>({meta:[{title:"Deals · chck.ai"},{name:"description",content:"Live graded card auctions and Buy Now listings from eBay — filter by sport, price, and listings ending within 24 hours."}
146,{property:"og:title",content:"Live card deals · chck.ai"},{property:"og:description",content:"Graded card listings ending within 24 hours, sorted by demand and price."},{property:"og:url",content:"https://chck.ai/deals"}],links:[{rel:"canonical",href:"https://chck.ai/deals"}]}),component:Ce(Az,"component"),errorComponent:Ce(kz,"errorComponent"),notFoundComponent:Ce(Tz,"notFoundComponent")}),Oz=()=>Oe(()=>import("./feed-DVEihelt.js"),__vite__mapDeps([24,25,4,26,3,27,28])),Nz=qe()({head:()=>({meta:[{title:"Feed — freshly graded cards on chck.ai"},{name:"description",content:"Browse the newest chck.ai grades. High-grade, high-value cards showcased in slab with live market estimates."},{property:"og:title",content:"Feed — freshly graded cards on chck.ai"},{property:"og:description",content:"Browse the newest chck.ai grades. High-grade, high-value cards showcased in slab with live market estimates."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]}),component:Ce(Oz,"component")}),jz=()=>Oe(()=>import("./pricing-xiWm-k04.js"),__vite__mapDeps([29,14,30,3,31,22,5])),Dz=qe()({head:()=>({meta:[{title:"Pricing · One month of Pro grading free · chck.ai"},{name:"description",content:"Claim one month of Pro grading free through Sep 30 — 50 grades, sub-grades, certificates and eBay listing. Renews at $29/mo, cancel anytime."},{property:"og:title",content:"Pricing · One month of Pro grading free · chck.ai"},{property:"og:description",content:"New and existing members can opt into a free month of Pro grading through Sep 30. Card required, cancel anytime."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]}),validateSearch:e=>({promo:typeof e.promo=="string"?e.promo:void 0}),component:Ce(jz,"component")}),Pz=()=>Oe(()=>import("./privacy-3FolJIo2.js"),__vite__mapDeps([32,3])),Mz=qe()({head:()=>({meta:[{title:"Privacy Policy · chck.ai"},{name:"description",content:"How chck.ai collects, uses, and protects your account, uploaded and imported card images, and billing data."},{property:"og:title",content:"Privacy Policy · chck.ai"},{property:"og:description",content:"Privacy Policy for chck.ai."},{property:"og:url",content:"https://chck.ai/privacy"}],links:[{rel:"canonical",href:"https://chck.ai/privacy"}]}),component:Ce(Pz,"component")}),Lz=()=>Oe(()=>import("./reset-password-qnAZQ7FJ.js"),__vite__mapDeps([33,34])),Iz=qe()({head:()=>({meta:[{title:"Reset password — CHCK"},{name:"description",content:"Set a new password for your CHCK account."},{property:"og:title",content:"Reset password — CHCK"},{property:"og:description",content:"Set a new password for your CHCK account."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ce(Lz,"component")}),Uz=()=>Oe(()=>import("./search-DKcQduXZ.js"),__vite__mapDeps([35,14,1,2,3,31])),zz=qe()({head:()=>({meta:[{title:"Search the chck.ai registry"},{name:"description",content:"Search verified chck.ai certificates by player, year, set, or slug."},{property:"og:title",content:"Search the chck.ai registry"},{property:"og:description",content:"Search verified chck.ai certificates by player, year, set, or slug."},{property:"og:url",content:"https://chck.ai/search"}],links:[{rel:"canonical",href:"https://chck.ai/search"}]}),component:Ce(Uz,"component")}),$z=()=>Oe(()=>import("./services-D8Qc6u3I.js"),__vite__mapDeps([36,3,7,8,5,9,10])),Bz=qe()({head:()=>({meta:[{title:"Services — Quick CHCK & Full CHCK · chck.ai"},{name:"description",content:"Two tools, two moments. Quick CHCK for instant decisions in seconds. Full CHCK for certification-level grading confidence with 18 guided images."},{property:"og:title",content:"Services — Decision Intelligence vs Certification-Level Intelligence"},{property:"og:description",content:"Quick CHCK answers 'Should I care about this card?' Full CHCK answers 'Exactly what is this card's condition?'"},{property:"og:url",content:"https://chck.ai/services"}],links:[{rel:"canonical",href:"https://chck.ai/services"}]}),component:Ce($z,"component")}),Hz=()=>Oe(()=>import("./support-CeYyCQN3.js"),__vite__mapDeps([37,3,38,5,39])),wB="[email protected]",qz=qe()({head:()=>({meta:[{title:"Support & Help Center · chck.ai"},{name:"description",content:"Get help with chck.ai card grading: credits and billing, grades in progress, eBay listings, promo codes, and account questions. Email [email protected]."},{property:"og:title",content:"Support & Help Center · chck.ai"},{property:"og:description",content:"Answers to common chck.ai questions plus a direct line to our team at [email protected]."},{property:"og:type",content:"website"},{property:"og:url",content:"https://chck.ai/support"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Support & Help Center · chck.ai"},{name:"twitter:description",content:"Answers to common chck.ai questions plus a direct line to our team."}],links:[{rel:"canonical",href:"https://chck.ai/support"}]}),component:Ce(Hz,"component")}),Fz=()=>Oe(()=>import("./terms-CDsPuNTW.js"),__vite__mapDeps([40,3])),Vz=qe()({head:()=>({meta:[{title:"Terms of Service · chck.ai"},{name:"description",content:"Terms governing use of chck.ai grading, certificates, marketplace imports, subscriptions, and permitted use of chck.ai grades."},{property:"og:title",content:"Terms of Service · chck.ai"},{property:"og:description",content:"Terms of Service for chck.ai."},{property:"og:url",content:"https://chck.ai/terms"}],links:[{rel:"canonical",href:"https://chck.ai/terms"}]}
146),component:Ce(Fz,"component")}),Gz=()=>Oe(()=>import("./try-Cb6X97tn.js"),__vite__mapDeps([41,42,16,17,9,5,18,25,4,26,43,8,3,10])),Kz=qe()({head:()=>({meta:[{title:"Grade a card free · CHCK"},{name:"description",content:"Snap the front and back of any trading card and get an instant condition grade, sub-grades and market value. One free grade, no account needed."},{property:"og:title",content:"Grade a card free"},{property:"og:description",content:"Two photos in, instant grade out. Free instant card grading with sub-grades and market value from CHCK."},{property:"og:type",content:"website"},{property:"og:url",content:"https://chck.ai/try"},{property:"og:image",content:"https://chck.ai/__l5e/assets-v1/98f2ca6c-107a-4a71-a2a1-f82e081e82ef/og-cover.jpg"},{name:"twitter:image",content:"https://chck.ai/__l5e/assets-v1/98f2ca6c-107a-4a71-a2a1-f82e081e82ef/og-cover.jpg"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:"https://chck.ai/try"}]}),component:Ce(Gz,"component")}),Yz=he({method:"GET"}).handler(pe("5edae73f5e59b2882033c43b9b061aa8c0b828f2fcecb8837370b7fa8eb340ae")),_B=he({method:"GET"}).handler(pe("5b1bbd357250c433a66898e60bf8feba2e68184f9876d0fdad327a541bf3026b")),SB=he({method:"GET"}).handler(pe("1f6761aef3d37e0a06f3cbaba6a36c99022f9f5b23ca86dee5cddc55c166d2e0")),xB=he({method:"GET"}).handler(pe("0bd9afad3d506fddca7ece848280698758bc388a961e314b1607b1c480f37ac3")),EB=he({method:"POST"}).middleware([Ae]).handler(pe("d6b68ab4bb5cdefb9f69ec44beb3adf681be966e1d65bc63ad62d66e9fdc47a3")),Wz=he({method:"GET"}).middleware([Ae]).handler(pe("2d940fd3e54f5987af421e3039fa4171938897ff1ea6ee6d0a1136ab560dcba7"));he({method:"POST"}).middleware([Ae]).handler(pe("1afc527db9fd4a1124e8a9a3f25b6349eaee0b8c5a4b18ea0f526110cb56c4b7"));he({method:"POST"}).middleware([Ae]).handler(pe("9c2ffb60d5167875997842b030689bd46c6fb74e1d38c3bc719482fb60c71039"));he({method:"POST"}).middleware([Ae]).handler(pe("ce860d03e2bb6cdedba1405335548bb9e66f1bea1a9e35404260f6c74d3ca930"));he({method:"POST"}).middleware([Ae]).handler(pe("64f4256f2da56ca31354c612985d299f04047b055c2830713fe4cdc1c405276b"));const RB=he({method:"GET"}).handler(pe("a9750b5a6793a4da632b1042b78b6258d4645aff0d0a97571a8381b29d63b0fd")),TB=he({method:"POST"}).middleware([Ae]).handler(pe("52d68ce989fc55a056683cfe59a320b29b9e87c932996f915bd5273f52dfa686")),kB=he({method:"POST"}).middleware([Ae]).handler(pe("a4a7ebc91bd532e773672a528f240b5ac9055a901e02b7a2882403e839077180")),Qz=he({method:"GET"}).middleware([Ae]).handler(pe("f096219cbc60118eacf39205b6df0dccd3285491febc4d043f29dab7caf1cb87")),AB=he({method:"GET"}).middleware([Ae]).handler(pe("473da437d093e2e7552a914bcc03847b9076deff0df67bba29bc0f92ba527f96")),CB=he({method:"POST"}).middleware([Ae]).handler(pe("f5f6034a2099d734cca4287b8a28338f6eea08fb267d21166658011b60d8575c")),Zz=()=>({queryKey:["account-summary"],queryFn:()=>qg()}),Xz=()=>({queryKey:["my-claims"],queryFn:()=>Wz()}),Jz=()=>({queryKey:["my-ebay-listings"],queryFn:()=>Qz()}),e9=()=>Oe(()=>import("./account-pDzqN8S7.js"),[]),t9=()=>Oe(()=>import("./account-HeBPV7kQ.js"),[]),n9=()=>Oe(()=>import("./account-BZDx8Obe.js"),__vite__mapDeps([44,12,14,30,45,3,46,22,5,26,39,19,2,47,43])),r9=qe()({head:()=>({meta:[{title:"Your collection · chck.ai"},{name:"robots",content:"noindex,nofollow"}]}),loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Zz()),e.queryClient.ensureQueryData(Xz()),e.queryClient.ensureQueryData(Jz())])},component:Ce(n9,"component"),errorComponent:Ce(t9,"errorComponent"),notFoundComponent:Ce(e9,"notFoundComponent")}),s9=he({method:"GET"}).middleware([Ae]).handler(pe("8e744634f5a52142596da1f1a6dc78cd9280f76580b0c696812f6d6e1c761cd2")),OB=he({method:"GET"}).middleware([Ae]).handler(pe("e3d5ce680e633cacd622286d7ab5051141bafad969660676ec16532485ccdb9a")),NB=he({method:"GET"}).middleware([Ae]).handler(pe("e1b48da0cb3d389898f625e2d6e2bebd8dd25008da1f8ee8e2497ba1b910ff92")),jB=he({method:"GET"}).middleware([Ae]).handler(pe("ec9df75cf548fd274b41e53385125aa2607395eef996f89c5c349cbdc475b0b0")),DB=he({method:"POST"}).middleware([Ae]).handler(pe("a18e5b931b6587550ad5dbc8f1802f67e11b8729cc38e4eef7502c833f81b442")),PB=he({method:"GET"}).middleware([Ae]).handler(pe("6e6ecaf7f83c459210eac500b14c5ff4af1d62a765d4abb2094d3d0bb67bc5d3")),MB=he({method:"POST"}).middleware([Ae]).handler(pe("098f14508e524b1491ba9130ad87748103316d1d4afed44fd81da2a0f4650e24")),hf=he({method:"GET"}).middleware([Ae]).handler(pe("3053fb621d2b4b0b86bc7320f84d78cd31395e7319518b8f06f340fbb4faedd3")),a9=he({method:"GET"}).middleware([Ae]).handler(pe("960c65a0f67790c86f410e52587576d951ef644e167aeb9f4308cca9311095e9")),LB=he({method:"POST"}).middleware([Ae]).handler(pe("17934a9f7f0896288a54acdd8830fb5d3d193b6873507cb19027e80278c2f9fa")),IB=he({method:"GET"}).middleware([Ae]).handler(pe("7cc0579fd60ec528f6122c221b674d8f00f576cad8aa6c310f324e1b6ff6e8fb")),UB=he({method:"GET"}).middleware([Ae]).handler(pe("90c9e095a65c7f2ed67be65425b92f9f1614f7cae6535054fb1db6bbe4408786")),zB=he({method:"GET"}).middleware([Ae]).handler(pe("9dcbf2ab2a68fe1de77412495612abf38013245af4738acdf1fe678c03390b5e")),$B=he({method:"GET"}).middleware([Ae]).handler(pe("1ff91621dc84266cdae16d566bf3b69aee5bda256af8280c24cb2eb51c8767fd")),BB=he({method:"GET"}).middleware([Ae]).handler(pe("d0ff68b30a1e9d92edf4786e55fd5395cdc8cf5f3e85413cb5c32be5d1a5f7a7")),i9=()=>({queryKey:["admin","stats"],queryFn:()=>s9()}),o9=()=>Oe(()=>import("./admin-Rm320dOW.js"),[]),l9=()=>Oe(()=>import("./admin-MV419bYn.js"),[]),c9=()=>Oe(()=>import("./admin-CnwN4gdm.js"),__vite__mapDeps([48,12,14,3,31,5])),u9=qe()({head:()=>({meta:[{title:"Admin · chck.ai"},{name:"robots",content:"noindex,nofollow"}]}),beforeLoad:async()=>{try{const{isAdmin:e}=await hf();if(!e)throw Vn({to:"/account"})}catch(e){throw e&&typeof e=="object"&&"to"in e?e:Vn({to:"/account"})}},loader:async({context:e})=>{await e.queryClient.ensureQueryData(i9())},component:Ce(c9,"component"),errorComponent:Ce(l9,"errorComponent"),notFoundComponent:Ce(o9,"notFoundComponent")}),d9=qe()({beforeLoad:()=>{throw Vn({to:"/account"})}}),f9=3,h9=()=>Oe(()=>import("./feedback-DHRJB2qh.js"),__vite__mapDeps([49,50,51])),p9=qe()({head:()=>({meta:[{title:`CHCK Product Survey — Earn ${f9} Free Grades`},{name:"description",content:"Share feedback on CHCK grading, pricing and app experience. Complete the short survey once and get 3 free grades credited to your account."},{property:"og:title",content:"CHCK Product Survey"},{property:"og:description",content:"Answer 5 quick questions about CHCK and earn 3 free grades."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"robots",content:"noindex"}
146]}),component:Ce(h9,"component")}),m9=()=>Oe(()=>import("./rewards-BDS63cHt.js"),__vite__mapDeps([52,14,53,31,28])),g9=qe()({head:()=>({meta:[{title:"Rewards & points · chck.ai"},{name:"description",content:"Track your CHCK reward points: daily check-ins, gem grade bonuses, high-value card bonuses, and redeem points for grade credits."},{property:"og:title",content:"Rewards & points · chck.ai"},{property:"og:description",content:"Earn points for check-ins, gem grades and high-value cards — redeem them for grades."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ce(m9,"component")}),y9=()=>Oe(()=>import("./auth.callback-Be8AL8mI.js"),[]),v9=qe()({component:Ce(y9,"component")}),b9=()=>Oe(()=>import("./blog_._slug-8_vwhaly.js"),[]),w9=()=>Oe(()=>import("./blog_._slug-DLa3PuIJ.js"),[]),_9=()=>Oe(()=>import("./blog_._slug-DfhTnSzc.js"),__vite__mapDeps([54,3,55,31])),S9=qe()({loader:async({params:e})=>{const t=await gz({data:{slug:e.slug}});if(!t)throw qS();return t},head:({loaderData:e})=>{const t=e,n=t?`${t.title} · CHCK Blog`:"Article · CHCK Blog",s=t?.excerpt??"Grading insights and market notes from the CHCK team.",i=t?.coverImageUrl?`https://chck.ai${t.coverImageUrl}`:null;return{meta:[{title:n},{name:"description",content:s},{property:"og:title",content:t?.title??"CHCK Blog"},{property:"og:description",content:s},{property:"og:type",content:"article"},{name:"twitter:card",content:"summary_large_image"},...i?[{property:"og:image",content:i},{name:"twitter:image",content:i}]:[]]}},component:Ce(_9,"component"),errorComponent:Ce(w9,"errorComponent"),notFoundComponent:Ce(b9,"notFoundComponent")}),x9=he({method:"GET"}).handler(pe("ad7c66171b2cf34023bdc796737547cd1502264d66c2cec2ec3821b2875d82b1")),E9=e=>({queryKey:["certificate",e],queryFn:()=>Yz({data:{slug:e}})}),R9=e=>({queryKey:["certificate-enrichment",e],queryFn:()=>x9({data:{slug:e}})}),T9=()=>Oe(()=>import("./mermaid-GHXKKRXX-CSQDh6oq.js").then(e=>e.c),__vite__mapDeps([56,12,14,46,45,22,5,26,39,3,57,25,4,21,38,23,2,28,18,50,51,27,47,31])),k9=()=>Oe(()=>import("./c._slug-CI9VX8Qw.js"),[]),A9=()=>Oe(()=>import("./c._slug-DHCy91hp.js"),[]),C9=qe()({validateSearch:e=>({from:e.from==="account"?"account":e.from==="feed"?"feed":void 0}),loader:async({params:e,context:t})=>{if(!await t.queryClient.ensureQueryData(E9(e.slug)))throw qS();t.queryClient.prefetchQuery(R9(e.slug))},head:({params:e})=>({meta:[{title:`Certificate ${e.slug} — chck.ai`},{name:"description",content:`Verified chck.ai grading certificate ${e.slug} — sub-grades, centering measurements, damage evidence, and market value.`},{property:"og:title",content:`chck.ai certificate ${e.slug}`},{property:"og:description",content:"View this card's grade."},{property:"og:type",content:"article"},{property:"og:url",content:`https://chck.ai/c/${e.slug}`}],links:[{rel:"canonical",href:`https://chck.ai/c/${e.slug}`}]}),notFoundComponent:Ce(A9,"notFoundComponent"),errorComponent:Ce(k9,"errorComponent"),component:Ce(T9,"component")}),O9=()=>Oe(()=>import("./docs.api-B5qWb0cp.js"),__vite__mapDeps([58,3,50,26,10,5,39])),N9=qe()({head:()=>({meta:[{title:"CHCK Grading API Docs for Partners · chck.ai"},{name:"description",content:"Integrate CHCK AI card grading into your website: submit front and back images, receive certificate numbers, sub-grades, values, and signed webhooks. REST + OpenAPI."},{property:"og:title",content:"CHCK Grading API Docs for Partners"},{property:"og:description",content:"REST endpoints, API-key auth, signed webhooks, and an OpenAPI spec for embedding CHCK grading in your site."},{property:"og:type",content:"website"},{property:"og:url",content:"https://chck.ai/docs/api"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"CHCK Grading API Docs for Partners"},{name:"twitter:description",content:"Everything a partner needs to integrate CHCK grading: endpoints, auth, webhooks, OpenAPI."}],links:[{rel:"canonical",href:"https://chck.ai/docs/api"}]}),component:Ce(O9,"component")}),j9=()=>Oe(()=>import("./grade.index-DtpOEwLC.js"),__vite__mapDeps([59,42,16,17,9,5,18,25,4,26,43,8,3])),D9=qe()({head:()=>({meta:[{title:"Grade a card — instant card grading · chck.ai"},{name:"description",content:"Upload or shoot the front and back of your card and get an instant CHCK grade with centering, corners, edges and surface."},{property:"og:title",content:"Grade a card — chck.ai"},{property:"og:description",content:"Two photos in, instant grade out. Start the CHCK capture flow right here."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]}),component:Ce(j9,"component")}),P9=()=>Oe(()=>import("./grade.full-DG0aDXdv.js"),__vite__mapDeps([60,17,9,3,31,5])),M9=qe()({head:()=>({meta:[{title:"Full CHCK — 18-shot grading · chck.ai"},{name:"description",content:"Capture 9 shots of the front and 9 of the back for a full CHCK grading report: centering, corners, edges, and surface at every angle."},{property:"og:title",content:"Full CHCK — 18-shot grading · chck.ai"},{property:"og:description",content:"Nine front views, nine back views, one detailed CHCK grade. Guided capture from every corner and edge."}]}),component:Ce(P9,"component")}),L9=()=>Oe(()=>import("./m.grade-D0clNPZ6.js"),__vite__mapDeps([61,17,9,42,16,5,18,25,4,26,43,8])),I9=qe()({head:()=>({meta:[{title:"Capture your card — chck.ai"},{name:"description",content:"Snap the front and back of your card on your phone to hand it off to your desktop grader."}]}),validateSearch:e=>
146({session:typeof e.session=="string"?e.session:void 0}),component:Ce(L9,"component")}),U9=()=>Oe(()=>import("./_._lovable.oauth.consent-C7ziYIB-.js"),[]),z9=qe()({component:Ce(U9,"component")}),$9=()=>Oe(()=>import("./admin_.api-keys-CWtSDTga.js"),__vite__mapDeps([62,14,50,3,31,34,39,23])),B9=qe()({head:()=>({meta:[{title:"Partner API keys · Admin · chck.ai"},{name:"robots",content:"noindex,nofollow"}]}),beforeLoad:async()=>{try{const{isAdmin:e}=await hf();if(!e)throw Vn({to:"/account"})}catch(e){throw e&&typeof e=="object"&&"to"in e?e:Vn({to:"/account"})}},component:Ce($9,"component")}),H9=()=>Oe(()=>import("./admin_.blog-LfoX75oO.js"),__vite__mapDeps([63,14,55,31,64,47,18])),q9=qe()({head:()=>({meta:[{title:"Blog admin · chck.ai"},{name:"description",content:"Create and manage CHCK blog articles."},{property:"og:title",content:"Blog admin · chck.ai"},{property:"og:description",content:"Create and manage CHCK blog articles."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ce(H9,"component")}),F9=()=>Oe(()=>import("./admin_.rewards-D5_FdOBb.js"),__vite__mapDeps([65,14,53,31,64,47])),V9=qe()({head:()=>({meta:[{title:"Rewards config · chck.ai admin"},{name:"description",content:"Tune CHCK reward point values and redemption rates."},{property:"og:title",content:"Rewards config · chck.ai admin"},{property:"og:description",content:"Tune CHCK reward point values and redemption rates."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:Ce(F9,"component")}),G9=()=>Oe(()=>import("./admin_.seed-comps-bJ52HBcd.js"),__vite__mapDeps([66,14])),K9=qe()({head:()=>({meta:[{title:"Seed comps · Admin · chck.ai"},{name:"robots",content:"noindex,nofollow"}]}),beforeLoad:async()=>{try{const{isAdmin:e}=await hf();if(!e)throw Vn({to:"/account"})}catch(e){throw e&&typeof e=="object"&&"to"in e?e:Vn({to:"/account"})}},component:Ce(G9,"component")}),Y9=()=>Oe(()=>import("./ebay.connect-wQUAYmli.js"),__vite__mapDeps([67,45])),W9=qe()({head:()=>({meta:[{title:"Connect eBay · chck.ai"},{name:"robots",content:"noindex,nofollow"}]}),component:Ce(Y9,"component")}),Q9=e=>({queryKey:["admin","user",e],queryFn:()=>a9({data:{userId:e}})}),Z9=()=>Oe(()=>import("./admin_.users._userId-CGyhv5hj.js"),[]),X9=()=>Oe(()=>import("./admin_.users._userId-BwWoHigO.js"),[]),J9=()=>Oe(()=>import("./admin_.users._userId-B-_ivwvs.js"),__vite__mapDeps([68,12,3,31])),e$=qe()({head:()=>({meta:[{title:"User · Admin · chck.ai"},{name:"robots",content:"noindex,nofollow"}]}),beforeLoad:async()=>{try{const{isAdmin:e}=await hf();if(!e)throw Vn({to:"/account"})}catch(e){throw e&&typeof e=="object"&&"to"in e?e:Vn({to:"/account"})}},loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Q9(t.userId))},component:Ce(J9,"component"),errorComponent:Ce(X9,"errorComponent"),notFoundComponent:Ce(Z9,"notFoundComponent")}),t$=lz.update({id:"/",path:"/",getParentRoute:()=>ot}),Kn=uz.update({id:"/_authenticated",getParentRoute:()=>ot}),n$=fz.update({id:"/about",path:"/about",getParentRoute:()=>ot}),dT=pz.update({id:"/auth",path:"/auth",getParentRoute:()=>ot}),r$=_z.update({id:"/blog",path:"/blog",getParentRoute:()=>ot}),s$=xz.update({id:"/cert",path:"/cert",getParentRoute:()=>ot}),a$=Rz.update({id:"/chck",path:"/chck",getParentRoute:()=>ot}),i$=Cz.update({id:"/deals",path:"/deals",getParentRoute:()=>ot}),o$=Nz.update({id:"/feed",path:"/feed",getParentRoute:()=>ot}),l$=Dz.update({id:"/pricing",path:"/pricing",getParentRoute:()=>ot}),c$=Mz.update({id:"/privacy",path:"/privacy",getParentRoute:()=>ot}),u$=Iz.update({id:"/reset-password",path:"/reset-password",getParentRoute:()=>ot}),d$=zz.update({id:"/search",path:"/search",getParentRoute:()=>ot}),f$=Bz.update({id:"/services",path:"/services",getParentRoute:()=>ot}),h$=qz.update({id:"/support",path:"/support",getParentRoute:()=>ot}),p$=Vz.update({id:"/terms",path:"/terms",getParentRoute:()=>ot}),m$=Kz.update({id:"/try",path:"/try",getParentRoute:()=>ot}),g$=r9.update({id:"/account",path:"/account",getParentRoute:()=>Kn}),y$=u9.update({id:"/admin",path:"/admin",getParentRoute:()=>Kn}),v$=d9.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>Kn}),b$=p9.update({id:"/feedback",path:"/feedback",getParentRoute:()=>Kn}),w$=g9.update({id:"/rewards",path:"/rewards",getParentRoute:()=>Kn}),_$=v9.update({id:"/callback",path:"/callback",getParentRoute:()=>dT}),S$=S9.update({id:"/blog_/$slug",path:"/blog/$slug",getParentRoute:()=>ot}),x$=C9.update({id:"/c/$slug",path:"/c/$slug",getParentRoute:()=>ot}),E$=N9.update({id:"/docs/api",path:"/docs/api",getParentRoute:()=>ot}),R$=D9.update({id:"/grade/",path:"/grade/",getParentRoute:()=>ot}),T$=M9.update({id:"/grade/full",path:"/grade/full",getParentRoute:()=>ot}),k$=I9.update({id:"/m/grade",path:"/m/grade",getParentRoute:()=>ot}),A$=z9.update({id:"/.lovable/oauth/consent",path:"/.lovable/oauth/consent",getParentRoute:()=>ot}),C$=B9.update({id:"/admin_/api-keys",path:"/admin/api-keys",getParentRoute:()=>Kn}),O$=q9.update({id:"/admin_/blog",path:"/admin/blog",getParentRoute:()=>Kn}),N$=V9.update({id:"/admin_/rewards",path:"/admin/rewards",getParentRoute:()=>Kn}),j$=K9.update({id:"/admin_/seed-comps",path:"/admin/seed-comps",getParentRoute:()=>Kn}),D$=W9.update({id:"/ebay/connect",path:"/ebay/connect",getParentRoute:()=>Kn}),P$=e$.update({id:"/admin_/users/$userId",path:"/admin/users/$userId",getParentRoute:()=>Kn}),M$={AuthenticatedAccountRoute:g$,AuthenticatedAdminRoute:y$,AuthenticatedDashboardRoute:v$,AuthenticatedFeedbackRoute:b$,AuthenticatedRewardsRoute:w$,AuthenticatedAdminApiKeysRoute:C$,AuthenticatedAdminBlogRoute:O$,AuthenticatedAdminRewardsRoute:N$,AuthenticatedAdminSeedCompsRoute:j$,AuthenticatedEbayConnectRoute:D$,AuthenticatedAdminUsersUserIdRoute:P$},L$=Kn._addFileChildren(M$),I$={AuthCallbackRoute:_$},U$=dT._addFileChildren(I$),z$={IndexRoute:t$,AuthenticatedRouteRoute:L$,AboutRoute:n$,AuthRoute:U$,BlogRoute:r$,CertRoute:s$,ChckRoute:a$,DealsRoute:i$,FeedRoute:o$,PricingRoute:l$,PrivacyRoute:c$,ResetPasswordRoute:u$,SearchRoute:d$,ServicesRoute:f$,Supp
146ortRoute:h$,TermsRoute:p$,TryRoute:m$,BlogSlugRoute:S$,CSlugRoute:x$,DocsApiRoute:E$,GradeFullRoute:T$,MGradeRoute:k$,GradeIndexRoute:R$,DotlovableOauthConsentRoute:A$},$$=ot._addFileChildren(z$),B$=()=>{const e=new D5;return Ij({routeTree:$$,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function H$(){const e=await B$();let t;if(__){const n=await __.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.serializationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(GN),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.ids.get().length||await LC(e),e}var q$=H$;function F$(){return q$().finally(()=>window.$_TSR?.h())}var um;function V$(){return um||(um=F$()),E.jsx(YN,{promise:um,children:e=>E.jsx($j,{router:e})})}k.startTransition(()=>{jA.hydrateRoot(document,E.jsx(k.StrictMode,{children:E.jsx(V$,{})}))});export{Oe as $,H8 as A,Q9 as B,cE as C,Y$ as D,vE as E,NB as F,oE as G,tB as H,yd as I,i8 as J,vR as K,Je as L,bR as M,wR as N,Sx as O,rM as P,R5 as Q,pz as R,aM as S,_R as T,H_ as U,Og as V,FP as W,z_ as X,xB as Y,Dz as Z,lB as _,It as a,r9 as a$,cB as a0,sf as a1,Z5 as a2,G5 as a3,U_ as a4,dE as a5,gc as a6,Mm as a7,ac as a8,O5 as a9,DB as aA,PB as aB,MB as aC,LB as aD,dB as aE,fB as aF,hB as aG,pB as aH,J5 as aI,f9 as aJ,BS as aK,Z$ as aL,yc as aM,jg as aN,ae as aO,dr as aP,xE as aQ,yn as aR,pd as aS,On as aT,ko as aU,la as aV,wB as aW,oB as aX,Zz as aY,Xz as aZ,Jz as a_,qt as aa,gn as ab,tE as ac,rf as ad,eB as ae,nB as af,rB as ag,sB as ah,Y5 as ai,qg as aj,K5 as ak,L8 as al,B_ as am,yE as an,M8 as ao,SE as ap,Yz as aq,i9 as ar,$B as as,OB as at,eP as au,IB as av,UB as aw,BB as ax,zB as ay,jB as az,qm as b,uB as b0,CB as b1,aB as b2,iB as b3,ZU as b4,kB as b5,QU as b6,YU as b7,WU as b8,mB as b9,Lg as bA,Pg as bB,ME as bC,YM as bD,C9 as bE,E9 as bF,R9 as bG,EB as bH,AB as bI,W$ as bJ,Q$ as bK,RB as ba,TB as bb,gB as bc,yB as bd,vB as be,bB as bf,HU as bg,FU as bh,ng as bi,V8 as bj,VU as bk,xR as bl,Mg as bm,Dg as bn,cU as bo,HR as bp,ZR as bq,uU as br,a8 as b
146s,nR as bt,p6 as bu,m6 as bv,ZE as bw,XE as bx,So as by,kE as bz,vd as c,zl as d,_B as e,SB as f,Ft as g,he as h,Ae as i,E as j,pe as k,z8 as l,V5 as m,K$ as n,J$ as o,yz as p,Nn as q,k as r,ir as s,pn as t,gx as u,v8 as v,S9 as w,mx as x,Y8 as y,e$ 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.