PageSourceSearch

https://embrace-journey-tool.lovable.app/assets/index-6JUQLvU4.js

js embrace-journey-tool.lovable.app collected 2026-10-03 03:30:08 UTC 554,307 bytes, 211 lines download raw bytes

vendor: 8,210 bytes, lines 1-9
1var hh=e=>{throw TypeError(e)};var Ll=(e,t,r)=>t.has(e)||hh("Cannot "+r);var C=(e,t,r)=>(Ll(e,t,"read from private field"),r?r.call(e):t.get(e)),te=(e,t,r)=>t.has(e)?hh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),q=(e,t,r,n)=>(Ll(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),De=(e,t,r)=>(Ll(e,t,"access private method"),r);var yo=(e,t,r,n)=>({set _(s){q(e,t,s,r)},get _(){return C(e,t,n)}});function D0(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(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function Kp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qp={exports:{}},Ya={},Gp={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 so=Symbol.for("react.element"),M0=Symbol.for("react.portal"),U0=Symbol.for("react.fragment"),F0=Symbol.for("react.strict_mode"),B0=Symbol.for("react.profiler"),z0=Symbol.for("react.provider"),H0=Symbol.for("react.context"),V0=Symbol.for("react.forward_ref"),W0=Symbol.for("react.suspense"),K0=Symbol.for("react.memo"),q0=Symbol.for("react.lazy"),fh=Symbol.iterator;function G0(e){return e===null||typeof e!="object"?null:(e=fh&&e[fh]||e["@@iterator"],typeof e=="function"?e:null)}var Jp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qp=Object.assign,Yp={};function Bs(e,t,r){this.props=e,this.context=t,this.refs=Yp,this.updater=r||Jp}Bs.prototype.isReactComponent={};Bs.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")};Bs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Xp(){}Xp.prototype=Bs.prototype;function Kc(e,t,r){this.props=e,this.context=t,this.refs=Yp,this.updater=r||Jp}var qc=Kc.prototype=new Xp;qc.constructor=Kc;Qp(qc,Bs.prototype);qc.isPureReactComponent=!0;var ph=Array.isArray,Zp=Object.prototype.hasOwnProperty,Gc={current:null},em={key:!0,ref:!0,__self:!0,__source:!0};function tm(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)Zp.call(t,n)&&!em.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:so,type:e,key:i,ref:o,props:s,_owner:Gc.current}}function J0(e,t){return{$$typeof:so,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Jc(e){return typeof e=="object"&&e!==null&&e.$$typeof===so}function Q0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var mh=/\/+/g;function $l(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Q0(""+e.key):t.toString(36)}function Jo(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 so:case M0:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+$l(o,0):n,ph(s)?(r="",e!=null&&(r=e.replace(mh,"$&/")+"/"),Jo(s,t,r,"",function(u){return u})):s!=null&&(Jc(s)&&(s=J0(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(mh,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",ph(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+$l(i,a);o+=Jo(i,t,r,l,s)}else if(l=G0(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+$l(i,a++),o+=Jo(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 wo(e,t,r){if(e==null)return e;var n=[],s=0;return Jo(e,n,"","",function(i){return t.call(r,i,s++)}),n}function Y0(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 Ge={current:null},Qo={transition:null},X0={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:Qo,ReactCurrentOwner:Gc};function rm(){throw Error("act(...) is not supported in production builds of React.")}X.Children={map:wo,forEach:function(e,t,r){wo(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return wo(e,function(){t++}),t},toArray:function(e){return wo(e,function(t){return t})||[]},only:function(e){if(!Jc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=Bs;X.Fragment=U0;X.Profiler=B0;X.PureComponent=Kc;X.StrictMode=F0;X.Suspense=W0;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X0;X.act=rm;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=Qp({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Gc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Zp.call(t,l)&&!em.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:so,type:e.type,key:s,ref:i,props:n,_owner:o}};X.createContext=function(e){return e={$$typeof:H0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:z0,_context:e},e.Consumer=e};X.createElement=tm;X.createFactory=function(e){var t=tm.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:V0,render:e}};X.isValidElement=Jc;X.lazy=function(e){return{$$typeof:q0,_payload:{_status:-1,_result:e},_init:Y0}};X.memo=function(e,t){return{$$typeof:K0,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=Qo.transition;Qo.transition={};try{e()}finally{Qo.transition=t}};X.unstable_act=rm;X.useCallback=function(e,t){return Ge.current.useCallback(e,t)};X.useContext=function(e){return Ge.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return Ge.current.useDeferredValue(e)};X.useEffect=function(e,t){return Ge.current.useEffect(e,t)};X.useId=function(){return Ge.current.useId()};X.useImperativeHandle=function(e,t,r){return Ge.current.useImperativeHandle(e,t,r)};X.useInsertionEffect=function(e,t){return Ge.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return Ge.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return Ge.current.useMemo(e,t)};X.useReducer=function(e,t,r){return Ge.current.useReducer(e,t,r)};X.useRef=function(e){return Ge.current.useRef(e)};
vendor: 6,881 bytes, lines 9-33
9X.useState=function(e){return Ge.current.useState(e)};X.useSyncExternalStore=function(e,t,r){return Ge.current.useSyncExternalStore(e,t,r)};X.useTransition=function(){return Ge.current.useTransition()};X.version="18.3.1";Gp.exports=X;var x=Gp.exports;const O=Kp(x),nm=D0({__proto__:null,default:O},[x]);/**
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 Z0=x,ew=Symbol.for("react.element"),tw=Symbol.for("react.fragment"),rw=Object.prototype.hasOwnProperty,nw=Z0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sw={key:!0,ref:!0,__self:!0,__source:!0};function sm(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)rw.call(t,n)&&!sw.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:ew,type:e,key:i,ref:o,props:s,_owner:nw.current}}Ya.Fragment=tw;Ya.jsx=sm;Ya.jsxs=sm;qp.exports=Ya;var w=qp.exports,im={exports:{}},dt={},om={exports:{}},am={};/**
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(T,R){var D=T.length;T.push(R);e:for(;0<D;){var G=D-1>>>1,B=T[G];if(0<s(B,R))T[G]=R,T[D]=B,D=G;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var R=T[0],D=T.pop();if(D!==R){T[0]=D;e:for(var G=0,B=T.length,Y=B>>>1;G<Y;){var Z=2*(G+1)-1,xe=T[Z],$e=Z+1,re=T[$e];if(0>s(xe,D))$e<B&&0>s(re,xe)?(T[G]=re,T[$e]=D,G=$e):(T[G]=xe,T[Z]=D,G=Z);else if($e<B&&0>s(re,D))T[G]=re,T[$e]=D,G=$e;else break e}}return R}function s(T,R){var D=T.sortIndex-R.sortIndex;return D!==0?D:T.id-R.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,f=3,h=!1,y=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=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(T){for(var R=r(u);R!==null;){if(R.callback===null)n(u);else if(R.startTime<=T)n(u),R.sortIndex=R.expirationTime,t(l,R);else break;R=r(u)}}function _(T){if(g=!1,v(T),!y)if(r(l)!==null)y=!0,z(S);else{var R=r(u);R!==null&&V(_,R.startTime-T)}}function S(T,R){y=!1,g&&(g=!1,m(P),P=-1),h=!0;var D=f;try{for(v(R),c=r(l);c!==null&&(!(c.expirationTime>R)||T&&!F());){var G=c.callback;if(typeof G=="function"){c.callback=null,f=c.priorityLevel;var B=G(c.expirationTime<=R);R=e.unstable_now(),typeof B=="function"?c.callback=B:c===r(l)&&n(l),v(R)}else n(l);c=r(l)}if(c!==null)var Y=!0;else{var Z=r(u);Z!==null&&V(_,Z.startTime-R),Y=!1}return Y}finally{c=null,f=D,h=!1}}var k=!1,E=null,P=-1,N=5,j=-1;function F(){return!(e.unstable_now()-j<N)}function $(){if(E!==null){var T=e.unstable_now();j=T;var R=!0;try{R=E(!0,T)}finally{R?W():(k=!1,E=null)}}else k=!1}var W;if(typeof p=="function")W=function(){p($)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,Q=I.port2;I.port1.onmessage=$,W=function(){Q.postMessage(null)}}else W=function(){b($,0)};function z(T){E=T,k||(k=!0,W())}function V(T,R){P=b(function(){T(e.unstable_now())},R)}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(T){T.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,z(S))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(T){switch(f){case 1:case 2:case 3:var R=3;break;default:R=f}var D=f;f=R;try{return T()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,R){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var D=f;f=T;try{return R()}finally{f=D}},e.unstable_scheduleCallback=function(T,R,D){var G=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?G+D:G):D=G,T){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=D+B,T={id:d++,callback:R,priorityLevel:T,startTime:D,expirationTime:B,sortIndex:-1},D>G?(T.sortIndex=D,t(u,T),r(l)===null&&T===r(u)&&(g?(m(P),P=-1):g=!0,V(_,D-G))):(T.sortIndex=B,t(l,T),y||h||(y=!0,z(S))),T},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(T){var R=f;return function(){var D=f;f=R;try{return T.apply(this,arguments)}finally{f=D}}}})(am);om.exports=am;var iw=om.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 ow=x,ct=iw;function A(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 lm=new Set,Ri={};function $n(e,t){Os(e,t),Os(e+"Capture",t)}function Os(e,t){for(Ri[e]=t,e=0;e<t.length;e++)lm.add(t[e])}var dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=Object.prototype.hasOwnProperty,aw=/^[: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]*$/,gh={},vh={};function lw(e){return bu.call(vh,e)?!0:bu.call(gh,e)?!1:aw.test(e)?vh[e]=!0:(gh[e]=!0,!1)}function uw(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 cw(e,t,r,n){if(t===null||typeof t>"u"||uw(e,t,r,n))return!0;
vendor: 4,190 bytes, line 33
33if(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 Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[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];Ie[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[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){Ie[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ie[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ie[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ie[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qc=/[\-:]([a-z])/g;function Yc(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(Qc,Yc);Ie[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(Qc,Yc);Ie[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(Qc,Yc);Ie[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ie[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});Ie.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ie[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xc(e,t,r,n){var s=Ie.hasOwnProperty(t)?Ie[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(cw(t,r,s,n)&&(r=null),n||s===null?lw(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 vr=ow.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,bo=Symbol.for("react.element"),es=Symbol.for("react.portal"),ts=Symbol.for("react.fragment"),Zc=Symbol.for("react.strict_mode"),xu
vendor: 17,751 bytes, lines 33-37
33=Symbol.for("react.profiler"),um=Symbol.for("react.provider"),cm=Symbol.for("react.context"),ed=Symbol.for("react.forward_ref"),_u=Symbol.for("react.suspense"),Su=Symbol.for("react.suspense_list"),td=Symbol.for("react.memo"),Pr=Symbol.for("react.lazy"),dm=Symbol.for("react.offscreen"),yh=Symbol.iterator;function Ys(e){return e===null||typeof e!="object"?null:(e=yh&&e[yh]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Object.assign,Dl;function li(e){if(Dl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Dl=t&&t[1]||""}return`
34`+Dl+e}var Ml=!1;function Ul(e,t){if(!e||Ml)return"";Ml=!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{Ml=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?li(e):""}function dw(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=Ul(e.type,!1),e;case 11:return e=Ul(e.type.render,!1),e;case 1:return e=Ul(e.type,!0),e;default:return""}}function ku(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 ts:return"Fragment";case es:return"Portal";case xu:return"Profiler";case Zc:return"StrictMode";case _u:return"Suspense";case Su:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cm:return(e.displayName||"Context")+".Consumer";case um:return(e._context.displayName||"Context")+".Provider";case ed:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case td:return t=e.displayName||null,t!==null?t:ku(e.type)||"Memo";case Pr:t=e._payload,e=e._init;try{return ku(e(t))}catch{}}return null}function hw(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 ku(t);case 8:return t===Zc?"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 Xr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fw(e){var t=hm(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 xo(e){e._valueTracker||(e._valueTracker=fw(e))}function fm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=hm(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function fa(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 Eu(e,t){var r=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function wh(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xr(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 pm(e,t){t=t.checked,t!=null&&Xc(e,"checked",t,!1)}function Tu(e,t){pm(e,t);var r=Xr(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")?Cu(e,t.type,r):t.hasOwnProperty("defaultValue")&&Cu(e,t.type,Xr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bh(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 Cu(e,t,r){(t!=="number"||fa(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ui=Array.isArray;function fs(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=""+Xr(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 Ru(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xh(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(A(92));if(ui(r)){if(1<r.length)throw Error(A(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Xr(r)}}function mm(e,t){var r=Xr(t.value),n=Xr(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 _h(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gm(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 Pu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _o,vm=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(_o=_o||document.createElement("div"),_o.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_o.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pi(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var pi={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},pw=["Webkit","ms","Moz","O"];Object.keys(pi).forEach(function(e){pw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pi[t]=pi[e]})});function ym(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||pi.hasOwnProperty(e)&&pi[e]?(""+t).trim():t+"px"}function wm(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=ym(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var mw=ge({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 Au(e,t){if(t){if(mw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Nu(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 Ou=null;function rd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ju=null,ps=null,ms=null;function Sh(e){if(e=ao(e)){if(typeof ju!="function")throw Error(A(280));var t=e.stateNode;t&&(t=rl(t),ju(e.stateNode,e.type,t))}}function bm(e){ps?ms?ms.push(e):ms=[e]:ps=e}function xm(){if(ps){var e=ps,t=ms;if(ms=ps=null,Sh(e),t)for(e=0;e<t.length;e++)Sh(t[e])}}function _m(e,t){return e(t)}function Sm(){}var Fl=!1;function km(e,t,r){if(Fl)return e(t,r);Fl=!0;try{return _m(e,t,r)}finally{Fl=!1,(ps!==null||ms!==null)&&(Sm(),xm())}}function Ai(e,t){var r=e.stateNode;if(r===null)return null;var n=rl(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(A(231,t,typeof r));return r}var Iu=!1;if(dr)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{Iu=!1}function gw(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 mi=!1,pa=null,ma=!1,Lu=null,vw={onError:function(e){mi=!0,pa=e}};function yw(e,t,r,n,s,i,o,a,l){mi=!1,pa=null,gw.apply(vw,arguments)}function ww(e,t,r,n,s,i,o,a,l){if(yw.apply(this,arguments),mi){if(mi){var u=pa;mi=!1,pa=null}else throw Error(A(198));ma||(ma=!0,Lu=u)}}function Dn(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 Em(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 kh(e){if(Dn(e)!==e)throw Error(A(188))}function bw(e){var t=e.alternate;if(!t){if(t=Dn(e),t===null)throw Error(A(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 kh(s),e;if(i===n)return kh(s),t;i=i.sibling}throw Error(A(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(A(189))}}if(r.alternate!==n)throw Error(A(190))}if(r.tag!==3)throw Error(A(188));return r.stateNode.current===r?e:t}function Tm(e){return e=bw(e),e!==null?Cm(e):null}function Cm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Cm(e);if(t!==null)return t;e=e.sibling}return null}var Rm=ct.unstable_scheduleCallback,Eh=ct.unstable_cancelCallback,xw=ct.unstable_shouldYield,_w=ct.unstable_requestPaint,be=ct.unstable_now,Sw=ct.unstable_getCurrentPriorityLevel,nd=ct.unstable_ImmediatePriority,Pm=ct.unstable_UserBlockingPriority,ga=ct.unstable_NormalPriority,kw=ct.unstable_LowPriority,Am=ct.unstable_IdlePriority,Xa=null,Qt=null;function Ew(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Xa,e,void 0,(e.current.flags&128)===128)}catch{}}var $t=Math.clz32?Math.clz32:Rw,Tw=Math.log,Cw=Math.LN2;function Rw(e){return e>>>=0,e===0?32:31-(Tw(e)/Cw|0)|0}var So=64,ko=4194304;function ci(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 va(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=ci(a):(i&=o,i!==0&&(n=ci(i)))}else o=r&~s,o!==0?n=ci(o):i!==0&&(n=ci(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-$t(t),s=1<<r,n|=e[r],t&=~s;return n}function Pw(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 Aw(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-$t(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=Pw(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function $u(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Nm(){var e=So;return So<<=1,!(So&4194240)&&(So=64),e}function Bl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function io(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$t(t),e[t]=r}function Nw(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-$t(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function sd(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-$t(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ne=0;function Om(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var jm,id,Im,Lm,$m,Du=!1,Eo=[],Vr=null,Wr=null,Kr=null,Ni=new Map,Oi=new Map,Nr=[],Ow="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 Th(e,t){switch(e){case"focusin":case"focusout":Vr=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":Kr=null;break;case"pointerover":case"pointerout":Ni.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oi.delete(t.pointerId)}}function Zs(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=ao(t),t!==null&&id(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function jw(e,t,r,n,s){switch(t){case"focusin":return Vr=Zs(Vr,e,t,r,n,s),!0;case"dragenter":return Wr=Zs(Wr,e,t,r,n,s),!0;case"mouseover":return Kr=Zs(Kr,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return Ni.set(i,Zs(Ni.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Oi.set(i,Zs(Oi.get(i)||null,e,t,r,n,s)),!0}return!1}function Dm(e){var t=yn(e.target);if(t!==null){var r=Dn(t);if(r!==null){if(t=r.tag,t===13){if(t=Em(r),t!==null){e.blockedOn=t,$m(e.priority,function(){Im(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 Yo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Mu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ou=n,r.target.dispatchEvent(n),Ou=null}else return t=ao(r),t!==null&&id(t),e.blockedOn=r,!1;t.shift()}return!0}function Ch(e,t,r){Yo(e)&&r.delete(t)}function Iw(){Du=!1,Vr!==null&&Yo(Vr)&&(Vr=null),Wr!==null&&Yo(Wr)&&(Wr=null),Kr!==null&&Yo(Kr)&&(Kr=null),Ni.forEach(Ch
vendor: 13,605 bytes, line 37
37),Oi.forEach(Ch)}function ei(e,t){e.blockedOn===t&&(e.blockedOn=null,Du||(Du=!0,ct.unstable_scheduleCallback(ct.unstable_NormalPriority,Iw)))}function ji(e){function t(s){return ei(s,e)}if(0<Eo.length){ei(Eo[0],e);for(var r=1;r<Eo.length;r++){var n=Eo[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Vr!==null&&ei(Vr,e),Wr!==null&&ei(Wr,e),Kr!==null&&ei(Kr,e),Ni.forEach(t),Oi.forEach(t),r=0;r<Nr.length;r++)n=Nr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Nr.length&&(r=Nr[0],r.blockedOn===null);)Dm(r),r.blockedOn===null&&Nr.shift()}var gs=vr.ReactCurrentBatchConfig,ya=!0;function Lw(e,t,r,n){var s=ne,i=gs.transition;gs.transition=null;try{ne=1,od(e,t,r,n)}finally{ne=s,gs.transition=i}}function $w(e,t,r,n){var s=ne,i=gs.transition;gs.transition=null;try{ne=4,od(e,t,r,n)}finally{ne=s,gs.transition=i}}function od(e,t,r,n){if(ya){var s=Mu(e,t,r,n);if(s===null)Yl(e,t,n,wa,r),Th(e,n);else if(jw(s,e,t,r,n))n.stopPropagation();else if(Th(e,n),t&4&&-1<Ow.indexOf(e)){for(;s!==null;){var i=ao(s);if(i!==null&&jm(i),i=Mu(e,t,r,n),i===null&&Yl(e,t,n,wa,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Yl(e,t,n,null,r)}}var wa=null;function Mu(e,t,r,n){if(wa=null,e=rd(n),e=yn(e),e!==null)if(t=Dn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Em(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 wa=e,null}function Mm(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(Sw()){case nd:return 1;case Pm:return 4;case ga:case kw:return 16;case Am:return 536870912;default:return 16}default:return 16}}var Fr=null,ad=null,Xo=null;function Um(){if(Xo)return Xo;var e,t=ad,r=t.length,n,s="value"in Fr?Fr.value:Fr.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 Xo=s.slice(e,1<n?1-n:void 0)}function Zo(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 To(){return!0}function Rh(){return!1}function ht(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)?To:Rh,this.isPropagationStopped=Rh,this}return ge(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=To)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=To)},persist:function(){},isPersistent:To}),t}var zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ld=ht(zs),oo=ge({},zs,{view:0,detail:0}),Dw=ht(oo),zl,Hl,ti,Za=ge({},oo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ud,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!==ti&&(ti&&e.type==="mousemove"?(zl=e.screenX-ti.screenX,Hl=e.screenY-ti.screenY):Hl=zl=0,ti=e),zl)},movementY:function(e){return"movementY"in e?e.movementY:Hl}}),Ph=ht(Za),Mw=ge({},Za,{dataTransfer:0}),Uw=ht(Mw),Fw=ge({},oo,{relatedTarget:0}),Vl=ht(Fw),Bw=ge({},zs,{animationName:0,elapsedTime:0,pseudoElement:0}),zw=ht(Bw),Hw=ge({},zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vw=ht(Hw),Ww=ge({},zs,{data:0}),Ah=ht(Ww),Kw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qw={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"},Gw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gw[e])?!!t[e]:!1}function ud(){return Jw}var Qw=ge({},oo,{key:function(e){if(e.key){var t=Kw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Zo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ud,charCode:function(e){return e.type==="keypress"?Zo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yw=ht(Qw),Xw=ge({},Za,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nh=ht(Xw),Zw=ge({},oo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ud}),eb=ht(Zw),tb=ge({},zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),rb=ht(tb),nb=ge({},Za,{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}),sb=ht(nb),ib=[9,13,27,32],cd=dr&&"CompositionEvent"in window,gi=null;dr&&"documentMode"in document&&(gi=document.documentMode);var ob=dr&&"TextEvent"in window&&!gi,Fm=dr&&(!cd||gi&&8<gi&&11>=gi),Oh=" ",jh=!1;function Bm(e,t){switch(e){case"keyup":return ib.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rs=!1;function ab(e,t){switch(e){case"compositionend":return zm(t);case"keypress":return t.which!==32?null:(jh=!0,Oh);case"textInput":return e=t.data,e===Oh&&jh?null:e;default:return null}}function lb(e,t){if(rs)return e==="compositionend"||!cd&&Bm(e,t)?(e=Um(),Xo=ad=Fr=null,rs=!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 Fm&&t.locale!=="ko"?null:t.data;default:return null}}var ub={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 Ih(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ub[e.type]:t==="textarea"}function Hm(e,t,r,n){bm(n),t=ba(t,"onChange"),0<t.length&&(r=new ld("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var vi=null,Ii=null;function cb(e){eg(e,0)}function el(e){var t=is(e);if(fm(t))return e}function db(e,t){if(e==="change")return t}var Vm=!1;if(dr){var Wl;if(dr){var Kl="oninput"in document;if(!Kl){var Lh=document.createElement("div");Lh.setAttribute("oninput","return;"),Kl=typeof Lh.oninput=="function"}Wl=Kl}else Wl=!1;Vm=Wl&&(!document.documentMode||9<document.documentMode)}function $h(){vi&&(vi.detachEvent("onpropertychange",Wm),Ii=vi=null)}function Wm(e){if(e.propertyName==="value"&&el(Ii)){var t=[];Hm(t,Ii,e,rd(e)),km(cb,t)}}function hb(e,t,r){e==="focusin"?($h(),vi=t,Ii=r,vi.attachEvent("onpropertychange",Wm)):e==="focusout"&&$h()}function fb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return el(Ii)}function pb(e,t){if(e==="click")return el(t)}function mb(e,t){if(e==="input"||e==="change")return el(t)}function gb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:gb;function Li(e,t){if(Mt(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(!bu.call(t,s)||!Mt(e[s],t[s]))return!1}return!0}function Dh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mh(e,t){var r=Dh(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=Dh(r)}}function Km(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Km(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qm(){for(var e=window,t=fa();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=fa(e.document)}return t}function dd(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 vb(e){var t=qm(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Km(r.ownerDocument.documentElement,r)){if(n!==null&&dd(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=Mh(r,i);var o=Mh(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 yb=dr&&"documentMode"in document&&11>=document.documentMode,ns=null,Uu=null,yi=null,Fu=!1;function Uh(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Fu||ns==null||ns!==fa(n)||(n=ns,"selectionStart"in n&&dd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),yi&&Li(yi,n)||(yi=n,n=ba(Uu,"onSelect"),0<n.length&&(t=new ld("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=ns)))}function Co(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ss={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},ql={},Gm={};dr&&(Gm=document.createElement("div").style,"AnimationEvent"in window||(delete ss.animationend.animation,delete ss.animationiteration.animation,delete ss.animationstart.animation),"TransitionEvent"in window||delete ss.transitionend.transition);function tl(e){if(ql[e])return ql[e];if(!ss[e])return e;var t=ss[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Gm)return ql[e]=t[r];return e}var Jm=tl("animationend"),Qm=tl("animationiteration"),Ym=tl("animationstart"),Xm=tl("transitionend"),Zm=new Map,Fh="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 an(e,t){Zm.set(e,t),$n(t,[e])}for(var Gl=0;Gl<Fh.length;Gl++){var Jl=Fh[Gl],wb=Jl.toLowerCase(),bb=Jl[0].toUpperCase()+Jl.
vendor: 4,932 bytes, line 37
37slice(1);an(wb,"on"+bb)}an(Jm,"onAnimationEnd");an(Qm,"onAnimationIteration");an(Ym,"onAnimationStart");an("dblclick","onDoubleClick");an("focusin","onFocus");an("focusout","onBlur");an(Xm,"onTransitionEnd");Os("onMouseEnter",["mouseout","mouseover"]);Os("onMouseLeave",["mouseout","mouseover"]);Os("onPointerEnter",["pointerout","pointerover"]);Os("onPointerLeave",["pointerout","pointerover"]);$n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$n("onBeforeInput",["compositionend","keypress","textInput","paste"]);$n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$n("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(" "),xb=new Set("cancel close invalid load scroll toggle".split(" ").concat(di));function Bh(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,ww(n,t,void 0,e),e.currentTarget=null}function eg(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;Bh(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;Bh(s,a,u),i=l}}}if(ma)throw e=Lu,ma=!1,Lu=null,e}function le(e,t){var r=t[Wu];r===void 0&&(r=t[Wu]=new Set);var n=e+"__bubble";r.has(n)||(tg(t,e,2,!1),r.add(n))}function Ql(e,t,r){var n=0;t&&(n|=4),tg(r,e,n,t)}var Ro="_reactListening"+Math.random().toString(36).slice(2);function $i(e){if(!e[Ro]){e[Ro]=!0,lm.forEach(function(r){r!=="selectionchange"&&(xb.has(r)||Ql(r,!1,e),Ql(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ro]||(t[Ro]=!0,Ql("selectionchange",!1,t))}}function tg(e,t,r,n){switch(Mm(t)){case 1:var s=Lw;break;case 4:s=$w;break;default:s=od}r=s.bind(null,t,r,e),s=void 0,!Iu||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 Yl(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=yn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}km(function(){var u=i,d=rd(r),c=[];e:{var f=Zm.get(e);if(f!==void 0){var h=ld,y=e;switch(e){case"keypress":if(Zo(r)===0)break e;case"keydown":case"keyup":h=Yw;break;case"focusin":y="focus",h=Vl;break;case"focusout":y="blur",h=Vl;break;case"beforeblur":case"afterblur":h=Vl;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":h=Ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Uw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=eb;break;case Jm:case Qm:case Ym:h=zw;break;case Xm:h=rb;break;case"scroll":h=Dw;break;case"wheel":h=sb;break;case"copy":case"cut":case"paste":h=Vw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Nh}var g=(t&4)!==0,b=!g&&e==="scroll",m=g?f!==null?f+"Capture":null:f;g=[];for(var p=u,v;p!==null;){v=p;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,m!==null&&(_=Ai(p,m),_!=null&&g.push(Di(p,_,v)))),b)break;p=p.return}0<g.length&&(f=new h(f,y,null,r,d),c.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==Ou&&(y=r.relatedTarget||r.fromElement)&&(yn(y)||y[hr]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=r.relatedTarget||r.toElement,h=u,y=y?yn(y):null,y!==null&&(b=Dn(y),y!==b||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(g=Ph,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(g=Nh,_="onPointerLeave",m="onPointerEnter",p="pointer"),b=h==null?f:is(h),v=y==null?f:is(y),f=new g(_,p+"leave",h,r,d),f.target=b,f.relatedTarget=v,_=null,yn(d)===u&&(g=ne
vendor: 6,700 bytes, lines 37-38
37w g(m,p+"enter",y,r,d),g.target=v,g.relatedTarget=b,_=g),b=_,h&&y)t:{for(g=h,m=y,p=0,v=g;v;v=Vn(v))p++;for(v=0,_=m;_;_=Vn(_))v++;for(;0<p-v;)g=Vn(g),p--;for(;0<v-p;)m=Vn(m),v--;for(;p--;){if(g===m||m!==null&&g===m.alternate)break t;g=Vn(g),m=Vn(m)}g=null}else g=null;h!==null&&zh(c,f,h,g,!1),y!==null&&b!==null&&zh(c,b,y,g,!0)}}e:{if(f=u?is(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=db;else if(Ih(f))if(Vm)S=mb;else{S=fb;var k=hb}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=pb);if(S&&(S=S(e,u))){Hm(c,S,r,d);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Cu(f,"number",f.value)}switch(k=u?is(u):window,e){case"focusin":(Ih(k)||k.contentEditable==="true")&&(ns=k,Uu=u,yi=null);break;case"focusout":yi=Uu=ns=null;break;case"mousedown":Fu=!0;break;case"contextmenu":case"mouseup":case"dragend":Fu=!1,Uh(c,r,d);break;case"selectionchange":if(yb)break;case"keydown":case"keyup":Uh(c,r,d)}var E;if(cd)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else rs?Bm(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(Fm&&r.locale!=="ko"&&(rs||P!=="onCompositionStart"?P==="onCompositionEnd"&&rs&&(E=Um()):(Fr=d,ad="value"in Fr?Fr.value:Fr.textContent,rs=!0)),k=ba(u,P),0<k.length&&(P=new Ah(P,e,null,r,d),c.push({event:P,listeners:k}),E?P.data=E:(E=zm(r),E!==null&&(P.data=E)))),(E=ob?ab(e,r):lb(e,r))&&(u=ba(u,"onBeforeInput"),0<u.length&&(d=new Ah("onBeforeInput","beforeinput",null,r,d),c.push({event:d,listeners:u}),d.data=E))}eg(c,t)})}function Di(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ba(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ai(e,r),i!=null&&n.unshift(Di(e,i,s)),i=Ai(e,t),i!=null&&n.push(Di(e,i,s))),e=e.return}return n}function Vn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zh(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=Ai(r,i),l!=null&&o.unshift(Di(r,l,a))):s||(l=Ai(r,i),l!=null&&o.push(Di(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var _b=/\r\n?/g,Sb=/\u0000|\uFFFD/g;function Hh(e){return(typeof e=="string"?e:""+e).replace(_b,`
38`).replace(Sb,"")}function Po(e,t,r){if(t=Hh(t),Hh(e)!==t&&r)throw Error(A(425))}function xa(){}var Bu=null,zu=null;function Hu(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 Vu=typeof setTimeout=="function"?setTimeout:void 0,kb=typeof clearTimeout=="function"?clearTimeout:void 0,Vh=typeof Promise=="function"?Promise:void 0,Eb=typeof queueMicrotask=="function"?queueMicrotask:typeof Vh<"u"?function(e){return Vh.resolve(null).then(e).catch(Tb)}:Vu;function Tb(e){setTimeout(function(){throw e})}function Xl(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),ji(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);ji(t)}function qr(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 Wh(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 Hs=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Hs,Mi="__reactProps$"+Hs,hr="__reactContainer$"+Hs,Wu="__reactEvents$"+Hs,Cb="__reactListeners$"+Hs,Rb="__reactHandles$"+Hs;function yn(e){var t=e[Jt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[hr]||r[Jt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Wh(e);e!==null;){if(r=e[Jt])return r;e=Wh(e)}return t}e=r,r=e.parentNode}return null}function ao(e){return e=e[Jt]||e[hr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function is(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function rl(e){return e[Mi]||null}var Ku=[],os=-1;function ln(e){return{current:e}}function ce(e){0>os||(e.current=Ku[os],Ku[os]=null,os--)}function oe(e,t){os++,Ku[os]=e.current,e.current=t}var Zr={},ze=ln(Zr),et=ln(!1),An=Zr;function js(e,t){var r=e.type.contextTypes;if(!r)return Zr;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 tt(e){return e=e.childContextTypes,e!=null}function _a(){ce(et),ce(ze)}function Kh(e,t,r){if(ze.current!==Zr)throw Error(A(168));oe(ze,t),oe(et,r)}function rg(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(A(108,hw(e)||"Unknown",s));return ge({},r,n)}function Sa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zr,An=ze.current,oe(ze,e),oe(et,et.current),!0}function qh(e,t,r){var n=e.stateNode;if(!n)throw Error(A(169));r?(e=rg(e,t,An),n.__reactInternalMemoizedMergedChildContext=e,ce(et),ce(ze),oe(ze,e)):ce(et),oe(et,r)}var or=null,nl=!1,Zl=!1;function ng(e){or===null?or=[e]:or.push(e)}function Pb(e){nl=!0,ng(e)}function un(){if(!Zl&&or!==null){Zl=!0;var e=0,t=ne;try{var r=or;for(ne=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}or=null,nl=!1}catch(s){throw or!==null&&(or=or.slice(e+1)),Rm(nd,un),s}finally{ne=t,Zl=!1}}return null}var as=[],ls=0,ka=null,Ea=0,gt=[],vt=0,Nn=null,lr=1,ur="";function mn(e,t){as[ls++]=Ea,as[ls++]=ka,ka=e,Ea=t}function sg(e,t,r){gt[vt++]=lr,gt[vt++]=ur,gt[vt++]=Nn,Nn=e;var n=lr;e=ur;var s=32-$t(n)-1;n&=~(1<<s),r+=1;var i=32-$t(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,lr=1<<32-$t(t)+s|r<<s|n,ur=i+e}else lr=1<<i|r<<s|n,ur=e}function hd(e){e.return!==null&&(mn(e,1),sg(e,1,0))}function fd(e){for(;e===ka;)ka=as[--ls],as[ls]=null,Ea=as[--ls],as[ls]=null;for(;e===Nn;)Nn=gt[--vt],gt[vt]=null,ur=gt[--vt],gt[vt]=null,lr=gt[--vt],gt[vt]=null}var lt=null,at=null,fe=!1,It=null;function ig(e,t){var r=yt(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 Gh(e,t){switch(e.tag){case 5:var r=e.type;
vendor: 4,705 bytes, line 38
38return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,at=qr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Nn!==null?{id:lr,overflow:ur}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,lt=e,at=null,!0):!1;default:return!1}}function qu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gu(e){if(fe){var t=at;if(t){var r=t;if(!Gh(e,t)){if(qu(e))throw Error(A(418));t=qr(r.nextSibling);var n=lt;t&&Gh(e,t)?ig(n,r):(e.flags=e.flags&-4097|2,fe=!1,lt=e)}}else{if(qu(e))throw Error(A(418));e.flags=e.flags&-4097|2,fe=!1,lt=e}}}function Jh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function Ao(e){if(e!==lt)return!1;if(!fe)return Jh(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Hu(e.type,e.memoizedProps)),t&&(t=at)){if(qu(e))throw og(),Error(A(418));for(;t;)ig(e,t),t=qr(t.nextSibling)}if(Jh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){at=qr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}at=null}}else at=lt?qr(e.stateNode.nextSibling):null;return!0}function og(){for(var e=at;e;)e=qr(e.nextSibling)}function Is(){at=lt=null,fe=!1}function pd(e){It===null?It=[e]:It.push(e)}var Ab=vr.ReactCurrentBatchConfig;function ri(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(A(309));var n=r.stateNode}if(!n)throw Error(A(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(A(284));if(!r._owner)throw Error(A(290,e))}return e}function No(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qh(e){var t=e._init;return t(e._payload)}function ag(e){function t(m,p){if(e){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function r(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function n(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function s(m,p){return m=Yr(m,p),m.index=0,m.sibling=null,m}function i(m,p,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,p,v,_){return p===null||p.tag!==6?(p=ou(v,m.mode,_),p.return=m,p):(p=s(p,v),p.return=m,p)}function l(m,p,v,_){var S=v.type;return S===ts?d(m,p,v.props.children,_,v.key):p!==null&&(p.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Pr&&Qh(S)===p.type)?(_=s(p,v.props),_.ref=ri(m,p,v),_.return=m,_):(_=oa(v.type,v.key,v.props,null,m.mode,_),_.ref=ri(m,p,v),_.return=m,_)}function u(m,p,v,_){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=au(v,m.mode,_),p.return=m,p):(p=s(p,v.children||[]),p.return=m,p)}function d(m,p,v,_,S){return p===null||p.tag!==7?(p=Pn(v,m.mode,_,S),p.return=m,p):(p=s(p,v),p.return=m,p)}function c(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=ou(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case bo:return v=oa(p.type,p.key,p.props,null,m.mode,v),v.ref=ri(m,null,p),v.return=m,v;case es:return p=au(p,m.mode,v),p.return=m,p;case Pr:var _=p._init;return c(m,_(p._payload),v)}if(ui(p)||Ys(p))return p=Pn(p,m.mode,v,null),p.return=m,p;No(m,p)}return null}function f(m,p,v,_){var S=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(m,p,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case bo:return v.key===S?l(m,p,v,_):null;case es:return v.key===S?u(m,p,v,_):null;case Pr:return S=v._init,f(m,p,S(v._payload),_)}if(ui(v)||Ys(v))return S!==null?null:d(m,p,v,_,null);No(m,v)}return null}function h(m,p,v,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return m=m.get(v)||null,a(p,m,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case bo:return m=m.get(_.key===null?v:_.key)||null,l(p,m,_,S);case es:return m=m.get(_.key===null?v:_.key)||null,u(p,m,_,S);case Pr:var k=_._init;return h(m,p,v,k(_._payload),S)}if(ui(_)||Ys(_))return m=m.get(v)||null,d(p,m,_,S,null);
vendor: 2,064 bytes, line 38
38No(p,_)}return null}function y(m,p,v,_){for(var S=null,k=null,E=p,P=p=0,N=null;E!==null&&P<v.length;P++){E.index>P?(N=E,E=null):N=E.sibling;var j=f(m,E,v[P],_);if(j===null){E===null&&(E=N);break}e&&E&&j.alternate===null&&t(m,E),p=i(j,p,P),k===null?S=j:k.sibling=j,k=j,E=N}if(P===v.length)return r(m,E),fe&&mn(m,P),S;if(E===null){for(;P<v.length;P++)E=c(m,v[P],_),E!==null&&(p=i(E,p,P),k===null?S=E:k.sibling=E,k=E);return fe&&mn(m,P),S}for(E=n(m,E);P<v.length;P++)N=h(E,m,P,v[P],_),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?P:N.key),p=i(N,p,P),k===null?S=N:k.sibling=N,k=N);return e&&E.forEach(function(F){return t(m,F)}),fe&&mn(m,P),S}function g(m,p,v,_){var S=Ys(v);if(typeof S!="function")throw Error(A(150));if(v=S.call(v),v==null)throw Error(A(151));for(var k=S=null,E=p,P=p=0,N=null,j=v.next();E!==null&&!j.done;P++,j=v.next()){E.index>P?(N=E,E=null):N=E.sibling;var F=f(m,E,j.value,_);if(F===null){E===null&&(E=N);break}e&&E&&F.alternate===null&&t(m,E),p=i(F,p,P),k===null?S=F:k.sibling=F,k=F,E=N}if(j.done)return r(m,E),fe&&mn(m,P),S;if(E===null){for(;!j.done;P++,j=v.next())j=c(m,j.value,_),j!==null&&(p=i(j,p,P),k===null?S=j:k.sibling=j,k=j);return fe&&mn(m,P),S}for(E=n(m,E);!j.done;P++,j=v.next())j=h(E,m,P,j.value,_),j!==null&&(e&&j.alternate!==null&&E.delete(j.key===null?P:j.key),p=i(j,p,P),k===null?S=j:k.sibling=j,k=j);return e&&E.forEach(function($){return t(m,$)}),fe&&mn(m,P),S}function b(m,p,v,_){if(typeof v=="object"&&v!==null&&v.type===ts&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case bo:e:{for(var S=v.key,k=p;k!==null;){if(k.key===S){if(S=v.type,S===ts){if(k.tag===7){r(m,k.sibling),p=s(k,v.props.children),p.return=m,m=p;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Pr&&Qh(S)===k.type){r(m,k.sibling),p=s(k,v.props),p.ref=ri(m,k,v),p.return=m,m=p;break e}r(m,k);break}else t(m,k);k=k.sibling}v.type===ts?(p=Pn(v.props.children,m.mode,_,v.key),p.return=m,m=p):(_=oa(v.type,v.key,v.props,null,m.mode,_),_.ref=ri(m,p,v),_.return=m,m=_)}return o(m);
vendor: 6,445 bytes, line 38
38case es:e:{for(k=v.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){r(m,p.sibling),p=s(p,v.children||[]),p.return=m,m=p;break e}else{r(m,p);break}else t(m,p);p=p.sibling}p=au(v,m.mode,_),p.return=m,m=p}return o(m);case Pr:return k=v._init,b(m,p,k(v._payload),_)}if(ui(v))return y(m,p,v,_);if(Ys(v))return g(m,p,v,_);No(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(r(m,p.sibling),p=s(p,v),p.return=m,m=p):(r(m,p),p=ou(v,m.mode,_),p.return=m,m=p),o(m)):r(m,p)}return b}var Ls=ag(!0),lg=ag(!1),Ta=ln(null),Ca=null,us=null,md=null;function gd(){md=us=Ca=null}function vd(e){var t=Ta.current;ce(Ta),e._currentValue=t}function Ju(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 vs(e,t){Ca=e,md=us=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(md!==e)if(e={context:e,memoizedValue:t,next:null},us===null){if(Ca===null)throw Error(A(308));us=e,Ca.dependencies={lanes:0,firstContext:e}}else us=us.next=e;return t}var wn=null;function yd(e){wn===null?wn=[e]:wn.push(e)}function ug(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,yd(t)):(r.next=s.next,s.next=r),t.interleaved=r,fr(e,n)}function fr(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 Ar=!1;function wd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cg(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 Gr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ee&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,fr(e,r)}return s=n.interleaved,s===null?(t.next=t,yd(n)):(t.next=s.next,s.next=t),n.interleaved=t,fr(e,r)}function ea(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,sd(e,r)}}function Yh(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 Ra(e,t,r,n){var s=e.updateQueue;Ar=!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 f=a.lane,h=a.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,g=a;switch(f=t,h=r,g.tag){case 1:if(y=g.payload,typeof y=="function"){c=y.call(h,c,f);break e}c=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,f=typeof y=="function"?y.call(h,c,f):y,f==null)break e;c=ge({},c,f);break e;case 2:Ar=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=h,l=c):d=d.next=h,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,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);jn|=o,e.lanes=o,e.memoizedState=c}}function Xh(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(A(191,s));s.call(n)}}}var lo={},Yt=ln(lo),Ui=ln(lo),Fi=ln(lo);function bn(e){if(e===lo)throw Error(A(174));return e}function bd(e,t){switch(oe(Fi,t),oe(Ui,e),oe(Yt,lo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pu(t,e)}ce(Yt),oe(Yt,t)}function $s(){ce(Yt),ce(Ui),ce(Fi)}function dg(e){bn(Fi.current);var t=bn(Yt.current),r=Pu(t,e.type);t!==r&&(oe(Ui,e),oe(Yt,r))}function xd(e){Ui.current===e&&(ce(Yt),ce(Ui))}var pe=ln(0);function Pa(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 eu=[];function _d(){for(var e=0;e<eu.length;e++)eu[e]._workInProgressVersionPrimary=null;eu.length=0}var ta=vr.ReactCurrentDispatcher,tu=vr.ReactCurrentBatchConfig,On=0,me=null,Ee=null,Re=null,Aa=!1,wi=!1,Bi=0,Nb=0;function Me(){throw Error(A(321))}function Sd(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Mt(e[r],t[r]))return!1;return!0}function kd(e,t,r,n,s,i){if(On=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ta.current=e===null||e.memoizedState===null?Lb:$b,e=r(n,s),wi){i=0;do{if(wi=!1,Bi=0,25<=i)throw Error(A(301));i+=1,Re=Ee=null,t.updateQueue=null,ta.current=Db,e=r(n,s)}while(wi)}if(ta.current=Na,t=Ee!==null&&Ee.next!==null,On=0,Re=Ee=me=null,Aa=!1,t)throw Error(A(300));return e}function Ed(){var e=Bi!==0;return Bi=0,e}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Re===null?me.memoizedState=Re=e:Re=Re.next=e,Re}
vendor: 6,192 bytes, line 38
38function xt(){if(Ee===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Re===null?me.memoizedState:Re.next;if(t!==null)Re=t,Ee=e;else{if(e===null)throw Error(A(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Re===null?me.memoizedState=Re=e:Re=Re.next=e}return Re}function zi(e,t){return typeof t=="function"?t(e):t}function ru(e){var t=xt(),r=t.queue;if(r===null)throw Error(A(311));r.lastRenderedReducer=e;var n=Ee,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((On&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,me.lanes|=d,jn|=d}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,Mt(n,t.memoizedState)||(Ze=!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,me.lanes|=i,jn|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function nu(e){var t=xt(),r=t.queue;if(r===null)throw Error(A(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);Mt(i,t.memoizedState)||(Ze=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function hg(){}function fg(e,t){var r=me,n=xt(),s=t(),i=!Mt(n.memoizedState,s);if(i&&(n.memoizedState=s,Ze=!0),n=n.queue,Td(gg.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Re!==null&&Re.memoizedState.tag&1){if(r.flags|=2048,Hi(9,mg.bind(null,r,n,s,t),void 0,null),Pe===null)throw Error(A(349));On&30||pg(r,t,s)}return s}function pg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function mg(e,t,r,n){t.value=r,t.getSnapshot=n,vg(t)&&yg(e)}function gg(e,t,r){return r(function(){vg(t)&&yg(e)})}function vg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Mt(e,r)}catch{return!0}}function yg(e){var t=fr(e,1);t!==null&&Dt(t,e,1,-1)}function Zh(e){var t=Ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t.queue=e,e=e.dispatch=Ib.bind(null,me,e),[t.memoizedState,e]}function Hi(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.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 wg(){return xt().memoizedState}function ra(e,t,r,n){var s=Ht();me.flags|=e,s.memoizedState=Hi(1|t,r,void 0,n===void 0?null:n)}function sl(e,t,r,n){var s=xt();n=n===void 0?null:n;var i=void 0;if(Ee!==null){var o=Ee.memoizedState;if(i=o.destroy,n!==null&&Sd(n,o.deps)){s.memoizedState=Hi(t,r,i,n);return}}me.flags|=e,s.memoizedState=Hi(1|t,r,i,n)}function ef(e,t){return ra(8390656,8,e,t)}function Td(e,t){return sl(2048,8,e,t)}function bg(e,t){return sl(4,2,e,t)}function xg(e,t){return sl(4,4,e,t)}function _g(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 Sg(e,t,r){return r=r!=null?r.concat([e]):null,sl(4,4,_g.bind(null,t,e),r)}function Cd(){}function kg(e,t){var r=xt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Sd(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Eg(e,t){var r=xt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Sd(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Tg(e,t,r){return On&21?(Mt(r,t)||(r=Nm(),me.lanes|=r,jn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ze=!0),e.memoizedState=r)}function Ob(e,t){var r=ne;ne=r!==0&&4>r?r:4,e(!0);var n=tu.transition;tu.transition={};try{e(!1),t()}finally{ne=r,tu.transition=n}}function Cg(){return xt().memoizedState}function jb(e,t,r){var n=Qr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Rg(e))Pg(t,r);else if(r=ug(e,t,r,n),r!==null){var s=qe();Dt(r,e,n,s),Ag(r,t,n)}}function Ib(e,t,r){var n=Qr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Rg(e))Pg(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,Mt(a,o)){var l=t.interleaved;l===null?(s.next=s,yd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=ug(e,t,s,n),r!==null&&(s=qe(),Dt(r,e,n,s),Ag(r,t,n))}}function Rg(e){var t=e.alternate;return e===me||t!==null&&t===me}function Pg(e,t){wi=Aa=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ag(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,sd(e,r)}}var Na={readContext:bt,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},Lb={readContext:bt,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:ef,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ra(4194308,4,_g.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ra(4194308,4,e,t)},useInsertionEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var r=Ht();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ht();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=jb.bind(null,me,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 38-40
38,useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:Zh,useDebugValue:Cd,useDeferredValue:function(e){return Ht().memoizedState=e},useTransition:function(){var e=Zh(!1),t=e[0];return e=Ob.bind(null,e[1]),Ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=me,s=Ht();if(fe){if(r===void 0)throw Error(A(407));r=r()}else{if(r=t(),Pe===null)throw Error(A(349));On&30||pg(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,ef(gg.bind(null,n,i,e),[e]),n.flags|=2048,Hi(9,mg.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ht(),t=Pe.identifierPrefix;if(fe){var r=ur,n=lr;r=(n&~(1<<32-$t(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Bi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Nb++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$b={readContext:bt,useCallback:kg,useContext:bt,useEffect:Td,useImperativeHandle:Sg,useInsertionEffect:bg,useLayoutEffect:xg,useMemo:Eg,useReducer:ru,useRef:wg,useState:function(){return ru(zi)},useDebugValue:Cd,useDeferredValue:function(e){var t=xt();return Tg(t,Ee.memoizedState,e)},useTransition:function(){var e=ru(zi)[0],t=xt().memoizedState;return[e,t]},useMutableSource:hg,useSyncExternalStore:fg,useId:Cg,unstable_isNewReconciler:!1},Db={readContext:bt,useCallback:kg,useContext:bt,useEffect:Td,useImperativeHandle:Sg,useInsertionEffect:bg,useLayoutEffect:xg,useMemo:Eg,useReducer:nu,useRef:wg,useState:function(){return nu(zi)},useDebugValue:Cd,useDeferredValue:function(e){var t=xt();return Ee===null?t.memoizedState=e:Tg(t,Ee.memoizedState,e)},useTransition:function(){var e=nu(zi)[0],t=xt().memoizedState;return[e,t]},useMutableSource:hg,useSyncExternalStore:fg,useId:Cg,unstable_isNewReconciler:!1};function Rt(e,t){if(e&&e.defaultProps){t=ge({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Qu(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ge({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var il={isMounted:function(e){return(e=e._reactInternals)?Dn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=qe(),s=Qr(e),i=cr(n,s);i.payload=t,r!=null&&(i.callback=r),t=Gr(e,i,s),t!==null&&(Dt(t,e,s,n),ea(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=qe(),s=Qr(e),i=cr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Gr(e,i,s),t!==null&&(Dt(t,e,s,n),ea(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=qe(),n=Qr(e),s=cr(r,n);s.tag=2,t!=null&&(s.callback=t),t=Gr(e,s,n),t!==null&&(Dt(t,e,n,r),ea(t,e,n))}};function tf(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?!Li(r,n)||!Li(s,i):!0}function Ng(e,t,r){var n=!1,s=Zr,i=t.contextType;return typeof i=="object"&&i!==null?i=bt(i):(s=tt(t)?An:ze.current,n=t.contextTypes,i=(n=n!=null)?js(e,s):Zr),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=il,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function rf(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&&il.enqueueReplaceState(t,t.state,null)}function Yu(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},wd(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=bt(i):(i=tt(t)?An:ze.current,s.context=js(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Qu(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&&il.enqueueReplaceState(s,s.state,null),Ra(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ds(e,t){try{var r="",n=t;do r+=dw(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 su(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Xu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Mb=typeof WeakMap=="function"?WeakMap:Map;function Og(e,t,r){r=cr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ja||(ja=!0,lc=n),Xu(e,t)},r}function jg(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(){Xu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Xu(e,t),typeof n!="function"&&(Jr===null?Jr=new Set([this]):Jr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function nf(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Mb;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=Xb.bind(null,e,t,r),t.then(e,e))}function sf(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 of(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,Gr(r,t,1))),r.lanes|=1),e)}var Ub=vr.ReactCurrentOwner,Ze=!1;function We(e,t,r,n){t.child=e===null?lg(t,null,r,n):Ls(t,e.child,r,n)}function af(e,t,r,n,s){r=r.render;var i=t.ref;return vs(t,s),n=kd(e,t,r,n,i,s),r=Ed(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,pr(e,t,s)):(fe&&r&&hd(t),t.flags|=1,We(e,t,n,s),t.child)}function lf(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Ld(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Ig(e,t,i,n,s)):(e=oa(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:Li,r(o,n)&&e.ref===t.ref)return pr(e,t,s)}return t.flags|=1,e=Yr(i,n),e.ref=t.ref,e.return=t,t.child=e}function Ig(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Li(i,n)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,pr(e,t,s)}return Zu(e,t,r,n,s)}function Lg(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},oe(ds,st),st|=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,oe(ds,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,oe(ds,st),st|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,oe(ds,st),st|=n;return We(e,t,s,r),t.child}function $g(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 8,832 bytes, line 40
40function Zu(e,t,r,n,s){var i=tt(r)?An:ze.current;return i=js(t,i),vs(t,s),r=kd(e,t,r,n,i,s),n=Ed(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,pr(e,t,s)):(fe&&n&&hd(t),t.flags|=1,We(e,t,r,s),t.child)}function uf(e,t,r,n,s){if(tt(r)){var i=!0;Sa(t)}else i=!1;if(vs(t,s),t.stateNode===null)na(e,t),Ng(t,r,n),Yu(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=bt(u):(u=tt(r)?An:ze.current,u=js(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)&&rf(t,o,n,u),Ar=!1;var f=t.memoizedState;o.state=f,Ra(t,n,o,s),l=t.memoizedState,a!==n||f!==l||et.current||Ar?(typeof d=="function"&&(Qu(t,r,d,n),l=t.memoizedState),(a=Ar||tf(t,r,a,n,f,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,cg(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Rt(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=bt(l):(l=tt(r)?An:ze.current,l=js(t,l));var h=r.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&rf(t,o,n,l),Ar=!1,f=t.memoizedState,o.state=f,Ra(t,n,o,s);var y=t.memoizedState;a!==c||f!==y||et.current||Ar?(typeof h=="function"&&(Qu(t,r,h,n),y=t.memoizedState),(u=Ar||tf(t,r,u,n,f,y,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),o.props=n,o.state=y,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return ec(e,t,r,n,i,s)}function ec(e,t,r,n,s,i){$g(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&qh(t,r,!1),pr(e,t,i);n=t.stateNode,Ub.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Ls(t,e.child,null,i),t.child=Ls(t,null,a,i)):We(e,t,a,i),t.memoizedState=n.state,s&&qh(t,r,!0),t.child}function Dg(e){var t=e.stateNode;t.pendingContext?Kh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Kh(e,t.context,!1),bd(e,t.containerInfo)}function cf(e,t,r,n,s){return Is(),pd(s),t.flags|=256,We(e,t,r,n),t.child}var tc={dehydrated:null,treeContext:null,retryLane:0};function rc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mg(e,t,r){var n=t.pendingProps,s=pe.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),oe(pe,s&1),e===null)return Gu(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=ll(o,n,0,null),e=Pn(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=rc(r),t.memoizedState=tc,e):Rd(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Fb(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=Yr(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Yr(a,i):(i=Pn(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?rc(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=tc,n}return i=e.child,e=i.sibling,n=Yr(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 Rd(e,t){return t=ll({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oo(e,t,r,n){return n!==null&&pd(n),Ls(t,e.child,null,r),e=Rd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fb(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=su(Error(A(422))),Oo(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=ll({mode:"visible",children:n.children},s,0,null),i=Pn(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Ls(t,e.child,null,o),t.child.memoizedState=rc(o),t.memoizedState=tc,i);if(!(t.mode&1))return Oo(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(A(419)),n=su(i,n,void 0),Oo(e,t,o,n)}if(a=(o&e.childLanes)!==0,Ze||a){if(n=Pe,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,fr(e,s),Dt(n,e,s,-1))}return Id(),n=su(Error(A(421))),Oo(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Zb.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,at=qr(s.nextSibling),lt=t,fe=!0,It=null,e!==null&&(gt[vt++]=lr,gt[vt++]=ur,gt[vt++]=Nn,lr=e.id,ur=e.overflow,Nn=t),t=Rd(t,n.children),t.flags|=4096,t)}function df(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ju(e.return,t,r)}function iu(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 Ug(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(We(e,t,n.children,r),n=pe.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&&df(e,r,t);else if(e.tag===19)df(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(oe(pe,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&&Pa(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),iu(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&&Pa(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}iu(t,!0,r,null,i);break;case"together":iu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function na(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),jn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,r=Yr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Yr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Bb(e,t,r){switch(t.tag){case 3:Dg(t),Is();break;case 5:dg(t);break;case 1:tt(t.type)&&Sa(t);break;case 4:bd(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;oe(Ta,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(oe(pe,pe.current&1),t.flags|=128,null):r&t.child.childLanes?Mg(e,t,r):(oe(pe,pe.current&1),e=pr(e,t,r),e!==null?e.sibling:null);oe(pe,pe.current&1);break;
vendor: 4,092 bytes, line 40
40case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Ug(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(pe,pe.current),n)break;return null;case 22:case 23:return t.lanes=0,Lg(e,t,r)}return pr(e,t,r)}var Fg,nc,Bg,zg;Fg=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}};nc=function(){};Bg=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,bn(Yt.current);var i=null;switch(r){case"input":s=Eu(e,s),n=Eu(e,n),i=[];break;case"select":s=ge({},s,{value:void 0}),n=ge({},n,{value:void 0}),i=[];break;case"textarea":s=Ru(e,s),n=Ru(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=xa)}Au(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"&&(Ri.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"&&(Ri.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&le("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)}};zg=function(e,t,r,n){r!==n&&(t.flags|=4)};function ni(e,t){if(!fe)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 Ue(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 zb(e,t,r){var n=t.pendingProps;switch(fd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return tt(t.type)&&_a(),Ue(t),null;case 3:return n=t.stateNode,$s(),ce(et),ce(ze),_d(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ao(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,It!==null&&(dc(It),It=null))),nc(e,t),Ue(t),null;case 5:xd(t);var s=bn(Fi.current);if(r=t.type,e!==null&&t.stateNode!=null)Bg(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(A(166));return Ue(t),null}if(e=bn(Yt.current),Ao(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Jt]=t,n[Mi]=i,e=(t.mode&1)!==0,r){case"dialog":le("cancel",n),le("close",n);break;case"iframe":case"object":case"embed":le("load",n);break;case"video":case"audio":for(s=0;s<di.length;s++)le(di[s],n);break;case"source":le("error",n);break;case"img":case"image":case"link":le("error",n),le("load",n);break;case"details":le("toggle",n);break;case"input":wh(n,i),le("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},le("invalid",n);break;case"textarea":xh(n,i),le("invalid",n)}Au(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,630 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Po(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Po(n.textContent,a,e),s=["children",""+a]):Ri.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&le("scroll",n)}switch(r){case"input":xo(n),bh(n,i,!0);break;case"textarea":xo(n),_h(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=xa)}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=gm(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[Jt]=t,e[Mi]=n,Fg(e,t,!1,!1),t.stateNode=e;e:{switch(o=Nu(r,n),r){case"dialog":le("cancel",e),le("close",e),s=n;break;case"iframe":case"object":case"embed":le("load",e),s=n;break;case"video":case"audio":for(s=0;s<di.length;s++)le(di[s],e);s=n;break;case"source":le("error",e),s=n;break;case"img":case"image":case"link":le("error",e),le("load",e),s=n;break;case"details":le("toggle",e),s=n;break;case"input":wh(e,n),s=Eu(e,n),le("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ge({},n,{value:void 0}),le("invalid",e);break;case"textarea":xh(e,n),s=Ru(e,n),le("invalid",e);break;default:s=n}Au(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?wm(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&vm(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Pi(e,l):typeof l=="number"&&Pi(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ri.hasOwnProperty(i)?l!=null&&i==="onScroll"&&le("scroll",e):l!=null&&Xc(e,i,l,o))}switch(r){case"input":xo(e),bh(e,n,!1);break;case"textarea":xo(e),_h(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Xr(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?fs(e,!!n.multiple,i,!1):n.defaultValue!=null&&fs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=xa)}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 Ue(t),null;case 6:if(e&&t.stateNode!=null)zg(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(A(166));if(r=bn(Fi.current),bn(Yt.current),Ao(t)){if(n=t.stateNode,r=t.memoizedProps,n[Jt]=t,(i=n.nodeValue!==r)&&(e=lt,e!==null))switch(e.tag){case 3:Po(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Po(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Jt]=t,t.stateNode=n}return Ue(t),null;case 13:if(ce(pe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&at!==null&&t.mode&1&&!(t.flags&128))og(),Is(),t.flags|=98560,i=!1;else if(i=Ao(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(A(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(A(317));i[Jt]=t}else Is(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),i=!1}else It!==null&&(dc(It),It=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||pe.current&1?Te===0&&(Te=3):Id())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return $s(),nc(e,t),e===null&&$i(t.stateNode.containerInfo),Ue(t),null;case 10:return vd(t.type._context),Ue(t),null;case 17:return tt(t.type)&&_a(),Ue(t),null;case 19:if(ce(pe),i=t.memoizedState,i===null)return Ue(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)ni(i,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Pa(e),o!==null){for(t.flags|=128,ni(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 oe(pe,pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&be()>Ms&&(t.flags|=128,n=!0,ni(i,!1),t.lanes=4194304)}else{if(!n)if(e=Pa(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ni(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!fe)return Ue(t),null}else 2*be()-i.renderingStartTime>Ms&&r!==1073741824&&(t.flags|=128,n=!0,ni(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=be(),t.sibling=null,r=pe.current,oe(pe,n?r&1|2:r&1),t):(Ue(t),null);case 22:case 23:return jd(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?st&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function Hb(e,t){switch(fd(t),t.tag){case 1:return tt(t.type)&&_a(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $s(),ce(et),ce(ze),_d(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xd(t),null;case 13:if(ce(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(pe),null;case 4:return $s(),null;case 10:return vd(t.type._context),null;case 22:case 23:return jd(),null;case 24:return null;default:return null}}var jo=!1,Be=!1,Vb=typeof WeakSet=="function"?WeakSet:Set,M=null;function cs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){we(e,t,n)}else r.current=null}function sc(e,t,r){try{r()}catch(n){we(e,t,n)}}var hf=!1;function Wb(e,t){if(Bu=ya,e=qm(),dd(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,f=null;t:for(;;){for(var h;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),(h=c.firstChild)!==null;)f=c,c=h;for(;;){if(c===e)break t;if(f===r&&++u===s&&(a=o),f===i&&++d===n&&(l=o),(h=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(zu={focusedElem:e,selectionRange:r},ya=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,b=y.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:Rt(t.type,g),b);m.__reactInternalSnapshotBeforeUpdate=p}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(A(163))}}catch(_){we(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return y=hf,hf=!1,y}function bi(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&&sc(t,r,i)}s=s.next}while(s!==n)}}function ol(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 ic(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 Hg(e){var t=e.alternate;t!==null&&(e.alternate=null,Hg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[Mi],delete t[Wu],delete t[Cb],delete t[Rb])),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 Vg(e){return e.tag===5||e.tag===3||e.tag===4}function ff(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vg(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 oc(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=xa));else if(n!==4&&(e=e.child,e!==null))for(oc(e,t,r),e=e.sibling;e!==null;)oc(e,t,r),e=e.sibling}function ac(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(ac(e,t,r),e=e.sibling;e!==null;)ac(e,t,r),e=e.sibling}var Oe=null,jt=!1;function Er(e,t,r){for(r=r.child;r!==null;)Wg(e,t,r),r=r.sibling}function Wg(e,t,r){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Xa,r)}catch{}switch(r.tag){case 5:Be||cs(r,t);case 6:var n=Oe,s=jt;Oe=null,Er(e,t,r),Oe=n,jt=s,Oe!==null&&(jt?(e=Oe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Oe.removeChild(r.stateNode));break;case 18:Oe!==null&&(jt?(e=Oe,r=r.stateNode,e.nodeType===8?Xl(e.parentNode,r):e.nodeType===1&&Xl(e,r),ji(e)):Xl(Oe,r.stateNode));break;case 4:n=Oe,s=jt,Oe=r.stateNode.containerInfo,jt=!0,Er(e,t,r),Oe=n,jt=s;break;case 0:case 11:case 14:case 15:if(!Be&&(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)&&sc(r,t,o),s=s.next}while(s!==n)}Er(e,t,r);break;case 1:if(!Be&&(cs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){we(r,t,a)}Er(e,t,r);break;case 21:Er(e,t,r);break;case 22:r.mode&1?(Be=(n=Be)||r.memoizedState!==null,Er(e,t,r),Be=n):Er(e,t,r);break;default:Er(e,t,r)}}function pf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Vb),t.forEach(function(n){var s=ex.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Et(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:Oe=a.stateNode,jt=!1;break e;case 3:Oe=a.stateNode.containerInfo,jt=!0;break e;case 4:Oe=a.stateNode.containerInfo,jt=!0;break e}a=a.return}if(Oe===null)throw Error(A(160));Wg(i,o,s),Oe=null,jt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){we(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Kg(t,e),t=t.sibling}function Kg(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Et(t,e),Bt(e),n&4){try{bi(3,e,e.return),ol(3,e)}catch(g){we(e,e.return,g)}try{bi(5,e,e.return)}catch(g){we(e,e.return,g)}}break;case 1:Et(t,e),Bt(e),n&512&&r!==null&&cs(r,r.return);break;case 5:if(Et(t,e),Bt(e),n&512&&r!==null&&cs(r,r.return),e.flags&32){var s=e.stateNode;try{Pi(s,"")}catch(g){we(e,e.return,g)}}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&&pm(s,i),Nu(a,o);var u=Nu(a,i);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?wm(s,c):d==="dangerouslySetInnerHTML"?vm(s,c):d==="children"?Pi(s,c):Xc(s,d,c,u)}switch(a){case"input":Tu(s,i);break;case"textarea":mm(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?fs(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?fs(s,!!i.multiple,i.defaultValue,!0):fs(s,!!i.multiple,i.multiple?[]:"",!1))}s[Mi]=i}catch(g){we(e,e.return,g)}}break;case 6:if(Et(t,e),Bt(e),n&4){if(e.stateNode===null)throw Error(A(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){we(e,e.return,g)}}break;case 3:if(Et(t,e),Bt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ji(t.containerInfo)}catch(g){we(e,e.return,g)}break;case 4:Et(t,e),Bt(e);break;case 13:Et(t,e),Bt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Nd=be())),n&4&&pf(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Be=(u=Be)||d,Et(t,e),Be=u):Et(t,e),Bt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(M=e,d=e.child;d!==null;){for(c=M=d;M!==null;){switch(f=M,h=f.child,f.tag){case 0:case 11:case 14:case 15:bi(4,f,f.return);break;case 1:cs(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){we(n,r,g)}}break;case 5:cs(f,f.return);break;case 22:if(f.memoizedState!==null){gf(c);continue}}h!==null?(h.return=f,M=h):gf(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=ym("display",o))}catch(g){we(e,e.return,g)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(g){we(e,e.return,g)}}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:Et(t,e),Bt(e),n&4&&pf(e);break;case 21:break;default:Et(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Vg(r)){var n=r;break e}r=r.return}throw Error(A(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Pi(s,""),n.flags&=-33);var i=ff(e);ac(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=ff(e);oc(e,a,o);break;default:throw Error(A(161))}}catch(l){we(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kb(e,t,r){M=e,qg(e)}function qg(e,t,r){for(var n=(e.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||jo;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Be;a=jo;var u=Be;if(jo=o,(Be=l)&&!u)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?vf(s):l!==null?(l.return=o,M=l):vf(s);for(;i!==null;)M=i,qg(i),i=i.sibling;M=s,jo=a,Be=u}mf(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):mf(e)}}function mf(e){for(;M!==null;){var t=M;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Be||ol(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Be)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Rt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Xh(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}Xh(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&&ji(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}Be||t.flags&512&&ic(t)}catch(f){we(t,t.return,f)}}if(t===e){M=null;break}if(r=t.sibling,r!==null){r.return=t.return,M=r;break}M=t.return}}function gf(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var r=t.sibling;if(r!==null){r.return=t.return,M=r;break}M=t.return}}function vf(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{ol(4,t)}catch(l){we(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){we(t,s,l)}}var i=t.return;try{ic(t)}catch(l){we(t,i,l)}break;case 5:var o=t.return;try{ic(t)}catch(l){we(t,o,l)}}}catch(l){we(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var qb=Math.ceil,Oa=vr.ReactCurrentDispatcher,Pd=vr.ReactCurrentOwner,wt=vr.ReactCurrentBatchConfig,ee=0,Pe=null,Se=null,je=0,st=0,ds=ln(0),Te=0,Vi=null,jn=0,al=0,Ad=0,xi=null,Xe=null,Nd=0,Ms=1/0,nr=null,ja=!1,lc=null,Jr=null,Io=!1,Br=null,Ia=0,_i=0,uc=null,sa=-1,ia=0;function qe(){return ee&6?be():sa!==-1?sa:sa=be()}function Qr(e){return e.mode&1?ee&2&&je!==0?je&-je:Ab.transition!==null?(ia===0&&(ia=Nm()),ia):(e=ne,e!==0||(e=window.event,e=e===void 0?16:Mm(e.type)),e):1}function Dt(e,t,r,n){if(50<_i)throw _i=0,uc=null,Error(A(185));io(e,r,n),(!(ee&2)||e!==Pe)&&(e===Pe&&(!(ee&2)&&(al|=r),Te===4&&Or(e,je)),rt(e,n),r===1&&ee===0&&!(t.mode&1)&&(Ms=be()+500,nl&&un()))}function rt(e,t){var r=e.callbackNode;Aw(e,t);var n=va(e,e===Pe?je:0);if(n===0)r!==null&&Eh(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Eh(r),t===1)e.tag===0?Pb(yf.bind(null,e)):ng(yf.bind(null,e)),Eb(function(){!(ee&6)&&un()}),r=null;else{switch(Om(n)){case 1:r=nd;break;case 4:r=Pm;break;case 16:r=ga;break;case 536870912:r=Am;break;default:r=ga}r=tv(r,Gg.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Gg(e,t){if(sa=-1,ia=0,ee&6)throw Error(A(327));var r=e.callbackNode;if(ys()&&e.callbackNode!==r)return null;var n=va(e,e===Pe?je:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=La(e,n);else{t=n;var s=ee;ee|=2;var i=Qg();(Pe!==e||je!==t)&&(nr=null,Ms=be()+500,Rn(e,t));do try{Qb();break}catch(a){Jg(e,a)}while(!0);gd(),Oa.current=i,ee=s,Se!==null?t=0:(Pe=null,je=0,t=Te)}if(t!==0){if(t===2&&(s=$u(e),s!==0&&(n=s,t=cc(e,s))),t===1)throw r=Vi,Rn(e,0),Or(e,n),rt(e,be()),r;if(t===6)Or(e,n);else{if(s=e.current.alternate,!(n&30)&&!Gb(s)&&(t=La(e,n),t===2&&(i=$u(e),i!==0&&(n=i,t=cc(e,i))),t===1))throw r=Vi,Rn(e,0),Or(e,n),rt(e,be()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(A(345));case 2:gn(e,Xe,nr);break;case 3:if(Or(e,n),(n&130023424)===n&&(t=Nd+500-be(),10<t)){if(va(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){qe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Vu(gn.bind(null,e,Xe,nr),t);break}gn(e,Xe,nr);break;case 4:if(Or(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-$t(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=be()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*qb(n/1960))-n,10<n){e.timeoutHandle=Vu(gn.bind(null,e,Xe,nr),n);break}gn(e,Xe,nr);break;case 5:gn(e,Xe,nr);break;default:throw Error(A(329))}}}return rt(e,be()),e.callbackNode===r?Gg.bind(null,e):null}function cc(e,t){var r=xi;return e.current.memoizedState.isDehydrated&&(Rn(e,t).flags|=256),e=La(e,t),e!==2&&(t=Xe,Xe=r,t!==null&&dc(t)),e}function dc(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function Gb(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(!Mt(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 Or(e,t){for(t&=~Ad,t&=~al,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-$t(t),n=1<<r;e[r]=-1,t&=~n}}function yf(e){if(ee&6)throw Error(A(327));ys();var t=va(e,0);if(!(t&1))return rt(e,be()),null;var r=La(e,t);if(e.tag!==0&&r===2){var n=$u(e);n!==0&&(t=n,r=cc(e,n))}if(r===1)throw r=Vi,Rn(e,0),Or(e,t),rt(e,be()),r;if(r===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gn(e,Xe,nr),rt(e,be()),null}function Od(e,t){var r=ee;ee|=1;try{return e(t)}finally{ee=r,ee===0&&(Ms=be()+500,nl&&un())}}function In(e){Br!==null&&Br.tag===0&&!(ee&6)&&ys();var t=ee;ee|=1;var r=wt.transition,n=ne;try{if(wt.transition=null,ne=1,e)return e()}finally{ne=n,wt.transition=r,ee=t,!(ee&6)&&un()}}function jd(){st=ds.current,ce(ds)}function Rn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,kb(r)),Se!==null)for(r=Se.return;r!==null;){var n=r;switch(fd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&_a();break;case 3:$s(),ce(et),ce(ze),_d();break;case 5:xd(n);break;case 4:$s();break;case 13:ce(pe);break;case 19:ce(pe);break;case 10:vd(n.type._context);break;case 22:case 23:jd()}r=r.return}if(Pe=e,Se=e=Yr(e.current,null),je=st=t,Te=0,Vi=null,Ad=al=jn=0,Xe=xi=null,wn!==null){for(t=0;t<wn.length;t++)if(r=wn[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}wn=null}return e}function Jg(e,t){do{var r=Se;try{if(gd(),ta.current=Na,Aa){for(var n=me.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Aa=!1}if(On=0,Re=Ee=me=null,wi=!1,Bi=0,Pd.current=null,r===null||r.return===null){Te=1,Vi=t,Se=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=je,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 f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=sf(o);if(h!==null){h.flags&=-257,of(h,o,a,i,t),h.mode&1&&nf(i,u,t),t=h,l=u;var y=t.updateQueue;if(y===null){var g=new Set;g.add(l),t.updateQueue=g}else y.add(l);break e}else{if(!(t&1)){nf(i,u,t),Id();break e}l=Error(A(426))}}else if(fe&&a.mode&1){var b=sf(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),of(b,o,a,i,t),pd(Ds(l,a));break e}}i=l=Ds(l,a),Te!==4&&(Te=2),xi===null?xi=[i]:xi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Og(i,l,t);Yh(i,m);break e;case 1:a=l;var p=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Jr===null||!Jr.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=jg(i,a,t);Yh(i,_);break e}}i=i.return}while(i!==null)}Xg(r)}catch(S){t=S,Se===r&&r!==null&&(Se=r=r.return);continue}break}while(!0)}function Qg(){var e=Oa.current;return Oa.current=Na,e===null?Na:e}function Id(){(Te===0||Te===3||Te===2)&&(Te=4),Pe===null||!(jn&268435455)&&!(al&268435455)||Or(Pe,je)}function La(e,t){var r=ee;ee|=2;var n=Qg();(Pe!==e||je!==t)&&(nr=null,Rn(e,t));do try{Jb();break}catch(s){Jg(e,s)}while(!0);if(gd(),ee=r,Oa.current=n,Se!==null)throw Error(A(261));return Pe=null,je=0,Te}function Jb(){for(;Se!==null;)Yg(Se)}function Qb(){for(;Se!==null&&!xw();)Yg(Se)}function Yg(e){var t=ev(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?Xg(e):Se=t,Pd.current=null}function Xg(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Hb(r,t),r!==null){r.flags&=32767,Se=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,Se=null;return}}else if(r=zb(r,t,st),r!==null){Se=r;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Te===0&&(Te=5)}function gn(e,t,r){var n=ne,s=wt.transition;try{wt.transition=null,ne=1,Yb(e,t,r,n)}finally{wt.transition=s,ne=n}return null}function Yb(e,t,r,n){do ys();while(Br!==null);if(ee&6)throw Error(A(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(A(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Nw(e,i),e===Pe&&(Se=Pe=null,je=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Io||(Io=!0,tv(ga,function(){return ys(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=wt.transition,wt.transition=null;var o=ne;ne=1;var a=ee;ee|=4,Pd.current=null,Wb(e,r),Kg(r,e),vb(zu),ya=!!Bu,zu=Bu=null,e.current=r,Kb(r),_w(),ee=a,ne=o,wt.transition=i}else e.current=r;if(Io&&(Io=!1,Br=e,Ia=s),i=e.pendingLanes,i===0&&(Jr=null),Ew(r.stateNode),rt(e,be()),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(ja)throw ja=!1,e=lc,lc=null,e;return Ia&1&&e.tag!==0&&ys(),i=e.pendingLanes,i&1?e===uc?_i++:(_i=0,uc=e):_i=0,un(),null}function ys(){if(Br!==null){var e=Om(Ia),t=wt.transition,r=ne;try{if(wt.transition=null,ne=16>e?16:e,Br===null)var n=!1;else{if(e=Br,Br=null,Ia=0,ee&6)throw Error(A(331));var s=ee;for(ee|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(M=u;M!==null;){var d=M;switch(d.tag){case 0:case 11:case 15:bi(8,d,i)}var c=d.child;if(c!==null)c.return=d,M=c;else for(;M!==null;){d=M;var f=d.sibling,h=d.return;if(Hg(d),d===u){M=null;break}if(f!==null){f.return=h,M=f;break}M=h}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:bi(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,M=m;break e}M=i.return}}var p=e.current;for(M=p;M!==null;){o=M;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,M=v;else e:for(o=p;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ol(9,a)}}catch(S){we(a,a.return,S)}if(a===o){M=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,M=_;break e}M=a.return}}if(ee=s,un(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Xa,e)}catch{}n=!0}return n}finally{ne=r,wt.transition=t}}return!1}function wf(e,t,r){t=Ds(r,t),t=Og(e,t,1),e=Gr(e,t,1),t=qe(),e!==null&&(io(e,1,t),rt(e,t))}function we(e,t,r){if(e.tag===3)wf(e,e,r);else for(;t!==null;){if(t.tag===3){wf(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Jr===null||!Jr.has(n))){e=Ds(r,e),e=jg(t,e,1),t=Gr(t,e,1),e=qe(),t!==null&&(io(t,1,e),rt(t,e));break}}t=t.return}}function Xb(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=qe(),e.pingedLanes|=e.suspendedLanes&r,Pe===e&&(je&r)===r&&(Te===4||Te===3&&(je&130023424)===je&&500>be()-Nd?Rn(e,0):Ad|=r),rt(e,t)}function Zg(e,t){t===0&&(e.mode&1?(t=ko,ko<<=1,!(ko&130023424)&&(ko=4194304)):t=1);var r=qe();e=fr(e,t),e!==null&&(io(e,t,r),rt(e,r))}function Zb(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Zg(e,r)}function ex(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(A(314))}n!==null&&n.delete(t),Zg(e,r)}var ev;ev=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)Ze=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ze=!1,Bb(e,t,r);Ze=!!(e.flags&131072)}else Ze=!1,fe&&t.flags&1048576&&sg(t,Ea,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;na(e,t),e=t.pendingProps;var s=js(t,ze.current);vs(t,r),s=kd(null,t,n,e,s,r);var i=Ed();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,tt(n)?(i=!0,Sa(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,wd(t),s.updater=il,t.stateNode=s,s._reactInternals=t,Yu(t,n,e,r),t=ec(null,t,n,!0,i,r)):(t.tag=0,fe&&i&&hd(t),We(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(na(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=rx(n),e=Rt(n,e),s){case 0:t=Zu(null,t,n,e,r);break e;case 1:t=uf(null,t,n,e,r);break e;case 11:t=af(null,t,n,e,r);break e;case 14:t=lf(null,t,n,Rt(n.type,e),r);break e}throw Error(A(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),Zu(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),uf(e,t,n,s,r);case 3:e:{if(Dg(t),e===null)throw Error(A(387));n=t.pendingProps,i=t.memoizedState,s=i.element,cg(e,t),Ra(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=Ds(Error(A(423)),t),t=cf(e,t,n,r,s);break e}else if(n!==s){s=Ds(Error(A(424)),t),t=cf(e,t,n,r,s);break e}else for(at=qr(t.stateNode.containerInfo.firstChild),lt=t,fe=!0,It=null,r=lg(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Is(),n===s){t=pr(e,t,r);break e}We(e,t,n,r)}t=t.child}return t;case 5:return dg(t),e===null&&Gu(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Hu(n,s)?o=null:i!==null&&Hu(n,i)&&(t.flags|=32),$g(e,t),We(e,t,o,r),t.child;case 6:return e===null&&Gu(t),null;case 13:return Mg(e,t,r);case 4:return bd(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ls(t,null,n,r):We(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),af(e,t,n,s,r);case 7:return We(e,t,t.pendingProps,r),t.child;case 8:return We(e,t,t.pendingProps.children,r),t.child;case 12:return We(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,oe(Ta,n._currentValue),n._currentValue=o,i!==null)if(Mt(i.value,o)){if(i.children===s.children&&!et.current){t=pr(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),Ju(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(A(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Ju(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}We(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,vs(t,r),s=bt(s),n=n(s),t.flags|=1,We(e,t,n,r),t.child;case 14:return n=t.type,s=Rt(n,t.pendingProps),s=Rt(n.type,s),lf(e,t,n,s,r);case 15:return Ig(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),na(e,t),t.tag=1,tt(n)?(e=!0,Sa(t)):e=!1,vs(t,r),Ng(t,n,s),Yu(t,n,s,r),ec(null,t,n,!0,e,r);case 19:return Ug(e,t,r);case 22:return Lg(e,t,r)}throw Error(A(156,t.tag))};function tv(e,t){return Rm(e,t)}function tx(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=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 yt(e,t,r,n){return new tx(e,t,r,n)}function Ld(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rx(e){if(typeof e=="function")return Ld(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ed)return 11;if(e===td)return 14}return 2}function Yr(e,t){var r=e.alternate;return r===null?(r=yt(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.depen
vendor: 5,256 bytes, line 40
40dencies,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 oa(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")Ld(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ts:return Pn(r.children,s,i,t);case Zc:o=8,s|=8;break;case xu:return e=yt(12,r,t,s|2),e.elementType=xu,e.lanes=i,e;case _u:return e=yt(13,r,t,s),e.elementType=_u,e.lanes=i,e;case Su:return e=yt(19,r,t,s),e.elementType=Su,e.lanes=i,e;case dm:return ll(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case um:o=10;break e;case cm:o=9;break e;case ed:o=11;break e;case td:o=14;break e;case Pr:o=16,n=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=yt(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Pn(e,t,r,n){return e=yt(7,e,n,t),e.lanes=r,e}function ll(e,t,r,n){return e=yt(22,e,n,t),e.elementType=dm,e.lanes=r,e.stateNode={isHidden:!1},e}function ou(e,t,r){return e=yt(6,e,null,t),e.lanes=r,e}function au(e,t,r){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nx(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=Bl(0),this.expirationTimes=Bl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bl(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function $d(e,t,r,n,s,i,o,a,l){return e=new nx(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=yt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},wd(i),e}function sx(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:es,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function rv(e){if(!e)return Zr;e=e._reactInternals;e:{if(Dn(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var r=e.type;if(tt(r))return rg(e,r,t)}return t}function nv(e,t,r,n,s,i,o,a,l){return e=$d(r,n,!0,e,s,i,o,a,l),e.context=rv(null),r=e.current,n=qe(),s=Qr(r),i=cr(n,s),i.callback=t??null,Gr(r,i,s),e.current.lanes=s,io(e,s,n),rt(e,n),e}function ul(e,t,r,n){var s=t.current,i=qe(),o=Qr(s);return r=rv(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=Gr(s,t,o),e!==null&&(Dt(e,s,o,i),ea(e,s,o)),o}function $a(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 bf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Dd(e,t){bf(e,t),(e=e.alternate)&&bf(e,t)}function ix(){return null}var sv=typeof reportError=="function"?reportError:function(e){console.error(e)};function Md(e){this._internalRoot=e}cl.prototype.render=Md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));ul(e,t,null,null)};cl.prototype.unmount=Md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;In(function(){ul(null,e,null,null)}),t[hr]=null}};function cl(e){this._internalRoot=e}cl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lm();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Nr.length&&t!==0&&t<Nr[r].priority;r++);Nr.splice(r,0,e),r===0&&Dm(e)}};function Ud(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function dl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xf(){}function ox(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=$a(o);i.call(u)}}var o=nv(t,n,e,0,null,!1,!1,"",xf);return e._reactRootContainer=o,e[hr]=o.current,$i(e.nodeType===8?e.parentNode:e),In(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=$a(l);a.call(u)}}var l=$d(e,0,!1,null,null,!1,!1,"",xf);return e._reactRootContainer=l,e[hr]=l.current,$i(e.nodeType===8?e.parentNode:e),In(function(){ul(t,l,r,n)}),l}function hl(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=$a(o);a.call(l)}}ul(t,o,e,s)}else o=ox(r,t,e,s,n);return $a(o)}jm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ci(t.pendingLanes);r!==0&&(sd(t,r|1),rt(t,be()),!(ee&6)&&(Ms=be()+500,un()))}break;case 13:In(function(){var n=fr(e,1);if(n!==null){var s=qe();Dt(n,e,1,s)}}),Dd(e,1)}};id=function(e){if(e.tag===13){var t=fr(e,134217728);if(t!==null){var r=qe();Dt(t,e,134217728,r)}Dd(e,134217728)}};Im=function(e){if(e.tag===13){var t=Qr(e),r=fr(e,t);if(r!==null){var n=qe();Dt(r,e,t,n)}
vendor: 4,247 bytes, line 40
40Dd(e,t)}};Lm=function(){return ne};$m=function(e,t){var r=ne;try{return ne=e,t()}finally{ne=r}};ju=function(e,t,r){switch(t){case"input":if(Tu(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=rl(n);if(!s)throw Error(A(90));fm(n),Tu(n,s)}}}break;case"textarea":mm(e,r);break;case"select":t=r.value,t!=null&&fs(e,!!r.multiple,t,!1)}};_m=Od;Sm=In;var ax={usingClientEntryPoint:!1,Events:[ao,is,rl,bm,xm,Od]},si={findFiberByHostInstance:yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lx={bundleType:si.bundleType,version:si.version,rendererPackageName:si.rendererPackageName,rendererConfig:si.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Tm(e),e===null?null:e.stateNode},findFiberByHostInstance:si.findFiberByHostInstance||ix,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 Lo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lo.isDisabled&&Lo.supportsFiber)try{Xa=Lo.inject(lx),Qt=Lo}catch{}}dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ax;dt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ud(t))throw Error(A(200));return sx(e,t,null,r)};dt.createRoot=function(e,t){if(!Ud(e))throw Error(A(299));var r=!1,n="",s=sv;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=$d(e,1,!1,null,null,r,!1,n,s),e[hr]=t.current,$i(e.nodeType===8?e.parentNode:e),new Md(t)};dt.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(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=Tm(t),e=e===null?null:e.stateNode,e};dt.flushSync=function(e){return In(e)};dt.hydrate=function(e,t,r){if(!dl(t))throw Error(A(200));return hl(null,e,t,!0,r)};dt.hydrateRoot=function(e,t,r){if(!Ud(e))throw Error(A(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=sv;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=nv(t,null,e,1,r??null,s,!1,i,o),e[hr]=t.current,$i(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 cl(t)};dt.render=function(e,t,r){if(!dl(t))throw Error(A(200));return hl(null,e,t,!1,r)};dt.unmountComponentAtNode=function(e){if(!dl(e))throw Error(A(40));return e._reactRootContainer?(In(function(){hl(null,null,e,!1,function(){e._reactRootContainer=null,e[hr]=null})}),!0):!1};dt.unstable_batchedUpdates=Od;dt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!dl(r))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return hl(e,t,r,!1,n)};dt.version="18.3.1-next-f1338f8080-20240426";function iv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iv)}catch(e){console.error(e)}}iv(),im.exports=dt;var uo=im.exports;const ov=Kp(uo);var av,_f=uo;av=_f.createRoot,_f.hydrateRoot;const ux=1,cx=1e6;let lu=0;function dx(){return lu=(lu+1)%Number.MAX_SAFE_INTEGER,lu.toString()}const uu=new Map,Sf=e=>{if(uu.has(e))return;const t=setTimeout(()=>{uu.delete(e),Si({type:"REMOVE_TOAST",toastId:e})},cx);uu.set(e,t)},hx=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ux)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;
40return r?Sf(r):e.toasts.forEach(n=>{Sf(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},aa=[];let la={toasts:[]};function Si(e){la=hx(la,e),aa.forEach(t=>{t(la)})}function fx({...e}){const t=dx(),r=s=>Si({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>Si({type:"DISMISS_TOAST",toastId:t});return Si({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function lv(){const[e,t]=x.useState(la);return x.useEffect(()=>(aa.push(t),()=>{const r=aa.indexOf(t);r>-1&&aa.splice(r,1)}),[e]),{...e,toast:fx,dismiss:r=>Si({type:"DISMISS_TOAST",toastId:r})}}function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function kf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uv(...e){return t=>{let r=!1;const n=e.map(s=>{const i=kf(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():kf(e[s],null)}}}}function Le(...e){return x.useCallback(uv(...e),e)}function co(e,t=[]){let r=[];function n(i,o){const a=x.createContext(o),l=r.length;r=[...r,o];const u=c=>{var m;const{scope:f,children:h,...y}=c,g=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,b=x.useMemo(()=>y,Object.values(y));return w.jsx(g.Provider,{value:b,children:h})};u.displayName=i+"Provider";function d(c,f){var g;const h=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,y=x.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=r.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,px(s,...t)]}function px(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...a,...c}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Da(e){const t=gx(e),r=x.forwardRef((n,s)=>{const{children:i,...o}=n,a=x.Children.toArray(i),l=a.find(yx);if(l){const u=l.props.children,d=a.map(c=>c===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:c);return w.jsx(t,{...o,ref:s,children:x.isValidElement(u)?x.cloneElement(u,void 0,d):null})}return w.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var mx=Da("Slot");function gx(e){const t=x.forwardRef((r,n)=>{const{children:s,...i}=r;if(x.isValidElement(s)){const o=bx(s),a=wx(i,s.props);return s.type!==x.Fragment&&(a.ref=n?uv(n,o):o),x.cloneElement(s,a)}return x.Children.count(s)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cv=Symbol("radix.slottable");function vx(e){const t=({children:r})=>w.jsx(w.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=cv,t}function yx(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cv}function wx(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function bx(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function dv(e){const t=e+"CollectionProvider",[r,n]=co(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:b,children:m}=g,p=O.useRef(null),v=O.useRef(new Map).current;return w.jsx(s,{scope:b,itemMap:v,collectionRef:p,children:m})};o.displayName=t;const a=e+"CollectionSlot",l=Da(a),u=O.forwardRef((g,b)=>{const{scope:m,children:p}=g,v=i(a,m),_=Le(b,v.collectionRef);return w.jsx(l,{ref:_,children:p})});u.displayName=a;const d=e+"CollectionItemSlot",c="data-radix-collection-item",f=Da(d),h=O.forwardRef((g,b)=>{const{scope:m,children:p,...v}=g,_=O.useRef(null),S=Le(b,_),k=i(d,m);return O.useEffect(()=>(k.itemMap.set(_,{ref:_,...v}),()=>
vendor: 9,043 bytes, line 40
40void k.itemMap.delete(_))),w.jsx(f,{[c]:"",ref:S,children:p})});h.displayName=d;function y(g){const b=i(e+"CollectionConsumer",g);return O.useCallback(()=>{const p=b.collectionRef.current;if(!p)return[];const v=Array.from(p.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((k,E)=>v.indexOf(k.ref.current)-v.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},y,n]}var xx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=xx.reduce((e,t)=>{const r=Da(`Primitive.${t}`),n=x.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hv(e,t){e&&uo.flushSync(()=>e.dispatchEvent(t))}function en(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function _x(e,t=globalThis==null?void 0:globalThis.document){const r=en(e);x.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Sx="DismissableLayer",hc="dismissableLayer.update",kx="dismissableLayer.pointerDownOutside",Ex="dismissableLayer.focusOutside",Ef,fv=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fd=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=x.useContext(fv),[d,c]=x.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),y=Le(t,E=>c(E)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=g.indexOf(b),p=d?g.indexOf(d):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,_=p>=m,S=Cx(E=>{const P=E.target,N=[...u.branches].some(j=>j.contains(P));!_||N||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),k=Rx(E=>{const P=E.target;[...u.branches].some(j=>j.contains(P))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return _x(E=>{p===u.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),x.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ef=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Tf(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ef)}},[d,f,r,u]),x.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Tf())},[d,u]),x.useEffect(()=>{const E=()=>h({});return document.addEventListener(hc,E),()=>document.removeEventListener(hc,E)},[]),w.jsx(ke.div,{...l,ref:y,style:{pointerEvents:v?_?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,S.onPointerDownCapture)})});Fd.displayName=Sx;var Tx="DismissableLayerBranch",pv=x.forwardRef((e,t)=>{const r=x.useContext(fv),n=x.useRef(null),s=Le(t,n);return x.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),w.jsx(ke.div,{...e,ref:s})});pv.displayName=Tx;function Cx(e,t=globalThis==null?void 0:globalThis.document){const r=en(e),n=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){mv(kx,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Rx(e,t=globalThis==null?void 0:globalThis.document){const r=en(e),n=x.useRef(!1);return x.useEffect(()=>{const s=i=>{i.target&&!n.current&&mv(Ex,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Tf(){const e=new CustomEvent(hc);document.dispatchEvent(e)}function mv(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?hv(s,i):s.dispatchEvent(i)}var Px=Fd,Ax=pv,tn=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},Nx="Portal",gv=x.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=x.useState(!1);tn(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?ov.createPortal(w.jsx(ke.div,{...n,ref:t}),o):null});gv.displayName=Nx;function Ox(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var Bd=e=>{const{present:t,children:r}=e,n=jx(t),s=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),i=Le(n.ref,Ix(s));return typeof r=="function"||n.isPresent?x.cloneElement(s,{ref:i}):null};Bd.displayName="Presence";function jx(e){const[t,r]=x.useState(),n=x.useRef(null),s=x.useRef(e),i=x.useRef("none"),o=e?"mounted":"unmounted",[a,l]=Ox(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=$o(n.current);i.current=a==="mounted"?u:"none"},[a]),tn(()=>{const u=n.current,d=s.current;if(d!==e){const f=i.current,h=$o(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),tn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=h=>{const g=$o(n.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=h=>{h.target===t&&(i.current=$o(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function $o(e){return(e==null?void 0:e.animationName)||"none"}function Ix(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Lx=nm[" useInsertionEffect ".trim().toString()]||tn;function vv({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=$x({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${n} is changing from ${c?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const u=x.useCallback(d=>{var c;if(a){const f=Dx(d)?d(e):d;f!==e&&((c=o.current)==null||c.call(o,f))}else i(d)},[a,e,i,o]);return[l,u]}function $x({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),s=x.useRef(r),i=x.useRef(t);return Lx(()=>{i.current=t},[t]),x.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function Dx(e){return typeof e=="function"}var Mx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ux="VisuallyHidden",fl=x.forwardRef((e,t)=>w.jsx(ke.span,{...e,ref:t,style:{...Mx,...e.style}}));fl.displayName=Ux;var Fx=fl,zd="ToastProvider",[Hd,Bx,zx]=dv("Toast"),[yv,ZR]=co("Toast",[zx]),[Hx,pl]=yv(zd),wv=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=x.useState(null),[u,d]=x.useState(0),c=x.useRef(!1),f=x.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${zd}\`. Expected non-empty \`string\`.`),w.jsx(Hd.Provider,{scope:t,children:w.jsx(Hx,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>d(h=>h+1),[]),onToastRemove:x.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:f,children:o})})};
40wv.displayName=zd;var bv="ToastViewport",Vx=["F8"],fc="toast.viewportPause",pc="toast.viewportResume",xv=x.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Vx,label:s="Notifications ({hotkey})",...i}=e,o=pl(bv,r),a=Bx(r),l=x.useRef(null),u=x.useRef(null),d=x.useRef(null),c=x.useRef(null),f=Le(t,c,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;x.useEffect(()=>{const b=m=>{var v;n.length!==0&&n.every(_=>m[_]||m.code===_)&&((v=c.current)==null||v.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),x.useEffect(()=>{const b=l.current,m=c.current;if(y&&b&&m){const p=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(fc);m.dispatchEvent(k),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(pc);m.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!b.contains(k.relatedTarget)&&v()},S=()=>{b.contains(document.activeElement)||v()};return b.addEventListener("focusin",p),b.addEventListener("focusout",_),b.addEventListener("pointermove",p),b.addEventListener("pointerleave",S),window.addEventListener("blur",p),window.addEventListener("focus",v),()=>{b.removeEventListener("focusin",p),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",p),b.removeEventListener("pointerleave",S),window.removeEventListener("blur",p),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const g=x.useCallback(({tabbingDirection:b})=>{const p=a().map(v=>{const _=v.ref.current,S=[_,...n_(_)];return b==="forwards"?S:S.reverse()});return(b==="forwards"?p.reverse():p).flat()},[a]);return x.useEffect(()=>{const b=c.current;if(b){const m=p=>{var S,k,E;const v=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!v){const P=document.activeElement,N=p.shiftKey;if(p.target===b&&N){(S=u.current)==null||S.focus();return}const $=g({tabbingDirection:N?"backwards":"forwards"}),W=$.findIndex(I=>I===P);cu($.slice(W+1))?p.preventDefault():N?(k=u.current)==null||k.focus():(E=d.current)==null||E.focus()}};return b.addEventListener("keydown",m),()=>b.removeEventListener("keydown",m)}},[a,g]),w.jsxs(Ax,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&w.jsx(mc,{ref:u,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"forwards"});cu(b)}}),w.jsx(Hd.Slot,{scope:r,children:w.jsx(ke.ol,{tabIndex:-1,...i,ref:f})}),y&&w.jsx(mc,{ref:d,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"backwards"});cu(b)}})]})});xv.displayName=bv;var _v="ToastFocusProxy",mc=x.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=pl(_v,r);return w.jsx(fl,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});mc.displayName=_v;var ho="Toast",Wx="toast.swipeStart",Kx="toast.swipeMove",qx="toast.swipeCancel",Gx="toast.swipeEnd",Sv=x.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=vv({prop:n,defaultProp:s??!0,onChange:i,caller:ho});return w.jsx(Bd,{present:r||a,children:w.jsx(Yx,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:en(e.onPause),onResume:en(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),l(!1)})})})});Sv.displayName=ho;var[Jx,Qx]=yv(ho,{onClose(){}}),Yx=x.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:f,onSwipeEnd:h,...y}=e,g=pl(ho,r),[b,m]=x.useState(null),p=Le(t,I=>m(I)),v=x.useRef(null),_=x.useRef(null),S=s||g.duration,k=x.useRef(0),E=x.useRef(S),P=x.useRef(0),{onToastAdd:N,onToastRemove:j}=g,F=en(()=>{var Q;(b==null?void 0:b.contains(document.activeElement))&&((Q=g.viewport)==null||Q.focus()),o()}),$=x.useCallback(I=>{!I||I===1/0||(window.clearTimeout(P.current),k.current=new Date().getTime(),P.current=window.setTimeout(F,I))},[F]);x.useEffect(()=>{const I=g.viewport;if(I){const Q=()=>{$(E.current),u==null||u()},z=()=>{const V=new Date().getTime()-k.current;E.current=E.current-V,window.clearTimeout(P.current),l==null||l()};return I.addEventListener(fc,z),I.addEventListener(pc,Q),()=>{I.removeEventListener(fc,z),I.removeEventListener(pc,Q)}}},[g.viewport,S,l,u,$]),x.useEffect(()=>{i&&!g.isClosePausedRef.current&&$(S)},[i,S,g.isClosePausedRef,$]),x.useEffect(()=>(N(),()=>j()),[N,j]);const W=x.useMemo(()=>b?Av(b):null,[b]);return g.viewport?w.jsxs(w.Fragment,{children:[W&&w.jsx(Xx,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),w.jsx(Jx,{scope:r,onClose:F,children:uo.createPortal(w.jsx(Hd.ItemSlot,{scope:r,children:w.jsx(Px,{asChild:!0,onEscapeKeyDown:ue(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||F(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ke.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:ue(e.onPointerDown,I=>{I.button===0&&(v.current={x:I.clientX,y:I.clientY})}),onPointerMove:ue(e.onPointerMove,I=>{if(!v.current)return;const Q=I.clientX-v.current.x,z=I.clientY-v.current.y,V=!!_.current,T=["left","right"].includes(g.swipeDirection),R=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=T?R(0,Q):0,G=T?0:R(0,z),B=I.pointerType==="touch"?10:2,Y={x:D,y:G},Z={originalEvent:I,delta:Y};V?(_.current=Y,Do(Kx,c,Z,{discrete:!1})):Cf(Y,g.swipeDirection,B)?(_.current=Y,Do(Wx,d,Z,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(Q)>B||Math.abs(z)>B)&&(v.current=null)}),onPointerUp:ue(e.onPointerUp,I=>{const Q=_.current,z=I.target;if(z.hasPointerCapture(I.pointerId)&&z.releasePointerCapture(I.pointerId),_.current=null,v.current=null,Q){const V=I.currentTarget,T={originalEvent:I,delta:Q};Cf(Q,g.swipeDirection,g.swipeThreshold)?Do(Gx,h,T,{discrete:!0}):Do(qx,f,T,{discrete:!0}),V.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),Xx=e=>{const{__scopeToast:t,children:r,...n}=e,s=pl(ho,t),[i,o]=x.useState(!1),[a,l]=x.useState(!1);return t_(()=>o(!0)),x.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(gv,{asChild:!0,children:w.jsx(fl,{...n,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",r]})})})},Zx="ToastTitle",kv=x.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return w.jsx(ke.div,{...n,ref:t})});kv.displayName=Zx;var e_="ToastDescription",Ev=x.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return w.jsx(ke.div,{...n,ref:t})});Ev.displayName=e_;var Tv="ToastAction",Cv=x.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?w.jsx(Pv,{altText:r,asChild:!0,children:w.jsx(Vd,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Tv}\`. Expected non-empty \`string\`.`),null)});Cv.displayName=Tv;var Rv="ToastClose",Vd=x.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=Qx(Rv,r);return w.jsx(Pv,{asChild:!0,children:w.jsx(ke.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,s.onClose)})})});Vd.displayName=Rv;var Pv=x.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return w.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function Av(e){const t=[];
vendor: 9,681 bytes, lines 40-140
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),r_(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Av(n))}}),t}function Do(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?hv(s,i):s.dispatchEvent(i)}var Cf=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function t_(e=()=>{}){const t=en(e);tn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function r_(e){return e.nodeType===e.ELEMENT_NODE}function n_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function cu(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var s_=wv,Nv=xv,Ov=Sv,jv=kv,Iv=Ev,Lv=Cv,$v=Vd;function Dv(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=Dv(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Mv(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Dv(e))&&(n&&(n+=" "),n+=t);return n}const Rf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pf=Mv,ml=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Pf(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 f=Rf(d)||Rf(c);return s[u][f]}),a=r&&Object.entries(r).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:c,className:f,...h}=d;return Object.entries(h).every(y=>{let[g,b]=y;return Array.isArray(b)?b.includes({...i,...a}[g]):{...i,...a}[g]===b})?[...u,c,f]:u},[]);return Pf(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const i_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uv=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var o_={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"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const a_=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>x.createElement("svg",{ref:l,...o_,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Uv("lucide",s),...a},[...o.map(([u,d])=>x.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const He=(e,t)=>{const r=x.forwardRef(({className:n,...s},i)=>x.createElement(a_,{ref:i,iconNode:t,className:Uv(`lucide-${i_(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const gc=He("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const l_=He("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"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const u_=He("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const c_=He("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const d_=He("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const h_=He("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const Af=He("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const du=He("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"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const f_=He("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const p_=He("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const m_=He("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const g_=He("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"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const v_=He("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const Fv=He("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"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const y_=He("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const w_=He("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 7,479 bytes, line 140
140],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Wd="-",b_=e=>{const t=__(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(Wd);return a[0]===""&&a.length!==1&&a.shift(),Bv(a,t)||x_(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},Bv=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Bv(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Wd);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Nf=/^\[(.+)\]$/,x_=e=>{if(Nf.test(e)){const t=Nf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},__=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return k_(Object.entries(e.classGroups),r).forEach(([i,o])=>{vc(o,n,i,t)}),n},vc=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Of(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(S_(s)){vc(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{vc(o,Of(t,i),r,n)})})},Of=(e,t)=>{let r=e;return t.split(Wd).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},S_=e=>e.isThemeGetter,k_=(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,E_=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)}}},zv="!",T_=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 b=0;b<a.length;b++){let m=a[b];if(u===0){if(m===s&&(n||a.slice(b,b+i)===t)){l.push(a.slice(d,b)),d=b+i;continue}if(m==="/"){c=b;continue}}m==="["?u++:m==="]"&&u--}const f=l.length===0?a:a.substring(d),h=f.startsWith(zv),y=h?f.substring(1):f,g=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return r?a=>r({className:a,parseClassName:o}):o},C_=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},R_=e=>({cache:E_(e.cacheSize),parseClassName:T_(e),...b_(e)}),P_=/\s+/,A_=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(P_);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let y=!!h,g=n(y?f.substring(0,h):f);if(!g){if(!y){a=u+(a.length>0?" "+a:a);continue}if(g=n(f),!g){a=u+(a.length>0?" "+a:a);continue}y=!1}const b=C_(d).join(":"),m=c?b+zv:b,p=m+g;if(i.includes(p))continue;i.push(p);const v=s(g,y);for(let _=0;_<v.length;++_){const S=v[_];i.push(m+S)}a=u+(a.length>0?" "+a:a)}return a};function N_(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Hv(t))&&(n&&(n+=" "),n+=r);return n}const Hv=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Hv(e[n]))&&(r&&(r+=" "),r+=t);return r};function O_(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((d,c)=>c(d),e());return r=R_(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=A_(l,r);return s(l,d),d}return function(){return i(N_.apply(null,arguments))}}const ae=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Vv=/^\[(?:([a-z-]+):)?(.+)\]$/i,j_=/^\d+\/\d+$/,I_=new Set(["px","full","screen"]),L_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$_=/\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$/,D_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,M_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,er=e=>ws(e)||I_.has(e)||j_.test(e),Tr=e=>Vs(e,"length",q_),ws=e=>!!e&&!Number.isNaN(Number(e)),hu=e=>Vs(e,"number",ws),ii=e=>!!e&&Number.isInteger(Number(e)),F_=e=>e.endsWith("%")&&ws(e.slice(0,-1)),J=e=>Vv.test(e),Cr=e=>L_.test(e),B_=new Set(["length","size","percentage"]),z_=e=>Vs(e,B_,Wv),H_=e=>Vs(e,"position",Wv),V_=new Set(["image","url"]),W_=e=>Vs(e,V_,J_),K_=e=>Vs(e,"",G_),oi=()=>!0,Vs=(e,t,r)=>{const n=Vv.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},q_=e=>$_.test(e)&&!D_.test(e),Wv=()=>!1,G_=e=>M_.test(e),J_=e=>U_.test(e),Q_=()=>{const e=ae("colors"),t=ae("spacing"),r=ae("blur"),n=ae("brightness"),s=ae("borderColor"),i=ae("borderRadius"),o=ae("borderSpacing"),a=ae("borderWidth"),l=ae("contrast"),u=ae("grayscale"),d=ae("hueRotate"),c=ae("invert"),f=ae("gap"),h=ae("gradientColorStops"),y=ae("gradientColorStopPositions"),g=ae("inset"),b=ae("margin"),m=ae("opacity"),p=ae("padding"),v=ae("saturate"),_=ae("scale"),S=ae("sepia"),k=ae("skew"),E=ae("space"),P=ae("translate"),N=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",J,t],$=()=>[J,t],W=()=>["",er,Tr],I=()=>["auto",ws,J],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",J],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[ws,J];return{cacheSize:500,separator:":",theme:{colors:[oi],spacing:[er,Tr],blur:["none","",Cr,J],brightness:G(),borderColor:[e],borderRadius:["none","","full",Cr,J],borderSpacing:$(),borderWidth:W(),contrast:G(),grayscale:R(),hueRotate:G(),invert:R(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[F_,Tr],inset:F(),margin:F(),opacity:G(),padding:$(),saturate:G(),scale:G(),sepia:R(),skew:G(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[Cr]}],"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:[...Q(),J]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}
vendor: 9,916 bytes, line 140
140],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ii,J]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",ii,J]}],"grid-cols":[{"grid-cols":[oi]}],"col-start-end":[{col:["auto",{span:["full",ii,J]},J]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[oi]}],"row-start-end":[{row:["auto",{span:[ii,J]},J]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[Cr]},Cr]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Cr,Tr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hu]}],"font-family":[{font:[oi]}],"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",J]}],"line-clamp":[{"line-clamp":["none",ws,hu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",er,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",er,Tr]}],"underline-offset":[{"underline-offset":["auto",er,J]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],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",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),H_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",z_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},W_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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":[m]}],"border-style":[{border:[...z(),"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":[m]}],"divide-style":[{divide:z()}],"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:["",...z()]}],"outline-offset":[{"outline-offset":[er,J]}],"outline-w":[{outline:[er,Tr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[er,Tr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cr,K_]}],"shadow-color":[{shadow:[oi]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Cr,J]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"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":[m]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",J]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ii,J]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],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",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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: 4,646 bytes, line 140
140],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",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[er,Tr,hu]}],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"]}}},Y_=O_(Q_);function he(...e){return Y_(Mv(e))}const X_=s_,Kv=x.forwardRef(({className:e,...t},r)=>w.jsx(Nv,{ref:r,className:he("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Kv.displayName=Nv.displayName;const Z_=ml("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),qv=x.forwardRef(({className:e,variant:t,...r},n)=>w.jsx(Ov,{ref:n,className:he(Z_({variant:t}),e),...r}));qv.displayName=Ov.displayName;const eS=x.forwardRef(({className:e,...t},r)=>w.jsx(Lv,{ref:r,className:he("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));eS.displayName=Lv.displayName;const Gv=x.forwardRef(({className:e,...t},r)=>w.jsx($v,{ref:r,className:he("absolute right-2 top-2 rounded-md p-1 text-foreground
140/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:w.jsx(w_,{className:"h-4 w-4"})}));Gv.displayName=$v.displayName;const Jv=x.forwardRef(({className:e,...t},r)=>w.jsx(jv,{ref:r,className:he("text-sm font-semibold",e),...t}));Jv.displayName=jv.displayName;const Qv=x.forwardRef(({className:e,...t},r)=>w.jsx(Iv,{ref:r,className:he("text-sm opacity-90",e),...t}));Qv.displayName=Iv.displayName;function tS(){const{toasts:e}=lv();return w.jsxs(X_,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return w.jsxs(qv,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[r&&w.jsx(Jv,{children:r}),n&&w.jsx(Qv,{children:n})]}),s,w.jsx(Gv,{})]},t)}),w.jsx(Kv,{})]})}var jf=["light","dark"],rS="(prefers-color-scheme: dark)",nS=x.createContext(void 0),sS={setTheme:e=>{},themes:[]},iS=()=>{var e;return(e=x.useContext(nS))!=null?e:sS};x.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,c=s?jf.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,g=!1,b=!0)=>{let m=o?o[y]:y,p=g?y+"|| ''":`'${m}'`,v="";return s&&b&&!g&&jf.includes(y)&&(v+=`d.style.colorScheme = '${y}';`),r==="class"?g||m?v+=`c.add(${p})`:v+="null":m&&(v+=`d[s](n,${p})`),v},h=e?`!function(){${d}${f(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${rS}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${c}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${c}}catch(t){}}();`;return x.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var oS=e=>{switch(e){case"success":return uS;case"info":return dS;case"warning":return cS;case"error":return hS;default:return null}},aS=Array(12).fill(0),lS=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},aS.map((r,n)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),uS=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),cS=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.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"})),dS=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),hS=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),fS=O.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"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pS=()=>{let[e,t]=O.useState(document.hidden);return O.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},yc=1,mS=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 140
140{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:yc++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
140this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],O.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(vS(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||yc++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ye=new mS,gS=(e,t)=>{let r=(t==null?void 0:t.id)||yc++;return Ye.addToast({title:e,...t,id:r}),r},vS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yS=gS,wS=()=>Ye.toasts,bS=()=>Ye.getActiveToasts();Object.assign(yS,{success:Ye.success,info:Ye.info,warning:Ye.warning,error:Ye.error,custom:Ye.custom,message:Ye.message,promise:Ye.promise,dismiss:Ye.dismiss,loading:Ye.loading},{getHistory:wS,getToasts:bS});function xS(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}xS(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
140left: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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
140:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
140--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
141`);function Mo(e){return e.label!==void 0}var _S=3,SS="32px",kS="16px",If=4e3,ES=356,TS=14,CS=20,RS=200;function Tt(...e){return e.filter(Boolean).join(" ")}function PS(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var AS=e=>{var t,r,n,s,i,o,a,l,u,d,c;let{invert:f,toast:h,unstyled:y,interacting:g,setHeights:b,visibleToasts:m,heights:p,index:v,toasts:_,expanded:S,removeToast:k,defaultRichColors:E,closeButton:P,style:N,cancelButtonStyle:j,actionButtonStyle:F,className:$="",descriptionClassName:W="",duration:I,position:Q,gap:z,loadingIcon:V,expandByDefault:T,classNames:R,icons:D,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:B}=e,[Y,Z]=O.useState(null),[xe,$e]=O.useState(null),[re,Mn]=O.useState(!1),[wr,cn]=O.useState(!1),[br,Un]=O.useState(!1),[xr,mo]=O.useState(!1),[Nl,go]=O.useState(!1),[Ol,Js]=O.useState(0),[Fn,oh]=O.useState(0),Qs=O.useRef(h.duration||I||If),ah=O.useRef(null),dn=O.useRef(null),R0=v===0,P0=v+1<=m,ft=h.type,Bn=h.dism
141issible!==!1,A0=h.className||"",N0=h.descriptionClassName||"",vo=O.useMemo(()=>p.findIndex(K=>K.toastId===h.id)||0,[p,h.id]),O0=O.useMemo(()=>{var K;return(K=h.closeButton)!=null?K:P},[h.closeButton,P]),lh=O.useMemo(()=>h.duration||I||If,[h.duration,I]),jl=O.useRef(0),zn=O.useRef(0),uh=O.useRef(0),Hn=O.useRef(null),[j0,I0]=Q.split("-"),ch=O.useMemo(()=>p.reduce((K,se,de)=>de>=vo?K:K+se.height,0),[p,vo]),dh=pS(),L0=h.invert||f,Il=ft==="loading";zn.current=O.useMemo(()=>vo*z+ch,[vo,ch]),O.useEffect(()=>{Qs.current=lh},[lh]),O.useEffect(()=>{Mn(!0)},[]),O.useEffect(()=>{let K=dn.current;if(K){let se=K.getBoundingClientRect().height;return oh(se),b(de=>[{toastId:h.id,height:se,position:h.position},...de]),()=>b(de=>de.filter(_t=>_t.toastId!==h.id))}},[b,h.id]),O.useLayoutEffect(()=>{if(!re)return;let K=dn.current,se=K.style.height;K.style.height="auto";let de=K.getBoundingClientRect().height;K.style.height=se,oh(de),b(_t=>_t.find(St=>St.toastId===h.id)?_t.map(St=>St.toastId===h.id?{...St,height:de}:St):[{toastId:h.id,height:de,position:h.position},..._t])},[re,h.title,h.description,b,h.id]);let _r=O.useCallback(()=>{cn(!0),Js(zn.current),b(K=>K.filter(se=>se.toastId!==h.id)),setTimeout(()=>{k(h)},RS)},[h,k,b,zn]);O.useEffect(()=>{if(h.promise&&ft==="loading"||h.duration===1/0||h.type==="loading")return;let K;return S||g||B&&dh?(()=>{if(uh.current<jl.current){let se=new Date().getTime()-jl.current;Qs.current=Qs.current-se}uh.current=new Date().getTime()})():Qs.current!==1/0&&(jl.current=new Date().getTime(),K=setTimeout(()=>{var se;(se=h.onAutoClose)==null||se.call(h,h),_r()},Qs.current)),()=>clearTimeout(K)},[S,g,h,ft,B,dh,_r]),O.useEffect(()=>{h.delete&&_r()},[_r,h.delete]);function $0(){var K,se,de;return D!=null&&D.loading?O.createElement("div",{className:Tt(R==null?void 0:R.loader,(K=h==null?void 0:h.classNames)==null?void 0:K.loader,"sonner-loader"),"data-visible":ft==="loading"},D.loading):V?O.createElement("div",{className:Tt(R==null?void 0:R.loader,(se=h==null?void 0:h.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":ft==="loading"},V):O.createElement(lS,{className:Tt(R==null?void 0:R.loader,(de=h==null?void 0:h.classNames)==null?void 0:de.loader),visible:ft==="loading"})}return O.createElement("li",{tabIndex:0,ref:dn,className:Tt($,A0,R==null?void 0:R.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[ft],(r=h==null?void 0:h.classNames)==null?void 0:r[ft]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:E,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":re,"data-
141promise":!!h.promise,"data-swiped":Nl,"data-removed":wr,"data-visible":P0,"data-y-position":j0,"data-x-position":I0,"data-index":v,"data-front":R0,"data-swiping":br,"data-dismissible":Bn,"data-type":ft,"data-invert":L0,"data-swipe-out":xr,"data-swipe-direction":xe,"data-expanded":!!(S||T&&re),style:{"--index":v,"--toasts-before":v,"--z-index":_.length-v,"--offset":`${wr?Ol:zn.current}px`,"--initial-height":T?"auto":`${Fn}px`,...N,...h.style},onDragEnd:()=>{Un(!1),Z(null),Hn.current=null},onPointerDown:K=>{Il||!Bn||(ah.current=new Date,Js(zn.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(Un(!0),Hn.current={x:K.clientX,y:K.clientY}))},onPointerUp:()=>{var K,se,de,_t;if(xr||!Bn)return;Hn.current=null;let St=Number(((K=dn.current)==null?void 0:K.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Sr=Number(((se=dn.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),hn=new Date().getTime()-((de=ah.current)==null?void 0:de.getTime()),kt=Y==="x"?St:Sr,kr=Math.abs(kt)/hn;if(Math.abs(kt)>=CS||kr>.11){Js(zn.current),(_t=h.onDismiss)==null||_t.call(h,h),$e(Y==="x"?St>0?"right":"left":Sr>0?"down":"up"),_r(),mo(!0),go(!1);return}Un(!1),Z(null)},onPointerMove:K=>{var se,de,_t,St;if(!Hn.current||!Bn||((se=window.getSelection())==null?void 0:se.toString().length)>0)return;let Sr=K.clientY-Hn.current.y,hn=K.clientX-Hn.current.x,kt=(de=e.swipeDirections)!=null?de:PS(Q);!Y&&(Math.abs(hn)>1||Math.abs(Sr)>1)&&Z(Math.abs(hn)>Math.abs(Sr)?"x":"y");let kr={x:0,y:0};Y==="y"?(kt.includes("top")||kt.includes("bottom"))&&(kt.includes("top")&&Sr<0||kt.includes("bottom")&&Sr>0)&&(kr.y=Sr):Y==="x"&&(kt.includes("left")||kt.includes("right"))&&(kt.includes("left")&&hn<0||kt.includes("right")&&hn>0)&&(kr.x=hn),(Math.abs(kr.x)>0||Math.abs(kr.y)>0)&&go(!0),(_t=dn.current)==null||_t.style.setProperty("--swipe-amount-x",`${kr.x}px`),(St=dn.current)==null||St.style.setProperty("--swipe-amount-y",`${kr.y}px`)}},O0&&!h.jsx?O.createElement("button",{"aria-label":G,"data-disabled":Il,"data-close-button":!0,onClick:Il||!Bn?()=>{}:()=>{var K;_r(),(K=h.onDismiss)==null||K.call(h,h)},className:Tt(R==null?void 0:R.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=D==null?void 0:D.close)!=null?i:fS):null,h.jsx||x.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:O.createElement(O.Fragment,null,ft||h.icon||h.promise?O.createElement("div",{"data-icon":"",className:Tt(R==null?void 0:R.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||$0():null,h.type!=="loading"?h.icon||(D==null?void 0:D[ft])||oS(ft):null):null,O.createElement("div",{"data-content":"",className:Tt(R==null?void 0:R.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},O.createElement("div",{"data-title":"",className:Tt(R==null?void 0:R.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?O.createElement("div",{"data-description":"",className:Tt(W,N0,R==null?void 0:R.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),x.isValidElement(h.cancel)?h.cancel:h.cancel&&Mo(h.c
vendor: 5,943 bytes, line 141
141ancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||j,onClick:K=>{var se,de;Mo(h.cancel)&&Bn&&((de=(se=h.cancel).onClick)==null||de.call(se,K),_r())},className:Tt(R==null?void 0:R.cancelButton,(d=h==null?void 0:h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,x.isValidElement(h.action)?h.action:h.action&&Mo(h.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||F,onClick:K=>{var se,de;Mo(h.action)&&((de=(se=h.action).onClick)==null||de.call(se,K),!K.defaultPrevented&&_r())},className:Tt(R==null?void 0:R.actionButton,(c=h==null?void 0:h.classNames)==null?void 0:c.actionButton)},h.action.label):null))};function Lf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function NS(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?kS:SS;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}var OS=x.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:c,duration:f,style:h,visibleToasts:y=_S,toastOptions:g,dir:b=Lf(),gap:m=TS,loadingIcon:p,icons:v,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[k,E]=O.useState([]),P=O.useMemo(()=>Array.from(new Set([n].concat(k.filter(B=>B.position).map(B=>B.position)))),[k,n]),[N,j]=O.useState([]),[F,$]=O.useState(!1),[W,I]=O.useState(!1),[Q,z]=O.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=O.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=O.useRef(null),D=O.useRef(!1),G=O.useCallback(B=>{E(Y=>{var Z;return(Z=Y.find(xe=>xe.id===B.id))!=null&&Z.delete||Ye.dismiss(B.id),Y.filter(({id:xe})=>xe!==B.id)})},[]);return O.useEffect(()=>Ye.subscribe(B=>{if(B.dismiss){E(Y=>Y.map(Z=>Z.id===B.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{ov.flushSync(()=>{E(Y=>{let Z=Y.findIndex(xe=>xe.id===B.id);return Z!==-1?[...Y.slice(0,Z),{...Y[Z],...B},...Y.slice(Z+1)]:[B,...Y]})})})}),[]),O.useEffect(()=>{if(d!=="system"){z(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:Y})=>{z(Y?"dark":"light")})}catch{B.addListener(({matches:Z})=>{try{z(Z?"dark":"light")}catch(xe){console.error(xe)}})}},[d]),O.useEffect(()=>{k.length<=1&&$(!1)},[k]),O.useEffect(()=>{let B=Y=>{var Z,xe;s.every($e=>Y[$e]||Y.code===$e)&&($(!0),(Z=V.current)==null||Z.focus()),Y.code==="Escape"&&(document.activeElement===V.current||(xe=V.current)!=null&&xe.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),O.useEffect(()=>{if(V.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,D.current=!1)}},[V.current]),O.createElement("section",{ref:t,"aria-label":`${_} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((B,Y)=>{var Z;let[xe,$e]=B.split("-");return k.length?O.createElement("ol",{key:B,dir:b==="auto"?Lf():b,tabIndex:-1,ref:V,className:a,"data-sonner-toaster":!0,"data-theme":Q,"data-y-position":xe,"data-lifted":F&&k.length>1&&!i,"data-x-position":$e,style:{"--front-toast-height":`${((Z=N[0])==null?void 0:Z.height)||0}px`,"--width":`${ES}px`,"--gap":`${m}px`,...h,...NS(l,u)},onBlur:re=>{D.current&&!re.currentTarget.contains(re.relatedTarget)&&(D.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||D.current||(D.current=!0,R.current=re.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{W||$(!1)},onDragEnd:()=>$(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},k.filter(re=>!re.position&&Y===0||re.position===B).map((re,Mn)=>{var wr,cn;return O.createElement(AS,{key:re.id,icons:v,index:Mn,toast:re,defaultRichColors:c,duration:(wr=g==null?void 0:g.duration)!=null?wr:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:y,closeButton:(cn=g==null?void 0:g.closeButton)!=null?cn:o,interacting:W,position:B,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:G,toasts:k.filter(br=>br.position==re.position),heights:N.filter(br=>br.position==re.position),setHeights:j,expandByDefault:i,gap:m,loadingIcon:p,expanded:F,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const jS=({...e})=>{const{theme:t="system"}=iS();return w.jsx(OS,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},IS=["top","right","bottom","left"],rn=Math.min,it=Math.max,Ma=Math.round,Uo=Math.floor,nn=e=>({x:e,y:e}
vendor: 11,656 bytes, line 141
141),LS={left:"right",right:"left",bottom:"top",top:"bottom"},$S={start:"end",end:"start"};function wc(e,t,r){return it(e,rn(t,r))}function mr(e,t){return typeof e=="function"?e(t):e}function gr(e){return e.split("-")[0]}function Ws(e){return e.split("-")[1]}function Kd(e){return e==="x"?"y":"x"}function qd(e){return e==="y"?"height":"width"}function sn(e){return["top","bottom"].includes(gr(e))?"y":"x"}function Gd(e){return Kd(sn(e))}function DS(e,t,r){r===void 0&&(r=!1);const n=Ws(e),s=Gd(e),i=qd(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ua(o)),[o,Ua(o)]}function MS(e){const t=Ua(e);return[bc(e),t,bc(t)]}function bc(e){return e.replace(/start|end/g,t=>$S[t])}function US(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function FS(e,t,r,n){const s=Ws(e);let i=US(gr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(bc)))),i}function Ua(e){return e.replace(/left|right|bottom|top/g,t=>LS[t])}function BS(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yv(e){return typeof e!="number"?BS(e):{top:e,right:e,bottom:e,left:e}}function Fa(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 $f(e,t,r){let{reference:n,floating:s}=e;const i=sn(t),o=Gd(t),a=qd(o),l=gr(t),u=i==="y",d=n.x+n.width/2-s.width/2,c=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-s.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:c};break;case"left":h={x:n.x-s.width,y:c};break;default:h={x:n.x,y:n.y}}switch(Ws(t)){case"start":h[o]-=f*(r&&u?-1:1);break;case"end":h[o]+=f*(r&&u?-1:1);break}return h}const zS=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),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}=$f(u,n,l),f=n,h={},y=0;for(let g=0;g<a.length;g++){const{name:b,fn:m}=a[g],{x:p,y:v,data:_,reset:S}=await m({x:d,y:c,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});d=p??d,c=v??c,h={...h,[b]:{...h[b],..._}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:c}=$f(u,f,l)),g=-1)}return{x:d,y:c,placement:f,strategy:s,middlewareData:h}};async function Wi(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:f=!1,padding:h=0}=mr(t,e),y=Yv(h),b=a[f?c==="floating"?"reference":"floating":c],m=Fa(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),p=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)),_=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},S=Fa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:v,strategy:l}):p);return{top:(m.top-S.top+y.top)/_.y,bottom:(S.bottom-m.bottom+y.bottom)/_.y,left:(m.left-S.left+y.left)/_.x,right:(S.right-m.right+y.right)/_.x}}const HS=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}=mr(e,t)||{};if(u==null)return{};const c=Yv(d),f={x:r,y:n},h=Gd(s),y=qd(h),g=await o.getDimensions(u),b=h==="y",m=b?"top":"left",p=b?"bottom":"right",v=b?"clientHeight":"clientWidth",_=i.reference[y]+i.reference[h]-f[h]-i.floating[y],S=f[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=k?k[v]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=a.floating[v]||i.floating[y]);const P=_/2-S/2,N=E/2-g[y]/2-1,j=rn(c[m],N),F=rn(c[p],N),$=j,W=E-g[y]-F,I=E/2-g[y]/2+P,Q=wc($,I,W),z=!l.arrow&&Ws(s)!=null&&I!==Q&&i.reference[y]/2-(I<$?j:F)-g[y]/2<0,V=z?I<$?I-$:I-W:0;return{[h]:f[h]+V,data:{[h]:Q,centerOffset:I-Q-V,...z&&{alignmentOffset:V}},reset:z}}}),VS=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:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...b}=mr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const m=gr(s),p=sn(a),v=gr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(v||!g?[Ua(a)]:MS(a)),k=y!=="none";!f&&k&&S.push(...FS(a,g,y,_));const E=[a,...S],P=await Wi(t,b),N=[];let j=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&N.push(P[m]),c){const I=DS(s,o,_);N.push(P[I[0]],P[I[1]])}if(j=[...j,{placement:s,overflows:N}],!N.every(I=>I<=0)){var F,$;const I=(((F=i.flip)==null?void 0:F.index)||0)+1,Q=E[I];if(Q)return{data:{index:I,overflows:j},reset:{placement:Q}};let z=($=j.filter(V=>V.overflows[0]<=0).sort((V,T)=>V.overflows[1]-T.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(h){case"bestFit":{var W;const V=(W=j.filter(T=>{if(k){const R=sn(T.placement);return R===p||R==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,D)=>R+D,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:W[0];V&&(z=V);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function Df(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mf(e){return IS.some(t=>e[t]>=0)}const WS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=mr(e,t);switch(n){case"referenceHidden":{const i=await Wi(t,{...s,elementContext:"reference"}),o=Df(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Mf(o)}}}case"escaped":{const i=await Wi(t,{...s,altBoundary:!0}),o=Df(i,r.floating);return{data:{escapedOffsets:o,escaped:Mf(o)}}}default:return{}}}}};async function KS(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=gr(r),a=Ws(r),l=sn(r)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,c=mr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),l?{x:h*d,y:f*u}:{x:f*u,y:h*d}}const qS=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 KS(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}}}}},GS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:m,y:p}=b;return{x:m,y:p}}},...l}=mr(e,t),u={x:r,y:n},d=await Wi(t,l),c=sn(gr(s)),f=Kd(c);let h=u[f],y=u[c];if(i){const b=f==="y"?"top":"left",m=f==="y"?"bottom":"right",p=h+d[b],v=h-d[m];h=wc(p,h,v)}if(o){const b=c==="y"?"top":"left",m=c==="y"?"bottom":"right",p=y+d[b],v=y-d[m];y=wc(p,y,v)}const g=a.fn({...t,[f]:h,[c]:y});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:i,[c]:o}}}}}},JS=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}=mr(e,t),d={x:r,y:n},c=sn(s),f=Kd(c);let h=d[f],y=d[c];const g=mr(a,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const v=f==="y"?"height":"width",_=i.reference[f]-i.floating[v]+b.mainAxis,S=i.reference[f]+i.reference[v]-b.mainAxis;h<_?h=_:h>S&&(h=S)}if(u){var m,p;const v=f==="y"?"width":"height",_=["top","left"].includes(gr(s)),S=i.reference[c]-i.floating[v]+(_&&((m=o.offset)==null?void 0:m[c])||0)+(_?0:b.crossAxis),k=i.reference[c]+i.reference[v]+(_?0:((p=o.offset)==null?void 0:p[c])||0)-(_?b.crossAxis:0);y<S?y=S:y>k&&(y=k)}return{[f]:h,[c]:y}}}},QS=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}=mr(e,t),d=await Wi(t,u),c=gr(s),f=Ws(s),h=sn(s)==="y",{width:y,height:g}=i.floating;let b,m;c==="top"||c==="bottom"?(b=c,m=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=c,b=f==="end"?"top":"bottom");const p=g-d.top-d.bottom,v=y-d.left-d.right,_=rn(g-d[b],p),S=rn(y-d[m],v),k=!t.middlewareData.shift;let E=_,P=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=p),k&&!f){const j=it(d.left,0),F=it(d.right,0),$=it(d.top,0),W=it(d.bottom,0);h?P=y-2*(j!==0||F!==0?j+F:it(d.left,d.right)):E=g-2*($!==0||W!==0?$+W:it(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:E});const N=await o.getDimensions(a.floating);return y!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function gl(){return typeof window<"u"}function Ks(e){return Xv(e)?(e.nodeName||"").toLowerCase():"#document"}function ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zt(e){var t;return(t=(Xv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xv(e){return gl()?e instanceof Node||e instanceof ut(e).Node:!1}function Ut(e){return gl()?e instanceof Element||e instanceof ut(e).Element:!1}function Xt(e){return gl()?e instanceof HTMLElement||e instanceof ut(e).HTMLElement:!1}function Uf(e){return!gl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ut(e).ShadowRoot}function fo(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function YS(e){return["table","td","th"].includes(Ks(e))}function vl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Jd(e){const t=Qd(),r=Ut(e)?Ft(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function XS(e){let t=on(e);for(;Xt(t)&&!Us(t);){if(Jd(t))return t;if(vl(t))return null;t=on(t)}return null}function Qd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Us(e){return["html","body","#document"].includes(Ks(e))}function Ft(e){return ut(e).getComputedStyle(e)}function yl(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function on(e){if(Ks(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Uf(e)&&e.host||Zt(e);return Uf(t)?t.host:t}function Zv(e){const t=on(e);return Us(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xt(t)&&fo(t)?t:Zv(t)}function Ki(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Zv(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=ut(s);if(i){const a=xc(o);
vendor: 3,634 bytes, line 141
141return t.concat(o,o.visualViewport||[],fo(s)?s:[],a&&r?Ki(a):[])}return t.concat(s,Ki(s,[],r))}function xc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ey(e){const t=Ft(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Xt(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Ma(r)!==i||Ma(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Yd(e){return Ut(e)?e:e.contextElement}function bs(e){const t=Yd(e);if(!Xt(t))return nn(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=ey(t);let o=(i?Ma(r.width):r.width)/n,a=(i?Ma(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const ZS=nn(0);function ty(e){const t=ut(e);return!Qd()||!t.visualViewport?ZS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function e1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ut(e)?!1:t}function Ln(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Yd(e);let o=nn(1);t&&(n?Ut(n)&&(o=bs(n)):o=bs(e));const a=e1(i,r,n)?ty(i):nn(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 f=ut(i),h=n&&Ut(n)?ut(n):n;let y=f,g=xc(y);for(;g&&n&&h!==y;){const b=bs(g),m=g.getBoundingClientRect(),p=Ft(g),v=m.left+(g.clientLeft+parseFloat(p.paddingLeft))*b.x,_=m.top+(g.clientTop+parseFloat(p.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,c*=b.y,l+=v,u+=_,y=ut(g),g=xc(y)}}return Fa({width:d,height:c,x:l,y:u})}function t1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Zt(n),a=t?vl(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=nn(1);const d=nn(0),c=Xt(n);if((c||!c&&!i)&&((Ks(n)!=="body"||fo(o))&&(l=yl(n)),Xt(n))){const f=Ln(n);u=bs(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function r1(e){return Array.from(e.getClientRects())}function _c(e,t){const r=yl(e).scrollLeft;return t?t.left+r:Ln(Zt(e)).left+r}function n1(e){const t=Zt(e),r=yl(e),n=e.ownerDocument.body,s=it(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=it(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+_c(e);const a=-r.scrollTop;return Ft(n).direction==="rtl"&&(o+=it(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function s1(e,t){const r=ut(e),n=Zt(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Qd();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function i1(e,t){const r=Ln(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Xt(e)?bs(e):nn(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 Ff(e,t,r){let n;if(t==="viewport")n=s1(e,r);else if(t==="document")n=n1(Zt(e));else if(Ut(t))n=i1(t,r);else{const s=ty(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return Fa(n)}function ry(e,t){const r=on(e);return r===t||!Ut(r)||Us(r)?!1:Ft(r).position==="fixed"||ry(r,t)}function o1(e,t){const r=t.get(e);if(r)return r;let n=Ki(e,[],!1).filter(a=>Ut(a)&&Ks(a)!=="body"),s=null;const i=Ft(e).position==="fixed";let o=i?on(e):e;for(;Ut(o)&&!Us(o);){const a=Ft(o),l=Jd(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||fo(o)&&!l&&ry(e,o))?n=n.filter(d=>d!==o):s=a,o=on(o)}return t.set(e,n),n}function a1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?vl(t)?[]:o1(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,d)=>{const c=Ff(t,d,s);
vendor: 4,512 bytes, line 141
141return u.top=it(c.top,u.top),u.right=rn(c.right,u.right),u.bottom=rn(c.bottom,u.bottom),u.left=it(c.left,u.left),u},Ff(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function l1(e){const{width:t,height:r}=ey(e);return{width:t,height:r}}function u1(e,t,r){const n=Xt(t),s=Zt(t),i=r==="fixed",o=Ln(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=nn(0);if(n||!n&&!i)if((Ks(t)!=="body"||fo(s))&&(a=yl(t)),n){const h=Ln(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&(l.x=_c(s));let u=0,d=0;if(s&&!n&&!i){const h=s.getBoundingClientRect();d=h.top+a.scrollTop,u=h.left+a.scrollLeft-_c(s,h)}const c=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-d;return{x:c,y:f,width:o.width,height:o.height}}function fu(e){return Ft(e).position==="static"}function Bf(e,t){if(!Xt(e)||Ft(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Zt(e)===r&&(r=r.ownerDocument.body),r}function ny(e,t){const r=ut(e);if(vl(e))return r;if(!Xt(e)){let s=on(e);for(;s&&!Us(s);){if(Ut(s)&&!fu(s))return s;s=on(s)}return r}let n=Bf(e,t);for(;n&&YS(n)&&fu(n);)n=Bf(n,t);return n&&Us(n)&&fu(n)&&!Jd(n)?r:n||XS(e)||r}const c1=async function(e){const t=this.getOffsetParent||ny,r=this.getDimensions,n=await r(e.floating);return{reference:u1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function d1(e){return Ft(e).direction==="rtl"}const h1={convertOffsetParentRelativeRectToViewportRelativeRect:t1,getDocumentElement:Zt,getClippingRect:a1,getOffsetParent:ny,getElementRects:c1,getClientRects:r1,getDimensions:l1,getScale:bs,isElement:Ut,isRTL:d1};function f1(e,t){let r=null,n;const s=Zt(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{left:u,top:d,width:c,height:f}=e.getBoundingClientRect();if(a||t(),!c||!f)return;const h=Uo(d),y=Uo(s.clientWidth-(u+c)),g=Uo(s.clientHeight-(d+f)),b=Uo(u),p={rootMargin:-h+"px "+-y+"px "+-g+"px "+-b+"px",threshold:it(0,rn(1,l))||1};let v=!0;function _(S){const k=S[0].intersectionRatio;if(k!==l){if(!v)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{r=new IntersectionObserver(_,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,p)}r.observe(e)}return o(!0),i}function p1(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=Yd(e),d=s||i?[...u?Ki(u):[],...Ki(t)]:[];d.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const c=u&&a?f1(u,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(m=>{let[p]=m;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let y,g=l?Ln(e):null;l&&b();function b(){const m=Ln(e);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&r(),g=m,y=requestAnimationFrame(b)}return r(),()=>{var m;d.forEach(p=>{s&&p.removeEventListener("scroll",r),i&&p.removeEventListener("resize",r)}),c==null||c(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const m1=qS,g1=GS,v1=VS,y1=QS,w1=WS,zf=HS,b1=JS,x1=(e,t,r)=>{const n=new Map,s={platform:h1,...r},i={...s.platform,_c:n};return zS(e,t,{...s,platform:i})};var ua=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Ba(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let 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(!Ba(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)&&!Ba(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function sy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hf(e,t){const r=sy(e);return Math.round(t*r)/r}function pu(e){const t=x.useRef(e);return ua(()=>{t.current=e}),t}function _1(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]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=x.useState(n);Ba(f,n)||h(n);
vendor: 2,153 bytes, line 141
141const[y,g]=x.useState(null),[b,m]=x.useState(null),p=x.useCallback(T=>{T!==k.current&&(k.current=T,g(T))},[]),v=x.useCallback(T=>{T!==E.current&&(E.current=T,m(T))},[]),_=i||y,S=o||b,k=x.useRef(null),E=x.useRef(null),P=x.useRef(d),N=l!=null,j=pu(l),F=pu(s),$=pu(u),W=x.useCallback(()=>{if(!k.current||!E.current)return;const T={placement:t,strategy:r,middleware:f};F.current&&(T.platform=F.current),x1(k.current,E.current,T).then(R=>{const D={...R,isPositioned:$.current!==!1};I.current&&!Ba(P.current,D)&&(P.current=D,uo.flushSync(()=>{c(D)}))})},[f,t,r,F,$]);ua(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,c(T=>({...T,isPositioned:!1})))},[u]);const I=x.useRef(!1);ua(()=>(I.current=!0,()=>{I.current=!1}),[]),ua(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(j.current)return j.current(_,S,W);W()}},[_,S,W,j,N]);const Q=x.useMemo(()=>({reference:k,floating:E,setReference:p,setFloating:v}),[p,v]),z=x.useMemo(()=>({reference:_,floating:S}),[_,S]),V=x.useMemo(()=>{const T={position:r,left:0,top:0};if(!z.floating)return T;const R=Hf(z.floating,d.x),D=Hf(z.floating,d.y);return a?{...T,transform:"translate("+R+"px, "+D+"px)",...sy(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:D}},[r,a,z.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:W,refs:Q,elements:z,floatingStyles:V}),[d,W,Q,z,V])}const S1=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?zf({element:n.current,padding:s}).fn(r):{}:n?zf({element:n,padding:s}).fn(r):{}}}},k1=(e,t)=>({...m1(e),options:[e,t]}),E1=(e,t)=>({...g1(e),options:[e,t]}),T1=(e,t)=>({...b1(e),options:[e,t]}),C1=(e,t)=>({...v1(e),options:[e,t]}),R1=(e,t)=>({...y1(e),options:[e,t]}),P1=(e,t)=>({...w1(e),options:[e,t]}),A1=(e,t)=>({...S1(e),options:[e,t]});var N1="Arrow",iy=x.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return w.jsx(ke.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});iy.displayName=N1;var O1=iy;
vendor: 5,024 bytes, line 141
141function oy(e){const[t,r]=x.useState(void 0);return tn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var ay="Popper",[ly,uy]=co(ay),[eP,cy]=ly(ay),dy="PopperAnchor",hy=x.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=cy(dy,r),o=x.useRef(null),a=Le(t,o);return x.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:w.jsx(ke.div,{...s,ref:a})});hy.displayName=dy;var Xd="PopperContent",[j1,I1]=ly(Xd),fy=x.forwardRef((e,t)=>{var re,Mn,wr,cn,br,Un;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,b=cy(Xd,r),[m,p]=x.useState(null),v=Le(t,xr=>p(xr)),[_,S]=x.useState(null),k=oy(_),E=(k==null?void 0:k.width)??0,P=(k==null?void 0:k.height)??0,N=n+(i!=="center"?"-"+i:""),j=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(u)?u:[u],$=F.length>0,W={padding:j,boundary:F.filter($1),altBoundary:$},{refs:I,floatingStyles:Q,placement:z,isPositioned:V,middlewareData:T}=_1({strategy:"fixed",placement:N,whileElementsMounted:(...xr)=>p1(...xr,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[k1({mainAxis:s+P,alignmentAxis:o}),l&&E1({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?T1():void 0,...W}),l&&C1({...W}),R1({...W,apply:({elements:xr,rects:mo,availableWidth:Nl,availableHeight:go})=>{const{width:Ol,height:Js}=mo.reference,Fn=xr.floating.style;Fn.setProperty("--radix-popper-available-width",`${Nl}px`),Fn.setProperty("--radix-popper-available-height",`${go}px`),Fn.setProperty("--radix-popper-anchor-width",`${Ol}px`),Fn.setProperty("--radix-popper-anchor-height",`${Js}px`)}}),_&&A1({element:_,padding:a}),D1({arrowWidth:E,arrowHeight:P}),f&&P1({strategy:"referenceHidden",...W})]}),[R,D]=gy(z),G=en(y);tn(()=>{V&&(G==null||G())},[V,G]);const B=(re=T.arrow)==null?void 0:re.x,Y=(Mn=T.arrow)==null?void 0:Mn.y,Z=((wr=T.arrow)==null?void 0:wr.centerOffset)!==0,[xe,$e]=x.useState();return tn(()=>{m&&$e(window.getComputedStyle(m).zIndex)},[m]),w.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:V?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(cn=T.transformOrigin)==null?void 0:cn.x,(br=T.transformOrigin)==null?void 0:br.y].join(" "),...((Un=T.hide)==null?void 0:Un.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(j1,{scope:r,placedSide:R,onArrowChange:S,arrowX:B,arrowY:Y,shouldHideArrow:Z,children:w.jsx(ke.div,{"data-side":R,"data-align":D,...g,ref:v,style:{...g.style,animation:V?void 0:"none"}})})})});fy.displayName=Xd;var py="PopperArrow",L1={top:"bottom",right:"left",bottom:"top",left:"right"},my=x.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=I1(py,n),o=L1[i.placedSide];return w.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:w.jsx(O1,{...s,ref:r,style:{...s.style,display:"block"}})})});my.displayName=py;function $1(e){return e!==null}var D1=e=>({name:"transformOrigin",options:e,fn(t){var b,m,p;const{placement:r,rects:n,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=gy(r),c={start:"0%",center:"50%",end:"100%"}[d],f=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,h=(((p=s.arrow)==null?void 0:p.y)??0)+l/2;let y="",g="";return u==="bottom"?(y=o?c:`${f}px`,g=`${-l}px`):u==="top"?(y=o?c:`${f}px`,g=`${n.floating.height+l}px`):u==="right"?(y=`${-l}px`,g=o?c:`${h}px`):u==="left"&&(y=`${n.floating.width+l}px`,g=o?c:`${h}px`),{data:{x:y,y:g}}}});function gy(e){const[t,r="center"]=e.split("-");return[t,r]}var M1=hy,U1=fy,F1=my,[wl,tP]=co("Tooltip",[uy]),Zd=uy(),vy="TooltipProvider",B1=700,Vf="tooltip.open",[z1,yy]=wl(vy),wy=e=>{const{__scopeTooltip:t,delayDuration:r=B1,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=x.useRef(!0),a=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),w.jsx(z1,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 4,219 bytes, line 141
141o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:x.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};wy.displayName=vy;var by="Tooltip",[rP,bl]=wl(by),Sc="TooltipTrigger",H1=x.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=bl(Sc,r),i=yy(Sc,r),o=Zd(r),a=x.useRef(null),l=Le(t,a,s.onTriggerChange),u=x.useRef(!1),d=x.useRef(!1),c=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),w.jsx(M1,{asChild:!0,...o,children:w.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ue(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});H1.displayName=Sc;var V1="TooltipPortal",[nP,W1]=wl(V1,{forceMount:void 0}),Fs="TooltipContent",xy=x.forwardRef((e,t)=>{const r=W1(Fs,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=bl(Fs,e.__scopeTooltip);return w.jsx(Bd,{present:n||o.open,children:o.disableHoverableContent?w.jsx(_y,{side:s,...i,ref:t}):w.jsx(K1,{side:s,...i,ref:t})})}),K1=x.forwardRef((e,t)=>{const r=bl(Fs,e.__scopeTooltip),n=yy(Fs,e.__scopeTooltip),s=x.useRef(null),i=Le(t,s),[o,a]=x.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:c}=n,f=x.useCallback(()=>{a(null),c(!1)},[c]),h=x.useCallback((y,g)=>{const b=y.currentTarget,m={x:y.clientX,y:y.clientY},p=Y1(m,b.getBoundingClientRect()),v=X1(m,p),_=Z1(g.getBoundingClientRect()),S=tk([...v,..._]);a(S),c(!0)},[c]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&d){const y=b=>h(b,d),g=b=>h(b,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[l,d,h,f]),x.useEffect(()=>{if(o){const y=g=>{const b=g.target,m={x:g.clientX,y:g.clientY},p=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),v=!ek(m,o);p?f():v&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,o,u,f]),w.jsx(_y,{...e,ref:i})}),[q1,G1]=wl(by,{isInside:!1}),J1=vx("TooltipContent"),_y=x.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=bl(Fs,r),u=Zd(r),{onClose:d}=l;return x.useEffect(()=>(document.addEventListener(Vf,d),()=>document.removeEventListener(Vf,d)),[d]),x.useEffect(()=>{if(l.trigger){const c=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),w.jsx(Fd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:w.jsxs(U1,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(J1,{children:n}),w.jsx(q1,{scope:r,isInside:!0,children:w.jsx(Fx,{id:l.contentId,role:"tooltip",children:s||n})})]})})});xy.displayName=Fs;var Sy="TooltipArrow",Q1=x.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Zd(r);return G1(Sy,r).isInside?null:w.jsx(F1,{...s,...n,ref:t})});Q1.displayName=Sy;function Y1(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function X1(e,t,r=5){const n=[];
141switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Z1(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function ek(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],u=a.x,d=a.y,c=l.x,f=l.y;d>n!=f>n&&r<(c-u)*(n-d)/(f-d)+u&&(s=!s)}return s}function tk(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),rk(t)}function rk(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var nk=wy,ky=xy;const sk=nk,ik=x.forwardRef(({className:e,sideOffset:t=4,...r},n)=>w.jsx(ky,{ref:n,sideOffset:t,className:he("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));ik.displayName=ky.displayName;var xl=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(){}},_l=typeof window>"u"||"Deno"in globalThis;function Pt(){}function ok(e,t){return typeof e=="function"?e(t):e}function ak(e){return typeof e=="number"&&e>=0&&e!==1/0}function lk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function kc(e,t){return typeof e=="function"?e(t):e}function uk(e,t){return typeof e=="function"?e(t):e}function Wf(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==eh(o,t.options))return!1}else if(!Gi(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 Kf(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(qi(t.options.mutationKey)!==qi(i))return!1}else if(!Gi(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function eh(e,t){return((t==null?void 0:t.queryKeyHashFn)||qi)(e)}function qi(e){return JSON.stringify(e,(t,r)=>Ec(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Gi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Gi(e[r],t[r])):!1}function Ey(e,t){if(e===t)return e;const r=qf(e)&&qf(t);if(r||Ec(e)&&Ec(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let u=0;for(let d=0;d<o;d++){const c=r?d:i[d];(!r&&l.has(c)||r)&&e[c]===void 0&&t[c]===void 0?(a[c]=void 0,u++):(a[c]=Ey(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function qf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ec(e){if(!Gf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Gf(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Gf(e){return Object.prototype.toString.call(e)==="[object Object]"}function ck(e){return new Promise(t=>{setTimeout(t,e)})}function dk(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Ey(e,t):t}function hk(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function fk(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var th=Symbol();function Ty(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===th?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var _n,Lr,ks,Mp,pk=(Mp=class extends xl{constructor(){super();te(this,_n);te(this,Lr);te(this,ks);q(this,ks,t=>{if(!_l&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,Lr)||this.setEventListener(C(this,ks))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Lr))==null||t.call(this),q(this,Lr,void 0))}setEventListener(t){var r;q(this,ks,t),(r=C(this,Lr))==null||r.call(this),q(this,Lr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){C(this,_n)!==t&&(q(this,_n,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,912 bytes, line 141
141this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof C(this,_n)=="boolean"?C(this,_n):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},_n=new WeakMap,Lr=new WeakMap,ks=new WeakMap,Mp),Cy=new pk,Es,$r,Ts,Up,mk=(Up=class extends xl{constructor(){super();te(this,Es,!0);te(this,$r);te(this,Ts);q(this,Ts,t=>{if(!_l&&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)}}})}onSubscribe(){C(this,$r)||this.setEventListener(C(this,Ts))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,$r))==null||t.call(this),q(this,$r,void 0))}setEventListener(t){var r;q(this,Ts,t),(r=C(this,$r))==null||r.call(this),q(this,$r,t(this.setOnline.bind(this)))}setOnline(t){C(this,Es)!==t&&(q(this,Es,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return C(this,Es)}},Es=new WeakMap,$r=new WeakMap,Ts=new WeakMap,Up),za=new mk;function gk(){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}function vk(e){return Math.min(1e3*2**e,3e4)}function Ry(e){return(e??"online")==="online"?za.isOnline():!0}var Py=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function mu(e){return e instanceof Py}function Ay(e){let t=!1,r=0,n=!1,s;const i=gk(),o=g=>{var b;n||(f(new Py(g)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Cy.isFocused()&&(e.networkMode==="always"||za.isOnline())&&e.canRun(),d=()=>Ry(e.networkMode)&&e.canRun(),c=g=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,g),s==null||s(),i.resolve(g))},f=g=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,g),s==null||s(),i.reject(g))},h=()=>new Promise(g=>{var b;s=m=>{(n||u())&&g(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;s=void 0,n||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(n)return;let g;const b=r===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(m){g=Promise.reject(m)}Promise.resolve(g).then(c).catch(m=>{var k;if(n)return;const p=e.retry??(_l?0:3),v=e.retryDelay??vk,_=typeof v=="function"?v(r,m):v,S=p===!0||typeof p=="number"&&r<p||typeof p=="function"&&p(r,m);if(t||!S){f(m);return}r++,(k=e.onFail)==null||k.call(e,r,m),ck(_).then(()=>u()?void 0:h()).then(()=>{t?f(m):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?y():h().then(y),i)}}var yk=e=>setTimeout(e,0);function wk(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=yk;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 Ke=wk(),Sn,Fp,Ny=(Fp=class{constructor(){te(this,Sn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ak(this.gcTime)&&q(this,Sn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_l?1/0:5*60*1e3))}clearGcTimeout(){C(this,Sn)&&(clearTimeout(C(this,Sn)),q(this,Sn,void 0))}},Sn=new WeakMap,Fp),Cs,kn,mt,En,Fe,ro,Tn,Nt,rr,Bp,bk=(Bp=class extends Ny{constructor(t){super();te(this,Nt);te(this,Cs);te(this,kn);te(this,mt);te(this,En);te(this,Fe);te(this,ro);te(this,Tn);q(this,Tn,!1),q(this,ro,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,En,t.client),q(this,mt,C(this,En).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Cs,_k(this.options)),this.state=t.state??C(this,Cs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,Fe))==null?void 0:t.promise}setOptions(t){this.options={...C(this,ro),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,mt).remove(this)}setData(t,r){const n=dk(this.state.data,t,this.options);return De(this,Nt,rr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){De(this,Nt,rr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=C(this,Fe))==null?void 0:n.promise;return(s=C(this,Fe))==null||s.cancel(t),r?r.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Cs))}isActive(){return this.observers.some(t=>uk(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===th||this.state.dataUpdateCount+this.state.errorUpdate
141Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>kc(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:!lk(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,Fe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,Fe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(C(this,Fe)&&(C(this,Tn)?C(this,Fe).cancel({revert:!0}):C(this,Fe).cancelRetry()),this.scheduleGc()),C(this,mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Nt,rr).call(this,{type:"invalidate"})}fetch(t,r){var u,d,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,Fe))return C(this,Fe).continueRetry(),C(this,Fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(q(this,Tn,!0),n.signal)})},i=()=>{const f=Ty(this.options,r),y=(()=>{const g={client:C(this,En),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return q(this,Tn,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,En),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),q(this,kn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&De(this,Nt,rr).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta});const l=f=>{var h,y,g,b;mu(f)&&f.silent||De(this,Nt,rr).call(this,{type:"error",error:f}),mu(f)||((y=(h=C(this,mt).config).onError)==null||y.call(h,f,this),(b=(g=C(this,mt).config).onSettled)==null||b.call(g,this.state.data,f,this)),this.scheduleGc()};return q(this,Fe,Ay({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,y,g,b;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(m){l(m);return}(y=(h=C(this,mt).config).onSuccess)==null||y.call(h,f,this),(b=(g=C(this,mt).config).onSettled)==null||b.call(g,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{De(this,Nt,rr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{De(this,Nt,rr).call(this,{type:"pause"})},onContinue:()=>{De(this,Nt,rr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,Fe).start()}},Cs=new WeakMap,kn=new WeakMap,mt=new WeakMap,En=new WeakMap,Fe=new WeakMap,ro=new WeakMap,Tn=new WeakMap,Nt=new WeakSet,rr=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,...xk(n.data,this.options),fetchMeta:t.meta??null};case"success":return q(this,kn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return mu(s)&&s.revert&&C(this,kn)?{...C(this,kn),fetchStatus:"idle"}
vendor: 4,844 bytes, line 141
141:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ke.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,mt).notify({query:this,type:"updated",action:t})})},Bp);function xk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ry(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _k(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 Wt,zp,Sk=(zp=class extends xl{constructor(t={}){super();te(this,Wt);this.config=t,q(this,Wt,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??eh(s,r);let o=this.get(i);return o||(o=new bk({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){C(this,Wt).has(t.queryHash)||(C(this,Wt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=C(this,Wt).get(t.queryHash);r&&(t.destroy(),r===t&&C(this,Wt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Wt).get(t)}getAll(){return[...C(this,Wt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Wf(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Wf(t,n)):r}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wt=new WeakMap,zp),Kt,Ve,Cn,qt,Rr,Hp,kk=(Hp=class extends Ny{constructor(t){super();te(this,qt);te(this,Kt);te(this,Ve);te(this,Cn);this.mutationId=t.mutationId,q(this,Ve,t.mutationCache),q(this,Kt,[]),this.state=t.state||Ek(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Kt).includes(t)||(C(this,Kt).push(t),this.clearGcTimeout(),C(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,Kt,C(this,Kt).filter(r=>r!==t)),this.scheduleGc(),C(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Kt).length||(this.state.status==="pending"?this.scheduleGc():C(this,Ve).remove(this))}continue(){var t;return((t=C(this,Cn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,d,c,f,h,y,g,b,m,p,v,_,S,k,E,P;const r=()=>{De(this,qt,Rr).call(this,{type:"continue"})};q(this,Cn,Ay({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,j)=>{De(this,qt,Rr).call(this,{type:"failed",failureCount:N,error:j})},onPause:()=>{De(this,qt,Rr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Ve).canRun(this)}));const n=this.state.status==="pending",s=!C(this,Cn).canStart();try{if(n)r();else{De(this,qt,Rr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=C(this,Ve).config).onMutate)==null?void 0:o.call(i,t,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));j!==this.state.context&&De(this,qt,Rr).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const N=await C(this,Cn).start();return await((d=(u=C(this,Ve).config).onSuccess)==null?void 0:d.call(u,N,t,this.state.context,this)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,N,t,this.state.context)),await((y=(h=C(this,Ve).config).onSettled)==null?void 0:y.call(h,N,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,N,null,t,this.state.context)),De(this,qt,Rr).call(this,{type:"success",data:N}),N}catch(N){try{throw await((p=(m=C(this,Ve).config).onError)==null?void 0:p.call(m,N,t,this.state.context,this)),await((_=(v=this.options).onError)==null?void 0:_.call(v,N,t,this.state.context)),await((k=(S=C(this,Ve).config).onSettled)==null?void 0:k.call(S,void 0,N,this.state.variables,this.state.context,this)),await((P=(E=this.options).onSettled)==null?void 0:P.call(E,void 0,N,t,this.state.context)),N}finally{De(this,qt,Rr).call(this,{type:"error",error:N})}}finally{C(this,Ve).runNext(this)}}}
141,Kt=new WeakMap,Ve=new WeakMap,Cn=new WeakMap,qt=new WeakSet,Rr=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),Ke.batch(()=>{C(this,Kt).forEach(n=>{n.onMutationUpdate(t)}),C(this,Ve).notify({mutation:this,type:"updated",action:t})})},Hp);function Ek(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ar,Ot,no,Vp,Tk=(Vp=class extends xl{constructor(t={}){super();te(this,ar);te(this,Ot);te(this,no);this.config=t,q(this,ar,new Set),q(this,Ot,new Map),q(this,no,0)}build(t,r,n){const s=new kk({mutationCache:this,mutationId:++yo(this,no)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){C(this,ar).add(t);const r=Fo(t);if(typeof r=="string"){const n=C(this,Ot).get(r);n?n.push(t):C(this,Ot).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,ar).delete(t)){const r=Fo(t);if(typeof r=="string"){const n=C(this,Ot).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&C(this,Ot).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Fo(t);if(typeof r=="string"){const n=C(this,Ot).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=Fo(t);if(typeof r=="string"){const s=(n=C(this,Ot).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(){Ke.batch(()=>{C(this,ar).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,ar).clear(),C(this,Ot).clear()})}getAll(){return Array.from(C(this,ar))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Kf(r,n))}findAll(t={}){return this.getAll().filter(r=>Kf(t,r))}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,428 bytes, line 141
141r.state.isPaused);return Ke.batch(()=>Promise.all(t.map(r=>r.continue().catch(Pt))))}},ar=new WeakMap,Ot=new WeakMap,no=new WeakMap,Vp);function Fo(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Jf(e){return{onFetch:(t,r)=>{var d,c,f,h,y;const n=t.options,s=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const b=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},m=Ty(t.options,t.fetchOptions),p=async(v,_,S)=>{if(g)return Promise.reject();if(_==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return b(F),F})(),P=await m(E),{maxPages:N}=t.options,j=S?fk:hk;return{pages:j(v.pages,P,N),pageParams:j(v.pageParams,_,N)}};if(s&&i.length){const v=s==="backward",_=v?Ck:Qf,S={pages:i,pageParams:o},k=_(n,S);a=await p(S,k,v)}else{const v=e??i.length;do{const _=l===0?o[0]??n.initialPageParam:Qf(n,a);if(l>0&&_==null)break;a=await p(a,_),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Qf(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 Ck(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 ve,Dr,Mr,Rs,Ps,Ur,As,Ns,Wp,Rk=(Wp=class{constructor(e={}){te(this,ve);te(this,Dr);te(this,Mr);te(this,Rs);te(this,Ps);te(this,Ur);te(this,As);te(this,Ns);q(this,ve,e.queryCache||new Sk),q(this,Dr,e.mutationCache||new Tk),q(this,Mr,e.defaultOptions||{}),q(this,Rs,new Map),q(this,Ps,new Map),q(this,Ur,0)}mount(){yo(this,Ur)._++,C(this,Ur)===1&&(q(this,As,Cy.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ve).onFocus())})),q(this,Ns,za.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ve).onOnline())})))}unmount(){var e,t;yo(this,Ur)._--,C(this,Ur)===0&&((e=C(this,As))==null||e.call(this),q(this,As,void 0),(t=C(this,Ns))==null||t.call(this),q(this,Ns,void 0))}isFetching(e){return C(this,ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Dr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,ve).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=C(this,ve).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(kc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return C(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=C(this,ve).get(n.queryHash),i=s==null?void 0:s.state.data,o=ok(t,i);if(o!==void 0)return C(this,ve).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Ke.batch(()=>C(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=C(this,ve).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=C(this,ve);Ke.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=C(this,ve);return Ke.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ke.batch(()=>C(this,ve).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Pt).catch(Pt)}invalidateQueries(e,t={}){return Ke.batch(()=>(C(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=Ke.batch(()=>C(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(Pt)),s.state.fetchStatus==="paused"?Promise.resolve():i}
141));return Promise.all(n).then(Pt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=C(this,ve).build(this,t);return r.isStaleByTime(kc(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pt).catch(Pt)}fetchInfiniteQuery(e){return e.behavior=Jf(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pt).catch(Pt)}ensureInfiniteQueryData(e){return e.behavior=Jf(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return za.isOnline()?C(this,Dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,ve)}getMutationCache(){return C(this,Dr)}getDefaultOptions(){return C(this,Mr)}setDefaultOptions(e){q(this,Mr,e)}setQueryDefaults(e,t){C(this,Rs).set(qi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Rs).values()],r={};return t.forEach(n=>{Gi(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){C(this,Ps).set(qi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Ps).values()],r={};return t.forEach(n=>{Gi(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Mr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=eh(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===th&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Mr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,ve).clear(),C(this,Dr).clear()}},ve=new WeakMap,Dr=new WeakMap,Mr=new WeakMap,Rs=new WeakMap,Ps=new WeakMap,Ur=new WeakMap,As=new WeakMap,Ns=new WeakMap,Wp),Pk=x.createContext(void 0),Ak=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(Pk.Provider,{value:e,children:t}));/**
142 * @remix-run/router v1.23.0
143 *
144 * Copyright (c) Remix Software Inc.
145 *
146 * This source code is licensed under the MIT license found in the
147 * LICENSE.md file in the root directory of this source tree.
148 *
149 * @license MIT
150 */function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ha.apply(this,arguments)}var zr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(zr||(zr={}));const Yf="popstate";function Nk(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return Tc("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:jy(s)}return jk(t,r,null,e)}function nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Oy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ok(){return Math.random().toString(36).substr(2,8)}function Xf(e,t){return{usr:e.state,key:e.key,idx:t}}function Tc(e,t,r,n){return r===void 0&&(r=null),Ha({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Sl(t):t,{state:r,key:t&&t.key||n||Ok()})}function jy(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Sl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function jk(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=zr.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Ha({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function c(){a=zr.Pop;let b=d(),m=b==null?null:b-u;u=b,l&&l({action:a,location:g.location,delta:m})}function f(b,m){a=zr.Push;let p=Tc(g.location,b,m);u=d()+1;let v=Xf(p,u),_=g.createHref(p);try{o.pushState(v,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:g.location,delta:1})}function h(b,m){a=zr.Replace;let p=Tc(g.location,b,m);u=d();let v=Xf(p,u),_=g.createHref(p);o.replaceState(v,"",_),i&&l&&l({action:a,location:g.location,delta:0})}function y(b){let m=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof b=="string"?b:jy(b);return p=p.replace(/ $/,"%20"),nt(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let g={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Yf,c),l=b,()=>{s.removeEventListener(Yf,c),l=null}},createHref(b){return t(s,b)},createURL:y,encodeLocation(b){let m=y(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(b){return o.go(b)}};return g}var Zf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Zf||(Zf={}));function Ik(e,t,r){return r===void 0&&(r="/"),Lk(e,t,r,!1)}function Lk(e,t,r,n){let s=typeof t=="string"?Sl(t):t,i=$y(s.pathname||"/",r);if(i==null)return null;let o=Iy(e);$k(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=qk(i);a=Wk(o[l],u,n)}return a}function Iy(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(nt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
150id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=xs([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(nt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Iy(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Hk(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Ly(i.path))s(i,o,l)}),t}function Ly(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=Ly(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 $k(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Vk(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Dk=/^:[\w-]+$/,Mk=3,Uk=2,Fk=1,Bk=10,zk=-2,ep=e=>e==="*";function Hk(e,t){let r=e.split("/"),n=r.length;return r.some(ep)&&(n+=zk),t&&(n+=Uk),r.filter(s=>!ep(s)).reduce((s,i)=>s+(Dk.test(i)?Mk:i===""?Fk:Bk),n)}function Vk(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 Wk(e,t,r){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=tp({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&r&&!n[n.length-1].route.index&&(c=tp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;
vendor: 4,131 bytes, lines 150-159
150Object.assign(s,c.params),o.push({params:s,pathname:xs([i,c.pathname]),pathnameBase:Gk(xs([i,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(i=xs([i,c.pathnameBase]))}return o}function tp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Kk(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,d,c)=>{let{paramName:f,isOptional:h}=d;if(f==="*"){let g=a[c]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=a[c];return h&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Kk(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Oy(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)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function qk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Oy(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function $y(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)||"/"}const xs=e=>e.join("/").replace(/\/\/+/g,"/"),Gk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function Jk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Dy=["post","put","patch","delete"];new Set(Dy);const Qk=["get",...Dy];new Set(Qk);/**
151 * React Router v6.30.1
152 *
153 * Copyright (c) Remix Software Inc.
154 *
155 * This source code is licensed under the MIT license found in the
156 * LICENSE.md file in the root directory of this source tree.
157 *
158 * @license MIT
159 */function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Va.apply(this,arguments)}const Yk=x.createContext(null),Xk=x.createContext(null),My=x.createContext(null),kl=x.createContext(null),El=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Uy=x.createContext(null);function rh(){return x.useContext(kl)!=null}function Fy(){return rh()||nt(!1),x.useContext(kl).location}function Zk(e,t){return eE(e,t)}function eE(e,t,r,n){rh()||nt(!1);let{navigator:s}=x.useContext(My),{matches:i}=x.useContext(El),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Fy(),d;if(t){var c;let b=typeof t=="string"?Sl(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||nt(!1),d=b}else d=u;let f=d.pathname||"/",h=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=Ik(e,{pathname:h}),g=iE(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:xs([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:xs([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n);return t&&g?x.createElement(kl.Provider,{value:{location:Va({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:zr.Pop}},g):g}function tE(){let e=uE(),t=Jk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application 
159Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:s},r):null,null)}const rE=x.createElement(tE,null);class nE extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?x.createElement(El.Provider,{value:this.props.routeContext},x.createElement(Uy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sE(e){let{routeContext:t,match:r,children:n}=e,s=x.useContext(Yk);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(El.Provider,{value:t},n)}function iE(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||nt(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:h}=r,y=c.route.loader&&f[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||y){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,f)=>{let h,y=!1,g=null,b=null;r&&(h=a&&c.route.id?a[c.route.id]:void 0,g=c.route.errorElement||rE,l&&(u<0&&f===0?(y=!0,b=null):u===f&&(y=!0,b=c.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,f+1)),p=()=>{let v;return h?v=g:y?v=b:c.route.Component?v=x.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=d,x.createElement(sE,{match:c,routeContext:{outlet:d,matches:m,isDataRoute:r!=null},children:v})};return r&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?x.createElement(nE,{location:r.location,revalidation:r.revalidation,component:g,error:h,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var Cc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Cc||{});function oE(e){let t=x.useContext(Xk);return t||nt(!1),t}function aE(e){let t=x.useContext(El);return t||nt(!1),t}function lE(e){let t=aE(),r=t.matches[t.matches.length-1];return r.route.id||nt(!1),r.route.id}function uE(){var e;let t=x.useContext(Uy),r=oE(Cc.UseRouteError),n=lE(Cc.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function cE(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Rc(e){nt(!1)}function dE(e){let{basename:t="/",children:r=null,location:n,navigationType:s=zr.Pop,navigator:i,static:o=!1,future:a}=e;rh()&&nt(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:i,static:o,future:Va({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Sl(n));let{pathname:d="/",search:c="",hash:f="",state:h=null,key:y="default"}=n,g=x.useMemo(()=>{let b=$y(d,l);return b==null?null:{location:{pathname:b,search:c,hash:f,state:h,key:y},navigationType:s}},[l,d,c,f,h,y,s]);return g==null?null:x.createElement(My.Provider,{value:u},x.createElement(kl.Provider,{children:r,value:g}))}function hE(e){let{children:t,location:r}=e;return Zk(Pc(t),r)}new Promise(()=>{});
159function Pc(e,t){t===void 0&&(t=[]);let r=[];return x.Children.forEach(e,(n,s)=>{if(!x.isValidElement(n))return;let i=[...t,s];if(n.type===x.Fragment){r.push.apply(r,Pc(n.props.children,i));return}n.type!==Rc&&nt(!1),!n.props.index||!n.props.children||nt(!1);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,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Pc(n.props.children,i)),r.push(o)}),r}/**
160 * React Router DOM v6.30.1
161 *
162 * Copyright (c) Remix Software Inc.
163 *
164 * This source code is licensed under the MIT license found in the
165 * LICENSE.md file in the root directory of this source tree.
166 *
167 * @license MIT
168 */const fE="6";try{window.__reactRouterVersion=fE}catch{}const pE="startTransition",rp=nm[pE];function mE(e){let{basename:t,children:r,future:n,window:s}=e,i=x.useRef();i.current==null&&(i.current=Nk({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=x.useCallback(c=>{u&&rp?rp(()=>l(c)):l(c)},[l,u]);return x.useLayoutEffect(()=>o.listen(d),[o,d]),x.useEffect(()=>cE(n),[n]),x.createElement(dE,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}var np;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(np||(np={}));var sp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sp||(sp={}));const gE=ml("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),_s=x.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?mx:"button";return w.jsx(o,{className:he(gE({variant:t,size:r,className:e})),ref:i,...s})});_s.displayName="Button";const ca=x.forwardRef(({className:e,type:t,...r},n)=>w.jsx("input",{type:t,className:he("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));ca.displayName="Input";var vE="Label",By=x.forwardRef((e,t)=>w.jsx(ke.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));By.displayName=vE;var zy=By;const yE=ml("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),da=x.forwardRef(({className:e,...t},r)=>w.jsx(zy,{ref:r,className:he(yE(),e),...t}));da.displayName=zy.displayName;function Hy(e,[t,r]){return Math.min(r,Math.max(t,e))}var wE=x.createContext(void 0);function bE(e){const t=x.useContext(wE);return e||t||"ltr"}function xE(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Vy=["PageUp","PageDown"],Wy=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ky={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]}
168,qs="Slider",[Ac,_E,SE]=dv(qs),[qy,sP]=co(qs,[SE]),[kE,Tl]=qy(qs),Gy=x.forwardRef((e,t)=>{const{name:r,min:n=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[n],value:d,onValueChange:c=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:y,...g}=e,b=x.useRef(new Set),m=x.useRef(0),v=o==="horizontal"?EE:TE,[_=[],S]=vv({prop:d,defaultProp:u,onChange:F=>{var W;(W=[...b.current][m.current])==null||W.focus(),c(F)}}),k=x.useRef(_);function E(F){const $=NE(_,F);j(F,$)}function P(F){j(F,m.current)}function N(){const F=k.current[m.current];_[m.current]!==F&&f(_)}function j(F,$,{commit:W}={commit:!1}){const I=LE(i),Q=$E(Math.round((F-n)/i)*i+n,I),z=Hy(Q,[n,s]);S((V=[])=>{const T=PE(V,z,$);if(IE(T,l*i)){m.current=T.indexOf(z);const R=String(T)!==String(V);return R&&W&&f(T),R?T:V}else return V})}return w.jsx(kE,{scope:e.__scopeSlider,name:r,disabled:a,min:n,max:s,valueIndexToChangeRef:m,thumbs:b.current,values:_,orientation:o,form:y,children:w.jsx(Ac.Provider,{scope:e.__scopeSlider,children:w.jsx(Ac.Slot,{scope:e.__scopeSlider,children:w.jsx(v,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:ue(g.onPointerDown,()=>{a||(k.current=_)}),min:n,max:s,inverted:h,onSlideStart:a?void 0:E,onSlideMove:a?void 0:P,onSlideEnd:a?void 0:N,onHomeKeyDown:()=>!a&&j(n,0,{commit:!0}),onEndKeyDown:()=>!a&&j(s,_.length-1,{commit:!0}),onStepKeyDown:({event:F,direction:$})=>{if(!a){const Q=Vy.includes(F.key)||F.shiftKey&&Wy.includes(F.key)?10:1,z=m.current,V=_[z],T=i*Q*$;j(V+T,z,{commit:!0})}}})})})})});Gy.displayName=qs;var[Jy,Qy]=qy(qs,{startEdge:"left",endEdge:"right",size:"width",direction:1}),EE=x.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...d}=e,[c,f]=x.useState(null),h=Le(t,v=>f(v)),y=x.useRef(void 0),g=bE(s),b=g==="ltr",m=b&&!i||!b&&i;function p(v){const _=y.current||c.getBoundingClientRect(),S=[0,_.width],E=nh(S,m?[r,n]:[n,r]);return y.current=_,E(v-_.left)}return w.jsx(Jy,{scope:e.__scopeSlider,startEdge:m?"left":"right",endEdge:m?"right":"left",direction:m?1:-1,size:"width",children:w.jsx(Yy,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:v=>{const _=p(v.clientX);o==null||o(_)},onSlideMove:v=>{const _=p(v.clientX);a==null||a(_)},onSlideEnd:()=>{y.current=void 0,l==null||l()},onStepKeyDown:v=>{const S=Ky[m?"from-left":"from-right"].includes(v.key);u==null||u({event:v,direction:S?-1:1})}})})}),TE=x.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...u}=e,d=x.useRef(null),c=Le(t,d),f=x.useRef(void 0),h=!s;function y(g){const b=f.current||d.current.getBoundingClientRect(),m=[0,b.height],v=nh(m,h?[n,r]:[r,n]);return f.current=b,v(g-b.top)}return w.jsx(Jy,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:w.jsx(Yy,{"data-orientation":"vertical",...u,ref:c,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const b=y(g.clientY);i==null||i(b)},onSlideMove:g=>{const b=y(g.clientY);o==null||o(b)},onSlideEnd:()=>{f.current=void 0,a==null||a()},onStepKeyDown:g=>{const m=Ky[h?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:m?-1:1})}})})}),Yy=x.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...u}=e,d=Tl(qs,r);return w.jsx(ke.span,{...u,ref:t,onKeyDown:ue(e.onKeyDown,c=>{c.key==="Home"?(o(c),c.preventDefault()):c.key==="End"?(a(c),c.preventDefault()):Vy.concat(Wy).includes(c.key)&&(l(c),c.preventDefault())}),onPointerDown:ue(e.onPointerDown,c=>{const f=c.target;f.setPointerCapture(c.pointerId),c.preventDefault(),d.thumbs.has(f)?f.focus():n(c)}),onPointerMove:ue(e.onPointerMove,c=>{c.target.hasPointerCapture(c.pointerId)&&s(c)}),onPointerUp:ue(e.onPointerUp,c=>{const f=c.target;f.hasPointerCapture(c.pointerId)&&(f.releasePointerCapture(c.pointerId),i(c))})})}),Xy="SliderTrack",Zy=x.forwardRef((e,t)=>
168{const{__scopeSlider:r,...n}=e,s=Tl(Xy,r);return w.jsx(ke.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});Zy.displayName=Xy;var Nc="SliderRange",e0=x.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=Tl(Nc,r),i=Qy(Nc,r),o=x.useRef(null),a=Le(t,o),l=s.values.length,u=s.values.map(f=>n0(f,s.min,s.max)),d=l>1?Math.min(...u):0,c=100-Math.max(...u);return w.jsx(ke.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:c+"%"}})});e0.displayName=Nc;var Oc="SliderThumb",t0=x.forwardRef((e,t)=>{const r=_E(e.__scopeSlider),[n,s]=x.useState(null),i=Le(t,a=>s(a)),o=x.useMemo(()=>n?r().findIndex(a=>a.ref.current===n):-1,[r,n]);return w.jsx(CE,{...e,ref:i,index:o})}),CE=x.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...i}=e,o=Tl(Oc,r),a=Qy(Oc,r),[l,u]=x.useState(null),d=Le(t,p=>u(p)),c=l?o.form||!!l.closest("form"):!0,f=oy(l),h=o.values[n],y=h===void 0?0:n0(h,o.min,o.max),g=AE(n,o.values.length),b=f==null?void 0:f[a.size],m=b?OE(b,y,a.direction):0;return x.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),w.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${y}% + ${m}px)`},children:[w.jsx(Ac.ItemSlot,{scope:e.__scopeSlider,children:w.jsx(ke.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:h===void 0?{display:"none"}:e.style,onFocus:ue(e.onFocus,()=>{o.valueIndexToChangeRef.current=n})})}),c&&w.jsx(r0,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},n)]})});t0.displayName=Oc;var RE="RadioBubbleInput",r0=x.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=x.useRef(null),i=Le(s,n),o=xE(t);return x.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const c=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(c)}},[o,t]),w.jsx(ke.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});r0.displayName=RE;function PE(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function n0(e,t,r){const i=100/(r-t)*(e-t);return Hy(i,[0,100])}function AE(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function NE(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function OE(e,t,r){const n=e/2,i=nh([0,50],[0,n]);return(n-i(t)*r)*r}function jE(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function IE(e,t){if(t>0){const r=jE(e);return Math.min(...r)>=t}return!0}function nh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function LE(e){return(String(e).split(".")[1]||"").length}function $E(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var s0=Gy,DE=Zy,ME=e0,UE=t0;const i0=x.forwardRef(({className:e,...t},r)=>w.jsxs(s0,{ref:r,className:he("relative flex w-full touch-none select-none items-center",e),...t,children:[w.jsx(DE,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:w.jsx(ME,{className:"absolute h-full bg-primary"})}),w.jsx(UE,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));i0.displayName=s0.displayName;function FE({onSubmit:e}
168){const[t,r]=x.useState(1),[n,s]=x.useState(""),[i,o]=x.useState(""),[a,l]=x.useState(""),[u,d]=x.useState([4]),c=h=>{h.preventDefault(),n.trim()&&i.trim()&&r(2)},f=h=>{h.preventDefault(),e({firstName:n.trim(),email:i.trim(),phone:a.trim(),weeksPostpartum:u[0]})};return w.jsxs("div",{className:"w-full max-w-md mx-auto",children:[w.jsxs("div",{className:"flex items-center justify-center gap-2 mb-8",children:[w.jsx("div",{className:`w-3 h-3 rounded-full transition-colors ${t>=1?"bg-primary":"bg-muted"}`}),w.jsx("div",{className:`w-8 h-0.5 transition-colors ${t>=2?"bg-primary":"bg-muted"}`}),w.jsx("div",{className:`w-3 h-3 rounded-full transition-colors ${t>=2?"bg-primary":"bg-muted"}`})]}),t===1&&w.jsxs("form",{onSubmit:c,className:"space-y-6 animate-fade-in",children:[w.jsxs("div",{className:"text-center mb-8",children:[w.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-2",children:"Vitaj, žena! 💕"}),w.jsx("p",{className:"text-muted-foreground",children:"Poradím Ti vybraÅ¥ Tvoj ideálny termín v Rehability."})]}),w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"space-y-2",children:[w.jsx(da,{htmlFor:"firstName",children:"Tvoje meno"}),w.jsx(ca,{id:"firstName",type:"text",placeholder:"Zadaj svoje meno",value:n,onChange:h=>s(h.target.value),required:!0,className:"h-12"})]}),w.jsxs("div",{className:"space-y-2",children:[w.jsx(da,{htmlFor:"email",children:"E-mailová adresa"}),w.jsx(ca,{id:"email",type:"email",placeholder:"[email protected]",value:i,onChange:h=>o(h.target.value),required:!0,className:"h-12"})]}),w.jsxs("div",{className:"space-y-2",children:[w.jsx(da,{htmlFor:"phone",children:"Telefónne číslo"}),w.jsx(ca,{id:"phone",type:"tel",placeholder:"+421 9XX XXX XXX",value:a,onChange:h=>l(h.target.value),className:"h-12"}),w.jsxs("div",{className:"flex items-start gap-2 mt-2 p-3 bg-muted/50 rounded-lg",children:[w.jsx(p_,{className:"w-4 h-4 text-muted-foreground mt-0.5 flex-shrink-0"}),w.jsxs("p",{className:"text-xs text-muted-foreground",children:["Je možné, že sa Ti ozve naÅ¡a asistentka a budúca dula ",w.jsx("strong",{className:"text-foreground",children:"Silvia"})," pre potvrdenie termínu či dodatočné otázky k registrácii a platbe."]})]})]})]}),w.jsxs(_s,{type:"submit",className:"w-full h-12 text-base",disabled:!n.trim()||!i.trim(),children:["VybraÅ¥ termín",w.jsx(gc,{className:"w-4 h-4 ml-2"})]})]}),t===2&&w.jsxs("form",{onSubmit:f,className:"space-y-6 animate-fade-in",children:[w.jsxs("div",{className:"text-center mb-8",children:[w.jsxs("h2",{className:"text-2xl font-semibold text-foreground mb-2",children:["Ahoj ",n,"! 👋"]}),w.jsx("p",{className:"text-muted-foreground",children:"Kde po pôrode sa práve nachádzaÅ¡?"})]}),w.jsxs("div",{className:"space-y-8",children:[w.jsx("div",{className:"text-center",children:u[0]<=7?w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"text-5xl font-bold text-primary",children:u[0]}),w.jsxs("span",{className:"text-xl text-muted-foreground ml-2",children:[u[0]===1?"týždeň":u[0]<5?"týždne":"týždňov"," po pôrode"]})]}):u[0]<=17?w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"text-5xl font-bold text-primary",children:u[0]-6}),w.jsxs("span",{className:"text-xl text-muted-foreground ml-2",children:[u[0]-6===1?"mesiac":u[0]-6<5?"mesiace":"mesiacov"," po pôrode"]})]}):w.jsx("span",{className:"text-3xl font-bold text-primary",children:"Viac ako rok po pôrode"})}),w.jsxs("div",{className:"px-4",children:[w.jsx(i0,{value:u,onValueChange:d,min:1,max:18,step:1,className:"w-full"}),w.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mt-3",children:[w.jsx("span",{children:"1-7 týždňov"}),w.jsx("span",{children:"2-11 mesiacov"}),w.jsx("span",{children:"1+ rok"})]})]})]}),w.jsx("div",{className:"text-center px-2",children:w.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:["💡 Rehability odporúčame od ",w.jsx("strong",{className:"text-foreground",children:"6 týždňov"})," po vaginálnom pôrode a ",w.jsx("strong",{className:"text-foreground",children:"2 mesiace"})," po sekcii.",w.jsx("br",{}),w.jsx("span",{className:"text-primary font-medium",children:"Naplánuj si vstup už teraz a uÅ¡etri!"})]})}),w.jsxs(_s,{type:"submit",className:"w-full h-12 text-base",children:["NájsÅ¥ môj ideálny termín",w.jsx(gc,{className:"w-4 h-4 ml-2"})]}),w.jsx("button",{type:"button",onClick:()=>r(1),className:"w-full text-sm text-muted-foreground hover:text-foreground transition-colors",children:"← Späť"})]})]})}const BE=[new Date("2026-01-12"),new Date("2026-03-02"),new Date("2026-04-06"),new Date("2026-05-04"),new Date("2026-09-07"),new Date("2026-10-05"),new Date("2026-11-02")],Hr={early:169.9,standard:179.9,late:189.9};function zE(e){return e>30?"early":e>14?"standard":"late"}function HE(e){return e>30?{days:e-30,nextLevel:"standard"}:e>14?{days:e-14,nextLevel:"late"}:{days:null,nextLevel:null}}function VE(e){const t=new Date,r=Math.ceil((e.getTime()-t.getTime())/(1e3*60*60*24)),n=zE(r),{days:s,nextLevel:i}=HE(r);return{date:e,price:Hr[n],priceLevel:n,daysUntilPriceChange:s,nextPriceLevel:i,daysUntilStart:r}}function o0(){const e=new Date;return BE.filter(t=>t>e).map(VE).sort((t,r)=>t.date.getTime()-r.date.getTime())}function WE(e){const t=o0();if(t.length===0)return null;if(e>=6){const n=t.filter(s=>s.priceLevel==="early");return n.length>0?n[0]:t.reduce((s,i)=>i.price<s.price?i:s,t[0])}else{const s=t.filter(i=>i.daysUntilStart>=30);return s.length>=2?s[1]:s.length===1?s[0]:t.length>=2?t[1]:t[0]}}function ki(e){return e.toLocaleDateString("sk-SK",{day:"numeric",month:"long",year:"numeric"})}function KE({currentPriceLevel:e,daysUntilStart:t}){const r=[{level:"early",price:Hr.early,label:"Early Bird",threshold:"30+ dní pred",color:"bg-green-500",textColor:"text-green-600"},{level:"standard",price:Hr.standard,label:"Å tandard",threshold:"14-30 dní pred",color:"bg-
168amber-500",textColor:"text-amber-600"},{level:"late",price:Hr.late,label:"Last Minute",threshold:"menej ako 14 dní",color:"bg-red-500",textColor:"text-red-600"}],n=r.findIndex(s=>s.level===e);return w.jsxs("div",{className:"bg-gradient-to-br from-primary/5 to-primary/10 rounded-xl p-4 border border-primary/20",children:[w.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[w.jsx(Fv,{className:"w-4 h-4 text-primary"}),w.jsx("span",{className:"text-sm font-medium text-foreground",children:"Cenový vývoj"})]}),w.jsx("div",{className:"space-y-2",children:r.map((s,i)=>{const o=s.level===e,a=i<n;return w.jsxs("div",{className:he("flex items-center justify-between p-3 rounded-lg transition-all",o&&"bg-white dark:bg-card shadow-sm ring-2 ring-primary/30",a&&"opacity-50"),children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("div",{className:he("w-3 h-3 rounded-full",s.color,!o&&!a&&"opacity-40")}),w.jsxs("div",{children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("span",{className:he("font-medium text-sm",o?"text-foreground":"text-muted-foreground"),children:s.label}),o&&w.jsx("span",{className:"text-xs bg-primary text-primary-foreground px-2 py-0.5 rounded-full",children:"TERAZ"}),a&&w.jsx(u_,{className:"w-3 h-3 text-muted-foreground"})]}),w.jsx("span",{className:"text-xs text-muted-foreground",children:s.threshold})]})]}),w.jsxs("div",{className:he("text-right",o?s.textColor:"text-muted-foreground"),children:[w.jsxs("span",{className:he("font-bold",o?"text-lg":"text-base"),children:["€",s.price.toFixed(2)]}),!o&&!a&&w.jsxs("div",{className:"text-xs text-destructive",children:["+€",(s.price-Hr[e]).toFixed(2)]})]})]},s.level)})}),w.jsx("div",{className:"mt-4 pt-3 border-t border-primary/10",children:w.jsxs("p",{className:"text-xs text-center text-muted-foreground",children:["💡 ",w.jsx("span",{className:"font-medium text-foreground",children:"Čím skôr rezervuješ, tým viac ušetríš!"})]})})]})}const qE=ml("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ip({className:e,variant:t,...r}){return w.jsx("div",{className:he(qE({variant:t}),e),...r})}function GE({programs:e,selectedProgram:t,recommendedProgram:r,onSelect:n}){const s=c=>
168{switch(c){case"early":return"bg-green-500";case"standard":return"bg-amber-500";case"late":return"bg-red-500"}},i=x.useMemo(()=>e.map((c,f)=>{const y=3+(c.date.getTime()+f)%5,g=y<=4,b=y<=3;return{spotsLeft:y,isFillingFast:g,isAlmostFull:b}}),[e]),o=c=>c.toLocaleDateString("sk-SK",{weekday:"long"}),a=r||e[0],l=e.filter(c=>c.date.getTime()!==(a==null?void 0:a.date.getTime())),u=c=>{const f=e.findIndex(h=>h.date.getTime()===c.date.getTime());return i[f]||{spotsLeft:5,isFillingFast:!1,isAlmostFull:!1}},d=x.useMemo(()=>t?e.find(c=>c.date.getTime()<t.date.getTime()&&c.price<t.price):null,[t,e]);return w.jsxs("div",{className:"space-y-3",children:[a&&w.jsxs("button",{onClick:()=>n(a),className:he("relative w-full p-4 rounded-xl border-2 text-left transition-all duration-200 pt-6",(t==null?void 0:t.date.getTime())===a.date.getTime()?"border-primary bg-primary/5 shadow-md":"border-primary/30 bg-primary/5 hover:border-primary/50"),children:[w.jsx("div",{className:"absolute top-0 left-4 -translate-y-1/2 z-10",children:w.jsx(ip,{className:"text-xs bg-primary text-primary-foreground border-0 animate-pulse shadow-lg px-3 py-1",children:"⭐ Pre teba ideálne"})}),w.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[w.jsx(l_,{className:"w-4 h-4 text-primary"}),w.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Program začína ",ki(a.date),", ",o(a.date)]})]}),w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("div",{className:he("w-3 h-3 rounded-full shrink-0",s(a.priceLevel))}),w.jsxs("div",{children:[w.jsxs("div",{className:"text-xs text-muted-foreground",children:["Štart o ",a.daysUntilStart," ",a.daysUntilStart===1?"deň":a.daysUntilStart<5?"dni":"dní"]}),w.jsxs("div",{className:he("flex items-center gap-1 text-xs font-medium mt-0.5",u(a).isAlmostFull?"text-red-500":u(a).isFillingFast?"text-amber-500":"text-muted-foreground"),children:[w.jsx(y_,{className:"w-3 h-3"}),u(a).isAlmostFull?w.jsxs("span",{children:["🔥 Posledné ",u(a).spotsLeft," miesta!"]}):u(a).isFillingFast?w.jsxs("span",{children:["⚡ Zostáva ",u(a).spotsLeft," miest"]}):w.jsxs("span",{children:["Voľných ",u(a).spotsLeft," miest"]})]})]})]}),w.jsxs("div",{className:"text-right flex items-center gap-2",children:[w.jsxs("div",{children:[w.jsxs("span",{className:"font-bold text-lg text-foreground",children:["€",a.price.toFixed(2)]}),Hr.late-a.price>0&&w.jsxs("div",{className:"text-xs text-primary font-medium",children:["ušetríš €",(Hr.late-a.price).toFixed(2)]})]}),w.jsx(d_,{className:he("w-5 h-5 transition-colors",(t==null?void 0:t.date.getTime())===a.date.getTime()?"text-primary":"text-muted-foreground")})]})]}),(t==null?void 0:t.date.getTime())===a.date.getTime()&&w.jsx("div",{className:"absolute inset-0 rounded-xl ring-2 ring-primary ring-offset-2 pointer-events-none"})]}),d&&(t==null?void 0:t.date.getTime())!==d.date.getTime()&&w.jsx("button",{onClick:()=>n(d),className:"w-full p-3 rounded-lg bg-gradient-to-r from-green-50 to-emerald-50 dark:from-green-950/30 dark:to-emerald-950/30 border border-green-200 dark:border-green-800 text-left hover:shadow-md transition-all",children:w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(Fv,{className:"w-4 h-4 text-green-600"}),w.jsxs("span",{className:"text-xs font-medium text-green-700 dark:text-green-400",children:["💰 Skorší termín ",ki(d.date)," je lacnejší!"]}),w.jsxs("span",{className:"ml-auto font-bold text-green-600",children:["€",d.price.toFixed(2)]})]})}),l.length>0&&w.jsxs("div",{className:"space-y-1.5",children:[w.jsx("span",{className:"text-xs text-muted-foreground px-1",children:"Ďalšie termíny:"}),w.jsx("div",{className:"space-y-1",children:l.map(c=>{const f=(t==null?void 0:t.date.getTime())===c.date.getTime(),h=u(c),y=t?c.price-t.price:0,g=y<0,b=y>0;return w.jsxs("button",{onClick:()=>n(c),className:he("w-full flex items-center justify-between px-3 py-2 rounded-lg transition-all",f?"bg-primary/10 border border-primary":"hover:bg-muted/50 border border-transparent"),children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("div",{className:he("w-2 h-2 rounded-full shrink-0",s(c.priceLevel))}),w.jsx("span",{className:"text-sm text-foreground",children:ki(c.date)}),h.isAlmostFull&&w.jsxs("span",{className:"text-xs text-red-500",children:["🔥 ",h.spotsLeft]})]}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsxs("span",{className:he("font-bold",g?"text-green-600":b?"text-muted-foreground":"text-foreground"),children:["€",c.price.toFixed(2)]}),g&&w.jsxs(ip,{variant:"secondary",className:"text-xs bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400 border-0 px-1.5 py-0",children:["-",Math.abs(y).toFixed(2),"€"]}),b&&w.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",y.toFixed(2),"€"]})]})]},c.date.toISOString())})})]}),w.jsxs("div",{className:"flex items-center justify-center gap-4 pt-1 text-xs text-muted-foreground",children:[w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-500"}),w.jsx("span",{children:"Early bird"})]}),w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),w.jsx("span",{children:"Štandard"})]}),w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500"}),w.jsx("span",{children:"Late"})]})]})]})}const JE=["your-airwallex-link.com","airwallex.com","checkout.airwallex.com","pay.airwallex.com"];function QE(e){try{const t=new URL(e);return JE.some(r=>t.hostname===r||t.hostname.endsWith("."+r))}catch{return!1}}const op={default:{early:"https://pay.airwallex.com/sghfp6upue5i",standard:"https://pay.airwallex.com/sghfp6w25fv3",late:"https://pay.airwallex.com/sghfp6x8rnch",earlyInstallment:"https://pay.airwallex.com/sghfp70b955u",standardInstallment:"https://pay.airwallex.com/sghfp739q8o8",lateInstallment:"https://pay.airwallex.com/sghfp74wkkpg"},affiliate:{early:"https://pay.airwallex.com/sghfp7ixry2t",standard:"https://pay.airwallex.com/sghfp7k05tre",late:"https://pay.airwallex.com/sghfp7l1bylq",earlyInstallment:"https://pay.airwallex.com/sghfp7sixiap",standardInstallment:"https://pay.airwallex.com/sghfp7talqhs",lateInstallment:"https://pay.airwallex.com/sghfp7uaiim9"}};function YE(e){return op[e||"default"]||op.default}function XE(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get("partner")}function ZE(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())})}const eT=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
168class sh 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 tT extends sh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class ap extends sh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class lp extends sh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var jc;(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"})(jc||(jc={}));class rT{constructor(t,{headers:r={},customFetch:n,region:s=jc.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=eT(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return ZE(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 f={},{region:h}=n;h||(h=this.region);const y=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,y.searchParams.set("forceFunctionRegion",h));let g;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(f["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(f["Content-Type"]="application/json",g=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?g=JSON.stringify(u):g=u;let b=d;c&&(o=new AbortController,i=setTimeout(()=>o.abort(),c),d?(b=o.signal,d.addEventListener("abort",()=>o.abort())):b=o.signal);const m=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:g,signal:b}).catch(S=>{throw new tT(S)}),p=m.headers.get("x-relay-error");if(p&&p==="true")throw new ap(m);if(!m.ok)throw new lp(m);let v=((s=m.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return v==="application/json"?_=yield m.json():v==="application/octet-stream"||v==="application/pdf"?_=yield m.blob():v==="text/event-stream"?_=m:v==="multipart/form-data"?_=yield m.formData():_=yield m.text(),{data:_,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof lp||a instanceof ap?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const a0=3,up=e=>Math.min(1e3*2**e,3e4),nT=[520,503],l0=["GET","HEAD","OPTIONS"];var sT=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
168de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function cp(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 iT(e,t,r,n){return!(!n||r>=a0||!l0.includes(e)||!nT.includes(t))}var oT=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=new Headers(r.headers);o>0&&u.set("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,f)=>typeof f=="bigint"?f.toString():f),signal:r.signal})}catch(c){if((c==null?void 0:c.name)==="AbortError"||(c==null?void 0:c.code)==="ABORT_ERR"||!l0.includes(r.method))throw c;if(r.retryEnabled&&o<a0){const f=up(o);o++,await cp(f,r.signal);continue}throw c}if(iT(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,f=c!==null?Math.max(0,parseInt(c,10)||0)*1e3:up(o);await d.text(),o++,await cp(f,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 f,h,y,g;const p=(f=c==null?void 0:c.message)!==null&&f!==void 0?f:"",v=(h=c==null?void 0:c.code)!==null&&h!==void 0?h:"";l=`${(y=o==null?void 0:o.name)!==null&&y!==void 0?y:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
169
170Caused by: ${(g=c==null?void 0:c.name)!==null&&g!==void 0?g:"Error"}: ${p}`,v&&(l+=` (${v})`),c!=null&&c.stack&&(l+=`
171${c.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const m=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)",m>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${m} 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)",m>this.urlLengthLimit&&(u+=`. Your request URL is ${m} 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:""}}
171)),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 f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?n=f:n=JSON.parse(f))}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 sT(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},aT=class extends oT{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 dp=new RegExp("[,()]");var Qn=class extends aT{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"&&dp.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"&&dp.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])=>
171r!==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}},lT=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 Qn({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>
1710){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new Qn({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 Qn({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 Qn({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 Qn({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 Ji(e){"@babel/helpers - typeof";return Ji=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},Ji(e)}function uT(e,t){if(Ji(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ji(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cT(e){var t=uT(e,"string");return Ji(t)=="symbol"?t:t+""}function dT(e,t,r){return(t=cT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hp(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 Bo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hp(Object(r),!0).forEach(function(n){dT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hT=class u0{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,f=setTimeout(()=>c.abort(),i),h=d==null?void 0:d.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,d);const y=()=>{clearTimeout(f),c.abort()};return h.addEventListener("abort",y,{once:!0}),l(u,Bo(Bo({},d),{},{signal:c.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",y)})}return l(u,Bo(Bo({},d),{},{signal:c.signal})).finally(()=>clearTimeout(f))}: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 lT(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 u0(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=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(d)),c=n&&Object.values(r).some(d);c?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,y])=>y!==void 0).map(([h,y])=>[h,Array.isArray(y)?`{${y.join(",")}}`:`${y}
171`]).forEach(([h,y])=>{l.searchParams.append(h,y)})):(a="POST",u=r);const f=new Headers(this.headers);return c?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Qn({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class fT{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:
172import ws from "ws"
173new 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+=`
174
175Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const pT="2.105.4",mT=`realtime-js/${pT}`,gT="1.0.0",c0="2.0.0",vT=c0,yT=1e4,wT=100,jr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},d0={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Ic={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class bT{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 f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+c.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
175let y=new DataView(h),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,l.length),y.setUint8(g++,a.length),y.setUint8(g++,o.length),y.setUint8(g++,u.length),y.setUint8(g++,c.length),y.setUint8(g++,r),Array.from(l,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(a,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(o,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(u,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(c,m=>y.setUint8(g++,m.charCodeAt(0)));var b=new Uint8Array(h.byteLength+n.byteLength);return b.set(new Uint8Array(h),0),b.set(new Uint8Array(n),h.byteLength),b.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;const c=n.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,y={type:this.BROADCAST_EVENT,event:d,payload:h};return o>0&&(y.meta=JSON.parse(c)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_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 ie;(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"})(ie||(ie={}));const fp=(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]=xT(o,e,t,s),i),{}):{}},xT=(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)?h0(i,o):Lc(o)},h0=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return ET(t,r)}switch(e){case ie.bool:return _T(t);case ie.float4:case ie.float8:case ie.int2:case ie.int4:case ie.int8:case ie.numeric:case ie.oid:return ST(t);case ie.json:case ie.jsonb:return kT(t);case ie.timestamp:return TT(t);case ie.abstime:case ie.date:case ie.daterange:case ie.int4range:case ie.int8range:case ie.money:case ie.reltime:case ie.text:case ie.time:case ie.timestamptz:case ie.timetz:case ie.tsrange:case ie.tstzrange:return Lc(t);default:return Lc(t)}},Lc=e=>e,_T=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},ST=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},kT=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},ET=(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=>h0(t,a))}return e},TT=e=>typeof e=="string"?e.replace(" ","T"):e,f0=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 Ei=e=>typeof e=="function"?e:function(){return e},CT=typeof self<"u"?self:null,Yn=typeof window<"u"?window:null,Vt=CT||Yn||globalThis,RT="2.0.0",PT=1e4,AT=1e3,Gt={connecting:0,open:1,closing:2,closed:3},Qe={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},sr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},$c={longpoll:"longpoll",websocket:"websocket"},NT={complete:4},Dc="base64url.bearer.phx.",zo=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.recHo
vendor: 5,632 bytes, line 175
175oks=[],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})}},p0=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))}},OT=class{constructor(e,t,r){this.state=Qe.closed,this.topic=e,this.params=Ei(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new zo(this,sr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new p0(()=>{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=Qe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Qe.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=Qe.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=Qe.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 zo(this,sr.leave,Ei({}),this.timeout).send(),this.state=Qe.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(sr.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}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Qe.closed,this.bindings=[]}onClose(e){this.on(sr.close,e)}onError(e){return this.on(sr.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 zo(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=Qe.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(sr.close,"leave")},r=new zo(this,sr.leave,Ei({}),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=Qe.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===Qe.closed}isErrored(){return this.state===Qe.errored}isJoined(){return this.state===Qe.joined}isJoining(){return this.state===Qe.joining}isLeaving(){return this.state===Qe.leaving}},Wa=class{static request(e,t,r,n,s,i,o){if(Vt.XDomainRequest){let a=new Vt.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}
vendor: 3,068 bytes, line 175
175else if(Vt.XMLHttpRequest){let a=new Vt.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(Vt.fetch&&Vt.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),Vt.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===NT.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)}`}},jT=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)},Wn=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Dc)&&(this.authToken=atob(t[1].slice(Dc.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=Gt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+$c.websocket),"$1/"+$c.longpoll)}endpointURL(){return Wa.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Gt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Gt.open||this.readyState===Gt.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=Gt.open,this.onopen({}),this.poll();break;
vendor: 13,024 bytes, lines 175-176
175case 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=jT(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(`
176`),()=>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=Gt.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=Wa.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},IT=class hi{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=hi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=hi.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=hi.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 hi.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(g=>g.phx_ref),f=d.metas.map(g=>g.phx_ref),h=u.metas.filter(g=>f.indexOf(g.phx_ref)<0),y=d.metas.filter(g=>c.indexOf(g.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),y.length>0&&(a[l]=this.clone(d),a[l].metas=y)}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(f=>f.phx_ref),c=u.metas.filter(f=>d.indexOf(f.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))}},Ho={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 f=e.slice(a,e.byteLength),h={status:c,response:f};return{join_ref:l,ref:u,topic:d,event:sr.reply,payload:h}},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}}},LT=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||PT,this.transport=t.transport||Vt.WebSocket||Wn,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Vt&&Vt.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Ho.encode.bind(Ho),this.defaultDecoder=Ho.decode.bind(Ho),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!==Wn?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Yn&&Yn.addEventListener&&(Yn.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Yn.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),Yn.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=Ei(t.params||{}),this.endPoint=`${e}/${$c.websocket}`,this.vsn=t.vsn||RT,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new p0(()=>{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 Wn}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=Wa.appendParams(Wa.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=Ei(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Wn?this.connectWithFallback(Wn,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 Wn:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Dc}${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(),AT,"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===Gt.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 176
176triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(sr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Gt.connecting:return"connecting";case Gt.open:return"open";case Gt.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 OT(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 Ti{constructor(t,r){const n=DT(r);this.presence=new IT(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=Ti.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Ti.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ti.transformState(this.presence.state)}static transformState(t){return t=$T(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=ha(s),r},{})}static onJoinPayload(t,r,n){const s=pp(r),i=ha(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=pp(r),i=ha(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function ha(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function $T(e){return JSON.parse(JSON.stringify(e))}function DT(e){return(e==null?void 0:e.events)&&{events:e.events}}function pp(e){return e!=null&&e.metas?ha(e):[]}var mp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(mp||(mp={}));class MT{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Ti(this.channel.channelAdapter,r)}}function UT(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
176if(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 FT{constructor(t,r,n){const s=BT(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>wT){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===jr.joined}isJoined(){return this.state===jr.joined}isJoining(){return this.state===jr.joining}isClosed(){return this.state===jr.closed}isLeaving(){return this.state===jr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function BT(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 hs;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(hs||(hs={}));var ir;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ir||(ir={}));class Ci{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 FT(this.socket.socketAdapter,t,this.params),this.presence=new MT(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=f0(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(h=>h.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[hs.PRESENCE]&&this.bindings[hs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,c={},f={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(h=>{t==null||t(ir.CHANNEL_ERROR,UT(h))}),this._onClose(()=>t==null?void 0:t(ir.CLOSED)),this.updateJoinPayload(Object.assign({config:f},c)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(ir.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
176).receive("error",h=>{this.state=jr.errored;const y=Object.values(h).join(", ")||"error";t==null||t(ir.CHANNEL_ERROR,new Error(y,{cause:h}))}).receive("timeout",()=>{t==null||t(ir.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:f}}=l,h=t&&t[a];if(h&&h.event===u&&Ci.isFilterValueEqual(h.schema,d)&&Ci.isFilterValueEqual(h.table,c)&&Ci.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=jr.errored,r==null||r(ir.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=jr.errored&&r&&r(ir.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===hs.PRESENCE||t===hs.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={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}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 
176in 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 f=(s=this.bindings[c])===null||s===void 0?void 0:s.find(h=>h.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(c))if("id"in f){const h=f.id,y=(i=f.filter)===null||i===void 0?void 0:i.event;return h&&((o=r.ids)===null||o===void 0?void 0:o.includes(h))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((d=r==null?void 0:r.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===c})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=d0;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=fp(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=fp(t.columns,t.old_record)),r}}class zT{constructor(t,r){this.socket=new LT(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()==Ic.connecting}isDisconnecting(){return this.socket.connectionState()==Ic.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const vp={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},HT=[1e3,2e3,5e3,1e4],VT=1e4;function WT(){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 KT(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return WT()}const qT=`
177  addEventListener("message", (e) => {
178    if (e.data.event === "start") {
179      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
180    }
181  });`;class GT{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={}
181,this.ref=0,this.serializer=new bT,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 zT(t,s),this.httpEndpoint=f0(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}
182
183To use Realtime in Node.js, you need to provide a WebSocket implementation:
184
185Option 1: Use Node.js 22+ which has native WebSocket support
186Option 2: Install and provide the "ws" package:
187
188  npm install ws
189
190  import ws from "ws"
191  const client = new RealtimeClient(url, {
192    ...options,
193    transport: ws
194  })`):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()||Ic.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 Ci(`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}
194this._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:mT};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(d0.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([qT],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,u,d,c,f,h;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 y={};y.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:yT,y.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:vp.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:vp.HEARTBEAT_INTERVAL),y.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:fT.getWebSocketConstructor(),y.params=t==null?void 0:t.params,y.logger=t==null?void 0:t.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),y.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:KT(),y.reconnectAfterMs=(d=t==null?void 0:t.reconnectAfterMs)!==null&&d!==void 0?d:p=>HT[p-1]||VT;let g,b;const m=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:vT;switch(m){case gT:g=(p,v)=>v(JSON.stringify(p)),b=(p,v)=>v(JSON.parse(p));break;case c0:g=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=m,y.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:g,y.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:b,y.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,y.params=Object.assign(Object.assign({},y.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,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
194var Qi=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 JT(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 QT(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 YT(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=JT(e.baseUrl,n,s),l=await QT(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"),f=c&&d?JSON.parse(d):d;if(!u.ok){const h=c?f:void 0,y=h==null?void 0:h.error;throw new Qi((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Vo(e){return e.join("�")}var XT=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Vo(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/${Vo(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Vo(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Vo(e.namespace)}`}),!0}catch(t){if(t instanceof Qi&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Qi&&r.status===409)return;throw r}}};function Kn(e){return e.join("�")}var ZT=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/${Kn(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/${Kn(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/${Kn(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/${Kn(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/${Kn(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/${Kn(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Qi&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Qi&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},eC=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=YT({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new XT(this.client,t),this.tableOps=new ZT(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)}
194async 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 Yi(e){"@babel/helpers - typeof";return Yi=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},Yi(e)}function tC(e,t){if(Yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rC(e){var t=tC(e,"string");return Yi(t)=="symbol"?t:t+""}function nC(e,t,r){return(t=rC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yp(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 H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yp(Object(r),!0).forEach(function(n){nC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Cl=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 Rl(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Mc=class extends Cl{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 H({},super.toJSON())}},m0=class extends Cl{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Ka(e,t,r){const n=H({},e),s=t.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function sC(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const iC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),oC=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)},Uc=e=>{if(Array.isArray(e))return e.map(r=>Uc(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]=Uc(n)}),t},aC=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),wp=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)},lC=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 Mc(wp(o),i,a,n))}).catch(()=>{const o=i+"";t(new Mc(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new m0(wp(e),e,n))},uC=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return H(H({},s),r);if(oC(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=Ka(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),H(H({},s),r)};async function ai(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,uC(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=>lC(u,l,n,o))})}function g0(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,H(H({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>ai(t,"DELETE",r,s,i,n,e)}}const cC=g0("storage"),{get:Xi,post:At,put:Fc,head:dC,remove:ih}=cC,ot=g0("vectors");var Gs=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=sC(t),this.fetch=iC(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Ka(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(Rl(r))return{data:null,error:r};throw r}}},hC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;
194if(Rl(t))return{data:null,error:t};throw t}}};let v0;v0=Symbol.toStringTag;var fC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[v0]="BlobDownloadBuilder",this.promise=null}asStream(){return new hC(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(Rl(t))return{data:null,error:t};throw t}}};const pC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},bp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var mC=class extends Gs{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=H(H({},bp),n);let a=H(H({},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[f,h]of Object.entries(n.headers))a=Ka(a,f,h);const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),c=await(e=="PUT"?Fc:At)(s.fetch,`${s.url}/object/${d}`,i,H({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=H(H({},bp),n);let d=H(H({},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[f,h]of Object.entries(n.headers))d=Ka(d,f,h);return{path:i,fullPath:(await Fc(s.fetch,a.toString(),l,H({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=H({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await At(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 Cl("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 At(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
194stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await At(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 At(n.fetch,`${n.url}/object/sign/${s}`,H({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 At(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=>H(H({},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=()=>Xi(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new fC(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Uc(await Xi(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await dC(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Rl(s)){var n;const i=s instanceof Mc?s.status:s instanceof m0?(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 ih(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=H(H(H({},pC),t),{},{prefix:e||""});return await At(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=H({},e);return await At(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 gC="2.105.4",po={"X-Client-Info":`storage-js/${gC}`};var vC=class extends Gs{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=H(H({},po),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Xi(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Xi(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await At(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 Fc(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 At(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ih(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():""}},yC=class extends Gs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},po),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await At(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
194{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 Xi(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ih(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!aC(e))throw new Cl("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 eC({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}}}}})}},wC=class extends Gs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},po),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await ot.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await ot.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},bC=class extends Gs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},po),{},{"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 ot.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await ot.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 ot.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await ot.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 ot.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},xC=class extends Gs{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},po),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ot.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},_C=class extends xC{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new SC(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)}},SC=class extends wC{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,H(H({},e),{},{vectorBucketName:r.vectorBucketName}))}
194async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,H(H({},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 kC(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},kC=class extends bC{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,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},EC=class extends vC{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new mC(this.url,this.headers,e,this.fetch)}get vectors(){return new _C(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new yC(this.url+"/iceberg",this.headers,this.fetch)}};function Pl(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}const y0="2.105.4",Xn=30*1e3,Bc=3,gu=Bc*Xn,TC="http://localhost:9999",CC="supabase.auth.token",RC={"X-Client-Info":`gotrue-js/${y0}`},zc="X-Supabase-Api-Version",w0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},PC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,AC=10*60*1e3;class Zi 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 L(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class NC extends Zi{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function OC(e){return L(e)&&e.name==="AuthApiError"}class Lt extends Zi{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class yr extends Zi{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Ce extends yr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Wo(e){return L(e)&&e.name==="AuthSessionMissingError"}class qn extends yr{constructor(){super("Auth session or user missing","AuthInvalidToken
194ResponseError",500,void 0)}}class Ko extends yr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class qo extends yr{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 jC(e){return L(e)&&e.name==="AuthImplicitGrantRedirectError"}class xp extends yr{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 IC extends yr{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 Hc extends yr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function vu(e){return L(e)&&e.name==="AuthRetryableFetchError"}class _p extends yr{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 Vc extends yr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const qa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Sp=` 	
195\r=`.split(""),LC=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Sp.length;t+=1)e[Sp[t].charCodeAt(0)]=-2;for(let t=0;t<qa.length;t+=1)e[qa[t].charCodeAt(0)]=t;return e})();function kp(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(qa[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(qa[n]),t.queuedBits-=6}}function b0(e,t,r){const n=LC[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 Ep(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{MC(o,n,r)};for(let o=0;o<e.length;o+=1)b0(e.charCodeAt(o),s,i);return t.join("")}function $C(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 DC(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}$C(n,t)}}function MC(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 Ss(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)b0(e.charCodeAt(s),r,n);return new Uint8Array(t)}function UC(e){const t=[];return DC(e,r=>t.push(r)),new Uint8Array(t)}function xn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>kp(s,r,n)),kp(null,r,n),t.join("")}function FC(e){return Math.round(Date.now()/1e3)+e}function BC(){return Symbol("auth-callback")}const Ne=()=>typeof window<"u"&&typeof document<"u",fn={tested:!1,writable:!1},x0=()=>{if(!Ne())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(fn.tested)return fn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),fn.tested=!0,fn.writable=!0}catch{fn.tested=!0,fn.writable=!1}return fn.writable};function zC(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
195h((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const _0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),HC=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Zn=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},pn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Ae=async(e,t)=>{await e.removeItem(t)};class Al{constructor(){this.promise=new Al.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Al.promiseConstructor=Promise;function Go(e){const t=e.split(".");if(t.length!==3)throw new Vc("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!PC.test(t[n]))throw new Vc("JWT not in base64url format");return{header:JSON.parse(Ep(t[0])),payload:JSON.parse(Ep(t[1])),signature:Ss(t[2]),raw:{header:t[0],payload:t[1]}}}async function VC(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function WC(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 KC(e){return("0"+e.toString(16)).substr(-2)}function qC(){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,KC).join("")}async function GC(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 JC(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 GC(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Gn(e,t,r=!1){const n=qC();let s=n;r&&(s+="/recovery"),await Zn(e,`${t}-code-verifier`,s);const i=await JC(n);return[i,n===i?"plain":"s256"]}const QC=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function YC(e){const t=e.headers.get(zc);if(!t||!t.match(QC))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function XC(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 ZC(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 eR=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function tr(e){if(!eR.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Ct(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 yu(){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 tR(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
195if(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 Tp(e){return JSON.parse(JSON.stringify(e))}const vn=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)},rR=[502,503,504,520,521,522,523,524,530];async function Cp(e){var t;if(!HC(e))throw new Hc(vn(e),0);if(rR.includes(e.status))throw new Hc(vn(e),e.status);let r;try{r=await e.json()}catch(i){throw new Lt(vn(i),i)}let n;const s=YC(e);if(s&&s.getTime()>=w0["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 _p(vn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Ce}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 _p(vn(r),e.status,r.weak_password.reasons);throw new NC(vn(r),e.status||500,n)}const nR=(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 U(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[zc]||(i[zc]=w0["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 sR(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 sR(e,t,r,n,s,i){const o=nR(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new Hc(vn(l),0)}if(a.ok||await Cp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Cp(l)}}function pt(e){var t;let r=null;aR(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=FC(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Rp(e){const t=pt(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 Ir(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function iR(e){return{data:e,error:null}}function oR(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=Pl(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 Pp(e){return e}function aR(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const wu=["global","local","others"];class lR{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=_0(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=wu[0]){if(wu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${wu.join(", ")}`);try{return await U(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(L(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await U(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Ir})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Pl(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 U(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:oR,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(L(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await U(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ir})}catch(r){if(L(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 U(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:Pp});if(d.error)throw d.error;const c=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
1950&&(h.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(L(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){tr(t);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ir})}catch(r){if(L(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){tr(t);try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Ir})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){tr(t);try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Ir})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){tr(t.userId);try{const{data:r,error:n}=await U(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(L(r))return{data:null,error:r};throw r}}async _deleteFactor(t){tr(t.userId),tr(t.id);try{return{data:await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(L(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 U(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:Pp});if(d.error)throw d.error;const c=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},c),u),error:null}}catch(u){if(L(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await U(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(L(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await U(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await U(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(L(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await U(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await U(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(L(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await U(this.fetch,"DELET
195E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){Ct(this.experimental),tr(t.userId);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){Ct(this.experimental),tr(t.userId),tr(t.passkeyId);try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}}function Ap(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const zt={debug:!!(globalThis&&x0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class S0 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Np extends S0{}async function uR(e,t,r){zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),zt.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){clearTimeout(s),zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Np(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(zt.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await r()}})}catch(i){if(t>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&t>0){if(n.signal.aborted)return zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await r()}finally{zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw zt.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Np(`Lock "${e}" was released because another request stole it`)}throw i}}function cR(){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 k0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function dR(e){return parseInt(e,16)}function hR(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function fR(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:f}=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(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
196`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=k0(e.address),y=d?`${d}://${n}`:n,g=e.statement?`${e.statement}
197`:"",b=`${y}
197 wants you to sign in with your Ethereum account:
198${h}
199
200${g}`;let m=`URI: ${c}
201Version: ${f}
202Chain ID: ${r}${o?`
203Nonce: ${o}`:""}
204Issued At: ${i.toISOString()}`;if(s&&(m+=`
205Expiration Time: ${s.toISOString()}`),a&&(m+=`
206Not Before: ${a.toISOString()}`),l&&(m+=`
207Request ID: ${l}`),u){let p=`
208Resources:`;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}`);p+=`
209- ${v}`}m+=p}return`${b}
210${m}`}class _e 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 Ga extends _e{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function pR({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 _e({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 _e({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 _e({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 _e({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 _e({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new _e({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 _e({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new _e({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(E0(o)){if(i.rp.id!==o)return new _e({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _e({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 _e({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 _e({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 _e({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function mR({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 _e({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new _e({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(E0(n)){if(r.rpId!==n)return new _e({message:`The RP ID "${r.rpId}
210" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _e({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new _e({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 _e({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class gR{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 Wc=new gR;function Op(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=Pl(e,["challenge","user","excludeCredentials"]),i=Ss(t).buffer,o=Object.assign(Object.assign({},r),{id:Ss(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:Ss(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function jp(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=Pl(e,["challenge","allowCredentials"]),s=Ss(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:Ss(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Ip(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:xn(new Uint8Array(e.response.attestationObject)),clientDataJSON:xn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Lp(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:xn(new Uint8Array(s.authenticatorData)),clientDataJSON:xn(new Uint8Array(s.clientDataJSON)),signature:xn(new Uint8Array(s.signature)),userHandle:s.userHandle?xn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function E0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Ja(){var e,t;return!!(Ne()&&"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 T0(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ga("Browser returned unexpected credential type",t)}:{data:null,error:new Ga("Empty credential response",t)}}catch(t){return{data:null,error:pR({error:t,options:e})}}}async function C0(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ga("Browser returned unexpected credential type",t)}:{data:null,error:new Ga("Empty credential response",t)}}
210catch(t){return{data:null,error:mR({error:t,options:e})}}}const vR={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},yR={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Qa(...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]=Qa(a,o):n[i]=Qa(o)}else n[i]=o}return n}function wR(e,t){return Qa(vR,e,t||{})}function bR(e,t){return Qa(yR,e,t||{})}class xR{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??Wc.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 h=(await this.client.getUser()).data.user,y=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";d.name=`${d.id}:${y}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=wR(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:c,error:f}=await T0({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:f}}case"request":{const d=bR(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:c,error:f}=await C0(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:f}}}}catch(a){return L(a)?{data:null,error:a}:{data:null,error:new Lt("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 Zi("rpId is required for WebAuthn authentication")};try{if(!Ja())return{data:null,error:new Lt("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 L(o)?{data:null,error:o}:{data:null,error:new Lt("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 Zi("rpId is required for WebAuthn registration")};try{if(!Ja())return{data:null,error:new Lt("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(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.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 L(o)?{data:null,error:o}:{data:null,error:new Lt("Unexpected error in register",o)}}}}cR();const _R={url:TC,storageKey:CC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:RC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function $p(e,t,r){return await r()}const Jn={};class eo{get jwks(){var t,r;return(r=(t=Jn[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Jn[this.storageKey]=Object.assign(Object.assign({},Jn[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Jn[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Jn[this.storageKey]=Object.assign(Object.assign({},Jn[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},_R),t);
210if(this.storageKey=o.storageKey,this.instanceID=(r=eo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,eo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Ne()){const a=`${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(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(n=o.experimental)!==null&&n!==void 0?n:{},this.admin=new lR({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=_0(o.fetch),this.lock=o.lock||$p,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&Ne()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=uR:this.lock=$p,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 xR(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:x0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Ap(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Ap(this.memoryStorage)),Ne()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${y0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Ne()&&(r=zC(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ne()&&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),jC(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 L(r)?this._returnResult({error:r}):this._returnResult({error:new Lt("Unexpected error during initialization",r)}
210)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await U(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:pt}),{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(L(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:f}=t;let h=null,y=null;this.flowType==="pkce"&&([h,y]=await Gn(this.storage,this.storageKey)),i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:c,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:y},xform:pt})}else if("phone"in t){const{phone:d,password:c,options:f}=t;i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:c,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:pt})}else throw new Ko("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ae(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 Ae(this.storage,`${this.storageKey}-code-verifier`),L(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 U(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:Rp})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await U(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:Rp})}else throw new Ko("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 qn;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(L(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._acquireLock(this.lockAcquireTimeout,async()=>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,f;let h,y;if("message"in t)h=t.message,y=t.signature;else{const{chain:g,wallet:b,statement:m,options:p}=t;let v;if(Ne())if(typeof b=="object")v=b;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")v=N.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 b!="object"||!(p!=null&&p.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=b}const _=new URL((r=p==null?void 0:p.url)!==null&&r!==void 0?r:window.location.href),S=await v.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=k0(S[0]);
210let E=(n=p==null?void 0:p.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const N=await v.request({method:"eth_chainId"});E=dR(N)}const P={domain:_.host,address:k,statement:m,uri:_.href,version:"1",chainId:E,nonce:(s=p==null?void 0:p.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=p==null?void 0:p.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=p==null?void 0:p.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=p==null?void 0:p.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=p==null?void 0:p.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=p==null?void 0:p.signInWithEthereum)===null||d===void 0?void 0:d.resources};h=fR(P),y=await v.request({method:"personal_sign",params:[hR(h),k]})}try{const{data:g,error:b}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:y},!((c=t.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:pt});if(b)throw b;if(!g||!g.session||!g.user){const m=new qn;return this._returnResult({data:{user:null,session:null},error:m})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:b})}catch(g){if(L(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,d,c,f,h;let y,g;if("message"in t)y=t.message,g=t.signature;else{const{chain:b,wallet:m,statement:p,options:v}=t;let _;if(Ne())if(typeof m=="object")_=m;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.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 m!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=m}const S=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),p?{statement:p}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)y=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),g=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...p?["",p,""]:[""],"Version: 1",`URI: ${S.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(E=>`- ${E}`)]:[]].join(`
211`);const k=await _.signMessage(new TextEncoder().encode(y),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=k}}try{const{data:b,error:m}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:xn(g)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:pt});if(m)throw m;if(!b||!b.session||!b.user){const p=new qn;return this._returnResult({data:{user:null,session:null},error:p})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:m})}catch(b){if(L(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await pn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new IC;const{data:i,error:o}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:pt});if(await Ae(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new qn;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 Ae(this.storage,`${this.storageKey}-code-verifier`),L(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 U(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:pt}),{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 qn;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(L(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 Gn(this.storage,this.storageKey));const{error:c}=await U(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 U(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 Ko("You must provide either an email or phone number.")}catch(a){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),L(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 U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:pt});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(L(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 Gn(this.storage,this.storageKey));const u=await U(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:iR});return!((i=u.data)===null||i===void 0)&&i.url&&Ne()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),L(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Ce;const{error:s}=await U(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(L(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,{error:o}=await U(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await U(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 Ko("You must provide either an email or phone number and a type")}catch(r){if(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}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.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await pn(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 val
211id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<gu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await pn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=yu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=tR(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);return i?this._returnResult({data:{session:null},error:i}):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;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ir}):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 Ce}:await U(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:Ir})})}catch(r){if(L(r))return Wo(r)&&(await this._removeSession(),await Ae(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>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 Ce;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Gn(this.storage,this.storageKey));const{data:u,error:d}=await U(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:Ir});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 Ae(this.storage,`${this.storageKey}-code-verifier`),L(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ce;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Go(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(L(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async 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 Ce;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(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;
211try{if(!Ne())throw new qo("No browser detected.");if(t.error||t.error_description||t.error_code)throw new qo(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 xp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new qo("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 xp("No code detected.");const{data:v,error:_}=await this._exchangeCodeForSession(t.code);if(_)throw _;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.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 qo("No session defined in URL");const c=Math.round(Date.now()/1e3),f=parseInt(l);let h=c+f;u&&(h=parseInt(u));const y=h-c;y*1e3<=Xn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${f}s`);const g=h-f;c-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,c):c-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,h,c);const{data:b,error:m}=await this._getUser(o);if(m)throw m;const p={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:a,token_type:d,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:p,redirectType:t.type},error:null})}catch(s){if(L(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_description)}async _isPKCECallback(t){const r=await pn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!Wo(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&&!(OC(a)&&(a.status===404||a.status===401||a.status===403)||Wo(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Ae(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=BC(),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,await this._acquireLock(this.lockAcquireTimeout,async()=>{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),Wo(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Gn(this.storage,this.storageKey,!0));try{return await U(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 Ae(this.storage,`${this.storageKey}-code-verifier`),L(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(L(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:f}=i;if(f)throw f;const h=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 U(this.fetch,"GET",h,{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 Ne()&&!(!((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(L(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 U(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:pt}),{data:f,error:h}=c;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new qn}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Ae(this.storage,`${this.storageKey}-code-verifier`),L(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;
211return await U(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(L(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await WC(async s=>(s>0&&await VC(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:pt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&vu(i)&&Date.now()+o-n<Xn})}catch(n){if(this._debug(r,"error",n),L(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),Ne()&&!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 pn(this.storage,this.storageKey);if(s&&this.userStorage){let o=await pn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Zn(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:yu()}else if(s&&!s.user&&!s.user){const o=await pn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ae(this.storage,this.storageKey+"-user"),await Zn(this.storage,this.storageKey,s)):s.user=yu()}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()<gu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${gu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),vu(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}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 Ce;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Al;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Ce;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),L(i)){const o={data:null,error:i};return vu(i)||await this._removeSession(),(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 Ae(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 Zn(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Tp(s);await Zn(this.storage,this.storageKey,i)}else{const s=Tp(r);await Zn(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ae(this.storage,this.storageKey),await Ae(this.storage,this.storageKey+"-code-verifier"),await Ae(this.storage,this.storageKey+"-user"),this.userStorage&&await Ae(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ne()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
211catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Xn);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 _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");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)/Xn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Xn}ms, refresh threshold is ${Bc} ticks`),s<=Bc&&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 S0)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ne()||!(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})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,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 Gn(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 U(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(L(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 U(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(L(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Ip(t.webauthn.credential_response):Lp(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Op(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:jp(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw 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:h}=Go(t);let y=null;h.aal&&(y=h.aal);let g=y;const{data:{user:b},error:m}=await this.getUser(t);if(m)return this._returnResult({data:null,error:m});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(g="aal2");const v=h.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:v},error:null}}catch(h){if(L(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
211=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}=Go(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(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},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 U(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 Ce})})}catch(r){if(L(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 Ce});const o=await U(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&&Ne()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(L(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 Ce});const o=await U(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&&Ne()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(L(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 U(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 Ce})})}catch(t){if(L(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 U(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 Ce})})}catch(r){if(L(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+AC>s)return n;const{data:i,error:o}=await U(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:h,error:y}
211=await this.getSession();if(y||!h.session)return this._returnResult({data:null,error:y});n=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Go(n);r!=null&&r.allowExpired||XC(i.exp);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:h}=await this.getUser(n);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const d=ZC(s.alg),c=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,c,o,UC(`${a}.${l}`)))throw new Vc("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s;Ct(this.experimental);try{if(!Ja())return this._returnResult({data:null,error:new Lt("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=jp(i.options),l=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Wc.createNewAbortSignal(),{data:u,error:d}=await C0({publicKey:a,signal:l});if(d||!u)return this._returnResult({data:null,error:d??new Lt("WebAuthn ceremony failed",null)});const c=Lp(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:c})}catch(i){if(L(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var r,n;Ct(this.experimental);try{if(!Ja())return this._returnResult({data:null,error:new Lt("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=Op(s.options),a=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Wc.createNewAbortSignal(),{data:l,error:u}=await T0({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new Lt("WebAuthn ceremony failed",null)});const d=Ip(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:d})}catch(s){if(L(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Ct(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 Ce});const{data:s,error:i}=await U(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(L(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Ct(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 Ce});const{data:i,error:o}=await U(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(L(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;Ct(this.experimental);try{const{data:n,error:s}=await U(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(L(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){Ct(this.experimental);try{const{data:r,error:n}=await U(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:pt});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(L(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){Ct(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 Ce});const{data:s,error:i}=await U(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(L(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Ct(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 Ce});const{data:i,error:o}=await U(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(L(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){Ct(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 Ce});const{error:i}
211=await U(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(L(r))return this._returnResult({data:null,error:r});throw r}}}eo.nextInstanceID={};const SR=eo,kR="2.105.4";let fi="";typeof Deno<"u"?fi="deno":typeof document<"u"?fi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?fi="react-native":fi="node";const ER={"X-Client-Info":`supabase-js-${fi}/${kR}`},TR={headers:ER},CR={schema:"public"},RR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},PR={};function to(e){"@babel/helpers - typeof";return to=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},to(e)}function AR(e,t){if(to(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(to(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NR(e){var t=AR(e,"string");return to(t)=="symbol"?t:t+""}function OR(e,t,r){return(t=NR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dp(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 ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dp(Object(r),!0).forEach(function(n){OR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const jR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),IR=()=>Headers,LR=(e,t,r)=>{const n=jR(r),s=IR();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(i,ye(ye({},o),{},{headers:u}))}};function $R(e){return e.endsWith("/")?e:e+"/"}function DR(e,t){var r,n;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:u,realtime:d,global:c}=t,f={db:ye(ye({},l),s),auth:ye(ye({},u),i),realtime:ye(ye({},d),o),storage:{},global:ye(ye(ye({},c),a),{},{headers:ye(ye({},(r=c==null?void 0:c.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function MR(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL($R(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var UR=class extends SR{constructor(e){super(e)}},FR=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=MR(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:CR,realtime:PR,auth:ye(ye({},RR),{},{storageKey:o}),global:TR},l=DR(r??{},a);if(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=LR(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(ye({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 hT(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 EC(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new rT(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)}
211channel(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:f},h,y){const g={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new UR({url:this.authUrl.href,headers:ye(ye({},g),h),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:d,fetch:y,lockAcquireTimeout:c,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new GT(this.realtimeUrl.href,ye(ye({},e),{},{params:ye(ye({},{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 BR=(e,t,r)=>new FR(e,t,r);function zR(){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}zR()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const HR="https://qwjenikzekmyoiatdscb.supabase.co",VR="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InF3amVuaWt6ZWtteW9pYXRkc2NiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjkwOTI3MzcsImV4cCI6MjA4NDY2ODczN30.o3xdfqyUBMO5LHTELnCY8BKVx4XAEe22f4wD7OJoX0s",WR=BR(HR,VR,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}});function KR({customerData:e,paymentLinks:t,partnerId:r}){const{toast:n}=lv(),[s,i]=x.useState([]),[o,a]=x.useState(null),[l,u]=x.useState(null),[d,c]=x.useState(!1),[f,h]=x.useState(1),y=x.useRef(null);x.useEffect(()=>{const v=o0();i(v);const _=WE(e.weeksPostpartum);u(_),a(_)},[e.weeksPostpartum]),x.useEffect(()=>{if(f===1&&y.current){const v=setTimeout(()=>{var _;(_=y.current)==null||_.scrollIntoView({behavior:"smooth",block:"center"})},1100);return()=>clearTimeout(v)}},[f]);const[g,b]=x.useState(null),m=async()=>{if(o){c(!0);try{const{error:v}=await WR.functions.invoke("mailerlite-subscribe",{body:{email:e.email,firstName:e.firstName,phone:e.phone,weeksPostpartum:e.weeksPostpartum,selectedProgram:ki(o.date),priceLevel:o.priceLevel,price:o.price,clickedPayment:!0,brandSource:r||"default"}});v&&console.error("MailerLite error:",v);const _=t[o.priceLevel];if(!QE(_)){console.error("Invalid payment URL configuration:",_),n({title:"Chyba konfigurácie",description:"Platobný odkaz nie je správne nastavený. Kontaktuj nás prosím.",variant:"destructive"});return}const S=window.open(_,"_blank","noopener,noreferrer");(!S||S.closed)&&b(_)}catch(v){console.error("Error:",v),n({title:"Niečo sa pokazilo",description:"Skús to prosím znova alebo nás kontaktuj.",variant:"destructive"})}finally{c(!1)}}};if(s.length===0)return w.jsx("div",{className:"text-center py-12",children:w.jsx("p",{className:"text-muted-foreground",children:"Momentálne nie sú dostupné žiadne nadchádzajúce termíny."})});const p=o?Hr.late-o.price:0;return w.jsxs("div",{className:"w-full max-w-md mx-auto space-y-5 animate-fade-in",children:[w.jsxs("div",{className:"text-center",children:[w.jsx("h2",{className:"text-xl font-semibold text-foreground mb-1",children:f===1?`${e.firstName}, máme pre teba termíny! 🎉`:"Vyber si termín 📅"}),w.jsx("p",{className:"text-sm text-muted-foreground",children:f===1?"Ešte predtým ti ukážeme, čo všetko získaš":`${e.
211weeksPostpartum} týždňov po pôrode`})]}),w.jsxs("div",{className:"flex items-center justify-center gap-2",children:[w.jsx("div",{className:`w-8 h-1 rounded-full transition-colors ${f>=1?"bg-primary":"bg-muted"}`}),w.jsx("div",{className:`w-8 h-1 rounded-full transition-colors ${f>=2?"bg-primary":"bg-muted"}`})]}),f===1&&w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"bg-primary/5 rounded-lg p-3 text-center border border-primary/20 animate-stagger-1",children:[w.jsx("p",{className:"text-sm font-medium text-foreground mb-1",children:"🏆 Najúspešnejší rehabilitačný program na Slovensku"}),w.jsxs("p",{className:"text-xs text-muted-foreground",children:[w.jsx("strong",{className:"text-foreground",children:"8-týždňový LIVE program"})," • Obsah máš navždy k dispozícii"]})]}),w.jsx("div",{className:"bg-muted/50 rounded-lg p-3 text-center animate-stagger-1",children:w.jsxs("p",{className:"text-sm text-muted-foreground",children:["Pri kúpe ",w.jsx("strong",{className:"text-foreground",children:"Rehability LIVE programu"})," získaš okamžite:"]})}),w.jsxs("div",{className:"bg-gradient-to-br from-amber-50 to-orange-50 dark:from-amber-950/30 dark:to-orange-950/30 rounded-xl p-4 border border-amber-200/50 dark:border-amber-800/50 animate-stagger-2",children:[w.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[w.jsx("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-amber-500 text-white text-xs font-bold",children:"1"}),w.jsx("span",{className:"font-semibold text-foreground",children:"Exkluzívny bonus"}),w.jsx("span",{className:"ml-auto text-xs bg-amber-500 text-white px-2 py-0.5 rounded-full",children:"hodnota €120"})]}),w.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[w.jsx(du,{className:"w-5 h-5 text-amber-600"}),w.jsx("h3",{className:"font-bold text-foreground",children:"OKAMŽITÝ PRÍSTUP DO KNIŽNICE"})]}),w.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-2",children:[w.jsx(m_,{className:"w-4 h-4"}),w.jsxs("span",{children:[w.jsx("strong",{className:"text-foreground",children:"300+ minút"})," vysokohodnotného obsahu"]})]}),w.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:["Experti: ",w.jsx("span",{className:"font-medium text-foreground",children:"Radmila Telváková"}),", ",w.jsx("span",{className:"font-medium text-foreground",children:"Daniela Dvorská"}),", ",w.jsx("span",{className:"font-medium text-foreground",children:"Katarína Bagniari"})]}),w.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t border-amber-200/50 dark:border-amber-800/50",children:[w.jsx(h_,{className:"w-4 h-4 text-amber-600"}),w.jsxs("span",{className:"text-xs text-muted-foreground",children:[w.jsx("strong",{className:"text-foreground",children:"Týždenné konzultácie predĺžené"})," z 30 min → ",w.jsx("span",{className:"text-amber-600 font-semibold",children:"45 min"})]})]})]}),w.jsxs("div",{className:"bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20 rounded-xl p-4 border border-primary/20 animate-stagger-3",children:[w.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[w.jsx("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-primary text-primary-foreground text-xs font-bold",children:"2"}),w.jsx("span",{className:"font-semibold text-foreground",children:"Cenové zvýhodnenie"}),w.jsx("span",{className:"ml-auto text-xs bg-primary text-primary-foreground px-2 py-0.5 rounded-full",children:"ušetri až €20"})]}),w.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Čím skôr sa rozhodneš, tým menej zaplatíš"}),o&&w.jsx(KE,{currentPriceLevel:o.priceLevel,daysUntilStart:o.daysUntilStart})]}),w.jsxs("div",{className:"flex items-center justify-between gap-3 px-1 animate-stagger-4",children:[w.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[w.jsxs("div",{className:"flex -space-x-1.5",children:[w.jsx("div",{className:"w-5 h-5 rounded-full bg-primary/20 border border-background flex items-center justify-center text-[10px] font-medium",children:"M"}),w.jsx("div",{className:"w-5 h-5 rounded-full bg-primary/30 border border-background flex items-center justify-center text-[10px] font-medium",children:"K"}),w.jsx("div",{className:"w-5 h-5 rounded-full bg-primary/40 border border-background flex items-center justify-center text-[10px] font-medium",children:"Z"})]}),w.jsxs("span",{children:[w.jsx("strong",{className:"text-foreground",children:"2 000+"})," žien"]})]}),w.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[w.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((v,_)=>w.jsx(v_,{className:"w-2.5 h-2.5 fill-amber-400 text-amber-400"},_))}),w.jsx("span",{className:"text-muted-foreground italic",children:'"Cítim sa lepšie ako pred tehotenstvom."'})]})]}
211),w.jsxs(_s,{ref:y,className:"w-full h-12 text-base animate-stagger-5",onClick:()=>h(2),children:["Vybrať termín",w.jsx(gc,{className:"w-4 h-4 ml-2"})]})]}),f===2&&w.jsxs("div",{className:"space-y-4 animate-fade-in",children:[w.jsxs("button",{onClick:()=>h(1),className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[w.jsx(c_,{className:"w-4 h-4"}),"Späť na prehľad"]}),w.jsxs("div",{className:"flex items-center gap-2 bg-amber-50 dark:bg-amber-950/30 rounded-lg px-3 py-2 border border-amber-200/50 dark:border-amber-800/50",children:[w.jsx(du,{className:"w-4 h-4 text-amber-500"}),w.jsxs("span",{className:"text-xs text-muted-foreground",children:["+ ",w.jsx("strong",{className:"text-foreground",children:"okamžitý prístup"})," do Rehability knižnice ",w.jsx("span",{className:"text-amber-600 font-medium",children:"(hodnota €120)"})]})]}),w.jsx(GE,{programs:s,selectedProgram:o,recommendedProgram:l,onSelect:a}),o&&w.jsxs("div",{className:"bg-card rounded-xl p-5 border shadow-sm space-y-4",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsxs("div",{children:[w.jsx("span",{className:"text-sm text-muted-foreground",children:"Tvoj termín"}),w.jsx("div",{className:"font-semibold text-foreground",children:ki(o.date)})]}),w.jsxs("div",{className:"text-right",children:[w.jsxs("div",{className:"text-2xl font-bold text-foreground",children:["€",o.price.toFixed(2)]}),p>0&&w.jsxs("div",{className:"text-sm text-primary font-medium flex items-center gap-1 justify-end",children:[w.jsx(g_,{className:"w-3 h-3"}),"Ušetríš €",p.toFixed(2)]})]})]}),w.jsx("div",{className:"bg-muted/50 rounded-lg p-3 text-sm",children:w.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[w.jsx(du,{className:"w-4 h-4 text-amber-500"}),w.jsxs("span",{children:["Vrátane ",w.jsx("strong",{className:"text-foreground",children:"Rehability knižnice"})," (€120 hodnota)"]})]})}),w.jsxs("div",{className:"bg-primary/5 border border-primary/20 rounded-lg p-3 text-sm space-y-2",children:[w.jsxs("p",{className:"font-medium text-foreground text-center",children:["👉 Budeš presmerovaná na platobnú bránu ",w.jsx("strong",{children:"Airwallex"}),", ktorú v Trinity používame."]}),w.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Po úspešnej platbe je tvoje miesto a cena isté. Do 24 hodín ťa kontaktujeme s prístupom do knižnice a informáciami k programu."})]}),w.jsx(_s,{className:"w-full h-12 text-base",onClick:m,disabled:d,children:d?w.jsxs(w.Fragment,{children:[w.jsx(f_,{className:"w-4 h-4 mr-2 animate-spin"}),"Spracovávam..."]}
211):w.jsxs(w.Fragment,{children:["Pokračovať k platbe €",o.price.toFixed(2),w.jsx(Af,{className:"w-4 h-4 ml-2"})]})}),g&&w.jsxs("div",{className:"bg-amber-50 dark:bg-amber-950/30 border border-amber-200/50 dark:border-amber-800/50 rounded-lg p-4 text-center space-y-3 animate-fade-in",children:[w.jsx("p",{className:"text-sm text-foreground font-medium",children:"Platobná stránka sa neotvorila? Klikni sem:"}),w.jsxs(_s,{variant:"outline",className:"w-full",onClick:()=>window.open(g,"_blank","noopener,noreferrer"),children:["Otvoriť platbu €",o.price.toFixed(2),w.jsx(Af,{className:"w-4 h-4 ml-2"})]})]})]})]})]})}function qR(){const[e,t]=x.useState(null),r=x.useMemo(()=>XE(),[]),n=x.useMemo(()=>YE(r),[r]),s=i=>{t(i)};return w.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/30 py-8 px-4",children:w.jsxs("div",{className:"max-w-lg mx-auto",children:[w.jsxs("div",{className:"text-center mb-8",children:[w.jsx("h1",{className:"text-3xl font-bold text-foreground mb-2",children:"Rehability"}),w.jsx("p",{className:"text-muted-foreground",children:"Tvoja cesta cítiť sa opäť silne vo vlastnom tele začína tu."})]}),w.jsx("div",{className:"bg-card rounded-2xl shadow-lg border p-6 md:p-8",children:e?w.jsx(KR,{customerData:e,paymentLinks:n,partnerId:r}):w.jsx(FE,{onSubmit:s})})]})})}const GR=()=>w.jsx(qR,{}),JR=()=>{const e=Fy();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),w.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:w.jsxs("div",{className:"text-center",children:[w.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),w.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),w.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},QR=new Rk,YR=()=>w.jsx(Ak,{client:QR,children:w.jsxs(sk,{children:[w.jsx(tS,{}),w.jsx(jS,{}),w.jsx(mE,{children:w.jsxs(hE,{children:[w.jsx(Rc,{path:"/",element:w.jsx(GR,{})}),w.jsx(Rc,{path:"*",element:w.jsx(JR,{})})]})})]})});av(document.getElementById("root")).render(w.jsx(YR,{}));

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.