PageSourceSearch

https://www.remarkableai.ai/assets/vendor-DsulZtsK.js

js remarkableai.ai collected 2026-10-05 12:30:19 UTC 545,535 bytes, 354 lines download raw bytes

vendor: 4,979 bytes, lines 1-9
1var rf=e=>{throw TypeError(e)};var hu=(e,t,r)=>t.has(e)||rf("Cannot "+r);var _=(e,t,r)=>(hu(e,t,"read from private field"),r?r.call(e):t.get(e)),U=(e,t,r)=>t.has(e)?rf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),N=(e,t,r,n)=>(hu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),W=(e,t,r)=>(hu(e,t,"access private method"),r);var Go=(e,t,r,n)=>({set _(s){N(e,t,s,r)},get _(){return _(e,t,n)}});function H0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wm={exports:{}},$l={},Vm={exports:{}},X={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Lo=Symbol.for("react.element"),W0=Symbol.for("react.portal"),V0=Symbol.for("react.fragment"),K0=Symbol.for("react.strict_mode"),q0=Symbol.for("react.profiler"),G0=Symbol.for("react.provider"),Q0=Symbol.for("react.context"),J0=Symbol.for("react.forward_ref"),Y0=Symbol.for("react.suspense"),X0=Symbol.for("react.memo"),Z0=Symbol.for("react.lazy"),nf=Symbol.iterator;function ew(e){return e===null||typeof e!="object"?null:(e=nf&&e[nf]||e["@@iterator"],typeof e=="function"?e:null)}var Km={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qm=Object.assign,Gm={};function ai(e,t,r){this.props=e,this.context=t,this.refs=Gm,this.updater=r||Km}ai.prototype.isReactComponent={};ai.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ai.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qm(){}Qm.prototype=ai.prototype;function Pd(e,t,r){this.props=e,this.context=t,this.refs=Gm,this.updater=r||Km}var Ad=Pd.prototype=new Qm;Ad.constructor=Pd;qm(Ad,ai.prototype);Ad.isPureReactComponent=!0;var sf=Array.isArray,Jm=Object.prototype.hasOwnProperty,Od={current:null},Ym={key:!0,ref:!0,__self:!0,__source:!0};function Xm(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Jm.call(t,n)&&!Ym.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:Lo,type:e,key:i,ref:o,props:s,_owner:Od.current}}function tw(e,t){return{$$typeof:Lo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Id(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lo}function rw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var of=/\/+/g;function fu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rw(""+e.key):t.toString(36)}function Aa(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Lo:case W0:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+fu(o,0):n,sf(s)?(r="",e!=null&&(r=e.replace(of,"$&/")+"/"),Aa(s,t,r,"",function(u){return u})):s!=null&&(Id(s)&&(s=tw(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(of,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",sf(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+fu(i,a);o+=Aa(i,t,r,l,s)}else if(l=ew(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+fu(i,a++),o+=Aa(i,t,r,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Qo(e,t,r){if(e==null)return e;var n=[],s=0;return Aa(e,n,"","",function(i){return t.call(r,i,s++)}),n}function nw(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Qe={current:null},Oa={transition:null},sw={ReactCurrentDispatcher:Qe,ReactCurrentBatchConfig:Oa,ReactCurrentOwner:Od};function Zm(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 2,519 bytes, line 9
9X.Children={map:Qo,forEach:function(e,t,r){Qo(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Qo(e,function(){t++}),t},toArray:function(e){return Qo(e,function(t){return t})||[]},only:function(e){if(!Id(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=ai;X.Fragment=V0;X.Profiler=q0;X.PureComponent=Pd;X.StrictMode=K0;X.Suspense=Y0;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sw;X.act=Zm;X.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=qm({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Od.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Jm.call(t,l)&&!Ym.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:Lo,type:e.type,key:s,ref:i,props:n,_owner:o}};X.createContext=function(e){return e={$$typeof:Q0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:G0,_context:e},e.Consumer=e};X.createElement=Xm;X.createFactory=function(e){var t=Xm.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:J0,render:e}};X.isValidElement=Id;X.lazy=function(e){return{$$typeof:Z0,_payload:{_status:-1,_result:e},_init:nw}};X.memo=function(e,t){return{$$typeof:X0,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=Oa.transition;Oa.transition={};try{e()}finally{Oa.transition=t}};X.unstable_act=Zm;X.useCallback=function(e,t){return Qe.current.useCallback(e,t)};X.useContext=function(e){return Qe.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return Qe.current.useDeferredValue(e)};X.useEffect=function(e,t){return Qe.current.useEffect(e,t)};X.useId=function(){return Qe.current.useId()};X.useImperativeHandle=function(e,t,r){return Qe.current.useImperativeHandle(e,t,r)};X.useInsertionEffect=function(e,t){return Qe.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return Qe.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return Qe.current.useMemo(e,t)};X.useReducer=function(e,t,r){return Qe.current.useReducer(e,t,r)};X.useRef=function(e){return Qe.current.useRef(e)};
vendor: 3,031 bytes, lines 9-25
9X.useState=function(e){return Qe.current.useState(e)};X.useSyncExternalStore=function(e,t,r){return Qe.current.useSyncExternalStore(e,t,r)};X.useTransition=function(){return Qe.current.useTransition()};X.version="18.3.1";Vm.exports=X;var S=Vm.exports;const A=Hm(S),jT=H0({__proto__:null,default:A},[S]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var iw=S,ow=Symbol.for("react.element"),aw=Symbol.for("react.fragment"),lw=Object.prototype.hasOwnProperty,uw=iw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cw={key:!0,ref:!0,__self:!0,__source:!0};function eg(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)lw.call(t,n)&&!cw.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:ow,type:e,key:i,ref:o,props:s,_owner:uw.current}}$l.Fragment=aw;$l.jsx=eg;$l.jsxs=eg;Wm.exports=$l;var dw=Wm.exports,tg={exports:{}},yt={},rg={exports:{}},ng={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(C,L){var D=C.length;C.push(L);e:for(;0<D;){var J=D-1>>>1,pe=C[J];if(0<s(pe,L))C[J]=L,C[D]=pe,D=J;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var L=C[0],D=C.pop();if(D!==L){C[0]=D;e:for(var J=0,pe=C.length,Y=pe>>>1;J<Y;){var ne=2*(J+1)-1,ie=C[ne],ke=ne+1,At=C[ke];if(0>s(ie,D))ke<pe&&0>s(At,ie)?(C[J]=At,C[ke]=D,J=ke):(C[J]=ie,C[ne]=D,J=ne);else if(ke<pe&&0>s(At,D))C[J]=At,C[ke]=D,J=ke;else break e}}return L}function s(C,L){var D=C.sortIndex-L.sortIndex;return D!==0?D:C.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,c=null,h=3,p=!1,g=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(C){for(var L=r(u);L!==null;){if(L.callback===null)n(u);else if(L.startTime<=C)n(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=r(u)}}function b(C){if(y=!1,v(C),!g)if(r(l)!==null)g=!0,F(k);else{var L=r(u);L!==null&&Q(b,L.startTime-C)}}function k(C,L){g=!1,y&&(y=!1,f(R),R=-1),p=!0;var D=h;try{for(v(L),c=r(l);c!==null&&(!(c.expirationTime>L)||C&&!z());){var J=c.callback;if(typeof J=="function"){c.callback=null,h=c.priorityLevel;var pe=J(c.expirationTime<=L);
vendor: 7,407 bytes, lines 25-33
25L=e.unstable_now(),typeof pe=="function"?c.callback=pe:c===r(l)&&n(l),v(L)}else n(l);c=r(l)}if(c!==null)var Y=!0;else{var ne=r(u);ne!==null&&Q(b,ne.startTime-L),Y=!1}return Y}finally{c=null,h=D,p=!1}}var E=!1,x=null,R=-1,O=5,P=-1;function z(){return!(e.unstable_now()-P<O)}function M(){if(x!==null){var C=e.unstable_now();P=C;var L=!0;try{L=x(!0,C)}finally{L?K():(E=!1,x=null)}}else E=!1}var K;if(typeof m=="function")K=function(){m(M)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,Z=q.port2;q.port1.onmessage=M,K=function(){Z.postMessage(null)}}else K=function(){w(M,0)};function F(C){x=C,E||(E=!0,K())}function Q(C,L){R=w(function(){C(e.unstable_now())},L)}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(C){C.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,F(k))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var L=3;break;default:L=h}var D=h;h=L;try{return C()}finally{h=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,L){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var D=h;h=C;try{return L()}finally{h=D}},e.unstable_scheduleCallback=function(C,L,D){var J=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?J+D:J):D=J,C){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=D+pe,C={id:d++,callback:L,priorityLevel:C,startTime:D,expirationTime:pe,sortIndex:-1},D>J?(C.sortIndex=D,t(u,C),r(l)===null&&C===r(u)&&(y?(f(R),R=-1):y=!0,Q(b,D-J))):(C.sortIndex=pe,t(l,C),g||p||(g=!0,F(k))),C},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(C){var L=h;return function(){var D=h;h=L;try{return C.apply(this,arguments)}finally{h=D}}}})(ng);rg.exports=ng;var hw=rg.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var fw=S,gt=hw;function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sg=new Set,eo={};function Zn(e,t){Zs(e,t),Zs(e+"Capture",t)}function Zs(e,t){for(eo[e]=t,e=0;e<t.length;e++)sg.add(t[e])}var Pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rc=Object.prototype.hasOwnProperty,pw=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,af={},lf={};function mw(e){return rc.call(lf,e)?!0:rc.call(af,e)?!1:pw.test(e)?lf[e]=!0:(af[e]=!0,!1)}function gw(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yw(e,t,r,n){if(t===null||typeof t>"u"||gw(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Je(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){De[e]=new Je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];De[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){De[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){De[e]=new Je(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){De[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){De[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){De[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){De[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){De[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nd=/[\-:]([a-z])/g;function Ld(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nd,Ld);De[t]=new Je(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nd,Ld);De[t]=new Je(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nd,Ld);De[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){De[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});De.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){De[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});
vendor: 15,761 bytes, lines 33-37
33function jd(e,t,r,n){var s=De.hasOwnProperty(t)?De[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yw(t,r,s,n)&&(r=null),n||s===null?mw(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var $r=fw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Jo=Symbol.for("react.element"),ys=Symbol.for("react.portal"),vs=Symbol.for("react.fragment"),$d=Symbol.for("react.strict_mode"),nc=Symbol.for("react.profiler"),ig=Symbol.for("react.provider"),og=Symbol.for("react.context"),Dd=Symbol.for("react.forward_ref"),sc=Symbol.for("react.suspense"),ic=Symbol.for("react.suspense_list"),Md=Symbol.for("react.memo"),Hr=Symbol.for("react.lazy"),ag=Symbol.for("react.offscreen"),uf=Symbol.iterator;function bi(e){return e===null||typeof e!="object"?null:(e=uf&&e[uf]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,pu;function Li(e){if(pu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);pu=t&&t[1]||""}return`
34`+pu+e}var mu=!1;function gu(e,t){if(!e||mu)return"";mu=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=n.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{mu=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Li(e):""}function vw(e){switch(e.tag){case 5:return Li(e.type);case 16:return Li("Lazy");case 13:return Li("Suspense");case 19:return Li("SuspenseList");case 0:case 2:case 15:return e=gu(e.type,!1),e;case 11:return e=gu(e.type.render,!1),e;case 1:return e=gu(e.type,!0),e;default:return""}}function oc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vs:return"Fragment";case ys:return"Portal";case nc:return"Profiler";case $d:return"StrictMode";case sc:return"Suspense";case ic:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case og:return(e.displayName||"Context")+".Consumer";case ig:return(e._context.displayName||"Context")+".Provider";case Dd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Md:return t=e.displayName||null,t!==null?t:oc(e.type)||"Memo";case Hr:t=e._payload,e=e._init;try{return oc(e(t))}catch{}}return null}function ww(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oc(t);case 8:return t===$d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bw(e){var t=lg(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yo(e){e._valueTracker||(e._valueTracker=bw(e))}function ug(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=lg(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Ja(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ac(e,t){var r=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function cf(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=gn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cg(e,t){t=t.checked,t!=null&&jd(e,"checked",t,!1)}function lc(e,t){cg(e,t);var r=gn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uc(e,t.type,r):t.hasOwnProperty("defaultValue")&&uc(e,t.type,gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function df(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function uc(e,t,r){(t!=="number"||Ja(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ji=Array.isArray;function As(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+gn(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function cc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hf(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(T(92));if(ji(r)){if(1<r.length)throw Error(T(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:gn(r)}}function dg(e,t){var r=gn(t.value),n=gn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function ff(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function dc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xo,fg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xo=Xo||document.createElement("div"),Xo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function to(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var zi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_w=["Webkit","ms","Moz","O"];Object.keys(zi).forEach(function(e){_w.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zi[t]=zi[e]})});function pg(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||zi.hasOwnProperty(e)&&zi[e]?(""+t).trim():t+"px"}function mg(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=pg(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var Sw=ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hc(e,t){if(t){if(Sw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function fc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 pc=null;function Ud(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mc=null,Os=null,Is=null;function pf(e){if(e=Do(e)){if(typeof mc!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Bl(t),mc(e.stateNode,e.type,t))}}function gg(e){Os?Is?Is.push(e):Is=[e]:Os=e}function yg(){if(Os){var e=Os,t=Is;if(Is=Os=null,pf(e),t)for(e=0;e<t.length;e++)pf(t[e])}}function vg(e,t){return e(t)}function wg(){}var yu=!1;function bg(e,t,r){if(yu)return e(t,r);yu=!0;try{return vg(e,t,r)}finally{yu=!1,(Os!==null||Is!==null)&&(wg(),yg())}}function ro(e,t){var r=e.stateNode;if(r===null)return null;var n=Bl(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(T(231,t,typeof r));return r}var gc=!1;if(Pr)try{var _i={};Object.defineProperty(_i,"passive",{get:function(){gc=!0}}),window.addEventListener("test",_i,_i),window.removeEventListener("test",_i,_i)}catch{gc=!1}function kw(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Hi=!1,Ya=null,Xa=!1,yc=null,Ew={onError:function(e){Hi=!0,Ya=e}};function xw(e,t,r,n,s,i,o,a,l){Hi=!1,Ya=null,kw.apply(Ew,arguments)}function Rw(e,t,r,n,s,i,o,a,l){if(xw.apply(this,arguments),Hi){if(Hi){var u=Ya;Hi=!1,Ya=null}else throw Error(T(198));Xa||(Xa=!0,yc=u)}}function es(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function _g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function mf(e){if(es(e)!==e)throw Error(T(188))}function Cw(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error(T(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return mf(s),e;if(i===n)return mf(s),t;i=i.sibling}throw Error(T(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(T(189))}}if(r.alternate!==n)throw Error(T(190))}if(r.tag!==3)throw Error(T(188));return r.stateNode.current===r?e:t}function Sg(e){return e=Cw(e),e!==null?kg(e):null}function kg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kg(e);if(t!==null)return t;e=e.sibling}return null}var Eg=gt.unstable_scheduleCallback,gf=gt.unstable_cancelCallback,Tw=gt.unstable_shouldYield,Pw=gt.unstable_requestPaint,Se=gt.unstable_now,Aw=gt.unstable_getCurrentPriorityLevel,Fd=gt.unstable_ImmediatePriority,xg=gt.unstable_UserBlockingPriority,Za=gt.unstable_NormalPriority,Ow=gt.unstable_LowPriority,Rg=gt.unstable_IdlePriority,Dl=null,or=null;function Iw(e){if(or&&typeof or.onCommitFiberRoot=="function")try{or.onCommitFiberRoot(Dl,e,void 0,(e.current.flags&128)===128)}catch{}}var zt=Math.clz32?Math.clz32:jw,Nw=Math.log,Lw=Math.LN2;function jw(e){return e>>>=0,e===0?32:31-(Nw(e)/Lw|0)|0}var Zo=64,ea=4194304;function $i(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function el(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=$i(a):(i&=o,i!==0&&(n=$i(i)))}else o=r&~s,o!==0?n=$i(o):i!==0&&(n=$i(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-zt(t),s=1<<r,n|=e[r],t&=~s;return n}function $w(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dw(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-zt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=$w(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function vc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Cg(){var e=Zo;return Zo<<=1,!(Zo&4194240)&&(Zo=64),e}function vu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function jo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zt(t),e[t]=r}function Mw(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-zt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function Bd(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-zt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var se=0;function Tg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Pg,zd,Ag,Og,Ig,wc=!1,ta=[],an=null,ln=null,un=null,no=new Map,so=new Map,Vr=[],Uw="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 submit".split(" ");function yf(e,t){switch(e){case"focusin":case"focusout":an=null;break;case"dragenter":case"dragleave":ln=null;break;case"mouseover":case"mouseout":un=null;break;case"pointerover":case"pointerout":no.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":so.delete(t.pointerId)}}function Si(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Do(t),t!==null&&zd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Fw(e,t,r,n,s){switch(t){case"focusin":return an=Si(an,e,t,r,n,s),!0;case"dragenter":return ln=Si(ln,e,t,r,n,s),!0;case"mouseover":return un=Si(un,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return no.set(i,Si(no.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,so.set(i,Si(so.get(i)||null,e,t,r,n,s)),!0}return!1}function Ng(e){var t=An(e.target);if(t!==null){var r=es(t);if(r!==null){if(t=r.tag,t===13){if(t=_g(r),t!==null){e.blockedOn=t,Ig(e.priority,function(){Ag(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ia(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=bc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);pc=n,r.target.dispatchEvent(n),pc=null}else return t=Do(r),t!==null&&zd(t),e.blockedOn=r,!1;t.shift()}return!0}function vf(e,t,r){Ia(e)&&r.delete(t)}function Bw(){wc=!1,an!==null&&Ia(an)&&(an=null),ln!==null&&Ia(ln)&&(ln=null),un!==null&&Ia(un)&&(un=null),no.forEach(vf),so.forEach(vf)}function ki(e,t){e.blockedOn===t&&(e.blockedOn=null,wc||(wc=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,Bw)))}function io(e){function t(s){return ki(s,e)}if(0<ta.length){ki(ta[0],e);for(var r=1;r<ta.length;r++){var n=ta[r];n.blockedOn===e&&(n.blockedOn=null)}}for(an!==null&&ki(an,e),ln!==null&&ki(ln,e),un!==null&&ki(un,e),no.forEach(t),so.forEach(t),r=0;r<Vr.length;r++)n=Vr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Vr.length&&(r=Vr[0],r.blockedOn===null);)Ng(r),r.blockedOn===null&&Vr.shift()}var Ns=$r.ReactCurrentBatchConfig,tl=!0;function zw(e,t,r,n){var s=se,i=Ns.transition;Ns.transition=null;try{se=1,Hd(e,t,r,n)}finally{se=s,Ns.transition=i}}function Hw(e,t,r,n){var s=se,i=Ns.transition;Ns.transition=null;try{se=4,Hd(e,t,r,n)}finally{se=s,Ns.transition=i}}function Hd(e,t,r,n){if(tl){var s=bc(e,t,r,n);if(s===null)Tu(e,t,n,rl,r),yf(e,n);else if(Fw(s,e,t,r,n))n.stopPropagation();else if(yf(e,n),t&4&&-1<Uw.indexOf(e)){for(;s!==null;){var i=Do(s);if(i!==null&&Pg(i),i=bc(e,t,r,n),i===null&&Tu(e,t,n,rl,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Tu(e,t,n,null,r)}}var rl=null;function bc(e,t,r,n){if(rl=null,e=Ud(n),e=An(e),e!==null)if(t=es(e),t===null)e=null;else if(r=t.tag,r===13){if(e=_g(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return rl=e,null}
vendor: 10,401 bytes, line 37
37function Lg(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Aw()){case Fd:return 1;case xg:return 4;case Za:case Ow:return 16;case Rg:return 536870912;default:return 16}default:return 16}}var sn=null,Wd=null,Na=null;function jg(){if(Na)return Na;var e,t=Wd,r=t.length,n,s="value"in sn?sn.value:sn.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return Na=s.slice(e,1<n?1-n:void 0)}function La(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ra(){return!0}function wf(){return!1}function vt(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ra:wf,this.isPropagationStopped=wf,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ra)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ra)},persist:function(){},isPersistent:ra}),t}var li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vd=vt(li),$o=ye({},li,{view:0,detail:0}),Ww=vt($o),wu,bu,Ei,Ml=ye({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ei&&(Ei&&e.type==="mousemove"?(wu=e.screenX-Ei.screenX,bu=e.screenY-Ei.screenY):bu=wu=0,Ei=e),wu)},movementY:function(e){return"movementY"in e?e.movementY:bu}}),bf=vt(Ml),Vw=ye({},Ml,{dataTransfer:0}),Kw=vt(Vw),qw=ye({},$o,{relatedTarget:0}),_u=vt(qw),Gw=ye({},li,{animationName:0,elapsedTime:0,pseudoElement:0}),Qw=vt(Gw),Jw=ye({},li,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yw=vt(Jw),Xw=ye({},li,{data:0}),_f=vt(Xw),Zw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eb={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"},tb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tb[e])?!!t[e]:!1}function Kd(){return rb}var nb=ye({},$o,{key:function(e){if(e.key){var t=Zw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=La(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kd,charCode:function(e){return e.type==="keypress"?La(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?La(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sb=vt(nb),ib=ye({},Ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sf=vt(ib),ob=ye({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kd}),ab=vt(ob),lb=ye({},li,{propertyName:0,elapsedTime:0,pseudoElement:0}),ub=vt(lb),cb=ye({},Ml,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),db=vt(cb),hb=[9,13,27,32],qd=Pr&&"CompositionEvent"in window,Wi=null;Pr&&"documentMode"in document&&(Wi=document.documentMode);var fb=Pr&&"TextEvent"in window&&!Wi,$g=Pr&&(!qd||Wi&&8<Wi&&11>=Wi),kf=" ",Ef=!1;function Dg(e,t){switch(e){case"keyup":return hb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function pb(e,t){switch(e){case"compositionend":return Mg(t);case"keypress":return t.which!==32?null:(Ef=!0,kf);case"textInput":return e=t.data,e===kf&&Ef?null:e;default:return null}}function mb(e,t){if(ws)return e==="compositionend"||!qd&&Dg(e,t)?(e=jg(),Na=Wd=sn=null,ws=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $g&&t.locale!=="ko"?null:t.data;default:return null}}var gb={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 xf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gb[e.type]:t==="textarea"}function Ug(e,t,r,n){gg(n),t=nl(t,"onChange"),0<t.length&&(r=new Vd("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Vi=null,oo=null;function yb(e){Jg(e,0)}function Ul(e){var t=Ss(e);if(ug(t))return e}function vb(e,t){if(e==="change")return t}var Fg=!1;if(Pr){var Su;if(Pr){var ku="oninput"in document;if(!ku){var Rf=document.createElement("div");Rf.setAttribute("oninput","return;"),ku=typeof Rf.oninput=="function"}Su=ku}else Su=!1;Fg=Su&&(!document.documentMode||9<document.documentMode)}function Cf(){Vi&&(Vi.detachEvent("onpropertychange",Bg),oo=Vi=null)}function Bg(e){if(e.propertyName==="value"&&Ul(oo)){var t=[];Ug(t,oo,e,Ud(e)),bg(yb,t)}}function wb(e,t,r){e==="focusin"?(Cf(),Vi=t,oo=r,Vi.attachEvent("onpropertychange",Bg)):e==="focusout"&&Cf()}function bb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ul(oo)}function _b(e,t){if(e==="click")return Ul(t)}function Sb(e,t){if(e==="input"||e==="change")return Ul(t)}function kb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:kb;function ao(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!rc.call(t,s)||!Vt(e[s],t[s]))return!1}return!0}function Tf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pf(e,t){var r=Tf(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Tf(r)}}function zg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hg(){for(var e=window,t=Ja();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ja(e.document)}return t}function Gd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Eb(e){var t=Hg(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&zg(r.ownerDocument.documentElement,r)){if(n!==null&&Gd(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=Pf(r,i);var o=Pf(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xb=Pr&&"documentMode"in document&&11>=document.documentMode,bs=null,_c=null,Ki=null,Sc=!1;function Af(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Sc||bs==null||bs!==Ja(n)||(n=bs,"selectionStart"in n&&Gd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,088 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Ki&&ao(Ki,n)||(Ki=n,n=nl(_c,"onSelect"),0<n.length&&(t=new Vd("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=bs)))}function na(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var _s={animationend:na("Animation","AnimationEnd"),animationiteration:na("Animation","AnimationIteration"),animationstart:na("Animation","AnimationStart"),transitionend:na("Transition","TransitionEnd")},Eu={},Wg={};Pr&&(Wg=document.createElement("div").style,"AnimationEvent"in window||(delete _s.animationend.animation,delete _s.animationiteration.animation,delete _s.animationstart.animation),"TransitionEvent"in window||delete _s.transitionend.transition);function Fl(e){if(Eu[e])return Eu[e];if(!_s[e])return e;var t=_s[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Wg)return Eu[e]=t[r];return e}var Vg=Fl("animationend"),Kg=Fl("animationiteration"),qg=Fl("animationstart"),Gg=Fl("transitionend"),Qg=new Map,Of="abort auxClick 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(" ");function bn(e,t){Qg.set(e,t),Zn(t,[e])}for(var xu=0;xu<Of.length;xu++){var Ru=Of[xu],Rb=Ru.toLowerCase(),Cb=Ru[0].toUpperCase()+Ru.slice(1);bn(Rb,"on"+Cb)}bn(Vg,"onAnimationEnd");bn(Kg,"onAnimationIteration");bn(qg,"onAnimationStart");bn("dblclick","onDoubleClick");bn("focusin","onFocus");bn("focusout","onBlur");bn(Gg,"onTransitionEnd");Zs("onMouseEnter",["mouseout","mouseover"]);Zs("onMouseLeave",["mouseout","mouseover"]);Zs("onPointerEnter",["pointerout","pointerover"]);Zs("onPointerLeave",["pointerout","pointerover"]);Zn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Di="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(" "),Tb=new Set("cancel close invalid load scroll toggle".split(" ").concat(Di));function If(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Rw(n,t,void 0,e),e.currentTarget=null}function Jg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;If(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;If(s,a,u),i=l}}}if(Xa)throw e=yc,Xa=!1,yc=null,e}function ue(e,t){var r=t[Cc];r===void 0&&(r=t[Cc]=new Set);var n=e+"__bubble";r.has(n)||(Yg(t,e,2,!1),r.add(n))}function Cu(e,t,r){var n=0;t&&(n|=4),Yg(r,e,n,t)}var sa="_reactListening"+Math.random().toString(36).slice(2);function lo(e){if(!e[sa]){e[sa]=!0,sg.forEach(function(r){r!=="selectionchange"&&(Tb.has(r)||Cu(r,!1,e),Cu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[sa]||(t[sa]=!0,Cu("selectionchange",!1,t))}}function Yg(e,t,r,n){switch(Lg(t)){case 1:var s=zw;break;case 4:s=Hw;break;
vendor: 22,526 bytes, lines 37-38
37default:s=Hd}r=s.bind(null,t,r,e),s=void 0,!gc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Tu(e,t,r,n,s){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=An(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}bg(function(){var u=i,d=Ud(r),c=[];e:{var h=Qg.get(e);if(h!==void 0){var p=Vd,g=e;switch(e){case"keypress":if(La(r)===0)break e;case"keydown":case"keyup":p=sb;break;case"focusin":g="focus",p=_u;break;case"focusout":g="blur",p=_u;break;case"beforeblur":case"afterblur":p=_u;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=bf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Kw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=ab;break;case Vg:case Kg:case qg:p=Qw;break;case Gg:p=ub;break;case"scroll":p=Ww;break;case"wheel":p=db;break;case"copy":case"cut":case"paste":p=Yw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Sf}var y=(t&4)!==0,w=!y&&e==="scroll",f=y?h!==null?h+"Capture":null:h;y=[];for(var m=u,v;m!==null;){v=m;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,f!==null&&(b=ro(m,f),b!=null&&y.push(uo(m,b,v)))),w)break;m=m.return}0<y.length&&(h=new p(h,g,null,r,d),c.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==pc&&(g=r.relatedTarget||r.fromElement)&&(An(g)||g[Ar]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?An(g):null,g!==null&&(w=es(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(y=bf,b="onMouseLeave",f="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=Sf,b="onPointerLeave",f="onPointerEnter",m="pointer"),w=p==null?h:Ss(p),v=g==null?h:Ss(g),h=new y(b,m+"leave",p,r,d),h.target=w,h.relatedTarget=v,b=null,An(d)===u&&(y=new y(f,m+"enter",g,r,d),y.target=v,y.relatedTarget=w,b=y),w=b,p&&g)t:{for(y=p,f=g,m=0,v=y;v;v=os(v))m++;for(v=0,b=f;b;b=os(b))v++;for(;0<m-v;)y=os(y),m--;for(;0<v-m;)f=os(f),v--;for(;m--;){if(y===f||f!==null&&y===f.alternate)break t;y=os(y),f=os(f)}y=null}else y=null;p!==null&&Nf(c,h,p,y,!1),g!==null&&w!==null&&Nf(c,w,g,y,!0)}}e:{if(h=u?Ss(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var k=vb;else if(xf(h))if(Fg)k=Sb;else{k=bb;var E=wb}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=_b);if(k&&(k=k(e,u))){Ug(c,k,r,d);break e}E&&E(e,h,u),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&uc(h,"number",h.value)}switch(E=u?Ss(u):window,e){case"focusin":(xf(E)||E.contentEditable==="true")&&(bs=E,_c=u,Ki=null);break;case"focusout":Ki=_c=bs=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,Af(c,r,d);break;case"selectionchange":if(xb)break;case"keydown":case"keyup":Af(c,r,d)}var x;if(qd)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else ws?Dg(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&($g&&r.locale!=="ko"&&(ws||R!=="onCompositionStart"?R==="onCompositionEnd"&&ws&&(x=jg()):(sn=d,Wd="value"in sn?sn.value:sn.textContent,ws=!0)),E=nl(u,R),0<E.length&&(R=new _f(R,e,null,r,d),c.push({event:R,listeners:E}),x?R.data=x:(x=Mg(r),x!==null&&(R.data=x)))),(x=fb?pb(e,r):mb(e,r))&&(u=nl(u,"onBeforeInput"),0<u.length&&(d=new _f("onBeforeInput","beforeinput",null,r,d),c.push({event:d,listeners:u}),d.data=x))}Jg(c,t)})}function uo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function nl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ro(e,r),i!=null&&n.unshift(uo(e,i,s)),i=ro(e,t),i!=null&&n.push(uo(e,i,s))),e=e.return}return n}function os(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Nf(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=ro(r,i),l!=null&&o.unshift(uo(r,l,a))):s||(l=ro(r,i),l!=null&&o.push(uo(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Pb=/\r\n?/g,Ab=/\u0000|\uFFFD/g;function Lf(e){return(typeof e=="string"?e:""+e).replace(Pb,`
38`).replace(Ab,"")}function ia(e,t,r){if(t=Lf(t),Lf(e)!==t&&r)throw Error(T(425))}function sl(){}var kc=null,Ec=null;function xc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rc=typeof setTimeout=="function"?setTimeout:void 0,Ob=typeof clearTimeout=="function"?clearTimeout:void 0,jf=typeof Promise=="function"?Promise:void 0,Ib=typeof queueMicrotask=="function"?queueMicrotask:typeof jf<"u"?function(e){return jf.resolve(null).then(e).catch(Nb)}:Rc;function Nb(e){setTimeout(function(){throw e})}function Pu(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),io(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);io(t)}function cn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function $f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ui=Math.random().toString(36).slice(2),nr="__reactFiber$"+ui,co="__reactProps$"+ui,Ar="__reactContainer$"+ui,Cc="__reactEvents$"+ui,Lb="__reactListeners$"+ui,jb="__reactHandles$"+ui;function An(e){var t=e[nr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ar]||r[nr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=$f(e);e!==null;){if(r=e[nr])return r;e=$f(e)}return t}e=r,r=e.parentNode}return null}function Do(e){return e=e[nr]||e[Ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Bl(e){return e[co]||null}var Tc=[],ks=-1;function _n(e){return{current:e}}function ce(e){0>ks||(e.current=Tc[ks],Tc[ks]=null,ks--)}function ae(e,t){ks++,Tc[ks]=e.current,e.current=t}var yn={},We=_n(yn),nt=_n(!1),Kn=yn;function ei(e,t){var r=e.type.contextTypes;if(!r)return yn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function st(e){return e=e.childContextTypes,e!=null}function il(){ce(nt),ce(We)}function Df(e,t,r){if(We.current!==yn)throw Error(T(168));ae(We,t),ae(nt,r)}function Xg(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(T(108,ww(e)||"Unknown",s));return ye({},r,n)}function ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,Kn=We.current,ae(We,e),ae(nt,nt.current),!0}function Mf(e,t,r){var n=e.stateNode;if(!n)throw Error(T(169));r?(e=Xg(e,t,Kn),n.__reactInternalMemoizedMergedChildContext=e,ce(nt),ce(We),ae(We,e)):ce(nt),ae(nt,r)}var br=null,zl=!1,Au=!1;function Zg(e){br===null?br=[e]:br.push(e)}function $b(e){zl=!0,Zg(e)}function Sn(){if(!Au&&br!==null){Au=!0;var e=0,t=se;try{var r=br;for(se=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}br=null,zl=!1}catch(s){throw br!==null&&(br=br.slice(e+1)),Eg(Fd,Sn),s}finally{se=t,Au=!1}}return null}var Es=[],xs=0,al=null,ll=0,kt=[],Et=0,qn=null,xr=1,Rr="";function Cn(e,t){Es[xs++]=ll,Es[xs++]=al,al=e,ll=t}function ey(e,t,r){kt[Et++]=xr,kt[Et++]=Rr,kt[Et++]=qn,qn=e;var n=xr;e=Rr;var s=32-zt(n)-1;n&=~(1<<s),r+=1;var i=32-zt(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,xr=1<<32-zt(t)+s|r<<s|n,Rr=i+e}else xr=1<<i|r<<s|n,Rr=e}function Qd(e){e.return!==null&&(Cn(e,1),ey(e,1,0))}function Jd(e){for(;e===al;)al=Es[--xs],Es[xs]=null,ll=Es[--xs],Es[xs]=null;for(;e===qn;)qn=kt[--Et],kt[Et]=null,Rr=kt[--Et],kt[Et]=null,xr=kt[--Et],kt[Et]=null}var pt=null,ft=null,he=!1,Ft=null;function ty(e,t){var r=xt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Uf(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,pt=e,ft=cn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,pt=e,ft=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=qn!==null?{id:xr,overflow:Rr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=xt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,pt=e,ft=null,!0):!1;default:return!1}}function Pc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ac(e){if(he){var t=ft;if(t){var r=t;if(!Uf(e,t)){if(Pc(e))throw Error(T(418));t=cn(r.nextSibling);var n=pt;t&&Uf(e,t)?ty(n,r):(e.flags=e.flags&-4097|2,he=!1,pt=e)}}else{if(Pc(e))throw Error(T(418));e.flags=e.flags&-4097|2,he=!1,pt=e}}}function Ff(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function oa(e){if(e!==pt)return!1;if(!he)return Ff(e),he=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xc(e.type,e.memoizedProps)),t&&(t=ft)){if(Pc(e))throw ry(),Error(T(418));for(;t;)ty(e,t),t=cn(t.nextSibling)}if(Ff(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ft=cn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ft=null}}else ft=pt?cn(e.stateNode.nextSibling):null;return!0}function ry(){for(var e=ft;e;)e=cn(e.nextSibling)}function ti(){ft=pt=null,he=!1}function Yd(e){Ft===null?Ft=[e]:Ft.push(e)}var Db=$r.ReactCurrentBatchConfig;function xi(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(T(309));var n=r.stateNode}if(!n)throw Error(T(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(T(284));if(!r._owner)throw Error(T(290,e))}return e}function aa(e,t){throw e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Bf(e){var t=e._init;return t(e._payload)}function ny(e){function t(f,m){if(e){var v=f.deletions;v===null?(f.deletions=[m],f.flags|=16):v.push(m)}}function r(f,m){if(!e)return null;for(;m!==null;)t(f,m),m=m.sibling;return null}function n(f,m){for(f=new Map;m!==null;)m.key!==null?f.set(m.key,m):f.set(m.index,m),m=m.sibling;return f}function s(f,m){return f=pn(f,m),f.index=0,f.sibling=null,f}function i(f,m,v){return f.index=v,e?(v=f.alternate,v!==null?(v=v.index,v<m?(f.flags|=2,m):v):(f.flags|=2,m)):(f.flags|=1048576,m)}function o(f){return e&&f.alternate===null&&(f.flags|=2),f}function a(f,m,v,b){return m===null||m.tag!==6?(m=Du(v,f.mode,b),m.return=f,m):(m=s(m,v),m.return=f,m)}function l(f,m,v,b){var k=v.type;return k===vs?d(f,m,v.props.children,b,v.key):m!==null&&(m.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Hr&&Bf(k)===m.type)?(b=s(m,v.props),b.ref=xi(f,m,v),b.return=f,b):(b=Ba(v.type,v.key,v.props,null,f.mode,b),b.ref=xi(f,m,v),b.return=f,b)}function u(f,m,v,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=Mu(v,f.mode,b),m.return=f,m):(m=s(m,v.children||[]),m.return=f,m)}function d(f,m,v,b,k){return m===null||m.tag!==7?(m=Vn(v,f.mode,b,k),m.return=f,m):(m=s(m,v),m.return=f,m)}function c(f,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Du(""+m,f.mode,v),m.return=f,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Jo:return v=Ba(m.type,m.key,m.props,null,f.mode,v),v.ref=xi(f,null,m),v.return=f,v;case ys:return m=Mu(m,f.mode,v),m.return=f,m;case Hr:var b=m._init;return c(f,b(m._payload),v)}if(ji(m)||bi(m))return m=Vn(m,f.mode,v,null),m.return=f,m;aa(f,m)}return null}function h(f,m,v,b){var k=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:a(f,m,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Jo:return v.key===k?l(f,m,v,b):null;case ys:return v.key===k?u(f,m,v,b):null;case Hr:return k=v._init,h(f,m,k(v._payload),b)}if(ji(v)||bi(v))return k!==null?null:d(f,m,v,b,null);aa(f,v)}return null}function p(f,m,v,b,k){if(typeof b=="string"&&b!==""||typeof b=="number")return f=f.get(v)||null,a(m,f,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Jo:return f=f.get(b.key===null?v:b.key)||null,l(m,f,b,k);case ys:return f=f.get(b.key===null?v:b.key)||null,u(m,f,b,k);case Hr:var E=b._init;return p(f,m,v,E(b._payload),k)}if(ji(b)||bi(b))return f=f.get(v)||null,d(m,f,b,k,null);aa(m,b)}return null}function g(f,m,v,b){for(var k=null,E=null,x=m,R=m=0,O=null;x!==null&&R<v.length;R++){x.index>R?(O=x,x=null):O=x.sibling;var P=h(f,x,v[R],b);if(P===null){x===null&&(x=O);break}e&&x&&P.alternate===null&&t(f,x),m=i(P,m,R),E===null?k=P:E.sibling=P,E=P,x=O}if(R===v.length)return r(f,x),he&&Cn(f,R),k;if(x===null){for(;R<v.length;R++)x=c(f,v[R],b),x!==null&&(m=i(x,m,R),E===null?k=x:E.sibling=x,E=x);return he&&Cn(f,R),k}for(x=n(f,x);R<v.length;R++)O=p(x,f,R,v[R],b),O!==null&&(e&&O.alternate!==null&&x.delete(O.key===null?R:O.key),m=i(O,m,R),E===null?k=O:E.sibling=O,E=O);return e&&x.forEach(function(z){return t(f,z)}),he&&Cn(f,R),k}function y(f,m,v,b){var k=bi(v);if(typeof k!="function")throw Error(T(150));if(v=k.call(v),v==null)throw Error(T(151));for(var E=k=null,x=m,R=m=0,O=null,P=v.next();x!==null&&!P.done;R++,P=v.next()){x.index>R?(O=x,x=null):O=x.sibling;var z=h(f,x,P.value,b);if(z===null){x===null&&(x=O);break}e&&x&&z.alternate===null&&t(f,x),m=i(z,m,R),E===null?k=z:E.sibling=z,E=z,x=O}if(P.done)return r(f,x),he&&Cn(f,R),k;if(x===null){for(;!P.done;R++,P=v.next())P=c(f,P.value,b),P!==null&&(m=i(P,m,R),E===null?k=P:E.sibling=P,E=P);return he&&Cn(f,R),k}for(x=n(f,x);!P.done;R++,P=v.next())P=p(x,f,R,P.value,b),P!==null&&(e&&P.alternate!==null&&x.delete(P.key===null?R:P.key),m=i(P,m,R),E===null?k=P:E.sibling=P,E=P);return e&&x.forEach(function(M){return t(f,M)}),he&&Cn(f,R),k}function w(f,m,v,b){if(typeof v=="object"&&v!==null&&v.type===vs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Jo:e:{for(var k=v.key,E=m;E!==null;){if(E.key===k){if(k=v.type,k===vs){if(E.tag===7){r(f,E.sibling),m=s(E,v.props.children),m.return=f,f=m;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Hr&&Bf(k)===E.type){r(f,E.sibling),m=s(E,v.props),m.ref=xi(f,E,v),m.return=f,f=m;break e}r(f,E);break}else t(f,E);E=E.sibling}v.type===vs?(m=Vn(v.props.children,f.mode,b,v.key),m.return=f,f=m):(b=Ba(v.type,v.key,v.props,null,f.mode,b),b.ref=xi(f,m,v),b.return=f,f=b)}return o(f);case ys:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){r(f,m.sibling),m=s(m,v.children||[]),m.return=f,f=m;break e}else{r(f,m);break}else t(f,m);m=m.sibling}m=Mu(v,f.mode,b),m.return=f,f=m}return o(f);case Hr:return E=v._init,w(f,m,E(v._payload),b)}if(ji(v))return g(f,m,v,b);if(bi(v))return y(f,m,v,b);aa(f,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(r(f,m.sibling),m=s(m,v),m.return=f,f=m):(r(f,m),m=Du(v,f.mode,b),m.return=f,f=m),o(f)):r(f,m)}return w}var ri=ny(!0),sy=ny(!1),ul=_n(null),cl=null,Rs=null,Xd=null;function Zd(){Xd=Rs=cl=null}function eh(e){var t=ul.current;ce(ul),e._currentValue=t}function Oc(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ls(e,t){cl=e,Xd=Rs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rt=!0),e.firstContext=null)}function Ct(e){var t=e._currentValue;if(Xd!==e)if(e={context:e,memoizedValue:t,next:null},Rs===null){if(cl===null)throw Error(T(308));Rs=e,cl.dependencies={lanes:0,firstContext:e}}else Rs=Rs.next=e;return t}var On=null;function th(e){On===null?On=[e]:On.push(e)}function iy(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,th(t)):(r.next=s.next,s.next=r),t.interleaved=r,Or(e,n)}function Or(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Wr=!1;function rh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oy(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Cr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,te&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Or(e,r)}return s=n.interleaved,s===null?(t.next=t,th(n)):(t.next=s.next,s.next=t),n.interleaved=t,Or(e,r)}function ja(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Bd(e,r)}}function zf(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function dl(e,t,r,n){var s=e.updateQueue;Wr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var c=s.baseState;o=0,d=u=l=null,a=i;do{var h=a.lane,p=a.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,y=a;switch(h=t,p=r,y.tag){case 1:if(g=y.payload,typeof g=="function"){c=g.call(p,c,h);break e}c=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,h=typeof g=="function"?g.call(p,c,h):g,h==null)break e;c=ye({},c,h);break e;case 2:Wr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(l=c),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Qn|=o,e.lanes=o,e.memoizedState=c}}function Hf(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(T(191,s));s.call(n)}}}var Mo={},ar=_n(Mo),ho=_n(Mo),fo=_n(Mo);function In(e){if(e===Mo)throw Error(T(174));return e}function nh(e,t){switch(ae(fo,t),ae(ho,e),ae(ar,Mo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:dc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=dc(t,e)}ce(ar),ae(ar,t)}function ni(){ce(ar),ce(ho),ce(fo)}function ay(e){In(fo.current);var t=In(ar.current),r=dc(t,e.type);t!==r&&(ae(ho,e),ae(ar,r))}function sh(e){ho.current===e&&(ce(ar),ce(ho))}var me=_n(0);function hl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ou=[];function ih(){for(var e=0;e<Ou.length;e++)Ou[e]._workInProgressVersionPrimary=null;Ou.length=0}var $a=$r.ReactCurrentDispatcher,Iu=$r.ReactCurrentBatchConfig,Gn=0,ge=null,Re=null,Ie=null,fl=!1,qi=!1,po=0,Mb=0;function Ue(){throw Error(T(321))}function oh(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Vt(e[r],t[r]))return!1;return!0}function ah(e,t,r,n,s,i){if(Gn=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$a.current=e===null||e.memoizedState===null?zb:Hb,e=r(n,s),qi){i=0;do{if(qi=!1,po=0,25<=i)throw Error(T(301));i+=1,Ie=Re=null,t.updateQueue=null,$a.current=Wb,e=r(n,s)}while(qi)}if($a.current=pl,t=Re!==null&&Re.next!==null,Gn=0,Ie=Re=ge=null,fl=!1,t)throw Error(T(300));return e}function lh(){var e=po!==0;return po=0,e}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ge.memoizedState=Ie=e:Ie=Ie.next=e,Ie}
vendor: 6,192 bytes, line 38
38function Tt(){if(Re===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Re.next;var t=Ie===null?ge.memoizedState:Ie.next;if(t!==null)Ie=t,Re=e;else{if(e===null)throw Error(T(310));Re=e,e={memoizedState:Re.memoizedState,baseState:Re.baseState,baseQueue:Re.baseQueue,queue:Re.queue,next:null},Ie===null?ge.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function mo(e,t){return typeof t=="function"?t(e):t}function Nu(e){var t=Tt(),r=t.queue;if(r===null)throw Error(T(311));r.lastRenderedReducer=e;var n=Re,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var d=u.lane;if((Gn&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=n):l=l.next=c,ge.lanes|=d,Qn|=d}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,Vt(n,t.memoizedState)||(rt=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,ge.lanes|=i,Qn|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Lu(e){var t=Tt(),r=t.queue;if(r===null)throw Error(T(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Vt(i,t.memoizedState)||(rt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function ly(){}function uy(e,t){var r=ge,n=Tt(),s=t(),i=!Vt(n.memoizedState,s);if(i&&(n.memoizedState=s,rt=!0),n=n.queue,uh(hy.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(r.flags|=2048,go(9,dy.bind(null,r,n,s,t),void 0,null),Ne===null)throw Error(T(349));Gn&30||cy(r,t,s)}return s}function cy(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function dy(e,t,r,n){t.value=r,t.getSnapshot=n,fy(t)&&py(e)}function hy(e,t,r){return r(function(){fy(t)&&py(e)})}function fy(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Vt(e,r)}catch{return!0}}function py(e){var t=Or(e,1);t!==null&&Ht(t,e,1,-1)}function Wf(e){var t=Yt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:e},t.queue=e,e=e.dispatch=Bb.bind(null,ge,e),[t.memoizedState,e]}function go(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function my(){return Tt().memoizedState}function Da(e,t,r,n){var s=Yt();ge.flags|=e,s.memoizedState=go(1|t,r,void 0,n===void 0?null:n)}function Hl(e,t,r,n){var s=Tt();n=n===void 0?null:n;var i=void 0;if(Re!==null){var o=Re.memoizedState;if(i=o.destroy,n!==null&&oh(n,o.deps)){s.memoizedState=go(t,r,i,n);return}}ge.flags|=e,s.memoizedState=go(1|t,r,i,n)}function Vf(e,t){return Da(8390656,8,e,t)}function uh(e,t){return Hl(2048,8,e,t)}function gy(e,t){return Hl(4,2,e,t)}function yy(e,t){return Hl(4,4,e,t)}function vy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wy(e,t,r){return r=r!=null?r.concat([e]):null,Hl(4,4,vy.bind(null,t,e),r)}function ch(){}function by(e,t){var r=Tt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&oh(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function _y(e,t){var r=Tt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&oh(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Sy(e,t,r){return Gn&21?(Vt(r,t)||(r=Cg(),ge.lanes|=r,Qn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,rt=!0),e.memoizedState=r)}function Ub(e,t){var r=se;se=r!==0&&4>r?r:4,e(!0);var n=Iu.transition;Iu.transition={};try{e(!1),t()}finally{se=r,Iu.transition=n}}function ky(){return Tt().memoizedState}function Fb(e,t,r){var n=fn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Ey(e))xy(t,r);else if(r=iy(e,t,r,n),r!==null){var s=Ge();Ht(r,e,n,s),Ry(r,t,n)}}function Bb(e,t,r){var n=fn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ey(e))xy(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Vt(a,o)){var l=t.interleaved;l===null?(s.next=s,th(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=iy(e,t,s,n),r!==null&&(s=Ge(),Ht(r,e,n,s),Ry(r,t,n))}}function Ey(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function xy(e,t){qi=fl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ry(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Bd(e,r)}}var pl={readContext:Ct,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},zb={readContext:Ct,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:Vf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Da(4194308,4,vy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){return Da(4,2,e,t)},useMemo:function(e,t){var r=Yt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Yt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Fb.bind(null,ge,e),[n.memoizedState,e]}
vendor: 4,278 bytes, line 38
38,useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:Wf,useDebugValue:ch,useDeferredValue:function(e){return Yt().memoizedState=e},useTransition:function(){var e=Wf(!1),t=e[0];return e=Ub.bind(null,e[1]),Yt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ge,s=Yt();if(he){if(r===void 0)throw Error(T(407));r=r()}else{if(r=t(),Ne===null)throw Error(T(349));Gn&30||cy(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,Vf(hy.bind(null,n,i,e),[e]),n.flags|=2048,go(9,dy.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Yt(),t=Ne.identifierPrefix;if(he){var r=Rr,n=xr;r=(n&~(1<<32-zt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=po++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Mb++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hb={readContext:Ct,useCallback:by,useContext:Ct,useEffect:uh,useImperativeHandle:wy,useInsertionEffect:gy,useLayoutEffect:yy,useMemo:_y,useReducer:Nu,useRef:my,useState:function(){return Nu(mo)},useDebugValue:ch,useDeferredValue:function(e){var t=Tt();return Sy(t,Re.memoizedState,e)},useTransition:function(){var e=Nu(mo)[0],t=Tt().memoizedState;return[e,t]},useMutableSource:ly,useSyncExternalStore:uy,useId:ky,unstable_isNewReconciler:!1},Wb={readContext:Ct,useCallback:by,useContext:Ct,useEffect:uh,useImperativeHandle:wy,useInsertionEffect:gy,useLayoutEffect:yy,useMemo:_y,useReducer:Lu,useRef:my,useState:function(){return Lu(mo)},useDebugValue:ch,useDeferredValue:function(e){var t=Tt();return Re===null?t.memoizedState=e:Sy(t,Re.memoizedState,e)},useTransition:function(){var e=Lu(mo)[0],t=Tt().memoizedState;return[e,t]},useMutableSource:ly,useSyncExternalStore:uy,useId:ky,unstable_isNewReconciler:!1};function $t(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ic(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ye({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Wl={isMounted:function(e){return(e=e._reactInternals)?es(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ge(),s=fn(e),i=Cr(n,s);i.payload=t,r!=null&&(i.callback=r),t=dn(e,i,s),t!==null&&(Ht(t,e,s,n),ja(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ge(),s=fn(e),i=Cr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=dn(e,i,s),t!==null&&(Ht(t,e,s,n),ja(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ge(),n=fn(e),s=Cr(r,n);s.tag=2,t!=null&&(s.callback=t),t=dn(e,s,n),t!==null&&(Ht(t,e,n,r),ja(t,e,n))}};function Kf(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!ao(r,n)||!ao(s,i):!0}function Cy(e,t,r){var n=!1,s=yn,i=t.contextType;return typeof i=="object"&&i!==null?i=Ct(i):(s=st(t)?Kn:We.current,n=t.contextTypes,i=(n=n!=null)?ei(e,s):yn),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function qf(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Wl.enqueueReplaceState(t,t.state,null)}function Nc(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},rh(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Ct(i):(i=st(t)?Kn:We.current,s.context=ei(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ic(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Wl.enqueueReplaceState(s,s.state,null),dl(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function si(e,t){try{var r="",n=t;
vendor: 7,864 bytes, lines 38-40
38do r+=vw(n),n=n.return;while(n);var s=r}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function ju(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Lc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Vb=typeof WeakMap=="function"?WeakMap:Map;function Ty(e,t,r){r=Cr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){gl||(gl=!0,Wc=n),Lc(e,t)},r}function Py(e,t,r){r=Cr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Lc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Lc(e,t),typeof n!="function"&&(hn===null?hn=new Set([this]):hn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Gf(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Vb;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=i_.bind(null,e,t,r),t.then(e,e))}function Qf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Jf(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Cr(-1,1),t.tag=2,dn(r,t,1))),r.lanes|=1),e)}var Kb=$r.ReactCurrentOwner,rt=!1;function Ke(e,t,r,n){t.child=e===null?sy(t,null,r,n):ri(t,e.child,r,n)}function Yf(e,t,r,n,s){r=r.render;var i=t.ref;return Ls(t,s),n=ah(e,t,r,n,i,s),r=lh(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ir(e,t,s)):(he&&r&&Qd(t),t.flags|=1,Ke(e,t,n,s),t.child)}function Xf(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!vh(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Ay(e,t,i,n,s)):(e=Ba(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:ao,r(o,n)&&e.ref===t.ref)return Ir(e,t,s)}return t.flags|=1,e=pn(i,n),e.ref=t.ref,e.return=t,t.child=e}function Ay(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(ao(i,n)&&e.ref===t.ref)if(rt=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(rt=!0);else return t.lanes=e.lanes,Ir(e,t,s)}return jc(e,t,r,n,s)}function Oy(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ae(Ts,lt),lt|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ae(Ts,lt),lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,ae(Ts,lt),lt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,ae(Ts,lt),lt|=n;return Ke(e,t,s,r),t.child}function Iy(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function jc(e,t,r,n,s){var i=st(r)?Kn:We.current;return i=ei(t,i),Ls(t,s),r=ah(e,t,r,n,i,s),n=lh(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ir(e,t,s)):(he&&n&&Qd(t),t.flags|=1,Ke(e,t,r,s),t.child)}function Zf(e,t,r,n,s){if(st(r)){var i=!0;ol(t)}else i=!1;if(Ls(t,s),t.stateNode===null)Ma(e,t),Cy(t,r,n),Nc(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=Ct(u):(u=st(r)?Kn:We.current,u=ei(t,u));var d=r.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&qf(t,o,n,u),Wr=!1;var h=t.memoizedState;o.state=h,dl(t,n,o,s),l=t.memoizedState,a!==n||h!==l||nt.current||Wr?(typeof d=="function"&&(Ic(t,r,d,n),l=t.memoizedState),(a=Wr||Kf(t,r,a,n,h,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,oy(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:$t(t.type,a),o.props=u,c=t.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Ct(l):(l=st(r)?Kn:We.current,l=ei(t,l));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||h!==l)&&qf(t,o,n,l),Wr=!1,h=t.memoizedState,o.state=h,dl(t,n,o,s);var g=t.memoizedState;a!==c||h!==g||nt.current||Wr?(typeof p=="function"&&(Ic(t,r,p,n),g=t.memoizedState),(u=Wr||Kf(t,r,u,n,h,g,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),o.props=n,o.state=g,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return $c(e,t,r,n,i,s)}function $c(e,t,r,n,s,i){Iy(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&Mf(t,r,!1),Ir(e,t,i);n=t.stateNode,Kb.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=ri(t,e.child,null,i),t.child=ri(t,null,a,i)):Ke(e,t,a,i),t.memoizedState=n.state,s&&Mf(t,r,!0),t.child}function Ny(e){var t=e.stateNode;t.pendingContext?Df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Df(e,t.context,!1),nh(e,t.containerInfo)}function ep(e,t,r,n,s){return ti(),Yd(s),t.flags|=256,Ke(e,t,r,n),t.child}var Dc={dehydrated:null,treeContext:null,retryLane:0};function Mc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ly(e,t,r){var n=t.pendingProps,s=me.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ae(me,s&1),e===null)return Ac(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ql(o,n,0,null),e=Vn(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mc(r),t.memoizedState=Dc,e):dh(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return qb(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=pn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=pn(a,i):(i=Vn(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Mc(r):{base
vendor: 8,213 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Dc,n}return i=e.child,e=i.sibling,n=pn(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function dh(e,t){return t=ql({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function la(e,t,r,n){return n!==null&&Yd(n),ri(t,e.child,null,r),e=dh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qb(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=ju(Error(T(422))),la(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=ql({mode:"visible",children:n.children},s,0,null),i=Vn(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&ri(t,e.child,null,o),t.child.memoizedState=Mc(o),t.memoizedState=Dc,i);if(!(t.mode&1))return la(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(T(419)),n=ju(i,n,void 0),la(e,t,o,n)}if(a=(o&e.childLanes)!==0,rt||a){if(n=Ne,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Or(e,s),Ht(n,e,s,-1))}return yh(),n=ju(Error(T(421))),la(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=o_.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,ft=cn(s.nextSibling),pt=t,he=!0,Ft=null,e!==null&&(kt[Et++]=xr,kt[Et++]=Rr,kt[Et++]=qn,xr=e.id,Rr=e.overflow,qn=t),t=dh(t,n.children),t.flags|=4096,t)}function tp(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Oc(e.return,t,r)}function $u(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function jy(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(Ke(e,t,n.children,r),n=me.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tp(e,r,t);else if(e.tag===19)tp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ae(me,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&hl(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),$u(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&hl(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}$u(t,!0,r,null,i);break;case"together":$u(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ma(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ir(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Qn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,r=pn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=pn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Gb(e,t,r){switch(t.tag){case 3:Ny(t),ti();break;case 5:ay(t);break;case 1:st(t.type)&&ol(t);break;case 4:nh(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;ae(ul,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ae(me,me.current&1),t.flags|=128,null):r&t.child.childLanes?Ly(e,t,r):(ae(me,me.current&1),e=Ir(e,t,r),e!==null?e.sibling:null);ae(me,me.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return jy(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ae(me,me.current),n)break;return null;case 22:case 23:return t.lanes=0,Oy(e,t,r)}return Ir(e,t,r)}var $y,Uc,Dy,My;$y=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Uc=function(){};Dy=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,In(ar.current);var i=null;switch(r){case"input":s=ac(e,s),n=ac(e,n),i=[];break;case"select":s=ye({},s,{value:void 0}),n=ye({},n,{value:void 0}),i=[];break;case"textarea":s=cc(e,s),n=cc(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=sl)}hc(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(eo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(eo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ue("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};My=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ri(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Qb(e,t,r){var n=t.pendingProps;switch(Jd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return st(t.type)&&il(),Fe(t),null;case 3:return n=t.stateNode,ni(),ce(nt),ce(We),ih(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(oa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ft!==null&&(qc(Ft),Ft=null))),Uc(e,t),Fe(t),null;case 5:sh(t);var s=In(fo.current);if(r=t.type,e!==null&&t.stateNode!=null)Dy(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(T(166));return Fe(t),null}if(e=In(ar.current),oa(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[nr]=t,n[co]=i,e=(t.mode&1)!==0,r){case"dialog":ue("cancel",n),ue("close",n);break;case"iframe":case"object":case"embed":ue("load",n);break;case"video":case"audio":for(s=0;s<Di.length;s++)ue(Di[s],n);break;case"source":ue("error",n);break;case"img":case"image":case"link":ue("error",n),ue("load",n);break;case"details":ue("toggle",n);break;case"input":cf(n,i),ue("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},ue("invalid",n);break;case"textarea":hf(n,i),ue("invalid",n)}hc(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 31,695 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&ia(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ia(n.textContent,a,e),s=["children",""+a]):eo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ue("scroll",n)}switch(r){case"input":Yo(n),df(n,i,!0);break;case"textarea":Yo(n),ff(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=sl)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hg(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[nr]=t,e[co]=n,$y(e,t,!1,!1),t.stateNode=e;e:{switch(o=fc(r,n),r){case"dialog":ue("cancel",e),ue("close",e),s=n;break;case"iframe":case"object":case"embed":ue("load",e),s=n;break;case"video":case"audio":for(s=0;s<Di.length;s++)ue(Di[s],e);s=n;break;case"source":ue("error",e),s=n;break;case"img":case"image":case"link":ue("error",e),ue("load",e),s=n;break;case"details":ue("toggle",e),s=n;break;case"input":cf(e,n),s=ac(e,n),ue("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ye({},n,{value:void 0}),ue("invalid",e);break;case"textarea":hf(e,n),s=cc(e,n),ue("invalid",e);break;default:s=n}hc(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?mg(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&fg(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&to(e,l):typeof l=="number"&&to(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(eo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ue("scroll",e):l!=null&&jd(e,i,l,o))}switch(r){case"input":Yo(e),df(e,n,!1);break;case"textarea":Yo(e),ff(e);break;case"option":n.value!=null&&e.setAttribute("value",""+gn(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?As(e,!!n.multiple,i,!1):n.defaultValue!=null&&As(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=sl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Fe(t),null;case 6:if(e&&t.stateNode!=null)My(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(T(166));if(r=In(fo.current),In(ar.current),oa(t)){if(n=t.stateNode,r=t.memoizedProps,n[nr]=t,(i=n.nodeValue!==r)&&(e=pt,e!==null))switch(e.tag){case 3:ia(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ia(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[nr]=t,t.stateNode=n}return Fe(t),null;case 13:if(ce(me),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(he&&ft!==null&&t.mode&1&&!(t.flags&128))ry(),ti(),t.flags|=98560,i=!1;else if(i=oa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(T(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(T(317));i[nr]=t}else ti(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fe(t),i=!1}else Ft!==null&&(qc(Ft),Ft=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||me.current&1?Te===0&&(Te=3):yh())),t.updateQueue!==null&&(t.flags|=4),Fe(t),null);case 4:return ni(),Uc(e,t),e===null&&lo(t.stateNode.containerInfo),Fe(t),null;case 10:return eh(t.type._context),Fe(t),null;case 17:return st(t.type)&&il(),Fe(t),null;case 19:if(ce(me),i=t.memoizedState,i===null)return Fe(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Ri(i,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=hl(e),o!==null){for(t.flags|=128,Ri(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ae(me,me.current&1|2),t.child}e=e.sibling}i.tail!==null&&Se()>ii&&(t.flags|=128,n=!0,Ri(i,!1),t.lanes=4194304)}else{if(!n)if(e=hl(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ri(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!he)return Fe(t),null}else 2*Se()-i.renderingStartTime>ii&&r!==1073741824&&(t.flags|=128,n=!0,Ri(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Se(),t.sibling=null,r=me.current,ae(me,n?r&1|2:r&1),t):(Fe(t),null);case 22:case 23:return gh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?lt&1073741824&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function Jb(e,t){switch(Jd(t),t.tag){case 1:return st(t.type)&&il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ni(),ce(nt),ce(We),ih(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sh(t),null;case 13:if(ce(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(me),null;case 4:return ni(),null;case 10:return eh(t.type._context),null;case 22:case 23:return gh(),null;case 24:return null;default:return null}}var ua=!1,He=!1,Yb=typeof WeakSet=="function"?WeakSet:Set,j=null;function Cs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){be(e,t,n)}else r.current=null}function Fc(e,t,r){try{r()}catch(n){be(e,t,n)}}var rp=!1;function Xb(e,t){if(kc=tl,e=Hg(),Gd(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,d=0,c=e,h=null;t:for(;;){for(var p;c!==r||s!==0&&c.nodeType!==3||(a=o+s),c!==i||n!==0&&c.nodeType!==3||(l=o+n),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)h=c,c=p;for(;;){if(c===e)break t;if(h===r&&++u===s&&(a=o),h===i&&++d===n&&(l=o),(p=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=p}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ec={focusedElem:e,selectionRange:r},tl=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,w=g.memoizedState,f=t.stateNode,m=f.getSnapshotBeforeUpdate(t.elementType===t.type?y:$t(t.type,y),w);f.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(b){be(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return g=rp,rp=!1,g}function Gi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Fc(t,r,i)}s=s.next}while(s!==n)}}function Vl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Bc(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Uy(e){var t=e.alternate;t!==null&&(e.alternate=null,Uy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nr],delete t[co],delete t[Cc],delete t[Lb],delete t[jb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fy(e){return e.tag===5||e.tag===3||e.tag===4}function np(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zc(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=sl));else if(n!==4&&(e=e.child,e!==null))for(zc(e,t,r),e=e.sibling;e!==null;)zc(e,t,r),e=e.sibling}function Hc(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Hc(e,t,r),e=e.sibling;e!==null;)Hc(e,t,r),e=e.sibling}var je=null,Ut=!1;function Ur(e,t,r){for(r=r.child;r!==null;)By(e,t,r),r=r.sibling}function By(e,t,r){if(or&&typeof or.onCommitFiberUnmount=="function")try{or.onCommitFiberUnmount(Dl,r)}catch{}switch(r.tag){case 5:He||Cs(r,t);case 6:var n=je,s=Ut;je=null,Ur(e,t,r),je=n,Ut=s,je!==null&&(Ut?(e=je,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):je.removeChild(r.stateNode));break;case 18:je!==null&&(Ut?(e=je,r=r.stateNode,e.nodeType===8?Pu(e.parentNode,r):e.nodeType===1&&Pu(e,r),io(e)):Pu(je,r.stateNode));break;case 4:n=je,s=Ut,je=r.stateNode.containerInfo,Ut=!0,Ur(e,t,r),je=n,Ut=s;break;case 0:case 11:case 14:case 15:if(!He&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Fc(r,t,o),s=s.next}while(s!==n)}Ur(e,t,r);break;case 1:if(!He&&(Cs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){be(r,t,a)}Ur(e,t,r);break;case 21:Ur(e,t,r);break;case 22:r.mode&1?(He=(n=He)||r.memoizedState!==null,Ur(e,t,r),He=n):Ur(e,t,r);break;default:Ur(e,t,r)}}function sp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Yb),t.forEach(function(n){var s=a_.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Nt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:je=a.stateNode,Ut=!1;break e;case 3:je=a.stateNode.containerInfo,Ut=!0;break e;case 4:je=a.stateNode.containerInfo,Ut=!0;break e}a=a.return}if(je===null)throw Error(T(160));By(i,o,s),je=null,Ut=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){be(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zy(t,e),t=t.sibling}function zy(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Nt(t,e),Qt(e),n&4){try{Gi(3,e,e.return),Vl(3,e)}catch(y){be(e,e.return,y)}try{Gi(5,e,e.return)}catch(y){be(e,e.return,y)}}break;case 1:Nt(t,e),Qt(e),n&512&&r!==null&&Cs(r,r.return);break;case 5:if(Nt(t,e),Qt(e),n&512&&r!==null&&Cs(r,r.return),e.flags&32){var s=e.stateNode;try{to(s,"")}catch(y){be(e,e.return,y)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&cg(s,i),fc(a,o);var u=fc(a,i);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?mg(s,c):d==="dangerouslySetInnerHTML"?fg(s,c):d==="children"?to(s,c):jd(s,d,c,u)}switch(a){case"input":lc(s,i);break;case"textarea":dg(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?As(s,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?As(s,!!i.multiple,i.defaultValue,!0):As(s,!!i.multiple,i.multiple?[]:"",!1))}s[co]=i}catch(y){be(e,e.return,y)}}break;case 6:if(Nt(t,e),Qt(e),n&4){if(e.stateNode===null)throw Error(T(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){be(e,e.return,y)}}break;case 3:if(Nt(t,e),Qt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{io(t.containerInfo)}catch(y){be(e,e.return,y)}break;case 4:Nt(t,e),Qt(e);break;case 13:Nt(t,e),Qt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(ph=Se())),n&4&&sp(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(He=(u=He)||d,Nt(t,e),He=u):Nt(t,e),Qt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(j=e,d=e.child;d!==null;){for(c=j=d;j!==null;){switch(h=j,p=h.child,h.tag){case 0:case 11:case 14:case 15:Gi(4,h,h.return);break;case 1:Cs(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(y){be(n,r,y)}}break;case 5:Cs(h,h.return);break;case 22:if(h.memoizedState!==null){op(c);continue}}p!==null?(p.return=h,j=p):op(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{s=c.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=pg("display",o))}catch(y){be(e,e.return,y)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(y){be(e,e.return,y)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Nt(t,e),Qt(e),n&4&&sp(e);break;case 21:break;default:Nt(t,e),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Fy(r)){var n=r;break e}r=r.return}throw Error(T(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(to(s,""),n.flags&=-33);var i=np(e);Hc(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=np(e);zc(e,a,o);break;default:throw Error(T(161))}}catch(l){be(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zb(e,t,r){j=e,Hy(e)}function Hy(e,t,r){for(var n=(e.mode&1)!==0;j!==null;){var s=j,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||ua;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||He;a=ua;var u=He;if(ua=o,(He=l)&&!u)for(j=s;j!==null;)o=j,l=o.child,o.tag===22&&o.memoizedState!==null?ap(s):l!==null?(l.return=o,j=l):ap(s);for(;i!==null;)j=i,Hy(i),i=i.sibling;j=s,ua=a,He=u}ip(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,j=i):ip(e)}}function ip(e){for(;j!==null;){var t=j;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:He||Vl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!He)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:$t(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Hf(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Hf(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&io(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(T(163))}He||t.flags&512&&Bc(t)}catch(h){be(t,t.return,h)}}if(t===e){j=null;break}if(r=t.sibling,r!==null){r.return=t.return,j=r;break}j=t.return}}function op(e){for(;j!==null;){var t=j;if(t===e){j=null;break}var r=t.sibling;if(r!==null){r.return=t.return,j=r;break}j=t.return}}function ap(e){for(;j!==null;){var t=j;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Vl(4,t)}catch(l){be(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){be(t,s,l)}}var i=t.return;try{Bc(t)}catch(l){be(t,i,l)}break;case 5:var o=t.return;try{Bc(t)}catch(l){be(t,o,l)}}}catch(l){be(t,t.return,l)}if(t===e){j=null;break}var a=t.sibling;if(a!==null){a.return=t.return,j=a;break}j=t.return}}var e_=Math.ceil,ml=$r.ReactCurrentDispatcher,hh=$r.ReactCurrentOwner,Rt=$r.ReactCurrentBatchConfig,te=0,Ne=null,xe=null,$e=0,lt=0,Ts=_n(0),Te=0,yo=null,Qn=0,Kl=0,fh=0,Qi=null,tt=null,ph=0,ii=1/0,gr=null,gl=!1,Wc=null,hn=null,ca=!1,on=null,yl=0,Ji=0,Vc=null,Ua=-1,Fa=0;function Ge(){return te&6?Se():Ua!==-1?Ua:Ua=Se()}function fn(e){return e.mode&1?te&2&&$e!==0?$e&-$e:Db.transition!==null?(Fa===0&&(Fa=Cg()),Fa):(e=se,e!==0||(e=window.event,e=e===void 0?16:Lg(e.type)),e):1}function Ht(e,t,r,n){if(50<Ji)throw Ji=0,Vc=null,Error(T(185));jo(e,r,n),(!(te&2)||e!==Ne)&&(e===Ne&&(!(te&2)&&(Kl|=r),Te===4&&Kr(e,$e)),it(e,n),r===1&&te===0&&!(t.mode&1)&&(ii=Se()+500,zl&&Sn()))}function it(e,t){var r=e.callbackNode;Dw(e,t);var n=el(e,e===Ne?$e:0);if(n===0)r!==null&&gf(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&gf(r),t===1)e.tag===0?$b(lp.bind(null,e)):Zg(lp.bind(null,e)),Ib(function(){!(te&6)&&Sn()}),r=null;else{switch(Tg(n)){case 1:r=Fd;break;case 4:r=xg;break;case 16:r=Za;break;case 536870912:r=Rg;break;default:r=Za}r=Yy(r,Wy.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Wy(e,t){if(Ua=-1,Fa=0,te&6)throw Error(T(327));var r=e.callbackNode;if(js()&&e.callbackNode!==r)return null;var n=el(e,e===Ne?$e:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=vl(e,n);else{t=n;var s=te;te|=2;var i=Ky();(Ne!==e||$e!==t)&&(gr=null,ii=Se()+500,Wn(e,t));do try{n_();break}catch(a){Vy(e,a)}while(!0);Zd(),ml.current=i,te=s,xe!==null?t=0:(Ne=null,$e=0,t=Te)}if(t!==0){if(t===2&&(s=vc(e),s!==0&&(n=s,t=Kc(e,s))),t===1)throw r=yo,Wn(e,0),Kr(e,n),it(e,Se()),r;if(t===6)Kr(e,n);else{if(s=e.current.alternate,!(n&30)&&!t_(s)&&(t=vl(e,n),t===2&&(i=vc(e),i!==0&&(n=i,t=Kc(e,i))),t===1))throw r=yo,Wn(e,0),Kr(e,n),it(e,Se()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(T(345));case 2:Tn(e,tt,gr);break;case 3:if(Kr(e,n),(n&130023424)===n&&(t=ph+500-Se(),10<t)){if(el(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ge(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Rc(Tn.bind(null,e,tt,gr),t);break}Tn(e,tt,gr);break;case 4:if(Kr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-zt(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=Se()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*e_(n/1960))-n,10<n){e.timeoutHandle=Rc(Tn.bind(null,e,tt,gr),n);break}Tn(e,tt,gr);break;case 5:Tn(e,tt,gr);break;default:throw Error(T(329))}}}return it(e,Se()),e.callbackNode===r?Wy.bind(null,e):null}function Kc(e,t){var r=Qi;return e.current.memoizedState.isDehydrated&&(Wn(e,t).flags|=256),e=vl(e,t),e!==2&&(t=tt,tt=r,t!==null&&qc(t)),e}function qc(e){tt===null?tt=e:tt.push.apply(tt,e)}function t_(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Vt(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kr(e,t){for(t&=~fh,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-zt(t),n=1<<r;e[r]=-1,t&=~n}}function lp(e){if(te&6)throw Error(T(327));js();var t=el(e,0);if(!(t&1))return it(e,Se()),null;var r=vl(e,t);if(e.tag!==0&&r===2){var n=vc(e);n!==0&&(t=n,r=Kc(e,n))}if(r===1)throw r=yo,Wn(e,0),Kr(e,t),it(e,Se()),r;if(r===6)throw Error(T(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tn(e,tt,gr),it(e,Se()),null}function mh(e,t){var r=te;te|=1;try{return e(t)}finally{te=r,te===0&&(ii=Se()+500,zl&&Sn())}}function Jn(e){on!==null&&on.tag===0&&!(te&6)&&js();var t=te;te|=1;var r=Rt.transition,n=se;try{if(Rt.transition=null,se=1,e)return e()}finally{se=n,Rt.transition=r,te=t,!(te&6)&&Sn()}}function gh(){lt=Ts.current,ce(Ts)}function Wn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Ob(r)),xe!==null)for(r=xe.return;r!==null;){var n=r;switch(Jd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&il();break;case 3:ni(),ce(nt),ce(We),ih();break;case 5:sh(n);break;case 4:ni();break;case 13:ce(me);break;case 19:ce(me);break;case 10:eh(n.type._context);break;case 22:case 23:gh()}r=r.return}if(Ne=e,xe=e=pn(e.current,null),$e=lt=t,Te=0,yo=null,fh=Kl=Qn=0,tt=Qi=null,On!==null){for(t=0;t<On.length;t++)if(r=On[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}On=null}return e}function Vy(e,t){do{var r=xe;try{if(Zd(),$a.current=pl,fl){for(var n=ge.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}fl=!1}if(Gn=0,Ie=Re=ge=null,qi=!1,po=0,hh.current=null,r===null||r.return===null){Te=1,yo=t,xe=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=$e,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Qf(o);if(p!==null){p.flags&=-257,Jf(p,o,a,i,t),p.mode&1&&Gf(i,u,t),t=p,l=u;var g=t.updateQueue;if(g===null){var y=new Set;y.add(l),t.updateQueue=y}else g.add(l);break e}else{if(!(t&1)){Gf(i,u,t),yh();break e}l=Error(T(426))}}else if(he&&a.mode&1){var w=Qf(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Jf(w,o,a,i,t),Yd(si(l,a));break e}}i=l=si(l,a),Te!==4&&(Te=2),Qi===null?Qi=[i]:Qi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=Ty(i,l,t);zf(i,f);break e;case 1:a=l;var m=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(hn===null||!hn.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=Py(i,a,t);zf(i,b);break e}}i=i.return}while(i!==null)}Gy(r)}catch(k){t=k,xe===r&&r!==null&&(xe=r=r.return);continue}break}while(!0)}function Ky(){var e=ml.current;return ml.current=pl,e===null?pl:e}function yh(){(Te===0||Te===3||Te===2)&&(Te=4),Ne===null||!(Qn&268435455)&&!(Kl&268435455)||Kr(Ne,$e)}function vl(e,t){var r=te;te|=2;var n=Ky();(Ne!==e||$e!==t)&&(gr=null,Wn(e,t));do try{r_();break}catch(s){Vy(e,s)}while(!0);if(Zd(),te=r,ml.current=n,xe!==null)throw Error(T(261));return Ne=null,$e=0,Te}function r_(){for(;xe!==null;)qy(xe)}function n_(){for(;xe!==null&&!Tw();)qy(xe)}function qy(e){var t=Jy(e.alternate,e,lt);e.memoizedProps=e.pendingProps,t===null?Gy(e):xe=t,hh.current=null}function Gy(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Jb(r,t),r!==null){r.flags&=32767,xe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,xe=null;return}}else if(r=Qb(r,t,lt),r!==null){xe=r;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Te===0&&(Te=5)}function Tn(e,t,r){var n=se,s=Rt.transition;try{Rt.transition=null,se=1,s_(e,t,r,n)}finally{Rt.transition=s,se=n}return null}function s_(e,t,r,n){do js();while(on!==null);if(te&6)throw Error(T(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(T(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Mw(e,i),e===Ne&&(xe=Ne=null,$e=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ca||(ca=!0,Yy(Za,function(){return js(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Rt.transition,Rt.transition=null;var o=se;se=1;var a=te;te|=4,hh.current=null,Xb(e,r),zy(r,e),Eb(Ec),tl=!!kc,Ec=kc=null,e.current=r,Zb(r),Pw(),te=a,se=o,Rt.transition=i}else e.current=r;if(ca&&(ca=!1,on=e,yl=s),i=e.pendingLanes,i===0&&(hn=null),Iw(r.stateNode),it(e,Se()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(gl)throw gl=!1,e=Wc,Wc=null,e;return yl&1&&e.tag!==0&&js(),i=e.pendingLanes,i&1?e===Vc?Ji++:(Ji=0,Vc=e):Ji=0,Sn(),null}function js(){if(on!==null){var e=Tg(yl),t=Rt.transition,r=se;try{if(Rt.transition=null,se=16>e?16:e,on===null)var n=!1;else{if(e=on,on=null,yl=0,te&6)throw Error(T(331));var s=te;for(te|=4,j=e.current;j!==null;){var i=j,o=i.child;if(j.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(j=u;j!==null;){var d=j;switch(d.tag){case 0:case 11:case 15:Gi(8,d,i)}var c=d.child;if(c!==null)c.return=d,j=c;else for(;j!==null;){d=j;var h=d.sibling,p=d.return;if(Uy(d),d===u){j=null;break}if(h!==null){h.return=p,j=h;break}j=p}}}var g=i.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}j=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,j=o;else e:for(;j!==null;){if(i=j,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Gi(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,j=f;break e}j=i.return}}var m=e.current;for(j=m;j!==null;){o=j;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,j=v;else e:for(o=m;j!==null;){if(a=j,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Vl(9,a)}}catch(k){be(a,a.return,k)}if(a===o){j=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,j=b;break e}j=a.return}}if(te=s,Sn(),or&&typeof or.onPostCommitFiberRoot=="function")try{or.onPostCommitFiberRoot(Dl,e)}catch{}n=!0}return n}finally{se=r,Rt.transition=t}}return!1}function up(e,t,r){t=si(r,t),t=Ty(e,t,1),e=dn(e,t,1),t=Ge(),e!==null&&(jo(e,1,t),it(e,t))}function be(e,t,r){if(e.tag===3)up(e,e,r);else for(;t!==null;){if(t.tag===3){up(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(hn===null||!hn.has(n))){e=si(r,e),e=Py(t,e,1),t=dn(t,e,1),e=Ge(),t!==null&&(jo(t,1,e),it(t,e));break}}t=t.return}}function i_(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ge(),e.pingedLanes|=e.suspendedLanes&r,Ne===e&&($e&r)===r&&(Te===4||Te===3&&($e&130023424)===$e&&500>Se()-ph?Wn(e,0):fh|=r),it(e,t)}function Qy(e,t){t===0&&(e.mode&1?(t=ea,ea<<=1,!(ea&130023424)&&(ea=4194304)):t=1);var r=Ge();e=Or(e,t),e!==null&&(jo(e,t,r),it(e,r))}function o_(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Qy(e,r)}function a_(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(T(314))}n!==null&&n.delete(t),Qy(e,r)}var Jy;Jy=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||nt.current)rt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return rt=!1,Gb(e,t,r);rt=!!(e.flags&131072)}else rt=!1,he&&t.flags&1048576&&ey(t,ll,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ma(e,t),e=t.pendingProps;var s=ei(t,We.current);Ls(t,r),s=ah(null,t,n,e,s,r);var i=lh();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,st(n)?(i=!0,ol(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,rh(t),s.updater=Wl,t.stateNode=s,s._reactInternals=t,Nc(t,n,e,r),t=$c(null,t,n,!0,i,r)):(t.tag=0,he&&i&&Qd(t),Ke(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ma(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=u_(n),e=$t(n,e),s){case 0:t=jc(null,t,n,e,r);break e;case 1:t=Zf(null,t,n,e,r);break e;case 11:t=Yf(null,t,n,e,r);break e;case 14:t=Xf(null,t,n,$t(n.type,e),r);break e}throw Error(T(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),jc(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),Zf(e,t,n,s,r);case 3:e:{if(Ny(t),e===null)throw Error(T(387));n=t.pendingProps,i=t.memoizedState,s=i.element,oy(e,t),dl(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=si(Error(T(423)),t),t=ep(e,t,n,r,s);break e}else if(n!==s){s=si(Error(T(424)),t),t=ep(e,t,n,r,s);break e}else for(ft=cn(t.stateNode.containerInfo.firstChild),pt=t,he=!0,Ft=null,r=sy(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ti(),n===s){t=Ir(e,t,r);break e}Ke(e,t,n,r)}t=t.child}return t;case 5:return ay(t),e===null&&Ac(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,xc(n,s)?o=null:i!==null&&xc(n,i)&&(t.flags|=32),Iy(e,t),Ke(e,t,o,r),t.child;case 6:return e===null&&Ac(t),null;case 13:return Ly(e,t,r);case 4:return nh(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ri(t,null,n,r):Ke(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),Yf(e,t,n,s,r);case 7:return Ke(e,t,t.pendingProps,r),t.child;case 8:return Ke(e,t,t.pendingProps.children,r),t.child;case 12:return Ke(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,ae(ul,n._currentValue),n._currentValue=o,i!==null)if(Vt(i.value,o)){if(i.children===s.children&&!nt.current){t=Ir(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Cr(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Oc(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(T(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Oc(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ke(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ls(t,r),s=Ct(s),n=n(s),t.flags|=1,Ke(e,t,n,r),t.child;case 14:return n=t.type,s=$t(n,t.pendingProps),s=$t(n.type,s),Xf(e,t,n,s,r);case 15:return Ay(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:$t(n,s),Ma(e,t),t.tag=1,st(n)?(e=!0,ol(t)):e=!1,Ls(t,r),Cy(t,n,s),Nc(t,n,s,r),$c(null,t,n,!0,e,r);case 19:return jy(e,t,r);case 22:return Oy(e,t,r)}throw Error(T(156,t.tag))};function Yy(e,t){return Eg(e,t)}function l_(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 10,941 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,r,n){return new l_(e,t,r,n)}function vh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function u_(e){if(typeof e=="function")return vh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dd)return 11;if(e===Md)return 14}return 2}function pn(e,t){var r=e.alternate;return r===null?(r=xt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ba(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")vh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case vs:return Vn(r.children,s,i,t);case $d:o=8,s|=8;break;case nc:return e=xt(12,r,t,s|2),e.elementType=nc,e.lanes=i,e;case sc:return e=xt(13,r,t,s),e.elementType=sc,e.lanes=i,e;case ic:return e=xt(19,r,t,s),e.elementType=ic,e.lanes=i,e;case ag:return ql(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ig:o=10;break e;case og:o=9;break e;case Dd:o=11;break e;case Md:o=14;break e;case Hr:o=16,n=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=xt(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Vn(e,t,r,n){return e=xt(7,e,n,t),e.lanes=r,e}function ql(e,t,r,n){return e=xt(22,e,n,t),e.elementType=ag,e.lanes=r,e.stateNode={isHidden:!1},e}function Du(e,t,r){return e=xt(6,e,null,t),e.lanes=r,e}function Mu(e,t,r){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function c_(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vu(0),this.expirationTimes=vu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function wh(e,t,r,n,s,i,o,a,l){return e=new c_(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=xt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},rh(i),e}function d_(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ys,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Xy(e){if(!e)return yn;e=e._reactInternals;e:{if(es(e)!==e||e.tag!==1)throw Error(T(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(st(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(T(171))}if(e.tag===1){var r=e.type;if(st(r))return Xg(e,r,t)}return t}function Zy(e,t,r,n,s,i,o,a,l){return e=wh(r,n,!0,e,s,i,o,a,l),e.context=Xy(null),r=e.current,n=Ge(),s=fn(r),i=Cr(n,s),i.callback=t??null,dn(r,i,s),e.current.lanes=s,jo(e,s,n),it(e,n),e}function Gl(e,t,r,n){var s=t.current,i=Ge(),o=fn(s);return r=Xy(r),t.context===null?t.context=r:t.pendingContext=r,t=Cr(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=dn(s,t,o),e!==null&&(Ht(e,s,o,i),ja(e,s,o)),o}function wl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function bh(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function h_(){return null}var ev=typeof reportError=="function"?reportError:function(e){console.error(e)};function _h(e){this._internalRoot=e}Ql.prototype.render=_h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));Gl(e,t,null,null)};Ql.prototype.unmount=_h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jn(function(){Gl(null,e,null,null)}),t[Ar]=null}};function Ql(e){this._internalRoot=e}Ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=Og();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Vr.length&&t!==0&&t<Vr[r].priority;r++);Vr.splice(r,0,e),r===0&&Ng(e)}};function Sh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Jl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dp(){}function f_(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=wl(o);i.call(u)}}var o=Zy(t,n,e,0,null,!1,!1,"",dp);return e._reactRootContainer=o,e[Ar]=o.current,lo(e.nodeType===8?e.parentNode:e),Jn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=wl(l);a.call(u)}}var l=wh(e,0,!1,null,null,!1,!1,"",dp);return e._reactRootContainer=l,e[Ar]=l.current,lo(e.nodeType===8?e.parentNode:e),Jn(function(){Gl(t,l,r,n)}),l}function Yl(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=wl(o);a.call(l)}}Gl(t,o,e,s)}else o=f_(r,t,e,s,n);return wl(o)}Pg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=$i(t.pendingLanes);r!==0&&(Bd(t,r|1),it(t,Se()),!(te&6)&&(ii=Se()+500,Sn()))}break;case 13:Jn(function(){var n=Or(e,1);if(n!==null){var s=Ge();Ht(n,e,1,s)}}),bh(e,1)}};zd=function(e){if(e.tag===13){var t=Or(e,134217728);if(t!==null){var r=Ge();Ht(t,e,134217728,r)}bh(e,134217728)}};Ag=function(e){if(e.tag===13){var t=fn(e),r=Or(e,t);if(r!==null){var n=Ge();Ht(r,e,t,n)}bh(e,t)}};Og=function(){return se};Ig=function(e,t){var r=se;try{return se=e,t()}finally{se=r}};mc=function(e,t,r){switch(t){case"input":if(lc(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Bl(n);if(!s)throw Error(T(90));ug(n),lc(n,s)}}}break;case"textarea":dg(e,r);break;case"select":t=r.value,t!=null&&As(e,!!r.multiple,t,!1)}};vg=mh;wg=Jn;var p_={usingClientEntryPoint:!1,Events:[Do,Ss,Bl,gg,yg,mh]},Ci={findFiberByHostInstance:An,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m_={bundleType:Ci.bundleType,version:Ci.version,rendererPackageName:Ci.rendererPackageName,rendererConfig:Ci.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$r.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Sg(e),e===null?null:e.stateNode},findFiberByHostInstance:Ci.findFiberByHostInstance||h_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var da=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!da.isDisabled&&da.supportsFiber)try{Dl=da.inject(m_),or=da}catch{}}yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=p_;yt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Sh(t))throw Error(T(200));return d_(e,t,null,r)};yt.createRoot=function(e,t){if(!Sh(e))throw Error(T(299));var r=!1,n="",s=ev;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=wh(e,1,!1,null,null,r,!1,n,s),e[Ar]=t.current,lo(e.nodeType===8?e.parentNode:e),new _h(t)};yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=Sg(t),e=e===null?null:e.stateNode,e};yt.flushSync=function(e){return Jn(e)};yt.hydrate=function(e,t,r){if(!Jl(t))throw Error(T(200));return Yl(null,e,t,!0,r)};yt.hydrateRoot=function(e,t,r){if(!Sh(e))throw Error(T(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=ev;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Zy(t,null,e,1,r??null,s,!1,i,o),e[Ar]=t.current,lo(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Ql(t)};yt.render=function(e,t,r){if(!Jl(t))throw Error(T(200));return Yl(null,e,t,!1,r)};yt.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(T(40));return e._reactRootContainer?(Jn(function(){Yl(null,null,e,!1,function(){e._reactRootContainer=null,e[Ar]=null})}),!0):!1};yt.unstable_batchedUpdates=mh;yt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Jl(r))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Yl(e,t,r,!1,n)};yt.version="18.3.1-next-f1338f8080-20240426";function tv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tv)}catch(e){console.error(e)}}tv(),tg.exports=yt;var kh=tg.exports;const g_=Hm(kh);var y_,hp=kh;y_=hp.createRoot,hp.hydrateRoot;var ci=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(){}},jn,Qr,Fs,Im,v_=(Im=class extends ci{constructor(){super();U(this,jn);U(this,Qr);U(this,Fs);N(this,Fs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){_(this,Qr)||this.setEventListener(_(this,Fs))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,Qr))==null||t.call(this),N(this,Qr,void 0))}setEventListener(t){var r;N(this,Fs,t),(r=_(this,Qr))==null||r.call(this),N(this,Qr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){_(this,jn)!==t&&(N(this,jn,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,804 bytes, line 40
40this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof _(this,jn)=="boolean"?_(this,jn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},jn=new WeakMap,Qr=new WeakMap,Fs=new WeakMap,Im),Eh=new v_,w_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Jr,Td,Nm,b_=(Nm=class{constructor(){U(this,Jr,w_);U(this,Td,!1)}setTimeoutProvider(e){N(this,Jr,e)}setTimeout(e,t){return _(this,Jr).setTimeout(e,t)}clearTimeout(e){_(this,Jr).clearTimeout(e)}setInterval(e,t){return _(this,Jr).setInterval(e,t)}clearInterval(e){_(this,Jr).clearInterval(e)}},Jr=new WeakMap,Td=new WeakMap,Nm),Nn=new b_;function __(e){setTimeout(e,0)}var S_=typeof window>"u"||"Deno"in globalThis;function qe(){}function k_(e,t){return typeof e=="function"?e(t):e}function Gc(e){return typeof e=="number"&&e>=0&&e!==1/0}function rv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function mn(e,t){return typeof e=="function"?e(t):e}function ct(e,t){return typeof e=="function"?e(t):e}function fp(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==xh(o,t.options))return!1}else if(!vo(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function pp(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Yn(t.options.mutationKey)!==Yn(i))return!1}else if(!vo(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function xh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Yn)(e)}function Yn(e){return JSON.stringify(e,(t,r)=>Qc(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function vo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>vo(e[r],t[r])):!1}var E_=Object.prototype.hasOwnProperty;function nv(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=mp(e)&&mp(t);if(!n&&!(Qc(e)&&Qc(t)))return t;const i=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),a=o.length,l=n?new Array(a):{};let u=0;for(let d=0;d<a;d++){const c=n?d:o[d],h=e[c],p=t[c];if(h===p){l[c]=h,(n?d<i:E_.call(e,c))&&u++;continue}if(h===null||p===null||typeof h!="object"||typeof p!="object"){l[c]=p;continue}const g=nv(h,p,r+1);l[c]=g,g===h&&u++}return i===a&&u===i?e:l}function bl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function mp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qc(e){if(!gp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!gp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function gp(e){return Object.prototype.toString.call(e)==="[object Object]"}function x_(e){return new Promise(t=>{Nn.setTimeout(t,e)})}function Jc(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?nv(e,t):t}function R_(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function C_(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rh=Symbol();function sv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ch(e,t){return typeof e=="function"?e(...t):!!e}function T_(e,t,r){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),n||(n=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var wo=(()=>{let e=()=>S_;return{isServer(){return e()},setIsServer(t){e=t}}})();function Yc(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var P_=__;function A_(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=P_;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Ce=A_(),Bs,Yr,zs,Lm,O_=(Lm=class extends ci{constructor(){super();U(this,Bs,!0);U(this,Yr);U(this,zs);N(this,zs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n
vendor: 4,970 bytes, line 40
40)}}})}onSubscribe(){_(this,Yr)||this.setEventListener(_(this,zs))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,Yr))==null||t.call(this),N(this,Yr,void 0))}setEventListener(t){var r;N(this,zs,t),(r=_(this,Yr))==null||r.call(this),N(this,Yr,t(this.setOnline.bind(this)))}setOnline(t){_(this,Bs)!==t&&(N(this,Bs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return _(this,Bs)}},Bs=new WeakMap,Yr=new WeakMap,zs=new WeakMap,Lm),_l=new O_;function I_(e){return Math.min(1e3*2**e,3e4)}function iv(e){return(e??"online")==="online"?_l.isOnline():!0}var Xc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ov(e){let t=!1,r=0,n;const s=Yc(),i=()=>s.status!=="pending",o=y=>{var w;if(!i()){const f=new Xc(y);h(f),(w=e.onCancel)==null||w.call(e,f)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>Eh.isFocused()&&(e.networkMode==="always"||_l.isOnline())&&e.canRun(),d=()=>iv(e.networkMode)&&e.canRun(),c=y=>{i()||(n==null||n(),s.resolve(y))},h=y=>{i()||(n==null||n(),s.reject(y))},p=()=>new Promise(y=>{var w;n=f=>{(i()||u())&&y(f)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;n=void 0,i()||(y=e.onContinue)==null||y.call(e)}),g=()=>{if(i())return;let y;const w=r===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(f){y=Promise.reject(f)}Promise.resolve(y).then(c).catch(f=>{var E;if(i())return;const m=e.retry??(wo.isServer()?0:3),v=e.retryDelay??I_,b=typeof v=="function"?v(r,f):v,k=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,f);if(t||!k){h(f);return}r++,(E=e.onFail)==null||E.call(e,r,f),x_(b).then(()=>u()?void 0:p()).then(()=>{t?h(f):g()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?g():p().then(g),s)}}var $n,jm,av=(jm=class{constructor(){U(this,$n)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Gc(this.gcTime)&&N(this,$n,Nn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wo.isServer()?1/0:5*60*1e3))}clearGcTimeout(){_(this,$n)!==void 0&&(Nn.clearTimeout(_(this,$n)),N(this,$n,void 0))}},$n=new WeakMap,jm);function N_(e){return{onFetch:(t,r)=>{var d,c,h,p,g;const n=t.options,s=(h=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const w=v=>{T_(v,()=>t.signal,()=>y=!0)},f=sv(t.options,t.fetchOptions),m=async(v,b,k)=>{if(y)return Promise.reject(t.signal.reason);if(b==null&&v.pages.length)return Promise.resolve(v);const x=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:b,direction:k?"backward":"forward",meta:t.options.meta};return w(z),z})(),R=await f(x),{maxPages:O}=t.options,P=k?C_:R_;return{pages:P(v.pages,R,O),pageParams:P(v.pageParams,b,O)}};if(s&&i.length){const v=s==="backward",b=v?L_:yp,k={pages:i,pageParams:o},E=b(n,k);a=await m(k,E,v)}else{const v=e??i.length;do{const b=l===0?o[0]??n.initialPageParam:yp(n,a);if(l>0&&b==null)break;a=await m(a,b),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var y,w;return(w=(y=t.options).persister)==null?void 0:w.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function yp(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function L_(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Hs,Dn,Ws,St,Mn,Oe,Po,Un,ut,lv,mr,$m,j_=($m=class extends av{constructor(t){super();U(this,ut);U(this,Hs);U(this,Dn);U(this,Ws);U(this,St);U(this,Mn);U(this,Oe);U(this,Po);U(this,Un);N(this,Un,!1),N(this,Po,t.defaultOptions),this.setOptions(t.options),this.observers=[],N(this,Mn,t.client),N(this,St,_(this,Mn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,N(this,Dn,wp(this.options)),this.state=t.state??_(this,Dn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return _(this,Hs)}get promise(){var t;return(t=_(this,Oe))==null?void 0:t.promise}setOptions(t){if(this.options={..._(this,Po),...t},t!=null&&t._type&&N(this,Hs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=wp(this.options);r.data!==void 0&&(this.setState(vp(r.data,r.dataUpdatedAt)),N(this,Dn,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,St).remove(this)}setData(t,r){const n=Jc(this.state.data,t,this.options);return W(this,ut,mr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){W(this,ut,mr).call(this,{type:"setState",state:t})}cancel(t){var n,s;const r=(n=_(this,Oe))==null?void 0:n.promise;return(s=_(this,Oe))==null||s.cancel(t),r?r.then(qe).catch(qe):Prom
vendor: 4,751 bytes, line 40
40ise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,Dn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>ct(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>mn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!rv(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=_(this,Oe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=_(this,Oe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),_(this,St).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(_(this,Oe)&&(_(this,Un)||W(this,ut,lv).call(this)?_(this,Oe).cancel({revert:!0}):_(this,Oe).cancelRetry()),this.scheduleGc()),_(this,St).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||W(this,ut,mr).call(this,{type:"invalidate"})}async fetch(t,r){var u,d,c,h,p,g,y,w,f,m,v;if(this.state.fetchStatus!=="idle"&&((u=_(this,Oe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(_(this,Oe))return _(this,Oe).continueRetry(),_(this,Oe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(k=>k.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,s=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(N(this,Un,!0),n.signal)})},i=()=>{const b=sv(this.options,r),E=(()=>{const x={client:_(this,Mn),queryKey:this.queryKey,meta:this.meta};return s(x),x})();return N(this,Un,!1),this.options.persister?this.options.persister(b,E,this):b(E)},a=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:_(this,Mn),state:this.state,fetchFn:i};return s(b),b})(),l=_(this,Hs)==="infinite"?N_(this.options.pages):this.options.behavior;l==null||l.onFetch(a,this),N(this,Ws,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&W(this,ut,mr).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta}),N(this,Oe,ov({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,onCancel:b=>{b instanceof Xc&&b.revert&&this.setState({..._(this,Ws),fetchStatus:"idle"}),n.abort()},onFail:(b,k)=>{W(this,ut,mr).call(this,{type:"failed",failureCount:b,error:k})},onPause:()=>{W(this,ut,mr).call(this,{type:"pause"})},onContinue:()=>{W(this,ut,mr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const b=await _(this,Oe).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(h=_(this,St).config).onSuccess)==null||p.call(h,b,this),(y=(g=_(this,St).config).onSettled)==null||y.call(g,b,this.state.error,this),b}catch(b){if(b instanceof Xc){if(b.silent)return _(this,Oe).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw W(this,ut,mr).call(this,{type:"error",error:b}),(f=(w=_(this,St).config).onError)==null||f.call(w,b,this),(v=(m=_(this,St).config).onSettled)==null||v.call(m,this.state.data,b,this),b}finally{this.scheduleGc()}}},Hs=new WeakMap,Dn=new WeakMap,Ws=new WeakMap,St=new WeakMap,Mn=new WeakMap,Oe=new WeakMap,Po=new WeakMap,Un=new WeakMap,ut=new WeakSet,lv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},mr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...uv(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...vp(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return N(this,Ws,t.manual?s:void 0),s;case"error":const i=t.error;
vendor: 2,169 bytes, line 40
40return{...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,...t.state}}};this.state=r(this.state),Ce.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),_(this,St).notify({query:this,type:"updated",action:t})})},$m);function uv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function wp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Xe,ee,Ao,Ve,Fn,Vs,_r,Xr,Oo,Ks,qs,Bn,zn,Zr,Gs,re,Mi,Zc,ed,td,rd,nd,sd,id,cv,Dm,$_=(Dm=class extends ci{constructor(t,r){super();U(this,re);U(this,Xe);U(this,ee);U(this,Ao);U(this,Ve);U(this,Fn);U(this,Vs);U(this,_r);U(this,Xr);U(this,Oo);U(this,Ks);U(this,qs);U(this,Bn);U(this,zn);U(this,Zr);U(this,Gs,new Set);this.options=r,N(this,Xe,t),N(this,Xr,null),N(this,_r,Yc()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,ee).addObserver(this),bp(_(this,ee),this.options)?W(this,re,Mi).call(this):this.updateResult(),W(this,re,rd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return od(_(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return od(_(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,W(this,re,nd).call(this),W(this,re,sd).call(this),_(this,ee).removeObserver(this)}setOptions(t){const r=this.options,n=_(this,ee);
vendor: 4,230 bytes, line 40
40if(this.options=_(this,Xe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ct(this.options.enabled,_(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");W(this,re,id).call(this),_(this,ee).setOptions(this.options),r._defaulted&&!bl(this.options,r)&&_(this,Xe).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,ee),observer:this});const s=this.hasListeners();s&&_p(_(this,ee),n,this.options,r)&&W(this,re,Mi).call(this),this.updateResult(),s&&(_(this,ee)!==n||ct(this.options.enabled,_(this,ee))!==ct(r.enabled,_(this,ee))||mn(this.options.staleTime,_(this,ee))!==mn(r.staleTime,_(this,ee)))&&W(this,re,Zc).call(this);const i=W(this,re,ed).call(this);s&&(_(this,ee)!==n||ct(this.options.enabled,_(this,ee))!==ct(r.enabled,_(this,ee))||i!==_(this,Zr))&&W(this,re,td).call(this,i)}getOptimisticResult(t){const r=_(this,Xe).getQueryCache().build(_(this,Xe),t),n=this.createResult(r,t);return M_(this,n)&&(N(this,Ve,n),N(this,Vs,this.options),N(this,Fn,_(this,ee).state)),n}getCurrentResult(){return _(this,Ve)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,_r).status==="pending"&&_(this,_r).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){_(this,Gs).add(t)}getCurrentQuery(){return _(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=_(this,Xe).defaultQueryOptions(t),n=_(this,Xe).getQueryCache().build(_(this,Xe),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return W(this,re,Mi).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,Ve)))}createResult(t,r){var O;const n=_(this,ee),s=this.options,i=_(this,Ve),o=_(this,Fn),a=_(this,Vs),u=t!==n?t.state:_(this,Ao),{state:d}=t;let c={...d},h=!1,p;if(r._optimisticResults){const P=this.hasListeners(),z=!P&&bp(t,r),M=P&&_p(t,n,r,s);(z||M)&&(c={...c,...uv(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:g,errorUpdatedAt:y,status:w}=c;p=c.data;let f=!1;if(r.placeholderData!==void 0&&p===void 0&&w==="pending"){let P;i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,f=!0):P=typeof r.placeholderData=="function"?r.placeholderData((O=_(this,qs))==null?void 0:O.state.data,_(this,qs)):r.placeholderData,P!==void 0&&(w="success",p=Jc(i==null?void 0:i.data,P,r),h=!0)}if(r.select&&p!==void 0&&!f)if(i&&p===(o==null?void 0:o.data)&&r.select===_(this,Oo))p=_(this,Ks);else try{N(this,Oo,r.select),p=r.select(p),p=Jc(i==null?void 0:i.data,p,r),N(this,Ks,p),N(this,Xr,null)}catch(P){N(this,Xr,P)}_(this,Xr)&&(g=_(this,Xr),p=_(this,Ks),y=Date.now(),w="error");const m=c.fetchStatus==="fetching",v=w==="pending",b=w==="error",k=v&&m,E=p!==void 0,R={status:w,fetchStatus:c.fetchStatus,isPending:v,isSuccess:w==="success",isError:b,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:c.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!v,isLoadingError:b&&!E,isPaused:c.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:b&&E,isStale:Th(t,r),refetch:this.refetch,promise:_(this,_r),isEnabled:ct(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=R.data!==void 0,z=R.status==="error"&&!P,M=Z=>{z?Z.reject(R.error):P&&Z.resolve(R.data)},K=()=>{const Z=N(this,_r,R.promise=Yc());M(Z)},q=_(this,_r);switch(q.status){case"pending":t.queryHash===n.queryHash&&M(q);break;case"fulfilled":(z||R.data!==q.value)&&K();break;case"rejected":(!z||R.error!==q.reason)&&K();break}}return R}updateResult(){const t=_(this,Ve),r=this.createResult(_(this,ee),this.options);if(N(this,Fn,_(this,ee).state),N(this,Vs,this.options),_(this,Fn).data!==void 0&&N(this,qs,_(this,ee)),bl(r,t))return;N(this,Ve,r);const n=()=>
vendor: 4,812 bytes, line 40
40{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!_(this,Gs).size)return!0;const o=new Set(i??_(this,Gs));return this.options.throwOnError&&o.add("error"),Object.keys(_(this,Ve)).some(a=>{const l=a;return _(this,Ve)[l]!==t[l]&&o.has(l)})};W(this,re,cv).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&W(this,re,rd).call(this)}},Xe=new WeakMap,ee=new WeakMap,Ao=new WeakMap,Ve=new WeakMap,Fn=new WeakMap,Vs=new WeakMap,_r=new WeakMap,Xr=new WeakMap,Oo=new WeakMap,Ks=new WeakMap,qs=new WeakMap,Bn=new WeakMap,zn=new WeakMap,Zr=new WeakMap,Gs=new WeakMap,re=new WeakSet,Mi=function(t){W(this,re,id).call(this);let r=_(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(qe)),r},Zc=function(){W(this,re,nd).call(this);const t=mn(this.options.staleTime,_(this,ee));if(wo.isServer()||_(this,Ve).isStale||!Gc(t))return;const n=rv(_(this,Ve).dataUpdatedAt,t)+1;N(this,Bn,Nn.setTimeout(()=>{_(this,Ve).isStale||this.updateResult()},n))},ed=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,ee)):this.options.refetchInterval)??!1},td=function(t){W(this,re,sd).call(this),N(this,Zr,t),!(wo.isServer()||ct(this.options.enabled,_(this,ee))===!1||!Gc(_(this,Zr))||_(this,Zr)===0)&&N(this,zn,Nn.setInterval(()=>{(this.options.refetchIntervalInBackground||Eh.isFocused())&&W(this,re,Mi).call(this)},_(this,Zr)))},rd=function(){W(this,re,Zc).call(this),W(this,re,td).call(this,W(this,re,ed).call(this))},nd=function(){_(this,Bn)!==void 0&&(Nn.clearTimeout(_(this,Bn)),N(this,Bn,void 0))},sd=function(){_(this,zn)!==void 0&&(Nn.clearInterval(_(this,zn)),N(this,zn,void 0))},id=function(){const t=_(this,Xe).getQueryCache().build(_(this,Xe),this.options);if(t===_(this,ee))return;const r=_(this,ee);N(this,ee,t),N(this,Ao,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},cv=function(t){Ce.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(_(this,Ve))}),_(this,Xe).getQueryCache().notify({query:_(this,ee),type:"observerResultsUpdated"})})},Dm);function D_(e,t){return ct(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&ct(t.retryOnMount,e)===!1)}function bp(e,t){return D_(e,t)||e.state.data!==void 0&&od(e,t,t.refetchOnMount)}function od(e,t,r){if(ct(t.enabled,e)!==!1&&mn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Th(e,t)}return!1}function _p(e,t,r,n){return(e!==t||ct(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Th(e,r)}function Th(e,t){return ct(t.enabled,e)!==!1&&e.isStaleByTime(mn(t.staleTime,e))}function M_(e,t){return!bl(e.getCurrentResult(),t)}var Io,Zt,ze,Hn,er,zr,Mm,U_=(Mm=class extends av{constructor(t){super();U(this,er);U(this,Io);U(this,Zt);U(this,ze);U(this,Hn);N(this,Io,t.client),this.mutationId=t.mutationId,N(this,ze,t.mutationCache),N(this,Zt,[]),this.state=t.state||dv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){_(this,Zt).includes(t)||(_(this,Zt).push(t),this.clearGcTimeout(),_(this,ze).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){N(this,Zt,_(this,Zt).filter(r=>r!==t)),this.scheduleGc(),_(this,ze).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){_(this,Zt).length||(this.state.status==="pending"?this.scheduleGc():_(this,ze).remove(this))}continue(){var t;return((t=_(this,Hn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,u,d,c,h,p,g,y,w,f,m,v,b,k,E,x;const r=()=>{W(this,er,zr).call(this,{type:"continue"})},n={client:_(this,Io),meta:this.options.meta,mutationKey:this.options.mutationKey};N(this,Hn,ov({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(R,O)=>{W(this,er,zr).call(this,{type:"failed",failureCount:R,error:O})},onPause:()=>{W(this,er,zr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,ze).canRun(this)}));const s=this.state.status==="pending",i=!_(this,Hn).canStart();try{if(s)r();else{W(this,er,zr).call(this,{type:"pending",variables:t,isPaused:i}),_(this,ze).config.onMutate&&await _(this,ze).config.onMutate(t,this,n);const O=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t,n));O!==this.state.context&&W(this,er,zr).call(this,{type:"pending",context:O,variables:t,isPaused:i})}const R=await _(this,Hn).start();return await((u=(l=_(this,ze).config).onSuccess)==null?void 0:u.call(l,R,t,this.state.context,this,n)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(
vendor: 3,408 bytes, line 40
40d,R,t,this.state.context,n)),await((p=(h=_(this,ze).config).onSettled)==null?void 0:p.call(h,R,null,this.state.variables,this.state.context,this,n)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,R,null,t,this.state.context,n)),W(this,er,zr).call(this,{type:"success",data:R}),R}catch(R){try{await((f=(w=_(this,ze).config).onError)==null?void 0:f.call(w,R,t,this.state.context,this,n))}catch(O){Promise.reject(O)}try{await((v=(m=this.options).onError)==null?void 0:v.call(m,R,t,this.state.context,n))}catch(O){Promise.reject(O)}try{await((k=(b=_(this,ze).config).onSettled)==null?void 0:k.call(b,void 0,R,this.state.variables,this.state.context,this,n))}catch(O){Promise.reject(O)}try{await((x=(E=this.options).onSettled)==null?void 0:x.call(E,void 0,R,t,this.state.context,n))}catch(O){Promise.reject(O)}throw W(this,er,zr).call(this,{type:"error",error:R}),R}finally{_(this,ze).runNext(this)}}},Io=new WeakMap,Zt=new WeakMap,ze=new WeakMap,Hn=new WeakMap,er=new WeakSet,zr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ce.batch(()=>{_(this,Zt).forEach(n=>{n.onMutationUpdate(t)}),_(this,ze).notify({mutation:this,type:"updated",action:t})})},Mm);function dv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sr,Mt,No,Um,F_=(Um=class extends ci{constructor(t={}){super();U(this,Sr);U(this,Mt);U(this,No);this.config=t,N(this,Sr,new Set),N(this,Mt,new Map),N(this,No,0)}build(t,r,n){const s=new U_({client:t,mutationCache:this,mutationId:++Go(this,No)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){_(this,Sr).add(t);const r=ha(t);if(typeof r=="string"){const n=_(this,Mt).get(r);n?n.push(t):_(this,Mt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(_(this,Sr).delete(t)){const r=ha(t);if(typeof r=="string"){const n=_(this,Mt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&_(this,Mt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ha(t);if(typeof r=="string"){const n=_(this,Mt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=ha(t);if(typeof r=="string"){const s=(n=_(this,Mt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ce.batch(()=>{_(this,Sr).forEach(t=>{this.notify({type:"removed",mutation:t})}),_(this,Sr).clear(),_(this,Mt).clear()})}getAll(){return Array.from(_(this,Sr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>pp(r,n))}findAll(t={}){return this.getAll().filter(r=>pp(t,r))}notify(t){Ce.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 9,288 bytes, line 40
40r.state.isPaused);return Ce.batch(()=>Promise.all(t.map(r=>r.continue().catch(qe))))}},Sr=new WeakMap,Mt=new WeakMap,No=new WeakMap,Um);function ha(e){var t;return(t=e.options.scope)==null?void 0:t.id}var kr,en,Ze,Er,Tr,za,ad,Fm,B_=(Fm=class extends ci{constructor(r,n){super();U(this,Tr);U(this,kr);U(this,en);U(this,Ze);U(this,Er);N(this,kr,r),this.setOptions(n),this.bindMethods(),W(this,Tr,za).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const n=this.options;this.options=_(this,kr).defaultMutationOptions(r),bl(this.options,n)||_(this,kr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,Ze),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Yn(n.mutationKey)!==Yn(this.options.mutationKey)?this.reset():((s=_(this,Ze))==null?void 0:s.state.status)==="pending"&&_(this,Ze).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=_(this,Ze))==null||r.removeObserver(this)}onMutationUpdate(r){W(this,Tr,za).call(this),W(this,Tr,ad).call(this,r)}getCurrentResult(){return _(this,en)}reset(){var r;(r=_(this,Ze))==null||r.removeObserver(this),N(this,Ze,void 0),W(this,Tr,za).call(this),W(this,Tr,ad).call(this)}mutate(r,n){var s;return N(this,Er,n),(s=_(this,Ze))==null||s.removeObserver(this),N(this,Ze,_(this,kr).getMutationCache().build(_(this,kr),this.options)),_(this,Ze).addObserver(this),_(this,Ze).execute(r)}},kr=new WeakMap,en=new WeakMap,Ze=new WeakMap,Er=new WeakMap,Tr=new WeakSet,za=function(){var n;const r=((n=_(this,Ze))==null?void 0:n.state)??dv();N(this,en,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},ad=function(r){Ce.batch(()=>{var n,s,i,o,a,l,u,d;if(_(this,Er)&&this.hasListeners()){const c=_(this,en).variables,h=_(this,en).context,p={client:_(this,kr),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(s=(n=_(this,Er)).onSuccess)==null||s.call(n,r.data,c,h,p)}catch(g){Promise.reject(g)}try{(o=(i=_(this,Er)).onSettled)==null||o.call(i,r.data,null,c,h,p)}catch(g){Promise.reject(g)}}else if((r==null?void 0:r.type)==="error"){try{(l=(a=_(this,Er)).onError)==null||l.call(a,r.error,c,h,p)}catch(g){Promise.reject(g)}try{(d=(u=_(this,Er)).onSettled)==null||d.call(u,void 0,r.error,c,h,p)}catch(g){Promise.reject(g)}}}this.listeners.forEach(c=>{c(_(this,en))})})},Fm),tr,Bm,z_=(Bm=class extends ci{constructor(t={}){super();U(this,tr);this.config=t,N(this,tr,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??xh(s,r);let o=this.get(i);return o||(o=new j_({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){_(this,tr).has(t.queryHash)||(_(this,tr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=_(this,tr).get(t.queryHash);r&&(t.destroy(),r===t&&_(this,tr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ce.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return _(this,tr).get(t)}getAll(){return[..._(this,tr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>fp(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>fp(t,n)):r}notify(t){Ce.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},tr=new WeakMap,Bm),ve,tn,rn,Qs,Js,nn,Ys,Xs,zm,DT=(zm=class{constructor(e={}){U(this,ve);U(this,tn);U(this,rn);U(this,Qs);U(this,Js);U(this,nn);U(this,Ys);U(this,Xs);N(this,ve,e.queryCache||new z_),N(this,tn,e.mutationCache||new F_),N(this,rn,e.defaultOptions||{}),N(this,Qs,new Map),N(this,Js,new Map),N(this,nn,0)}mount(){Go(this,nn)._++,_(this,nn)===1&&(N(this,Ys,Eh.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,ve).onFocus())})),N(this,Xs,_l.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,ve).onOnline())})))}unmount(){var e,t;Go(this,nn)._--,_(this,nn)===0&&((e=_(this,Ys))==null||e.call(this),N(this,Ys,void 0),(t=_(this,Xs))==null||t.call(this),N(this,Xs,void 0))}isFetching(e){return _(this,ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,tn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=_(this,ve).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=_(this,ve).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(mn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return _(this,ve).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=_(this,ve).get(n.queryHash),i=s==null?void 0:s.state.data,o=k_(t,i);if(o!==void 0)return _(this,ve).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Ce.batch(()=>_(this,ve).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=_(this,ve).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=_(this,ve);Ce.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=_(this,ve);return Ce.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ce.batch(()=>_(this,ve).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(qe).catch(qe)}invalidateQueries(e,t={}){return Ce.batch(()=>(_(this,ve).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ce.batch(()=>_(this,ve).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(qe)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(qe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=_(this,ve).build(this,t);return r.isStaleByTime(mn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qe).catch(qe)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qe).catch(qe)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return _l.isOnline()?_(this,tn).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,ve)}getMutationCache(){return _(this,tn)}getDefaultOptions(){return _(this,rn)}setDefaultOptions(e){N(this,rn,e)}setQueryDefaults(e,t){_(this,Qs).set(Yn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[..._(this,Qs).values()],r={};return t.forEach(n=>{vo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){_(this,Js).set(Yn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[..._(this,Js).values()],r={};return t.forEach(n=>{vo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={..._(this,rn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xh(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===Rh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,rn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,ve).clear(),_(this,tn).clear()}},ve=new WeakMap,tn=new WeakMap,rn=new WeakMap,Qs=new WeakMap,Js=new WeakMap,nn=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,zm),hv=S.createContext(void 0),fv=e=>{const t=S.useContext(hv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MT=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),dw.jsx(hv.Provider,{value:e,children:t})),pv=S.createContext(!1),H_=()=>S.useContext(pv);pv.Provider;function W_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var V_=S.createContext(W_()),K_=()=>S.useContext(V_),q_=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Ch(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},G_=e=>{S.useEffect(()=>{e.clearReset()},[e])},Q_=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||Ch(r,[e.error,n])),J_=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Y_=(e,t)=>
40e.isLoading&&e.isFetching&&!t,X_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Sp=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Z_(e,t,r){var p,g,y,w;const n=H_(),s=K_(),i=fv(),o=i.defaultQueryOptions(e);(g=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||g.call(p,o);const a=i.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=n?"isRestoring":l?"optimistic":void 0,J_(o),q_(o,s,a),G_(s);const u=!i.getQueryCache().get(o.queryHash),[d]=S.useState(()=>new t(i,o)),c=d.getOptimisticResult(o),h=!n&&l;if(S.useSyncExternalStore(S.useCallback(f=>{const m=h?d.subscribe(Ce.batchCalls(f)):qe;return d.updateResult(),m},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),S.useEffect(()=>{d.setOptions(o)},[o,d]),X_(o,c))throw Sp(o,d,s);if(Q_({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw c.error;if((w=(y=i.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||w.call(y,o,c),o.experimental_prefetchInRender&&!wo.isServer()&&Y_(c,n)){const f=u?Sp(o,d,s):a==null?void 0:a.promise;f==null||f.catch(qe).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?c:d.trackResult(c)}function UT(e,t){return Z_(e,$_)}function FT(e,t){const r=fv(),[n]=S.useState(()=>new B_(r,e));S.useEffect(()=>{n.setOptions(e)},[n,e]);const s=S.useSyncExternalStore(S.useCallback(o=>n.subscribe(Ce.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=S.useCallback((o,a)=>{n.mutate(o,a).catch(qe)},[n]);if(s.error&&Ch(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}var eS=(e,t,r,n,s,i,o,a)=>{let l=document.documentElement,u=["light","dark"];function d(p){(Array.isArray(e)?e:[e]).forEach(g=>{let y=g==="class",w=y&&i?s.map(f=>i[f]||f):s;y?(l.classList.remove(...w),l.classList.add(i&&i[p]?i[p]:p)):l.setAttribute(g,p)}),c(p)}function c(p){a&&u.includes(p)&&(l.style.colorScheme=p)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(n)d(n);else try{let p=localStorage.getItem(t)||r,g=o&&p==="system"?h():p;d(g)}catch{}},tS=S.createContext(void 0),rS={setTheme:e=>{},themes:[]},BT=()=>{var e;return(e=S.useContext(tS))!=null?e:rS};S.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,themes:a,nonce:l,scriptProps:u})=>{let d=JSON.stringify([r,t,i,e,a,o,n,s]).slice(1,-1);return S.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${eS.toString()})(${d})`}})});function nS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const sS=e=>{switch(e){case"success":return aS;case"info":return uS;case"warning":return lS;case"error":return cS;default:return null}},iS=Array(12).fill(0),oS=({visible:e,className:t})=>A.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},A.createElement("div",{className:"sonner-spinner"},iS.map((r,n)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),aS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),lS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.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"})),uS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),cS=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.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"})),dS=A.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"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hS=()=>{const[e,t]=A.useState(document.hidden);return A.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let ld=1;class fS{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>
vendor: 3,659 bytes, line 40
40{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...s}=t,i=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:ld++,o=this.toasts.find(l=>l.id===i),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:n}),{...l,...t,id:i,dismissible:a,title:n}):l):this.addToast({title:n,...s,dismissible:a,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let i=n!==void 0,o;const a=s.then(async u=>{if(o=["resolve",u],A.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(mS(u)&&!u.ok){i=!1;const c=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,h=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,g=typeof c=="object"&&!A.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:h,...g})}else if(u instanceof Error){i=!1;const c=typeof r.error=="function"?await r.error(u):r.error,h=typeof r.description=="function"?await r.description(u):r.description,g=typeof c=="object"&&!A.isValidElement(c)?c:{message:c};this.create({id:n,type:"error",description:h,...g})}else if(r.success!==void 0){i=!1;const c=typeof r.success=="function"?await r.success(u):r.success,h=typeof r.description=="function"?await r.description(u):r.description,g=typeof c=="object"&&!A.isValidElement(c)?c:{message:c};this.create({id:n,type:"success",description:h,...g})}}).catch(async u=>{if(o=["reject",u],r.error!==void 0){i=!1;const d=typeof r.error=="function"?await r.error(u):r.error,c=typeof r.description=="function"?await r.description(u):r.description,p=typeof d=="object"&&!A.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((u,d)=>a.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,r)=>{const n=(r==null?void 0:r.id)||ld++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const et=new fS,pS=(e,t)=>{const r=(t==null?void 0:t.id)||ld++;return et.addToast({title:e,...t,id:r}),r},mS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gS=pS,yS=()=>et.toasts,vS=()=>et.getActiveToasts(),zT=Object.assign(gS,{success:et.success,info:et.info,warning:et.warning,error:et.error,custom:et.custom,message:et.message,promise:et.promise,dismiss:et.dismiss,loading:et.loading},{getHistory:yS,getToasts:vS});nS
vendor: 4,787 bytes, line 40
40("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 40
40left: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: 9,103 bytes, line 40
40fa(e){return e.label!==void 0}const wS=3,bS="24px",_S="16px",kp=4e3,SS=356,kS=14,ES=45,xS=200;function Jt(...e){return e.filter(Boolean).join(" ")}function RS(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}const CS=e=>{var t,r,n,s,i,o,a,l,u;const{invert:d,toast:c,unstyled:h,interacting:p,setHeights:g,visibleToasts:y,heights:w,index:f,toasts:m,expanded:v,removeToast:b,defaultRichColors:k,closeButton:E,style:x,cancelButtonStyle:R,actionButtonStyle:O,className:P="",descriptionClassName:z="",duration:M,position:K,gap:q,expandByDefault:Z,classNames:F,icons:Q,closeButtonAriaLabel:C="Close toast"}=e,[L,D]=A.useState(null),[J,pe]=A.useState(null),[Y,ne]=A.useState(!1),[ie,ke]=A.useState(!1),[At,de]=A.useState(!1),[ts,Ho]=A.useState(!1),[Wo,rs]=A.useState(!1),[O0,uu]=A.useState(0),[I0,qh]=A.useState(0),wi=A.useRef(c.duration||M||kp),Gh=A.useRef(null),hr=A.useRef(null),N0=f===0,L0=f+1<=y,ot=c.type,ns=c.dismissible!==!1,j0=c.className||"",$0=c.descriptionClassName||"",Vo=A.useMemo(()=>w.findIndex(H=>H.toastId===c.id)||0,[w,c.id]),D0=A.useMemo(()=>{var H;return(H=c.closeButton)!=null?H:E},[c.closeButton,E]),Qh=A.useMemo(()=>c.duration||M||kp,[c.duration,M]),cu=A.useRef(0),ss=A.useRef(0),Jh=A.useRef(0),is=A.useRef(null),[M0,U0]=K.split("-"),Yh=A.useMemo(()=>w.reduce((H,Pe,Me)=>Me>=Vo?H:H+Pe.height,0),[w,Vo]),Xh=hS(),F0=c.invert||d,du=ot==="loading";ss.current=A.useMemo(()=>Vo*q+Yh,[Vo,Yh]),A.useEffect(()=>{wi.current=Qh},[Qh]),A.useEffect(()=>{ne(!0)},[]),A.useEffect(()=>{const H=hr.current;if(H){const Pe=H.getBoundingClientRect().height;return qh(Pe),g(Me=>[{toastId:c.id,height:Pe,position:c.position},...Me]),()=>g(Me=>Me.filter(at=>at.toastId!==c.id))}},[g,c.id]),A.useLayoutEffect(()=>{if(!Y)return;const H=hr.current,Pe=H.style.height;H.style.height="auto";const Me=H.getBoundingClientRect().height;H.style.height=Pe,qh(Me),g(at=>at.find(Le=>Le.toastId===c.id)?at.map(Le=>Le.toastId===c.id?{...Le,height:Me}:Le):[{toastId:c.id,height:Me,position:c.position},...at])},[Y,c.title,c.description,g,c.id,c.jsx,c.action,c.cancel]);const Mr=A.useCallback(()=>{ke(!0),uu(ss.current),g(H=>H.filter(Pe=>Pe.toastId!==c.id)),setTimeout(()=>{b(c)},xS)},[c,b,g,ss]);A.useEffect(()=>{if(c.promise&&ot==="loading"||c.duration===1/0||c.type==="loading")return;let H;return v||p||Xh?(()=>{if(Jh.current<cu.current){const at=new Date().getTime()-cu.current;wi.current=wi.current-at}Jh.current=new Date().getTime()})():(()=>{wi.current!==1/0&&(cu.current=new Date().getTime(),H=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Mr()},wi.current))})(),()=>clearTimeout(H)},[v,p,c,ot,Xh,Mr]),A.useEffect(()=>{c.delete&&(Mr(),c.onDismiss==null||c.onDismiss.call(c,c))},[Mr,c.delete]);function B0(){var H;if(Q!=null&&Q.loading){var Pe;return A.createElement("div",{className:Jt(F==null?void 0:F.loader,c==null||(Pe=c.classNames)==null?void 0:Pe.loader,"sonner-loader"),"data-visible":ot==="loading"},Q.loading)}return A.createElement(oS,{className:Jt(F==null?void 0:F.loader,c==null||(H=c.classNames)==null?void 0:H.loader),visible:ot==="loading"})}const z0=c.icon||(Q==null?void 0:Q[ot])||sS(ot);var Zh,ef;return A.createElement("li",{tabIndex:0,ref:hr,className:Jt(P,j0,F==null?void 0:F.toast,c==null||(t=c.classNames)==null?void 0:t.toast,F==null?void 0:F.default,F==null?void 0:F[ot],c==null||(r=c.classNames)==null?void 0:r[ot]),"data-sonner-toast":"","data-rich-colors":(Zh=c.richColors)!=null?Zh:k,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":Y,"data-promise":!!c.promise,"data-swiped":Wo,"data-removed":ie,"data-visible":L0,"data-y-position":M0,"data-x-position":U0,"data-index":f,"data-front":N0,"data-swiping":At,"data-dismissible":ns,"data-type":ot,"data-invert":F0,"data-swipe-out":ts,"data-swipe-direction":J,"data-expanded":!!(v||Z&&Y),"data-testid":c.testId,style:{"--index":f,"--toasts-before":f,"--z-index":m.length-f,"--offset":`${ie?O0:ss.current}px`,"--initial-height":Z?"auto":`${I0}px`,...x,...c.style},onDragEnd:()=>{de(!1),D(null),is.current=null},onPointerDown:H=>{H.button!==2&&(du||!ns||(Gh.current=new Date,uu(ss.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(de(!0),is.current={x:H.clientX,y:H.clientY})))},onPointerUp:()=>{var H,Pe,Me;if(ts||!ns)return;is.current=null;const at=Number(((H=hr.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ko=Number(((Pe=hr.current)==null?void 0:Pe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Le=new Date().getTime()-((Me=Gh.current)==null?void 0:Me.getTime()),bt=L==="x"?at:Ko,qo=Math.abs(bt)/Le;if(Math.abs(bt)>=ES||qo>.11){uu(ss.current),c.onDismiss==null||c.onDismiss.call(c,c),pe(L==="x"?at>0?"right":"left":Ko>0?"down":"up"),Mr(),Ho(!0);return}else{var Ot,It;(Ot=hr.current)==null||Ot.style.setProperty("--swipe-amount-x","0px"),(It=hr.current)==null||It.style.setProperty("--swipe-amount-y","0px")}rs(!1),de(!1),D(null)},onPointerMove:H=>{var Pe,Me,at;if(!is.current||!ns||((Pe=window.getSelection())==null?void 0:Pe.toString().length)>0)return;const Le=H.clientY-is.current.y,bt=H.clientX-is.current.x;var qo;const Ot=(qo=e.swipeDirections)!=null?qo:RS(K);!L&&(Math.abs(bt)>1||Math.abs(Le)>1)&&D(Math.abs(bt)>Math.abs(Le)?"x":"y");let It={x:0,y:0};const tf=kn=>1/(1.5+Math.abs(kn)/20);if(L==="y"){if(Ot.includes("top")||Ot.includes("bottom"))if(Ot.includes("top")&&Le<0||Ot.includes("bottom")&&Le>0)It.y=Le;else{const kn=Le*tf(Le);It.y=Math.abs(kn)<Math.abs(Le)?kn:Le}}else if(L==="x"&&(Ot.includes("left")||Ot.includes("right")))if(Ot.includes("left")&&bt<0||Ot.includes("right")&&bt>0)It.x=bt;else{const kn=bt*tf(bt);It.x=Math.abs(kn)<Math.abs(bt)?kn:bt}(Math.abs(It.x)>0||Math.abs(It.y)>0)&&rs(!0),(Me=hr.current)==null||Me.style.setProperty("--swipe-amount-x",`${It.x}px`),(at=hr.current)==null||at.style.setProperty("--swipe-amount-y",`${It.y}px`)}},D0&&!c.jsx&&ot!=="loading"?A.createElement("button",{"aria-label":C,"data-disabled":du,"data-close-button":!0,onClick:du||!ns?()=>{}:()=>{Mr(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Jt(F==null?void 0:F.closeButton,c==null||(n=c.classNames)==null?void 0:n.closeButton)},(ef=Q==null?void 0:Q.close)!=null?ef:dS):null,(ot||c.icon||c.promise)&&c.icon!==null&&((Q==null?void 0:Q[ot])!==null||c.icon)?A.createElement("div",{"data-icon":"",className:Jt(F==null?void 0:F.icon,c==null||(s=c.classNames)==null?void 0:s.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||B0():null,c.type!=="loading"?z0:null):null,A.createElement("div",{"data-content":"",className:Jt(F==null?void 0:F.content,c==null||(i=c.classNames)==null?void 0:i.content)},A.createElement("div",{"data-title":"",className:Jt(F==null?void 0:F.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?A.createElement("div",{"data-description":"",className:Jt(z,$0,F==null?void 0:F.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),A.isValidElement(c.cancel)?c.cancel:c.cancel&&fa(c.cancel)?A.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||R,onClick:H=>{fa(c.cancel)&&ns&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,H),Mr())},className:Jt(F==null?void 0:F.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,A.isValidElement(c.action)?c.action:c.action&&fa(c.action)?A.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||O,onClick:H=>{fa(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,H),!H.defaultPrevented&&Mr())},className:Jt(F==null?void 0:F.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Ep(){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 TS(e,t){const r={};return[e,t].forEach((n,s)=>{const i=s===1,o=i?"--mobile-offset":"--offset",a=i?_S:bS;function l(u){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}const HT=A.forwardRef(function(t,r){const{id:n,invert:s,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:d,mobileOffset:c,theme:h="light",richColors:p,duration:g,style:y,visibleToasts:w=wS,toastOptions:f,dir:m=Ep(),gap:v=kS,icons:b,containerAriaLabel:k="Notifications"}=t,[E,x]=A.useState([]),R=A.useMemo(()=>n?E.filter(Y=>Y.toasterId===n):E.filter(Y=>!Y.toasterId),[E,n]),O=A.useMemo(()=>Array.from(new Set([i].concat(R.filter(Y=>Y.position).map(Y=>Y.position)))),[R,i]),[P,z]=A.useState([]),[M,K]=A.useState(!1),[q,Z]=A.useState(!1),[F,Q]=A.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
40k":"light"),C=A.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=A.useRef(null),J=A.useRef(!1),pe=A.useCallback(Y=>{x(ne=>{var ie;return(ie=ne.find(ke=>ke.id===Y.id))!=null&&ie.delete||et.dismiss(Y.id),ne.filter(({id:ke})=>ke!==Y.id)})},[]);return A.useEffect(()=>et.subscribe(Y=>{if(Y.dismiss){requestAnimationFrame(()=>{x(ne=>ne.map(ie=>ie.id===Y.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{g_.flushSync(()=>{x(ne=>{const ie=ne.findIndex(ke=>ke.id===Y.id);return ie!==-1?[...ne.slice(0,ie),{...ne[ie],...Y},...ne.slice(ie+1)]:[Y,...ne]})})})}),[E]),A.useEffect(()=>{if(h!=="system"){Q(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const Y=window.matchMedia("(prefers-color-scheme: dark)");try{Y.addEventListener("change",({matches:ne})=>{Q(ne?"dark":"light")})}catch{Y.addListener(({matches:ie})=>{try{Q(ie?"dark":"light")}catch(ke){console.error(ke)}})}},[h]),A.useEffect(()=>{E.length<=1&&K(!1)},[E]),A.useEffect(()=>{const Y=ne=>{var ie;if(o.every(de=>ne[de]||ne.code===de)){var At;K(!0),(At=C.current)==null||At.focus()}ne.code==="Escape"&&(document.activeElement===C.current||(ie=C.current)!=null&&ie.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[o]),A.useEffect(()=>{if(C.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,J.current=!1)}},[C.current]),A.createElement("section",{ref:r,"aria-label":`${k} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},O.map((Y,ne)=>{var ie;const[ke,At]=Y.split("-");return R.length?A.createElement("ol",{key:Y,dir:m==="auto"?Ep():m,tabIndex:-1,ref:C,className:u,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":ke,"data-x-position":At,style:{"--front-toast-height":`${((ie=P[0])==null?void 0:ie.height)||0}px`,"--width":`${SS}px`,"--gap":`${v}px`,...y,...TS(d,c)},onBlur:de=>{J.current&&!de.currentTarget.contains(de.relatedTarget)&&(J.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||J.current||(J.current=!0,D.current=de.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{q||K(!1)},onDragEnd:()=>K(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},R.filter(de=>!de.position&&ne===0||de.position===Y).map((de,ts)=>{var Ho,Wo;return A.createElement(CS,{key:de.id,icons:b,index:ts,toast:de,defaultRichColors:p,duration:(Ho=f==null?void 0:f.duration)!=null?Ho:g,className:f==null?void 0:f.className,descriptionClassName:f==null?void 0:f.descriptionClassName,invert:s,visibleToasts:w,closeButton:(Wo=f==null?void 0:f.closeButton)!=null?Wo:l,interacting:q,position:Y,style:f==null?void 0:f.style,unstyled:f==null?void 0:f.unstyled,classNames:f==null?void 0:f.classNames,cancelButtonStyle:f==null?void 0:f.cancelButtonStyle,actionButtonStyle:f==null?void 0:f.actionButtonStyle,closeButtonAriaLabel:f==null?void 0:f.closeButtonAriaLabel,removeToast:pe,toasts:R.filter(rs=>rs.position==de.position),heights:P.filter(rs=>rs.position==de.position),setHeights:z,expandByDefault:a,gap:v,expanded:M,swipeDirections:t.swipeDirections})})):null}))}),PS=["top","right","bottom","left"],vn=Math.min,dt=Math.max,Sl=Math.round,pa=Math.floor,lr=e=>({x:e,y:e}),AS={left:"right",right:"left",bottom:"top",top:"bottom"};function ud(e,t,r){return dt(e,vn(t,r))}function Nr(e,t){return typeof e=="function"?e(t):e}function Lr(e){return e.split("-")[0]}function di(e){return e.split("-")[1]}function Ph(e){return e==="x"?"y":"x"}function Ah(e){return e==="y"?"height":"width"}function ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Oh(e){return Ph(ir(e))}function OS(e,t,r){r===void 0&&(r=!1);const n=di(e),s=Oh(e),i=Ah(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=kl(o)),[o,kl(o)]}function IS(e){const t=kl(e);return[cd(e),t,cd(t)]}function cd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const xp=["left","right"],Rp=["right","left"],NS=["top","bottom"],LS=["bottom","top"];function jS(e,t,r){switch(e){case"top":case"bottom":return r?t?Rp:xp:t?xp:Rp;case"left":case"right":return t?NS:LS;default:return[]}}function $S(e,t,r,n){const s=di(e);let i=jS(Lr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(cd)))),i}function kl(e){const t=Lr(e);return AS[t]+e.slice(t.length)}function DS(e){return{top:0,right:0,bottom:0,left:0,...e}}function mv(e){return typeof e!="number"?DS(e):{top:e,right:e,bottom:e,left:e}}function El(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Cp(e,t,r){let{reference:n,floating:s}=e;
vendor: 10,394 bytes, line 40
40const i=ir(t),o=Oh(t),a=Ah(o),l=Lr(t),u=i==="y",d=n.x+n.width/2-s.width/2,c=n.y+n.height/2-s.height/2,h=n[a]/2-s[a]/2;let p;switch(l){case"top":p={x:d,y:n.y-s.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-s.width,y:c};break;default:p={x:n.x,y:n.y}}switch(di(t)){case"start":p[o]-=h*(r&&u?-1:1);break;case"end":p[o]+=h*(r&&u?-1:1);break}return p}async function MS(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=Nr(t,e),g=mv(p),w=a[h?c==="floating"?"reference":"floating":c],f=El(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),m=c==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},k=El(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(f.top-k.top+g.top)/b.y,bottom:(k.bottom-f.bottom+g.bottom)/b.y,left:(f.left-k.left+g.left)/b.x,right:(k.right-f.right+g.right)/b.x}}const US=50,FS=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:MS},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:c}=Cp(u,n,l),h=n,p=0;const g={};for(let y=0;y<i.length;y++){const w=i[y];if(!w)continue;const{name:f,fn:m}=w,{x:v,y:b,data:k,reset:E}=await m({x:d,y:c,initialPlacement:n,placement:h,strategy:s,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});d=v??d,c=b??c,g[f]={...g[f],...k},E&&p<US&&(p++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:d,y:c}=Cp(u,h,l)),y=-1)}return{x:d,y:c,placement:h,strategy:s,middlewareData:g}},BS=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Nr(e,t)||{};if(u==null)return{};const c=mv(d),h={x:r,y:n},p=Oh(s),g=Ah(p),y=await o.getDimensions(u),w=p==="y",f=w?"top":"left",m=w?"bottom":"right",v=w?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[p]-h[p]-i.floating[g],k=h[p]-i.reference[p],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let x=E?E[v]:0;(!x||!await(o.isElement==null?void 0:o.isElement(E)))&&(x=a.floating[v]||i.floating[g]);const R=b/2-k/2,O=x/2-y[g]/2-1,P=vn(c[f],O),z=vn(c[m],O),M=P,K=x-y[g]-z,q=x/2-y[g]/2+R,Z=ud(M,q,K),F=!l.arrow&&di(s)!=null&&q!==Z&&i.reference[g]/2-(q<M?P:z)-y[g]/2<0,Q=F?q<M?q-M:q-K:0;return{[p]:h[p]+Q,data:{[p]:Z,centerOffset:q-Z-Q,...F&&{alignmentOffset:Q}},reset:F}}}),zS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=Nr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const f=Lr(s),m=ir(a),v=Lr(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=h||(v||!y?[kl(a)]:IS(a)),E=g!=="none";!h&&E&&k.push(...$S(a,y,g,b));const x=[a,...k],R=await l.detectOverflow(t,w),O=[];let P=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&O.push(R[f]),c){const q=OS(s,o,b);O.push(R[q[0]],R[q[1]])}if(P=[...P,{placement:s,overflows:O}],!O.every(q=>q<=0)){var z,M;const q=(((z=i.flip)==null?void 0:z.index)||0)+1,Z=x[q];if(Z&&(!(c==="alignment"?m!==ir(Z):!1)||P.every(C=>ir(C.placement)===m?C.overflows[0]>0:!0)))return{data:{index:q,overflows:P},reset:{placement:Z}};let F=(M=P.filter(Q=>Q.overflows[0]<=0).sort((Q,C)=>Q.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(p){case"bestFit":{var K;const Q=(K=P.filter(C=>{if(E){const L=ir(C.placement);return L===m||L==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(L=>L>0).reduce((L,D)=>L+D,0)]).sort((C,L)=>C[1]-L[1])[0])==null?void 0:K[0];Q&&(F=Q);break}case"initialPlacement":F=a;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function Tp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pp(e){return PS.some(t=>e[t]>=0)}const HS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=Nr(e,t);switch(s){case"referenceHidden":{const o=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=Tp(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Pp(a)}}}case"escaped":{const o=await n.detectOverflow(t,{...i,altBoundary:!0}),a=Tp(o,r.floating);return{data:{escapedOffsets:a,escaped:Pp(a)}}}default:return{}}}}},gv=new Set(["left","top"]);async function WS(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Lr(r),a=di(r),l=ir(r)==="y",u=gv.has(o)?-1:1,d=i&&l?-1:1,c=Nr(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const VS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await WS(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},KS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:f=>{let{x:m,y:v}=f;return{x:m,y:v}}},...u}=Nr(e,t),d={x:r,y:n},c=await i.detectOverflow(t,u),h=ir(Lr(s)),p=Ph(h);let g=d[p],y=d[h];if(o){const f=p==="y"?"top":"left",m=p==="y"?"bottom":"right",v=g+c[f],b=g-c[m];g=ud(v,g,b)}if(a){const f=h==="y"?"top":"left",m=h==="y"?"bottom":"right",v=y+c[f],b=y-c[m];y=ud(v,y,b)}const w=l.fn({...t,[p]:g,[h]:y});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[p]:o,[h]:a}}}}}},qS=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Nr(e,t),d={x:r,y:n},c=ir(s),h=Ph(c);let p=d[h],g=d[c];const y=Nr(a,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const v=h==="y"?"height":"width",b=i.reference[h]-i.floating[v]+w.mainAxis,k=i.reference[h]+i.reference[v]-w.mainAxis;p<b?p=b:p>k&&(p=k)}if(u){var f,m;const v=h==="y"?"width":"height",b=gv.has(Lr(s)),k=i.reference[c]-i.floating[v]+(b&&((f=o.offset)==null?void 0:f[c])||0)+(b?0:w.crossAxis),E=i.reference[c]+i.reference[v]+(b?0:((m=o.offset)==null?void 0:m[c])||0)-(b?w.crossAxis:0);g<k?g=k:g>E&&(g=E)}return{[h]:p,[c]:g}}}},GS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Nr(e,t),d=await o.detectOverflow(t,u),c=Lr(s),h=di(s),p=ir(s)==="y",{width:g,height:y}=i.floating;let w,f;c==="top"||c==="bottom"?(w=c,f=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=c,w=h==="end"?"top":"bottom");const m=y-d.top-d.bottom,v=g-d.left-d.right,b=vn(y-d[w],m),k=vn(g-d[f],v),E=!t.middlewareData.shift;let x=b,R=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(x=m),E&&!h){const P=dt(d.left,0),z=dt(d.right,0),M=dt(d.top,0),K=dt(d.bottom,0);p?R=g-2*(P!==0||z!==0?P+z:dt(d.left,d.right)):x=y-2*(M!==0||K!==0?M+K:dt(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:x});const O=await o.getDimensions(a.floating);return g!==O.width||y!==O.height?{reset:{rects:!0}}:{}}}};function Xl(){return typeof window<"u"}function hi(e){return yv(e)?(e.nodeName||"").toLowerCase():"#document"}function mt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ur(e){var t;return(t=(yv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yv(e){return Xl()?e instanceof Node||e instanceof mt(e).Node:!1}function Kt(e){return Xl()?e instanceof Element||e instanceof mt(e).Element:!1}function Dr(e){return Xl()?e instanceof HTMLElement||e instanceof mt(e).HTMLElement:!1}function Ap(e){return!Xl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mt(e).ShadowRoot}function Uo(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function QS(e){return/^(table|td|th)$/.test(hi(e))}function Zl(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const JS=/transform|translate|scale|rotate|perspective|filter/,YS=/paint|layout|strict|content/,En=e=>!!e&&e!=="none";let Uu;function Ih(e){const t=Kt(e)?qt(e):e;return En(t.transform)||En(t.translate)||En(t.scale)||En(t.rotate)||En(t.perspective)||!Nh()&&(En(t.backdropFilter)||En(t.filter))||JS.test(t.willChange||"")||YS.test(t.contain||"")}function XS(e){let t=wn(e);for(;Dr(t)&&!oi(t);){if(Ih(t))return t;if(Zl(t))return null;t=wn(t)}return null}function Nh(){return Uu==null&&(Uu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Uu}function oi(e){return/^(html|body|#document)$/.test(hi(e))}function qt(e){return mt(e).getComputedStyle(e)}function eu(e){return Kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wn(e){if(hi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ap(e)&&e.host||ur(e);return Ap(t)?t.host:t}function vv(e){const t=wn(e);return oi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dr(t)&&Uo(t)?t:vv(t)}function bo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=vv(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=mt(s);if(i){const a=dd(o);
vendor: 7,584 bytes, line 40
40return t.concat(o,o.visualViewport||[],Uo(s)?s:[],a&&r?bo(a):[])}else return t.concat(s,bo(s,[],r))}function dd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wv(e){const t=qt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Dr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Sl(r)!==i||Sl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Lh(e){return Kt(e)?e:e.contextElement}function $s(e){const t=Lh(e);if(!Dr(t))return lr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=wv(t);let o=(i?Sl(r.width):r.width)/n,a=(i?Sl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const ZS=lr(0);function bv(e){const t=mt(e);return!Nh()||!t.visualViewport?ZS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ek(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==mt(e)?!1:t}function Xn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Lh(e);let o=lr(1);t&&(n?Kt(n)&&(o=$s(n)):o=$s(e));const a=ek(i,r,n)?bv(i):lr(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,c=s.height/o.y;if(i){const h=mt(i),p=n&&Kt(n)?mt(n):n;let g=h,y=dd(g);for(;y&&n&&p!==g;){const w=$s(y),f=y.getBoundingClientRect(),m=qt(y),v=f.left+(y.clientLeft+parseFloat(m.paddingLeft))*w.x,b=f.top+(y.clientTop+parseFloat(m.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,c*=w.y,l+=v,u+=b,g=mt(y),y=dd(g)}}return El({width:d,height:c,x:l,y:u})}function tu(e,t){const r=eu(e).scrollLeft;return t?t.left+r:Xn(ur(e)).left+r}function _v(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-tu(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function tk(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=ur(n),a=t?Zl(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=lr(1);const d=lr(0),c=Dr(n);if((c||!c&&!i)&&((hi(n)!=="body"||Uo(o))&&(l=eu(n)),c)){const p=Xn(n);u=$s(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const h=o&&!c&&!i?_v(o,l):lr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-l.scrollTop*u.y+d.y+h.y}}function rk(e){return Array.from(e.getClientRects())}function nk(e){const t=ur(e),r=eu(e),n=e.ownerDocument.body,s=dt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=dt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+tu(e);const a=-r.scrollTop;return qt(n).direction==="rtl"&&(o+=dt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}const Op=25;function sk(e,t){const r=mt(e),n=ur(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const d=Nh();(!d||d&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=tu(n);if(u<=0){const d=n.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-c.clientWidth-p);g<=Op&&(i-=g)}else u<=Op&&(i+=u);return{width:i,height:o,x:a,y:l}}function ik(e,t){const r=Xn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Dr(e)?$s(e):lr(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function Ip(e,t,r){let n;if(t==="viewport")n=sk(e,r);else if(t==="document")n=nk(ur(e));else if(Kt(t))n=ik(t,r);else{const s=bv(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return El(n)}function Sv(e,t){const r=wn(e);return r===t||!Kt(r)||oi(r)?!1:qt(r).position==="fixed"||Sv(r,t)}function ok(e,t){const r=t.get(e);if(r)return r;let n=bo(e,[],!1).filter(a=>Kt(a)&&hi(a)!=="body"),s=null;const i=qt(e).position==="fixed";let o=i?wn(e):e;for(;Kt(o)&&!oi(o);){const a=qt(o),l=Ih(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Uo(o)&&!l&&Sv(e,o))?n=n.filter(d=>d!==o):s=a,o=wn(o)}return t.set(e,n),n}function ak(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?Zl(t)?[]:ok(t,this._c):[].concat(r),n],a=Ip(t,o[0],s);let l=a.top,u=a.right,d=a.bottom,c=a.left;for(let h=1;h<o.length;h++){const p=Ip(t,o[h],s);l=dt(p.top,l),u=vn(p.right,u),d=vn(p.bottom,d),c=dt(p.left,c)}return{width:u-c,height:d-l,x:c,y:l}}function lk(e){const{width:t,height:r}=wv(e);return{width:t,height:r}}function uk(e,t,r){const n=Dr(t),s=ur(t),i=r==="fixed",o=Xn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=lr(0);function u(){l.x=tu(s)}if(n||!n&&!i)if((hi(t)!=="body"||Uo(s))&&(a=eu(t)),n){const p=Xn(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else s&&u();i&&!n&&s&&u();const d=s&&!n&&!i?_v(s,a):lr(0),c=o.left+a.scrollLeft-l.x-d.x,h=o.top+a.scrollTop-l.y-d.y;return{x:c,y:h,width:o.width,height:o.height}}function Fu(e){return qt(e).position==="static"}function Np(e,t){if(!Dr(e)||qt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ur(e)===r&&(r=r.ownerDocument.body),r}function kv(e,t){const r=mt(e);if(Zl(e))return r;if(!Dr(e)){let s=wn(e);for(;s&&!oi(s);){if(Kt(s)&&!Fu(s))return s;s=wn(s)}return r}let n=Np(e,t);for(;n&&QS(n)&&Fu(n);)n=Np(n,t);return n&&oi(n)&&Fu(n)&&!Ih(n)?r:n||XS(e)||r}const ck=async function(e){const t=this.getOffsetParent||kv,r=this.getDimensions,n=await r(e.floating);return{reference:uk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function dk(e){return qt(e).direction==="rtl"}const hk={convertOffsetParentRelativeRectToViewportRelativeRect:tk,getDocumentElement:ur,getClippingRect:ak,getOffsetParent:kv,getElementRects:ck,getClientRects:rk,getDimensions:lk,getScale:$s,isElement:Kt,isRTL:dk};function Ev(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fk(e,t){let r=null,n;const s=ur(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:c,width:h,height:p}=u;if(a||t(),!h||!p)return;const g=pa(c),y=pa(s.clientWidth-(d+h)),w=pa(s.clientHeight-(c+p)),f=pa(d),v={rootMargin:-g+"px "+-y+"px "+-w+"px "+-f+"px",threshold:dt(0,vn(1,l))||1};let b=!0;function k(E){const x=E[0].intersectionRatio;if(x!==l){if(!b)return o();x?o(!1,x):n=setTimeout(()=>{o(!1,1e-7)},1e3)}x===1&&!Ev(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(k,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,v)}r.observe(e)}return o(!0),i}function WT(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Lh(e),d=s||i?[...u?bo(u):[],...t?bo(t):[]]:[];d.forEach(f=>{s&&f.addEventListener("scroll",r,{passive:!0}),i&&f.addEventListener("resize",r)});const c=u&&a?fk(u,r):null;let h=-1,p=null;o&&(p=new ResizeObserver(f=>{let[m]=f;m&&m.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(t)})),r()}),u&&!l&&p.observe(u),t&&p.observe(t));let g,y=l?Xn(e):null;l&&w();function w(){const f=Xn(e);y&&!Ev(y,f)&&r(),y=f,g=requestAnimationFrame(w)}return r(),()=>{var f;d.forEach(m=>{s&&m.removeEventListener("scroll",r),i&&m.removeEventListener("resize",r)}),c==null||c(),(f=p)==null||f.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const pk=VS,mk=KS,gk=zS,yk=GS,vk=HS,Lp=BS,wk=qS,bk=(e,t,r)=>{const n=new Map,s={platform:hk,...r},i={...s.platform,_c:n};return FS(e,t,{...s,platform:i})};var _k=typeof document<"u",Sk=function(){},Ha=_k?S.useLayoutEffect:Sk;function xl(e,t){if(e===t)return!0;
vendor: 2,959 bytes, line 40
40if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!xl(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!xl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function xv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jp(e,t){const r=xv(e);return Math.round(t*r)/r}function Bu(e){const t=S.useRef(e);return Ha(()=>{t.current=e}),t}function VT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=S.useState(n);xl(h,n)||p(n);const[g,y]=S.useState(null),[w,f]=S.useState(null),m=S.useCallback(C=>{C!==E.current&&(E.current=C,y(C))},[]),v=S.useCallback(C=>{C!==x.current&&(x.current=C,f(C))},[]),b=i||g,k=o||w,E=S.useRef(null),x=S.useRef(null),R=S.useRef(d),O=l!=null,P=Bu(l),z=Bu(s),M=Bu(u),K=S.useCallback(()=>{if(!E.current||!x.current)return;const C={placement:t,strategy:r,middleware:h};z.current&&(C.platform=z.current),bk(E.current,x.current,C).then(L=>{const D={...L,isPositioned:M.current!==!1};q.current&&!xl(R.current,D)&&(R.current=D,kh.flushSync(()=>{c(D)}))})},[h,t,r,z,M]);Ha(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,c(C=>({...C,isPositioned:!1})))},[u]);const q=S.useRef(!1);Ha(()=>(q.current=!0,()=>{q.current=!1}),[]),Ha(()=>{if(b&&(E.current=b),k&&(x.current=k),b&&k){if(P.current)return P.current(b,k,K);K()}},[b,k,K,P,O]);const Z=S.useMemo(()=>({reference:E,floating:x,setReference:m,setFloating:v}),[m,v]),F=S.useMemo(()=>({reference:b,floating:k}),[b,k]),Q=S.useMemo(()=>{const C={position:r,left:0,top:0};if(!F.floating)return C;const L=jp(F.floating,d.x),D=jp(F.floating,d.y);return a?{...C,transform:"translate("+L+"px, "+D+"px)",...xv(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:D}},[r,a,F.floating,d.x,d.y]);return S.useMemo(()=>({...d,update:K,refs:Z,elements:F,floatingStyles:Q}),[d,K,Z,F,Q])}const kk=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Lp({element:n.current,padding:s}).fn(r):{}:n?Lp({element:n,padding:s}).fn(r):{}}}},KT=(e,t)=>{const r=pk(e);return{name:r.name,fn:r.fn,options:[e,t]}},qT=(e,t)=>{const r=mk(e);return{name:r.name,fn:r.fn,options:[e,t]}},GT=(e,t)=>({fn:wk(e).fn,options:[e,t]}),QT=(e,t)=>{const r=gk(e);return{name:r.name,fn:r.fn,options:[e,t]}},JT=(e,t)=>{const r=yk(e);return{name:r.name,fn:r.fn,options:[e,t]}},YT=(e,t)=>
vendor: 12,684 bytes, line 40
40{const r=vk(e);return{name:r.name,fn:r.fn,options:[e,t]}},XT=(e,t)=>{const r=kk(e);return{name:r.name,fn:r.fn,options:[e,t]}};function Rv(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Rv(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ek(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Rv(e))&&(n&&(n+=" "),n+=t);return n}const jh="-",xk=e=>{const t=Ck(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(jh);return a[0]===""&&a.length!==1&&a.shift(),Cv(a,t)||Rk(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},Cv=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Cv(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(jh);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},$p=/^\[(.+)\]$/,Rk=e=>{if($p.test(e)){const t=$p.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ck=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Pk(Object.entries(e.classGroups),r).forEach(([i,o])=>{hd(o,n,i,t)}),n},hd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Dp(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Tk(s)){hd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{hd(o,Dp(t,i),r,n)})})},Dp=(e,t)=>{let r=e;return t.split(jh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Tk=e=>e.isThemeGetter,Pk=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,Ak=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},Tv="!",Ok=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,d=0,c;for(let w=0;w<a.length;w++){let f=a[w];if(u===0){if(f===s&&(n||a.slice(w,w+i)===t)){l.push(a.slice(d,w)),d=w+i;continue}if(f==="/"){c=w;continue}}f==="["?u++:f==="]"&&u--}const h=l.length===0?a:a.substring(d),p=h.startsWith(Tv),g=p?h.substring(1):h,y=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:y}};return r?a=>r({className:a,parseClassName:o}):o},Ik=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Nk=e=>({cache:Ak(e.cacheSize),parseClassName:Ok(e),...xk(e)}),Lk=/\s+/,jk=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(Lk);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let g=!!p,y=n(g?h.substring(0,p):h);if(!y){if(!g){a=u+(a.length>0?" "+a:a);continue}if(y=n(h),!y){a=u+(a.length>0?" "+a:a);continue}g=!1}const w=Ik(d).join(":"),f=c?w+Tv:w,m=f+y;if(i.includes(m))continue;i.push(m);const v=s(y,g);for(let b=0;b<v.length;++b){const k=v[b];i.push(f+k)}a=u+(a.length>0?" "+a:a)}return a};function $k(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Pv(t))&&(n&&(n+=" "),n+=r);return n}const Pv=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Pv(e[n]))&&(r&&(r+=" "),r+=t);return r};function Dk(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((d,c)=>c(d),e());return r=Nk(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const d=jk(l,r);return s(l,d),d}return function(){return i($k.apply(null,arguments))}}const le=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Av=/^\[(?:([a-z-]+):)?(.+)\]$/i,Mk=/^\d+\/\d+$/,Uk=new Set(["px","full","screen"]),Fk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bk=/\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$/,zk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fr=e=>Ds(e)||Uk.has(e)||Mk.test(e),Fr=e=>fi(e,"length",Xk),Ds=e=>!!e&&!Number.isNaN(Number(e)),zu=e=>fi(e,"number",Ds),Ti=e=>!!e&&Number.isInteger(Number(e)),Vk=e=>e.endsWith("%")&&Ds(e.slice(0,-1)),V=e=>Av.test(e),Br=e=>Fk.test(e),Kk=new Set(["length","size","percentage"]),qk=e=>fi(e,Kk,Ov),Gk=e=>fi(e,"position",Ov),Qk=new Set(["image","url"]),Jk=e=>fi(e,Qk,e1),Yk=e=>fi(e,"",Zk),Pi=()=>!0,fi=(e,t,r)=>{const n=Av.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Xk=e=>Bk.test(e)&&!zk.test(e),Ov=()=>!1,Zk=e=>Hk.test(e),e1=e=>Wk.test(e),t1=()=>{const e=le("colors"),t=le("spacing"),r=le("blur"),n=le("brightness"),s=le("borderColor"),i=le("borderRadius"),o=le("borderSpacing"),a=le("borderWidth"),l=le("contrast"),u=le("grayscale"),d=le("hueRotate"),c=le("invert"),h=le("gap"),p=le("gradientColorStops"),g=le("gradientColorStopPositions"),y=le("inset"),w=le("margin"),f=le("opacity"),m=le("padding"),v=le("saturate"),b=le("scale"),k=le("sepia"),E=le("skew"),x=le("space"),R=le("translate"),O=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",V,t],M=()=>[V,t],K=()=>["",fr,Fr],q=()=>["auto",Ds,V],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",V],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Ds,V];return{cacheSize:500,separator:":",theme:{colors:[Pi],spacing:[fr,Fr],blur:["none","",Br,V],brightness:J(),borderColor:[e],borderRadius:["none","","full",Br,V],borderSpacing:M(),borderWidth:K(),contrast:J(),grayscale:L(),hueRotate:J(),invert:L(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Vk,Fr],inset:z(),margin:z(),opacity:J(),padding:M(),saturate:J(),scale:J(),sepia:L(),skew:J(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",V]}],container:["container"],columns:[{columns:[Br]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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"],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(),V]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ti,V]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",V]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",Ti,V]}],"grid-cols":[{"grid-cols":[Pi]}],"col-start-end":[{col:["auto",{span:["full",Ti,V]},V]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[Pi]}],"row-start-end":[{row:["auto",{span:[Ti,V]},V]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",V]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",V]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[x]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[x]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",V,t]}],"min-w":[{"min-w":[V,t,"min","max","fit"]}],"max-w":[{"max-w":[V,t,"none","full","min","max","fit","prose",{screen:[Br]},Br]}],h:[{h:[V,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[V,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[V,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[V,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Br,Fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zu]}],"font-family":[{font:[Pi]}],"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:["tighter","tight","normal","wide","wider","widest",V]}],"line-clamp":[{"line-clamp":["none",Ds,zu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fr,V]}],"list-image":[{"list-image":["none",V]}],"list-style-type":[{list:["none","disc","decimal",V]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fr,Fr]}],"underline-offset":[{"underline-offset":["auto",fr,V]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),Gk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jk]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 5,172 bytes, line 40
40],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:F()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[fr,V]}],"outline-w":[{outline:[fr,Fr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-w":[{"ring-offset":[fr,Fr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Br,Yk]}],"shadow-color":[{shadow:[Pi]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Br,V]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[v]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",V]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",V]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",V]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ti,V]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",V]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",V]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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"]}
vendor: 3,743 bytes, line 40
40],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",V]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fr,Fr,zu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},ZT=Dk(t1);var sr=function(){return sr=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},sr.apply(this,arguments)};function pi(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function r1(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(d){try{u(n.next(d))}catch(c){o(c)}}function l(d){try{u(n.throw(d))}catch(c){o(c)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}function n1(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}const s1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
40class $h extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class i1 extends $h{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Mp extends $h{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Up extends $h{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var fd;(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"})(fd||(fd={}));class o1{constructor(t,{headers:r={},customFetch:n,region:s=fd.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=s1(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return r1(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:d,timeout:c}=n;let h={},{region:p}=n;p||(p=this.region);const g=new URL(`${this.url}/${r}`);p&&p!=="any"&&(h["x-region"]=p,g.searchParams.set("forceFunctionRegion",p));let y;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",y=u):typeof u=="string"?(h["Content-Type"]="text/plain",y=u):typeof FormData<"u"&&u instanceof FormData?y=u:(h["Content-Type"]="application/json",y=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?y=JSON.stringify(u):y=u;let w=d;c&&(o=new AbortController,i=setTimeout(()=>o.abort(),c),d?(w=o.signal,d.addEventListener("abort",()=>o.abort())):w=o.signal);const f=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:y,signal:w}).catch(k=>{throw new i1(k)}),m=f.headers.get("x-relay-error");if(m&&m==="true")throw new Mp(f);if(!f.ok)throw new Up(f);let v=((s=f.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),b;return v==="application/json"?b=yield f.json():v==="application/octet-stream"||v==="application/pdf"?b=yield f.blob():v==="text/event-stream"?b=f:v==="multipart/form-data"?b=yield f.formData():b=yield f.text(),{data:b,error:null,response:f}}catch(a){return{data:null,error:a,response:a instanceof Up||a instanceof Mp?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const Iv=3,Fp=e=>Math.min(1e3*2**e,3e4),a1=[520,503],Nv=["GET","HEAD","OPTIONS"];var Bp=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
40de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function zp(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function l1(e,t,r,n){return!(!n||r>=Iv||!Nv.includes(e)||!a1.includes(t))}var u1=class{constructor(e){var t,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const u={};r.headers.forEach((c,h)=>{u[h]=c}),o>0&&(u["X-Retry-Count"]=String(o));let d;try{d=await n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body,(c,h)=>typeof h=="bigint"?h.toString():h),signal:r.signal})}catch(c){if((c==null?void 0:c.name)==="AbortError"||(c==null?void 0:c.code)==="ABORT_ERR"||!Nv.includes(r.method))throw c;if(r.retryEnabled&&o<Iv){const h=Fp(o);o++,await zp(h,r.signal);continue}throw c}if(l1(r.method,d.status,o,r.retryEnabled)){var a,l;const c=(a=(l=d.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,h=c!==null?Math.max(0,parseInt(c,10)||0)*1e3:Fp(o);await d.text(),o++,await zp(h,r.signal);continue}return await r.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",d="";const c=o==null?void 0:o.cause;if(c){var h,p,g,y;const m=(h=c==null?void 0:c.message)!==null&&h!==void 0?h:"",v=(p=c==null?void 0:c.code)!==null&&p!==void 0?p:"";l=`${(g=o==null?void 0:o.name)!==null&&g!==void 0?g:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
41
42Caused by: ${(y=c==null?void 0:c.name)!==null&&y!==void 0?y:"Error"}: ${m}`,v&&(l+=` (${v})`),c!=null&&c.stack&&(l+=`
43${c.stack}`)}else{var w;l=(w=o==null?void 0:o.stack)!==null&&w!==void 0?w:""}const f=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",f>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${f} 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.`)):((c==null?void 0:c.name)==="HeadersOverflowError"||(c==null?void 0:c.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",f>this.urlLengthLimit&&(u+=`. Your request URL is ${f} 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:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:d},data:null,count:null,status:0,statusText:""}}
43)),i.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const h=await e.text();if(h!=="")if(t.headers.get("Accept")==="text/csv")n=h;else if(t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text")))n=h;else try{n=JSON.parse(h)}catch{if(r={message:h},n=null,t.shouldThrowOnError)throw new Bp({message:h,details:"",hint:"",code:""})}}const d=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),c=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&c&&c.length>1&&(s=parseInt(c[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const d=await e.text();try{r=JSON.parse(d),Array.isArray(r)&&e.status===404&&(n=[],r=null,i=200,o="OK")}catch{e.status===404&&d===""?(i=204,o="No Content"):r={message:d}}if(r&&t.shouldThrowOnError)throw new Bp(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},c1=class extends u1{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="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 Hp=new RegExp("[,()]");var ps=class extends c1{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Hp.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Hp.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
vendor: 1,286 bytes, line 43
43r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},d1=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new ps({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
430){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new ps({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,c)=>d.concat(Object.keys(c)),[]);if(u.length>0){const d=[...new Set(u)].map(c=>`"${c}"`);a.searchParams.set("columns",d.join(","))}}return new ps({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new ps({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ps({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function _o(e){"@babel/helpers - typeof";return _o=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},_o(e)}function h1(e,t){if(_o(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f1(e){var t=h1(e,"string");return _o(t)=="symbol"?t:t+""}function p1(e,t,r){return(t=f1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ma(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wp(Object(r),!0).forEach(function(n){p1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var m1=class Lv{constructor(t,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,d)=>{const c=new AbortController,h=setTimeout(()=>c.abort(),i),p=d==null?void 0:d.signal;if(p){if(p.aborted)return clearTimeout(h),l(u,d);const g=()=>{clearTimeout(h),c.abort()};return p.addEventListener("abort",g,{once:!0}),l(u,ma(ma({},d),{},{signal:c.signal})).finally(()=>{clearTimeout(h),p.removeEventListener("abort",g)})}return l(u,ma(ma({},d),{},{signal:c.signal})).finally(()=>clearTimeout(h))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new d1(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 Lv(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),c=n&&Object.values(r).some(d);c?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([p,g])=>g!==void 0).map(([p,g])=>[p,Array.isArray(g)?`{${g.join(",")}}`:`${g}
43`]).forEach(([p,g])=>{l.searchParams.append(p,g)})):(a="POST",u=r);const h=new Headers(this.headers);return c?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new ps({method:a,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class g1{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
44import ws from "ws"
45new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
46
47Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const y1="2.108.2",v1=`realtime-js/${y1}`,w1="1.0.0",jv="2.0.0",b1=jv,_1=1e4,S1=100,qr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},$v={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},pd={connecting:"connecting",closing:"closing",closed:"closed"};class k1{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},c=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`metadata length ${c.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+c.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let g=new DataView(p),y=0;g.setUint8(y++,this.KINDS.userBroadcastPush),g.setUint8(y++,l.length),g.setUint8(y++,a.length),g.setUint8(y++,o.length),g.setUint8(y++,u.length),g.setUint8(y++,c.length),g.setUint8(y++,r),Array.from(l,f=>g.setUint8(y++,f.charCodeAt(0))),Array.from(a,f=>g.setUint8(y++,f.charCodeAt(0))),Array.from(o,f=>g.setUint8(y++,f.charCodeAt(0))),Array.from(u,f=>g.setUint8(y++,f.charCodeAt(0))),Array.from(c,f=>g.setUint8(y++,f.charCodeAt(0)));var w=new Uint8Array(p.byteLength+n.byteLength);return w.set(new Uint8Array(p),0),w.set(new Uint8Array(n),p.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const d=n.decode(t.slice(l,l+i));l=l+i;
vendor: 6,699 bytes, line 47
47const c=n.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),p=a===this.JSON_ENCODING?JSON.parse(n.decode(h)):h,g={type:this.BROADCAST_EVENT,event:d,payload:p};return o>0&&(g.meta=JSON.parse(c)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var oe;(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"})(oe||(oe={}));const Vp=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=E1(o,e,t,s),i),{}):{}},E1=(e,t,r,n)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=r[e];return i&&!n.includes(i)?Dv(i,o):md(o)},Dv=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return T1(t,r)}switch(e){case oe.bool:return x1(t);case oe.float4:case oe.float8:case oe.int2:case oe.int4:case oe.int8:case oe.numeric:case oe.oid:return R1(t);case oe.json:case oe.jsonb:return C1(t);case oe.timestamp:return P1(t);case oe.abstime:case oe.date:case oe.daterange:case oe.int4range:case oe.int8range:case oe.money:case oe.reltime:case oe.text:case oe.time:case oe.timestamptz:case oe.timetz:case oe.tsrange:case oe.tstzrange:return md(t);default:return md(t)}},md=e=>e,x1=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},R1=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},C1=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},T1=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>Dv(t,a))}return e},P1=e=>typeof e=="string"?e.replace(" ","T"):e,Mv=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 Yi=e=>typeof e=="function"?e:function(){return e},A1=typeof self<"u"?self:null,ms=typeof window<"u"?window:null,Xt=A1||ms||globalThis,O1="2.0.0",I1=1e4,N1=1e3,rr={connecting:0,open:1,closing:2,closed:3},Ye={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},yr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},gd={longpoll:"longpoll",websocket:"websocket"},L1={complete:4},yd="base64url.bearer.phx.",ga=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.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})}},Uv=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))}},j1=class{constructor(e,t,r){this.state=Ye.closed,this.topic=e,this.params=Yi(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ga(this,yr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Uv(()=>{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=Ye.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Ye.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ye.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Ye.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 ga(this,yr.leave,Yi({}),this.timeout).send(),this.state=Ye.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(yr.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 18,287 bytes, lines 47-48
47teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ye.closed,this.bindings=[]}onClose(e){this.on(yr.close,e)}onError(e){return this.on(yr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new ga(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ye.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(yr.close,"leave")},r=new ga(this,yr.leave,Yi({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ye.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Ye.closed}isErrored(){return this.state===Ye.errored}isJoined(){return this.state===Ye.joined}isJoining(){return this.state===Ye.joining}isLeaving(){return this.state===Ye.leaving}},Rl=class{static request(e,t,r,n,s,i,o){if(Xt.XDomainRequest){let a=new Xt.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(Xt.XMLHttpRequest){let a=new Xt.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(Xt.fetch&&Xt.AbortController)return this.fetchRequest(e,t,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,i,o){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Xt.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,r,n,s,i,o){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,i,o,a){e.open(t,r,!0),e.timeout=i;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===L1.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,i=e[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},$1=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},as=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(yd)&&(this.authToken=atob(t[1].slice(yd.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=rr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+gd.websocket),"$1/"+gd.longpoll)}endpointURL(){return Rl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=rr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===rr.open||this.readyState===rr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=rr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=$1(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(`
48`),()=>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,r){for(let s of this.reqs)s.abort();this.readyState=rr.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=Rl.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},D1=class Ui{constructor(t,r={}){let n=r.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(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ui.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Ui.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ui.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Ui.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let i=this.clone(t),o={},a={};return this.map(i,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let d=i[l];if(d){let c=u.metas.map(y=>y.phx_ref),h=d.metas.map(y=>y.phx_ref),p=u.metas.filter(y=>h.indexOf(y.phx_ref)<0),g=d.metas.filter(y=>c.indexOf(y.phx_ref)<0);p.length>0&&(o[l]=u,o[l].metas=p),g.length>0&&(a[l]=this.clone(d),a[l].metas=g)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let d=t[a].metas.map(h=>h.phx_ref),c=u.metas.filter(h=>d.indexOf(h.phx_ref)<0);t[a].metas.unshift(...c)}n(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let d=l.metas.map(c=>c.phx_ref);u.metas=u.metas.filter(c=>d.indexOf(c.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},ya={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,i,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(t,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(r,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(s,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(n,c=>l.setUint8(u++,c.charCodeAt(0)));var d=new Uint8Array(a.byteLength+i.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(i),a.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+s));o=o+s;let u=r.decode(e.slice(o,o+i));o=o+i;let d=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:d}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(a,a+n));a=a+n;let u=r.decode(e.slice(a,a+s));a=a+s;let d=r.decode(e.slice(a,a+i));a=a+i;let c=r.decode(e.slice(a,a+o));a=a+o;let h=e.slice(a,e.byteLength),p={status:c,response:h};return{join_ref:l,ref:u,topic:d,event:yr.reply,payload:p}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(e.slice(i,i+n));i=i+n;let a=r.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},M1=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||I1,this.transport=t.transport||Xt.WebSocket||as,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Xt&&Xt.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=ya.encode.bind(ya),this.defaultDecoder=ya.decode.bind(ya),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!==as?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ms&&ms.addEventListener&&(ms.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ms.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),ms.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=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Yi(t.params||{}),this.endPoint=`${e}/${gd.websocket}`,this.vsn=t.vsn||O1,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Uv(()=>{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 as}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=Rl.appendParams(Rl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Yi(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==as?this.connectWithFallback(as,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case as:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${yd}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),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(),N1,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===rr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 48
48triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(yr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case rr.connecting:return"connecting";case rr.open:return"open";case rr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new j1(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:i}=e;this.log("push",`${t} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Xi{constructor(t,r){const n=F1(r);this.presence=new D1(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=Xi.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Xi.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Xi.transformState(this.presence.state)}static transformState(t){return t=U1(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=Wa(s),r},{})}static onJoinPayload(t,r,n){const s=Kp(r),i=Wa(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Kp(r),i=Wa(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function Wa(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function U1(e){return JSON.parse(JSON.stringify(e))}function F1(e){return(e==null?void 0:e.events)&&{events:e.events}}function Kp(e){return e!=null&&e.metas?Wa(e):[]}var qp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(qp||(qp={}));class B1{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Xi(this.channel.channelAdapter,r)}}function z1(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
48if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class H1{constructor(t,r,n){const s=W1(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}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>S1){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===qr.joined}isJoined(){return this.state===qr.joined}isJoining(){return this.state===qr.joining}isClosed(){return this.state===qr.closed}isLeaving(){return this.state===qr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function W1(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Gp;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Gp||(Gp={}));var Ps;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ps||(Ps={}));var vr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(vr||(vr={}));class Zi{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new H1(this.socket.socketAdapter,t,this.params),this.presence=new B1(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Mv(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Ps.PRESENCE]&&this.bindings[Ps.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,c={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(vr.CHANNEL_ERROR,z1(p))}),this._onClose(()=>t==null?void 0:t(vr.CLOSED)),this.updateJoinPayload(Object.assign({config:h},c)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(vr.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}
48).receive("error",p=>{this.state=qr.errored;const g=Object.values(p).join(", ")||"error";t==null||t(vr.CHANNEL_ERROR,new Error(g,{cause:p}))}).receive("timeout",()=>{t==null||t(vr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:d,table:c,filter:h}}=l,p=t&&t[a];if(p&&p.event===u&&Zi.isFilterValueEqual(p.schema,d)&&Zi.isFilterValueEqual(p.table,c)&&Zi.isFilterValueEqual(p.filter,h))o.push(Object.assign(Object.assign({},l),{id:p.id}));else{this.unsubscribe(),this.state=qr.errored,r==null||r(vr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=qr.errored&&r&&r(vr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Ps.PRESENCE||t===Ps.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=r instanceof ArrayBuffer||ArrayBuffer.isView(r),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?r:JSON.stringify(r)},u=await this._fetchWithTimeout(a.toString(),l,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(u.status===202)return{success:!0};if(u.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let d=u.statusText;try{const c=await u.json();d=c.error||c.message||d}catch{}return Promise.reject(new Error(d))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
48in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(t,r,n){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,n),o={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,i,o,a,l,u,d;const c=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(c,n))return!1;const h=(s=this.bindings[c])===null||s===void 0?void 0:s.find(p=>p.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(c))if("id"in h){const p=h.id,g=(i=h.filter)===null||i===void 0?void 0:i.event;return p&&((o=r.ids)===null||o===void 0?void 0:o.includes(p))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const p=(u=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((d=r==null?void 0:r.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===c})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=$v;return r&&[n,s,i,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Vp(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Vp(t.columns,t.old_record)),r}}class V1{constructor(t,r){this.socket=new M1(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}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()==pd.connecting}isDisconnecting(){return this.socket.connectionState()==pd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Qp={HEARTBEAT_INTERVAL:25e3},K1=[1e3,2e3,5e3,1e4],q1=1e4;function G1(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function Q1(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return G1()}const J1=`
49  addEventListener("message", (e) => {
50    if (e.data.event === "start") {
51      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
52    }
53  });`;class Y1{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
53,this.ref=0,this.serializer=new k1,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new V1(t,s),this.httpEndpoint=Mv(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r}
54
55To use Realtime in Node.js, you need to provide a WebSocket implementation:
56
57Option 1: Use Node.js 22+ which has native WebSocket support
58Option 2: Install and provide the "ws" package:
59
60  npm install ws
61
62  import ws from "ws"
63  const client = new RealtimeClient(url, {
64    ...options,
65    transport: ws
66  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||pd.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new Zi(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
66this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:v1};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push($v.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([J1],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,u,d,c,h,p;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const g={};g.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:_1,g.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:Qp.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Qp.HEARTBEAT_INTERVAL),g.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:g1.getWebSocketConstructor(),g.params=t==null?void 0:t.params,g.logger=t==null?void 0:t.logger,g.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),g.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:Q1(),g.reconnectAfterMs=(d=t==null?void 0:t.reconnectAfterMs)!==null&&d!==void 0?d:m=>K1[m-1]||q1;let y,w;const f=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:b1;switch(f){case w1:y=(m,v)=>v(JSON.stringify(m)),w=(m,v)=>v(JSON.parse(m));break;case jv:y=this.serializer.encode.bind(this.serializer),w=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${g.vsn}`)}if(g.vsn=f,g.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:y,g.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:w,g.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,g.params=Object.assign(Object.assign({},g.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,g.autoSendHeartbeat=!this.worker}return g}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 5,001 bytes, line 66
66var So=class extends Error{constructor(e,t){var r;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)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function X1(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function Z1(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 eE(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=X1(e.baseUrl,n,s),l=await Z1(e.auth),u=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),c=(u.headers.get("content-type")||"").includes("application/json"),h=c&&d?JSON.parse(d):d;if(!u.ok){const p=c?h:void 0,g=p==null?void 0:p.error;throw new So((g==null?void 0:g.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:p})}return{status:u.status,headers:u.headers,data:h}}}}function va(e){return e.join("�")}var tE=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:va(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${va(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${va(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${va(e.namespace)}`}),!0}catch(t){if(t instanceof So&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof So&&r.status===409)return;throw r}}};function ls(e){return e.join("�")}var rE=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ls(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ls(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ls(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ls(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0: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/${ls(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/${ls(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof So&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof So&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},nE=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=eE({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new tE(this.client,t),this.tableOps=new rE(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)}
66async 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 ko(e){"@babel/helpers - typeof";return ko=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},ko(e)}function sE(e,t){if(ko(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ko(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iE(e){var t=sE(e,"string");return ko(t)=="symbol"?t:t+""}function oE(e,t,r){return(t=iE(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jp(Object(r),!0).forEach(function(n){oE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ru=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function nu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var vd=class extends ru{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return B({},super.toJSON())}},Fv=class extends ru{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Cl(e,t,r){const n=B({},e),s=t.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function aE(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const lE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),uE=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)},wd=e=>{if(Array.isArray(e))return e.map(r=>wd(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=wd(n)}),t},cE=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Yp=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},dE=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new vd(Yp(o),i,a,n))}).catch(()=>{const o=i+"";t(new vd(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new Fv(Yp(e),e,n))},hE=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return B(B({},s),r);if(uE(n)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=Cl(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),B(B({},s),r)};async function Ai(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,hE(t,n,s,i)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>dE(u,l,n,o))})}function Bv(e="storage"){return{get:async(t,r,n,s)=>Ai(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,i)=>Ai(t,"POST",r,s,i,n,e),put:async(t,r,n,s,i)=>Ai(t,"PUT",r,s,i,n,e),head:async(t,r,n,s)=>Ai(t,"HEAD",r,B(B({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>Ai(t,"DELETE",r,s,i,n,e)}}const fE=Bv("storage"),{get:Eo,post:Dt,put:bd,head:pE,remove:Dh}=fE,ht=Bv("vectors");var mi=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=aE(t),this.fetch=lE(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Cl(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(nu(r))return{data:null,error:r};throw r}}};let zv;zv=Symbol.toStringTag;var mE=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[zv]="StreamDownloadBuilder",this.promise=null}
vendor: 4,091 bytes, line 66
66then(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(nu(t))return{data:null,error:t};throw t}}};let Hv;Hv=Symbol.toStringTag;var gE=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Hv]="BlobDownloadBuilder",this.promise=null}asStream(){return new mE(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(nu(t))return{data:null,error:t};throw t}}};const yE={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Xp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var vE=class extends mi{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=B(B({},Xp),n);let a=B(B({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[h,p]of Object.entries(n.headers))a=Cl(a,h,p);const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),c=await(e=="PUT"?bd:Dt)(s.fetch,`${s.url}/object/${d}`,i,B({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:c.Id,fullPath:c.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=B(B({},Xp),n);let d=B(B({},s.headers),{"x-upsert":String(u.upsert)});const c=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),c&&l.append("metadata",s.encodeMetadata(c)),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),c&&!l.has("metadata")&&l.append("metadata",s.encodeMetadata(c))):(l=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,c&&(d["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),n!=null&&n.headers)for(const[h,p]of Object.entries(n.headers))d=Cl(d,h,p);return{path:i,fullPath:(await bd(s.fetch,a.toString(),l,B({headers:d},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=B({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Dt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new ru("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Dt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
66stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Dt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Dt(n.fetch,`${n.url}/object/sign/${s}`,B({expiresIn:t},i?{transform:r.transform}:{}),{headers:n.headers});const a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Dt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const o=i.toString();return s.map(a=>B(B({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>Eo(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new gE(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>wd(await Eo(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await pE(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(nu(s)){var n;const i=s instanceof vd?s.status:s instanceof Fv?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const s=n.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Dh(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=B(B(B({},yE),t),{},{prefix:e||""});return await Dt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=B({},e);return await Dt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const wE="2.108.2",Fo={"X-Client-Info":`storage-js/${wE}`};var bE=class extends mi{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=B(B({},Fo),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Eo(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Eo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Dt(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await bd(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Dt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Dh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},_E=class extends mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},Fo),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Dt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
66{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await Eo(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Dh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!cE(e))throw new ru("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new nE({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},SE=class extends mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},Fo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await ht.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await ht.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await ht.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await ht.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},kE=class extends mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},Fo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await ht.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await ht.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");if(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 ht.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await ht.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 ht.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},EE=class extends mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=B(B({},Fo),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ht.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ht.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await ht.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ht.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},xE=class extends EE{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new RE(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},RE=class extends SE{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName}))}
66async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new CE(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},CE=class extends kE{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,B(B({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},TE=class extends bE{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new vE(this.url,this.headers,e,this.fetch)}get vectors(){return new xE(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _E(this.url+"/iceberg",this.headers,this.fetch)}};const Wv="2.108.2",wr=30*1e3,Fi=3,Hu=Fi*wr,PE=2*wr,AE="http://localhost:9999",OE="supabase.auth.token",IE={"X-Client-Info":`gotrue-js/${Wv}`},_d="X-Supabase-Api-Version",Vv={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},NE=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,LE=10*60*1e3;class xo extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function I(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class jE extends xo{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function $E(e){return I(e)&&e.name==="AuthApiError"}class Bt extends xo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class cr extends xo{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Ae extends cr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function wa(e){return I(e)&&e.name==="AuthSessionMissingError"}class us extends cr{constructor(){super("Auth session or user missing","AuthInvalidToken
66ResponseError",500,void 0)}}class ba extends cr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class _a extends cr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function DE(e){return I(e)&&e.name==="AuthImplicitGrantRedirectError"}class Zp extends cr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class ME extends cr{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 Sd extends cr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function em(e){return I(e)&&e.name==="AuthRetryableFetchError"}class tm extends cr{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function UE(e){return I(e)&&e.name==="AuthRefreshDiscardedError"}class rm extends cr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Tl extends cr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Pl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),nm=` 	
67\r=`.split(""),FE=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<nm.length;t+=1)e[nm[t].charCodeAt(0)]=-2;for(let t=0;t<Pl.length;t+=1)e[Pl[t].charCodeAt(0)]=t;return e})();function sm(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Pl[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Pl[n]),t.queuedBits-=6}}function Kv(e,t,r){const n=FE[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function im(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{HE(o,n,r)};for(let o=0;o<e.length;o+=1)Kv(e.charCodeAt(o),s,i);return t.join("")}function BE(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 zE(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}BE(n,t)}}function HE(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Ms(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Kv(e.charCodeAt(s),r,n);return new Uint8Array(t)}function WE(e){const t=[];return zE(e,r=>t.push(r)),new Uint8Array(t)}function Ln(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>sm(s,r,n)),sm(null,r,n),t.join("")}function VE(e){return Math.round(Date.now()/1e3)+e}function KE(){return Symbol("auth-callback")}const Be=()=>typeof window<"u"&&typeof document<"u",xn={tested:!1,writable:!1},qv=()=>{if(!Be())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(xn.tested)return xn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),xn.tested=!0,xn.writable=!0}catch{xn.tested=!0,xn.writable=!1}return xn.writable};function qE(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
67h((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Gv=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GE=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",gs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Lt=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},_e=async(e,t)=>{await e.removeItem(t)};class su{constructor(){this.promise=new su.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}su.promiseConstructor=Promise;function Sa(e){const t=e.split(".");if(t.length!==3)throw new Tl("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!NE.test(t[n]))throw new Tl("JWT not in base64url format");return{header:JSON.parse(im(t[0])),payload:JSON.parse(im(t[1])),signature:Ms(t[2]),raw:{header:t[0],payload:t[1]}}}async function QE(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function JE(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function YE(e){return("0"+e.toString(16)).substr(-2)}function XE(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,YE).join("")}async function ZE(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function ex(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await ZE(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Rn(e,t,r=!1){const n=XE();let s=n;r&&(s+="/recovery"),await gs(e,`${t}-code-verifier`,s);const i=await ex(n);return[i,n===i?"plain":"s256"]}const tx=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function rx(e){const t=e.headers.get(_d);if(!t||!t.match(tx))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function nx(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 sx(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 ix=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function pr(e){if(!ix.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function jt(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 Wu(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function ox(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
67if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function om(e){return JSON.parse(JSON.stringify(e))}const Pn=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)},ax=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function am(e){var t;if(!GE(e))throw new Sd(Pn(e),0);if(ax.includes(e.status))throw new Sd(Pn(e),e.status);let r;try{r=await e.json()}catch(i){throw new Bt(Pn(i),i)}let n;const s=rx(e);if(s&&s.getTime()>=Vv["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new rm(Pn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Ae}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new rm(Pn(r),e.status,r.weak_password.reasons);throw new jE(Pn(r),e.status||500,n)}const lx=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function $(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[_d]||(i[_d]=Vv["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await ux(e,t,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function ux(e,t,r,n,s,i){const o=lx(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new Sd(Pn(l),0)}if(a.ok||await am(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await am(l)}}function _t(e){var t;let r=null;hx(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=VE(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:r,user:n},error:null}}function lm(e){const t=_t(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Gr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function cx(e){return{data:e,error:null}}function dx(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=pi(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function um(e){return e}function hx(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Vu=["global","local","others"];class fx{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=Gv(n),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,r=Vu[0]){if(Vu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Vu.join(", ")}`);try{return await $(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await $(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Gr})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=pi(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await $(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:dx,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(I(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await $(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Gr})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await $(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:um});if(d.error)throw d.error;const c=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>
vendor: 4,470 bytes, line 67
670&&(p.forEach(g=>{const y=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(g.split(";")[1].split("=")[1]);u[`${w}Page`]=y}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(I(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){pr(t);try{return await $(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Gr})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){pr(t);try{return await $(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Gr})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){pr(t);try{return await $(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Gr})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){pr(t.userId);try{const{data:r,error:n}=await $(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _deleteFactor(t){pr(t.userId),pr(t.id);try{return{data:await $(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await $(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:um});if(d.error)throw d.error;const c=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(g=>{const y=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(g.split(";")[1].split("=")[1]);u[`${w}Page`]=y}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(I(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await $(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await $(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await $(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await $(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await $(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await $(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(I(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await $(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await $(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await $(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await $(this.fetch,"DELET
67E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){jt(this.experimental),pr(t.userId);try{return await $(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(I(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){jt(this.experimental),pr(t.userId),pr(t.passkeyId);try{return await $(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}}function cm(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&qv()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class px extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function mx(){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 Qv(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function gx(e){return parseInt(e,16)}function yx(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function vx(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:d,uri:c,version:h}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!c)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
68`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=Qv(e.address),g=d?`${d}://${n}`:n,y=e.statement?`${e.statement}
69`:"",w=`${g} wants you to sign in with your Ethereum account:
70${p}
71
72${y}`;let f=`URI: ${c}
73Version: ${h}
74Chain ID: ${r}${o?`
75Nonce: ${o}`:""}
76Issued At: ${i.toISOString()}`;if(s&&(f+=`
77Expiration Time: ${s.toISOString()}`),a&&(f+=`
78Not Before: ${a.toISOString()}`),l&&(f+=`
79Request ID: ${l}`),u){let m=`
80Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);m+=`
81- ${v}`}f+=m}return`${w}
82${f}`}class Ee extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Al extends Ee{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function wx({error:e,options:t}){var r,n,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ee({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ee({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ee({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ee({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 Ee({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ee({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ee({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ee({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 o=window.location.hostname;if(Jv(o)){if(i.rp.id!==o)return new Ee({message:`The RP ID "${i.rp.id}
82" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ee({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ee({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 Ee({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 Ee({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function bx({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ee({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ee({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Jv(n)){if(r.rpId!==n)return new Ee({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ee({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ee({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 Ee({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class _x{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const kd=new _x;function dm(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=pi(e,["challenge","user","excludeCredentials"]),i=Ms(t).buffer,o=Object.assign(Object.assign({},r),{id:Ms(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Ms(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function hm(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=pi(e,["challenge","allowCredentials"]),s=Ms(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Ms(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function fm(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ln(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ln(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function pm(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ln(new Uint8Array(s.authenticatorData)),clientDataJSON:Ln(new Uint8Array(s.clientDataJSON)),signature:Ln(new Uint8Array(s.signature)),userHandle:s.userHandle?Ln(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Jv(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Ol(){var e,t;return!!(Be()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Yv(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Al("Browser returned unexpected credential type",t)}:{data:null,error:new Al("Empty credential response",t)}}
82catch(t){return{data:null,error:wx({error:t,options:e})}}}async function Xv(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Al("Browser returned unexpected credential type",t)}:{data:null,error:new Al("Empty credential response",t)}}catch(t){return{data:null,error:bx({error:t,options:e})}}}const Sx={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},kx={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Il(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const a=n[i];t(a)?n[i]=Il(a,o):n[i]=Il(o)}else n[i]=o}return n}function Ex(e,t){return Il(Sx,e,t||{})}function xx(e,t){return Il(kx,e,t||{})}class Rx{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const u=s??kd.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const c=n;if(c)d.name=`${d.id}:${c}`;else{const p=(await this.client.getUser()).data.user,g=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${g}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=Ex(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:c,error:h}=await Yv({publicKey:d,signal:u});return c?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}case"request":{const d=xx(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:c,error:h}=await Xv(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return c?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}}}catch(a){return I(a)?{data:null,error:a}:{data:null,error:new Bt("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new xo("rpId is required for WebAuthn authentication")};try{if(!Ol())return{data:null,error:new Bt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return I(o)?{data:null,error:o}:{data:null,error:new Bt("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new xo("rpId is required for WebAuthn registration")};try{if(!Ol())return{data:null,error:new Bt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var c;return(c=d.data)===null||c===void 0?void 0:c.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return I(o)?{data:null,error:o}:{data:null,error:new Bt("Unexpected error in register",o)}}}}mx();const Cx={url:AE,storageKey:OE,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:IE,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},cs={};class Ro{get jwks(){var t,r;return(r=(t=cs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){cs[this.storageKey]=Object.assign(Object.assign({},cs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=cs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){cs[this.storageKey]=Object.assign(Object.assign({},cs[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},Cx),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Ro.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Ro.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Be()){const o=`${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(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.experimental=(n=i.experimental)!==null&&n!==void 0?n:{},this.admin=new fx({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=Gv(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.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 Rx(this)}
82,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?(i.storage?this.storage=i.storage:qv()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=cm(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=cm(this.memoryStorage)),Be()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Wv}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Be()&&(r=qE(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Be()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),DE(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return I(r)?this._returnResult({error:r}):this._returnResult({error:new Bt("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await $(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:_t}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(I(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:d,password:c,options:h}=t;let p=null,g=null;this.flowType==="pkce"&&([p,g]=await Rn(this.storage,this.storageKey)),i=await $(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:c,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:g},xform:_t})}else if("phone"in t){const{phone:d,password:c,options:h}=t;i=await $(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:c,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:_t})}else throw new ba("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await _e(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await $(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:lm})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await $(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:lm})}else throw new ba("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new us;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,u,d,c,h;let p,g;if("message"in t)p=t.message,g=t.signature;else{const{chain:y,wallet:w,statement:f,options:m}=t;let v;if(Be())if(typeof w=="object")v=w;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")v=O.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 w!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=w}const b=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href),k=await v.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=Qv(k[0]);let x=(n=m==null?void 0:m.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!x){const O=await v.request({method:"eth_chainId"});x=gx(O)}const R={domain:b.host,address:E,statement:f,uri:b.href,version:"1",chainId:x,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=m==null?void 0:m.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=vx(R),g=await v.request({method:"personal_sign",params:[yx(p),E]})}try{const{data:y,error:w}=await $(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:g},!((c=t.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:_t});if(w)throw w;if(!y||!y.session||!y.user){const f=new us;return this._returnResult({data:{user:null,session:null},error:f})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:w})}catch(y){if(I(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,d,c,h,p;let g,y;if("message"in t)g=t.message,y=t.signature;else{const{chain:w,wallet:f,statement:m,options:v}=t;let b;if(Be())if(typeof f=="object")b=f;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))b=E.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 f!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=f}const k=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in b&&b.signIn){const E=await b.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),m?{statement:m}:null));let x;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")x=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)x=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in x&&"signature"in x&&(typeof x.signedMessage=="string"||x.signedMessage instanceof Uint8Array)&&x.signature instanceof Uint8Array)g=typeof x.signedMessage=="string"?x.signedMessage:new TextDecoder().decode(x.signedMessage),y=x.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}
82else{if(!("signMessage"in b)||typeof b.signMessage!="function"||!("publicKey"in b)||typeof b!="object"||!b.publicKey||!("toBase58"in b.publicKey)||typeof b.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${k.host} wants you to sign in with your Solana account:`,b.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(n=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((c=(d=v==null?void 0:v.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||c===void 0)&&c.length?["Resources",...v.signInWithSolana.resources.map(x=>`- ${x}`)]:[]].join(`
83`);const E=await b.signMessage(new TextEncoder().encode(g),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=E}}try{const{data:w,error:f}=await $(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Ln(y)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:_t});if(f)throw f;if(!w||!w.session||!w.user){const m=new us;return this._returnResult({data:{user:null,session:null},error:m})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:f})}catch(w){if(I(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await Lt(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new ME;const{data:i,error:o}=await $(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:_t});if(await _e(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new us;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await $(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:_t}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new us;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Rn(this.storage,this.storageKey));const{error:c}=await $(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:d}=await $(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new ba("You must provide either an email or phone number.")}catch(a){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await $(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:_t});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Rn(this.storage,this.storageKey));const u=await $(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:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:cx});return!((i=u.data)===null||i===void 0)&&i.url&&Be()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Ae;const{error:s}=await $(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(I(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t;let o=null,a=null;this.flowType==="pkce"&&([o,a]=await Rn(this.storage,this.storageKey));const{error:l}=await $(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}
83,code_challenge:o,code_challenge_method:a},redirectTo:i==null?void 0:i.emailRedirectTo});return l&&await _e(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await $(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new ba("You must provide either an email or phone number and a type")}catch(r){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Lt(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Hu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Lt(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Wu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=ox(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);if(i){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const a=await Lt(this.storage,this.storageKey);if(a&&a.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await $(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Gr}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ae}:await $(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Gr})})}catch(r){if(I(r))return wa(r)&&(await this._removeSession(),await _e(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new Ae;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Rn(this.storage,this.storageKey));const{data:u,error:d}=await $(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Gr});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(n))return this._returnResult({data:{user:null},error:n});throw n}}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 Ae;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Sa(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(I(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Ae;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(I(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!Be())throw new _a("No browser detected.");
83if(t.error||t.error_description||t.error_code)throw new _a(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Zp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new _a("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Zp("No code detected.");const{data:v,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:v.session,redirectType:(n=v.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:u,token_type:d}=t;if(!o||!l||!a||!d)throw new _a("No session defined in URL");const c=Math.round(Date.now()/1e3),h=parseInt(l);let p=c+h;u&&(p=parseInt(u));const g=p-c;g*1e3<=wr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${g}s, should have been closer to ${h}s`);const y=p-h;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,p,c):c-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,p,c);const{data:w,error:f}=await this._getUser(o);if(f)throw f;const m={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:h,expires_at:p,refresh_token:a,token_type:d,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:t.type},error:null})}catch(s){if(I(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const r=await Lt(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!wa(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!($E(a)&&(a.status===404||a.status===401||a.status===403)||wa(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await _e(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=KE(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),wa(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Rn(this.storage,this.storageKey,!0));try{return await $(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,d;const{data:c,error:h}=i;if(h)throw h;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await $(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=c.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Be()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(I(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:d}=t,c=await $(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:_t}),{data:h,error:p}=c;return p?this._returnResult({data:{user:null,session:null},error:p}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new us}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(s){if(await _e(this.storage,`${this.storageKey}-code-verifier`),I(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
83return await $(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const n=Date.now();return await JE(async s=>(s>0&&await QE(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await $(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:_t})),(s,i)=>{const o=200*Math.pow(2,s);return i&&em(i)&&Date.now()+o-n<wr})}catch(n){if(this._debug(r,"error",n),I(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Be()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Lt(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Lt(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await gs(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Wu()}else if(s&&!s.user&&!s.user){const o=await Lt(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await _e(this.storage,this.storageKey+"-user"),await gs(this.storage,this.storageKey,s)):s.user=Wu()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Hu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Hu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(UE(o)?this._debug(n,"refresh discarded by commit guard",o):this._debug(n,"refresh failed",o))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Ae;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 s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new su;const i=await Lt(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Ae;const l=await Lt(this.storage,this.storageKey);if(i!==null&&(l===null||l.refresh_token!==i.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const h={data:null,error:new tm};return this.refreshingDeferred.resolve(h),h}const d=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==d){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, und
83oing write"),await _e(this.storage,this.storageKey),this.userStorage&&await _e(this.userStorage,this.storageKey+"-user");const h={data:null,error:new tm};return this.refreshingDeferred.resolve(h),h}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const c={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(c),c}catch(i){if(this._debug(s,"error",i),I(i)){const o={data:null,error:i};if(!em(i)){const a=await Lt(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid — preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:o,expiresAt:Date.now()+PE},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await _e(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await gs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=om(s);await gs(this.storage,this.storageKey,i)}else{const s=om(r);await gs(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await _e(this.storage,this.storageKey),await _e(this.storage,this.storageKey+"-code-verifier"),await _e(this.storage,this.storageKey+"-user"),this.userStorage&&await _e(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Be()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),wr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${wr}ms, refresh threshold is ${Fi} ticks`),s<=Fi&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof px)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/wr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${wr}ms, refresh threshold is ${Fi} ticks`),s<=Fi&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Be()||!(window!=null&&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==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
83{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await Rn(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await $(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await $(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?fm(t.webauthn.credential_response):pm(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:u}=await $(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return u?this._returnResult({data:null,error:u}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:u}))})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=await $(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:dm(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:hm(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,i;if(t)try{const{payload:p}=Sa(t);let g=null;p.aal&&(g=p.aal);let y=g;const{data:{user:w},error:f}=await this.getUser(t);if(f)return this._returnResult({data:null,error:f});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(b=>b.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(y="aal2");const v=p.amr||[];return{data:{currentLevel:g,nextLevel:y,currentAuthenticationMethods:v},error:null}}catch(p){if(I(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:a}
vendor: 3,409 bytes, line 83
83=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Sa(o.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const h=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await $(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Ae})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){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 Ae});const o=await $(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Be()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){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 Ae});const o=await $(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Be()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await $(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Ae})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await $(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ae})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+LE>s)return n;const{data:i,error:o}=await $(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:p,error:g}
83=await this.getSession();if(g||!p.session)return this._returnResult({data:null,error:g});n=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Sa(n);if(!(r!=null&&r.allowExpired))try{nx(i.exp)}catch(p){throw new Tl(p instanceof Error?p.message:"JWT validation failed")}const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:p}=await this.getUser(n);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const d=sx(s.alg),c=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,c,o,WE(`${a}.${l}`)))throw new Tl("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s;jt(this.experimental);try{if(!Ol())return this._returnResult({data:null,error:new Bt("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=hm(i.options),l=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:kd.createNewAbortSignal(),{data:u,error:d}=await Xv({publicKey:a,signal:l});if(d||!u)return this._returnResult({data:null,error:d??new Bt("WebAuthn ceremony failed",null)});const c=pm(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:c})}catch(i){if(I(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var r,n;jt(this.experimental);try{if(!Ol())return this._returnResult({data:null,error:new Bt("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=dm(s.options),a=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:kd.createNewAbortSignal(),{data:l,error:u}=await Yv({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new Bt("WebAuthn ceremony failed",null)});const d=fm(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:d})}catch(s){if(I(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){jt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ae});const{data:s,error:i}=await $(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){jt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Ae});const{data:i,error:o}=await $(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;jt(this.experimental);try{const{data:n,error:s}=await $(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if(I(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){jt(this.experimental);try{const{data:r,error:n}=await $(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:_t});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){jt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ae});const{data:s,error:i}=await $(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(I(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){jt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Ae});const{data:i,error:o}=await $(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){jt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Ae});const{error:i}
83=await $(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if(I(r))return this._returnResult({data:null,error:r});throw r}}}Ro.nextInstanceID={};const Tx=Ro,Px="2.108.2";let Bi="",Nl;if(typeof Deno<"u"){var Ku;Bi="deno",Nl=(Ku=Deno.version)===null||Ku===void 0?void 0:Ku.deno}else if(typeof document<"u")Bi="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Bi="react-native";else{var qu;Bi="node",Nl=typeof process<"u"?(qu=process.version)===null||qu===void 0?void 0:qu.replace(/^v/,""):void 0}const Zv=[`runtime=${Bi}`];Nl&&Zv.push(`runtime-version=${Nl}`);const Ax={"X-Client-Info":`supabase-js/${Px}; ${Zv.join("; ")}`},Ox={headers:Ax},Ix={schema:"public"},Nx={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Lx={},jx={enabled:!1,respectSamplingDecision:!0};function $x(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(d){try{u(n.next(d))}catch(c){o(c)}}function l(d){try{u(n.throw(d))}catch(c){o(c)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((n=n.apply(e,[])).next())})}let Gu=null;const Dx="@opentelemetry/api";function Mx(){return Gu===null&&(Gu=import(Dx).catch(()=>null)),Gu}function Ux(){return $x(this,void 0,void 0,function*(){try{const e=yield Mx();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function Fx(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,n,s,i]=t;if(r.length!==2||n.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(r)||!o.test(n)||!o.test(s)||!o.test(i)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function Bx(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const n of t)try{if(typeof n=="string"){if(zx(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function zx(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function Hx(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Co(e){"@babel/helpers - typeof";return Co=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},Co(e)}function Wx(e,t){if(Co(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Co(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vx(e){var t=Wx(e,"string");return Co(t)=="symbol"?t:t+""}function Kx(e,t,r){return(t=Vx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mm(Object(r),!0).forEach(function(n){Kx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const qx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Gx=()=>Headers,Qx=(e,t,r,n,s)=>{const i=qx(n),o=Gx(),a=(s==null?void 0:s.enabled)===!0,l=(s==null?void 0:s.respectSamplingDecision)!==!1,u=a?Hx(t):null;return async(d,c)=>{var h;const p=(h=await r())!==null&&h!==void 0?h:e;let g=new o(c==null?void 0:c.headers);if(g.has("apikey")||g.set("apikey",e),g.has("Authorization")||g.set("Authorization",`Bearer ${p}`),u){const y=await Jx(d,u,l);y&&(y.traceparent&&!g.has("traceparent")&&g.set("traceparent",y.traceparent),y.tracestate&&!g.has("tracestate")&&g.set("tracestate",y.tracestate),y.baggage&&!g.has("baggage")&&g.set("baggage",y.baggage))}return i(d,we(we({},c),{},{headers:g}))}};async function Jx(e,t,r){if(!Bx(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const n=await Ux();if(!n||!n.traceparent)return null;if(r){const s=Fx(n.traceparent);if(s&&!s.isSampled)return null}return n}function gm(e){return typeof e=="boolean"?{enabled:e}:e}function Yx(e){return e.endsWith("/")?e:e+"/"}function Xx(e,t){var r,n,s,i,o,a;const{db:l,auth:u,realtime:d,global:c}=e,{db:h,auth:p,realtime:g,global:y}=t,w=gm(e.tracePropagation),f=gm(t.tracePropagation),m={db:we(we({},h),l),auth:we(we({},p),u),realtime:we(we({},g),d),storage:{},global:we(we(we({},y),c),{},{headers:we(we({},(r=y==null?void 0:y.headers)!==null&&r!==void 0?r:{}),(n=c==null?void 0:c.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(i=w==null?void 0:w.enabled)!==null&&i!==void 0?i:f==null?void 0:f.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=w==null?void 0:w.respectSamplingDecision)!==null&&a!==void 0?a:f==null?void 0:f.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?m.accessToken=e.accessToken:delete m.accessToken,m}function Zx(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
83if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Yx(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var eR=class extends Tx{constructor(e){super(e)}},tR=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=Zx(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:Ix,realtime:Lx,auth:we(we({},Nx),{},{storageKey:o}),global:Ox,tracePropagation:jx},l=Xx(r??{},a);if(this.settings=l,this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,c)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(c)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=Qx(t,e,this._getAccessToken.bind(this),l.global.fetch,l.tracePropagation),this.realtime=this._initRealtimeClient(we({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new m1(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new TE(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new o1(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:d,lockAcquireTimeout:c,skipAutoInitialize:h},p,g){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new eR({url:this.authUrl.href,headers:we(we({},y),p),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:d,fetch:g,lockAcquireTimeout:c,skipAutoInitialize:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(w=>w.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new Y1(this.realtimeUrl.href,we(we({},e),{},{params:we(we({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const eP=(e,t,r)=>new tR(e,t,r);function rR(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}rR()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
83ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");/**
84 * react-router v7.17.0
85 *
86 * Copyright (c) Remix Software Inc.
87 *
88 * This source code is licensed under the MIT license found in the
89 * LICENSE.md file in the root directory of this source tree.
90 *
91 * @license MIT
92 */var ym="popstate";function vm(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function nR(e={}){function t(n,s){var u;let i=(u=s.state)==null?void 0:u.masked,{pathname:o,search:a,hash:l}=i||n.location;return Ed("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,s){return typeof s=="string"?s:To(s)}return iR(t,r,null,e)}function fe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Pt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sR(){return Math.random().toString(36).substring(2,10)}function wm(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ed(e,t,r=null,n,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?gi(t):t,state:r,key:t&&t.key||n||sR(),mask:s}}function To({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function gi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function iR(e,t,r,n={}){let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a="POP",l=null,u=d();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function d(){return(o.state||{idx:null}).idx}function c(){a="POP";let w=d(),f=w==null?null:w-u;u=w,l&&l({action:a,location:y.location,delta:f})}function h(w,f){a="PUSH";let m=vm(w)?w:Ed(y.location,w,f);u=d()+1;let v=wm(m,u),b=y.createHref(m.mask||m);try{o.pushState(v,"",b)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(b)}i&&l&&l({action:a,location:y.location,delta:1})}function p(w,f){a="REPLACE";let m=vm(w)?w:Ed(y.location,w,f);u=d();let v=wm(m,u),b=y.createHref(m.mask||m);o.replaceState(v,"",b),i&&l&&l({action:a,location:y.location,delta:0})}function g(w){return oR(s,w)}let y={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(ym,c),l=w,()=>{s.removeEventListener(ym,c),l=null}},createHref(w){return t(s,w)},createURL:g,encodeLocation(w){let f=g(w);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:h,replace:p,go(w){return o.go(w)}};return y}function oR(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),fe(n,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:To(t);return s=s.replace(/ $/,"%20"),!r&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function e0(e,t,r="/"){return aR(e,t,r,!1)}function aR(e,t,r,n,s){let i=typeof t=="string"?gi(t):t,o=jr(i.pathname||"/",r);if(o==null)return null;let a=lR(e),l=null,u=bR(o);for(let d=0;l==null&&d<a.length;++d)l=vR(a[d],u,n);return l}function lR(e){let t=t0(e);return uR(t),t}function t0(e,t=[],r=[],n="",s=!1){let i=(o,a,l=s,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&l)return;fe(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let c=Wt([n,d.relativePath]),h=r.concat(d);o.children&&o.children.length>0&&(fe(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),t0(o.children,t,h,c,l)),!(o.path==null&&!o.index)&&t.push({path:c,score:gR(c,o.index),routesMeta:h})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let u of r0(o.path))i(o,a,!0,u)}),t}function r0(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=r0(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function uR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:yR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var cR=/^:[\w-]+$/,dR=3,hR=2,fR=1,pR=10,mR=-2,bm=e=>e==="*";function gR(e,t){let r=e.split("/"),n=r.length;return r.some(bm)&&(n+=mR),t&&(n+=hR),r.filter(s=>!bm(s)).reduce((s,i)=>s+(cR.test(i)?dR:i===""?fR:pR),n)}function yR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function vR(e,t,r=!1){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",c=Ll({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),h=l.route;if(!c&&u&&r&&!n[n.length-1].route.index&&(c=Ll({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;
92Object.assign(s,c.params),o.push({params:s,pathname:Wt([i,c.pathname]),pathnameBase:ER(Wt([i,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(i=Wt([i,c.pathnameBase]))}return o}function Ll(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=wR(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,{paramName:d,isOptional:c},h)=>{if(d==="*"){let g=a[h]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const p=a[h];return c&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function wR(e,t=!1,r=!0){Pt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l,u,d)=>{if(n.push({paramName:a,isOptional:l!=null}),l){let c=d.charAt(u+o.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function bR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Pt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function jr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var _R=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function SR(e,t="/"){let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?gi(e):e,i;return r?(r=n0(r),r.startsWith("/")?i=_m(r.substring(1),"/"):i=_m(r,t)):i=t,{pathname:i,search:xR(n),hash:RR(s)}}function _m(e,t){let r=jl(t).split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Qu(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Mh(e){let t=kR(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function iu(e,t,r,n=!1){let s;typeof e=="string"?s=gi(e):(s={...e},fe(!s.pathname||!s.pathname.includes("?"),Qu("?","pathname","search",s)),fe(!s.pathname||!s.pathname.includes("#"),Qu("#","pathname","hash",s)),fe(!s.search||!s.search.includes("#"),Qu("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let c=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),c-=1;s.pathname=h.join("/")}a=c>=0?t[c]:"/"}let l=SR(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}var n0=e=>e.replace(/\/\/+/g,"/"),Wt=e=>n0(e.join("/")),jl=e=>e.replace(/\/+$/,""),ER=e=>jl(e).replace(/^\/*/,"/"),xR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,RR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,CR=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function TR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function PR(e){let t=e.map(r=>r.route.path).filter(Boolean);return Wt(t)||"/"}var s0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function i0(e,t){let r=e;if(typeof r!="string"||!_R.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,s=!1;if(s0)try{let i=new URL(window.location.href),o=r.startsWith("//")?new URL(i.protocol+r):new URL(r),a=jr(o.pathname,t);o.origin===i.origin&&a!=null?r=a+o.search+o.hash:s=!0}catch{Pt(!1,`<Link to="${r}">
92 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var o0=["POST","PUT","PATCH","DELETE"];new Set(o0);var AR=["GET",...o0];new Set(AR);var yi=S.createContext(null);yi.displayName="DataRouter";var ou=S.createContext(null);ou.displayName="DataRouterState";var a0=S.createContext(!1);function OR(){return S.useContext(a0)}var l0=S.createContext({isTransitioning:!1});l0.displayName="ViewTransition";var IR=S.createContext(new Map);IR.displayName="Fetchers";var NR=S.createContext(null);NR.displayName="Await";var wt=S.createContext(null);wt.displayName="Navigation";var Bo=S.createContext(null);Bo.displayName="Location";var dr=S.createContext({outlet:null,matches:[],isDataRoute:!1});dr.displayName="Route";var Uh=S.createContext(null);Uh.displayName="RouteError";var u0="REACT_ROUTER_ERROR",LR="REDIRECT",jR="ROUTE_ERROR_RESPONSE";function $R(e){if(e.startsWith(`${u0}:${LR}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function DR(e){if(e.startsWith(`${u0}:${jR}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new CR(t.status,t.statusText,t.data)}catch{}}function MR(e,{relative:t}={}){fe(vi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=S.useContext(wt),{hash:s,pathname:i,search:o}=zo(e,{relative:t}),a=i;return r!=="/"&&(a=i==="/"?r:Wt([r,i])),n.createHref({pathname:a,search:o,hash:s})}function vi(){return S.useContext(Bo)!=null}function Gt(){return fe(vi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Bo).location}var c0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function d0(e){S.useContext(wt).static||S.useLayoutEffect(e)}function Fh(){let{isDataRoute:e}=S.useContext(dr);return e?YR():UR()}function UR(){fe(vi(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(yi),{basename:t,navigator:r}=S.useContext(wt),{matches:n}=S.useContext(dr),{pathname:s}=Gt(),i=JSON.stringify(Mh(n)),o=S.useRef(!1);return d0(()=>{o.current=!0}),S.useCallback((l,u={})=>{if(Pt(o.current,c0),!o.current)return;if(typeof l=="number"){r.go(l);return}let d=iu(l,JSON.parse(i),s,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Wt([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,i,s,e])}S.createContext(null);function zo(e,{relative:t}={}){let{matches:r}=S.useContext(dr),{pathname:n}=Gt(),s=JSON.stringify(Mh(r));return S.useMemo(()=>iu(e,JSON.parse(s),n,t==="path"),[e,s,n,t])}function FR(e,t){return h0(e,t)}function h0(e,t,r){var w;fe(vi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=S.useContext(wt),{matches:s}=S.useContext(dr),i=s[s.length-1],o=i?i.params:{},a=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let f=u&&u.path||"";p0(a,!u||f.endsWith("*")||f.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${f}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
93
94Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let d=Gt(),c;if(t){let f=typeof t=="string"?gi(t):t;fe(l==="/"||((w=f.pathname)==null?void 0:w.startsWith(l)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${f.pathname}" was given in the \`location\` prop.`),c=f}else c=d;let h=c.pathname||"/",p=h;if(l!=="/"){let f=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(f.length).join("/")}let g=r&&r.state.matches.length?r.state.matches.map(f=>Object.assign(f,{route:r.manifest[f.route.id]||f.route})):e0(e,{pathname:p});Pt(u||g!=null,`No routes matched location "${c.pathname}
94${c.search}${c.hash}" `),Pt(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=VR(g&&g.map(f=>Object.assign({},f,{params:Object.assign({},o,f.params),pathname:Wt([l,n.encodeLocation?n.encodeLocation(f.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?l:Wt([l,n.encodeLocation?n.encodeLocation(f.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathnameBase])})),s,r);return t&&y?S.createElement(Bo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...c},navigationType:"POP"}},y):y}function BR(){let e=JR(),t=TR(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:i},"ErrorBoundary")," or"," ",S.createElement("code",{style:i},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),r?S.createElement("pre",{style:s},r):null,o)}var zR=S.createElement(BR,null),f0=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=DR(e.digest);r&&(e=r)}let t=e!==void 0?S.createElement(dr.Provider,{value:this.props.routeContext},S.createElement(Uh.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(HR,{error:e},t):t}};f0.contextType=a0;var Ju=new WeakMap;function HR({children:e,error:t}){let{basename:r}=S.useContext(wt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=$R(t.digest);if(n){let s=Ju.get(t);if(s)throw s;let i=i0(n.location,r);if(s0&&!Ju.get(t))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw Ju.set(t,o),o}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function WR({routeContext:e,match:t,children:r}){let n=S.useContext(yi);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(dr.Provider,{value:e},r)}function VR(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,i=n==null?void 0:n.errors;if(i!=null){let d=s.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id])!==void 0);fe(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let o=!1,a=-1;if(r&&n){o=n.renderFallback;for(let d=0;d<s.length;d++){let c=s[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=d),c.route.id){let{loaderData:h,errors:p}
94=n,g=c.route.loader&&!h.hasOwnProperty(c.route.id)&&(!p||p[c.route.id]===void 0);if(c.route.lazy||g){r.isStatic&&(o=!0),a>=0?s=s.slice(0,a+1):s=[s[0]];break}}}}let l=r==null?void 0:r.onError,u=n&&l?(d,c)=>{var h,p;l(d,{location:n.location,params:((p=(h=n.matches)==null?void 0:h[0])==null?void 0:p.params)??{},pattern:PR(n.matches),errorInfo:c})}:void 0;return s.reduceRight((d,c,h)=>{let p,g=!1,y=null,w=null;n&&(p=i&&c.route.id?i[c.route.id]:void 0,y=c.route.errorElement||zR,o&&(a<0&&h===0?(p0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):a===h&&(g=!0,w=c.route.hydrateFallbackElement||null)));let f=t.concat(s.slice(0,h+1)),m=()=>{let v;return p?v=y:g?v=w:c.route.Component?v=S.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=d,S.createElement(WR,{match:c,routeContext:{outlet:d,matches:f,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?S.createElement(f0,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:u}):m()},null)}function Bh(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function KR(e){let t=S.useContext(yi);return fe(t,Bh(e)),t}function qR(e){let t=S.useContext(ou);return fe(t,Bh(e)),t}function GR(e){let t=S.useContext(dr);return fe(t,Bh(e)),t}function zh(e){let t=GR(e),r=t.matches[t.matches.length-1];return fe(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function QR(){return zh("useRouteId")}function JR(){var n;let e=S.useContext(Uh),t=qR("useRouteError"),r=zh("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function YR(){let{router:e}=KR("useNavigate"),t=zh("useNavigate"),r=S.useRef(!1);return d0(()=>{r.current=!0}),S.useCallback(async(s,i={})=>{Pt(r.current,c0),r.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...i}))},[e,t])}var Sm={};function p0(e,t,r){!t&&!Sm[e]&&(Sm[e]=!0,Pt(!1,r))}S.memo(XR);function XR({routes:e,manifest:t,future:r,state:n,isStatic:s,onError:i}){return h0(e,void 0,{manifest:t,state:n,isStatic:s,onError:i})}function tP({to:e,replace:t,state:r,relative:n}){fe(vi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=S.useContext(wt);Pt(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=S.useContext(dr),{pathname:o}=Gt(),a=Fh(),l=iu(e,Mh(i),o,n==="path"),u=JSON.stringify(l);return S.useEffect(()=>{a(JSON.parse(u),{replace:t,state:r,relative:n})},[a,u,n,t,r]),null}function ZR(e){fe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function eC({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:s,static:i=!1,useTransitions:o}){fe(!vi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=S.useMemo(()=>({basename:a,navigator:s,static:i,useTransitions:o,future:{}}),[a,s,i,o]);typeof r=="string"&&(r=gi(r));let{pathname:u="/",search:d="",hash:c="",state:h=null,key:p="default",mask:g}=r,y=S.useMemo(()=>{let w=jr(u,a);return w==null?null:{location:{pathname:w,search:d,hash:c,state:h,key:p,mask:g},navigationType:n}},[a,u,d,c,h,p,n,g]);return Pt(y!=null,`<Router basename="${a}"> is not able to match the URL "${u}${d}${c}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:S.createElement(wt.Provider,{value:l},S.createElement(Bo.Provider,{children:t,value:y}))}function rP({children:e,location:t}){return FR(xd(e),t)}function xd(e,t=[]){let r=[];return S.Children.forEach(e,(n,s)=>{if(!S.isValidElement(n))return;let i=[...t,s];if(n.type===S.Fragment){r.push.apply(r,xd(n.props.children,i));return}fe(n.type===ZR,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),fe(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,
94shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=xd(n.props.children,i)),r.push(o)}),r}var Va="get",Ka="application/x-www-form-urlencoded";function au(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tC(e){return au(e)&&e.tagName.toLowerCase()==="button"}function rC(e){return au(e)&&e.tagName.toLowerCase()==="form"}function nC(e){return au(e)&&e.tagName.toLowerCase()==="input"}function sC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iC(e,t){return e.button===0&&(!t||t==="_self")&&!sC(e)}function Rd(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function oC(e,t){let r=Rd(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}var ka=null;function aC(){if(ka===null)try{new FormData(document.createElement("form"),0),ka=!1}catch{ka=!0}return ka}var lC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Yu(e){return e!=null&&!lC.has(e)?(Pt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ka}"`),null):e}function uC(e,t){let r,n,s,i,o;if(rC(e)){let a=e.getAttribute("action");n=a?jr(a,t):null,r=e.getAttribute("method")||Va,s=Yu(e.getAttribute("enctype"))||Ka,i=new FormData(e)}else if(tC(e)||nC(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?jr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Va,s=Yu(e.getAttribute("formenctype"))||Yu(a.getAttribute("enctype"))||Ka,i=new FormData(a,e),!aC()){let{name:u,type:d,value:c}=e;if(d==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,c)}}else{if(au(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Va,n=null,s=Ka,o=e}return i&&s==="text/plain"&&(o=i,i=void 0),{action:n,method:r.toLowerCase(),encType:s,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hh(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function m0(e,t,r,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:t&&jr(s.pathname,t)==="/"?s.pathname=`${jl(t)}/_root.${n}`:s.pathname=`${jl(s.pathname)}.${n}`,s}async function cC(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dC(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function hC(e,t,r){let n=await Promise.all(e.map(async s=>{let i=t.routes[s.route.id];if(i){let o=await cC(i,r);return o.links?o.links():[]}return[]}));return gC(n.flat(1).filter(dC).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function km(e,t,r,n,s,i){let o=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var d;return r[u].pathname!==l.pathname||((d=r[u].route.path)==null?void 0:d.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var c;let d=n.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((c=r[0])==null?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function fC(e,t,{includeHydrateFallback:r}={}){return pC(e.map(n=>{let s=t.routes[n.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function pC(e){return[...new Set(e)]}function mC(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function gC(e,t){let r=new Set;return new Set(t),e.reduce((n,s)=>{let i=JSON.stringify(mC(s));return r.has(i)||(r.add(i),n.push({key:i,link:s})),n},[])}function Wh(){let e=S.useContext(yi);return Hh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function yC(){let e=S.useContext(ou);return Hh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Vh=S.createContext(void 0);Vh.displayName="FrameworkContext";function Kh(){let e=S.useContext(Vh);return Hh(e,"You must render this element inside a <HydratedRouter> element"),e}function vC(e,t){let r=S.useContext(Vh),[n,s]=S.useState(!1),[i,o]=S.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:c}=t,h=S.useRef(null);S.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let y=f=>{f.forEach(m=>{o(m.isIntersecting)})},w=new IntersectionObserver(y,{threshold:.5});return h.current&&w.observe(h.current),()=>{w.disconnect()}}},[e]),S.useEffect(()=>{if(n){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[n]);let p=()=>{s(!0)},g=()=>{s(!1),o(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Oi(a,p),onBlur:Oi(l,g),onMouseEnter:Oi(u,p),onMouseLeave:Oi(d,g),onTouchStart:Oi(c,p)}]:[!1,h,{}]}function Oi(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function wC({page:e,...t}){let r=OR(),{router:n}=Wh(),s=S.useMemo(()=>e0(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?r?S.createElement(_C,{page:e,matches:s,...t}):S.createElement(SC,{page:e,matches:s,...t}):null}function bC(e){let{manifest:t,routeModules:r}=Kh(),[n,s]=S.useState([]);return S.useEffect(()=>{let i=!1;return hC(e,t,r).then(o=>{i||s(o)}),()=>{i=!0}},[e,t,r]),n}function _C({page:e,matches:t,...r}){let n=Gt(),{future:s}=Kh(),{basename:i}=Wh(),o=S.useMemo(()=>
94{if(e===n.pathname+n.search+n.hash)return[];let a=m0(e,i,s.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,u=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?l=!0:u.push(d.route.id);return l&&u.length>0&&a.searchParams.set("_routes",u.join(",")),[a.pathname+a.search]},[i,s.v8_trailingSlashAwareDataRequests,e,n,t]);return S.createElement(S.Fragment,null,o.map(a=>S.createElement("link",{key:a,rel:"prefetch",as:"fetch",href:a,...r})))}function SC({page:e,matches:t,...r}){let n=Gt(),{future:s,manifest:i,routeModules:o}=Kh(),{basename:a}=Wh(),{loaderData:l,matches:u}=yC(),d=S.useMemo(()=>km(e,t,u,i,n,"data"),[e,t,u,i,n]),c=S.useMemo(()=>km(e,t,u,i,n,"assets"),[e,t,u,i,n]),h=S.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,w=!1;if(t.forEach(m=>{var b;let v=i.routes[m.route.id];!v||!v.hasLoader||(!d.some(k=>k.route.id===m.route.id)&&m.route.id in l&&((b=o[m.route.id])!=null&&b.shouldRevalidate)||v.hasClientLoader?w=!0:y.add(m.route.id))}),y.size===0)return[];let f=m0(e,a,s.v8_trailingSlashAwareDataRequests,"data");return w&&y.size>0&&f.searchParams.set("_routes",t.filter(m=>y.has(m.route.id)).map(m=>m.route.id).join(",")),[f.pathname+f.search]},[a,s.v8_trailingSlashAwareDataRequests,l,n,i,d,t,e,o]),p=S.useMemo(()=>fC(c,i),[c,i]),g=bC(c);return S.createElement(S.Fragment,null,h.map(y=>S.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),p.map(y=>S.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),g.map(({key:y,link:w})=>S.createElement("link",{key:y,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function kC(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var EC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{EC&&(window.__reactRouterVersion="7.17.0")}catch{}function nP({basename:e,children:t,useTransitions:r,window:n}){let s=S.useRef();s.current==null&&(s.current=nR({window:n,v5Compat:!0}));let i=s.current,[o,a]=S.useState({action:i.action,location:i.location}),l=S.useCallback(u=>{r===!1?a(u):S.startTransition(()=>a(u))},[r]);return S.useLayoutEffect(()=>i.listen(l),[i,l]),S.createElement(eC,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i,useTransitions:r})}var g0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,y0=S.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:s,reloadDocument:i,replace:o,mask:a,state:l,target:u,to:d,preventScrollReset:c,viewTransition:h,defaultShouldRevalidate:p,...g},y){let{basename:w,navigator:f,useTransitions:m}=S.useContext(wt),v=typeof d=="string"&&g0.test(d),b=i0(d,w);d=b.to;let k=MR(d,{relative:s}),E=Gt(),x=null;if(a){let Z=iu(a,[],E.mask?E.mask.pathname:"/",!0);w!=="/"&&(Z.pathname=Z.pathname==="/"?w:Wt([w,Z.pathname])),x=f.createHref(Z)}let[R,O,P]=vC(n,g),z=TC(d,{replace:o,mask:a,state:l,target:u,preventScrollReset:c,relative:s,viewTransition:h,defaultShouldRevalidate:p,useTransitions:m});function M(Z){t&&t(Z),Z.defaultPrevented||z(Z)}let K=!(b.isExternal||i),q=S.createElement("a",{...g,...P,href:(K?x:void 0)||b.absoluteURL||k,onClick:K?M:t,ref:kC(y,O),target:u,"data-discover":!v&&r==="render"?"true":void 0});return R&&!v?S.createElement(S.Fragment,null,q,S.createElement(wC,{page:k})):q});y0.displayName="Link";var xC=S.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:s=!1,style:i,to:o,viewTransition:a,children:l,...u},d){let c=zo(o,{relative:u.relative}),h=Gt(),p=S.useContext(ou),{navigator:g,basename:y}=S.useContext(wt),w=p!=null&&NC(c)&&a===!0,f=g.encodeLocation?g.encodeLocation(c).pathname:c.pathname,m=h.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(m=m.toLowerCase(),v=v?v.toLowerCase():null,f=f.toLowerCase()),v&&y&&(v=jr(v,y)||v);const b=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let k=m===f||!s&&m.startsWith(f)&&m.charAt(b)==="/",E=v!=null&&(v===f||!s&&v.startsWith(f)&&v.charAt(f.length)==="/"),x={isActive:k,isPending:E,isTransitioning:w},R=k?t:void 0,O;typeof n=="function"?O=n(x):O=[n,k?"active":null,E?"pending":null,w?"transitioning":null].filter(
94Boolean).join(" ");let P=typeof i=="function"?i(x):i;return S.createElement(y0,{...u,"aria-current":R,className:O,ref:d,style:P,to:o,viewTransition:a},typeof l=="function"?l(x):l)});xC.displayName="NavLink";var RC=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:s,state:i,method:o=Va,action:a,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:c,defaultShouldRevalidate:h,...p},g)=>{let{useTransitions:y}=S.useContext(wt),w=OC(),f=IC(a,{relative:u}),m=o.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&g0.test(a),b=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let E=k.nativeEvent.submitter,x=(E==null?void 0:E.getAttribute("formmethod"))||o,R=()=>w(E||k.currentTarget,{fetcherKey:t,method:x,navigate:r,replace:s,state:i,relative:u,preventScrollReset:d,viewTransition:c,defaultShouldRevalidate:h});y&&r!==!1?S.startTransition(()=>R()):R()};return S.createElement("form",{ref:g,method:m,action:f,onSubmit:n?l:b,...p,"data-discover":!v&&e==="render"?"true":void 0})});RC.displayName="Form";function CC(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function v0(e){let t=S.useContext(yi);return fe(t,CC(e)),t}function TC(e,{target:t,replace:r,mask:n,state:s,preventScrollReset:i,relative:o,viewTransition:a,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Fh(),c=Gt(),h=zo(e,{relative:o});return S.useCallback(p=>{if(iC(p,t)){p.preventDefault();let g=r!==void 0?r:To(c)===To(h),y=()=>d(e,{replace:g,mask:n,state:s,preventScrollReset:i,relative:o,viewTransition:a,defaultShouldRevalidate:l});u?S.startTransition(()=>y()):y()}},[c,d,h,r,n,s,t,e,i,o,a,l,u])}function sP(e){Pt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(Rd(e)),r=S.useRef(!1),n=Gt(),s=S.useMemo(()=>oC(n.search,r.current?null:t.current),[n.search]),i=Fh(),o=S.useCallback((a,l)=>{const u=Rd(typeof a=="function"?a(new URLSearchParams(s)):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,o]}var PC=0,AC=()=>`__${String(++PC)}__`;function OC(){let{router:e}=v0("useSubmit"),{basename:t}=S.useContext(wt),r=QR(),n=e.fetch,s=e.navigate;return S.useCallback(async(i,o={})=>{let{action:a,method:l,encType:u,formData:d,body:c}=uC(i,t);if(o.navigate===!1){let h=o.fetcherKey||AC();await n(h,r,o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:c,formMethod:o.method||l,formEncType:o.encType||u,flushSync:o.flushSync})}else await s(o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:c,formMethod:o.method||l,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,s,t,r])}function IC(e,{relative:t}={}){let{basename:r}=S.useContext(wt),n=S.useContext(dr);fe(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),i={...zo(e||".",{relative:t})},o=Gt();if(e==null){i.search=o.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(c=>c).forEach(c=>a.append("index",c));let d=a.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Wt([r,i.pathname])),To(i)}function NC(e,{relative:t}={}){let r=S.useContext(l0);fe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=v0("useViewTransitionState"),s=zo(e,{relative:t});if(!r.isTransitioning)return!1;let i=jr(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=jr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Ll(s.pathname,o)!=null||Ll(s.pathname,i)!=null}/**
95 * @license lucide-react v0.453.0 - ISC
96 *
97 * This source code is licensed under the ISC license.
98 * See the LICENSE file in the root directory of this source tree.
99 */const LC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),w0=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
100 * @license lucide-react v0.453.0 - ISC
101 *
102 * This source code is licensed under the ISC license.
103 * See the LICENSE file in the root directory of this source tree.
104 */var jC={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"};/**
105 * @license lucide-react v0.453.0 - ISC
106 *
107 * This source code is licensed under the ISC license.
108 * See the LICENSE file in the root directory of this source tree.
109 */const $C=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>S.createElement("svg",{ref:l,...jC,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:w0("lucide",s),...a},[...o.map(([u,d])=>S.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
110 * @license lucide-react v0.453.0 - ISC
111 *
112 * This source code is licensed under the ISC license.
113 * See the LICENSE file in the root directory of this source tree.
114 */const G=(e,t)=>{const r=S.forwardRef(({className:n,...s},i)=>S.createElement($C,{ref:i,iconNode:t,className:w0(`lucide-${LC(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
115 * @license lucide-react v0.453.0 - ISC
116 *
117 * This source code is licensed under the ISC license.
118 * See the LICENSE file in the root directory of this source tree.
119 */const iP=G("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
120 * @license lucide-react v0.453.0 - ISC
121 *
122 * This source code is licensed under the ISC license.
123 * See the LICENSE file in the root directory of this source tree.
124 */const oP=G("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
125 * @license lucide-react v0.453.0 - ISC
126 *
127 * This source code is licensed under the ISC license.
128 * See the LICENSE file in the root directory of this source tree.
129 */const aP=G("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
130 * @license lucide-react v0.453.0 - ISC
131 *
132 * This source code is licensed under the ISC license.
133 * See the LICENSE file in the root directory of this source tree.
134 */const lP=G("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
135 * @license lucide-react v0.453.0 - ISC
136 *
137 * This source code is licensed under the ISC license.
138 * See the LICENSE file in the root directory of this source tree.
139 */const uP=G("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
140 * @license lucide-react v0.453.0 - ISC
141 *
142 * This source code is licensed under the ISC license.
143 * See the LICENSE file in the root directory of this source tree.
144 */const cP=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
145 * @license lucide-react v0.453.0 - ISC
146 *
147 * This source code is licensed under the ISC license.
148 * See the LICENSE file in the root directory of this source tree.
149 */const dP=G("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
150 * @license lucide-react v0.453.0 - ISC
151 *
152 * This source code is licensed under the ISC license.
153 * See the LICENSE file in the root directory of this source tree.
154 */const hP=G("CircleAlert",[["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"}]]);/**
155 * @license lucide-react v0.453.0 - ISC
156 *
157 * This source code is licensed under the ISC license.
158 * See the LICENSE file in the root directory of this source tree.
159 */const fP=G("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
160 * @license lucide-react v0.453.0 - ISC
161 *
162 * This source code is licensed under the ISC license.
163 * See the LICENSE file in the root directory of this source tree.
164 */const pP=G("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
165 * @license lucide-react v0.453.0 - ISC
166 *
167 * This source code is licensed under the ISC license.
168 * See the LICENSE file in the root directory of this source tree.
169 */const mP=G("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
170 * @license lucide-react v0.453.0 - ISC
171 *
172 * This source code is licensed under the ISC license.
173 * See the LICENSE file in the root directory of this source tree.
174 */const gP=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
175 * @license lucide-react v0.453.0 - ISC
176 *
177 * This source code is licensed under the ISC license.
178 * See the LICENSE file in the root directory of this source tree.
179 */const yP=G("Coffee",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]]);/**
180 * @license lucide-react v0.453.0 - ISC
181 *
182 * This source code is licensed under the ISC license.
183 * See the LICENSE file in the root directory of this source tree.
184 */const vP=G("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
185 * @license lucide-react v0.453.0 - ISC
186 *
187 * This source code is licensed under the ISC license.
188 * See the LICENSE file in the root directory of this source tree.
189 */const wP=G("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
190 * @license lucide-react v0.453.0 - ISC
191 *
192 * This source code is licensed under the ISC license.
193 * See the LICENSE file in the root directory of this source tree.
194 */const bP=G("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
195 * @license lucide-react v0.453.0 - ISC
196 *
197 * This source code is licensed under the ISC license.
198 * See the LICENSE file in the root directory of this source tree.
199 */const _P=G("DollarSign",[["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"}]]);/**
200 * @license lucide-react v0.453.0 - ISC
201 *
202 * This source code is licensed under the ISC license.
203 * See the LICENSE file in the root directory of this source tree.
204 */const SP=G("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
205 * @license lucide-react v0.453.0 - ISC
206 *
207 * This source code is licensed under the ISC license.
208 * See the LICENSE file in the root directory of this source tree.
209 */const kP=G("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
210 * @license lucide-react v0.453.0 - ISC
211 *
212 * This source code is licensed under the ISC license.
213 * See the LICENSE file in the root directory of this source tree.
214 */const EP=G("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
215 * @license lucide-react v0.453.0 - ISC
216 *
217 * This source code is licensed under the ISC license.
218 * See the LICENSE file in the root directory of this source tree.
219 */const xP=G("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
220 * @license lucide-react v0.453.0 - ISC
221 *
222 * This source code is licensed under the ISC license.
223 * See the LICENSE file in the root directory of this source tree.
224 */const RP=G("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
225 * @license lucide-react v0.453.0 - ISC
226 *
227 * This source code is licensed under the ISC license.
228 * See the LICENSE file in the root directory of this source tree.
229 */const CP=G("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
230 * @license lucide-react v0.453.0 - ISC
231 *
232 * This source code is licensed under the ISC license.
233 * See the LICENSE file in the root directory of this source tree.
234 */const TP=G("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
235 * @license lucide-react v0.453.0 - ISC
236 *
237 * This source code is licensed under the ISC license.
238 * See the LICENSE file in the root directory of this source tree.
239 */const PP=G("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
240 * @license lucide-react v0.453.0 - ISC
241 *
242 * This source code is licensed under the ISC license.
243 * See the LICENSE file in the root directory of this source tree.
244 */const AP=G("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
245 * @license lucide-react v0.453.0 - ISC
246 *
247 * This source code is licensed under the ISC license.
248 * See the LICENSE file in the root directory of this source tree.
249 */const OP=G("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
250 * @license lucide-react v0.453.0 - ISC
251 *
252 * This source code is licensed under the ISC license.
253 * See the LICENSE file in the root directory of this source tree.
254 */const IP=G("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
255 * @license lucide-react v0.453.0 - ISC
256 *
257 * This source code is licensed under the ISC license.
258 * See the LICENSE file in the root directory of this source tree.
259 */const NP=G("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
260 * @license lucide-react v0.453.0 - ISC
261 *
262 * This source code is licensed under the ISC license.
263 * See the LICENSE file in the root directory of this source tree.
264 */const LP=G("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
265 * @license lucide-react v0.453.0 - ISC
266 *
267 * This source code is licensed under the ISC license.
268 * See the LICENSE file in the root directory of this source tree.
269 */const jP=G("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
270 * @license lucide-react v0.453.0 - ISC
271 *
272 * This source code is licensed under the ISC license.
273 * See the LICENSE file in the root directory of this source tree.
274 */const $P=G("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
275 * @license lucide-react v0.453.0 - ISC
276 *
277 * This source code is licensed under the ISC license.
278 * See the LICENSE file in the root directory of this source tree.
279 */const DP=G("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
280 * @license lucide-react v0.453.0 - ISC
281 *
282 * This source code is licensed under the ISC license.
283 * See the LICENSE file in the root directory of this source tree.
284 */const MP=G("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 4,310 bytes, lines 284-314
284],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
285 * @license lucide-react v0.453.0 - ISC
286 *
287 * This source code is licensed under the ISC license.
288 * See the LICENSE file in the root directory of this source tree.
289 */const UP=G("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
290 * @license lucide-react v0.453.0 - ISC
291 *
292 * This source code is licensed under the ISC license.
293 * See the LICENSE file in the root directory of this source tree.
294 */const FP=G("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
295 * @license lucide-react v0.453.0 - ISC
296 *
297 * This source code is licensed under the ISC license.
298 * See the LICENSE file in the root directory of this source tree.
299 */const BP=G("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
300 * @license lucide-react v0.453.0 - ISC
301 *
302 * This source code is licensed under the ISC license.
303 * See the LICENSE file in the root directory of this source tree.
304 */const zP=G("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
305 * @license lucide-react v0.453.0 - ISC
306 *
307 * This source code is licensed under the ISC license.
308 * See the LICENSE file in the root directory of this source tree.
309 */const HP=G("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
310 * @license lucide-react v0.453.0 - ISC
311 *
312 * This source code is licensed under the ISC license.
313 * See the LICENSE file in the root directory of this source tree.
314 */const WP=G("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var qa="right-scroll-bar-position",Ga="width-before-scroll-bar",DC="with-scroll-bars-hidden",MC="--removed-body-scroll-bar-size";function Xu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function UC(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var FC=typeof window<"u"?S.useLayoutEffect:S.useEffect,Em=new WeakMap;function BC(e,t){var r=UC(null,function(n){return e.forEach(function(s){return Xu(s,n)})});return FC(function(){var n=Em.get(r);if(n){var s=new Set(n),i=new Set(e),o=r.current;s.forEach(function(a){i.has(a)||Xu(a,null)}),i.forEach(function(a){s.has(a)||Xu(a,o)})}Em.set(r,e)},[e]),r}function zC(e){return e}function HC(e,t){t===void 0&&(t=zC);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return s}function WC(e){e===void 0&&(e={});var t=HC(null);return t.options=sr({async:!0,ssr:!1},e),t}var b0=function(e){var t=e.sideCar,r=pi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,sr({},r))};
vendor: 7,654 bytes, lines 314-354
314b0.isSideCarExport=!0;function VC(e,t){return e.useMedium(t),b0}var _0=WC(),Zu=function(){},lu=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:Zu,onWheelCapture:Zu,onTouchMoveCapture:Zu}),s=n[0],i=n[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,h=e.sideCar,p=e.noRelative,g=e.noIsolation,y=e.inert,w=e.allowPinchZoom,f=e.as,m=f===void 0?"div":f,v=e.gapMode,b=pi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,E=BC([r,t]),x=sr(sr({},b),s);return S.createElement(S.Fragment,null,d&&S.createElement(k,{sideCar:_0,removeScrollBar:u,shards:c,noRelative:p,noIsolation:g,inert:y,setCallbacks:i,allowPinchZoom:!!w,lockRef:r,gapMode:v}),o?S.cloneElement(S.Children.only(a),sr(sr({},x),{ref:E})):S.createElement(m,sr({},x,{className:l,ref:E}),a))});lu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lu.classNames={fullWidth:Ga,zeroRight:qa};var KC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=KC();return t&&e.setAttribute("nonce",t),e}function GC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function QC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JC=function(){var e=0,t=null;return{add:function(r){e==0&&(t=qC())&&(GC(t,r),QC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},YC=function(){var e=JC();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},S0=function(){var e=YC(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},XC={left:0,top:0,right:0,gap:0},ec=function(e){return parseInt(e||"",10)||0},ZC=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ec(r),ec(n),ec(s)]},eT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return XC;var t=ZC(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},tT=S0(),Us="data-scroll-locked",rT=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),`
315  .`.concat(DC,` {
316   overflow: hidden `).concat(n,`;
317   padding-right: `).concat(a,"px ").concat(n,`;
318  }
319  body[`).concat(Us,`] {
320    overflow: hidden `).concat(n,`;
321    overscroll-behavior: contain;
322    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
323    padding-left: `.concat(s,`px;
324    padding-top: `).concat(i,`px;
325    padding-right: `).concat(o,`px;
326    margin-left:0;
327    margin-top:0;
328    margin-right: `).concat(a,"px ").concat(n,`;
329    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
330  }
331  
332  .`).concat(qa,` {
333    right: `).concat(a,"px ").concat(n,`;
334  }
335  
336  .`).concat(Ga,` {
337    margin-right: `).concat(a,"px ").concat(n,`;
338  }
339  
340  .`).concat(qa," .").concat(qa,` {
341    right: 0 `).concat(n,`;
342  }
343  
344  .`).concat(Ga," .").concat(Ga,` {
345    margin-right: 0 `).concat(n,`;
346  }
347  
348  body[`).concat(Us,`] {
349    `).concat(MC,": ").concat(a,`px;
350  }
351`)},xm=function(){var e=parseInt(document.body.getAttribute(Us)||"0",10);return isFinite(e)?e:0},nT=function(){S.useEffect(function(){return document.body.setAttribute(Us,(xm()+1).toString()),function(){var e=xm()-1;e<=0?document.body.removeAttribute(Us):document.body.setAttribute(Us,e.toString())}},[])},sT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;nT();var i=S.useMemo(function(){return eT(s)},[s]);return S.createElement(tT,{styles:rT(i,!t,s,r?"":"!important")})},Cd=!1;if(typeof window<"u")try{var Ea=Object.defineProperty({},"passive",{get:function(){return Cd=!0,!0}});window.addEventListener("test",Ea,Ea),window.removeEventListener("test",Ea,Ea)}catch{Cd=!1}var ds=Cd?{passive:!1}:!1,iT=function(e){return e.tagName==="TEXTAREA"},k0=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!iT(e)&&r[t]==="visible")},oT=function(e){return k0(e,"overflowY")},aT=function(e){return k0(e,"overflowX")},Rm=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=E0(e,n);if(s){var i=x0(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},lT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},uT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},E0=function(e,t){return e==="v"?oT(t):aT(t)},x0=function(e,t){return e==="v"?lT(t):uT(t)},cT=function(e,t){return e==="h"&&t==="rtl"?-1:1},dT=function(e,t,r,n,s){var i=cT(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),u=!1,d=o>0,c=0,h=0;do{if(!a)break;var p=x0(e,a),g=p[0],y=p[1],w=p[2],f=y-w-i*g;(g||f)&&E0(e,a)&&(c+=f,h+=g);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(c)<1||!d&&Math.abs(h)<1)&&(u=!0),u},xa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cm=function(e){return[e.deltaX,e.deltaY]},Tm=function(e){return e&&"current"in e?e.current:e},hT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fT=function(e){return`
352  .block-interactivity-`.concat(e,` {pointer-events: none;}
353  .allow-interactivity-`).concat(e,` {pointer-events: all;}
354`)},pT=0,hs=[];function mT(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),s=S.useState(pT++)[0],i=S.useState(S0)[0],o=S.useRef(e);S.useEffect(function(){o.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=n1([e.lockRef.current],(e.shards||[]).map(Tm),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var f=xa(y),m=r.current,v="deltaX"in y?y.deltaX:m[0]-f[0],b="deltaY"in y?y.deltaY:m[1]-f[1],k,E=y.target,x=Math.abs(v)>Math.abs(b)?"h":"v";if("touches"in y&&x==="h"&&E.type==="range")return!1;var R=window.getSelection(),O=R&&R.anchorNode,P=O?O===E||O.contains(E):!1;if(P)return!1;var z=Rm(x,E);if(!z)return!0;if(z?k=x:(k=x==="v"?"h":"v",z=Rm(x,E)),!z)return!1;if(!n.current&&"changedTouches"in y&&(v||b)&&(n.current=k),!k)return!0;var M=n.current||k;return dT(M,w,y,M==="h"?v:b)},[]),l=S.useCallback(function(y){var w=y;if(!(!hs.length||hs[hs.length-1]!==i)){var f="deltaY"in w?Cm(w):xa(w),m=t.current.filter(function(k){return k.name===w.type&&(k.target===w.target||w.target===k.shadowParent)&&hT(k.delta,f)})[0];if(m&&m.should){w.cancelable&&w.preventDefault();return}if(!m){var v=(o.current.shards||[]).map(Tm).filter(Boolean).filter(function(k){return k.contains(w.target)}),b=v.length>0?a(w,v[0]):!o.current.noIsolation;b&&w.cancelable&&w.preventDefault()}}},[]),u=S.useCallback(function(y,w,f,m){var v={name:y,delta:w,target:f,should:m,shadowParent:gT(f)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(b){return b!==v})}
vendor: 4,998 bytes, line 354
354,1)},[]),d=S.useCallback(function(y){r.current=xa(y),n.current=void 0},[]),c=S.useCallback(function(y){u(y.type,Cm(y),y.target,a(y,e.lockRef.current))},[]),h=S.useCallback(function(y){u(y.type,xa(y),y.target,a(y,e.lockRef.current))},[]);S.useEffect(function(){return hs.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ds),document.addEventListener("touchmove",l,ds),document.addEventListener("touchstart",d,ds),function(){hs=hs.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,ds),document.removeEventListener("touchmove",l,ds),document.removeEventListener("touchstart",d,ds)}},[]);var p=e.removeScrollBar,g=e.inert;return S.createElement(S.Fragment,null,g?S.createElement(i,{styles:fT(s)}):null,p?S.createElement(sT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const yT=VC(_0,mT);var vT=S.forwardRef(function(e,t){return S.createElement(lu,sr({},e,{ref:t,sideCar:yT}))});vT.classNames=lu.classNames;var wT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fs=new WeakMap,Ra=new WeakMap,Ca={},tc=0,R0=function(e){return e&&(e.host||R0(e.parentNode))},bT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=R0(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},_T=function(e,t,r,n){var s=bT(t,Array.isArray(e)?e:[e]);Ca[r]||(Ca[r]=new WeakMap);var i=Ca[r],o=[],a=new Set,l=new Set(s),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};s.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(a.has(h))d(h);else try{var p=h.getAttribute(n),g=p!==null&&p!=="false",y=(fs.get(h)||0)+1,w=(i.get(h)||0)+1;fs.set(h,y),i.set(h,w),o.push(h),y===1&&g&&Ra.set(h,!0),w===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(f){console.error("aria-hidden: cannot operate on ",h,f)}})};return d(t),a.clear(),tc++,function(){o.forEach(function(c){var h=fs.get(c)-1,p=i.get(c)-1;fs.set(c,h),i.set(c,p),h||(Ra.has(c)||c.removeAttribute(n),Ra.delete(c)),p||c.removeAttribute(r)}),tc--,tc||(fs=new WeakMap,fs=new WeakMap,Ra=new WeakMap,Ca={})}},VP=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=wT(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),_T(n,s,r,"aria-hidden")):function(){return null}};const Pm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Am=Ek,KP=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Am(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],c=i==null?void 0:i[u];if(d===null)return null;const h=Pm(d)||Pm(c);return s[u][h]}),a=r&&Object.entries(r).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(g=>{let[y,w]=g;return Array.isArray(w)?w.includes({...i,...a}[y]):{...i,...a}[y]===w})?[...u,c,h]:u},[]);return Am(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Qa(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qa=function(t){return typeof t}:Qa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(e)}var C0="clover",ST=function(t){return t===3?"v3":t},T0="https://js.stripe.com",kT="".concat(T0,"/").concat(C0,"/stripe.js"),ET=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,xT=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var RT=function(t){return ET.test(t)||xT.test(t)},CT=function(){for(var t=document.querySelectorAll('script[src^="'.concat(T0,'"]')),r=0;r<t.length;r++){var n=t[r];if(RT(n.src))return n}return null},Om=function(t){var r="",n=document.createElement("script");n.src="".concat(kT).concat(r);var s=document.head||document.body;if(!s)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return s.appendChild(n),n},TT=function(t,r){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"8.11.0",startTime:r})},Ii=null,Ta=null,Pa=null,PT=function(t){return function(r){t(new Error("Failed to load Stripe.js",{cause:r}))}},AT=function(t,r){return function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))}},OT=function(t){return Ii!==null?Ii:(Ii=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe){r(window.Stripe);return}try{var s=CT();if(!(s&&t)){if(!s)s=Om(t);else if(s&&Pa!==null&&Ta!==null){var i;s.removeEventListener("load",Pa),s.removeEventListener("error",Ta),(i=s.parentNode)===null||i===void 0||i.removeChild(s),s=Om(t)}
vendor: 1,699 bytes, line 354
354}Pa=AT(r,n),Ta=PT(n),s.addEventListener("load",Pa),s.addEventListener("error",Ta)}catch(o){n(o);return}}),Ii.catch(function(r){return Ii=null,Promise.reject(r)}))},IT=function(t,r,n){if(t===null)return null;var s=r[0];if(typeof s!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Qa(s)," instead."));var i=s.match(/^pk_test/),o=ST(t.version),a=C0;i&&o!==a&&console.warn("Stripe.js@".concat(o," was loaded on the page, but @stripe/stripe-js@").concat("8.11.0"," expected Stripe.js@").concat(a,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var l=t.apply(void 0,r);return TT(l,n),l},Ni,P0=!1,A0=function(){return Ni||(Ni=OT(null).catch(function(t){return Ni=null,Promise.reject(t)}),Ni)};Promise.resolve().then(function(){return A0()}).catch(function(e){P0||console.warn(e)});var qP=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];P0=!0;var s=Date.now();return A0().then(function(i){return IT(i,r,s)})};export{FT as $,yP as A,zT as B,hP as C,lP as D,SP as E,PP as F,EP as G,xP as H,UT as I,RP as J,cP as K,y0 as L,AP as M,wP as N,NP as O,uP as P,vP as Q,jT as R,DP as S,HT as T,BP as U,oP as V,zP as W,HP as X,bP as Y,WP as Z,$P as _,kh as a,tP as a0,iP as a1,aP as a2,LP as a3,jP as a4,MP as a5,gP as a6,dP as a7,UP as a8,_P as a9,FP as aa,qP as ab,sP as ac,fP as ad,mP as ae,IP as af,pP as ag,nP as ah,rP as ai,ZR as aj,DT as ak,y_ as al,MT as am,JT as b,XT as c,WT as d,VP as e,QT as f,vT as g,YT as h,Ek as i,dw as j,eP as k,GT as l,fv as m,Gt as n,KT as o,KP as p,kP as q,S as r,qT as s,ZT as t,VT as u,CP as v,TP as w,Fh as x,OP as y,BT 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.