PageSourceSearch

https://lazy-jane.com/assets/index-DDeK_t2R.js

js lazy-jane.com collected 2026-10-09 22:02:54 UTC 602,124 bytes, 181 lines download raw bytes

vendor: 6,285 bytes, lines 1-9
1var ox=Object.defineProperty;var Af=e=>{throw TypeError(e)};var ix=(e,t,r)=>t in e?ox(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var dr=(e,t,r)=>ix(e,typeof t!="symbol"?t+"":t,r),Ou=(e,t,r)=>t.has(e)||Af("Cannot "+r);var P=(e,t,r)=>(Ou(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?Af("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),J=(e,t,r,n)=>(Ou(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Me=(e,t,r)=>(Ou(e,t,"access private method"),r);var ea=(e,t,r,n)=>({set _(s){J(e,t,s,r)},get _(){return P(e,t,n)}});function ax(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 o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{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 o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function mo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Og={exports:{}},Wl={},jg={exports:{}},ee={};/**
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 Fi=Symbol.for("react.element"),lx=Symbol.for("react.portal"),ux=Symbol.for("react.fragment"),cx=Symbol.for("react.strict_mode"),dx=Symbol.for("react.profiler"),hx=Symbol.for("react.provider"),fx=Symbol.for("react.context"),px=Symbol.for("react.forward_ref"),mx=Symbol.for("react.suspense"),gx=Symbol.for("react.memo"),vx=Symbol.for("react.lazy"),Of=Symbol.iterator;function yx(e){return e===null||typeof e!="object"?null:(e=Of&&e[Of]||e["@@iterator"],typeof e=="function"?e:null)}var Ng={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lg=Object.assign,Ig={};function go(e,t,r){this.props=e,this.context=t,this.refs=Ig,this.updater=r||Ng}go.prototype.isReactComponent={};go.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")};go.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dg(){}Dg.prototype=go.prototype;function nh(e,t,r){this.props=e,this.context=t,this.refs=Ig,this.updater=r||Ng}var sh=nh.prototype=new Dg;sh.constructor=nh;Lg(sh,go.prototype);sh.isPureReactComponent=!0;var jf=Array.isArray,$g=Object.prototype.hasOwnProperty,oh={current:null},Mg={key:!0,ref:!0,__self:!0,__source:!0};function Ug(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)$g.call(t,n)&&!Mg.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:Fi,type:e,key:o,ref:i,props:s,_owner:oh.current}}function wx(e,t){return{$$typeof:Fi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ih(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fi}function bx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Nf=/\/+/g;function ju(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bx(""+e.key):t.toString(36)}function Ma(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Fi:case lx:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+ju(i,0):n,jf(s)?(r="",e!=null&&(r=e.replace(Nf,"$&/")+"/"),Ma(s,t,r,"",function(u){return u})):s!=null&&(ih(s)&&(s=wx(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Nf,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",jf(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+ju(o,a);i+=Ma(o,t,r,l,s)}else if(l=yx(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+ju(o,a++),i+=Ma(o,t,r,l,s);else if(o==="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 i}function ta(e,t,r){if(e==null)return e;var n=[],s=0;return Ma(e,n,"","",function(o){return t.call(r,o,s++)}),n}function xx(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 Ye={current:null},Ua={transition:null},Sx={ReactCurrentDispatcher:Ye,ReactCurrentBatchConfig:Ua,ReactCurrentOwner:oh};function Fg(){throw Error("act(...) is not supported in production builds of React.")}ee.Children={map:ta,forEach:function(e,t,r){ta(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ta(e,function(){t++}),t},toArray:function(e){return ta(e,function(t){return t})||[]},only:function(e){if(!ih(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ee.Component=go;ee.Fragment=ux;ee.Profiler=dx;ee.PureComponent=nh;ee.StrictMode=cx;ee.Suspense=mx;
vendor: 4,971 bytes, lines 9-25
9ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sx;ee.act=Fg;ee.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=Lg({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=oh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)$g.call(t,l)&&!Mg.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:Fi,type:e.type,key:s,ref:o,props:n,_owner:i}};ee.createContext=function(e){return e={$$typeof:fx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:hx,_context:e},e.Consumer=e};ee.createElement=Ug;ee.createFactory=function(e){var t=Ug.bind(null,e);return t.type=e,t};ee.createRef=function(){return{current:null}};ee.forwardRef=function(e){return{$$typeof:px,render:e}};ee.isValidElement=ih;ee.lazy=function(e){return{$$typeof:vx,_payload:{_status:-1,_result:e},_init:xx}};ee.memo=function(e,t){return{$$typeof:gx,type:e,compare:t===void 0?null:t}};ee.startTransition=function(e){var t=Ua.transition;Ua.transition={};try{e()}finally{Ua.transition=t}};ee.unstable_act=Fg;ee.useCallback=function(e,t){return Ye.current.useCallback(e,t)};ee.useContext=function(e){return Ye.current.useContext(e)};ee.useDebugValue=function(){};ee.useDeferredValue=function(e){return Ye.current.useDeferredValue(e)};ee.useEffect=function(e,t){return Ye.current.useEffect(e,t)};ee.useId=function(){return Ye.current.useId()};ee.useImperativeHandle=function(e,t,r){return Ye.current.useImperativeHandle(e,t,r)};ee.useInsertionEffect=function(e,t){return Ye.current.useInsertionEffect(e,t)};ee.useLayoutEffect=function(e,t){return Ye.current.useLayoutEffect(e,t)};ee.useMemo=function(e,t){return Ye.current.useMemo(e,t)};ee.useReducer=function(e,t,r){return Ye.current.useReducer(e,t,r)};ee.useRef=function(e){return Ye.current.useRef(e)};ee.useState=function(e){return Ye.current.useState(e)};ee.useSyncExternalStore=function(e,t,r){return Ye.current.useSyncExternalStore(e,t,r)};ee.useTransition=function(){return Ye.current.useTransition()};ee.version="18.3.1";jg.exports=ee;var w=jg.exports;const C=mo(w),ah=ax({__proto__:null,default:C},[w]);/**
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 Ex=w,_x=Symbol.for("react.element"),kx=Symbol.for("react.fragment"),Cx=Object.prototype.hasOwnProperty,Tx=Ex.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Rx={key:!0,ref:!0,__self:!0,__source:!0};function zg(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)Cx.call(t,n)&&!Rx.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:_x,type:e,key:o,ref:i,props:s,_owner:Tx.current}}Wl.Fragment=kx;Wl.jsx=zg;Wl.jsxs=zg;Og.exports=Wl;var y=Og.exports,Bg={exports:{}},ft={},Hg={exports:{}},Wg={};/**
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(R,T){var D=R.length;R.push(T);e:for(;0<D;){var H=D-1>>>1,U=R[H];if(0<s(U,T))R[H]=T,R[D]=U,D=H;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var T=R[0],D=R.pop();if(D!==T){R[0]=D;e:for(var H=0,U=R.length,Y=U>>>1;H<Y;){var X=2*(H+1)-1,Z=R[X],pe=X+1,re=R[pe];if(0>s(Z,D))pe<U&&0>s(re,Z)?(R[H]=re,R[pe]=D,H=pe):(R[H]=Z,R[X]=D,H=X);else if(pe<U&&0>s(re,D))R[H]=re,R[pe]=D,H=pe;else break e}}return T}function s(R,T){var D=R.sortIndex-T.sortIndex;return D!==0?D:R.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,b=!1,p=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(R){for(var T=r(u);T!==null;){if(T.callback===null)n(u);else if(T.startTime<=R)n(u),T.sortIndex=T.expirationTime,t(l,T);else break;T=r(u)}}function S(R){if(p=!1,v(R),!b)if(r(l)!==null)b=!0,B(E);else{var T=r(u);T!==null&&q(S,T.startTime-R)}}function E(R,T){b=!1,p&&(p=!1,g(A),A=-1),h=!0;var D=f;
vendor: 9,234 bytes, lines 25-34
25try{for(v(T),d=r(l);d!==null&&(!(d.expirationTime>T)||R&&!F());){var H=d.callback;if(typeof H=="function"){d.callback=null,f=d.priorityLevel;var U=H(d.expirationTime<=T);T=e.unstable_now(),typeof U=="function"?d.callback=U:d===r(l)&&n(l),v(T)}else n(l);d=r(l)}if(d!==null)var Y=!0;else{var X=r(u);X!==null&&q(S,X.startTime-T),Y=!1}return Y}finally{d=null,f=D,h=!1}}var _=!1,k=null,A=-1,O=5,N=-1;function F(){return!(e.unstable_now()-N<O)}function I(){if(k!==null){var R=e.unstable_now();N=R;var T=!0;try{T=k(!0,R)}finally{T?V():(_=!1,k=null)}}else _=!1}var V;if(typeof m=="function")V=function(){m(I)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,K=L.port2;L.port1.onmessage=I,V=function(){K.postMessage(null)}}else V=function(){x(I,0)};function B(R){k=R,_||(_=!0,V())}function q(R,T){A=x(function(){R(e.unstable_now())},T)}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(R){R.callback=null},e.unstable_continueExecution=function(){b||h||(b=!0,B(E))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(R){switch(f){case 1:case 2:case 3:var T=3;break;default:T=f}var D=f;f=T;try{return R()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,T){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var D=f;f=R;try{return T()}finally{f=D}},e.unstable_scheduleCallback=function(R,T,D){var H=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?H+D:H):D=H,R){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=D+U,R={id:c++,callback:T,priorityLevel:R,startTime:D,expirationTime:U,sortIndex:-1},D>H?(R.sortIndex=D,t(u,R),r(l)===null&&R===r(u)&&(p?(g(A),A=-1):p=!0,q(S,D-H))):(R.sortIndex=U,t(l,R),b||h||(b=!0,B(E))),R},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(R){var T=f;return function(){var D=f;f=T;try{return R.apply(this,arguments)}finally{f=D}}}})(Wg);Hg.exports=Wg;var Px=Hg.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 Ax=w,ht=Px;function j(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 Vg=new Set,li={};function Xn(e,t){so(e,t),so(e+"Capture",t)}function so(e,t){for(li[e]=t,e=0;e<t.length;e++)Vg.add(t[e])}var Sr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ac=Object.prototype.hasOwnProperty,Ox=/^[: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]*$/,Lf={},If={};function jx(e){return Ac.call(If,e)?!0:Ac.call(Lf,e)?!1:Ox.test(e)?If[e]=!0:(Lf[e]=!0,!1)}function Nx(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 Lx(e,t,r,n){if(t===null||typeof t>"u"||Nx(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qe(e,t,r,n,s,o,i){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=o,this.removeEmptyString=i}var $e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){$e[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];$e[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){$e[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$e[e]=new Qe(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){$e[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){$e[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){$e[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){$e[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){$e[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var lh=/[\-:]([a-z])/g;function uh(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(lh,uh);$e[t]=new Qe(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(lh,uh);$e[t]=new Qe(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(lh,uh);$e[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){$e[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});$e.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){$e[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ch(e,t,r,n){var s=$e.hasOwnProperty(t)?$e[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Lx(t,r,s,n)&&(r=null),n||s===null?jx(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 Pr=Ax.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ra=Symbol.for("react.element"),ks=Symbol.for("react.portal"),Cs=Symbol.for("react.fragment"),dh=Symbol.for("react.strict_mode"),Oc=Symbol.for("react.profiler"),Kg=Symbol.for("react.provider"),qg=Symbol.for("react.context"),hh=Symbol.for("react.forward_ref"),jc=Symbol.for("react.suspense"),Nc=Symbol.for("react.suspense_list"),fh=Symbol.for("react.memo"),Br=Symbol.for("react.lazy"),Gg=Symbol.for("react.offscreen"),Df=Symbol.iterator;function Ro(e){return e===null||typeof e!="object"?null:(e=Df&&e[Df]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Object.assign,Nu;function Ho(e){if(Nu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Nu=t&&t[1]||""}return`
34`+Nu+e}var Lu=!1;function Iu(e,t){if(!e||Lu)return"";Lu=!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()}}
vendor: 14,090 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),o=n.stack.split(`
36`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
37`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Lu=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ho(e):""}function Ix(e){switch(e.tag){case 5:return Ho(e.type);case 16:return Ho("Lazy");case 13:return Ho("Suspense");case 19:return Ho("SuspenseList");case 0:case 2:case 15:return e=Iu(e.type,!1),e;case 11:return e=Iu(e.type.render,!1),e;case 1:return e=Iu(e.type,!0),e;default:return""}}function Lc(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 Cs:return"Fragment";case ks:return"Portal";case Oc:return"Profiler";case dh:return"StrictMode";case jc:return"Suspense";case Nc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qg:return(e.displayName||"Context")+".Consumer";case Kg:return(e._context.displayName||"Context")+".Provider";case hh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fh:return t=e.displayName||null,t!==null?t:Lc(e.type)||"Memo";case Br:t=e._payload,e=e._init;try{return Lc(e(t))}catch{}}return null}function Dx(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 Lc(t);case 8:return t===dh?"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 hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $x(e){var t=Jg(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,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function na(e){e._valueTracker||(e._valueTracker=$x(e))}function Yg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Jg(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function al(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 Ic(e,t){var r=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function $f(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=hn(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 Qg(e,t){t=t.checked,t!=null&&ch(e,"checked",t,!1)}function Dc(e,t){Qg(e,t);var r=hn(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")?$c(e,t.type,r):t.hasOwnProperty("defaultValue")&&$c(e,t.type,hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mf(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 $c(e,t,r){(t!=="number"||al(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wo=Array.isArray;function Ms(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=""+hn(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 Mc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Uf(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(j(92));if(Wo(r)){if(1<r.length)throw Error(j(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:hn(r)}}function Xg(e,t){var r=hn(t.value),n=hn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Ff(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Zg(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 Uc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Zg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sa,ev=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(sa=sa||document.createElement("div"),sa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=sa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Jo={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},Mx=["Webkit","ms","Moz","O"];Object.keys(Jo).forEach(function(e){Mx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jo[t]=Jo[e]})});function tv(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Jo.hasOwnProperty(e)&&Jo[e]?(""+t).trim():t+"px"}function rv(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=tv(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var Ux=ve({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 Fc(e,t){if(t){if(Ux[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function zc(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 Bc=null;function ph(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hc=null,Us=null,Fs=null;function zf(e){if(e=Hi(e)){if(typeof Hc!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Jl(t),Hc(e.stateNode,e.type,t))}}function nv(e){Us?Fs?Fs.push(e):Fs=[e]:Us=e}function sv(){if(Us){var e=Us,t=Fs;if(Fs=Us=null,zf(e),t)for(e=0;e<t.length;e++)zf(t[e])}}function ov(e,t){return e(t)}function iv(){}var Du=!1;function av(e,t,r){if(Du)return e(t,r);Du=!0;try{return ov(e,t,r)}finally{Du=!1,(Us!==null||Fs!==null)&&(iv(),sv())}}function ci(e,t){var r=e.stateNode;if(r===null)return null;var n=Jl(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(j(231,t,typeof r));return r}var Wc=!1;if(Sr)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){Wc=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{Wc=!1}function Fx(e,t,r,n,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var Yo=!1,ll=null,ul=!1,Vc=null,zx={onError:function(e){Yo=!0,ll=e}};function Bx(e,t,r,n,s,o,i,a,l){Yo=!1,ll=null,Fx.apply(zx,arguments)}function Hx(e,t,r,n,s,o,i,a,l){if(Bx.apply(this,arguments),Yo){if(Yo){var u=ll;Yo=!1,ll=null}else throw Error(j(198));ul||(ul=!0,Vc=u)}}function Zn(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 lv(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 Bf(e){if(Zn(e)!==e)throw Error(j(188))}function Wx(e){var t=e.alternate;if(!t){if(t=Zn(e),t===null)throw Error(j(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return Bf(s),e;if(o===n)return Bf(s),t;o=o.sibling}throw Error(j(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(j(189))}}if(r.alternate!==n)throw Error(j(190))}if(r.tag!==3)throw Error(j(188));return r.stateNode.current===r?e:t}function uv(e){return e=Wx(e),e!==null?cv(e):null}function cv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=cv(e);if(t!==null)return t;e=e.sibling}return null}var dv=ht.unstable_scheduleCallback,Hf=ht.unstable_cancelCallback,Vx=ht.unstable_shouldYield,Kx=ht.unstable_requestPaint,Se=ht.unstable_now,qx=ht.unstable_getCurrentPriorityLevel,mh=ht.unstable_ImmediatePriority,hv=ht.unstable_UserBlockingPriority,cl=ht.unstable_NormalPriority,Gx=ht.unstable_LowPriority,fv=ht.unstable_IdlePriority,Vl=null,sr=null;function Jx(e){if(sr&&typeof sr.onCommitFiberRoot=="function")try{sr.onCommitFiberRoot(Vl,e,void 0,(e.current.flags&128)===128)}catch{}}var Ft=Math.clz32?Math.clz32:Xx,Yx=Math.log,Qx=Math.LN2;function Xx(e){return e>>>=0,e===0?32:31-(Yx(e)/Qx|0)|0}var oa=64,ia=4194304;function Vo(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 dl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=Vo(a):(o&=i,o!==0&&(n=Vo(o)))}else i=r&~s,i!==0?n=Vo(i):o!==0&&(n=Vo(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&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-Ft(t),s=1<<r,n|=e[r],t&=~s;return n}function Zx(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 eS(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Ft(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=Zx(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Kc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function pv(){var e=oa;return oa<<=1,!(oa&4194240)&&(oa=64),e}function $u(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function zi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ft(t),e[t]=r}function tS(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-Ft(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function gh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ft(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var se=0;function mv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var gv,vh,vv,yv,wv,qc=!1,aa=[],rn=null,nn=null,sn=null,di=new Map,hi=new Map,Wr=[],rS="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 Wf(e,t){switch(e){case"focusin":case"focusout":rn=null;break;case"dragenter":case"dragleave":nn=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hi.delete(t.pointerId)}}function Ao(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Hi(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function nS(e,t,r,n,s){switch(t){case"focusin":return rn=Ao(rn,e,t,r,n,s),!0;case"dragenter":return nn=Ao(nn,e,t,r,n,s),!0;case"mouseover":return sn=Ao(sn,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return di.set(o,Ao(di.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,hi.set(o,Ao(hi.get(o)||null,e,t,r,n,s)),!0}return!1}function bv(e){var t=On(e.target);if(t!==null){var r=Zn(t);if(r!==null){if(t=r.tag,t===13){if(t=lv(r),t!==null){e.blockedOn=t,wv(e.priority,function(){vv(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 Fa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Gc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Bc=n,r.target.dispatchEvent(n),Bc=null}else return t=Hi(r),t!==null&&vh(t),e.blockedOn=r,!1;t.shift()}return!0}function Vf(e,t,r){Fa(e)&&r.delete(t)}function sS(){qc=!1,rn!==null&&Fa(rn)&&(rn=null),nn!==null&&Fa(nn)&&(nn=null),sn!==null&&Fa(sn)&&(sn=null),di.forEach(Vf),hi.forEach(Vf)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,qc||(qc=!0,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,sS)))}function fi(e){function t(s){return Oo(s,e)}if(0<aa.length){Oo(aa[0],e);for(var r=1;r<aa.length;r++){var n=aa[r];n.blockedOn===e&&(n.blockedOn=null)}}for(rn!==null&&Oo(rn,e),nn!==null&&Oo(nn,e),sn!==null&&Oo(sn,e),di.forEach(t),hi.forEach(t),r=0;r<Wr.length;r++)n=Wr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Wr.length&&(r=Wr[0],r.blockedOn===null);)bv(r),r.blockedOn===null&&Wr.shift()}var zs=Pr.ReactCurrentBatchConfig,hl=!0;function oS(e,t,r,n){var s=se,o=zs.transition;zs.transition=null;try{se=1,yh(e,t,r,n)}finally{se=s,zs.transition=o}}function iS(e,t,r,n){var s=se,o=zs.transition;zs.transition=null;try{se=4,yh(e,t,r,n)}finally{se=s,zs.transition=o}}function yh(e,t,r,n){if(hl){var s=Gc(e,t,r,n);if(s===null)qu(e,t,n,fl,r),Wf(e,n);else if(nS(s,e,t,r,n))n.stopPropagation();else if(Wf(e,n),t&4&&-1<rS.indexOf(e)){for(;s!==null;){var o=Hi(s);if(o!==null&&gv(o),o=Gc(e,t,r,n),o===null&&qu(e,t,n,fl,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else qu(e,t,n,null,r)}}var fl=null;function Gc(e,t,r,n){if(fl=null,e=ph(n),e=On(e),e!==null)if(t=Zn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=lv(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 fl=e,null}
vendor: 10,401 bytes, line 37
37function xv(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(qx()){case mh:return 1;case hv:return 4;case cl:case Gx:return 16;case fv:return 536870912;default:return 16}default:return 16}}var Zr=null,wh=null,za=null;function Sv(){if(za)return za;var e,t=wh,r=t.length,n,s="value"in Zr?Zr.value:Zr.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return za=s.slice(e,1<n?1-n:void 0)}function Ba(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 la(){return!0}function Kf(){return!1}function pt(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?la:Kf,this.isPropagationStopped=Kf,this}return ve(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=la)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),t}var vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bh=pt(vo),Bi=ve({},vo,{view:0,detail:0}),aS=pt(Bi),Mu,Uu,jo,Kl=ve({},Bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xh,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!==jo&&(jo&&e.type==="mousemove"?(Mu=e.screenX-jo.screenX,Uu=e.screenY-jo.screenY):Uu=Mu=0,jo=e),Mu)},movementY:function(e){return"movementY"in e?e.movementY:Uu}}),qf=pt(Kl),lS=ve({},Kl,{dataTransfer:0}),uS=pt(lS),cS=ve({},Bi,{relatedTarget:0}),Fu=pt(cS),dS=ve({},vo,{animationName:0,elapsedTime:0,pseudoElement:0}),hS=pt(dS),fS=ve({},vo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pS=pt(fS),mS=ve({},vo,{data:0}),Gf=pt(mS),gS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vS={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"},yS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yS[e])?!!t[e]:!1}function xh(){return wS}var bS=ve({},Bi,{key:function(e){if(e.key){var t=gS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ba(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xh,charCode:function(e){return e.type==="keypress"?Ba(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ba(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xS=pt(bS),SS=ve({},Kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jf=pt(SS),ES=ve({},Bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xh}),_S=pt(ES),kS=ve({},vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),CS=pt(kS),TS=ve({},Kl,{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}),RS=pt(TS),PS=[9,13,27,32],Sh=Sr&&"CompositionEvent"in window,Qo=null;Sr&&"documentMode"in document&&(Qo=document.documentMode);var AS=Sr&&"TextEvent"in window&&!Qo,Ev=Sr&&(!Sh||Qo&&8<Qo&&11>=Qo),Yf=" ",Qf=!1;function _v(e,t){switch(e){case"keyup":return PS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ts=!1;function OS(e,t){switch(e){case"compositionend":return kv(t);case"keypress":return t.which!==32?null:(Qf=!0,Yf);case"textInput":return e=t.data,e===Yf&&Qf?null:e;default:return null}}function jS(e,t){if(Ts)return e==="compositionend"||!Sh&&_v(e,t)?(e=Sv(),za=wh=Zr=null,Ts=!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 Ev&&t.locale!=="ko"?null:t.data;default:return null}}var NS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!NS[e.type]:t==="textarea"}function Cv(e,t,r,n){nv(n),t=pl(t,"onChange"),0<t.length&&(r=new bh("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Xo=null,pi=null;function LS(e){$v(e,0)}function ql(e){var t=As(e);if(Yg(t))return e}function IS(e,t){if(e==="change")return t}var Tv=!1;if(Sr){var zu;if(Sr){var Bu="oninput"in document;if(!Bu){var Zf=document.createElement("div");Zf.setAttribute("oninput","return;"),Bu=typeof Zf.oninput=="function"}zu=Bu}else zu=!1;Tv=zu&&(!document.documentMode||9<document.documentMode)}function ep(){Xo&&(Xo.detachEvent("onpropertychange",Rv),pi=Xo=null)}function Rv(e){if(e.propertyName==="value"&&ql(pi)){var t=[];Cv(t,pi,e,ph(e)),av(LS,t)}}function DS(e,t,r){e==="focusin"?(ep(),Xo=t,pi=r,Xo.attachEvent("onpropertychange",Rv)):e==="focusout"&&ep()}function $S(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ql(pi)}function MS(e,t){if(e==="click")return ql(t)}function US(e,t){if(e==="input"||e==="change")return ql(t)}function FS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:FS;function mi(e,t){if(Bt(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(!Ac.call(t,s)||!Bt(e[s],t[s]))return!1}return!0}function tp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rp(e,t){var r=tp(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=tp(r)}}function Pv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Av(){for(var e=window,t=al();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=al(e.document)}return t}function Eh(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 zS(e){var t=Av(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Pv(r.ownerDocument.documentElement,r)){if(n!==null&&Eh(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,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=rp(r,o);var i=rp(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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 BS=Sr&&"documentMode"in document&&11>=document.documentMode,Rs=null,Jc=null,Zo=null,Yc=!1;function np(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Yc||Rs==null||Rs!==al(n)||(n=Rs,"selectionStart"in n&&Eh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Zo&&mi(Zo,n)||(Zo=n,n=pl(Jc,"onSelect"),0<n.length&&(t=new bh("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Rs)))}function ua(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ps={animationend:ua("Animation","AnimationEnd"),animationiteration:ua("Animation","AnimationIteration"),animationstart:ua("Animation","AnimationStart"),transitionend:ua("Transition","TransitionEnd")},Hu={},Ov={};Sr&&(Ov=document.createElement("div").style,"AnimationEvent"in window||(delete Ps.animationend.animation,delete Ps.animationiteration.animation,delete Ps.animationstart.animation),"TransitionEvent"in window||delete Ps.transitionend.transition);function Gl(e){if(Hu[e])return Hu[e];if(!Ps[e])return e;var t=Ps[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ov)return Hu[e]=t[r];return e}var jv=Gl("animationend"),Nv=Gl("animationiteration"),Lv=Gl("animationstart"),Iv=Gl("transitionend"),Dv=new Map,sp="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 gn(e,t){Dv.set(e,t),Xn(t,[e])}for(var Wu=0;Wu<sp.length;Wu++){var Vu=sp[Wu],HS=Vu.toLowerCase(),WS=Vu[0].toUpperCase()+Vu.slice(1);gn(HS,"on"+WS)}gn(jv,"onAnimationEnd");gn(Nv,"onAnimationIteration");gn(Lv,"onAnimationStart");gn("dblclick","onDoubleClick");gn("focusin","onFocus");gn("focusout","onBlur");gn(Iv,"onTransitionEnd");so("onMouseEnter",["mouseout","mouseover"]);so("onMouseLeave",["mouseout","mouseover"]);so("onPointerEnter",["pointerout","pointerover"]);so("onPointerLeave",["pointerout","pointerover"]);Xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ko="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(" "),VS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ko));function op(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Hx(n,t,void 0,e),e.currentTarget=null}function $v(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 o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;op(s,a,u),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;op(s,a,u),o=l}}}if(ul)throw e=Vc,ul=!1,Vc=null,e}function ue(e,t){var r=t[td];r===void 0&&(r=t[td]=new Set);var n=e+"__bubble";r.has(n)||(Mv(t,e,2,!1),r.add(n))}function Ku(e,t,r){var n=0;t&&(n|=4),Mv(r,e,n,t)}var ca="_reactListening"+Math.random().toString(36).slice(2);function gi(e){if(!e[ca]){e[ca]=!0,Vg.forEach(function(r){r!=="selectionchange"&&(VS.has(r)||Ku(r,!1,e),Ku(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ca]||(t[ca]=!0,Ku("selectionchange",!1,t))}}function Mv(e,t,r,n){switch(xv(t)){case 1:var s=oS;break;case 4:s=iS;break;default:s=yh}r=s.bind(null,t,r,e),s=void 0,!Wc||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 qu(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;
vendor: 23,326 bytes, lines 37-38
37if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=On(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}av(function(){var u=o,c=ph(r),d=[];e:{var f=Dv.get(e);if(f!==void 0){var h=bh,b=e;switch(e){case"keypress":if(Ba(r)===0)break e;case"keydown":case"keyup":h=xS;break;case"focusin":b="focus",h=Fu;break;case"focusout":b="blur",h=Fu;break;case"beforeblur":case"afterblur":h=Fu;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=qf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=uS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=_S;break;case jv:case Nv:case Lv:h=hS;break;case Iv:h=CS;break;case"scroll":h=aS;break;case"wheel":h=RS;break;case"copy":case"cut":case"paste":h=pS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Jf}var p=(t&4)!==0,x=!p&&e==="scroll",g=p?f!==null?f+"Capture":null:f;p=[];for(var m=u,v;m!==null;){v=m;var S=v.stateNode;if(v.tag===5&&S!==null&&(v=S,g!==null&&(S=ci(m,g),S!=null&&p.push(vi(m,S,v)))),x)break;m=m.return}0<p.length&&(f=new h(f,b,null,r,c),d.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==Bc&&(b=r.relatedTarget||r.fromElement)&&(On(b)||b[Er]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(b=r.relatedTarget||r.toElement,h=u,b=b?On(b):null,b!==null&&(x=Zn(b),b!==x||b.tag!==5&&b.tag!==6)&&(b=null)):(h=null,b=u),h!==b)){if(p=qf,S="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(p=Jf,S="onPointerLeave",g="onPointerEnter",m="pointer"),x=h==null?f:As(h),v=b==null?f:As(b),f=new p(S,m+"leave",h,r,c),f.target=x,f.relatedTarget=v,S=null,On(c)===u&&(p=new p(g,m+"enter",b,r,c),p.target=v,p.relatedTarget=x,S=p),x=S,h&&b)t:{for(p=h,g=b,m=0,v=p;v;v=as(v))m++;for(v=0,S=g;S;S=as(S))v++;for(;0<m-v;)p=as(p),m--;for(;0<v-m;)g=as(g),v--;for(;m--;){if(p===g||g!==null&&p===g.alternate)break t;p=as(p),g=as(g)}p=null}else p=null;h!==null&&ip(d,f,h,p,!1),b!==null&&x!==null&&ip(d,x,b,p,!0)}}e:{if(f=u?As(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=IS;else if(Xf(f))if(Tv)E=US;else{E=$S;var _=DS}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=MS);if(E&&(E=E(e,u))){Cv(d,E,r,c);break e}_&&_(e,f,u),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&$c(f,"number",f.value)}switch(_=u?As(u):window,e){case"focusin":(Xf(_)||_.contentEditable==="true")&&(Rs=_,Jc=u,Zo=null);break;case"focusout":Zo=Jc=Rs=null;break;case"mousedown":Yc=!0;break;case"contextmenu":case"mouseup":case"dragend":Yc=!1,np(d,r,c);break;case"selectionchange":if(BS)break;case"keydown":case"keyup":np(d,r,c)}var k;if(Sh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Ts?_v(e,r)&&(A="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(A="onCompositionStart");A&&(Ev&&r.locale!=="ko"&&(Ts||A!=="onCompositionStart"?A==="onCompositionEnd"&&Ts&&(k=Sv()):(Zr=c,wh="value"in Zr?Zr.value:Zr.textContent,Ts=!0)),_=pl(u,A),0<_.length&&(A=new Gf(A,e,null,r,c),d.push({event:A,listeners:_}),k?A.data=k:(k=kv(r),k!==null&&(A.data=k)))),(k=AS?OS(e,r):jS(e,r))&&(u=pl(u,"onBeforeInput"),0<u.length&&(c=new Gf("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=k))}$v(d,t)})}function vi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function pl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ci(e,r),o!=null&&n.unshift(vi(e,o,s)),o=ci(e,t),o!=null&&n.push(vi(e,o,s))),e=e.return}return n}function as(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ip(e,t,r,n,s){for(var o=t._reactName,i=[];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=ci(r,o),l!=null&&i.unshift(vi(r,l,a))):s||(l=ci(r,o),l!=null&&i.push(vi(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var KS=/\r\n?/g,qS=/\u0000|\uFFFD/g;function ap(e){return(typeof e=="string"?e:""+e).replace(KS,`
38`).replace(qS,"")}function da(e,t,r){if(t=ap(t),ap(e)!==t&&r)throw Error(j(425))}function ml(){}var Qc=null,Xc=null;function Zc(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 ed=typeof setTimeout=="function"?setTimeout:void 0,GS=typeof clearTimeout=="function"?clearTimeout:void 0,lp=typeof Promise=="function"?Promise:void 0,JS=typeof queueMicrotask=="function"?queueMicrotask:typeof lp<"u"?function(e){return lp.resolve(null).then(e).catch(YS)}:ed;function YS(e){setTimeout(function(){throw e})}function Gu(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),fi(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);fi(t)}function on(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 up(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 yo=Math.random().toString(36).slice(2),er="__reactFiber$"+yo,yi="__reactProps$"+yo,Er="__reactContainer$"+yo,td="__reactEvents$"+yo,QS="__reactListeners$"+yo,XS="__reactHandles$"+yo;function On(e){var t=e[er];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Er]||r[er]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=up(e);e!==null;){if(r=e[er])return r;e=up(e)}return t}e=r,r=e.parentNode}return null}function Hi(e){return e=e[er]||e[Er],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function As(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Jl(e){return e[yi]||null}var rd=[],Os=-1;function vn(e){return{current:e}}function ce(e){0>Os||(e.current=rd[Os],rd[Os]=null,Os--)}function ae(e,t){Os++,rd[Os]=e.current,e.current=t}var fn={},He=vn(fn),rt=vn(!1),Vn=fn;function oo(e,t){var r=e.type.contextTypes;if(!r)return fn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function nt(e){return e=e.childContextTypes,e!=null}function gl(){ce(rt),ce(He)}function cp(e,t,r){if(He.current!==fn)throw Error(j(168));ae(He,t),ae(rt,r)}function Uv(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(j(108,Dx(e)||"Unknown",s));return ve({},r,n)}function vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fn,Vn=He.current,ae(He,e),ae(rt,rt.current),!0}function dp(e,t,r){var n=e.stateNode;if(!n)throw Error(j(169));r?(e=Uv(e,t,Vn),n.__reactInternalMemoizedMergedChildContext=e,ce(rt),ce(He),ae(He,e)):ce(rt),ae(rt,r)}var vr=null,Yl=!1,Ju=!1;function Fv(e){vr===null?vr=[e]:vr.push(e)}function ZS(e){Yl=!0,Fv(e)}function yn(){if(!Ju&&vr!==null){Ju=!0;var e=0,t=se;try{var r=vr;for(se=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}vr=null,Yl=!1}catch(s){throw vr!==null&&(vr=vr.slice(e+1)),dv(mh,yn),s}finally{se=t,Ju=!1}}return null}var js=[],Ns=0,yl=null,wl=0,yt=[],wt=0,Kn=null,wr=1,br="";function Cn(e,t){js[Ns++]=wl,js[Ns++]=yl,yl=e,wl=t}function zv(e,t,r){yt[wt++]=wr,yt[wt++]=br,yt[wt++]=Kn,Kn=e;var n=wr;e=br;var s=32-Ft(n)-1;n&=~(1<<s),r+=1;var o=32-Ft(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,wr=1<<32-Ft(t)+s|r<<s|n,br=o+e}else wr=1<<o|r<<s|n,br=e}function _h(e){e.return!==null&&(Cn(e,1),zv(e,1,0))}function kh(e){for(;e===yl;)yl=js[--Ns],js[Ns]=null,wl=js[--Ns],js[Ns]=null;for(;e===Kn;)Kn=yt[--wt],yt[wt]=null,br=yt[--wt],yt[wt]=null,wr=yt[--wt],yt[wt]=null}var ct=null,ut=null,he=!1,Mt=null;function Bv(e,t){var r=bt(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 hp(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ct=e,ut=on(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ct=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Kn!==null?{id:wr,overflow:br}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=bt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ct=e,ut=null,!0):!1;default:return!1}}function nd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sd(e){if(he){var t=ut;if(t){var r=t;if(!hp(e,t)){if(nd(e))throw Error(j(418));t=on(r.nextSibling);var n=ct;t&&hp(e,t)?Bv(n,r):(e.flags=e.flags&-4097|2,he=!1,ct=e)}}else{if(nd(e))throw Error(j(418));e.flags=e.flags&-4097|2,he=!1,ct=e}}}function fp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ct=e}function ha(e){if(e!==ct)return!1;if(!he)return fp(e),he=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zc(e.type,e.memoizedProps)),t&&(t=ut)){if(nd(e))throw Hv(),Error(j(418));for(;t;)Bv(e,t),t=on(t.nextSibling)}if(fp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ut=on(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ut=null}}else ut=ct?on(e.stateNode.nextSibling):null;return!0}function Hv(){for(var e=ut;e;)e=on(e.nextSibling)}function io(){ut=ct=null,he=!1}function Ch(e){Mt===null?Mt=[e]:Mt.push(e)}var eE=Pr.ReactCurrentBatchConfig;function No(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(j(309));var n=r.stateNode}if(!n)throw Error(j(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(j(284));if(!r._owner)throw Error(j(290,e))}return e}function fa(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pp(e){var t=e._init;return t(e._payload)}function Wv(e){function t(g,m){if(e){var v=g.deletions;v===null?(g.deletions=[m],g.flags|=16):v.push(m)}}function r(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function n(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=cn(g,m),g.index=0,g.sibling=null,g}function o(g,m,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<m?(g.flags|=2,m):v):(g.flags|=2,m)):(g.flags|=1048576,m)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,m,v,S){return m===null||m.tag!==6?(m=rc(v,g.mode,S),m.return=g,m):(m=s(m,v),m.return=g,m)}function l(g,m,v,S){var E=v.type;return E===Cs?c(g,m,v.props.children,S,v.key):m!==null&&(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Br&&pp(E)===m.type)?(S=s(m,v.props),S.ref=No(g,m,v),S.return=g,S):(S=Ja(v.type,v.key,v.props,null,g.mode,S),S.ref=No(g,m,v),S.return=g,S)}function u(g,m,v,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=nc(v,g.mode,S),m.return=g,m):(m=s(m,v.children||[]),m.return=g,m)}function c(g,m,v,S,E){return m===null||m.tag!==7?(m=Wn(v,g.mode,S,E),m.return=g,m):(m=s(m,v),m.return=g,m)}function d(g,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=rc(""+m,g.mode,v),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ra:return v=Ja(m.type,m.key,m.props,null,g.mode,v),v.ref=No(g,null,m),v.return=g,v;case ks:return m=nc(m,g.mode,v),m.return=g,m;case Br:var S=m._init;return d(g,S(m._payload),v)}if(Wo(m)||Ro(m))return m=Wn(m,g.mode,v,null),m.return=g,m;fa(g,m)}return null}function f(g,m,v,S){var E=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return E!==null?null:a(g,m,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ra:return v.key===E?l(g,m,v,S):null;case ks:return v.key===E?u(g,m,v,S):null;case Br:return E=v._init,f(g,m,E(v._payload),S)}if(Wo(v)||Ro(v))return E!==null?null:c(g,m,v,S,null);fa(g,v)}return null}function h(g,m,v,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(v)||null,a(m,g,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ra:return g=g.get(S.key===null?v:S.key)||null,l(m,g,S,E);case ks:return g=g.get(S.key===null?v:S.key)||null,u(m,g,S,E);case Br:var _=S._init;return h(g,m,v,_(S._payload),E)}if(Wo(S)||Ro(S))return g=g.get(v)||null,c(m,g,S,E,null);fa(m,S)}return null}function b(g,m,v,S){for(var E=null,_=null,k=m,A=m=0,O=null;k!==null&&A<v.length;A++){k.index>A?(O=k,k=null):O=k.sibling;var N=f(g,k,v[A],S);if(N===null){k===null&&(k=O);break}e&&k&&N.alternate===null&&t(g,k),m=o(N,m,A),_===null?E=N:_.sibling=N,_=N,k=O}if(A===v.length)return r(g,k),he&&Cn(g,A),E;if(k===null){for(;A<v.length;A++)k=d(g,v[A],S),k!==null&&(m=o(k,m,A),_===null?E=k:_.sibling=k,_=k);return he&&Cn(g,A),E}for(k=n(g,k);A<v.length;A++)O=h(k,g,A,v[A],S),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?A:O.key),m=o(O,m,A),_===null?E=O:_.sibling=O,_=O);return e&&k.forEach(function(F){return t(g,F)}),he&&Cn(g,A),E}function p(g,m,v,S){var E=Ro(v);if(typeof E!="function")throw Error(j(150));if(v=E.call(v),v==null)throw Error(j(151));for(var _=E=null,k=m,A=m=0,O=null,N=v.next();k!==null&&!N.done;A++,N=v.next()){k.index>A?(O=k,k=null):O=k.sibling;var F=f(g,k,N.value,S);if(F===null){k===null&&(k=O);break}e&&k&&F.alternate===null&&t(g,k),m=o(F,m,A),_===null?E=F:_.sibling=F,_=F,k=O}if(N.done)return r(g,k),he&&Cn(g,A),E;if(k===null){for(;!N.done;A++,N=v.next())N=d(g,N.value,S),N!==null&&(m=o(N,m,A),_===null?E=N:_.sibling=N,_=N);return he&&Cn(g,A),E}for(k=n(g,k);!N.done;A++,N=v.next())N=h(k,g,A,N.value,S),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?A:N.key),m=o(N,m,A),_===null?E=N:_.sibling=N,_=N);return e&&k.forEach(function(I){return t(g,I)}),he&&Cn(g,A),E}function x(g,m,v,S){if(typeof v=="object"&&v!==null&&v.type===Cs&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ra:e:{for(var E=v.key,_=m;_!==null;){if(_.key===E){if(E=v.type,E===Cs){if(_.tag===7){r(g,_.sibling),m=s(_,v.props.children),m.return=g,g=m;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Br&&pp(E)===_.type){r(g,_.sibling),m=s(_,v.props),m.ref=No(g,_,v),m.return=g,g=m;break e}r(g,_);break}else t(g,_);_=_.sibling}v.type===Cs?(m=Wn(v.props.children,g.mode,S,v.key),m.return=g,g=m):(S=Ja(v.type,v.key,v.props,null,g.mode,S),S.ref=No(g,m,v),S.return=g,g=S)}return i(g);case ks:e:{for(_=v.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){r(g,m.sibling),m=s(m,v.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else t(g,m);m=m.sibling}m=nc(v,g.mode,S),m.return=g,g=m}return i(g);case Br:return _=v._init,x(g,m,_(v._payload),S)}if(Wo(v))return b(g,m,v,S);if(Ro(v))return p(g,m,v,S);fa(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(r(g,m.sibling),m=s(m,v),m.return=g,g=m):(r(g,m),m=rc(v,g.mode,S),m.return=g,g=m),i(g)):r(g,m)}return x}var ao=Wv(!0),Vv=Wv(!1),bl=vn(null),xl=null,Ls=null,Th=null;function Rh(){Th=Ls=xl=null}function Ph(e){var t=bl.current;ce(bl),e._currentValue=t}function od(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 Bs(e,t){xl=e,Th=Ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(tt=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if(Th!==e)if(e={context:e,memoizedValue:t,next:null},Ls===null){if(xl===null)throw Error(j(308));Ls=e,xl.dependencies={lanes:0,firstContext:e}}else Ls=Ls.next=e;return t}var jn=null;function Ah(e){jn===null?jn=[e]:jn.push(e)}function Kv(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Ah(t)):(r.next=s.next,s.next=r),t.interleaved=r,_r(e,n)}function _r(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 Hr=!1;function Oh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qv(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 xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function an(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,te&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,_r(e,r)}return s=n.interleaved,s===null?(t.next=t,Ah(n)):(t.next=s.next,s.next=t),n.interleaved=t,_r(e,r)}function Ha(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,gh(e,r)}}function mp(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,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 Sl(e,t,r,n){var s=e.updateQueue;Hr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=s.baseState;i=0,c=u=l=null,a=o;do{var f=a.lane,h=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,p=a;switch(f=t,h=r,p.tag){case 1:if(b=p.payload,typeof b=="function"){d=b.call(h,d,f);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,f=typeof b=="function"?b.call(h,d,f):b,f==null)break e;d=ve({},d,f);break e;case 2:Hr=!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},c===null?(u=c=h,l=d):c=c.next=h,i|=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(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Gn|=i,e.lanes=i,e.memoizedState=d}}function gp(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(j(191,s));s.call(n)}}}var Wi={},or=vn(Wi),wi=vn(Wi),bi=vn(Wi);function Nn(e){if(e===Wi)throw Error(j(174));return e}function jh(e,t){switch(ae(bi,t),ae(wi,e),ae(or,Wi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Uc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Uc(t,e)}ce(or),ae(or,t)}function lo(){ce(or),ce(wi),ce(bi)}function Gv(e){Nn(bi.current);var t=Nn(or.current),r=Uc(t,e.type);t!==r&&(ae(wi,e),ae(or,r))}function Nh(e){wi.current===e&&(ce(or),ce(wi))}var me=vn(0);function El(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 Yu=[];function Lh(){for(var e=0;e<Yu.length;e++)Yu[e]._workInProgressVersionPrimary=null;Yu.length=0}var Wa=Pr.ReactCurrentDispatcher,Qu=Pr.ReactCurrentBatchConfig,qn=0,ge=null,Pe=null,Oe=null,_l=!1,ei=!1,xi=0,tE=0;function Ue(){throw Error(j(321))}function Ih(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Bt(e[r],t[r]))return!1;return!0}function Dh(e,t,r,n,s,o){if(qn=o,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Wa.current=e===null||e.memoizedState===null?oE:iE,e=r(n,s),ei){o=0;do{if(ei=!1,xi=0,25<=o)throw Error(j(301));o+=1,Oe=Pe=null,t.updateQueue=null,Wa.current=aE,e=r(n,s)}while(ei)}if(Wa.current=kl,t=Pe!==null&&Pe.next!==null,qn=0,Oe=Pe=ge=null,_l=!1,t)throw Error(j(300));return e}function $h(){var e=xi!==0;return xi=0,e}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oe===null?ge.memoizedState=Oe=e:Oe=Oe.next=e,Oe}function Et(){if(Pe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=Oe===null?ge.memoizedState:Oe.next;if(t!==null)Oe=t,Pe=e;else{if(e===null)throw Error(j(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Oe===null?ge.memoizedState=Oe=e:Oe=Oe.next=e}return Oe}function Si(e,t){return typeof t=="function"?t(e):t}function Xu(e){var t=Et(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var n=Pe,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,u=o;do{var c=u.lane;if((qn&c)===c)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 d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,i=n):l=l.next=d,ge.lanes|=c,Gn|=c}u=u.next}while(u!==null&&u!==o);l===null?i=n:l.next=a,Bt(n,t.memoizedState)||(tt=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;
vendor: 4,979 bytes, line 38
38do o=s.lane,ge.lanes|=o,Gn|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Zu(e){var t=Et(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Bt(o,t.memoizedState)||(tt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function Jv(){}function Yv(e,t){var r=ge,n=Et(),s=t(),o=!Bt(n.memoizedState,s);if(o&&(n.memoizedState=s,tt=!0),n=n.queue,Mh(Zv.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Oe!==null&&Oe.memoizedState.tag&1){if(r.flags|=2048,Ei(9,Xv.bind(null,r,n,s,t),void 0,null),je===null)throw Error(j(349));qn&30||Qv(r,t,s)}return s}function Qv(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Xv(e,t,r,n){t.value=r,t.getSnapshot=n,ey(t)&&ty(e)}function Zv(e,t,r){return r(function(){ey(t)&&ty(e)})}function ey(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Bt(e,r)}catch{return!0}}function ty(e){var t=_r(e,1);t!==null&&zt(t,e,1,-1)}function vp(e){var t=Gt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t.queue=e,e=e.dispatch=sE.bind(null,ge,e),[t.memoizedState,e]}function Ei(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function ry(){return Et().memoizedState}function Va(e,t,r,n){var s=Gt();ge.flags|=e,s.memoizedState=Ei(1|t,r,void 0,n===void 0?null:n)}function Ql(e,t,r,n){var s=Et();n=n===void 0?null:n;var o=void 0;if(Pe!==null){var i=Pe.memoizedState;if(o=i.destroy,n!==null&&Ih(n,i.deps)){s.memoizedState=Ei(t,r,o,n);return}}ge.flags|=e,s.memoizedState=Ei(1|t,r,o,n)}function yp(e,t){return Va(8390656,8,e,t)}function Mh(e,t){return Ql(2048,8,e,t)}function ny(e,t){return Ql(4,2,e,t)}function sy(e,t){return Ql(4,4,e,t)}function oy(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 iy(e,t,r){return r=r!=null?r.concat([e]):null,Ql(4,4,oy.bind(null,t,e),r)}function Uh(){}function ay(e,t){var r=Et();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ih(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function ly(e,t){var r=Et();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ih(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function uy(e,t,r){return qn&21?(Bt(r,t)||(r=pv(),ge.lanes|=r,Gn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,tt=!0),e.memoizedState=r)}function rE(e,t){var r=se;se=r!==0&&4>r?r:4,e(!0);var n=Qu.transition;Qu.transition={};try{e(!1),t()}finally{se=r,Qu.transition=n}}function cy(){return Et().memoizedState}function nE(e,t,r){var n=un(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},dy(e))hy(t,r);else if(r=Kv(e,t,r,n),r!==null){var s=Ge();zt(r,e,n,s),fy(r,t,n)}}function sE(e,t,r){var n=un(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(dy(e))hy(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,Bt(a,i)){var l=t.interleaved;l===null?(s.next=s,Ah(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Kv(e,t,s,n),r!==null&&(s=Ge(),zt(r,e,n,s),fy(r,t,n))}}function dy(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function hy(e,t){ei=_l=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function fy(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,gh(e,r)}}var kl={readContext:St,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},oE={readContext:St,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:yp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Va(4194308,4,oy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Va(4194308,4,e,t)},useInsertionEffect:function(e,t){return Va(4,2,e,t)},useMemo:function(e,t){var r=Gt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Gt();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=nE.bind(null,ge,e),[n.memoizedState,e]}
vendor: 6,674 bytes, lines 38-40
38,useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:vp,useDebugValue:Uh,useDeferredValue:function(e){return Gt().memoizedState=e},useTransition:function(){var e=vp(!1),t=e[0];return e=rE.bind(null,e[1]),Gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ge,s=Gt();if(he){if(r===void 0)throw Error(j(407));r=r()}else{if(r=t(),je===null)throw Error(j(349));qn&30||Qv(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,yp(Zv.bind(null,n,o,e),[e]),n.flags|=2048,Ei(9,Xv.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Gt(),t=je.identifierPrefix;if(he){var r=br,n=wr;r=(n&~(1<<32-Ft(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=xi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=tE++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},iE={readContext:St,useCallback:ay,useContext:St,useEffect:Mh,useImperativeHandle:iy,useInsertionEffect:ny,useLayoutEffect:sy,useMemo:ly,useReducer:Xu,useRef:ry,useState:function(){return Xu(Si)},useDebugValue:Uh,useDeferredValue:function(e){var t=Et();return uy(t,Pe.memoizedState,e)},useTransition:function(){var e=Xu(Si)[0],t=Et().memoizedState;return[e,t]},useMutableSource:Jv,useSyncExternalStore:Yv,useId:cy,unstable_isNewReconciler:!1},aE={readContext:St,useCallback:ay,useContext:St,useEffect:Mh,useImperativeHandle:iy,useInsertionEffect:ny,useLayoutEffect:sy,useMemo:ly,useReducer:Zu,useRef:ry,useState:function(){return Zu(Si)},useDebugValue:Uh,useDeferredValue:function(e){var t=Et();return Pe===null?t.memoizedState=e:uy(t,Pe.memoizedState,e)},useTransition:function(){var e=Zu(Si)[0],t=Et().memoizedState;return[e,t]},useMutableSource:Jv,useSyncExternalStore:Yv,useId:cy,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function id(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ve({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Xl={isMounted:function(e){return(e=e._reactInternals)?Zn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ge(),s=un(e),o=xr(n,s);o.payload=t,r!=null&&(o.callback=r),t=an(e,o,s),t!==null&&(zt(t,e,s,n),Ha(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ge(),s=un(e),o=xr(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=an(e,o,s),t!==null&&(zt(t,e,s,n),Ha(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ge(),n=un(e),s=xr(r,n);s.tag=2,t!=null&&(s.callback=t),t=an(e,s,n),t!==null&&(zt(t,e,n,r),Ha(t,e,n))}};function wp(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!mi(r,n)||!mi(s,o):!0}function py(e,t,r){var n=!1,s=fn,o=t.contextType;return typeof o=="object"&&o!==null?o=St(o):(s=nt(t)?Vn:He.current,n=t.contextTypes,o=(n=n!=null)?oo(e,s):fn),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Xl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function bp(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&&Xl.enqueueReplaceState(t,t.state,null)}function ad(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Oh(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=St(o):(o=nt(t)?Vn:He.current,s.context=oo(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(id(e,t,o,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&&Xl.enqueueReplaceState(s,s.state,null),Sl(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function uo(e,t){try{var r="",n=t;do r+=Ix(n),n=n.return;while(n);var s=r}catch(o){s=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function ec(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ld(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var lE=typeof WeakMap=="function"?WeakMap:Map;function my(e,t,r){r=xr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Tl||(Tl=!0,yd=n),ld(e,t)},r}function gy(e,t,r){r=xr(-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(){ld(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){ld(e,t),typeof n!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function xp(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new lE;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=SE.bind(null,e,t,r),t.then(e,e))}function Sp(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 Ep(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=xr(-1,1),t.tag=2,an(r,t,1))),r.lanes|=1),e)}var uE=Pr.ReactCurrentOwner,tt=!1;function Ke(e,t,r,n){t.child=e===null?Vv(t,null,r,n):ao(t,e.child,r,n)}function _p(e,t,r,n,s){r=r.render;var o=t.ref;return Bs(t,s),n=Dh(e,t,r,n,o,s),r=$h(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,kr(e,t,s)):(he&&r&&_h(t),t.flags|=1,Ke(e,t,n,s),t.child)}function kp(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!qh(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,vy(e,t,o,n,s)):(e=Ja(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:mi,r(i,n)&&e.ref===t.ref)return kr(e,t,s)}return t.flags|=1,e=cn(o,n),e.ref=t.ref,e.return=t,t.child=e}function vy(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(mi(o,n)&&e.ref===t.ref)if(tt=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(tt=!0);
vendor: 5,468 bytes, line 40
40else return t.lanes=e.lanes,kr(e,t,s)}return ud(e,t,r,n,s)}function yy(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ae(Ds,it),it|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ae(Ds,it),it|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ae(Ds,it),it|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,ae(Ds,it),it|=n;return Ke(e,t,s,r),t.child}function wy(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ud(e,t,r,n,s){var o=nt(r)?Vn:He.current;return o=oo(t,o),Bs(t,s),r=Dh(e,t,r,n,o,s),n=$h(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,kr(e,t,s)):(he&&n&&_h(t),t.flags|=1,Ke(e,t,r,s),t.child)}function Cp(e,t,r,n,s){if(nt(r)){var o=!0;vl(t)}else o=!1;if(Bs(t,s),t.stateNode===null)Ka(e,t),py(t,r,n),ad(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=St(u):(u=nt(r)?Vn:He.current,u=oo(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==u)&&bp(t,i,n,u),Hr=!1;var f=t.memoizedState;i.state=f,Sl(t,n,i,s),l=t.memoizedState,a!==n||f!==l||rt.current||Hr?(typeof c=="function"&&(id(t,r,c,n),l=t.memoizedState),(a=Hr||wp(t,r,a,n,f,l,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=u,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,qv(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:jt(t.type,a),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=St(l):(l=nt(r)?Vn:He.current,l=oo(t,l));var h=r.getDerivedStateFromProps;(c=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&bp(t,i,n,l),Hr=!1,f=t.memoizedState,i.state=f,Sl(t,n,i,s);var b=t.memoizedState;a!==d||f!==b||rt.current||Hr?(typeof h=="function"&&(id(t,r,h,n),b=t.memoizedState),(u=Hr||wp(t,r,u,n,f,b,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,b,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,b,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=b),i.props=n,i.state=b,i.context=l,n=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return cd(e,t,r,n,o,s)}function cd(e,t,r,n,s,o){wy(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&dp(t,r,!1),kr(e,t,o);n=t.stateNode,uE.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=ao(t,e.child,null,o),t.child=ao(t,null,a,o)):Ke(e,t,a,o),t.memoizedState=n.state,s&&dp(t,r,!0),t.child}function by(e){var t=e.stateNode;t.pendingContext?cp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cp(e,t.context,!1),jh(e,t.containerInfo)}function Tp(e,t,r,n,s){return io(),Ch(s),t.flags|=256,Ke(e,t,r,n),t.child}var dd={dehydrated:null,treeContext:null,retryLane:0};function hd(e){return{baseLanes:e,cachePool:null,transitions:null}}function xy(e,t,r){var n=t.pendingProps,s=me.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ae(me,s&1),e===null)return sd(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):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=tu(i,n,0,null),e=Wn(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=hd(r),t.memoizedState=dd,e):Fh(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return cE(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=cn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=cn(a,o):(o=Wn(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?hd(r):{base
vendor: 8,213 bytes, line 40
40Lanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=dd,n}return o=e.child,e=o.sibling,n=cn(o,{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 Fh(e,t){return t=tu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function pa(e,t,r,n){return n!==null&&Ch(n),ao(t,e.child,null,r),e=Fh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cE(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=ec(Error(j(422))),pa(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=tu({mode:"visible",children:n.children},s,0,null),o=Wn(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&ao(t,e.child,null,i),t.child.memoizedState=hd(i),t.memoizedState=dd,o);if(!(t.mode&1))return pa(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(j(419)),n=ec(o,n,void 0),pa(e,t,i,n)}if(a=(i&e.childLanes)!==0,tt||a){if(n=je,n!==null){switch(i&-i){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|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,_r(e,s),zt(n,e,s,-1))}return Kh(),n=ec(Error(j(421))),pa(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=EE.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,ut=on(s.nextSibling),ct=t,he=!0,Mt=null,e!==null&&(yt[wt++]=wr,yt[wt++]=br,yt[wt++]=Kn,wr=e.id,br=e.overflow,Kn=t),t=Fh(t,n.children),t.flags|=4096,t)}function Rp(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),od(e.return,t,r)}function tc(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function Sy(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(Ke(e,t,n.children,r),n=me.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rp(e,r,t);else if(e.tag===19)Rp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ae(me,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&El(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),tc(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&El(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}tc(t,!0,r,null,o);break;case"together":tc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ka(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Gn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,r=cn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=cn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function dE(e,t,r){switch(t.tag){case 3:by(t),io();break;case 5:Gv(t);break;case 1:nt(t.type)&&vl(t);break;case 4:jh(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;ae(bl,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ae(me,me.current&1),t.flags|=128,null):r&t.child.childLanes?xy(e,t,r):(ae(me,me.current&1),e=kr(e,t,r),e!==null?e.sibling:null);ae(me,me.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Sy(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ae(me,me.current),n)break;return null;case 22:case 23:return t.lanes=0,yy(e,t,r)}return kr(e,t,r)}var Ey,fd,_y,ky;Ey=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}};fd=function(){};_y=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Nn(or.current);var o=null;switch(r){case"input":s=Ic(e,s),n=Ic(e,n),o=[];break;case"select":s=ve({},s,{value:void 0}),n=ve({},n,{value:void 0}),o=[];break;case"textarea":s=Mc(e,s),n=Mc(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ml)}Fc(r,n);var i;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(li.hasOwnProperty(u)?o||(o=[]):(o=o||[]).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(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(li.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ue("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};ky=function(e,t,r,n){r!==n&&(t.flags|=4)};function Lo(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function hE(e,t,r){var n=t.pendingProps;switch(kh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return nt(t.type)&&gl(),Fe(t),null;case 3:return n=t.stateNode,lo(),ce(rt),ce(He),Lh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ha(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Mt!==null&&(xd(Mt),Mt=null))),fd(e,t),Fe(t),null;case 5:Nh(t);var s=Nn(bi.current);if(r=t.type,e!==null&&t.stateNode!=null)_y(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(j(166));return Fe(t),null}if(e=Nn(or.current),ha(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[er]=t,n[yi]=o,e=(t.mode&1)!==0,r){case"dialog":ue("cancel",n),ue("close",n);break;case"iframe":case"object":case"embed":ue("load",n);break;case"video":case"audio":for(s=0;s<Ko.length;s++)ue(Ko[s],n);break;case"source":ue("error",n);break;case"img":case"image":case"link":ue("error",n),ue("load",n);break;case"details":ue("toggle",n);break;case"input":$f(n,o),ue("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},ue("invalid",n);break;case"textarea":Uf(n,o),ue("invalid",n)}Fc(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];
vendor: 31,467 bytes, line 40
40i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&da(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&da(n.textContent,a,e),s=["children",""+a]):li.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ue("scroll",n)}switch(r){case"input":na(n),Mf(n,o,!0);break;case"textarea":na(n),Ff(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=ml)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Zg(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[er]=t,e[yi]=n,Ey(e,t,!1,!1),t.stateNode=e;e:{switch(i=zc(r,n),r){case"dialog":ue("cancel",e),ue("close",e),s=n;break;case"iframe":case"object":case"embed":ue("load",e),s=n;break;case"video":case"audio":for(s=0;s<Ko.length;s++)ue(Ko[s],e);s=n;break;case"source":ue("error",e),s=n;break;case"img":case"image":case"link":ue("error",e),ue("load",e),s=n;break;case"details":ue("toggle",e),s=n;break;case"input":$f(e,n),s=Ic(e,n),ue("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ve({},n,{value:void 0}),ue("invalid",e);break;case"textarea":Uf(e,n),s=Mc(e,n),ue("invalid",e);break;default:s=n}Fc(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?rv(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ev(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ui(e,l):typeof l=="number"&&ui(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(li.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ue("scroll",e):l!=null&&ch(e,o,l,i))}switch(r){case"input":na(e),Mf(e,n,!1);break;case"textarea":na(e),Ff(e);break;case"option":n.value!=null&&e.setAttribute("value",""+hn(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Ms(e,!!n.multiple,o,!1):n.defaultValue!=null&&Ms(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ml)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Fe(t),null;case 6:if(e&&t.stateNode!=null)ky(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(j(166));if(r=Nn(bi.current),Nn(or.current),ha(t)){if(n=t.stateNode,r=t.memoizedProps,n[er]=t,(o=n.nodeValue!==r)&&(e=ct,e!==null))switch(e.tag){case 3:da(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&da(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[er]=t,t.stateNode=n}return Fe(t),null;case 13:if(ce(me),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(he&&ut!==null&&t.mode&1&&!(t.flags&128))Hv(),io(),t.flags|=98560,o=!1;else if(o=ha(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(j(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(j(317));o[er]=t}else io(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fe(t),o=!1}else Mt!==null&&(xd(Mt),Mt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||me.current&1?Ae===0&&(Ae=3):Kh())),t.updateQueue!==null&&(t.flags|=4),Fe(t),null);case 4:return lo(),fd(e,t),e===null&&gi(t.stateNode.containerInfo),Fe(t),null;case 10:return Ph(t.type._context),Fe(t),null;case 17:return nt(t.type)&&gl(),Fe(t),null;case 19:if(ce(me),o=t.memoizedState,o===null)return Fe(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Lo(o,!1);else{if(Ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=El(e),i!==null){for(t.flags|=128,Lo(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ae(me,me.current&1|2),t.child}e=e.sibling}o.tail!==null&&Se()>co&&(t.flags|=128,n=!0,Lo(o,!1),t.lanes=4194304)}else{if(!n)if(e=El(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Lo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!he)return Fe(t),null}else 2*Se()-o.renderingStartTime>co&&r!==1073741824&&(t.flags|=128,n=!0,Lo(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Se(),t.sibling=null,r=me.current,ae(me,n?r&1|2:r&1),t):(Fe(t),null);case 22:case 23:return Vh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?it&1073741824&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function fE(e,t){switch(kh(t),t.tag){case 1:return nt(t.type)&&gl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lo(),ce(rt),ce(He),Lh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nh(t),null;case 13:if(ce(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(me),null;case 4:return lo(),null;case 10:return Ph(t.type._context),null;case 22:case 23:return Vh(),null;case 24:return null;default:return null}}var ma=!1,Be=!1,pE=typeof WeakSet=="function"?WeakSet:Set,$=null;function Is(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){be(e,t,n)}else r.current=null}function pd(e,t,r){try{r()}catch(n){be(e,t,n)}}var Pp=!1;function mE(e,t){if(Qc=hl,e=Av(),Eh(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,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==r||s!==0&&d.nodeType!==3||(a=i+s),d!==o||n!==0&&d.nodeType!==3||(l=i+n),d.nodeType===3&&(i+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===r&&++u===s&&(a=i),f===o&&++c===n&&(l=i),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xc={focusedElem:e,selectionRange:r},hl=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var p=b.memoizedProps,x=b.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:jt(t.type,p),x);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(S){be(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return b=Pp,Pp=!1,b}function ti(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 o=s.destroy;s.destroy=void 0,o!==void 0&&pd(t,r,o)}s=s.next}while(s!==n)}}function Zl(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 md(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 Cy(e){var t=e.alternate;t!==null&&(e.alternate=null,Cy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[er],delete t[yi],delete t[td],delete t[QS],delete t[XS])),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 Ty(e){return e.tag===5||e.tag===3||e.tag===4}function Ap(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ty(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 gd(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=ml));else if(n!==4&&(e=e.child,e!==null))for(gd(e,t,r),e=e.sibling;e!==null;)gd(e,t,r),e=e.sibling}function vd(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(vd(e,t,r),e=e.sibling;e!==null;)vd(e,t,r),e=e.sibling}var Ie=null,$t=!1;function Dr(e,t,r){for(r=r.child;r!==null;)Ry(e,t,r),r=r.sibling}function Ry(e,t,r){if(sr&&typeof sr.onCommitFiberUnmount=="function")try{sr.onCommitFiberUnmount(Vl,r)}catch{}switch(r.tag){case 5:Be||Is(r,t);case 6:var n=Ie,s=$t;Ie=null,Dr(e,t,r),Ie=n,$t=s,Ie!==null&&($t?(e=Ie,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ie.removeChild(r.stateNode));break;case 18:Ie!==null&&($t?(e=Ie,r=r.stateNode,e.nodeType===8?Gu(e.parentNode,r):e.nodeType===1&&Gu(e,r),fi(e)):Gu(Ie,r.stateNode));break;case 4:n=Ie,s=$t,Ie=r.stateNode.containerInfo,$t=!0,Dr(e,t,r),Ie=n,$t=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 o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&pd(r,t,i),s=s.next}while(s!==n)}Dr(e,t,r);break;case 1:if(!Be&&(Is(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){be(r,t,a)}Dr(e,t,r);break;case 21:Dr(e,t,r);break;case 22:r.mode&1?(Be=(n=Be)||r.memoizedState!==null,Dr(e,t,r),Be=n):Dr(e,t,r);break;default:Dr(e,t,r)}}function Op(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new pE),t.forEach(function(n){var s=_E.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Pt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Ie=a.stateNode,$t=!1;break e;case 3:Ie=a.stateNode.containerInfo,$t=!0;break e;case 4:Ie=a.stateNode.containerInfo,$t=!0;break e}a=a.return}if(Ie===null)throw Error(j(160));Ry(o,i,s),Ie=null,$t=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){be(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Py(t,e),t=t.sibling}function Py(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pt(t,e),Kt(e),n&4){try{ti(3,e,e.return),Zl(3,e)}catch(p){be(e,e.return,p)}try{ti(5,e,e.return)}catch(p){be(e,e.return,p)}}break;case 1:Pt(t,e),Kt(e),n&512&&r!==null&&Is(r,r.return);break;case 5:if(Pt(t,e),Kt(e),n&512&&r!==null&&Is(r,r.return),e.flags&32){var s=e.stateNode;try{ui(s,"")}catch(p){be(e,e.return,p)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Qg(s,o),zc(a,i);var u=zc(a,o);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?rv(s,d):c==="dangerouslySetInnerHTML"?ev(s,d):c==="children"?ui(s,d):ch(s,c,d,u)}switch(a){case"input":Dc(s,o);break;case"textarea":Xg(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Ms(s,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?Ms(s,!!o.multiple,o.defaultValue,!0):Ms(s,!!o.multiple,o.multiple?[]:"",!1))}s[yi]=o}catch(p){be(e,e.return,p)}}break;case 6:if(Pt(t,e),Kt(e),n&4){if(e.stateNode===null)throw Error(j(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(p){be(e,e.return,p)}}break;case 3:if(Pt(t,e),Kt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{fi(t.containerInfo)}catch(p){be(e,e.return,p)}break;case 4:Pt(t,e),Kt(e);break;case 13:Pt(t,e),Kt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Hh=Se())),n&4&&Op(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Be=(u=Be)||c,Pt(t,e),Be=u):Pt(t,e),Kt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for($=e,c=e.child;c!==null;){for(d=$=c;$!==null;){switch(f=$,h=f.child,f.tag){case 0:case 11:case 14:case 15:ti(4,f,f.return);break;case 1:Is(f,f.return);var b=f.stateNode;if(typeof b.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(p){be(n,r,p)}}break;case 5:Is(f,f.return);break;case 22:if(f.memoizedState!==null){Np(d);continue}}h!==null?(h.return=f,$=h):Np(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=tv("display",i))}catch(p){be(e,e.return,p)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(p){be(e,e.return,p)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Pt(t,e),Kt(e),n&4&&Op(e);break;case 21:break;default:Pt(t,e),Kt(e)}}function Kt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Ty(r)){var n=r;break e}r=r.return}throw Error(j(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(ui(s,""),n.flags&=-33);var o=Ap(e);vd(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Ap(e);gd(e,a,i);break;default:throw Error(j(161))}}catch(l){be(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gE(e,t,r){$=e,Ay(e)}function Ay(e,t,r){for(var n=(e.mode&1)!==0;$!==null;){var s=$,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||ma;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Be;a=ma;var u=Be;if(ma=i,(Be=l)&&!u)for($=s;$!==null;)i=$,l=i.child,i.tag===22&&i.memoizedState!==null?Lp(s):l!==null?(l.return=i,$=l):Lp(s);for(;o!==null;)$=o,Ay(o),o=o.sibling;$=s,ma=a,Be=u}jp(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,$=o):jp(e)}}function jp(e){for(;$!==null;){var t=$;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Be||Zl(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:jt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&gp(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}gp(t,i,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 c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&fi(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}Be||t.flags&512&&md(t)}catch(f){be(t,t.return,f)}}if(t===e){$=null;break}if(r=t.sibling,r!==null){r.return=t.return,$=r;break}$=t.return}}function Np(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$=r;break}$=t.return}}function Lp(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Zl(4,t)}catch(l){be(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){be(t,s,l)}}var o=t.return;try{md(t)}catch(l){be(t,o,l)}break;case 5:var i=t.return;try{md(t)}catch(l){be(t,i,l)}}}catch(l){be(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var vE=Math.ceil,Cl=Pr.ReactCurrentDispatcher,zh=Pr.ReactCurrentOwner,xt=Pr.ReactCurrentBatchConfig,te=0,je=null,ke=null,De=0,it=0,Ds=vn(0),Ae=0,_i=null,Gn=0,eu=0,Bh=0,ri=null,et=null,Hh=0,co=1/0,pr=null,Tl=!1,yd=null,ln=null,ga=!1,en=null,Rl=0,ni=0,wd=null,qa=-1,Ga=0;function Ge(){return te&6?Se():qa!==-1?qa:qa=Se()}function un(e){return e.mode&1?te&2&&De!==0?De&-De:eE.transition!==null?(Ga===0&&(Ga=pv()),Ga):(e=se,e!==0||(e=window.event,e=e===void 0?16:xv(e.type)),e):1}function zt(e,t,r,n){if(50<ni)throw ni=0,wd=null,Error(j(185));zi(e,r,n),(!(te&2)||e!==je)&&(e===je&&(!(te&2)&&(eu|=r),Ae===4&&Vr(e,De)),st(e,n),r===1&&te===0&&!(t.mode&1)&&(co=Se()+500,Yl&&yn()))}function st(e,t){var r=e.callbackNode;eS(e,t);var n=dl(e,e===je?De:0);if(n===0)r!==null&&Hf(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Hf(r),t===1)e.tag===0?ZS(Ip.bind(null,e)):Fv(Ip.bind(null,e)),JS(function(){!(te&6)&&yn()}),r=null;else{switch(mv(n)){case 1:r=mh;break;case 4:r=hv;break;case 16:r=cl;break;case 536870912:r=fv;break;default:r=cl}r=My(r,Oy.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Oy(e,t){if(qa=-1,Ga=0,te&6)throw Error(j(327));var r=e.callbackNode;if(Hs()&&e.callbackNode!==r)return null;var n=dl(e,e===je?De:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Pl(e,n);else{t=n;var s=te;te|=2;var o=Ny();(je!==e||De!==t)&&(pr=null,co=Se()+500,Hn(e,t));do try{bE();break}catch(a){jy(e,a)}while(!0);Rh(),Cl.current=o,te=s,ke!==null?t=0:(je=null,De=0,t=Ae)}if(t!==0){if(t===2&&(s=Kc(e),s!==0&&(n=s,t=bd(e,s))),t===1)throw r=_i,Hn(e,0),Vr(e,n),st(e,Se()),r;if(t===6)Vr(e,n);else{if(s=e.current.alternate,!(n&30)&&!yE(s)&&(t=Pl(e,n),t===2&&(o=Kc(e),o!==0&&(n=o,t=bd(e,o))),t===1))throw r=_i,Hn(e,0),Vr(e,n),st(e,Se()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(j(345));case 2:Tn(e,et,pr);break;case 3:if(Vr(e,n),(n&130023424)===n&&(t=Hh+500-Se(),10<t)){if(dl(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ge(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ed(Tn.bind(null,e,et,pr),t);break}Tn(e,et,pr);break;case 4:if(Vr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-Ft(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Se()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vE(n/1960))-n,10<n){e.timeoutHandle=ed(Tn.bind(null,e,et,pr),n);break}Tn(e,et,pr);break;case 5:Tn(e,et,pr);break;default:throw Error(j(329))}}}return st(e,Se()),e.callbackNode===r?Oy.bind(null,e):null}function bd(e,t){var r=ri;return e.current.memoizedState.isDehydrated&&(Hn(e,t).flags|=256),e=Pl(e,t),e!==2&&(t=et,et=r,t!==null&&xd(t)),e}function xd(e){et===null?et=e:et.push.apply(et,e)}function yE(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],o=s.getSnapshot;s=s.value;try{if(!Bt(o(),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 Vr(e,t){for(t&=~Bh,t&=~eu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ft(t),n=1<<r;e[r]=-1,t&=~n}}function Ip(e){if(te&6)throw Error(j(327));Hs();var t=dl(e,0);if(!(t&1))return st(e,Se()),null;var r=Pl(e,t);if(e.tag!==0&&r===2){var n=Kc(e);n!==0&&(t=n,r=bd(e,n))}if(r===1)throw r=_i,Hn(e,0),Vr(e,t),st(e,Se()),r;if(r===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tn(e,et,pr),st(e,Se()),null}function Wh(e,t){var r=te;te|=1;try{return e(t)}finally{te=r,te===0&&(co=Se()+500,Yl&&yn())}}function Jn(e){en!==null&&en.tag===0&&!(te&6)&&Hs();var t=te;te|=1;var r=xt.transition,n=se;try{if(xt.transition=null,se=1,e)return e()}finally{se=n,xt.transition=r,te=t,!(te&6)&&yn()}}function Vh(){it=Ds.current,ce(Ds)}function Hn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,GS(r)),ke!==null)for(r=ke.return;r!==null;){var n=r;switch(kh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&gl();break;case 3:lo(),ce(rt),ce(He),Lh();break;case 5:Nh(n);break;case 4:lo();break;case 13:ce(me);break;case 19:ce(me);break;case 10:Ph(n.type._context);break;case 22:case 23:Vh()}r=r.return}if(je=e,ke=e=cn(e.current,null),De=it=t,Ae=0,_i=null,Bh=eu=Gn=0,et=ri=null,jn!==null){for(t=0;t<jn.length;t++)if(r=jn[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}jn=null}return e}function jy(e,t){do{var r=ke;try{if(Rh(),Wa.current=kl,_l){for(var n=ge.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}_l=!1}if(qn=0,Oe=Pe=ge=null,ei=!1,xi=0,zh.current=null,r===null||r.return===null){Ae=1,_i=t,ke=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=De,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Sp(i);if(h!==null){h.flags&=-257,Ep(h,i,a,o,t),h.mode&1&&xp(o,u,t),t=h,l=u;var b=t.updateQueue;if(b===null){var p=new Set;p.add(l),t.updateQueue=p}else b.add(l);break e}else{if(!(t&1)){xp(o,u,t),Kh();break e}l=Error(j(426))}}else if(he&&a.mode&1){var x=Sp(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Ep(x,i,a,o,t),Ch(uo(l,a));break e}}o=l=uo(l,a),Ae!==4&&(Ae=2),ri===null?ri=[o]:ri.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=my(o,l,t);mp(o,g);break e;case 1:a=l;var m=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ln===null||!ln.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=gy(o,a,t);mp(o,S);break e}}o=o.return}while(o!==null)}Iy(r)}catch(E){t=E,ke===r&&r!==null&&(ke=r=r.return);continue}break}while(!0)}function Ny(){var e=Cl.current;return Cl.current=kl,e===null?kl:e}function Kh(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),je===null||!(Gn&268435455)&&!(eu&268435455)||Vr(je,De)}function Pl(e,t){var r=te;te|=2;var n=Ny();(je!==e||De!==t)&&(pr=null,Hn(e,t));do try{wE();break}catch(s){jy(e,s)}while(!0);if(Rh(),te=r,Cl.current=n,ke!==null)throw Error(j(261));return je=null,De=0,Ae}function wE(){for(;ke!==null;)Ly(ke)}function bE(){for(;ke!==null&&!Vx();)Ly(ke)}function Ly(e){var t=$y(e.alternate,e,it);e.memoizedProps=e.pendingProps,t===null?Iy(e):ke=t,zh.current=null}function Iy(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=fE(r,t),r!==null){r.flags&=32767,ke=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ae=6,ke=null;return}}else if(r=hE(r,t,it),r!==null){ke=r;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Ae===0&&(Ae=5)}function Tn(e,t,r){var n=se,s=xt.transition;try{xt.transition=null,se=1,xE(e,t,r,n)}finally{xt.transition=s,se=n}return null}function xE(e,t,r,n){do Hs();while(en!==null);if(te&6)throw Error(j(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(j(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(tS(e,o),e===je&&(ke=je=null,De=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ga||(ga=!0,My(cl,function(){return Hs(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=xt.transition,xt.transition=null;var i=se;se=1;var a=te;te|=4,zh.current=null,mE(e,r),Py(r,e),zS(Xc),hl=!!Qc,Xc=Qc=null,e.current=r,gE(r),Kx(),te=a,se=i,xt.transition=o}else e.current=r;if(ga&&(ga=!1,en=e,Rl=s),o=e.pendingLanes,o===0&&(ln=null),Jx(r.stateNode),st(e,Se()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Tl)throw Tl=!1,e=yd,yd=null,e;return Rl&1&&e.tag!==0&&Hs(),o=e.pendingLanes,o&1?e===wd?ni++:(ni=0,wd=e):ni=0,yn(),null}function Hs(){if(en!==null){var e=mv(Rl),t=xt.transition,r=se;try{if(xt.transition=null,se=16>e?16:e,en===null)var n=!1;else{if(e=en,en=null,Rl=0,te&6)throw Error(j(331));var s=te;for(te|=4,$=e.current;$!==null;){var o=$,i=o.child;if($.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for($=u;$!==null;){var c=$;switch(c.tag){case 0:case 11:case 15:ti(8,c,o)}var d=c.child;if(d!==null)d.return=c,$=d;else for(;$!==null;){c=$;var f=c.sibling,h=c.return;if(Cy(c),c===u){$=null;break}if(f!==null){f.return=h,$=f;break}$=h}}}var b=o.alternate;if(b!==null){var p=b.child;if(p!==null){b.child=null;do{var x=p.sibling;p.sibling=null,p=x}while(p!==null)}}$=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,$=i;else e:for(;$!==null;){if(o=$,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ti(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,$=g;break e}$=o.return}}var m=e.current;for($=m;$!==null;){i=$;var v=i.child;if(i.subtreeFlags&2064&&v!==null)v.return=i,$=v;else e:for(i=m;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Zl(9,a)}}catch(E){be(a,a.return,E)}if(a===i){$=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,$=S;break e}$=a.return}}if(te=s,yn(),sr&&typeof sr.onPostCommitFiberRoot=="function")try{sr.onPostCommitFiberRoot(Vl,e)}catch{}n=!0}return n}finally{se=r,xt.transition=t}}return!1}function Dp(e,t,r){t=uo(r,t),t=my(e,t,1),e=an(e,t,1),t=Ge(),e!==null&&(zi(e,1,t),st(e,t))}function be(e,t,r){if(e.tag===3)Dp(e,e,r);else for(;t!==null;){if(t.tag===3){Dp(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ln===null||!ln.has(n))){e=uo(r,e),e=gy(t,e,1),t=an(t,e,1),e=Ge(),t!==null&&(zi(t,1,e),st(t,e));break}}t=t.return}}function SE(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ge(),e.pingedLanes|=e.suspendedLanes&r,je===e&&(De&r)===r&&(Ae===4||Ae===3&&(De&130023424)===De&&500>Se()-Hh?Hn(e,0):Bh|=r),st(e,t)}function Dy(e,t){t===0&&(e.mode&1?(t=ia,ia<<=1,!(ia&130023424)&&(ia=4194304)):t=1);var r=Ge();e=_r(e,t),e!==null&&(zi(e,t,r),st(e,r))}function EE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Dy(e,r)}function _E(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(j(314))}n!==null&&n.delete(t),Dy(e,r)}var $y;$y=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||rt.current)tt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return tt=!1,dE(e,t,r);tt=!!(e.flags&131072)}else tt=!1,he&&t.flags&1048576&&zv(t,wl,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ka(e,t),e=t.pendingProps;var s=oo(t,He.current);Bs(t,r),s=Dh(null,t,n,e,s,r);var o=$h();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,nt(n)?(o=!0,vl(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Oh(t),s.updater=Xl,t.stateNode=s,s._reactInternals=t,ad(t,n,e,r),t=cd(null,t,n,!0,o,r)):(t.tag=0,he&&o&&_h(t),Ke(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ka(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=CE(n),e=jt(n,e),s){case 0:t=ud(null,t,n,e,r);break e;case 1:t=Cp(null,t,n,e,r);break e;case 11:t=_p(null,t,n,e,r);break e;case 14:t=kp(null,t,n,jt(n.type,e),r);break e}throw Error(j(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),ud(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),Cp(e,t,n,s,r);case 3:e:{if(by(t),e===null)throw Error(j(387));n=t.pendingProps,o=t.memoizedState,s=o.element,qv(e,t),Sl(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=uo(Error(j(423)),t),t=Tp(e,t,n,r,s);break e}else if(n!==s){s=uo(Error(j(424)),t),t=Tp(e,t,n,r,s);break e}else for(ut=on(t.stateNode.containerInfo.firstChild),ct=t,he=!0,Mt=null,r=Vv(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(io(),n===s){t=kr(e,t,r);break e}Ke(e,t,n,r)}t=t.child}return t;case 5:return Gv(t),e===null&&sd(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Zc(n,s)?i=null:o!==null&&Zc(n,o)&&(t.flags|=32),wy(e,t),Ke(e,t,i,r),t.child;case 6:return e===null&&sd(t),null;case 13:return xy(e,t,r);case 4:return jh(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ao(t,null,n,r):Ke(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),_p(e,t,n,s,r);case 7:return Ke(e,t,t.pendingProps,r),t.child;case 8:return Ke(e,t,t.pendingProps.children,r),t.child;case 12:return Ke(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,ae(bl,n._currentValue),n._currentValue=i,o!==null)if(Bt(o.value,i)){if(o.children===s.children&&!rt.current){t=kr(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=xr(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),od(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(j(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),od(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ke(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Bs(t,r),s=St(s),n=n(s),t.flags|=1,Ke(e,t,n,r),t.child;case 14:return n=t.type,s=jt(n,t.pendingProps),s=jt(n.type,s),kp(e,t,n,s,r);case 15:return vy(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),Ka(e,t),t.tag=1,nt(n)?(e=!0,vl(t)):e=!1,Bs(t,r),py(t,n,s),ad(t,n,s,r),c
vendor: 6,068 bytes, line 40
40d(null,t,n,!0,e,r);case 19:return Sy(e,t,r);case 22:return yy(e,t,r)}throw Error(j(156,t.tag))};function My(e,t){return dv(e,t)}function kE(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 bt(e,t,r,n){return new kE(e,t,r,n)}function qh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function CE(e){if(typeof e=="function")return qh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hh)return 11;if(e===fh)return 14}return 2}function cn(e,t){var r=e.alternate;return r===null?(r=bt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ja(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")qh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Cs:return Wn(r.children,s,o,t);case dh:i=8,s|=8;break;case Oc:return e=bt(12,r,t,s|2),e.elementType=Oc,e.lanes=o,e;case jc:return e=bt(13,r,t,s),e.elementType=jc,e.lanes=o,e;case Nc:return e=bt(19,r,t,s),e.elementType=Nc,e.lanes=o,e;case Gg:return tu(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Kg:i=10;break e;case qg:i=9;break e;case hh:i=11;break e;case fh:i=14;break e;case Br:i=16,n=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=bt(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Wn(e,t,r,n){return e=bt(7,e,n,t),e.lanes=r,e}function tu(e,t,r,n){return e=bt(22,e,n,t),e.elementType=Gg,e.lanes=r,e.stateNode={isHidden:!1},e}function rc(e,t,r){return e=bt(6,e,null,t),e.lanes=r,e}function nc(e,t,r){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TE(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=$u(0),this.expirationTimes=$u(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$u(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Gh(e,t,r,n,s,o,i,a,l){return e=new TE(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=bt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oh(o),e}function RE(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ks,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Uy(e){if(!e)return fn;e=e._reactInternals;e:{if(Zn(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var r=e.type;if(nt(r))return Uv(e,r,t)}return t}function Fy(e,t,r,n,s,o,i,a,l){return e=Gh(r,n,!0,e,s,o,i,a,l),e.context=Uy(null),r=e.current,n=Ge(),s=un(r),o=xr(n,s),o.callback=t??null,an(r,o,s),e.current.lanes=s,zi(e,s,n),st(e,n),e}function ru(e,t,r,n){var s=t.current,o=Ge(),i=un(s);return r=Uy(r),t.context===null?t.context=r:t.pendingContext=r,t=xr(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=an(s,t,i),e!==null&&(zt(e,s,i,o),Ha(e,s,i)),i}function Al(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 $p(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Jh(e,t){$p(e,t),(e=e.alternate)&&$p(e,t)}function PE(){return null}var zy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yh(e){this._internalRoot=e}nu.prototype.render=Yh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));ru(e,t,null,null)};nu.prototype.unmount=Yh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jn(function(){ru(null,e,null,null)}),t[Er]=null}};function nu(e){this._internalRoot=e}nu.prototype.unstable_scheduleHydration=function(e){if(e){var t=yv();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Wr.length&&t!==0&&t<Wr[r].priority;r++);Wr.splice(r,0,e),r===0&&bv(e)}};function Qh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function su(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mp(){}function AE(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=Al(i);o.call(u)}}var i=Fy(t,n,e,0,null,!1,!1,"",Mp);return e._reactRootContainer=i,e[Er]=i.current,gi(e.nodeType===8?e.parentNode:e),Jn(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Al(l);a.call(u)}}var l=Gh(e,0,!1,null,null,!1,!1,"",Mp);return e._reactRootContainer=l,e[Er]=l.current,gi(e.nodeType===8?e.parentNode:e),Jn(function(){ru(t,l,r,n)}),l}function ou(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Al(i);a.call(l)}}ru(t,i,e,s)}else i=AE(r,t,e,s,n);return Al(i)}gv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Vo(t.pendingLanes);
vendor: 4,598 bytes, line 40
40r!==0&&(gh(t,r|1),st(t,Se()),!(te&6)&&(co=Se()+500,yn()))}break;case 13:Jn(function(){var n=_r(e,1);if(n!==null){var s=Ge();zt(n,e,1,s)}}),Jh(e,1)}};vh=function(e){if(e.tag===13){var t=_r(e,134217728);if(t!==null){var r=Ge();zt(t,e,134217728,r)}Jh(e,134217728)}};vv=function(e){if(e.tag===13){var t=un(e),r=_r(e,t);if(r!==null){var n=Ge();zt(r,e,t,n)}Jh(e,t)}};yv=function(){return se};wv=function(e,t){var r=se;try{return se=e,t()}finally{se=r}};Hc=function(e,t,r){switch(t){case"input":if(Dc(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=Jl(n);if(!s)throw Error(j(90));Yg(n),Dc(n,s)}}}break;case"textarea":Xg(e,r);break;case"select":t=r.value,t!=null&&Ms(e,!!r.multiple,t,!1)}};ov=Wh;iv=Jn;var OE={usingClientEntryPoint:!1,Events:[Hi,As,Jl,nv,sv,Wh]},Io={findFiberByHostInstance:On,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jE={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uv(e),e===null?null:e.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||PE,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 va=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!va.isDisabled&&va.supportsFiber)try{Vl=va.inject(jE),sr=va}catch{}}ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OE;ft.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qh(t))throw Error(j(200));return RE(e,t,null,r)};ft.createRoot=function(e,t){if(!Qh(e))throw Error(j(299));var r=!1,n="",s=zy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Gh(e,1,!1,null,null,r,!1,n,s),e[Er]=t.current,gi(e.nodeType===8?e.parentNode:e),new Yh(t)};ft.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(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=uv(t),e=e===null?null:e.stateNode,e};ft.flushSync=function(e){return Jn(e)};ft.hydrate=function(e,t,r){if(!su(t))throw Error(j(200));return ou(null,e,t,!0,r)};ft.hydrateRoot=function(e,t,r){if(!Qh(e))throw Error(j(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=zy;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=Fy(t,null,e,1,r??null,s,!1,o,i),e[Er]=t.current,gi(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 nu(t)};ft.render=function(e,t,r){if(!su(t))throw Error(j(200));return ou(null,e,t,!1,r)};ft.unmountComponentAtNode=function(e){if(!su(e))throw Error(j(40));return e._reactRootContainer?(Jn(function(){ou(null,null,e,!1,function(){e._reactRootContainer=null,e[Er]=null})}),!0):!1};ft.unstable_batchedUpdates=Wh;ft.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!su(r))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return ou(e,t,r,!1,n)};ft.version="18.3.1-next-f1338f8080-20240426";function By(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(By)}catch(e){console.error(e)}}By(),Bg.exports=ft;var Vi=Bg.exports;const Hy=mo(Vi);var Wy,Up=Vi;Wy=Up.createRoot,Up.hydrateRoot;const NE=1,LE=1e6;let sc=0;function IE(){return sc=(sc+1)%Number.MAX_SAFE_INTEGER,sc.toString()}const oc=new Map,Fp=e=>{if(oc.has(e))return;const t=setTimeout(()=>{oc.delete(e),si({type:"REMOVE_TOAST",toastId:e})},LE);oc.set(e,t)},DE=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,NE)};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;
vendor: 13,963 bytes, line 40
40return r?Fp(r):e.toasts.forEach(n=>{Fp(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)}}},Ya=[];let Qa={toasts:[]};function si(e){Qa=DE(Qa,e),Ya.forEach(t=>{t(Qa)})}function $E({...e}){const t=IE(),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 ME(){const[e,t]=w.useState(Qa);return w.useEffect(()=>(Ya.push(t),()=>{const r=Ya.indexOf(t);r>-1&&Ya.splice(r,1)}),[e]),{...e,toast:$E,dismiss:r=>si({type:"DISMISS_TOAST",toastId:r})}}function fe(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 zp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vy(...e){return t=>{let r=!1;const n=e.map(s=>{const o=zp(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():zp(e[s],null)}}}}function Je(...e){return w.useCallback(Vy(...e),e)}function UE(e,t){const r=w.createContext(t),n=o=>{const{children:i,...a}=o,l=w.useMemo(()=>a,Object.values(a));return y.jsx(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function s(o){const i=w.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function Ki(e,t=[]){let r=[];function n(o,i){const a=w.createContext(i),l=r.length;r=[...r,i];const u=d=>{var g;const{scope:f,children:h,...b}=d,p=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,x=w.useMemo(()=>b,Object.values(b));return y.jsx(p.Provider,{value:x,children:h})};u.displayName=o+"Provider";function c(d,f){var p;const h=((p=f==null?void 0:f[e])==null?void 0:p[l])||a,b=w.useContext(h);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,c]}const s=()=>{const o=r.map(i=>w.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,FE(s,...t)]}function FE(...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(o){const i=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(o)[`__scope${u}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Ol(e){const t=zE(e),r=w.forwardRef((n,s)=>{const{children:o,...i}=n,a=w.Children.toArray(o),l=a.find(HE);if(l){const u=l.props.children,c=a.map(d=>d===l?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:d);return y.jsx(t,{...i,ref:s,children:w.isValidElement(u)?w.cloneElement(u,void 0,c):null})}return y.jsx(t,{...i,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function zE(e){const t=w.forwardRef((r,n)=>{const{children:s,...o}=r;if(w.isValidElement(s)){const i=VE(s),a=WE(o,s.props);return s.type!==w.Fragment&&(a.ref=n?Vy(n,i):i),w.cloneElement(s,a)}return w.Children.count(s)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ky=Symbol("radix.slottable");function BE(e){const t=({children:r})=>y.jsx(y.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Ky,t}function HE(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ky}function WE(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function VE(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 KE(e){const t=e+"CollectionProvider",[r,n]=Ki(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:x,children:g}=p,m=C.useRef(null),v=C.useRef(new Map).current;return y.jsx(s,{scope:x,itemMap:v,collectionRef:m,children:g})};i.displayName=t;const a=e+"CollectionSlot",l=Ol(a),u=C.forwardRef((p,x)=>{const{scope:g,children:m}=p,v=o(a,g),S=Je(x,v.collectionRef);return y.jsx(l,{ref:S,children:m})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Ol(c),h=C.forwardRef((p,x)=>{const{scope:g,children:m,...v}=p,S=C.useRef(null),E=Je(x,S),_=o(c,g);return C.useEffect(()=>(_.itemMap.set(S,{ref:S,...v}),()=>void _.itemMap.delete(S))),y.jsx(f,{[d]:"",ref:E,children:m})});h.displayName=c;function b(p){const x=o(e+"CollectionConsumer",p);return C.useCallback(()=>{const m=x.collectionRef.current;if(!m)return[];const v=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,k)=>v.indexOf(_.ref.current)-v.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},b,n]}var qE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=qE.reduce((e,t)=>{const r=Ol(`Primitive.${t}`),n=w.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function qy(e,t){e&&Vi.flushSync(()=>e.dispatchEvent(t))}function ar(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function GE(e,t=globalThis==null?void 0:globalThis.document){const r=ar(e);w.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 JE="DismissableLayer",Sd="dismissableLayer.update",YE="dismissableLayer.pointerDownOutside",QE="dismissableLayer.focusOutside",Bp,Gy=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iu=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=w.useContext(Gy),[c,d]=w.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=w.useState({}),b=Je(t,k=>d(k)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(x),m=c?p.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,S=m>=g,E=ZE(k=>{const A=k.target,O=[...u.branches].some(N=>N.contains(A));!S||O||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},f),_=e_(k=>{const A=k.target;[...u.branches].some(N=>N.contains(A))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},f);return GE(k=>{m===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),w.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Bp=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Hp(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Bp)}},[c,f,r,u]),w.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Hp())},[c,u]),w.useEffect(()=>{const k=()=>h({});return document.addEventListener(Sd,k),()=>document.removeEventListener(Sd,k)},[]),y.jsx(Te.div,{...l,ref:b,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,_.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,E.onPointerDownCapture)})});iu.displayName=JE;var XE="DismissableLayerBranch",Jy=w.forwardRef((e,t)=>{const r=w.useContext(Gy),n=w.useRef(null),s=Je(t,n);return w.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),y.jsx(Te.div,{...e,ref:s})});Jy.displayName=XE;function ZE(e,t=globalThis==null?void 0:globalThis.document){const r=ar(e),n=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){Yy(YE,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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function e_(e,t=globalThis==null?void 0:globalThis.document){const r=ar(e),n=w.useRef(!1);return w.useEffect(()=>{const s=o=>{o.target&&!n.current&&Yy(QE,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Hp(){const e=new CustomEvent(Sd);document.dispatchEvent(e)}function Yy(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?qy(s,o):s.dispatchEvent(o)}var t_=iu,r_=Jy,Cr=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},n_="Portal",Xh=w.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=w.useState(!1);Cr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Hy.createPortal(y.jsx(Te.div,{...n,ref:t}),i):null});Xh.displayName=n_;function s_(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var wo=e=>{const{present:t,children:r}=e,n=o_(t),s=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),o=Je(n.ref,i_(s));return typeof r=="function"||n.isPresent?w.cloneElement(s,{ref:o}):null};wo.displayName="Presence";function o_(e){const[t,r]=w.useState(),n=w.useRef(null),s=w.useRef(e),o=w.useRef("none"),i=e?"mounted":"unmounted",[a,l]=s_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=ya(n.current);o.current=a==="mounted"?u:"none"},[a]),Cr(()=>{const u=n.current,c=s.current;if(c!==e){const f=o.current,h=ya(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Cr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const p=ya(n.current).includes(h.animationName);if(h.target===t&&p&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=h=>{h.target===t&&(o.current=ya(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function ya(e){return(e==null?void 0:e.animationName)||"none"}function i_(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 a_=ah[" useInsertionEffect ".trim().toString()]||Cr;function Qy({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=l_({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const c=w.useRef(e!==void 0);w.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${n} is changing from ${d?"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.`),c.current=a},[a,n])}const u=w.useCallback(c=>{var d;if(a){const f=u_(c)?c(e):c;f!==e&&((d=i.current)==null||d.call(i,f))}else o(c)},[a,e,o,i]);return[l,u]}function l_({defaultProp:e,onChange:t}){const[r,n]=w.useState(e),s=w.useRef(r),o=w.useRef(t);return a_(()=>{o.current=t},[t]),w.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function u_(e){return typeof e=="function"}var c_=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"}),d_="VisuallyHidden",au=w.forwardRef((e,t)=>y.jsx(Te.span,{...e,ref:t,style:{...c_,...e.style}}));au.displayName=d_;var h_=au,Zh="ToastProvider",[ef,f_,p_]=KE("Toast"),[Xy,QN]=Ki("Toast",[p_]),[m_,lu]=Xy(Zh),Zy=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=w.useState(null),[u,c]=w.useState(0),d=w.useRef(!1),f=w.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zh}\`. Expected non-empty \`string\`.`),y.jsx(ef.Provider,{scope:t,children:y.jsx(m_,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:w.useCallback(()=>c(h=>h+1),[]),onToastRemove:w.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Zy.displayName=Zh;var ew="ToastViewport",g_=["F8"],Ed="toast.viewportPause",_d="toast.viewportResume",tw=w.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=g_,label:s="Notifications ({hotkey})",...o}=e,i=lu(ew,r),a=f_(r),l=w.useRef(null),u=w.useRef(null),c=w.useRef(null),d=w.useRef(null),f=Je(t,d,i.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=i.toastCount>0;w.useEffect(()=>{const x=g=>{var v;n.length!==0&&n.every(S=>g[S]||g.code===S)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),w.useEffect(()=>{const x=l.current,g=d.current;if(b&&x&&g){const m=()=>{if(!i.isClosePausedRef.current){const _=new CustomEvent(Ed);g.dispatchEvent(_),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const _=new CustomEvent(_d);g.dispatchEvent(_),i.isClosePausedRef.current=!1}},S=_=>{!x.contains(_.relatedTarget)&&v()},E=()=>{x.contains(document.activeElement)||v()};return x.addEventListener("focusin",m),x.addEventListener("focusout",S),x.addEventListener("pointermove",m),x.addEventListener("pointerleave",E),window.addEventListener("blur",m),window.addEventListener("focus",v),()=>{x.removeEventListener("focusin",m),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",m),x.removeEventListener("pointerleave",E),window.removeEventListener("blur",m),window.removeEventListener("focus",v)}}},[b,i.isClosePausedRef]);const p=w.useCallback(({tabbingDirection:x})=>{const m=a().map(v=>{const S=v.ref.current,E=[S,...P_(S)];return x==="forwards"?E:E.reverse()});return(x==="forwards"?m.reverse():m).flat()},[a]);return w.useEffect(()=>{const x=d.current;if(x){const g=m=>{var E,_,k;const v=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!v){const A=document.activeElement,O=m.shiftKey;if(m.target===x&&O){(E=u.current)==null||E.focus();return}const I=p({tabbingDirection:O?"backwards":"forwards"}),V=I.findIndex(L=>L===A);ic(I.slice(V+1))?m.preventDefault():O?(_=u.current)==null||_.focus():(k=c.current)==null||k.focus()}};return x.addEventListener("keydown",g),()=>x.removeEventListener("keydown",g)}},[a,p]),y.jsxs(r_,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&y.jsx(kd,{ref:u,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"forwards"});ic(x)}}),y.jsx(ef.Slot,{scope:r,children:y.jsx(Te.ol,{tabIndex:-1,...o,ref:f})}),b&&y.jsx(kd,{ref:c,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"backwards"});ic(x)}})]})});tw.displayName=ew;var rw="ToastFocusProxy",kd=w.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=lu(rw,r);return y.jsx(au,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&n()}})});kd.displayName=rw;var qi="Toast",v_="toast.swipeStart",y_="toast.swipeMove",w_="toast.swipeCancel",b_="toast.swipeEnd",nw=w.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a,l]=Qy({prop:n,defaultProp:s??!0,onChange:o,caller:qi});return y.jsx(wo,{present:r||a,children:y.jsx(E_,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:ar(e.onPause),onResume:ar(e.onResume),onSwipeStart:fe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:fe(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:fe(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:fe(e.onSwipeEnd,u=>{const{x:c,y:d}=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",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});nw.displayName=qi;var[x_,S_]=Xy(qi,{onClose(){}}),E_=w.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...b}=e,p=lu(qi,r),[x,g]=w.useState(null),m=Je(t,L=>g(L)),v=w.useRef(null),S=w.useRef(null),E=s||p.duration,_=w.useRef(0),k=w.useRef(E),A=w.useRef(0),{onToastAdd:O,onToastRemove:N}=p,F=ar(()=>{var K;(x==null?void 0:x.contains(document.activeElement))&&((K=p.viewport)==null||K.focus()),i()}),I=w.useCallback(L=>{!L||L===1/0||(window.clearTimeout(A.current),_.current=new Date().getTime(),A.current=window.setTimeout(F,L))},[F]);w.useEffect(()=>{const L=p.viewport;if(L){const K=()=>{I(k.current),u==null||u()},B=()=>{const q=new Date().getTime()-_.current;k.current=k.current-q,window.clearTimeout(A.current),l==null||l()};return L.addEventListener(Ed,B),L.addEventListener(_d,K),()=>{L.removeEventListener(Ed,B),L.removeEventListener(_d,K)}}},[p.viewport,E,l,u,I]),w.useEffect(()=>{o&&!p.isClosePausedRef.current&&I(E)},[o,E,p.isClosePausedRef,I]),w.useEffect(()=>(O(),()=>N()),[O,N]);const V=w.useMemo(()=>x?cw(x):null,[x]);return p.viewport?y.jsxs(y.Fragment,{children:[V&&y.jsx(__,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),y.jsx(x_,{scope:r,onClose:F,children:Vi.createPortal(y.jsx(ef.ItemSlot,{scope:r,children:y.jsx(t_,{asChild:!0,onEscapeKeyDown:fe(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||F(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(Te.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:fe(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:fe(e.onPointerDown,L=>{L.button===0&&(v.current={x:L.clientX,y:L.clientY})}),onPointerMove:fe(e.onPointerMove,L=>{if(!v.current)return;const K=L.clientX-v.current.x,B=L.clientY-v.current.y,q=!!S.current,R=["left","right"].includes(p.swipeDirection),T=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,D=R?T(0,K):0,H=R?0:T(0,B),U=L.pointerType==="touch"?10:2,Y={x:D,y:H},X={originalEvent:L,delta:Y};q?(S.current=Y,wa(y_,d,X,{discrete:!1})):Wp(Y,p.swipeDirection,U)?(S.current=Y,wa(v_,c,X,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(K)>U||Math.abs(B)>U)&&(v.current=null)}),onPointerUp:fe(e.onPointerUp,L=>{const K=S.current,B=L.target;if(B.hasPointerCapture(L.pointerId)&&B.releasePointerCapture(L.pointerId),S.current=null,v.current=null,K){const q=L.currentTarget,R={originalEvent:L,delta:K};Wp(K,p.swipeDirection,p.swipeThreshold)?wa(b_,h,R,{discrete:!0}):wa(w_,f,R,{discrete:!0}),q.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),__=e=>{const{__scopeToast:t,children:r,...n}=e,s=lu(qi,t),[o,i]=w.useState(!1),[a,l]=w.useState(!1);return T_(()=>i(!0)),w.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:y.jsx(Xh,{asChild:!0,children:y.jsx(au,{...n,children:o&&y.jsxs(y.Fragment,{children:[s.label," ",r]})})})},k_="ToastTitle",sw=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return y.jsx(Te.div,{...n,ref:t})});sw.displayName=k_;var C_="ToastDescription",ow=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return y.jsx(Te.div,{...n,ref:t})});ow.displayName=C_;var iw="ToastAction",aw=w.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?y.jsx(uw,{altText:r,asChild:!0,children:y.jsx(tf,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${iw}\`. Expected non-empty \`string\`.`),null)});aw.displayName=iw;var lw="ToastClose",tf=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=S_(lw,r);return y.jsx(uw,{asChild:!0,children:y.jsx(Te.button,{type:"button",...n,ref:t,onClick:fe(e.onClick,s.onClose)})})});tf.displayName=lw;var uw=w.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return y.jsx(Te.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function cw(e){const t=[];
vendor: 4,205 bytes, lines 40-65
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",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...cw(n))}}),t}function wa(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?qy(s,o):s.dispatchEvent(o)}var Wp=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function T_(e=()=>{}){const t=ar(e);Cr(()=>{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 P_(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 ic(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var A_=Zy,dw=tw,hw=nw,fw=sw,pw=ow,mw=aw,gw=tf;function vw(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=vw(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function yw(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=vw(e))&&(n&&(n+=" "),n+=t);return n}const Vp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kp=yw,O_=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Kp(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=o==null?void 0:o[u];if(c===null)return null;const f=Vp(c)||Vp(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(b=>{let[p,x]=b;return Array.isArray(x)?x.includes({...o,...a}[p]):{...o,...a}[p]===x})?[...u,d,f]:u},[]);return Kp(e,i,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 j_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ww=(...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 N_={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 L_=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...N_,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ww("lucide",s),...a},[...i.map(([u,c])=>w.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
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 I_=(e,t)=>{const r=w.forwardRef(({className:n,...s},o)=>w.createElement(L_,{ref:o,iconNode:t,className:ww(`lucide-${j_(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 bw=I_("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,223 bytes, line 65
65],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rf="-",D_=e=>{const t=M_(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(rf);return a[0]===""&&a.length!==1&&a.shift(),xw(a,t)||$_(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},xw=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?xw(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(rf);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},qp=/^\[(.+)\]$/,$_=e=>{if(qp.test(e)){const t=qp.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},M_=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return F_(Object.entries(e.classGroups),r).forEach(([o,i])=>{Cd(i,n,o,t)}),n},Cd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Gp(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(U_(s)){Cd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Cd(i,Gp(t,o),r,n)})})},Gp=(e,t)=>{let r=e;return t.split(rf).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},U_=e=>e.isThemeGetter,F_=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e,z_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},Sw="!",B_=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,c=0,d;for(let x=0;x<a.length;x++){let g=a[x];if(u===0){if(g===s&&(n||a.slice(x,x+o)===t)){l.push(a.slice(c,x)),c=x+o;continue}if(g==="/"){d=x;continue}}g==="["?u++:g==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(Sw),b=h?f.substring(1):f,p=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:p}};return r?a=>r({className:a,parseClassName:i}):i},H_=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},W_=e=>({cache:z_(e.cacheSize),parseClassName:B_(e),...D_(e)}),V_=/\s+/,K_=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(V_);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let b=!!h,p=n(b?f.substring(0,h):f);if(!p){if(!b){a=u+(a.length>0?" "+a:a);continue}if(p=n(f),!p){a=u+(a.length>0?" "+a:a);continue}b=!1}const x=H_(c).join(":"),g=d?x+Sw:x,m=g+p;if(o.includes(m))continue;o.push(m);const v=s(p,b);for(let S=0;S<v.length;++S){const E=v[S];o.push(g+E)}a=u+(a.length>0?" "+a:a)}return a};function q_(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ew(t))&&(n&&(n+=" "),n+=r);return n}const Ew=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ew(e[n]))&&(r&&(r+=" "),r+=t);return r};function G_(e,...t){let r,n,s,o=i;function i(l){const u=t.reduce((c,d)=>d(c),e());return r=W_(u),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=K_(l,r);return s(l,c),c}return function(){return o(q_.apply(null,arguments))}}const le=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},_w=/^\[(?:([a-z-]+):)?(.+)\]$/i,J_=/^\d+\/\d+$/,Y_=new Set(["px","full","screen"]),Q_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X_=/\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$/,Z_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ek=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hr=e=>Ws(e)||Y_.has(e)||J_.test(e),$r=e=>bo(e,"length",uk),Ws=e=>!!e&&!Number.isNaN(Number(e)),ac=e=>bo(e,"number",Ws),Do=e=>!!e&&Number.isInteger(Number(e)),rk=e=>e.endsWith("%")&&Ws(e.slice(0,-1)),Q=e=>_w.test(e),Mr=e=>Q_.test(e),nk=new Set(["length","size","percentage"]),sk=e=>bo(e,nk,kw),ok=e=>bo(e,"position",kw),ik=new Set(["image","url"]),ak=e=>bo(e,ik,dk),lk=e=>bo(e,"",ck),$o=()=>!0,bo=(e,t,r)=>{const n=_w.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},uk=e=>X_.test(e)&&!Z_.test(e),kw=()=>!1,ck=e=>ek.test(e),dk=e=>tk.test(e),hk=()=>{const e=le("colors"),t=le("spacing"),r=le("blur"),n=le("brightness"),s=le("borderColor"),o=le("borderRadius"),i=le("borderSpacing"),a=le("borderWidth"),l=le("contrast"),u=le("grayscale"),c=le("hueRotate"),d=le("invert"),f=le("gap"),h=le("gradientColorStops"),b=le("gradientColorStopPositions"),p=le("inset"),x=le("margin"),g=le("opacity"),m=le("padding"),v=le("saturate"),S=le("scale"),E=le("sepia"),_=le("skew"),k=le("space"),A=le("translate"),O=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",Q,t],I=()=>[Q,t],V=()=>["",hr,$r],L=()=>["auto",Ws,Q],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",Q],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[Ws,Q];return{cacheSize:500,separator:":",theme:{colors:[$o],spacing:[hr,$r],blur:["none","",Mr,Q],brightness:H(),borderColor:[e],borderRadius:["none","","full",Mr,Q],borderSpacing:I(),borderWidth:V(),contrast:H(),grayscale:T(),hueRotate:H(),invert:T(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[rk,$r],inset:F(),margin:F(),opacity:H(),padding:I(),saturate:H(),scale:H(),sepia:T(),skew:H(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[Mr]}],"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:[...K(),Q]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Do,Q]}],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",Q]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Do,Q]}],"grid-cols":[{"grid-cols":[$o]}],"col-start-end":[{col:["auto",{span:["full",Do,Q]},Q]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[$o]}],"row-start-end":[{row:["auto",{span:[Do,Q]},Q]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[Mr]},Mr]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Mr,$r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ac]}],"font-family":[{font:[$o]}],"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",Q]}],"line-clamp":[{"line-clamp":["none",Ws,ac]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hr,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hr,$r]}],"underline-offset":[{"underline-offset":["auto",hr,Q]}],"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:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],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",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),ok]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ak]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}
vendor: 5,172 bytes, line 65
65],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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":[g]}],"border-style":[{border:[...B(),"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":[g]}],"divide-style":[{divide:B()}],"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:["",...B()]}],"outline-offset":[{"outline-offset":[hr,Q]}],"outline-w":[{outline:[hr,$r]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[hr,$r]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Mr,lk]}],"shadow-color":[{shadow:[$o]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Mr,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[E]}],"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":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Do,Q]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],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",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 65
65],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",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hr,$r,ac]}],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"]}}},fk=G_(hk);function _t(...e){return fk(yw(e))}const pk=A_,Cw=w.forwardRef(({className:e,...t},r)=>y.jsx(dw,{ref:r,className:_t("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}));Cw.displayName=dw.displayName;const mk=O_("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"}}),Tw=w.forwardRef(({className:e,variant:t,...r},n)=>y.jsx(hw,{ref:n,className:_t(mk({variant:t}),e),...r}));Tw.displayName=hw.displayName;const gk=w.forwardRef(({className:e,...t},r)=>y.jsx(mw,{ref:r,className:_t("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}));gk.displayName=mw.displayName;const Rw=w.forwardRef(({className:e,...t},r)=>y.jsx(gw,{ref:r,className:_t("absolute right-2 top-2 rounded-md p-1 text-foreground
65/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:y.jsx(bw,{className:"h-4 w-4"})}));Rw.displayName=gw.displayName;const Pw=w.forwardRef(({className:e,...t},r)=>y.jsx(fw,{ref:r,className:_t("text-sm font-semibold",e),...t}));Pw.displayName=fw.displayName;const Aw=w.forwardRef(({className:e,...t},r)=>y.jsx(pw,{ref:r,className:_t("text-sm opacity-90",e),...t}));Aw.displayName=pw.displayName;function vk(){const{toasts:e}=ME();return y.jsxs(pk,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return y.jsxs(Tw,{...o,children:[y.jsxs("div",{className:"grid gap-1",children:[r&&y.jsx(Pw,{children:r}),n&&y.jsx(Aw,{children:n})]}),s,y.jsx(Rw,{})]},t)}),y.jsx(Cw,{})]})}var Jp=["light","dark"],yk="(prefers-color-scheme: dark)",wk=w.createContext(void 0),bk={setTheme:e=>{},themes:[]},xk=()=>{var e;return(e=w.useContext(wk))!=null?e:bk};w.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let u=o==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?Jp.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(b,p=!1,x=!0)=>{let g=i?i[b]:b,m=p?b+"|| ''":`'${g}'`,v="";return s&&x&&!p&&Jp.includes(b)&&(v+=`d.style.colorScheme = '${b}';`),r==="class"?p||g?v+=`c.add(${m})`:v+="null":g&&(v+=`d[s](n,${m})`),v},h=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${yk}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}${u?"":"else{"+f(o,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}else{${f(o,!1,!1)};}${d}}catch(t){}}();`;return w.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var Sk=e=>{switch(e){case"success":return kk;case"info":return Tk;case"warning":return Ck;case"error":return Rk;default:return null}},Ek=Array(12).fill(0),_k=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},Ek.map((r,n)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),kk=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Ck=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),Tk=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Rk=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),Pk=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ak=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Td=1,Ok=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 65
65{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:Td++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,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)=>
65this.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,o,i=n.then(async l=>{if(o=["resolve",l],C.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(Nk(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:c})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>o[0]==="reject"?u(o[1]):l(o[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)||Td++;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}},Ze=new Ok,jk=(e,t)=>{let r=(t==null?void 0:t.id)||Td++;return Ze.addToast({title:e,...t,id:r}),r},Nk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Lk=jk,Ik=()=>Ze.toasts,Dk=()=>Ze.getActiveToasts();Object.assign(Lk,{success:Ze.success,info:Ze.info,warning:Ze.warning,error:Ze.error,custom:Ze.custom,message:Ze.message,promise:Ze.promise,dismiss:Ze.dismiss,loading:Ze.loading},{getHistory:Ik,getToasts:Dk});function $k(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))}$k(`: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;
65left: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}
65: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%);
65--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%)}
66`);function ba(e){return e.label!==void 0}var Mk=3,Uk="32px",Fk="16px",Yp=4e3,zk=356,Bk=14,Hk=20,Wk=200;function At(...e){return e.filter(Boolean).join(" ")}function Vk(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var Kk=e=>{var t,r,n,s,o,i,a,l,u,c,d;let{invert:f,toast:h,unstyled:b,interacting:p,setHeights:x,visibleToasts:g,heights:m,index:v,toasts:S,expanded:E,removeToast:_,defaultRichColors:k,closeButton:A,style:O,cancelButtonStyle:N,actionButtonStyle:F,className:I="",descriptionClassName:V="",duration:L,position:K,gap:B,loadingIcon:q,expandByDefault:R,classNames:T,icons:D,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:U}=e,[Y,X]=C.useState(null),[Z,pe]=C.useState(null),[re,cr]=C.useState(!1),[kt,bn]=C.useState(!1),[Or,rs]=C.useState(!1),[jr,Qi]=C.useState(!1),[Tu,Xi]=C.useState(!1),[Ru,Co]=C.useState(0),[ns,_f]=C.useState(0),To=C.useRef(h.duration||L||Yp),kf=C.useRef(null),xn=C.useRef(null),Yb=v===0,Qb=v+1<=g,mt=h.type,ss=h.dism
66issible!==!1,Xb=h.className||"",Zb=h.descriptionClassName||"",Zi=C.useMemo(()=>m.findIndex(G=>G.toastId===h.id)||0,[m,h.id]),ex=C.useMemo(()=>{var G;return(G=h.closeButton)!=null?G:A},[h.closeButton,A]),Cf=C.useMemo(()=>h.duration||L||Yp,[h.duration,L]),Pu=C.useRef(0),os=C.useRef(0),Tf=C.useRef(0),is=C.useRef(null),[tx,rx]=K.split("-"),Rf=C.useMemo(()=>m.reduce((G,oe,de)=>de>=Zi?G:G+oe.height,0),[m,Zi]),Pf=Ak(),nx=h.invert||f,Au=mt==="loading";os.current=C.useMemo(()=>Zi*B+Rf,[Zi,Rf]),C.useEffect(()=>{To.current=Cf},[Cf]),C.useEffect(()=>{cr(!0)},[]),C.useEffect(()=>{let G=xn.current;if(G){let oe=G.getBoundingClientRect().height;return _f(oe),x(de=>[{toastId:h.id,height:oe,position:h.position},...de]),()=>x(de=>de.filter(Ct=>Ct.toastId!==h.id))}},[x,h.id]),C.useLayoutEffect(()=>{if(!re)return;let G=xn.current,oe=G.style.height;G.style.height="auto";let de=G.getBoundingClientRect().height;G.style.height=oe,_f(de),x(Ct=>Ct.find(Tt=>Tt.toastId===h.id)?Ct.map(Tt=>Tt.toastId===h.id?{...Tt,height:de}:Tt):[{toastId:h.id,height:de,position:h.position},...Ct])},[re,h.title,h.description,x,h.id]);let Nr=C.useCallback(()=>{bn(!0),Co(os.current),x(G=>G.filter(oe=>oe.toastId!==h.id)),setTimeout(()=>{_(h)},Wk)},[h,_,x,os]);C.useEffect(()=>{if(h.promise&&mt==="loading"||h.duration===1/0||h.type==="loading")return;let G;return E||p||U&&Pf?(()=>{if(Tf.current<Pu.current){let oe=new Date().getTime()-Pu.current;To.current=To.current-oe}Tf.current=new Date().getTime()})():To.current!==1/0&&(Pu.current=new Date().getTime(),G=setTimeout(()=>{var oe;(oe=h.onAutoClose)==null||oe.call(h,h),Nr()},To.current)),()=>clearTimeout(G)},[E,p,h,mt,U,Pf,Nr]),C.useEffect(()=>{h.delete&&Nr()},[Nr,h.delete]);function sx(){var G,oe,de;return D!=null&&D.loading?C.createElement("div",{className:At(T==null?void 0:T.loader,(G=h==null?void 0:h.classNames)==null?void 0:G.loader,"sonner-loader"),"data-visible":mt==="loading"},D.loading):q?C.createElement("div",{className:At(T==null?void 0:T.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":mt==="loading"},q):C.createElement(_k,{className:At(T==null?void 0:T.loader,(de=h==null?void 0:h.classNames)==null?void 0:de.loader),visible:mt==="loading"})}return C.createElement("li",{tabIndex:0,ref:xn,className:At(I,Xb,T==null?void 0:T.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[mt],(r=h==null?void 0:h.classNames)==null?void 0:r[mt]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:k,"data-styled":!(h.jsx||h.unstyled||b),"data-mounted":re,"data-
66promise":!!h.promise,"data-swiped":Tu,"data-removed":kt,"data-visible":Qb,"data-y-position":tx,"data-x-position":rx,"data-index":v,"data-front":Yb,"data-swiping":Or,"data-dismissible":ss,"data-type":mt,"data-invert":nx,"data-swipe-out":jr,"data-swipe-direction":Z,"data-expanded":!!(E||R&&re),style:{"--index":v,"--toasts-before":v,"--z-index":S.length-v,"--offset":`${kt?Ru:os.current}px`,"--initial-height":R?"auto":`${ns}px`,...O,...h.style},onDragEnd:()=>{rs(!1),X(null),is.current=null},onPointerDown:G=>{Au||!ss||(kf.current=new Date,Co(os.current),G.target.setPointerCapture(G.pointerId),G.target.tagName!=="BUTTON"&&(rs(!0),is.current={x:G.clientX,y:G.clientY}))},onPointerUp:()=>{var G,oe,de,Ct;if(jr||!ss)return;is.current=null;let Tt=Number(((G=xn.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((oe=xn.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Sn=new Date().getTime()-((de=kf.current)==null?void 0:de.getTime()),Rt=Y==="x"?Tt:Lr,Ir=Math.abs(Rt)/Sn;if(Math.abs(Rt)>=Hk||Ir>.11){Co(os.current),(Ct=h.onDismiss)==null||Ct.call(h,h),pe(Y==="x"?Tt>0?"right":"left":Lr>0?"down":"up"),Nr(),Qi(!0),Xi(!1);return}rs(!1),X(null)},onPointerMove:G=>{var oe,de,Ct,Tt;if(!is.current||!ss||((oe=window.getSelection())==null?void 0:oe.toString().length)>0)return;let Lr=G.clientY-is.current.y,Sn=G.clientX-is.current.x,Rt=(de=e.swipeDirections)!=null?de:Vk(K);!Y&&(Math.abs(Sn)>1||Math.abs(Lr)>1)&&X(Math.abs(Sn)>Math.abs(Lr)?"x":"y");let Ir={x:0,y:0};Y==="y"?(Rt.includes("top")||Rt.includes("bottom"))&&(Rt.includes("top")&&Lr<0||Rt.includes("bottom")&&Lr>0)&&(Ir.y=Lr):Y==="x"&&(Rt.includes("left")||Rt.includes("right"))&&(Rt.includes("left")&&Sn<0||Rt.includes("right")&&Sn>0)&&(Ir.x=Sn),(Math.abs(Ir.x)>0||Math.abs(Ir.y)>0)&&Xi(!0),(Ct=xn.current)==null||Ct.style.setProperty("--swipe-amount-x",`${Ir.x}px`),(Tt=xn.current)==null||Tt.style.setProperty("--swipe-amount-y",`${Ir.y}px`)}},ex&&!h.jsx?C.createElement("button",{"aria-label":H,"data-disabled":Au,"data-close-button":!0,onClick:Au||!ss?()=>{}:()=>{var G;Nr(),(G=h.onDismiss)==null||G.call(h,h)},className:At(T==null?void 0:T.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(o=D==null?void 0:D.close)!=null?o:Pk):null,h.jsx||w.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:C.createElement(C.Fragment,null,mt||h.icon||h.promise?C.createElement("div",{"data-icon":"",className:At(T==null?void 0:T.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||sx():null,h.type!=="loading"?h.icon||(D==null?void 0:D[mt])||Sk(mt):null):null,C.createElement("div",{"data-content":"",className:At(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},C.createElement("div",{"data-title":"",className:At(T==null?void 0:T.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?C.createElement("div",{"data-description":"",className:At(V,Zb,T==null?void 0:T.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),w.isValidElement(h.cancel)?h.cancel:h.cancel&&ba(h.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||N,onClick:G=>{var oe,de;ba(h.cancel)&&ss&&((de=(oe=h.cancel).onClick)==null||de.call(oe,G),Nr())},className:At(T==null?void 0:T.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,w.isValidElement(h.action)?h.action:h.action&&ba(h.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||F,onClick:G=>{var oe,de;ba(h.action)&&((de=(oe=h.action).onClick)==null||de.call(oe,G),!G.defaultPrevented&&Nr())},className:At(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function Qp(){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 qk(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?Fk:Uk;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${i}-${c}`]=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[`${i}-${u}`]=a:r[`${i}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var Gk=w.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:b=Mk,toastOptions:p,dir:x=Qp(),gap:g=Bk,loadingIcon:m,icons:v,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:E}=e,[_,k]=C.useState([]),A=C.useMemo(()=>Array.from(new Set([n].concat(_.filter(U=>U.position).map(U=>U.position)))),[_,n]),[O,N]=C.useState([]),[F,I]=C.useState(!1),[V,L]=C.useState(!1),[K,B]=C.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
66k":"light"),q=C.useRef(null),R=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=C.useRef(null),D=C.useRef(!1),H=C.useCallback(U=>{k(Y=>{var X;return(X=Y.find(Z=>Z.id===U.id))!=null&&X.delete||Ze.dismiss(U.id),Y.filter(({id:Z})=>Z!==U.id)})},[]);return C.useEffect(()=>Ze.subscribe(U=>{if(U.dismiss){k(Y=>Y.map(X=>X.id===U.id?{...X,delete:!0}:X));return}setTimeout(()=>{Hy.flushSync(()=>{k(Y=>{let X=Y.findIndex(Z=>Z.id===U.id);return X!==-1?[...Y.slice(0,X),{...Y[X],...U},...Y.slice(X+1)]:[U,...Y]})})})}),[]),C.useEffect(()=>{if(c!=="system"){B(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:Y})=>{B(Y?"dark":"light")})}catch{U.addListener(({matches:X})=>{try{B(X?"dark":"light")}catch(Z){console.error(Z)}})}},[c]),C.useEffect(()=>{_.length<=1&&I(!1)},[_]),C.useEffect(()=>{let U=Y=>{var X,Z;s.every(pe=>Y[pe]||Y.code===pe)&&(I(!0),(X=q.current)==null||X.focus()),Y.code==="Escape"&&(document.activeElement===q.current||(Z=q.current)!=null&&Z.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),C.useEffect(()=>{if(q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,D.current=!1)}},[q.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((U,Y)=>{var X;let[Z,pe]=U.split("-");return _.length?C.createElement("ol",{key:U,dir:x==="auto"?Qp():x,tabIndex:-1,ref:q,className:a,"data-sonner-toaster":!0,"data-theme":K,"data-y-position":Z,"data-lifted":F&&_.length>1&&!o,"data-x-position":pe,style:{"--front-toast-height":`${((X=O[0])==null?void 0:X.height)||0}px`,"--width":`${zk}px`,"--gap":`${g}px`,...h,...qk(l,u)},onBlur:re=>{D.current&&!re.currentTarget.contains(re.relatedTarget)&&(D.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||D.current||(D.current=!0,T.current=re.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{V||I(!1)},onDragEnd:()=>I(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},_.filter(re=>!re.position&&Y===0||re.position===U).map((re,cr)=>{var kt,bn;return C.createElement(Kk,{key:re.id,icons:v,index:cr,toast:re,defaultRichColors:d,duration:(kt=p==null?void 0:p.duration)!=null?kt:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:r,visibleToasts:b,closeButton:(bn=p==null?void 0:p.closeButton)!=null?bn:i,interacting:V,position:U,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:H,toasts:_.filter(Or=>Or.position==re.position),heights:O.filter(Or=>Or.position==re.position),setHeights:N,expandByDefault:o,gap:g,loadingIcon:m,expanded:F,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const Jk=({...e})=>{const{theme:t="system"}=xk();return y.jsx(Gk,{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})};var Yk=ah[" useId ".trim().toString()]||(()=>{}),Qk=0;function lc(e){const[t,r]=w.useState(Yk());return Cr(()=>{e||r(n=>n??String(Qk++))},[e]),e||(t?`radix-${t}`:"")}const Xk=["top","right","bottom","left"],pn=Math.min,at=Math.max,jl=Math.round,xa=Math.floor,ir=e=>({x:e,y:e}
vendor: 11,921 bytes, line 66
66),Zk={left:"right",right:"left",bottom:"top",top:"bottom"},e1={start:"end",end:"start"};function Rd(e,t,r){return at(e,pn(t,r))}function Tr(e,t){return typeof e=="function"?e(t):e}function Rr(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function nf(e){return e==="x"?"y":"x"}function sf(e){return e==="y"?"height":"width"}const t1=new Set(["top","bottom"]);function nr(e){return t1.has(Rr(e))?"y":"x"}function of(e){return nf(nr(e))}function r1(e,t,r){r===void 0&&(r=!1);const n=xo(e),s=of(e),o=sf(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Nl(i)),[i,Nl(i)]}function n1(e){const t=Nl(e);return[Pd(e),t,Pd(t)]}function Pd(e){return e.replace(/start|end/g,t=>e1[t])}const Xp=["left","right"],Zp=["right","left"],s1=["top","bottom"],o1=["bottom","top"];function i1(e,t,r){switch(e){case"top":case"bottom":return r?t?Zp:Xp:t?Xp:Zp;case"left":case"right":return t?s1:o1;default:return[]}}function a1(e,t,r,n){const s=xo(e);let o=i1(Rr(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Pd)))),o}function Nl(e){return e.replace(/left|right|bottom|top/g,t=>Zk[t])}function l1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ow(e){return typeof e!="number"?l1(e):{top:e,right:e,bottom:e,left:e}}function Ll(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 em(e,t,r){let{reference:n,floating:s}=e;const o=nr(t),i=of(t),a=sf(i),l=Rr(t),u=o==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(xo(t)){case"start":h[i]-=f*(r&&u?-1:1);break;case"end":h[i]+=f*(r&&u?-1:1);break}return h}const u1=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=em(u,n,l),f=n,h={},b=0;for(let p=0;p<a.length;p++){const{name:x,fn:g}=a[p],{x:m,y:v,data:S,reset:E}=await g({x:c,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});c=m??c,d=v??d,h={...h,[x]:{...h[x],...S}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:c,y:d}=em(u,f,l)),p=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function ki(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Tr(t,e),b=Ow(h),x=a[f?d==="floating"?"reference":"floating":d],g=Ll(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),m=d==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},E=Ll(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-E.top+b.top)/S.y,bottom:(E.bottom-g.bottom+b.bottom)/S.y,left:(g.left-E.left+b.left)/S.x,right:(E.right-g.right+b.right)/S.x}}const c1=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Tr(e,t)||{};if(u==null)return{};const d=Ow(c),f={x:r,y:n},h=of(s),b=sf(h),p=await i.getDimensions(u),x=h==="y",g=x?"top":"left",m=x?"bottom":"right",v=x?"clientHeight":"clientWidth",S=o.reference[b]+o.reference[h]-f[h]-o.floating[b],E=f[h]-o.reference[h],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let k=_?_[v]:0;(!k||!await(i.isElement==null?void 0:i.isElement(_)))&&(k=a.floating[v]||o.floating[b]);const A=S/2-E/2,O=k/2-p[b]/2-1,N=pn(d[g],O),F=pn(d[m],O),I=N,V=k-p[b]-F,L=k/2-p[b]/2+A,K=Rd(I,L,V),B=!l.arrow&&xo(s)!=null&&L!==K&&o.reference[b]/2-(L<I?N:F)-p[b]/2<0,q=B?L<I?L-I:L-V:0;return{[h]:f[h]+q,data:{[h]:K,centerOffset:L-K-q,...B&&{alignmentOffset:q}},reset:B}}}),d1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...x}=Tr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const g=Rr(s),m=nr(a),v=Rr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=f||(v||!p?[Nl(a)]:n1(a)),_=b!=="none";!f&&_&&E.push(...a1(a,p,b,S));const k=[a,...E],A=await ki(t,x),O=[];let N=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&O.push(A[g]),d){const L=r1(s,i,S);O.push(A[L[0]],A[L[1]])}if(N=[...N,{placement:s,overflows:O}],!O.every(L=>L<=0)){var F,I;const L=(((F=o.flip)==null?void 0:F.index)||0)+1,K=k[L];if(K&&(!(d==="alignment"?m!==nr(K):!1)||N.every(R=>R.overflows[0]>0&&nr(R.placement)===m)))return{data:{index:L,overflows:N},reset:{placement:K}};let B=(I=N.filter(q=>q.overflows[0]<=0).sort((q,R)=>q.overflows[1]-R.overflows[1])[0])==null?void 0:I.placement;if(!B)switch(h){case"bestFit":{var V;const q=(V=N.filter(R=>{if(_){const T=nr(R.placement);return T===m||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,D)=>T+D,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:V[0];q&&(B=q);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function tm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rm(e){return Xk.some(t=>e[t]>=0)}const h1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Tr(e,t);switch(n){case"referenceHidden":{const o=await ki(t,{...s,elementContext:"reference"}),i=tm(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:rm(i)}}}case"escaped":{const o=await ki(t,{...s,altBoundary:!0}),i=tm(o,r.floating);return{data:{escapedOffsets:i,escaped:rm(i)}}}default:return{}}}}},jw=new Set(["left","top"]);async function f1(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=Rr(r),a=xo(r),l=nr(r)==="y",u=jw.has(i)?-1:1,c=o&&l?-1:1,d=Tr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(h=a==="end"?b*-1:b),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const p1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await f1(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},m1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:g,y:m}=x;return{x:g,y:m}}},...l}=Tr(e,t),u={x:r,y:n},c=await ki(t,l),d=nr(Rr(s)),f=nf(d);let h=u[f],b=u[d];if(o){const x=f==="y"?"top":"left",g=f==="y"?"bottom":"right",m=h+c[x],v=h-c[g];h=Rd(m,h,v)}if(i){const x=d==="y"?"top":"left",g=d==="y"?"bottom":"right",m=b+c[x],v=b-c[g];b=Rd(m,b,v)}const p=a.fn({...t,[f]:h,[d]:b});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[f]:o,[d]:i}}}}}},g1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Tr(e,t),c={x:r,y:n},d=nr(s),f=nf(d);let h=c[f],b=c[d];const p=Tr(a,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const v=f==="y"?"height":"width",S=o.reference[f]-o.floating[v]+x.mainAxis,E=o.reference[f]+o.reference[v]-x.mainAxis;h<S?h=S:h>E&&(h=E)}if(u){var g,m;const v=f==="y"?"width":"height",S=jw.has(Rr(s)),E=o.reference[d]-o.floating[v]+(S&&((g=i.offset)==null?void 0:g[d])||0)+(S?0:x.crossAxis),_=o.reference[d]+o.reference[v]+(S?0:((m=i.offset)==null?void 0:m[d])||0)-(S?x.crossAxis:0);b<E?b=E:b>_&&(b=_)}return{[f]:h,[d]:b}}}},v1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...u}=Tr(e,t),c=await ki(t,u),d=Rr(s),f=xo(s),h=nr(s)==="y",{width:b,height:p}=o.floating;let x,g;d==="top"||d==="bottom"?(x=d,g=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,x=f==="end"?"top":"bottom");const m=p-c.top-c.bottom,v=b-c.left-c.right,S=pn(p-c[x],m),E=pn(b-c[g],v),_=!t.middlewareData.shift;let k=S,A=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=m),_&&!f){const N=at(c.left,0),F=at(c.right,0),I=at(c.top,0),V=at(c.bottom,0);h?A=b-2*(N!==0||F!==0?N+F:at(c.left,c.right)):k=p-2*(I!==0||V!==0?I+V:at(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:k});const O=await i.getDimensions(a.floating);return b!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function uu(){return typeof window<"u"}function So(e){return Nw(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ur(e){var t;return(t=(Nw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nw(e){return uu()?e instanceof Node||e instanceof dt(e).Node:!1}function Ht(e){return uu()?e instanceof Element||e instanceof dt(e).Element:!1}function lr(e){return uu()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function nm(e){return!uu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}const y1=new Set(["inline","contents"]);function Gi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!y1.has(s)}const w1=new Set(["table","td","th"]);function b1(e){return w1.has(So(e))}const x1=[":popover-open",":modal"];function cu(e){return x1.some(t=>{try{return e.matches(t)}catch{return!1}})}const S1=["transform","translate","scale","rotate","perspective"],E1=["transform","translate","scale","rotate","perspective","filter"],_1=["paint","layout","strict","content"];function af(e){const t=lf(),r=Ht(e)?Wt(e):e;return S1.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||E1.some(n=>(r.willChange||"").includes(n))||_1.some(n=>(r.contain||"").includes(n))}function k1(e){let t=mn(e);for(;lr(t)&&!ho(t);){if(af(t))return t;if(cu(t))return null;t=mn(t)}return null}function lf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const C1=new Set(["html","body","#document"]);function ho(e){return C1.has(So(e))}function Wt(e){return dt(e).getComputedStyle(e)}function du(e){return Ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mn(e){if(So(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nm(e)&&e.host||ur(e);return nm(t)?t.host:t}function Lw(e){const t=mn(e);return ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:lr(t)&&Gi(t)?t:Lw(t)}function Ci(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Lw(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=dt(s);if(o){const a=Ad(i);
vendor: 4,772 bytes, line 66
66return t.concat(i,i.visualViewport||[],Gi(s)?s:[],a&&r?Ci(a):[])}return t.concat(s,Ci(s,[],r))}function Ad(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Iw(e){const t=Wt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=lr(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=jl(r)!==o||jl(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function uf(e){return Ht(e)?e:e.contextElement}function Vs(e){const t=uf(e);if(!lr(t))return ir(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Iw(t);let i=(o?jl(r.width):r.width)/n,a=(o?jl(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const T1=ir(0);function Dw(e){const t=dt(e);return!lf()||!t.visualViewport?T1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function R1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==dt(e)?!1:t}function Yn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=uf(e);let i=ir(1);t&&(n?Ht(n)&&(i=Vs(n)):i=Vs(e));const a=R1(o,r,n)?Dw(o):ir(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,c=s.width/i.x,d=s.height/i.y;if(o){const f=dt(o),h=n&&Ht(n)?dt(n):n;let b=f,p=Ad(b);for(;p&&n&&h!==b;){const x=Vs(p),g=p.getBoundingClientRect(),m=Wt(p),v=g.left+(p.clientLeft+parseFloat(m.paddingLeft))*x.x,S=g.top+(p.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=v,u+=S,b=dt(p),p=Ad(b)}}return Ll({width:c,height:d,x:l,y:u})}function cf(e,t){const r=du(e).scrollLeft;return t?t.left+r:Yn(ur(e)).left+r}function $w(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:cf(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function P1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=ur(n),a=t?cu(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},u=ir(1);const c=ir(0),d=lr(n);if((d||!d&&!o)&&((So(n)!=="body"||Gi(i))&&(l=du(n)),lr(n))){const h=Yn(n);u=Vs(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const f=i&&!d&&!o?$w(i,l,!0):ir(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function A1(e){return Array.from(e.getClientRects())}function O1(e){const t=ur(e),r=du(e),n=e.ownerDocument.body,s=at(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=at(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+cf(e);const a=-r.scrollTop;return Wt(n).direction==="rtl"&&(i+=at(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function j1(e,t){const r=dt(e),n=ur(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=lf();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const N1=new Set(["absolute","fixed"]);function L1(e,t){const r=Yn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=lr(e)?Vs(e):ir(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=n*o.y;return{width:i,height:a,x:l,y:u}}function sm(e,t,r){let n;if(t==="viewport")n=j1(e,r);else if(t==="document")n=O1(ur(e));else if(Ht(t))n=L1(t,r);else{const s=Dw(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ll(n)}function Mw(e,t){const r=mn(e);return r===t||!Ht(r)||ho(r)?!1:Wt(r).position==="fixed"||Mw(r,t)}function I1(e,t){const r=t.get(e);if(r)return r;let n=Ci(e,[],!1).filter(a=>Ht(a)&&So(a)!=="body"),s=null;const o=Wt(e).position==="fixed";let i=o?mn(e):e;for(;Ht(i)&&!ho(i);){const a=Wt(i),l=af(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&N1.has(s.position)||Gi(i)&&!l&&Mw(e,i))?n=n.filter(c=>c!==i):s=a,i=mn(i)}return t.set(e,n),n}function D1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?cu(t)?[]:I1(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((u,c)=>{const d=sm(t,c,s);return u.top=at(d.top,u.top),u.right=pn(d.right,u.right),u.bottom=pn(d.bottom,u.bottom),u.left=at(d.left,u.left),u},sm(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function $1(e){const{width:t,height:r}=Iw(e);return{width:t,height:r}}function M1(e,t,r){const n=lr(t),s=ur(t),o=r==="fixed",i=Yn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=ir(0);function u(){l.x=cf(s)}if(n||!n&&!o)if((So(t)!=="body"||Gi(s))&&(a=du(t)),n){const h=Yn(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&u();o&&!n&&s&&u();const c=s&&!n&&!o?$w(s,a):ir(0),d=i.left+a.scrollLeft-l.x-c.x,f=i.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function uc(e){return Wt(e).position==="static"}function om(e,t){if(!lr(e)||Wt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ur(e)===r&&(r=r.ownerDocument.body),r}function Uw(e,t){const r=dt(e);
vendor: 8,536 bytes, line 66
66if(cu(e))return r;if(!lr(e)){let s=mn(e);for(;s&&!ho(s);){if(Ht(s)&&!uc(s))return s;s=mn(s)}return r}let n=om(e,t);for(;n&&b1(n)&&uc(n);)n=om(n,t);return n&&ho(n)&&uc(n)&&!af(n)?r:n||k1(e)||r}const U1=async function(e){const t=this.getOffsetParent||Uw,r=this.getDimensions,n=await r(e.floating);return{reference:M1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function F1(e){return Wt(e).direction==="rtl"}const z1={convertOffsetParentRelativeRectToViewportRelativeRect:P1,getDocumentElement:ur,getClippingRect:D1,getOffsetParent:Uw,getElementRects:U1,getClientRects:A1,getDimensions:$1,getScale:Vs,isElement:Ht,isRTL:F1};function Fw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function B1(e,t){let r=null,n;const s=ur(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const b=xa(d),p=xa(s.clientWidth-(c+f)),x=xa(s.clientHeight-(d+h)),g=xa(c),v={rootMargin:-b+"px "+-p+"px "+-x+"px "+-g+"px",threshold:at(0,pn(1,l))||1};let S=!0;function E(_){const k=_[0].intersectionRatio;if(k!==l){if(!S)return i();k?i(!1,k):n=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Fw(u,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(E,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,v)}r.observe(e)}return i(!0),o}function H1(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=uf(e),c=s||o?[...u?Ci(u):[],...Ci(t)]:[];c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});const d=u&&a?B1(u,r):null;let f=-1,h=null;i&&(h=new ResizeObserver(g=>{let[m]=g;m&&m.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 b,p=l?Yn(e):null;l&&x();function x(){const g=Yn(e);p&&!Fw(p,g)&&r(),p=g,b=requestAnimationFrame(x)}return r(),()=>{var g;c.forEach(m=>{s&&m.removeEventListener("scroll",r),o&&m.removeEventListener("resize",r)}),d==null||d(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const W1=p1,V1=m1,K1=d1,q1=v1,G1=h1,im=c1,J1=g1,Y1=(e,t,r)=>{const n=new Map,s={platform:z1,...r},o={...s.platform,_c:n};return u1(e,t,{...s,platform:o})};var Q1=typeof document<"u",X1=function(){},Xa=Q1?w.useLayoutEffect:X1;function Il(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(!Il(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 o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!Il(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function zw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function am(e,t){const r=zw(e);return Math.round(t*r)/r}function cc(e){const t=w.useRef(e);return Xa(()=>{t.current=e}),t}function Z1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=w.useState(n);Il(f,n)||h(n);const[b,p]=w.useState(null),[x,g]=w.useState(null),m=w.useCallback(R=>{R!==_.current&&(_.current=R,p(R))},[]),v=w.useCallback(R=>{R!==k.current&&(k.current=R,g(R))},[]),S=o||b,E=i||x,_=w.useRef(null),k=w.useRef(null),A=w.useRef(c),O=l!=null,N=cc(l),F=cc(s),I=cc(u),V=w.useCallback(()=>{if(!_.current||!k.current)return;const R={placement:t,strategy:r,middleware:f};F.current&&(R.platform=F.current),Y1(_.current,k.current,R).then(T=>{const D={...T,isPositioned:I.current!==!1};L.current&&!Il(A.current,D)&&(A.current=D,Vi.flushSync(()=>{d(D)}))})},[f,t,r,F,I]);Xa(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[u]);const L=w.useRef(!1);Xa(()=>(L.current=!0,()=>{L.current=!1}),[]),Xa(()=>{if(S&&(_.current=S),E&&(k.current=E),S&&E){if(N.current)return N.current(S,E,V);V()}},[S,E,V,N,O]);const K=w.useMemo(()=>({reference:_,floating:k,setReference:m,setFloating:v}),[m,v]),B=w.useMemo(()=>({reference:S,floating:E}),[S,E]),q=w.useMemo(()=>{const R={position:r,left:0,top:0};if(!B.floating)return R;const T=am(B.floating,c.x),D=am(B.floating,c.y);return a?{...R,transform:"translate("+T+"px, "+D+"px)",...zw(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:T,top:D}},[r,a,B.floating,c.x,c.y]);return w.useMemo(()=>({...c,update:V,refs:K,elements:B,floatingStyles:q}),[c,V,K,B,q])}const eC=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?im({element:n.current,padding:s}).fn(r):{}:n?im({element:n,padding:s}).fn(r):{}}}},tC=(e,t)=>({...W1(e),options:[e,t]}),rC=(e,t)=>({...V1(e),options:[e,t]}),nC=(e,t)=>({...J1(e),options:[e,t]}),sC=(e,t)=>({...K1(e),options:[e,t]}),oC=(e,t)=>({...q1(e),options:[e,t]}),iC=(e,t)=>({...G1(e),options:[e,t]}),aC=(e,t)=>({...eC(e),options:[e,t]});var lC="Arrow",Bw=w.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return y.jsx(Te.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bw.displayName=lC;var uC=Bw;function cC(e){const[t,r]=w.useState(void 0);return Cr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Hw="Popper",[Ww,Vw]=Ki(Hw),[XN,Kw]=Ww(Hw),qw="PopperAnchor",Gw=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Kw(qw,r),i=w.useRef(null),a=Je(t,i);return w.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:y.jsx(Te.div,{...s,ref:a})});Gw.displayName=qw;var df="PopperContent",[dC,hC]=Ww(df),Jw=w.forwardRef((e,t)=>{var re,cr,kt,bn,Or,rs;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:b,...p}=e,x=Kw(df,r),[g,m]=w.useState(null),v=Je(t,jr=>m(jr)),[S,E]=w.useState(null),_=cC(S),k=(_==null?void 0:_.width)??0,A=(_==null?void 0:_.height)??0,O=n+(o!=="center"?"-"+o:""),N=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},F=Array.isArray(u)?u:[u],I=F.length>0,V={padding:N,boundary:F.filter(pC),altBoundary:I},{refs:L,floatingStyles:K,placement:B,isPositioned:q,middlewareData:R}=Z1({strategy:"fixed",placement:O,whileElementsMounted:(...jr)=>H1(...jr,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[tC({mainAxis:s+A,alignmentAxis:i}),l&&rC({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?nC():void 0,...V}),l&&sC({...V}),oC({...V,apply:({elements:jr,rects:Qi,availableWidth:Tu,availableHeight:Xi})=>{const{width:Ru,height:Co}=Qi.reference,ns=jr.floating.style;ns.setProperty("--radix-popper-available-width",`${Tu}px`),ns.setProperty("--radix-popper-available-height",`${Xi}px`),ns.setProperty("--radix-popper-anchor-width",`${Ru}px`),ns.setProperty("--radix-popper-anchor-height",`${Co}px`)}}),S&&aC({element:S,padding:a}),mC({arrowWidth:k,arrowHeight:A}),f&&iC({strategy:"referenceHidden",...V})]}),[T,D]=Xw(B),H=ar(b);Cr(()=>{q&&(H==null||H())},[q,H]);const U=(re=R.arrow)==null?void 0:re.x,Y=(cr=R.arrow)==null?void 0:cr.y,X=((kt=R.arrow)==null?void 0:kt.centerOffset)!==0,[Z,pe]=w.useState();return Cr(()=>{g&&pe(window.getComputedStyle(g).zIndex)},[g]),y.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:q?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(bn=R.transformOrigin)==null?void 0:bn.x,(Or
vendor: 4,822 bytes, line 66
66=R.transformOrigin)==null?void 0:Or.y].join(" "),...((rs=R.hide)==null?void 0:rs.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(dC,{scope:r,placedSide:T,onArrowChange:E,arrowX:U,arrowY:Y,shouldHideArrow:X,children:y.jsx(Te.div,{"data-side":T,"data-align":D,...p,ref:v,style:{...p.style,animation:q?void 0:"none"}})})})});Jw.displayName=df;var Yw="PopperArrow",fC={top:"bottom",right:"left",bottom:"top",left:"right"},Qw=w.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=hC(Yw,n),i=fC[o.placedSide];return y.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:y.jsx(uC,{...s,ref:r,style:{...s.style,display:"block"}})})});Qw.displayName=Yw;function pC(e){return e!==null}var mC=e=>({name:"transformOrigin",options:e,fn(t){var x,g,m;const{placement:r,rects:n,middlewareData:s}=t,i=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=Xw(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,h=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let b="",p="";return u==="bottom"?(b=i?d:`${f}px`,p=`${-l}px`):u==="top"?(b=i?d:`${f}px`,p=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,p=i?d:`${h}px`):u==="left"&&(b=`${n.floating.width+l}px`,p=i?d:`${h}px`),{data:{x:b,y:p}}}});function Xw(e){const[t,r="center"]=e.split("-");return[t,r]}var gC=Gw,vC=Jw,yC=Qw,[hu,ZN]=Ki("Tooltip",[Vw]),hf=Vw(),Zw="TooltipProvider",wC=700,lm="tooltip.open",[bC,e0]=hu(Zw),t0=e=>{const{__scopeTooltip:t,delayDuration:r=wC,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=w.useRef(!0),a=w.useRef(!1),l=w.useRef(0);return w.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),y.jsx(bC,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:w.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:o})};t0.displayName=Zw;var r0="Tooltip",[eL,fu]=hu(r0),Od="TooltipTrigger",xC=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=fu(Od,r),o=e0(Od,r),i=hf(r),a=w.useRef(null),l=Je(t,a,s.onTriggerChange),u=w.useRef(!1),c=w.useRef(!1),d=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),y.jsx(gC,{asChild:!0,...i,children:y.jsx(Te.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:fe(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:fe(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:fe(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:fe(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:fe(e.onBlur,s.onClose),onClick:fe(e.onClick,s.onClose)})})});xC.displayName=Od;var SC="TooltipPortal",[tL,EC]=hu(SC,{forceMount:void 0}),fo="TooltipContent",n0=w.forwardRef((e,t)=>{const r=EC(fo,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=fu(fo,e.__scopeTooltip);return y.jsx(wo,{present:n||i.open,children:i.disableHoverableContent?y.jsx(s0,{side:s,...o,ref:t}):y.jsx(_C,{side:s,...o,ref:t})})}),_C=w.forwardRef((e,t)=>{const r=fu(fo,e.__scopeTooltip),n=e0(fo,e.__scopeTooltip),s=w.useRef(null),o=Je(t,s),[i,a]=w.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=w.useCallback(()=>{a(null),d(!1)},[d]),h=w.useCallback((b,p)=>{const x=b.currentTarget,g={x:b.clientX,y:b.clientY},m=PC(g,x.getBoundingClientRect()),v=AC(g,m),S=OC(p.getBoundingClientRect()),E=NC([...v,...S]);a(E),d(!0)},[d]);return w.useEffect(()=>()=>f(),[f]),w.useEffect(()=>{if(l&&c){const b=x=>h(x,c),p=x=>h(x,l);return l.addEventListener("pointerleave",b),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",b),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),w.useEffect(()=>{if(i){const b=p=>{const x=p.target,g={x:p.clientX,y:p.clientY},m=(l==null?void 0:l.contains(x))||(c==null?void 0:c.contains(x)),v=!jC(g,i);m?f():v&&(f(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,c,i,u,f]),y.jsx(s0,{...e,ref:o})}),[kC,CC]=hu(r0,{isInside:!1}),TC=BE("TooltipContent"),s0=w.forwardRef((e,t)=>
66{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=fu(fo,r),u=hf(r),{onClose:c}=l;return w.useEffect(()=>(document.addEventListener(lm,c),()=>document.removeEventListener(lm,c)),[c]),w.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),y.jsx(iu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:y.jsxs(vC,{"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:[y.jsx(TC,{children:n}),y.jsx(kC,{scope:r,isInside:!0,children:y.jsx(h_,{id:l.contentId,role:"tooltip",children:s||n})})]})})});n0.displayName=fo;var o0="TooltipArrow",RC=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=hf(r);return CC(o0,r).isInside?null:y.jsx(yC,{...s,...n,ref:t})});RC.displayName=o0;function PC(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function AC(e,t,r=5){const n=[];switch(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 OC(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 jC(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],l=t[i],u=a.x,c=a.y,d=l.x,f=l.y;c>n!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function NC(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),LC(t)}function LC(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 o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.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 o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.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 IC=t0,i0=n0;const DC=IC,$C=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(i0,{ref:n,sideOffset:t,className:_t("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}));$C.displayName=i0.displayName;var pu=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(){}},mu=typeof window>"u"||"Deno"in globalThis;function Nt(){}function MC(e,t){return typeof e=="function"?e(t):e}function UC(e){return typeof e=="number"&&e>=0&&e!==1/0}function FC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function jd(e,t){return typeof e=="function"?e(t):e}function zC(e,t){return typeof e=="function"?e(t):e}function um(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==ff(i,t.options))return!1}else if(!Ri(t.queryKey,i))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||o&&!o(t))}function cm(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ti(t.options.mutationKey)!==Ti(o))return!1}else if(!Ri(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function ff(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ti)(e)}function Ti(e){return JSON.stringify(e,(t,r)=>Nd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Ri(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ri(e[r],t[r])):!1}function a0(e,t){if(e===t)return e;const r=dm(e)&&dm(t);if(r||Nd(e)&&Nd(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<i;c++){const d=r?c:o[c];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=a0(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return s===i&&u===s?e:a}return t}function dm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Nd(e){if(!hm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!hm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hm(e){return Object.prototype.toString.call(e)==="[object Object]"}function BC(e){return new Promise(t=>{setTimeout(t,e)})}function HC(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?a0(e,t):t}function WC(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function VC(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var pf=Symbol();function l0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===pf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Dn,Gr,Ys,Eg,KC=(Eg=class extends pu{constructor(){super();ne(this,Dn);ne(this,Gr);ne(this,Ys);J(this,Ys,t=>{if(!mu&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){P(this,Gr)||this.setEventListener(P(this,Ys))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Gr))==null||t.call(this),J(this,Gr,void 0))}setEventListener(t){var r;J(this,Ys,t),(r=P(this,Gr))==null||r.call(this),J(this,Gr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){P(this,Dn)!==t&&(J(this,Dn,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 14,111 bytes, line 66
66this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof P(this,Dn)=="boolean"?P(this,Dn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Dn=new WeakMap,Gr=new WeakMap,Ys=new WeakMap,Eg),u0=new KC,Qs,Jr,Xs,_g,qC=(_g=class extends pu{constructor(){super();ne(this,Qs,!0);ne(this,Jr);ne(this,Xs);J(this,Xs,t=>{if(!mu&&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(){P(this,Jr)||this.setEventListener(P(this,Xs))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Jr))==null||t.call(this),J(this,Jr,void 0))}setEventListener(t){var r;J(this,Xs,t),(r=P(this,Jr))==null||r.call(this),J(this,Jr,t(this.setOnline.bind(this)))}setOnline(t){P(this,Qs)!==t&&(J(this,Qs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return P(this,Qs)}},Qs=new WeakMap,Jr=new WeakMap,Xs=new WeakMap,_g),Dl=new qC;function GC(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});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 JC(e){return Math.min(1e3*2**e,3e4)}function c0(e){return(e??"online")==="online"?Dl.isOnline():!0}var d0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function dc(e){return e instanceof d0}function h0(e){let t=!1,r=0,n=!1,s;const o=GC(),i=p=>{var x;n||(f(new d0(p)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>u0.isFocused()&&(e.networkMode==="always"||Dl.isOnline())&&e.canRun(),c=()=>c0(e.networkMode)&&e.canRun(),d=p=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,p),s==null||s(),o.resolve(p))},f=p=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,p),s==null||s(),o.reject(p))},h=()=>new Promise(p=>{var x;s=g=>{(n||u())&&p(g)},(x=e.onPause)==null||x.call(e)}).then(()=>{var p;s=void 0,n||(p=e.onContinue)==null||p.call(e)}),b=()=>{if(n)return;let p;const x=r===0?e.initialPromise:void 0;try{p=x??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(d).catch(g=>{var _;if(n)return;const m=e.retry??(mu?0:3),v=e.retryDelay??JC,S=typeof v=="function"?v(r,g):v,E=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,g);if(t||!E){f(g);return}r++,(_=e.onFail)==null||_.call(e,r,g),BC(S).then(()=>u()?void 0:h()).then(()=>{t?f(g):b()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?b():h().then(b),o)}}var YC=e=>setTimeout(e,0);function QC(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=YC;const o=a=>{t?e.push(a):s(()=>{r(a)})},i=()=>{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||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var qe=QC(),$n,kg,f0=(kg=class{constructor(){ne(this,$n)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),UC(this.gcTime)&&J(this,$n,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mu?1/0:5*60*1e3))}clearGcTimeout(){P(this,$n)&&(clearTimeout(P(this,$n)),J(this,$n,void 0))}},$n=new WeakMap,kg),Zs,Mn,vt,Un,ze,Mi,Fn,It,fr,Cg,XC=(Cg=class extends f0{constructor(t){super();ne(this,It);ne(this,Zs);ne(this,Mn);ne(this,vt);ne(this,Un);ne(this,ze);ne(this,Mi);ne(this,Fn);J(this,Fn,!1),J(this,Mi,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,Un,t.client),J(this,vt,P(this,Un).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,Zs,eT(this.options)),this.state=t.state??P(this,Zs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,ze))==null?void 0:t.promise}setOptions(t){this.options={...P(this,Mi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,vt).remove(this)}setData(t,r){const n=HC(this.state.data,t,this.options);return Me(this,It,fr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Me(this,It,fr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=P(this,ze))==null?void 0:n.promise;return(s=P(this,ze))==null||s.cancel(t),r?r.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,Zs))}isActive(){return this.observers.some(t=>zC(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>jd(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:!FC(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=P(this,ze))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=P(this,ze))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,vt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(P(this,ze)&&(P(this,Fn)?P(this,ze).cancel({revert:!0}):P(this,ze).cancelRetry()),this.scheduleGc()),P(this,vt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,It,fr).call(this,{type:"invalidate"})}fetch(t,r){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(P(this,ze))return P(this,ze).continueRetry(),P(this,ze).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:()=>(J(this,Fn,!0),n.signal)})},o=()=>{const f=l0(this.options,r),b=(()=>{const p={client:P(this,Un),queryKey:this.queryKey,meta:this.meta};return s(p),p})();return J(this,Fn,!1),this.options.persister?this.options.persister(f,b,this):f(b)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:P(this,Un),state:this.state,fetchFn:o};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),J(this,Mn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Me(this,It,fr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,b,p,x;dc(f)&&f.silent||Me(this,It,fr).call(this,{type:"error",error:f}),dc(f)||((b=(h=P(this,vt).config).onError)==null||b.call(h,f,this),(x=(p=P(this,vt).config).onSettled)==null||x.call(p,this.state.data,f,this)),this.scheduleGc()};return J(this,ze,h0({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,b,p,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){l(g);return}(b=(h=P(this,vt).config).onSuccess)==null||b.call(h,f,this),(x=(p=P(this,vt).config).onSettled)==null||x.call(p,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Me(this,It,fr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Me(this,It,fr).call(this,{type:"pause"})},onContinue:()=>{Me(this,It,fr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),P(this,ze).start()}},Zs=new WeakMap,Mn=new WeakMap,vt=new WeakMap,Un=new WeakMap,ze=new WeakMap,Mi=new WeakMap,Fn=new WeakMap,It=new WeakSet,fr=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,...ZC(n.data,this.options),fetchMeta:t.meta??null};case"success":return J(this,Mn,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 dc(s)&&s.revert&&P(this,Mn)?{...P(this,Mn),fetchStatus:"idle"}:{...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),qe.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),P(this,vt).notify({query:this,type:"updated",action:t})})},Cg);function ZC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:c0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function eT(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 Yt,Tg,tT=(Tg=class extends pu{constructor(t={}){super();ne(this,Yt);this.config=t,J(this,Yt,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??ff(s,r);let i=this.get(o);return i||(i=new XC({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){P(this,Yt).has(t.queryHash)||(P(this,Yt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=P(this,Yt).get(t.queryHash);r&&(t.destroy(),r===t&&P(this,Yt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Yt).get(t)}getAll(){return[...P(this,Yt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>um(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>um(t,n)):r}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yt=new WeakMap,Tg),Qt,Ve,zn,Xt,Ur,Rg,rT=(Rg=class extends f0{constructor(t){super();ne(this,Xt);ne(this,Qt);ne(this,Ve);ne(this,zn);this.mutationId=t.mutationId,J(this,Ve,t.mutationCache),J(this,Qt,[]),this.state=t.state||nT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Qt).includes(t)||(P(this,Qt).push(t),this.clearGcTimeout(),P(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,Qt,P(this,Qt).filter(r=>r!==t)),this.scheduleGc(),P(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Qt).length||(this.state.status==="pending"?this.scheduleGc():P(this,Ve).remove(this))}continue(){var t;return((t=P(this,zn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,u,c,d,f,h,b,p,x,g,m,v,S,E,_,k,A;const r=()=>{Me(this,Xt,Ur).call(this,{type:"continue"})};J(this,zn,h0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,N)=>{Me(this,Xt,Ur).call(this,{type:"failed",failureCount:O,error:N})},onPause:()=>{Me(this,Xt,Ur).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Ve).canRun(this)}));const n=this.state.status==="pending",s=!P(this,zn).canStart();try{if(n)r();else{Me(this,Xt,Ur).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=P(this,Ve).config).onMutate)==null?void 0:i.call(o,t,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));N!==this.state.context&&Me(this,Xt,Ur).call(this,{type:"pending",context:N,variables:t,isPaused:s})}const O=await P(this,zn).start();return await((c=(u=P(this,Ve).config).onSuccess)==null?void 0:c.call(u,O,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,O,t,this.state.context)),await((b=(h=P(this,Ve).config).onSettled)==null?void 0:b.call(h,O,null,this.state.variables,this.state.context,this)),await((x=(p=this.options).onSettled)==null?void 0:x.call(p,O,null,t,this.state.context)),Me(this,Xt,Ur).call(this,{type:"success",data:O}),O}catch(O){try{throw await((m=(g=P(this,Ve).config).onError)==null?void 0:m.call(g,O,t,this.state.context,this)),await((S=(v=this.options).onError)==null?void 0:S.call(v,O,t,this.state.context)),await((_=(E=P(this,Ve).config).onSettled)==null?void 0:_.call(E,void 0,O,this.state.variables,this.state.context,this)),await((A=(k=this.options).onSettled)==null?void 0:A.call(k,void 0,O,t,this.state.context)),O}finally{Me(this,Xt,Ur).call(this,{type:"error",error:O})}}finally{P(this,Ve).runNext(this)}}},Qt=new WeakMap,Ve=new WeakMap,zn=new WeakMap,Xt=new WeakSet,Ur=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};
66case"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),qe.batch(()=>{P(this,Qt).forEach(n=>{n.onMutationUpdate(t)}),P(this,Ve).notify({mutation:this,type:"updated",action:t})})},Rg);function nT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yr,Dt,Ui,Pg,sT=(Pg=class extends pu{constructor(t={}){super();ne(this,yr);ne(this,Dt);ne(this,Ui);this.config=t,J(this,yr,new Set),J(this,Dt,new Map),J(this,Ui,0)}build(t,r,n){const s=new rT({mutationCache:this,mutationId:++ea(this,Ui)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){P(this,yr).add(t);const r=Sa(t);if(typeof r=="string"){const n=P(this,Dt).get(r);n?n.push(t):P(this,Dt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,yr).delete(t)){const r=Sa(t);if(typeof r=="string"){const n=P(this,Dt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&P(this,Dt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Sa(t);if(typeof r=="string"){const n=P(this,Dt).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Sa(t);if(typeof r=="string"){const s=(n=P(this,Dt).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qe.batch(()=>{P(this,yr).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,yr).clear(),P(this,Dt).clear()})}getAll(){return Array.from(P(this,yr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>cm(r,n))}findAll(t={}){return this.getAll().filter(r=>cm(t,r))}notify(t){qe.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,659 bytes, line 66
66r.state.isPaused);return qe.batch(()=>Promise.all(t.map(r=>r.continue().catch(Nt))))}},yr=new WeakMap,Dt=new WeakMap,Ui=new WeakMap,Pg);function Sa(e){var t;return(t=e.options.scope)==null?void 0:t.id}function fm(e){return{onFetch:(t,r)=>{var c,d,f,h,b;const n=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const x=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=l0(t.options,t.fetchOptions),m=async(v,S,E)=>{if(p)return Promise.reject();if(S==null&&v.pages.length)return Promise.resolve(v);const k=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return x(F),F})(),A=await g(k),{maxPages:O}=t.options,N=E?VC:WC;return{pages:N(v.pages,A,O),pageParams:N(v.pageParams,S,O)}};if(s&&o.length){const v=s==="backward",S=v?oT:pm,E={pages:o,pageParams:i},_=S(n,E);a=await m(E,_,v)}else{const v=e??o.length;do{const S=l===0?i[0]??n.initialPageParam:pm(n,a);if(l>0&&S==null)break;a=await m(a,S),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var p,x;return(x=(p=t.options).persister)==null?void 0:x.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function pm(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 oT(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 ye,Yr,Qr,eo,to,Xr,ro,no,Ag,iT=(Ag=class{constructor(e={}){ne(this,ye);ne(this,Yr);ne(this,Qr);ne(this,eo);ne(this,to);ne(this,Xr);ne(this,ro);ne(this,no);J(this,ye,e.queryCache||new tT),J(this,Yr,e.mutationCache||new sT),J(this,Qr,e.defaultOptions||{}),J(this,eo,new Map),J(this,to,new Map),J(this,Xr,0)}mount(){ea(this,Xr)._++,P(this,Xr)===1&&(J(this,ro,u0.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ye).onFocus())})),J(this,no,Dl.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ye).onOnline())})))}unmount(){var e,t;ea(this,Xr)._--,P(this,Xr)===0&&((e=P(this,ro))==null||e.call(this),J(this,ro,void 0),(t=P(this,no))==null||t.call(this),J(this,no,void 0))}isFetching(e){return P(this,ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Yr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=P(this,ye).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=P(this,ye).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(jd(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return P(this,ye).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=P(this,ye).get(n.queryHash),o=s==null?void 0:s.state.data,i=MC(t,o);if(i!==void 0)return P(this,ye).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return qe.batch(()=>P(this,ye).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=P(this,ye).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=P(this,ye);qe.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=P(this,ye);return qe.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=qe.batch(()=>P(this,ye).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return qe.batch(()=>(P(this,ye).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=qe.batch(()=>P(this,ye).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(Nt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=P(this,ye).build(this,t);return r.isStaleByTime(jd(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}
66prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=fm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=fm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dl.isOnline()?P(this,Yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,ye)}getMutationCache(){return P(this,Yr)}getDefaultOptions(){return P(this,Qr)}setDefaultOptions(e){J(this,Qr,e)}setQueryDefaults(e,t){P(this,eo).set(Ti(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,eo).values()],r={};return t.forEach(n=>{Ri(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){P(this,to).set(Ti(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,to).values()],r={};return t.forEach(n=>{Ri(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,Qr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ff(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===pf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Qr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,ye).clear(),P(this,Yr).clear()}},ye=new WeakMap,Yr=new WeakMap,Qr=new WeakMap,eo=new WeakMap,to=new WeakMap,Xr=new WeakMap,ro=new WeakMap,no=new WeakMap,Ag),aT=w.createContext(void 0),lT=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(aT.Provider,{value:e,children:t}));/**
67 * @remix-run/router v1.23.0
68 *
69 * Copyright (c) Remix Software Inc.
70 *
71 * This source code is licensed under the MIT license found in the
72 * LICENSE.md file in the root directory of this source tree.
73 *
74 * @license MIT
75 */function Pi(){return Pi=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},Pi.apply(this,arguments)}var tn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(tn||(tn={}));const mm="popstate";function uT(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:a}=n.location;return Ld("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:$l(s)}return dT(t,r,null,e)}function Ce(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function p0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cT(){return Math.random().toString(36).substr(2,8)}function gm(e,t){return{usr:e.state,key:e.key,idx:t}}function Ld(e,t,r,n){return r===void 0&&(r=null),Pi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Eo(t):t,{state:r,key:t&&t.key||n||cT()})}function $l(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 Eo(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 dT(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=tn.Pop,l=null,u=c();u==null&&(u=0,i.replaceState(Pi({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function d(){a=tn.Pop;let x=c(),g=x==null?null:x-u;u=x,l&&l({action:a,location:p.location,delta:g})}function f(x,g){a=tn.Push;let m=Ld(p.location,x,g);u=c()+1;let v=gm(m,u),S=p.createHref(m);try{i.pushState(v,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(S)}o&&l&&l({action:a,location:p.location,delta:1})}function h(x,g){a=tn.Replace;let m=Ld(p.location,x,g);u=c();let v=gm(m,u),S=p.createHref(m);i.replaceState(v,"",S),o&&l&&l({action:a,location:p.location,delta:0})}function b(x){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof x=="str
75ing"?x:$l(x);return m=m.replace(/ $/,"%20"),Ce(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let p={get action(){return a},get location(){return e(s,i)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(mm,d),l=x,()=>{s.removeEventListener(mm,d),l=null}},createHref(x){return t(s,x)},createURL:b,encodeLocation(x){let g=b(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(x){return i.go(x)}};return p}var vm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(vm||(vm={}));function hT(e,t,r){return r===void 0&&(r="/"),fT(e,t,r,!1)}function fT(e,t,r,n){let s=typeof t=="string"?Eo(t):t,o=mf(s.pathname||"/",r);if(o==null)return null;let i=m0(e);pT(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=kT(o);a=ET(i[l],u,n)}return a}function m0(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Ce(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. 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=dn([n,l.relativePath]),c=r.concat(l);o.children&&o.children.length>0&&(Ce(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),m0(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:xT(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of g0(o.path))s(o,i,l)}),t}function g0(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=g0(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function pT(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ST(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const mT=/^:[\w-]+$/,gT=3,vT=2,yT=1,wT=10,bT=-2,ym=e=>e==="*";function xT(e,t){let r=e.split("/"),n=r.length;
vendor: 9,745 bytes, lines 75-84
75return r.some(ym)&&(n+=bT),t&&(n+=vT),r.filter(s=>!ym(s)).reduce((s,o)=>s+(mT.test(o)?gT:o===""?yT:wT),n)}function ST(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 ET(e,t,r){let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=o==="/"?t:t.slice(o.length)||"/",d=wm({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=wm({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(s,d.params),i.push({params:s,pathname:dn([o,d.pathname]),pathnameBase:PT(dn([o,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(o=dn([o,d.pathnameBase]))}return i}function wm(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=_T(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let p=a[d]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const b=a[d];return h&&!b?u[f]=void 0:u[f]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function _T(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),p0(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,(i,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 kT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return p0(!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 mf(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)||"/"}function CT(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Eo(e):e;return{pathname:r?r.startsWith("/")?r:TT(r,t):t,search:AT(n),hash:OT(s)}}function TT(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function hc(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function RT(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function v0(e,t){let r=RT(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function y0(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Eo(e):(s=Pi({},e),Ce(!s.pathname||!s.pathname.includes("?"),hc("?","pathname","search",s)),Ce(!s.pathname||!s.pathname.includes("#"),hc("#","pathname","hash",s)),Ce(!s.search||!s.search.includes("#"),hc("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=CT(s,a),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const dn=e=>e.join("/").replace(/\/\/+/g,"/"),PT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),AT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,OT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function jT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const w0=["post","put","patch","delete"];new Set(w0);const NT=["get",...w0];new Set(NT);/**
76 * React Router v6.30.1
77 *
78 * Copyright (c) Remix Software Inc.
79 *
80 * This source code is licensed under the MIT license found in the
81 * LICENSE.md file in the root directory of this source tree.
82 *
83 * @license MIT
84 */function Ai(){return Ai=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},Ai.apply(this,arguments)}const gf=w.createContext(null),LT=w.createContext(null),es=w.createContext(null),gu=w.createContext(null),ts=w.createContext({outlet:null,matches:[],isDataRoute:!1}),b0=w.createContext(null);function IT(e,t){let{relative:r}=t===void 0?{}:t;Ji()||Ce(!1);let{basename:n,navigator:s}=w.useContext(es),{hash:o,pathname:i,search:a}=E0(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:dn([n,i])),s.createHref({pathname:l,search:a,hash:o})}function Ji(){return w.useContext(gu)!=null}function wn(){return Ji()||Ce(!1),w.useContext(gu).location}function x0(e){w.useContext(es).static||w.useLayoutEffect(e)}function S0(){let{isDataRoute:e}=w.useContext(ts);return e?GT():DT()}function DT(){Ji()||Ce(!1);let e=w.useContext(gf),{basename:t,future:r,navigator:n}=w.useContext(es),{matches:s}=w.useContext(ts),{pathname:o}=wn(),i=JSON.stringify(v0(s,r.v7_relativeSplatPath)),a=w.useRef(!1);return x0(()=>{a.current=!0}),w.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let d=y0(u,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:dn([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,i,o,e])}function E0(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(es),{matches:s}=w.useContext(ts),{pathname:o}=wn(),i=JSON.stringify(v0(s,n.v7_relativeSplatPath));return w.useMemo(()=>y0(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function $T(e,t){return MT(e,t)}function MT(e,t,r,n){Ji()||Ce(!1);let{navigator:s}=w.useContext(es),{matches:o}=w.useContext(ts),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=wn(),c;if(t){var d;let x=typeof t=="string"?Eo(t):t;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||Ce(!1),c=x}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=hT(e,{pathname:h}),p=HT(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:dn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:dn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,r,n);return t&&p?w.createElement(gu.Provider,{value:{location:Ai({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:tn.Pop}},p):p}function UT(){let e=qT(),t=jT(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 w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:s},r):null,null)}const FT=w.createElement(UT,null);class zT extends w.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?w.createElement(ts.Provider,{value:this.props.routeContext},w.createElement(b0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function BT(e){let{routeContext:t,match:r,children:n}=e,s=w.useContext(gf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(ts.Provider,{value:t},n)}function HT(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||Ce(!1),i=i.slice(0,Math.min(i.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<i.length;c++){let d=i[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,b=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||b){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((c,d,f)=>{let h,b=!1,p=null,x=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,p=d.route.errorElement||FT,l&&(u<0&&f===0?(b=!0,x=null):u===f&&(b=!0,x=d.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,f+1)),m=()=>{let v;return h?v=p:b?v=x:d.route.Component?v=w.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,w.createElement(BT,{match:d,routeC
84ontext:{outlet:c,matches:g,isDataRoute:r!=null},children:v})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?w.createElement(zT,{location:r.location,revalidation:r.revalidation,component:p,error:h,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var _0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_0||{}),Ml=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}(Ml||{});function WT(e){let t=w.useContext(gf);return t||Ce(!1),t}function VT(e){let t=w.useContext(LT);return t||Ce(!1),t}function KT(e){let t=w.useContext(ts);return t||Ce(!1),t}function k0(e){let t=KT(),r=t.matches[t.matches.length-1];return r.route.id||Ce(!1),r.route.id}function qT(){var e;let t=w.useContext(b0),r=VT(Ml.UseRouteError),n=k0(Ml.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function GT(){let{router:e}=WT(_0.UseNavigateStable),t=k0(Ml.UseNavigateStable),r=w.useRef(!1);return x0(()=>{r.current=!0}),w.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ai({fromRouteId:t},o)))},[e,t])}function JT(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Fr(e){Ce(!1)}function YT(e){let{basename:t="/",children:r=null,location:n,navigationType:s=tn.Pop,navigator:o,static:i=!1,future:a}=e;Ji()&&Ce(!1);let l=t.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:l,navigator:o,static:i,future:Ai({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=Eo(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:b="default"}=n,p=w.useMemo(()=>{let x=mf(c,l);return x==null?null:{location:{pathname:x,search:d,hash:f,state:h,key:b},navigationType:s}},[l,c,d,f,h,b,s]);return p==null?null:w.createElement(es.Provider,{value:u},w.createElement(gu.Provider,{children:r,value:p}))}function QT(e){let{children:t,location:r}=e;return $T(Id(t),r)}new Promise(()=>{});function Id(e,t){t===void 0&&(t=[]);let r=[];return w.Children.forEach(e,(n,s)=>{if(!w.isValidElement(n))return;let o=[...t,s];if(n.type===w.Fragment){r.push.apply(r,Id(n.props.children,o));return}n.type!==Fr&&Ce(!1),!n.props.index||!n.props.children||Ce(!1);let i={id:n.props.id||o.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&&(i.children=Id(n.props.children,o)),r.push(i)}),r}/**
85 * React Router DOM v6.30.1
86 *
87 * Copyright (c) Remix Software Inc.
88 *
89 * This source code is licensed under the MIT license found in the
90 * LICENSE.md file in the root directory of this source tree.
91 *
92 * @license MIT
93 */function Dd(){return Dd=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},Dd.apply(this,arguments)}function XT(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function ZT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function eR(e,t){return e.button===0&&(!t||t==="_self")&&!ZT(e)}function $d(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function tR(e,t){let r=$d(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const rR=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],nR="6";try{window.__reactRouterVersion=nR}catch{}const sR="startTransition",bm=ah[sR];function oR(e){let{basename:t,children:r,future:n,window:s}=e,o=w.useRef();o.current==null&&(o.current=uT({window:s,v5Compat:!0}));let i=o.current,[a,l]=w.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=w.useCallback(d=>{u&&bm?bm(()=>l(d)):l(d)},[l,u]);return w.useLayoutEffect(()=>i.listen(c),[i,c]),w.useEffect(()=>JT(n),[n]),w.createElement(YT,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const iR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",aR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tr=w.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=t,f=XT(t,rR),{basename:h}=w.useContext(es),b,p=!1;if(typeof u=="string"&&aR.test(u)&&(b=u,iR))try{let v=new URL(window.location.href),S=u.startsWith("//")?new URL(v.protocol+u):new URL(u),E=mf(S.pathname,h);S.origin===v.origin&&E!=null?u=E+S.search+S.hash:p=!0}catch{}let x=IT(u,{relative:s}),g=lR(u,{replace:i,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function m(v){n&&n(v),v.defaultPrevented||g(v)}return w.createElement("a",Dd({},f,{href:b||x,onClick:p||o?n:m,ref:r,target:l}))});var xm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xm||(xm={}));var Sm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Sm||(Sm={}));function lR(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,l=S0(),u=wn(),c=E0(e,{relative:i});return w.useCallback(d=>
93{if(eR(d,r)){d.preventDefault();let f=n!==void 0?n:$l(u)===$l(c);l(e,{replace:f,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[u,l,c,n,s,r,e,o,i,a])}function uR(e){let t=w.useRef($d(e)),r=w.useRef(!1),n=wn(),s=w.useMemo(()=>tR(n.search,r.current?null:t.current),[n.search]),o=S0(),i=w.useCallback((a,l)=>{const u=$d(typeof a=="function"?a(s):a);r.current=!0,o("?"+u,l)},[o,s]);return[s,i]}var cR=typeof Element<"u",dR=typeof Map=="function",hR=typeof Set=="function",fR=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Za(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Za(e[n],t[n]))return!1;return!0}var o;if(dR&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;for(o=e.entries();!(n=o.next()).done;)if(!Za(n.value[1],t.get(n.value[0])))return!1;return!0}if(hR&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(fR&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(cR&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!Za(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var pR=function(t,r){try{return Za(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const mR=mo(pR);var gR=function(e,t,r,n,s,o,i,a){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,s,o,i,a],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},vR=gR;const Em=mo(vR);var yR=function(t,r,n,s){var o=n?n.call(s,t,r):void 0;if(o!==void 0)return!!o;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var i=Object.keys(t),a=Object.keys(r);if(i.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(r),u=0;u<i.length;u++){var c=i[u];if(!l(c))return!1;var d=t[c],f=r[c];if(o=n?n.call(s,d,f,c):void 0,o===!1||o===void 0&&d!==f)return!1}return!0};const wR=mo(yR);var C0=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(C0||{}),fc={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},_m=Object.values(C0),vu={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},T0=Object.entries(vu).reduce((e,[t,r])=>(e[r]=t,e),{}),Ut="data-rh",Ks={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},qs=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},bR=e=>{let t=qs(e,"title");const r=qs(e,Ks.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=qs(e,Ks.DEFAULT_TITLE);return t||n||void 0},xR=e=>
93qs(e,Ks.ON_CHANGE_CLIENT_STATE)||(()=>{}),pc=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),SR=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let o=0;o<s.length;o+=1){const a=s[o].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return r.concat(n)}}return r},[]),ER=e=>console&&typeof console.warn=="function"&&console.warn(e),Mo=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&ER(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,o)=>{const i={};o.filter(l=>{let u;const c=Object.keys(l);for(let f=0;f<c.length;f+=1){const h=c[f],b=h.toLowerCase();t.indexOf(b)!==-1&&!(u==="rel"&&l[u].toLowerCase()==="canonical")&&!(b==="rel"&&l[b].toLowerCase()==="stylesheet")&&(u=b),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(u=h)}if(!u||!l[u])return!1;const d=l[u].toLowerCase();return n[u]||(n[u]={}),i[u]||(i[u]={}),n[u][d]?!1:(i[u][d]=!0,!0)}).reverse().forEach(l=>s.push(l));const a=Object.keys(i);for(let l=0;l<a.length;l+=1){const u=a[l],c={...n[u],...i[u]};n[u]=c}return s},[]).reverse()},_R=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},kR=e=>({baseTag:SR(["href"],e),bodyAttributes:pc("bodyAttributes",e),defer:qs(e,Ks.DEFER),encode:qs(e,Ks.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:pc("htmlAttributes",e),linkTags:Mo("link",["rel","href"],e),metaTags:Mo("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Mo("noscript",["innerHTML"],e),onChangeClientState:xR(e),scriptTags:Mo("script",["src","innerHTML"],e),styleTags:Mo("style",["cssText"],e),title:bR(e),titleAttributes:pc("titleAttributes",e),prioritizeSeoTags:_R(e,Ks.PRIORITIZE_SEO_TAGS)}),R0=e=>Array.isArray(e)?e.join(""):e,CR=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},mc=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(CR(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},km=(e,t)=>({...e,[t]:void 0}),TR=["noscript","script","style"],Md=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),P0=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),RR=(e,t,r,n)=>{const s=P0(r),o=R0(t);return s?`<${e} ${Ut}="true" ${s}>${Md(o,n)}</${e}>`:`<${e} ${Ut}="true">${Md(o,n)}</${e}>`},PR=(e,t,r=!0)=>t.reduce((n,s)=>{const o=s,i=Object.keys(o).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,c)=>{const d=typeof o[c]>"u"?c:`${c}="${Md(o[c],r)}"`;return u?`${u} ${d}`:d},""),a=o.innerHTML||o.cssText||"",l=TR.indexOf(e)===-1;return`${n}<${e} ${Ut}="true" ${i}${l?"/>":`>${a}</${e}>`}`},""),A0=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=vu[n];return r[s||n]=e[n],r},t),AR=(e,t,r)=>{const n={key:t,[Ut]:!0},s=A0(r,n);return[C.createElement("title",s,t)]},el=(e,t)=>t.map((r,n)=>{const s={key:n,[Ut]:!0};return Object.keys(r).forEach(o=>{const a=vu[o]||o;if(a==="innerHTML"||a==="cssText"){const l=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=r[o]}),C.createElement(e,s)}),gt=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>AR(e,t.title,t.titleAttributes),toString:()=>RR(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>A0(t),toString:()=>P0(t)};default:return{toComponent:()=>el(e,t),toString:()=>PR(e,t,r)}}},OR=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=mc(e,fc.meta),o=mc(t,fc.link),i=mc(r,fc.script);return{priorityMethods:{toComponent:()=>[...el("meta",s.priority),...el("link",o.priority),...el("script",i.priority)],toString:()=>`${gt("meta",s.priority,n)} ${gt("link",o.priority,n)} ${gt("script",i.priority,n)}`},metaTags:s.default,linkTags:o.default,scriptTags:i.default}},jR=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:o,styleTags:i,title:a="",titleAttributes:l,prioritizeSeoTags:u}=e;let{linkTags:c,metaTags:d,scriptTags:f}=e,h={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:h,linkTags:c,metaTags:d,scriptTags:f}=OR(e)),{priority:h,base:gt("base",t,n),bodyAttributes:gt("bodyAttributes",r,n),htmlAttributes:gt("htmlAttributes",s,n),link:gt("link",c,n),meta:gt("meta",d,n),noscript:gt("noscript",o,n),script:gt("script",f,n),style:gt("style",i,n),title:gt("title",{title:a,titleAttributes:l},n)}},Ud=jR,Ea=[],vf=!!(typeof window<"u"&&window.document&&window.document.createElement),Fd=class{constructor(e,t){dr(this,"instances",[]);dr(this,"canUseDOM",vf);dr(this,"context");dr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ea:this.instances,add:e=>{(this.canUseDOM?Ea:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ea:this.instances).indexOf(e);(this.canUseDOM?Ea:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Ud({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},NR=parseInt(C.version.split(".")[0],10),zd=NR>=19,LR={},O0=C.createContext(LR),Bn,j0=(Bn=class extends w.Component{constructor(r){super(r);dr(this,"helmetData");zd?this.helmetData=null:this.helmetData=new Fd(this.props.context||{},Bn.canUseDOM)}render(){return zd?C.createElement(C.Fragment,null,this.props.children):C.createElement(O0.Provider,{value:this.helmetData.value},this.props.children)}},dr(Bn,"canUseDOM",vf),Bn),ls=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${Ut}]`),s=[].slice.call(n),o=[];let i;return t&&t.length&&t.forEach(a=>{const l=document.createElement(e);for(const u in a)if(Object.prototype.hasOwnProperty.call(a,u))if(u==="innerHTML")l.innerHTML=a.innerHTML;else if(u==="cssText"){const c=a.cssText;l.appendChild(document.createTextNode(c))}else{const c=u,d=typeof a[c]>"u"?"":a[c];l.setAttribute(u,d)}l.setAttribute(Ut,"true"),s.some((u,c)=>(i=c,l.isEqualNode(u)))?s.splice(i,1):o.push(l)}
93),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),o.forEach(a=>r.appendChild(a)),{oldTags:s,newTags:o}},Bd=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(Ut),s=n?n.split(","):[],o=[...s],i=Object.keys(t);for(const a of i){const l=t[a]||"";r.getAttribute(a)!==l&&r.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const u=o.indexOf(a);u!==-1&&o.splice(u,1)}for(let a=o.length-1;a>=0;a-=1)r.removeAttribute(o[a]);s.length===o.length?r.removeAttribute(Ut):r.getAttribute(Ut)!==i.join(",")&&r.setAttribute(Ut,i.join(","))},IR=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=R0(e)),Bd("title",t)},Cm=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:o,metaTags:i,noscriptTags:a,onChangeClientState:l,scriptTags:u,styleTags:c,title:d,titleAttributes:f}=e;Bd("body",n),Bd("html",s),IR(d,f);const h={baseTag:ls("base",r),linkTags:ls("link",o),metaTags:ls("meta",i),noscriptTags:ls("noscript",a),scriptTags:ls("script",u),styleTags:ls("style",c)},b={},p={};Object.keys(h).forEach(x=>{const{newTags:g,oldTags:m}=h[x];g.length&&(b[x]=g),m.length&&(p[x]=h[x].oldTags)}),t&&t(),l(e,b,p)},Uo=null,DR=e=>{Uo&&cancelAnimationFrame(Uo),e.defer?Uo=requestAnimationFrame(()=>{Cm(e,()=>{Uo=null})}):(Cm(e),Uo=null)},$R=DR,Tm=class extends w.Component{constructor(){super(...arguments);dr(this,"rendered",!1)}shouldComponentUpdate(t){return!wR(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=kR(t.get().map(o=>{const{context:i,...a}=o.props;return a}));j0.canUseDOM?$R(s):Ud&&(n=Ud(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},tl=[],Rm=e=>{const t={};for(const r of Object.keys(e))t[T0[r]||r]=e[r];return t},En=e=>{const t={};for(const r of Object.keys(e)){const n=vu[r];t[n||r]=e[r]}return t},Pm=(e,t)=>{if(!vf)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",s=r.getAttribute(n),o=s?s.split(","):[],i=Object.keys(t);for(const a of o)i.includes(a)||r.removeAttribute(a);for(const a of i){const l=t[a];l==null||l===!1?r.removeAttribute(a):l===!0?r.setAttribute(a,""):r.setAttribute(a,String(l))}i.length>0?r.setAttribute(n,i.join(",")):r.removeAttribute(n)},gc=()=>{const e={},t={};for(const r of tl){const{htmlAttributes:n,bodyAttributes:s}=r.props;n&&Object.assign(e,Rm(n)),s&&Object.assign(t,Rm(s))}Pm("html",e),Pm("body",t)},MR=class extends w.Component{componentDidMount(){tl.push(this),gc()}componentDidUpdate(){gc()}componentWillUnmount(){const e=tl.indexOf(this);e!==-1&&tl.splice(e,1),gc()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return C.createElement("title",En(t),e)}renderBase(){const{base:e}=this.props;return e?C.createElement("base",En(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>C.createElement("meta",{key:r,...En(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>C.createElement("link",{key:r,...En(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,o=En(s);return n&&(o.dangerouslySetInnerHTML={__html:n}),C.createElement("script",{key:r,...o})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...s}=t,o=En(s);return n&&(o.dangerouslySetInnerHTML={__html:n}),C.createElement("style",{key:r,...o})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,o=En(s);return n&&(o.dangerouslySetInnerHTML={__html:n}),C.createElement("noscript",{key:r,...o})})}render(){return C.createElement(C.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Pc,yu=(Pc=class extends w.Component{shouldComponentUpdate(e){return!mR(km(this.props,"helmetData"),km(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}
93warnOnInvalidChildren(e,t){return Em(_m.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${_m.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Em(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return C.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...o}=n.props,i=Object.keys(o).reduce((l,u)=>(l[T0[u]||u]=o[u],l),{});let{type:a}=n;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(n,s),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,i,s);break;default:t=this.mapObjectTypeChildren(n,t,i,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Fd)){const s=n;n=new Fd(s.context,!0),delete r.helmetData}return zd?C.createElement(MR,{...r}):n?C.createElement(Tm,{...r,context:n.value}):C.createElement(O0.Consumer,null,s=>C.createElement(Tm,{...r,context:s}))}},dr(Pc,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Pc);const Am="/assets/lazy-jane-poster-V9LlIvXp.jpg",UR=()=>y.jsxs("section",{className:"relative flex flex-col items-center justify-end noise-overlay overflow-hidden pt-16 sm:pt-20 pb-0",children:[y.jsx("img",{src:Am,alt:"Lazy Jane ++ Djank at The Shacklewell Arms, 27 July 2026",className:"w-full h-auto block sm:hidden opacity-90"}),y.jsx("img",{src:Am,alt:"Lazy Jane ++ Djank at The Shacklewell Arms, 27 July 2026",className:"hidden sm:block w-auto h-auto max-h-[calc(100vh-5rem)] max-w-full object-contain opacity-90"}),y.jsx("div",{className:"absolute top-10 left-10 text-neon-yellow text-4xl animate-spin-slow z-10",children:"✦"}),y.jsx("div",{className:"absolute top-20 right-20 text-neon-pink text-3xl animate-spin-slow z-10",style:{animationDelay:"2s"},children:"★"}),y.jsx("div",{className:"absolute bottom-40 left-20 text-neon-cyan text-2xl animate-spin-slow z-10",style:{animationDelay:"4s"},children:"✶"}),y.jsx("div",{className:"absolute top-40 left-1/3 text-neon-green text-xl animate-spin-slow z-10",style:{animationDelay:"1s"},children:"⭐"}),y.jsx("div",{className:"absolute bottom-60 right-1/4 text-neon-yellow text-3xl animate-spin-slow z-10",style:{animationDelay:"3s"},children:"✧"}),y.jsxs("div",{className:"relative z-10 w-full text-center px-6 pt-10 pb-8",children:[y.jsx("h1",{className:"font-grunge text-5xl sm:text-7xl text-primary uppercase tracking-wide",children:"Lazy Jane"}),y.jsx("p",{className:"font-typewriter text-foreground max-w-2xl mx-auto mt-4 text-base sm:text-lg leading-relaxed",children:"Lazy Jane are a London-based DIY band playing loud, lo-fi indie pop around the capital's pubs, clubs and festivals. Grab tickets for upcoming dates below, dig through photos and gig posters, and pick up a one-of-one shirt from the shop."})]}),y.jsx("div",{className:"w-full mt-0 z-10",children:y.jsx("div",{className:"construction-stripe"})})]}),N0=[{id:5,venue:"Shambala Festival",city:"Kelmarsh Hall and Gardens, Northampton NN6 9LY",date:"THU 27 TO SUN 30 AUG 2026",price:"£TBC",link:"https://www.shambalafestival.org/buy-tickets/",gigDate:"2026-08-27",gigEndDate:"2026-08-30"},{id:6,venue:"The Shacklewell Arms",city:"Dalston, London",date:"MON 27 JUL 2026, 7:30PM",price:"£TBC",link:"https://dice.fm/event/eoxoow-lazy-jane-djank-27th-jul-the-shacklewell-arms-london-tickets",ctaLabel:"TIX ARE FREE!",gigDate:"2026-07-27"},{id:7,venue:"The Mildmay Club",city:"33-34 Newington Green, London N16 9PR",date:"THU 23 JUL 2026, 7:30PM",price:"£6.50 / £5 MEMBERS",link:"https://www.tickettailor.com/events/mildmayclubandinstituteltd/2274962",ctaLabel:"GET TIX",gigDate:"2026-07-23"},{id:4,venue:"Well Street Common Festival",city:"Hackney, London",date:"SUN 14 JUN 2026",price:"£TBC",link:"https://www.wellstreetcommon.org/news/well-street-common-festival-2026",ctaLabel:"COME ON OUT - IT'S FREE!",gigDate:"2026-06-14"},{id:3,venue:"Goldsmiths Students' Union",city:"New Cross, London",date:"FRI 29 MAY 2026",price:"£TBC",link:"https://www.eventbrite.com/e/selygig-goldsmiths-student-union-tickets-1989175206590?aff=www.lazy-jane.com",gigDate:"2026-05-29"},{id:2,venue:"Calamity Tank",city:"Waltham Forest, London",date:"SAT 4 APR 2026",price:"£10",done:!0}
93,{id:1,venue:"Women Rock Everything at The Engine Rooms",city:"Tower Hamlets, London",date:"FRI 6 MAR 2026",price:"£10",soldOut:!0}],Om=e=>{const t=new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/London",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),r=n=>t.find(s=>s.type===n).value;return`${r("year")}-${r("month")}-${r("day")}`},FR=e=>{var a;const t=new Date(`${e}T22:00:00Z`),n=(((a=new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/London",timeZoneName:"shortOffset"}).formatToParts(t).find(l=>l.type==="timeZoneName"))==null?void 0:a.value)||"GMT").match(/GMT([+-]\d+)?/),s=n&&n[1]?parseInt(n[1],10):0,o=s>=0?"+":"-",i=String(Math.abs(s)).padStart(2,"0");return new Date(`${e}T22:00:00${o}${i}:00`)},L0=(e,t)=>{if(!e.gigDate)return null;const r=e.gigDate,n=e.gigEndDate||e.gigDate;if(t>=FR(n))return"done";const s=Om(t);return s>=r&&s<=n?"today":Om(new Date(t.getTime()+24*60*60*1e3))===r?"tomorrow":null},zR=(e=new Date)=>N0.filter(t=>!t.soldOut&&!t.done&&L0(t,e)!=="done"&&t.gigDate).sort((t,r)=>t.gigDate<r.gigDate?-1:1),BR=()=>y.jsx("section",{className:"relative py-20 px-4 noise-overlay",id:"tour",children:y.jsxs("div",{className:"max-w-4xl mx-auto",children:[y.jsx("div",{className:"text-center mb-12",children:y.jsx("h2",{className:"font-typewriter text-2xl md:text-3xl text-neon-pink/60 mb-4",children:"DATES"})}),y.jsx("div",{className:"divide-y divide-muted-foreground/20",children:N0.map(e=>{const t=L0(e,new Date),r=e.done||t==="done",n=t==="today"?"TODAY!":t==="tomorrow"?"TOMORROW!":e.ctaLabel||"GET TIX";return y.jsxs("div",{className:"py-8 flex flex-col md:flex-row items-start md:items-center justify-between gap-4",children:[y.jsxs("div",{className:"space-y-1",children:[y.jsx("p",{className:"font-typewriter text-sm font-bold tracking-wider text-foreground uppercase",children:e.date}),y.jsx("p",{className:"font-typewriter text-xl text-primary",children:e.venue}),y.jsx("p",{className:"font-typewriter text-base text-foreground",children:e.city})]}),y.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:e.soldOut?y.jsx("span",{className:"px-5 py-2 font-typewriter text-sm text-muted-foreground border border-muted-foreground/40 uppercase tracking-wider",children:"SOLD OUT"}):r?y.jsx("span",{className:"px-5 py-2 font-typewriter text-sm text-muted-foreground/60 border border-muted-foreground/40 uppercase tracking-wider",children:"DONE!"}):e.link?y.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"px-5 py-2 font-typewriter text-sm bg-primary text-primary-foreground uppercase tracking-wider hover:bg-primary/90 transition-colors",children:n}):y.jsx("span",{className:"px-5 py-2 font-typewriter text-sm border border-muted-foreground/40 uppercase tracking-wider text-muted-foreground",children:"COMING SOON"})})]},e.id)})})]})}),_o=({text:e,reverse:t=!1})=>y.jsx("div",{className:"overflow-hidden bg-background border-y-2 border-primary py-1",children:y.jsx("div",{className:t?"animate-marquee-reverse":"animate-marquee",children:y.jsx("span",{className:"font-pixel text-xl text-primary whitespace-nowrap",children:e})})}),wu=()=>{const e=new Date().getFullYear();return y.jsx("footer",{className:"border-t border-muted-foreground/20 py-8 px-4 text-center",children:y.jsxs("p",{className:"font-typewriter text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:["© ",e," Trading as Lazy Jane Band ·"," ",y.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors",children:"[email protected]"})]})})},us="font-pixel text-primary text-xl sm:text-2xl hover:text-neon-green transition-colors",bu=()=>{const{pathname:e}=wn(),t=e==="/";return y.jsxs("nav",{className:"absolute top-10 right-4 sm:right-8 z-20 flex gap-4 sm:gap-6",children:[!t&&y.jsx(tr,{to:"/",className:us,children:"HOME"}),t?y.jsx("a",{href:"#dates",className:us,children:"DATES"}):y.jsx(tr,{to:"/#dates",className:us,children:"DATES"}),e!=="/gallery"&&y.jsx(tr,{to:"/gallery",className:us,children:"GALLERY"}),e!=="/posters"&&y.jsx(tr,{to:"/posters",className:us,children:"POSTERS"}),e!=="/shop"&&y.jsx(tr,{to:"/shop",className:us,children:"SHOP"})]})},HR="pk_live_51SzLijF7JAvqJAuBskQyOE97uABsi28kvaneN1hs1PQJZEMFSXRjzDDSMDH8AB3GXs8DiU9QHEeNXcIlImZPMBPK00hSZGBGCY";function I0(){return HR.startsWith("pk_test_")?y.jsxs("div",{className:"w-full bg-orange-100 border-b border-orange-300 px-4 py-2 text-center text-sm text-orange-800",children:["All payments made in the preview are in test mode."," ",y.jsx("a",{href:"https://docs.lovable.dev/features/payments#test-and-live-environments",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"Read more"})]}):null}const WR=()=>{const{hash:e}=wn();return w.useEffect(()=>{if(e){const t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})}},[e]),y.jsxs("div",{className:"min-h-screen bg-background overflow-hidden",children:[y.jsxs(yu,{children:[y.jsx("title",{children:"Lazy Jane — Official Website & Tour Dates"}),y.jsx("meta",{name:"description",content:"Lazy Jane — London DIY punk band. Official site with upcoming gigs, tour dates, gig posters, live gallery and one-of-one merch."}),y.jsx("meta",{property:"og:title",content:"Lazy Jane — Official Website & Tour Dates"}),y.jsx("meta",{property:"og:description",content:"London DIY punk band. Upcoming gigs, tour dates, gig posters, live gallery and one-of-one merch."})]}),y.jsx(I0,{}),y.jsx(_o,{text:"★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥"}),y.jsx(bu,{}),y.jsx(UR,{}),y.jsx("div",{id:"dates",children:y.jsx(BR,{})}),y.jsx("div",{className:"construction-stripe"}),y.jsxs("div",{className:"py-10 text-center flex flex-col sm:flex-row justify-center gap-4 sm:gap-8",children:[y.jsx(tr,{to:"/gallery",className:"font-typewriter text-xl sm:text-2xl text-foreground hover:text-primary transition-colors uppercase tracking-wider",children:"→ VIEW GALLERY ←"}),y.jsx(tr,{to:"/shop",className:"font-typewriter text-xl sm:text-2xl text-foreground hover:text-primary transition-colors uppercase tracking-wider",children:"→ SHOP ←"})]}),y.jsx("div",{className:"construction-stripe"}),y.jsx(wu,{})]})},cs=[{src:"/gallery/goldsmiths-iii.jpg",alt:"Lazy Jane at Goldsmiths — sepia portrait with guitar",span:"row-span-2"},{src:"/gallery/goldsmiths-i.jpg",alt:"Lazy Jane at Goldsmiths SU — full band with SELYGIG banner",span:"col-span-2"},{src:"/gallery/goldsmiths-ii.jpg",alt:"Lazy Jane at Goldsmiths — green-lit crowd shot",span:""},{src:"/gallery/live-5.jpg",alt:"Lazy Jane vocalist screaming into mic",span:"row-span-2"},{src:"/gallery/live-10.jpg",alt:"Lazy Jane bass and guitar duo performing live",span:""},{src:"/gallery/live-2.jpg",alt:"Lazy Jane at Signature Brew",span:""},{src:"/gallery/live-9.jpg",alt:"Lazy Jane guitarist shredding live",span:"col-span-2"},{src:"/gallery/live-6.jpg",alt:"Lazy Jane full band on stage",span:""}
93,{src:"/gallery/live-11.jpg",alt:"Crowd surfing at Lazy Jane show",span:"row-span-2"},{src:"/gallery/live-1.jpg",alt:"Lazy Jane red-lit guitar duo",span:""},{src:"/gallery/flat-gig.jpg",alt:"Lazy Jane flat gig house show",span:"col-span-2"},{src:"/gallery/live-12.jpg",alt:"Full band performing at Lazy Jane gig",span:""},{src:"/gallery/live-4.jpg",alt:"Lazy Jane full band performing",span:""},{src:"/gallery/live-3.jpg",alt:"Lazy Jane crowd and photographer",span:""},{src:"/gallery/live-band.jpg",alt:"Lazy Jane after the show",span:""}],VR=()=>{const[e,t]=w.useState(null),r=w.useRef(0),n=w.useRef(null),s=w.useCallback(()=>t(null),[]),o=w.useCallback(()=>t(a=>a!==null&&a>0?a-1:a),[]),i=w.useCallback(()=>t(a=>a!==null&&a<cs.length-1?a+1:a),[]);return w.useEffect(()=>{if(e===null)return;const a=u=>{u.key==="Escape"&&s(),u.key==="ArrowLeft"&&o(),u.key==="ArrowRight"&&i()},l=u=>{u.preventDefault();const c=Date.now();if(c-r.current<250||Math.abs(u.deltaY)<10&&Math.abs(u.deltaX)<10)return;r.current=c,(Math.abs(u.deltaX)>Math.abs(u.deltaY)?u.deltaX:u.deltaY)>0?i():o()};return window.addEventListener("keydown",a),window.addEventListener("wheel",l,{passive:!1}),()=>{window.removeEventListener("keydown",a),window.removeEventListener("wheel",l)}},[e,s,o,i]),y.jsxs("div",{className:"min-h-screen bg-background overflow-hidden",children:[y.jsxs(yu,{children:[y.jsx("title",{children:"Live Gallery — Lazy Jane"}),y.jsx("meta",{name:"description",content:"Photos of Lazy Jane live — on stage, in the crowd and after the show at gigs across London."}),y.jsx("meta",{property:"og:title",content:"Live Gallery — Lazy Jane"}),y.jsx("meta",{property:"og:description",content:"Photos of Lazy Jane live — on stage, in the crowd and after the show."})]}),y.jsx(_o,{text:"★ GALLERY ★ GALLERY ★ GALLERY ★ GALLERY ★ GALLERY ★ GALLERY ★ GALLERY ★ GALLERY ★"}),y.jsx(bu,{}),y.jsx("header",{className:"px-4 sm:px-8 pt-8 pb-4 flex items-center justify-center",children:y.jsx("h1",{className:"font-typewriter text-foreground text-2xl sm:text-3xl tracking-wider uppercase",children:"GALLERY"})}),y.jsx("div",{className:"construction-stripe"}),y.jsx("main",{className:"px-2 sm:px-6 py-6",children:y.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 sm:gap-3 auto-rows-[200px] sm:auto-rows-[280px]",children:cs.map((a,l)=>y.jsxs("button",{type:"button",onClick:()=>t(l),className:`relative overflow-hidden group border border-primary/20 hover:border-primary transition-colors cursor-pointer ${a.span}`,"aria-label":`Open ${a.alt}`,children:[y.jsx("img",{src:a.src,alt:a.alt,loading:"lazy",decoding:"async",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105 group-hover:brightness-110"}),y.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/60 via-trans
93parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]},l))})}),y.jsx("div",{className:"construction-stripe"}),e!==null&&y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-sm cursor-pointer animate-in fade-in duration-200",onClick:s,children:[y.jsx("button",{onClick:s,className:"absolute top-4 right-4 sm:top-6 sm:right-6 font-pixel text-foreground text-2xl hover:text-primary transition-colors z-10","aria-label":"Close",children:"✕"}),e>0&&y.jsx("button",{onClick:a=>{a.stopPropagation(),o()},className:"absolute left-2 sm:left-6 top-1/2 -translate-y-1/2 font-pixel text-foreground text-3xl sm:text-4xl hover:text-primary transition-colors z-10 px-3 py-2","aria-label":"Previous image",children:"←"}),e<cs.length-1&&y.jsx("button",{onClick:a=>{a.stopPropagation(),i()},className:"absolute right-2 sm:right-6 top-1/2 -translate-y-1/2 font-pixel text-foreground text-3xl sm:text-4xl hover:text-primary transition-colors z-10 px-3 py-2","aria-label":"Next image",children:"→"}),y.jsxs("div",{className:"flex flex-col items-center",onClick:a=>a.stopPropagation(),onTouchStart:a=>{const l=a.touches[0];n.current={x:l.clientX,y:l.clientY}},onTouchEnd:a=>{const l=n.current;if(!l)return;const u=a.changedTouches[0],c=u.clientX-l.x,d=u.clientY-l.y;n.current=null,Math.abs(c)>40&&Math.abs(c)>Math.abs(d)&&(c<0?i():o())},children:[y.jsx("img",{src:cs[e].src,alt:cs[e].alt,className:"max-h-[85vh] max-w-[90vw] object-contain"}),y.jsxs("p",{className:"mt-3 font-typewriter text-xs text-muted-foreground",children:[e+1," / ",cs.length]})]})]})]})},ds=[{src:"/posters/shambala-aug26.jpg",alt:"Shambala Festival – 27-30 August 2026",venue:"Shambala Festival",date:"27–30 Aug 2026"},{src:"/posters/shacklewell-27jul26.jpg",alt:"Lazy Jane ++ Djank at Shacklewell Arms – 27 July 2026",venue:"Shacklewell Arms",date:"27 Jul 2026"},{src:"/posters/mildmay-23jul26.jpg",alt:"Lazy Jane, Poor Performer & Milk Teeth at The Mildmay Club – 23 July 2026",venue:"The Mildmay Club",date:"23 Jul 2026"},{src:"/posters/goldsmiths-29may26.jpg",alt:"Goldsmiths Students' Union – 29 May 2026",venue:"Goldsmiths Students' Union",date:"29 May 2026"},{src:"/posters/well-street-14jun26.jpg",alt:"Well Street Common Festival – 14 June 2026",venue:"Well Street Common Festival",date:"14 Jun 2026"},{src:"/posters/calamity-tank-4apr26.jpg",alt:"Calamity Tank – 4 April 2026",venue:"Calamity Tank",date:"4 Apr 2026"},{src:"/posters/dingwalls-1apr26.jpg",alt:"The Dingwall Building – 1 April 2026",venue:"The Dingwall Building",date:"1 Apr 2026"},{src:"/posters/engine-rooms-6mar26.jpg",alt:"Women Rock Everything at The Engine Rooms – 6 March 2026",venue:"The Engine Rooms",date:"6 Mar 2026"},{src:"/posters/hope-anchor-14feb26.jpg",alt:"Loud Women Valentine's at The Hope & Anchor – 14 February 2026",venue:"The Hope & Anchor",date:"14 Feb 2026"},{src:"/posters/trades-hall-1feb26.jpg",alt:"Walthamstow Trades Hall – 1 February 2026",venue:"Walthamstow Trades Hall",date:"1 Feb 2026"},{src:"/posters/post-bar-18jan26.jpg",alt:"The Post Bar – 18 January 2026",venue:"The Post Bar",date:"18 Jan 2026"},{src:"/posters/biddle-bros-16jan26.jpg",alt:"Biddle Bros – 16 January 2026",venue:"Biddle Bros",date:"16 Jan 2026"},{src:"/posters/post-bar-29oct25.jpg",alt:"The Post Bar Halloween Party – 29 October 2025",venue:"The Post Bar",date:"29 Oct 2025"},{src:"/posters/a12-diy-17aug25.jpg",alt:"Mistake Manor A12 DIY – 17 August 2025",venue:"A12 DIY / Mabley Green",date:"17 Aug 2025"},{src:"/posters/post-bar-4jul25.jpg",alt:"The Post Bar RCK Fundraiser – 4 July 2025",venue:"The Post Bar",date:"4 Jul 2025"},{src:"/posters/signature-brew-29jun25.jpg",alt:"We Can Be Heroes Open Mic Festival – 29 June 2025",venue:"Signature Brew",date:"29 Jun 2025"}],KR=()=>{const[e,t]=w.useState(null),r=w.useCallback(()=>t(null),[]);return w.useEffect(()=>{if(e===null)return;const n=s=>{s.key==="Escape"&&r(),s.key==="ArrowLeft"&&t(o=>o!==null&&o>0?o-1:o),s.key==="ArrowRight"&&t(o=>o!==null&&o<ds.length-1?o+1:o)};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,r]),y.jsxs("div",{className:"min-h-screen bg-background overflow-hidden",children:[y.jsxs(yu,{children:[y.jsx("title",{children:"Gig Posters — Lazy Jane"}),y.jsx("meta",{name:"description",content:"Every Lazy Jane gig poster — from Shambala Festival and the Shacklewell Arms back to the early DIY shows."}),y.jsx("meta",{property:"og:title",content:"Gig Posters — Lazy Jane"}),y.jsx("meta",{property:"og:description",content:"Every Lazy Jane gig poster, from festival stages back to the early DIY shows."})]}
93),y.jsx(_o,{text:"★ POSTERS ★ POSTERS ★ POSTERS ★ POSTERS ★ POSTERS ★ POSTERS ★ POSTERS ★ POSTERS ★"}),y.jsx(bu,{}),y.jsx("header",{className:"px-4 sm:px-8 pt-8 pb-4 flex items-center justify-center",children:y.jsx("h1",{className:"font-typewriter text-foreground text-2xl sm:text-3xl tracking-wider uppercase",children:"POSTERS"})}),y.jsx("div",{className:"construction-stripe"}),y.jsx("main",{className:"px-4 sm:px-8 py-10 max-w-4xl mx-auto",children:y.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8",children:ds.map((n,s)=>y.jsxs("div",{className:"group cursor-pointer",onClick:()=>t(s),children:[y.jsxs("div",{className:"mb-2 text-center",children:[y.jsx("p",{className:"font-typewriter text-sm text-foreground",children:n.venue}),y.jsx("p",{className:"font-typewriter text-xs text-muted-foreground",children:n.date})]}),y.jsx("div",{className:"relative overflow-hidden border border-muted-foreground/20 hover:border-primary/60 transition-colors aspect-[3/4]",children:y.jsx("img",{src:n.src,alt:n.alt,loading:"lazy",decoding:"async",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-[1.02]"})})]},s))})}),y.jsx("div",{className:"construction-stripe"}),e!==null&&y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-sm cursor-pointer animate-in fade-in duration-200",onClick:r,children:[y.jsx("button",{onClick:r,className:"absolute top-4 right-4 sm:top-6 sm:right-6 font-pixel text-foreground text-2xl hover:text-primary transition-colors z-10","aria-label":"Close",children:"✕"}),y.jsxs("div",{className:"flex flex-col items-center",onClick:n=>n.stopPropagation(),children:[y.jsxs("div",{className:"mb-3 text-center",children:[y.jsx("p",{className:"font-typewriter text-sm text-foreground",children:ds[e].venue}),y.jsx("p",{className:"font-typewriter text-xs text-muted-foreground",children:ds[e].date})]}),y.jsx("img",{src:ds[e].src,alt:ds[e].alt,className:"max-h-[80vh] max-w-[90vw] object-contain"})]})]})]})};function qR(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(c){try{u(n.next(c))}catch(d){i(d)}}function l(c){try{u(n.throw(c))}catch(d){i(d)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}const GR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class yf 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 JR extends yf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class jm extends yf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Nm extends yf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Hd;(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"})(Hd||(Hd={}));class YR{constructor(t,{headers:r={},customFetch:n,region:s=Hd.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=GR(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return qR(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:a,method:l,body:u,signal:c,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const b=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,b.searchParams.set("forceFunctionRegion",h));let p;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",p=u):typeof u=="string"?(f["Content-Type"]="text/plain",p=u):typeof FormData<"u"&&u instanceof FormData?p=u:(f["Content-Type"]="application/json",p=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?p=JSON.stringify(u):p=u;let x=c;d&&(i=new AbortController,o=setTimeout(()=>i.abort(),d),c?(x=i.signal,c.addEventListener("abort",()=>i.abort())):x=i.signal);const g=yield this.fetch(b.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:p,signal:x}).catch(E=>{throw new JR(E)}),m=g.headers.get("x-relay-error");
93if(m&&m==="true")throw new jm(g);if(!g.ok)throw new Nm(g);let v=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return v==="application/json"?S=yield g.json():v==="application/octet-stream"||v==="application/pdf"?S=yield g.blob():v==="text/event-stream"?S=g:v==="multipart/form-data"?S=yield g.formData():S=yield g.text(),{data:S,error:null,response:g}}catch(a){return{data:null,error:a,response:a instanceof Nm||a instanceof jm?a.context:void 0}}finally{o&&clearTimeout(o)}})}}const D0=3,Lm=e=>Math.min(1e3*2**e,3e4),QR=[520,503],$0=["GET","HEAD","OPTIONS"];var XR=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Im(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 ZR(e,t,r,n){return!(!n||r>=D0||!$0.includes(e)||!QR.includes(t))}var eP=class{constructor(e){var t,r,n,s,o;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=(o=e.retry)!==null&&o!==void 0?o:!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 i=this.headers.get("Accept");i==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!i||i==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let o=(async()=>{let i=0;for(;;){const u=new Headers(r.headers);i>0&&u.set("X-Retry-Count",String(i));let c;try{c=await n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body),signal:r.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!$
930.includes(r.method))throw d;if(r.retryEnabled&&i<D0){const f=Lm(i);i++,await Im(f,r.signal);continue}throw d}if(ZR(r.method,c.status,i,r.retryEnabled)){var a,l;const d=(a=(l=c.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:Lm(i);await c.text(),i++,await Im(f,r.signal);continue}return await r.processResponse(c)}})();return this.shouldThrowOnError||(o=o.catch(i=>{var a;let l="",u="",c="";const d=i==null?void 0:i.cause;if(d){var f,h,b,p;const m=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",v=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(b=i==null?void 0:i.name)!==null&&b!==void 0?b:"FetchError"}: ${i==null?void 0:i.message}`,l+=`
94
95Caused by: ${(p=d==null?void 0:d.name)!==null&&p!==void 0?p:"Error"}: ${m}`,v&&(l+=` (${v})`),d!=null&&d.stack&&(l+=`
96${d.stack}`)}else{var x;l=(x=i==null?void 0:i.stack)!==null&&x!==void 0?x:""}const g=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(c="",u="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${g} 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.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",u="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(u+=`. Your request URL is ${g} 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=i==null?void 0:i.name)!==null&&a!==void 0?a:"FetchError"}: ${i==null?void 0:i.message}`,details:l,hint:u,code:c},data:null,count:null,status:0,statusText:""}})),o.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,o=e.status,i=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 c=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");c&&d&&d.length>1&&(s=parseInt(d[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,o=406,i="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const c=await e.text();try{r=JSON.parse(c),Array.isArray(r)&&e.status===404&&(n=[],r=null,o=200,i="OK")}catch{e.status===404&&c===""?(o=204,i="No Content"):r={message:c}}if(r&&t.shouldThrowOnError)throw new XR(r)}return{success:r===null,error:r,data:n,count:s,status:o,statusText:i}}returns(){return this}overrideTypes(){return this}},tP=class extends eP{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 o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${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`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${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}
96explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var i;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`),o==="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 Dm=new RegExp("[,()]");var xs=class extends tP{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"&&Dm.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"&&Dm.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 o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const 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}},rP=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:o}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=o}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 o=!1;const i=(e??"*").split("").map(u=>/\s/.test(u)&&!o?"":(u==='"'&&(o=!o),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",i),n&&l.append("Prefer",`count=${n}`),new xs({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:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
960){const l=[...new Set(a)].map(u=>`"${u}"`);o.searchParams.set("columns",l.join(","))}}return new xs({method:s,url:o,headers:i,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 o;const i="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((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new xs({method:i,url:a,headers:l,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new xs({method:n,url:s,headers:o,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 xs({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 Oi(e){"@babel/helpers - typeof";return Oi=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},Oi(e)}function nP(e,t){if(Oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sP(e){var t=nP(e,"string");return Oi(t)=="symbol"?t:t+""}function oP(e,t,r){return(t=sP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $m(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 _a(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$m(Object(r),!0).forEach(function(n){oP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var iP=class M0{constructor(t,{headers:r={},schema:n,fetch:s,timeout:o,urlLengthLimit:i=8e3,retry:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=i;const l=s??globalThis.fetch;o!==void 0&&o>0?this.fetch=(u,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),o),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,c);const b=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",b,{once:!0}),l(u,_a(_a({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",b)})}return l(u,_a(_a({},c),{},{signal:d.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 rP(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 M0(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:o}={}){var i;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const c=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(c)),d=n&&Object.values(r).some(c);d?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,b])=>b!==void 0).map(([h,b])=>[h,Array.isArray(b)?`{${b.join(",")}}`:`${b}
96`]).forEach(([h,b])=>{l.searchParams.append(h,b)})):(a="POST",u=r);const f=new Headers(this.headers);return d?f.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&f.set("Prefer",`count=${o}`),new xs({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class aP{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.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"&&globalThis.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 r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
97import ws from "ws"
98new 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.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
99
100Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const lP="2.103.0",uP=`realtime-js/${lP}`,cP="1.0.0",U0="2.0.0",dP=U0,hP=1e4,fP=100,Kr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},F0={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Wd={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class pP{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:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(c).length===0?"":JSON.stringify(c);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(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+u.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
100let b=new DataView(h),p=0;b.setUint8(p++,this.KINDS.userBroadcastPush),b.setUint8(p++,l.length),b.setUint8(p++,a.length),b.setUint8(p++,i.length),b.setUint8(p++,u.length),b.setUint8(p++,d.length),b.setUint8(p++,r),Array.from(l,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(a,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(i,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(u,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(d,g=>b.setUint8(p++,g.charCodeAt(0)));var x=new Uint8Array(h.byteLength+n.byteLength);return x.set(new Uint8Array(h),0),x.set(new Uint8Array(n),h.byteLength),x.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,o,i,a,l]=n;return r({join_ref:s,ref:o,topic:i,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),o=r.getUint8(2),i=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 c=n.decode(t.slice(l,l+o));l=l+o;const d=n.decode(t.slice(l,l+i));l=l+i;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,b={type:this.BROADCAST_EVENT,event:c,payload:h};return i>0&&(b.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:b}}_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 Mm=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=mP(i,e,t,s),o),{}):{}},mP=(e,t,r,n)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?z0(o,i):Vd(i)},z0=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return wP(t,r)}switch(e){case ie.bool:return gP(t);case ie.float4:case ie.float8:case ie.int2:case ie.int4:case ie.int8:case ie.numeric:case ie.oid:return vP(t);case ie.json:case ie.jsonb:return yP(t);case ie.timestamp:return bP(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 Vd(t);default:return Vd(t)}},Vd=e=>e,gP=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},vP=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},yP=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},wP=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>z0(t,a))}return e},bP=e=>typeof e=="string"?e.replace(" ","T"):e,B0=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 oi=e=>typeof e=="function"?e:function(){return e},xP=typeof self<"u"?self:null,Ss=typeof window<"u"?window:null,Jt=xP||Ss||globalThis,SP="2.0.0",EP=1e4,_P=1e3,Zt={connecting:0,open:1,closing:2,closed:3},Xe={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},mr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Kd={longpoll:"longpoll",websocket:"websocket"},kP={complete:4},qd="base64url.bearer.phx.",ka=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: 8,700 bytes, line 100
100oks=[],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})}},H0=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))}},CP=class{constructor(e,t,r){this.state=Xe.closed,this.topic=e,this.params=oi(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ka(this,mr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new H0(()=>{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=Xe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Xe.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=Xe.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=Xe.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 ka(this,mr.leave,oi({}),this.timeout).send(),this.state=Xe.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(mr.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=Xe.closed,this.bindings=[]}onClose(e){this.on(mr.close,e)}onError(e){return this.on(mr.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 ka(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=Xe.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(mr.close,"leave")},r=new ka(this,mr.leave,oi({}),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=Xe.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 o=this.bindings.filter(i=>i.event===e&&this.filterBindings(i,t,r));for(let i=0;i<o.length;i++)o[i].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Xe.closed}isErrored(){return this.state===Xe.errored}isJoined(){return this.state===Xe.joined}isJoining(){return this.state===Xe.joining}isLeaving(){return this.state===Xe.leaving}},Ul=class{static request(e,t,r,n,s,o,i){if(Jt.XDomainRequest){let a=new Jt.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,o,i)}else if(Jt.XMLHttpRequest){let a=new Jt.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,o,i)}else{if(Jt.fetch&&Jt.AbortController)return this.fetchRequest(e,t,r,n,s,o,i);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,o,i){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Jt.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>i&&i(u)).catch(u=>{u.name==="AbortError"&&o?o():i&&i(null)}),l}static xdomainRequest(e,t,r,n,s,o,i){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);i&&i(a)},o&&(e.ontimeout=o),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,o,i,a){e.open(t,r,!0),e.timeout=o;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===kP.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},i&&(e.ontimeout=i),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,o=e[n];typeof o=="object"?r.push(this.serialize(o,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(o))}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)}`}},TP=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)},hs=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(qd)&&(this.authToken=atob(t[1].slice(qd.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=Zt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Kd.websocket),"$1/"+Kd.longpoll)}endpointURL(){return Ul.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Zt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Zt.open||this.readyState===Zt.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(o=>{setTimeout(()=>this.onmessage({data:o}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Zt.open,this.onopen({}),this.poll();break;
100case 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=TP(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(`
101`),()=>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=Zt.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 o,i=()=>{this.reqs.delete(o),n()};o=Ul.request(e,this.endpointURL(),t,r,this.timeout,i,a=>{this.reqs.delete(o),this.isActive()&&s(a)}),this.reqs.add(o)}},RP=class qo{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:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=qo.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=qo.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=qo.syncDiff(this.state,s,o,i),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return qo.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let o=this.clone(t),i={},a={};return this.map(o,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let c=o[l];if(c){let d=u.metas.map(p=>p.phx_ref),f=c.metas.map(p=>p.phx_ref),h=u.metas.filter(p=>f.indexOf(p.phx_ref)<0),b=c.metas.filter(p=>d.indexOf(p.phx_ref)<0);h.length>0&&(i[l]=u,i[l].metas=h),b.length>0&&(a[l]=this.clone(c),a[l].metas=b)}else i[l]=u}),this.syncDiff(o,{joins:i,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:o,leaves:i}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(o,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let c=t[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);t[a].metas.unshift(...d)}n(a,u,l)}),this.map(i,(a,l)=>{let u=t[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.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))}},Ca={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,o,i]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:o,payload:i})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:o}=e,i=this.META_LENGTH+t.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+i),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,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0)));var c=new Uint8Array(a.byteLength+o.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(o),a.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,595 bytes, line 101
101switch(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),o=t.getUint8(3),i=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(i,i+n));i=i+n;let l=r.decode(e.slice(i,i+s));i=i+s;let u=r.decode(e.slice(i,i+o));i=i+o;let c=e.slice(i,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=t.getUint8(3),i=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 c=r.decode(e.slice(a,a+o));a=a+o;let d=r.decode(e.slice(a,a+i));a=a+i;let f=e.slice(a,e.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:mr.reply,payload:h}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=this.HEADER_LENGTH+2,i=r.decode(e.slice(o,o+n));o=o+n;let a=r.decode(e.slice(o,o+s));o=o+s;let l=e.slice(o,e.byteLength);return{join_ref:null,ref:null,topic:i,event:a,payload:l}}},PP=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||EP,this.transport=t.transport||Jt.WebSocket||hs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Jt&&Jt.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Ca.encode.bind(Ca),this.defaultDecoder=Ca.decode.bind(Ca),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!==hs?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Ss&&Ss.addEventListener&&(Ss.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Ss.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),Ss.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=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,s,o)=>{console.log(`${n}: ${s}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=oi(t.params||{}),this.endPoint=`${e}/${Kd.websocket}`,this.vsn=t.vsn||SP,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new H0(()=>{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 hs}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=Ul.appendParams(Ul.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=oi(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==hs?this.connectWithFallback(hs,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 hs:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${qd}${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,o,i=this.transportName(e),a=l=>{this.log("transport",`falling back to ${i}...`,l),this.off([s,o]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${i}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),o=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(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),_P,"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===Zt.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(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}
101triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(mr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Zt.connecting:return"connecting";case Zt.open:return"open";case Zt.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 CP(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:o}=e;this.log("push",`${t} ${r} (${o}, ${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:o,join_ref:i}=t;if(o&&o===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} ${o&&"("+o+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,i)&&l.trigger(n,s,o,i)}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 ii{constructor(t,r){const n=OP(r);this.presence=new RP(t.getChannel(),n),this.presence.onJoin((s,o,i)=>{const a=ii.onJoinPayload(s,o,i);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,o,i)=>{const a=ii.onLeavePayload(s,o,i);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return ii.transformState(this.presence.state)}static transformState(t){return t=AP(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=rl(s),r},{})}static onJoinPayload(t,r,n){const s=Um(r),o=rl(n);return{event:"join",key:t,currentPresences:s,newPresences:o}}static onLeavePayload(t,r,n){const s=Um(r),o=rl(n);return{event:"leave",key:t,currentPresences:s,leftPresences:o}}}function rl(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function AP(e){return JSON.parse(JSON.stringify(e))}function OP(e){return(e==null?void 0:e.events)&&{events:e.events}}function Um(e){return e!=null&&e.metas?rl(e):[]}var Fm;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Fm||(Fm={}));class jP{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new ii(this.channel.channelAdapter,r)}}class NP{constructor(t,r,n){const s=LP(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`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>fP){const o=this.channel.pushBuffer.shift();o.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${o.event}`,o.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===Kr.joined}isJoined(){return this.state===Kr.joined}isJoining(){return this.state===Kr.joining}isClosed(){return this.state===Kr.closed}isLeaving(){return this.state===Kr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function LP(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var zm;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(zm||(zm={}));var $s;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})($s||($s={}));var gr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(gr||(gr={}));class ai{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,o;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 NP(this.socket.socketAdapter,t,this.params),this.presence=new jP(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=B0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:i,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:[],c=!!this.bindings[$s.PRESENCE]&&this.bindings[$s.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,d={},f={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(gr.CHANNEL_ERROR,h)}),this._onClose(()=>t==null?void 0:t(gr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),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(gr.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
101).receive("error",h=>{this.state=Kr.errored,t==null||t(gr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(gr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,o=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,i=[];for(let a=0;a<o;a++){const l=s[a],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=t&&t[a];if(h&&h.event===u&&ai.isFilterValueEqual(h.schema,c)&&ai.isFilterValueEqual(h.table,d)&&ai.isFilterValueEqual(h.filter,f))i.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Kr.errored,r==null||r(gr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=i,this.state!=Kr.errored&&r&&r(gr.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(),o=t===$s.PRESENCE||t===$s.POSTGRES_CHANGES;if(s&&o)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("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const i={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(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 
101in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=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:o,payload:i,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.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("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,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_on(t,r,n){const s=t.toLocaleLowerCase(),o=this.channelAdapter.on(t,n),i={type:s,filter:r,callback:n,ref:o};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,o,i,a,l,u,c;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,b=(o=f.filter)===null||o===void 0?void 0:o.event;return h&&((i=r.ids)===null||i===void 0?void 0:i.includes(h))&&(b==="*"||(b==null?void 0:b.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===((c=r==null?void 0:r.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:o,join:i}=F0;return r&&[n,s,o,i].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:o,table:i,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:o,table:i,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=Mm(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Mm(t.columns,t.old_record)),r}}class IP{constructor(t,r){this.socket=new PP(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(o=>{setTimeout(()=>
101o("timeout"),s),this.socket.disconnect(()=>{t(),o("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()==Wd.connecting}isDisconnecting(){return this.socket.connectionState()==Wd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const DP={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},$P=[1e3,2e3,5e3,1e4],MP=1e4,UP=`
102  addEventListener("message", (e) => {
103    if (e.data.event === "start") {
104      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
105    }
106  });`;class FP{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={},this.ref=0,this.serializer=new pP,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=o=>o?(...i)=>o(...i):(...i)=>fetch(...i),!(!((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 IP(t,s),this.httpEndpoint=B0(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}
107
108To use Realtime in Node.js, you need to provide a WebSocket implementation:
109
110Option 1: Use Node.js 22+ which has native WebSocket support
111Option 2: Install and provide the "ws" package:
112
113  npm install ws
114
115  import ws from "ws"
116  const client = new RealtimeClient(url, {
117    ...options,
118    transport: ws
119  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return 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(),this.channels.length===0&&this.disconnect(),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 this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||Wd.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(o=>o.topic===n);if(s)return s;{const o=new ai(`realtime:${t}`,r,this);return this.channels.push(o),o}}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)}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.forEac
119h(s=>{const o={access_token:r,version:uP};r&&s.updateJoinPayload(o),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(F0.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([UP],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,o,i,a,l,u,c;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 d={};d.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:hP,d.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:DP.HEARTBEAT_INTERVAL,d.transport=(i=t==null?void 0:t.transport)!==null&&i!==void 0?i:aP.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:p=>$P[p-1]||MP;let f,h;const b=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:dP;switch(b){case cP:f=(p,x)=>x(JSON.stringify(p)),h=(p,x)=>x(JSON.parse(p));break;case U0:f=this.serializer.encode.bind(this.serializer),h=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${d.vsn}`)}if(d.vsn=b,d.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:f,d.decode=(c=t==null?void 0:t.decode)!==null&&c!==void 0?c:h,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.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,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var ji=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 zP(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function BP(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 HP(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const a=zP(e.baseUrl,n,s),l=await BP(e.auth),u=await t(a,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...i},body:o?JSON.stringify(o):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,b=h==null?void 0:h.error;throw new ji((b==null?void 0:b.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Ta(e){return e.join("�")}var WP=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Ta(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/${Ta(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ta(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ta(e.namespace)}`}),!0}catch(t){if(t instanceof ji&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof ji&&r.status===409)return;throw r}}};function fs(e){return e.join("�")}var VP=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/${fs(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/${fs(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/${fs(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/${fs(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/${fs(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/${fs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof ji&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof ji&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},KP=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=HP({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new WP(this.client,t),this.tableOps=new VP(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)}
119async 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)}},xu=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}};function Su(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Gd=class extends xu{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{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},W0=class extends xu{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const qP=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GP=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)},Jd=e=>{if(Array.isArray(e))return e.map(r=>Jd(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,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Jd(n)}),t},JP=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Ni(e){"@babel/helpers - typeof";return Ni=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},Ni(e)}function YP(e,t){if(Ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QP(e){var t=YP(e,"string");return Ni(t)=="symbol"?t:t+""}function XP(e,t,r){return(t=QP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bm(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 W(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bm(Object(r),!0).forEach(function(n){XP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Hm=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},ZP=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let o=parseInt(s.status,10);Number.isFinite(o)||(o=500),s.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||o+"";t(new Gd(Hm(i),o,a,n))}).catch(()=>{const i=o+"";t(new Gd(s.statusText||`HTTP ${o} error`,o,i,n))})}else t(new W0(Hm(e),e,n))},eA=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return W(W({},s),r);if(GP(n)){var o;const i=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(i))l.toLowerCase()==="content-type"&&(a=u);s.headers=tA(i,"Content-Type",(o=a)!==null&&o!==void 0?o:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),W(W({},s),r)};function tA(e,t,r){const n=W({},e);for(const s of Object.keys(n))s.toLowerCase()===t.toLowerCase()&&delete n[s];return n[t]=r,n}async function Fo(e,t,r,n,s,o,i){return new Promise((a,l)=>{e(r,eA(t,n,s,o)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(i==="vectors"){const c=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!c||!c.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>ZP(u,l,n,i))})}function V0(e="storage"){return{get:async(t,r,n,s)=>Fo(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,o)=>Fo(t,"POST",r,s,o,n,e),put:async(t,r,n,s,o)=>Fo(t,"PUT",r,s,o,n,e),head:async(t,r,n,s)=>Fo(t,"HEAD",r,W(W({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,o)=>Fo(t,"DELETE",r,s,o,n,e)}}const rA=V0("storage"),{get:Li,post:Lt,put:Yd,head:nA,remove:wf}=rA,lt=V0("vectors");var ko=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([s,o])=>[s.toLowerCase(),o])),this.fetch=qP(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=W(W({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Su(r))return{data:null,error:r};throw r}}},sA=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;if(Su(t))return{data:null,error:t};throw t}}};let K0;K0=Symbol.toStringTag;var oA=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[K0]="BlobDownloadBuilder",this.promise=null}asStream(){return new sA(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(Su(t))return{data:null,error:t};throw t}}};const iA={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Wm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var aA=class extends ko{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 o;const i=W(W({},Wm),n);let a=W(W({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",s.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),l&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),n!=null&&n.headers&&(a=W(W({},a),n.headers));const u=s._removeEmptyFolders(t),c=s._getFinalPath(u),d=await(e=="PUT"?Yd:Lt)(s.fetch,`${s.url}/object/${c}`,o,W({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),a=new URL(s.url+`/object/upload/sign/${i}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=W(W({},Wm),n),c=W(W({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cac
119he-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType),{path:o,fullPath:(await Yd(s.fetch,a.toString(),l,{headers:c})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=W({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await Lt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(r.url+o.url),a=i.searchParams.get("token");if(!a)throw new xu("No token returned by API");return{signedUrl:i.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 Lt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Lt(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 o=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let i=await Lt(n.fetch,`${n.url}/object/sign/${s}`,W({expiresIn:t},o?{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(),u=o&&i.signedURL.includes("/object/sign/")?i.signedURL.replace("/object/sign/","/render/image/sign/"):i.signedURL;return{signedUrl:encodeURI(`${n.url}${u}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Lt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=new URLSearchParams;r!=null&&r.download&&o.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&o.set("cacheNonce",String(r.cacheNonce));const i=o.toString();return s.map(a=>W(W({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${i?`&${i}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"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 o=s.toString(),i=this._getFinalPath(e),a=()=>Li(this.fetch,`${this.url}/${n}/${i}${o?`?${o}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new oA(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Jd(await Li(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await nA(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Su(s)){var n;const o=s instanceof Gd?s.status:s instanceof W0?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(o!==void 0&&[400,404].includes(o))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(),o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await wf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=W(W(W({},iA),t),{},{prefix:e||""});return await Lt(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=W({},e);return await Lt(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("qual
119ity",t.quality.toString()),e}};const lA="2.103.0",Yi={"X-Client-Info":`storage-js/${lA}`};var uA=class extends ko{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 o=s.href.replace(/\/$/,""),i=W(W({},Yi),t);super(o,i,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Li(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Li(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Lt(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 Yd(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 Lt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},cA=class extends ko{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=W(W({},Yi),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Lt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=new URLSearchParams;(e==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 Li(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!JP(e))throw new xu("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 KP({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...a)=>{try{return{data:await i.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},dA=class extends ko{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=W(W({},Yi),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await lt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await lt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},hA=class extends ko{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=W(W({},Yi),{},{"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 lt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await lt.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");
119if(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 lt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await lt.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 lt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},fA=class extends ko{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=W(W({},Yi),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},pA=class extends fA{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new mA(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)}},mA=class extends dA{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,W(W({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,W(W({},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 gA(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},gA=class extends hA{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,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},vA=class extends uA{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new aA(this.url,this.headers,e,this.fetch)}get vectors(){return new pA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new cA(this.url+"/iceberg",this.headers,this.fetch)}};function Eu(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 q0="2.103.0",Es=30*1e3,Qd=3,vc=Qd*Es,yA="http://localhost:9999",wA="supabase.auth.token",bA={"X-Client-Info":`gotrue-js/${q0}`},Xd="X-Supabase-Api-Version",G0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},xA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,SA=10*60*1e3;
119class Ii extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function M(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class EA extends Ii{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function _A(e){return M(e)&&e.name==="AuthApiError"}class An extends Ii{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Ar extends Ii{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class ot extends Ar{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ra(e){return M(e)&&e.name==="AuthSessionMissingError"}class ps extends Ar{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Pa extends Ar{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Aa extends Ar{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function kA(e){return M(e)&&e.name==="AuthImplicitGrantRedirectError"}class Vm extends Ar{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class CA extends Ar{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 Zd extends Ar{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function yc(e){return M(e)&&e.name==="AuthRetryableFetchError"}class Km extends Ar{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class eh extends Ar{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Fl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),qm=` 	
120\r=`.split(""),TA=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<qm.length;t+=1)e[qm[t].charCodeAt(0)]=-2;for(let t=0;t<Fl.length;t+=1)e[Fl[t].charCodeAt(0)]=t;return e})();function Gm(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(Fl[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(Fl[n]),t.queuedBits-=6}}function J0(e,t,r){const n=TA[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 Jm(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{AA(i,n,r)};for(let i=0;i<e.length;i+=1)J0(e.charCodeAt(i),s,o);return t.join("")}function RA(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 PA(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}RA(n,t)}}function AA(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 Gs(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
120s+=1)J0(e.charCodeAt(s),r,n);return new Uint8Array(t)}function OA(e){const t=[];return PA(e,r=>t.push(r)),new Uint8Array(t)}function Ln(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Gm(s,r,n)),Gm(null,r,n),t.join("")}function jA(e){return Math.round(Date.now()/1e3)+e}function NA(){return Symbol("auth-callback")}const Le=()=>typeof window<"u"&&typeof document<"u",_n={tested:!1,writable:!1},Y0=()=>{if(!Le())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(_n.tested)return _n.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),_n.tested=!0,_n.writable=!0}catch{_n.tested=!0,_n.writable=!1}return _n.writable};function LA(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Q0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),IA=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",_s=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},kn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Ne=async(e,t)=>{await e.removeItem(t)};class _u{constructor(){this.promise=new _u.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}_u.promiseConstructor=Promise;function Oa(e){const t=e.split(".");if(t.length!==3)throw new eh("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!xA.test(t[n]))throw new eh("JWT not in base64url format");return{header:JSON.parse(Jm(t[0])),payload:JSON.parse(Jm(t[1])),signature:Gs(t[2]),raw:{header:t[0],payload:t[1]}}}async function DA(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function $A(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function MA(e){return("0"+e.toString(16)).substr(-2)}function UA(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,MA).join("")}async function FA(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function zA(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 FA(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ms(e,t,r=!1){const n=UA();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await _s(e,`${t}-code-verifier`,s);const o=await zA(n);return[o,n===o?"plain":"s256"]}const BA=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function HA(e){const t=e.headers.get(Xd);if(!t||!t.match(BA))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function WA(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 VA(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 KA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function gs(e){if(!KA.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function wc(){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 qA(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
120if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="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 Ym(e){return JSON.parse(JSON.stringify(e))}const Rn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),GA=[502,503,504];async function Qm(e){var t;if(!IA(e))throw new Zd(Rn(e),0);if(GA.includes(e.status))throw new Zd(Rn(e),e.status);let r;try{r=await e.json()}catch(o){throw new An(Rn(o),o)}let n;const s=HA(e);if(s&&s.getTime()>=G0["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 Km(Rn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new ot}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((o,i)=>o&&typeof i=="string",!0))throw new Km(Rn(r),e.status,r.weak_password.reasons);throw new EA(Rn(r),e.status||500,n)}const JA=(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 z(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[Xd]||(o[Xd]=G0["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await YA(e,t,r+a,{headers:o,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 YA(e,t,r,n,s,o){const i=JA(t,n,s,o);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new Zd(Rn(l),0)}if(a.ok||await Qm(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Qm(l)}}function Ot(e){var t;let r=null;ZA(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=jA(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Xm(e){const t=Ot(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 qr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function QA(e){return{data:e,error:null}}function XA(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=Eu(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:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function Zm(e){return e}function ZA(e){return e.access_token&&e.refresh_token&&e.expires_in}const bc=["global","local","others"];class eO{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=Q0(n),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)}}
vendor: 4,751 bytes, line 120
120async signOut(t,r=bc[0]){if(bc.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${bc.join(", ")}`);try{return await z(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(M(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await z(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:qr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Eu(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 z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:XA,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(M(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await z(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:qr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await z(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:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Zm});if(c.error)throw c.error;const d=await c.json(),f=(i=c.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(b=>{const p=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){gs(t);try{return await z(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:qr})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){gs(t);try{return await z(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:qr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){gs(t);try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:qr})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){gs(t.userId);try{const{data:r,error:n}=await z(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(M(r))return{data:null,error:r};throw r}}async _deleteFactor(t){gs(t.userId),gs(t.id);try{return{data:await z(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await z(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:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Zm});if(c.error)throw c.error;const d=await c.json(),f=(i=c.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(b=>{const p=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await z(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await z(this.fetch,"DELET
120E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await z(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(M(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await z(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await z(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await z(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}}function eg(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const qt={debug:!!(globalThis&&Y0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class X0 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class tg extends X0{}async function tO(e,t,r){qt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),qt.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 o=>{if(o){clearTimeout(s),qt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,o.name);try{return await r()}finally{qt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,o.name)}}else{if(t===0)throw qt.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new tg(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(qt.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null,"  "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}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(o){if(t>0&&clearTimeout(s),(o==null?void 0:o.name)==="AbortError"&&t>0){if(n.signal.aborted)return qt.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 i=>{if(i){qt.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,i.name);try{return await r()}finally{qt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,i.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw qt.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new tg(`Lock "${e}" was released because another request stole it`)}throw o}}
120function rO(){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 Z0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function nO(e){return parseInt(e,16)}function sO(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function oO(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,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(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!d)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(`
121`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=Z0(e.address),b=c?`${c}://${n}`:n,p=e.statement?`${e.statement}
122`:"",x=`${b} wants you to sign in with your Ethereum account:
123${h}
124
125${p}`;let g=`URI: ${d}
126Version: ${f}
127Chain ID: ${r}${i?`
128Nonce: ${i}`:""}
129Issued At: ${o.toISOString()}`;if(s&&(g+=`
130Expiration Time: ${s.toISOString()}`),a&&(g+=`
131Not Before: ${a.toISOString()}`),l&&(g+=`
132Request ID: ${l}`),u){let m=`
133Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);m+=`
134- ${v}`}g+=m}return`${x}
135${g}`}class _e extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class zl extends _e{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function iO({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)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=o.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=o.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=o.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 o.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 i=window.location.hostname;if(eb(i)){if(o.rp.id!==i)return new _e({message:`The RP ID "${o.rp.id}
135" 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(o.user.id.byteLength<1||o.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 aO({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(eb(n)){if(r.rpId!==n)return new _e({message:`The RP ID "${r.rpId}" 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 lO{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 uO=new lO;function cO(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=Eu(e,["challenge","user","excludeCredentials"]),o=Gs(t).buffer,i=Object.assign(Object.assign({},r),{id:Gs(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:o,user:i});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:Gs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function dO(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=Eu(e,["challenge","allowCredentials"]),s=Gs(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:Gs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function hO(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ln(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ln(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function fO(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ln(new Uint8Array(s.authenticatorData)),clientDataJSON:Ln(new Uint8Array(s.clientDataJSON)),signature:Ln(new Uint8Array(s.signature)),userHandle:s.userHandle?Ln(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function eb(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function rg(){var e,t;return!!(Le()&&"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 pO(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new zl("Browser returned unexpected credential type",t)}:{data:null,error:new zl("Empty credential response",t)}}
135catch(t){return{data:null,error:iO({error:t,options:e})}}}async function mO(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new zl("Browser returned unexpected credential type",t)}:{data:null,error:new zl("Empty credential response",t)}}catch(t){return{data:null,error:aO({error:t,options:e})}}}const gO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},vO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Bl(...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 o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const a=n[o];t(a)?n[o]=Bl(a,i):n[o]=Bl(i)}else n[o]=i}return n}function yO(e,t){return Bl(gO,e,t||{})}function wO(e,t){return Bl(vO,e,t||{})}class bO{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},o){var i;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??uO.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=n;if(d)c.name=`${c.id}:${d}`;else{const h=(await this.client.getUser()).data.user,b=((i=h==null?void 0:h.user_metadata)===null||i===void 0?void 0:i.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";c.name=`${c.id}:${b}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=yO(a.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:d,error:f}=await pO({publicKey:c,signal:u});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=wO(a.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:d,error:f}=await mO(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return M(a)?{data:null,error:a}:{data:null,error:new An("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}={}},o){if(!r)return{data:null,error:new Ii("rpId is required for WebAuthn authentication")};try{if(!rg())return{data:null,error:new An("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return M(i)?{data:null,error:i}:{data:null,error:new An("Unexpected error in authenticate",i)}}}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}={}},o){if(!r)return{data:null,error:new Ii("rpId is required for WebAuthn registration")};try{if(!rg())return{data:null,error:new An("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return l?this._verify({factorId:i.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(i){return M(i)?{data:null,error:i}:{data:null,error:new An("Unexpected error in register",i)}}}}rO();const xO={url:yA,storageKey:wA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:bA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function ng(e,t,r){return await r()}const vs={};class Di{get jwks(){var t,r;return(r=(t=vs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){vs[this.storageKey]=Object.assign(Object.assign({},vs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=vs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){vs[this.storageKey]=Object.assign(Object.assign({},vs[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.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({},xO),t);if(this.storageKey=o.storageKey,this.instanceID=(r=Di.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Di.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Le()){const i=`${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(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new eO({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=Q0(o.fetch),this.lock=o.lock||ng,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&&Le()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=tO:this.lock=ng,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 bO(this)}
135,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.persistSession?(o.storage?this.storage=o.storage:Y0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=eg(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=eg(this.memoryStorage)),Le()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i);try{await this._notifyAllSubscribers(i.data.event,i.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}o.skipAutoInitialize||this.initialize().catch(i=>{this._debug("#initialize()","error",i)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${q0}) ${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(Le()&&(r=LA(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Le()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),kA(o)){const l=(t=o.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:o}}return{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return M(r)?this._returnResult({error:r}):this._returnResult({error:new An("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await z(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:Ot}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(M(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,b=null;this.flowType==="pkce"&&([h,b]=await ms(this.storage,this.storageKey)),o=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,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:b},xform:Ot})}else if("phone"in t){const{phone:c,password:d,options:f}=t;o=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,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:Ot})}else throw new Pa("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return await Ne(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(await Ne(this.storage,`${this.storageKey}-code-verifier`),M(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:a}=t;r=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Xm})}else if("phone"in t){const{phone:o,password:i,options:a}=t;r=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Xm})}else throw new Pa("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 o=new ps;return this._returnResult({data:{user:null,session:null},error:o})}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(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;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:(o=t.o
135ptions)===null||o===void 0?void 0:o.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,o,i,a,l,u,c,d,f;let h,b;if("message"in t)h=t.message,b=t.signature;else{const{chain:p,wallet:x,statement:g,options:m}=t;let v;if(Le())if(typeof x=="object")v=x;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")v=O.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=x}const S=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href),E=await v.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=Z0(E[0]);let k=(n=m==null?void 0:m.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const O=await v.request({method:"eth_chainId"});k=nO(O)}const A={domain:S.host,address:_,statement:g,uri:S.href,version:"1",chainId:k,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=m==null?void 0:m.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=oO(A),b=await v.request({method:"personal_sign",params:[sO(h),_]})}try{const{data:p,error:x}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:b},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Ot});if(x)throw x;if(!p||!p.session||!p.user){const g=new ps;return this._returnResult({data:{user:null,session:null},error:g})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:x})}catch(p){if(M(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var r,n,s,o,i,a,l,u,c,d,f,h;let b,p;if("message"in t)b=t.message,p=t.signature;else{const{chain:x,wallet:g,statement:m,options:v}=t;let S;if(Le())if(typeof g=="object")S=g;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))S=_.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 g!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=g}const E=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in S&&S.signIn){const _=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),m?{statement:m}:null));let k;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")k=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)k=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)b=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),p=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${E.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${E.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()}`,...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.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}`]:[],...!((d=(c=v==null?void 0:v.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...v.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(`
136`);const _=await S.signMessage(new TextEncoder().encode(b),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=_}}try{const{data:x,error:g}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:Ln(p)},!((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:Ot});if(g)throw g;if(!x||!x.session||!x.user){const m=new ps;return this._returnResult({data:{user:null,session:null},error:m})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:g})}
136catch(x){if(M(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await kn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new CA;const{data:o,error:i}=await z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Ot});if(await Ne(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new ps;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await Ne(this.storage,`${this.storageKey}-code-verifier`),M(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,a=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Ot}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new ps;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await ms(this.storage,this.storageKey));const{error:d}=await z(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:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await z(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:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new Pa("You must provide either an email or phone number.")}catch(a){if(await Ne(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Ot});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,u=i.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(M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await ms(this.storage,this.storageKey));const u=await z(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:QA});return!((o=u.data)===null||o===void 0)&&o.url&&Le()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Ne(this.storage,`${this.storageKey}-code-verifier`),M(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 ot;const{error:s}=await z(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(M(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:o}=t,{error:i}=await z(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:a}=await z(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new Pa("You must provide either an email or phone number and a type")}catch(r){if(M(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 kn(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
136id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<vc:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await kn(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=wc()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=qA(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):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 z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:qr}):await this._useSession(async r=>{var n,s,o;const{data:i,error:a}=r;if(a)throw a;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ot}:await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:qr})})}catch(r){if(M(r))return Ra(r)&&(await this._removeSession(),await Ne(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:o}=n;if(o)throw o;if(!s.session)throw new ot;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await ms(this.storage,this.storageKey));const{data:u,error:c}=await z(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:i.access_token,xform:qr});if(c)throw c;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await Ne(this.storage,`${this.storageKey}-code-verifier`),M(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 ot;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=Oa(t.access_token);if(i.exp&&(n=i.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};o=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});o={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(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(M(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:i,error:a}=r;if(a)throw a;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new ot;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Le())throw new Aa("No browser detected.");
136if(t.error||t.error_description||t.error_code)throw new Aa(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 Vm("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Aa("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 Vm("No code detected.");const{data:m,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:u}=t;if(!o||!a||!i||!u)throw new Aa("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(a);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=Es&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const b=f-d;c-b>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",b,f,c):c-b<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",b,f,c);const{data:p,error:x}=await this._getUser(o);if(x)throw x;const g={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:d,expires_at:f,refresh_token:i,token_type:u,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:t.type},error:null})}catch(n){if(M(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_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 kn(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:o}=r;if(o&&!Ra(o))return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(_A(a)&&(a.status===404||a.status===401||a.status===403)||Ra(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Ne(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=NA(),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:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){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",o),Ra(o)?console.warn(o):console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await ms(this.storage,this.storageKey,!0));try{return await z(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(o){if(await Ne(this.storage,`${this.storageKey}-code-verifier`),M(o))return this._returnResult({data:null,error:o});throw o}}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(M(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 o=>{var i,a,l,u,c;const{data:d,error:f}=o;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.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 z(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Le()&&!(!((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(M(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:o}}=r;if(s)throw s;const{options:i,provider:a,token:l,access_token:u,nonce:c}=t,d=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:Ot}),{data:f,error:h}=d;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 ps}
136):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Ne(this.storage,`${this.storageKey}-code-verifier`),M(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:o,error:i}=r;if(i)throw i;return await z(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(M(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 $A(async s=>(s>0&&await DA(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ot})),(s,o)=>{const i=200*Math.pow(2,s);return o&&yc(o)&&Date.now()+i-n<Es})}catch(n){if(this._debug(r,"error",n),M(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),Le()&&!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 kn(this.storage,this.storageKey);if(s&&this.userStorage){let i=await kn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await _s(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:wc()}else if(s&&!s.user&&!s.user){const i=await kn(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await Ne(this.storage,this.storageKey+"-user"),await _s(this.storage,this.storageKey,s)):s.user=wc()}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 o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<vc;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${vc}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),yc(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}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 ot;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new _u;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new ot;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),M(o)){const i={data:null,error:o};return yc(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}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 o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ne(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 _s(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=Ym(s);await _s(this.storage,this.storageKey,o)}else{const s=Ym(r);await _s(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ne(this.storage,this.storageKey),await Ne(this.storage,this.storageKey+"-code-verifier"),await Ne(this.storage,this.storageKey+"-user"),this.userStorage&&await Ne(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Le()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
136catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Es);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)/Es);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Es}ms, refresh threshold is ${Qd} ticks`),s<=Qd&&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.isAcquireTimeout||t instanceof X0)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Le()||!(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[o,i]=await ms(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.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:o}=r;return o?this._returnResult({data:null,error:o}):await z(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(M(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:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});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 z(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o==null?void 0:o.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(M(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:o}=r;if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?hO(t.webauthn.credential_response):fO(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,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(M(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:o}=r;if(o)return this._returnResult({data:null,error:o});const i=await z(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(i.error)return i;const{data:a}=i;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:cO(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:dO(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(M(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 o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,o;if(t)try{const{payload:h}=Oa(t);let b=null;h.aal&&(b=h.aal);let p=b;const{data:{user:x},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(S=>S.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(p="aal2");const v=h.amr||[];return{data:{currentLevel:b,nextLevel:p,currentAuthenticationMethods:v},error:null}}catch(h){if(M(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:i},error:a}
136=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Oa(i.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((o=(s=i.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(c="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:c,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 z(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new ot})})}catch(r){if(M(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:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ot});const i=await z(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 i.data&&i.data.redirect_url&&Le()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(M(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:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ot});const i=await z(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 i.data&&i.data.redirect_url&&Le()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(M(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 z(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 ot})})}catch(t){if(M(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 z(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 ot})})}catch(r){if(M(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+SA>s)return n;const{data:o,error:i}=await z(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:b}
136=await this.getSession();if(b||!h.session)return this._returnResult({data:null,error:b});n=h.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=Oa(n);r!=null&&r.allowExpired||WA(o.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:o,header:s,signature:i},error:null}}const c=VA(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,i,OA(`${a}.${l}`)))throw new eh("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}}Di.nextInstanceID={};const SO=Di,EO="2.103.0";let Go="";typeof Deno<"u"?Go="deno":typeof document<"u"?Go="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Go="react-native":Go="node";const _O={"X-Client-Info":`supabase-js-${Go}/${EO}`},kO={headers:_O},CO={schema:"public"},TO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},RO={};function $i(e){"@babel/helpers - typeof";return $i=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},$i(e)}function PO(e,t){if($i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AO(e){var t=PO(e,"string");return $i(t)=="symbol"?t:t+""}function OO(e,t,r){return(t=AO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sg(Object(r),!0).forEach(function(n){OO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const jO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),NO=()=>Headers,LO=(e,t,r)=>{const n=jO(r),s=NO();return async(o,i)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(o,we(we({},i),{},{headers:u}))}};function IO(e){return e.endsWith("/")?e:e+"/"}function DO(e,t){var r,n;const{db:s,auth:o,realtime:i,global:a}=e,{db:l,auth:u,realtime:c,global:d}=t,f={db:we(we({},l),s),auth:we(we({},u),o),realtime:we(we({},c),i),storage:{},global:we(we(we({},d),a),{},{headers:we(we({},(r=d==null?void 0:d.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 $O(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(IO(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var MO=class extends SO{constructor(e){super(e)}},UO=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=$O(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,a={db:CO,realtime:RO,auth:we(we({},TO),{},{storageKey:i}),global:kO},l=DO(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:(c,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} 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=LO(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(we({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new iP(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new vA(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new YR(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)}
136channel(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:o,flowType:i,lock:a,debug:l,throwOnError:u},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new MO({url:this.authUrl.href,headers:we(we({},f),c),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:a,debug:l,throwOnError:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new FP(this.realtimeUrl.href,we(we({},e),{},{params:we(we({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const FO=(e,t,r)=>new UO(e,t,r);function zO(){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}zO()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function BO(){var x,g;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(m=>e===m||e.endsWith("."+m)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((g=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:g[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=l&&a.test(l)?[l]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],c="lovable-preview-auth:result",d=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(m,v,S)=>new Promise(E=>{const _=f();let k=!1,A;const O=I=>{k||(k=!0,clearTimeout(A),window.removeEventListener("message",N),E(I))},N=I=>{if(u.indexOf(I.origin)<0)return;const V=I.data;V&&V.type===c&&V.requestId===_&&O(V)};window.addEventListener("message",N);const F={type:m,requestId:_,projectId:s,key:v};S!==void 0&&(F.value=S);for(const I of u)window.parent.postMessage(F,I);A=setTimeout(()=>O(null),d)});let b=!0;const p=250;return{getItem:async m=>{let v=await h("lovable-preview-auth:get",m);return!v&&b&&(await new Promise(S=>setTimeout(S,p)),v=await h("lovable-preview-auth:get",m)),b=!1,v&&v.ok&&typeof v.value=="string"?v.value===""?(localStorage.removeItem(m),null):v.value:localStorage.getItem(m)},setItem:(m,v)=>(localStorage.setItem(m,v),h("lovable-preview-auth:set",m,v).then(S=>{S&&S.ok&&typeof S.value=="string"&&localStorage.getItem(m)===v&&(S.value===""?localStorage.removeItem(m):localStorage.setItem(m,S.value))})),removeItem:m=>(localStorage.removeItem(m),h("lovable-preview-auth:remove",m).then(()=>{}))}}const HO="https://jaknrxxsdkxgjerfpptu.supabase.co",WO="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Impha25yeHhzZGt4Z2plcmZwcHR1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzA3NDYyNzIsImV4cCI6MjA4NjMyMjI3Mn0.VviwOK2b2K52GSTZbncefWdrt1s38nMsc4LrYOnPWjY",In=FO(HO,WO,{auth:{storage:BO(),persistSession:!0,autoRefreshToken:!0}});var tb={exports:{}},VO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",KO=VO,qO=KO;function rb(){}function nb(){}nb.resetWarningCache=rb;var GO=function(){function e(n,s,o,i,a,l){if(l!==qO){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
vendor: 5,510 bytes, lines 136-137
136:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:nb,resetWarningCache:rb};return r.PropTypes=r,r};tb.exports=GO();var JO=tb.exports;const xe=mo(JO);function og(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 ig(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?og(Object(r),!0).forEach(function(n){sb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nl=function(t){return typeof t}:nl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nl(e)}function sb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YO(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function QO(e,t){if(e==null)return{};var r=YO(e,t),n,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)n=o[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ob(e,t){return XO(e)||ZO(e,t)||ej(e,t)||tj()}function XO(e){if(Array.isArray(e))return e}function ZO(e,t){var r=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(r!=null){var n=[],s=!0,o=!1,i,a;try{for(r=r.call(e);!(s=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));s=!0);}catch(l){o=!0,a=l}finally{try{!s&&r.return!=null&&r.return()}finally{if(o)throw a}}return n}}function ej(e,t){if(e){if(typeof e=="string")return ag(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ag(e,t)}}function ag(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var We=function(t,r,n){var s=!!n,o=C.useRef(n);C.useEffect(function(){o.current=n},[n]),C.useEffect(function(){if(!s||!t)return function(){};var i=function(){o.current&&o.current.apply(o,arguments)};return t.on(r,i),function(){t.off(r,i)}},[s,r,t,o])},th=function(t){var r=C.useRef(t);return C.useEffect(function(){r.current=t},[t]),r.current},po=function(t){return t!==null&&nl(t)==="object"},rj=function(t){return po(t)&&typeof t.then=="function"},nj=function(t){return po(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},lg="[object Object]",sj=function e(t,r){if(!po(t)||!po(r))return t===r;var n=Array.isArray(t),s=Array.isArray(r);if(n!==s)return!1;var o=Object.prototype.toString.call(t)===lg,i=Object.prototype.toString.call(r)===lg;if(o!==i)return!1;if(!o&&!n)return t===r;var a=Object.keys(t),l=Object.keys(r);if(a.length!==l.length)return!1;for(var u={},c=0;c<a.length;c+=1)u[a[c]]=!0;for(var d=0;d<l.length;d+=1)u[l[d]]=!0;var f=Object.keys(u);if(f.length!==a.length)return!1;var h=t,b=r,p=function(g){return e(h[g],b[g])};return f.every(p)},oj=function(t,r,n){return po(t)?Object.keys(t).reduce(function(s,o){var i=!po(r)||!sj(t[o],r[o]);return n.includes(o)?(i&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),s):i?ig(ig({},s||{}),{},sb({},o,t[o])):s},null):null},ib="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",ug=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ib;if(t===null||nj(t))return t;throw new Error(r)},ij=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ib;if(rj(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(s){return ug(s,r)})};var n=ug(t,r);return n===null?{tag:"empty"}:{tag:"sync",stripe:n}},aj=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"6.2.0"}),t.registerAppInfo({name:"react-stripe-js",version:"6.2.0",url:"https://stripe.com/docs/stripe-js/react"}))},ab=C.createContext(null);ab.displayName="ElementsContext";var lj=function(t,r){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(r," in an <Elements> provider."));return t};xe.any,xe.object;xe.func.isRequired;var lb=C.createContext(null);lb.displayName="CheckoutContext";var cg=function(t){var r=C.useContext(lb),n=C.useContext(ab);if(r){if(n)throw new Error("You cannot wrap the part of your app that ".concat(t," in both a checkout provider and <Elements> provider."));return r}else return lj(n,t)},uj=["mode"],cj=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Re=function(t,r,n){var s="".concat(cj(t),"Element"),o=function(u){var c=u.id,d=u.className,f=u.options,h=f===void 0?{}
137:f,b=u.onBlur,p=u.onFocus,x=u.onReady,g=u.onChange,m=u.onEscape,v=u.onClick,S=u.onLoadError,E=u.onLoaderStart,_=u.onNetworksChange,k=u.onConfirm,A=u.onCancel,O=u.onShippingAddressChange,N=u.onShippingRateChange,F=u.onSavedPaymentMethodRemove,I=u.onSavedPaymentMethodUpdate,V=cg("mounts <".concat(s,">")),L="elements"in V?V.elements:null,K="checkoutState"in V?V.checkoutState:null,B=(K==null?void 0:K.type)==="success"||(K==null?void 0:K.type)==="loading"?K.sdk:null,q=C.useState(null),R=ob(q,2),T=R[0],D=R[1],H=C.useRef(null),U=C.useRef(null);We(T,"blur",b),We(T,"focus",p),We(T,"escape",m),We(T,"click",v),We(T,"loaderror",S),We(T,"loaderstart",E),We(T,"networkschange",_),We(T,"confirm",k),We(T,"cancel",A),We(T,"shippingaddresschange",O),We(T,"shippingratechange",N),We(T,"savedpaymentmethodremove",F),We(T,"savedpaymentmethodupdate",I),We(T,"change",g);var Y;x&&(t==="expressCheckout"?Y=x:Y=function(){x(T)}),We(T,"ready",Y),C.useLayoutEffect(function(){if(H.current===null&&U.current!==null&&(L||B)){var Z=null;if(B){var pe=B,re=B;switch(t){case"paymentForm":Z=re.createForm(h);break;case"payment":Z=pe.createPaymentElement(h);break;case"address":if("mode"in h){var cr=h.mode,kt=QO(h,uj);if(cr==="shipping")Z=pe.createShippingAddressElement(kt);else if(cr==="billing")Z=pe.createBillingAddressElement(kt);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":Z=pe.createExpressCheckoutElement(h);break;case"currencySelector":Z=B.createCurrencySelectorElement();break;case"taxId":Z=pe.createTaxIdElement(h);break;case"contactDetails":Z=pe.createContactDetailsElement();break;default:throw new Error("<".concat(s,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else L&&(Z=L.create(t,h));H.current=Z,D(Z),Z&&Z.mount(U.current)}},[L,B,h]);var X=th(h);return C.useEffect(function(){if(H.current){var Z=oj(h,X,["paymentRequest"]);Z&&"update"in H.current&&H.current.update(Z)}},[h,X]),C.useLayoutEffect(function(){return function(){if(H.current&&typeof H.current.destroy=="function")try{H.current.destroy(),H.current=null}catch{}}},[]),C.createElement("div",{id:c,className:d,ref:U})},i=function(u){cg("mounts <".concat(s,">"));var c=u.id,d=u.className;return C.createElement("div",{id:c,className:d})},a=r?i:o;return a.propTypes={id:xe.string,className:xe.string,onChange:xe.func,onBlur:xe.func,onFocus:xe.func,onReady:xe.func,onEscape:xe.func,onClick:xe.func,onLoadError:xe.func,onLoaderStart:xe.func,onNetworksChange:xe.func,onConfirm:xe.func,onCancel:xe.func,onShippingAddressChange:xe.func,onShippingRateChange:xe.func,onSavedPaymentMethodRemove:xe.func,onSavedPaymentMethodUpdate:xe.func,options:xe.object},a.displayName=s,a.__elementType=t,a},Ee=typeof window>"u",bf=C.createContext(null);bf.displayName="EmbeddedCheckoutProviderContext";var ub=function(){var t=C.useContext(bf);if(!t)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return t},dj="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",hj=function(t){var r=t.stripe,n=t.options,s=t.children,o=C.useMemo(function(){return ij(r,dj)},[r]),i=C.useRef(null),a=C.useRef(null),l=C.useState({embeddedCheckout:null}),u=ob(l,2),c=u[0],d=u[1];C.useEffect(function(){if(!(a.current||i.current)){var b=function(x){a.current||i.current||(a.current=x,i.current=a.current.createEmbeddedCheckoutPage(n).then(function(g){d({embeddedCheckout:g})}))};o.tag==="async"&&!a.current&&(n.clientSecret||n.fetchClientSecret)?o.stripePromise.then(function(p){p&&b(p)}):o.tag==="sync"&&!a.current&&(n.clientSecret||n.fetchClientSecret)&&b(o.stripe)}},[o,n,c,a]),C.useEffect(function(){return function(){c.embeddedCheckout?(i.current=null,c.embeddedCheckout.destroy()):i.current&&i.current.then(function(){i.current=null,c.embeddedCheckout&&c.embeddedCheckout.destroy()})}},[c.embeddedCheckout]),C.useEffect(function(){aj(a)},[a]);var f=th(r);C.useEffect(function(){f!==null&&f!==r&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[f,r]);var h=th(n);return C.useEffect(function(){if(h!=null){if(n==null){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}n.clientSecret===void 0&&n.fetchClientSecret===void 0&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),h.clientSecret!=null&&n.clientSecret!==h.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.fetchClientSecret!=null&&n.fetchClientSecret!==h.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.onComplete!=null&&n.onComplete!==h.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),h.onShippingDetailsChange!=null&&n.onShippingDetailsChange!==h.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),h.onLineItemsChange!=null&&n.onLineItemsChange!==h.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[h,n]),C.createElement(bf.Provider,{value:c},s)},fj=function(t){var r=t.id,n=t.className,s=ub(),o=s.embeddedCheckout,i=C.useRef(!1),a=C.useRef(null);return C.useLayoutEffect(function(){return!i.current&&o&&a.current!==null&&(o.mount(a.current),i.current=!0),function(){if(i.current&&o)try{o.unmount(),i.current=!1}catch{}}}
137,[o]),C.createElement("div",{ref:a,id:r,className:n})},pj=function(t){var r=t.id,n=t.className;return ub(),C.createElement("div",{id:r,className:n})},mj=Ee?pj:fj;Re("auBankAccount",Ee);Re("card",Ee);Re("cardNumber",Ee);Re("cardExpiry",Ee);Re("cardCvc",Ee);Re("iban",Ee);Re("payment",Ee);Re("expressCheckout",Ee);Re("paymentRequestButton",Ee);Re("linkAuthentication",Ee);Re("contactDetails",Ee);Re("address",Ee);Re("shippingAddress",Ee);Re("paymentMethodMessaging",Ee);Re("taxId",Ee);Re("issuingCardNumberDisplay",Ee);Re("issuingCardCvcDisplay",Ee);Re("issuingCardExpiryDisplay",Ee);Re("issuingCardPinDisplay",Ee);Re("issuingCardCopyButton",Ee);function sl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sl=function(t){return typeof t}:sl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}var cb="dahlia",gj=function(t){return t===3?"v3":t},db="https://js.stripe.com",vj="".concat(db,"/").concat(cb,"/stripe.js"),yj=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,wj=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,dg="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",bj=function(t){return yj.test(t)||wj.test(t)},xj=function(){for(var t=document.querySelectorAll('script[src^="'.concat(db,'"]')),r=0;r<t.length;r++){var n=t[r];if(bj(n.src))return n}return null},hg=function(t){var r="",n=document.createElement("script");n.src="".concat(vj).concat(r);var s=document.head||document.body;if(!s)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return s.appendChild(n),n},Sj=function(t,r){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.2.0",startTime:r})},zo=null,ja=null,Na=null,Ej=function(t){return function(r){t(new Error("Failed to load Stripe.js",{cause:r}))}},_j=function(t,r){return function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))}},kj=function(t){return zo!==null?zo:(zo=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&t&&console.warn(dg),window.Stripe){r(window.Stripe);return}try{var s=xj();if(s&&t)console.warn(dg);else if(!s)s=hg(t);else if(s&&Na!==null&&ja!==null){var o;s.removeEventListener("load",Na),s.removeEventListener("error",ja),(o=s.parentNode)===null||o===void 0||o.removeChild(s),s=hg(t)}Na=_j(r,n),ja=Ej(n),s.addEventListener("load",Na),s.addEventListener("error",ja)}catch(i){n(i);return}}),zo.catch(function(r){return zo=null,Promise.reject(r)}))},Cj=function(t,r,n){if(t===null)return null;var s=r[0];if(typeof s!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(sl(s)," instead."));var o=s.match(/^pk_test/),i=gj(t.version),a=cb;o&&i!==a&&console.warn("Stripe.js@".concat(i," was loaded on the page, but @stripe/stripe-js@").concat("9.2.0"," expected Stripe.js@").concat(a,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var l=t.apply(void 0,r);return Sj(l,n),l},Bo,hb=!1,fb=function(){return Bo||(Bo=kj(null).catch(function(t){return Bo=null,Promise.reject(t)}),Bo)};Promise.resolve().then(function(){return fb()}).catch(function(e){hb||console.warn(e)});var Tj=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];hb=!0;var s=Date.now();return fb().then(function(o){return Cj(o,r,s)})};const Pn="pk_live_51SzLijF7JAvqJAuBskQyOE97uABsi28kvaneN1hs1PQJZEMFSXRjzDDSMDH8AB3GXs8DiU9QHEeNXcIlImZPMBPK00hSZGBGCY";function pb(){if(Pn!=null&&Pn.startsWith("pk_test_"))return"sandbox";if(Pn!=null&&Pn.startsWith("pk_live_"))return"live";throw new Error("Stripe payments are not configured for this build. Complete Stripe go-live in your Lovable project to enable production checkout.")}let xc=null;function Rj(){return xc||(pb(),xc=Tj(Pn)),xc}function Pj(){return pb()}function Aj({itemId:e,fulfilment:t,collectGigLabel:r,returnUrl:n}){let s=null,o=null;try{s=Rj(),o=Pj()}catch(l){return y.jsx("p",{className:"font-typewriter text-sm text-red-600 p-4 border border-red-300 bg-red-50",children:l.message})}const i=w.useCallback(async()=>{const{data:l,error:u}=await In.functions.invoke("shop-create-checkout",{body:{itemId:e,fulfilment:t,collectGigLabel:r,returnUrl:n,environment:o}});if(u||!(l!=null&&l.clientSecret))throw new Error((u==null?void 0:u.message)||(l==null?void 0:l.error)||"Failed to create checkout session");return l.clientSecret},[e,t,r,n]),a=w.useMemo(()=>({fetchClientSecret:i}),[i]);return y.jsx("div",{id:"checkout",className:"w-full",children:y.jsx(hj,{stripe:s,options:a,children:y.jsx(mj,{})})})}var Sc="focusScope.autoFocusOnMount",Ec="focusScope.autoFocusOnUnmount",fg={bubbles:!1,cancelable:!0},Oj="FocusScope",mb=w.forwardRef((e,t)=>
vendor: 4,227 bytes, line 137
137{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=w.useState(null),u=ar(s),c=ar(o),d=w.useRef(null),f=Je(t,p=>l(p)),h=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let p=function(v){if(h.paused||!a)return;const S=v.target;a.contains(S)?d.current=S:zr(d.current,{select:!0})},x=function(v){if(h.paused||!a)return;const S=v.relatedTarget;S!==null&&(a.contains(S)||zr(d.current,{select:!0}))},g=function(v){if(document.activeElement===document.body)for(const E of v)E.removedNodes.length>0&&zr(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const m=new MutationObserver(g);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),m.disconnect()}}},[n,a,h.paused]),w.useEffect(()=>{if(a){mg.add(h);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(Sc,fg);a.addEventListener(Sc,u),a.dispatchEvent(g),g.defaultPrevented||(jj($j(gb(a)),{select:!0}),document.activeElement===p&&zr(a))}return()=>{a.removeEventListener(Sc,u),setTimeout(()=>{const g=new CustomEvent(Ec,fg);a.addEventListener(Ec,c),a.dispatchEvent(g),g.defaultPrevented||zr(p??document.body,{select:!0}),a.removeEventListener(Ec,c),mg.remove(h)},0)}}},[a,u,c,h]);const b=w.useCallback(p=>{if(!r&&!n||h.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(x&&g){const m=p.currentTarget,[v,S]=Nj(m);v&&S?!p.shiftKey&&g===S?(p.preventDefault(),r&&zr(v,{select:!0})):p.shiftKey&&g===v&&(p.preventDefault(),r&&zr(S,{select:!0})):g===m&&p.preventDefault()}},[r,n,h.paused]);return y.jsx(Te.div,{tabIndex:-1,...i,ref:f,onKeyDown:b})});mb.displayName=Oj;function jj(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(zr(n,{select:t}),document.activeElement!==r)return}function Nj(e){const t=gb(e),r=pg(t,e),n=pg(t.reverse(),e);return[r,n]}function gb(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 pg(e,t){for(const r of e)if(!Lj(r,{upTo:t}))return r}function Lj(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ij(e){return e instanceof HTMLInputElement&&"select"in e}function zr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Ij(e)&&t&&e.select()}}var mg=Dj();function Dj(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=gg(e,t),e.unshift(t)},remove(t){var r;e=gg(e,t),(r=e[0])==null||r.resume()}}}function gg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function $j(e){return e.filter(t=>t.tagName!=="A")}var _c=0;function Mj(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vg()),document.body.insertAdjacentElement("beforeend",e[1]??vg()),_c++,()=>{_c===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_c--}},[])}function vg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var rr=function(){return rr=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},rr.apply(this,arguments)};function vb(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Uj(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;
vendor: 4,973 bytes, lines 137-152
137n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var ol="right-scroll-bar-position",il="width-before-scroll-bar",Fj="with-scroll-bars-hidden",zj="--removed-body-scroll-bar-size";function kc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bj(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var Hj=typeof window<"u"?w.useLayoutEffect:w.useEffect,yg=new WeakMap;function Wj(e,t){var r=Bj(null,function(n){return e.forEach(function(s){return kc(s,n)})});return Hj(function(){var n=yg.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(a){o.has(a)||kc(a,null)}),o.forEach(function(a){s.has(a)||kc(a,i)})}yg.set(r,e)},[e]),r}function Vj(e){return e}function Kj(e,t){t===void 0&&(t=Vj);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(o),i=r}var l=function(){var c=i;i=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return s}function qj(e){e===void 0&&(e={});var t=Kj(null);return t.options=rr({async:!0,ssr:!1},e),t}var yb=function(e){var t=e.sideCar,r=vb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,rr({},r))};yb.isSideCarExport=!0;function Gj(e,t){return e.useMedium(t),yb}var wb=qj(),Cc=function(){},ku=w.forwardRef(function(e,t){var r=w.useRef(null),n=w.useState({onScrollCapture:Cc,onWheelCapture:Cc,onTouchMoveCapture:Cc}),s=n[0],o=n[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,b=e.noIsolation,p=e.inert,x=e.allowPinchZoom,g=e.as,m=g===void 0?"div":g,v=e.gapMode,S=vb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,_=Wj([r,t]),k=rr(rr({},S),s);return w.createElement(w.Fragment,null,c&&w.createElement(E,{sideCar:wb,removeScrollBar:u,shards:d,noRelative:h,noIsolation:b,inert:p,setCallbacks:o,allowPinchZoom:!!x,lockRef:r,gapMode:v}),i?w.cloneElement(w.Children.only(a),rr(rr({},k),{ref:_})):w.createElement(m,rr({},k,{className:l,ref:_}),a))});ku.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ku.classNames={fullWidth:il,zeroRight:ol};var Jj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jj();return t&&e.setAttribute("nonce",t),e}function Qj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Xj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Zj=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Yj())&&(Qj(t,r),Xj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eN=function(){var e=Zj();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},bb=function(){var e=eN(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},tN={left:0,top:0,right:0,gap:0},Tc=function(e){return parseInt(e||"",10)||0},rN=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Tc(r),Tc(n),Tc(s)]},nN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tN;var t=rN(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},sN=bb(),Js="data-scroll-locked",oN=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
138  .`.concat(Fj,` {
139   overflow: hidden `).concat(n,`;
140   padding-right: `).concat(a,"px ").concat(n,`;
141  }
142  body[`).concat(Js,`] {
143    overflow: hidden `).concat(n,`;
144    overscroll-behavior: contain;
145    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
146    padding-left: `.concat(s,`px;
147    padding-top: `).concat(o,`px;
148    padding-right: `).concat(i,`px;
149    margin-left:0;
150    margin-top:0;
151    margin-right: `).concat(a,"px ").concat(n,`;
152    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
152")].filter(Boolean).join(""),`
153  }
154  
155  .`).concat(ol,` {
156    right: `).concat(a,"px ").concat(n,`;
157  }
158  
159  .`).concat(il,` {
160    margin-right: `).concat(a,"px ").concat(n,`;
161  }
162  
163  .`).concat(ol," .").concat(ol,` {
164    right: 0 `).concat(n,`;
165  }
166  
167  .`).concat(il," .").concat(il,` {
168    margin-right: 0 `).concat(n,`;
169  }
170  
171  body[`).concat(Js,`] {
172    `).concat(zj,": ").concat(a,`px;
173  }
174`)},wg=function(){var e=parseInt(document.body.getAttribute(Js)||"0",10);return isFinite(e)?e:0},iN=function(){w.useEffect(function(){return document.body.setAttribute(Js,(wg()+1).toString()),function(){var e=wg()-1;e<=0?document.body.removeAttribute(Js):document.body.setAttribute(Js,e.toString())}},[])},aN=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;iN();var o=w.useMemo(function(){return nN(s)},[s]);return w.createElement(sN,{styles:oN(o,!t,s,r?"":"!important")})},rh=!1;if(typeof window<"u")try{var La=Object.defineProperty({},"passive",{get:function(){return rh=!0,!0}});window.addEventListener("test",La,La),window.removeEventListener("test",La,La)}catch{rh=!1}var ys=rh?{passive:!1}:!1,lN=function(e){return e.tagName==="TEXTAREA"},xb=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!lN(e)&&r[t]==="visible")},uN=function(e){return xb(e,"overflowY")},cN=function(e){return xb(e,"overflowX")},bg=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Sb(e,n);if(s){var o=Eb(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},dN=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},hN=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Sb=function(e,t){return e==="v"?uN(t):cN(t)},Eb=function(e,t){return e==="v"?dN(t):hN(t)},fN=function(e,t){return e==="h"&&t==="rtl"?-1:1},pN=function(e,t,r,n,s){var o=fN(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),u=!1,c=i>0,d=0,f=0;do{if(!a)break;var h=Eb(e,a),b=h[0],p=h[1],x=h[2],g=p-x-o*b;(b||g)&&Sb(e,a)&&(d+=g,f+=b);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(Math.abs(d)<1||!s)||!c&&(Math.abs(f)<1||!s))&&(u=!0),u},Ia=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xg=function(e){return[e.deltaX,e.deltaY]},Sg=function(e){return e&&"current"in e?e.current:e},mN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gN=function(e){return`
175  .block-interactivity-`.concat(e,` {pointer-events: none;}
176  .allow-interactivity-`).concat(e,` {pointer-events: all;}
177`)},vN=0,ws=[];function yN(e){var t=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),s=w.useState(vN++)[0],o=w.useState(bb)[0],i=w.useRef(e);w.useEffect(function(){i.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=Uj([e.lockRef.current],(e.shards||[]).map(Sg),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=w.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var g=Ia(p),m=r.current,v="deltaX"in p?p.deltaX:m[0]-g[0],S="deltaY"in p?p.deltaY:m[1]-g[1],E,_=p.target,k=Math.abs(v)>Math.abs(S)?"h":"v";if("touches"in p&&k==="h"&&_.type==="range")return!1;var A=bg(k,_);if(!A)return!0;if(A?E=k:(E=k==="v"?"h":"v",A=bg(k,_)),!A)return!1;if(!n.current&&"changedTouches"in p&&(v||S)&&(n.current=E),!E)return!0;var O=n.current||E;return pN(O,x,p,O==="h"?v:S,!0)},[]),l=w.useCallback(function(p){var x=p;if(!(!ws.length||ws[ws.length-1]!==o)){var g="deltaY"in x?xg(x):Ia(x),m=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&mN(E.delta,g)})[0];if(m&&m.should){x.cancelable&&x.preventDefault();return}
vendor: 4,333 bytes, line 177
177if(!m){var v=(i.current.shards||[]).map(Sg).filter(Boolean).filter(function(E){return E.contains(x.target)}),S=v.length>0?a(x,v[0]):!i.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=w.useCallback(function(p,x,g,m){var v={name:p,delta:x,target:g,should:m,shadowParent:wN(g)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(S){return S!==v})},1)},[]),c=w.useCallback(function(p){r.current=Ia(p),n.current=void 0},[]),d=w.useCallback(function(p){u(p.type,xg(p),p.target,a(p,e.lockRef.current))},[]),f=w.useCallback(function(p){u(p.type,Ia(p),p.target,a(p,e.lockRef.current))},[]);w.useEffect(function(){return ws.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ys),document.addEventListener("touchmove",l,ys),document.addEventListener("touchstart",c,ys),function(){ws=ws.filter(function(p){return p!==o}),document.removeEventListener("wheel",l,ys),document.removeEventListener("touchmove",l,ys),document.removeEventListener("touchstart",c,ys)}},[]);var h=e.removeScrollBar,b=e.inert;return w.createElement(w.Fragment,null,b?w.createElement(o,{styles:gN(s)}):null,h?w.createElement(aN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function wN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bN=Gj(wb,yN);var _b=w.forwardRef(function(e,t){return w.createElement(ku,rr({},e,{ref:t,sideCar:bN}))});_b.classNames=ku.classNames;var xN=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,Da=new WeakMap,$a={},Rc=0,kb=function(e){return e&&(e.host||kb(e.parentNode))},SN=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=kb(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},EN=function(e,t,r,n){var s=SN(t,Array.isArray(e)?e:[e]);$a[r]||($a[r]=new WeakMap);var o=$a[r],i=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(n),b=h!==null&&h!=="false",p=(bs.get(f)||0)+1,x=(o.get(f)||0)+1;bs.set(f,p),o.set(f,x),i.push(f),p===1&&b&&Da.set(f,!0),x===1&&f.setAttribute(r,"true"),b||f.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),a.clear(),Rc++,function(){i.forEach(function(d){var f=bs.get(d)-1,h=o.get(d)-1;bs.set(d,f),o.set(d,h),f||(Da.has(d)||d.removeAttribute(n),Da.delete(d)),h||d.removeAttribute(r)}),Rc--,Rc||(bs=new WeakMap,bs=new WeakMap,Da=new WeakMap,$a={})}},_N=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=xN(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),EN(n,s,r,"aria-hidden")):function(){return null}},Cu="Dialog",[Cb,rL]=Ki(Cu),[kN,Vt]=Cb(Cu),Tb=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=w.useRef(null),l=w.useRef(null),[u,c]=Qy({prop:n,defaultProp:s??!1,onChange:o,caller:Cu});return y.jsx(kN,{scope:t,triggerRef:a,contentRef:l,contentId:lc(),titleId:lc(),descriptionId:lc(),open:u,onOpenChange:c,onOpenToggle:w.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};Tb.displayName=Cu;var Rb="DialogTrigger",CN=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Vt(Rb,r),o=Je(t,s.triggerRef);return y.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ef(s.open),...n,ref:o,onClick:fe(e.onClick,s.onOpenToggle)})});CN.displayName=Rb;var xf="DialogPortal",[TN,Pb]=Cb(xf,{forceMount:void 0}),Ab=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Vt(xf,t);return y.jsx(TN,{scope:t,forceMount:r,children:w.Children.map(n,i=>y.jsx(wo,{present:r||o.open,children:y.jsx(Xh,{asChild:!0,container:s,children:i})}))})};Ab.displayName=xf;var Hl="DialogOverlay",Ob=w.forwardRef((e,t)=>{const r=Pb(Hl,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Vt(Hl,e.__scopeDialog);return o.modal?y.jsx(wo,{present:n||o.open,children:y.jsx(PN,{...s,ref:t})}):null});Ob.displayName=Hl;var RN=Ol("DialogOverlay.RemoveScroll"),PN=w.forwardRef((e,t)=>
vendor: 4,628 bytes, lines 177-181
177{const{__scopeDialog:r,...n}=e,s=Vt(Hl,r);return y.jsx(_b,{as:RN,allowPinchZoom:!0,shards:[s.contentRef],children:y.jsx(Te.div,{"data-state":Ef(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Qn="DialogContent",jb=w.forwardRef((e,t)=>{const r=Pb(Qn,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Vt(Qn,e.__scopeDialog);return y.jsx(wo,{present:n||o.open,children:o.modal?y.jsx(AN,{...s,ref:t}):y.jsx(ON,{...s,ref:t})})});jb.displayName=Qn;var AN=w.forwardRef((e,t)=>{const r=Vt(Qn,e.__scopeDialog),n=w.useRef(null),s=Je(t,r.contentRef,n);return w.useEffect(()=>{const o=n.current;if(o)return _N(o)},[]),y.jsx(Nb,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fe(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:fe(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:fe(e.onFocusOutside,o=>o.preventDefault())})}),ON=w.forwardRef((e,t)=>{const r=Vt(Qn,e.__scopeDialog),n=w.useRef(!1),s=w.useRef(!1);return y.jsx(Nb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Nb=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Vt(Qn,r),l=w.useRef(null),u=Je(t,l);return Mj(),y.jsxs(y.Fragment,{children:[y.jsx(mb,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:y.jsx(iu,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ef(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(jN,{titleId:a.titleId}),y.jsx(LN,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Sf="DialogTitle",Lb=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Vt(Sf,r);return y.jsx(Te.h2,{id:s.titleId,...n,ref:t})});Lb.displayName=Sf;var Ib="DialogDescription",Db=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Vt(Ib,r);return y.jsx(Te.p,{id:s.descriptionId,...n,ref:t})});Db.displayName=Ib;var $b="DialogClose",Mb=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Vt($b,r);return y.jsx(Te.button,{type:"button",...n,ref:t,onClick:fe(e.onClick,()=>s.onOpenChange(!1))})});Mb.displayName=$b;function Ef(e){return e?"open":"closed"}var Ub="DialogTitleWarning",[nL,Fb]=UE(Ub,{contentName:Qn,titleName:Sf,docsSlug:"dialog"}),jN=({titleId:e})=>{const t=Fb(Ub),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
178
179If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
180
181For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},NN="DialogDescriptionWarning",LN=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fb(NN).contentName}}.`;return w.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},IN=Tb,DN=Ab,zb=Ob,Bb=jb,Hb=Lb,Wb=Db,$N=Mb;const MN=IN,UN=DN,Vb=w.forwardRef(({className:e,...t},r)=>y.jsx(zb,{ref:r,className:_t("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Vb.displayName=zb.displayName;const Kb=w.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(UN,{children:[y.jsx(Vb,{}),y.jsxs(Bb,{ref:n,className:_t("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
181nded-lg",e),...r,children:[t,y.jsxs($N,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[y.jsx(bw,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Kb.displayName=Bb.displayName;const qb=({className:e,...t})=>y.jsx("div",{className:_t("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});qb.displayName="DialogHeader";const Gb=w.forwardRef(({className:e,...t},r)=>y.jsx(Hb,{ref:r,className:_t("text-lg font-semibold leading-none tracking-tight",e),...t}));Gb.displayName=Hb.displayName;const Jb=w.forwardRef(({className:e,...t},r)=>y.jsx(Wb,{ref:r,className:_t("text-sm text-muted-foreground",e),...t}));Jb.displayName=Wb.displayName;const FN=e=>`£${(e/100).toFixed(2)}`,zN=e=>e.status==="sold",BN=e=>e.status==="reserved"&&!!e.reserved_until&&new Date(e.reserved_until)>new Date,HN=()=>{const[e,t]=w.useState([]),[r,n]=w.useState(!0),[s,o]=w.useState(null),[i,a]=w.useState(null),[l,u]=w.useState(""),[c,d]=w.useState(null),[f,h]=w.useState(null),b=w.useMemo(()=>zR(),[]);w.useEffect(()=>{let E=!1;(async()=>{const{data:A}=await In.from("shop_items").select("*").order("sort_order",{ascending:!0});!E&&A&&t(A),n(!1)})();const k=In.channel("shop_items_realtime").on("postgres_changes",{event:"*",schema:"public",table:"shop_items"},A=>{const O=A.new;O!=null&&O.id&&t(N=>N.map(F=>F.id===O.id?{...F,...O}:F))}).subscribe();return()=>{E=!0,In.removeChannel(k)}},[]);const p=E=>{o(E),a(null),u("")},x=()=>{if(s&&S){const E=s.id;In.functions.invoke("shop-orders",{body:{op:"release_reservation",itemId:E}}).catch(_=>console.warn("release_reservation failed",_))}o(null),a(null),u("")},g=(E,_)=>{h({item:E,showBack:_})},m=()=>h(null),v=()=>{f&&h({item:f.item,showBack:!f.showBack})};w.useEffect(()=>{if(!f)return;const E=_=>{_.key==="Escape"&&m(),f.item.image_back_url&&(_.key==="ArrowLeft"||_.key==="ArrowRight")&&v()};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[f]);const S=i==="ship_uk"||i==="collect_gig"&&l.length>0;return y.jsxs("div",{className:"min-h-screen bg-background overflow-hidden flex flex-col",children:[y.jsxs(yu,{children:[y.jsx("title",{children:"Merch Shop — Lazy Jane"}),y.jsx("meta",{name:"description",content:"One-of-one Lazy Jane shirts and merch. Each piece is unique — when it's gone, it's gone."}),y.jsx("meta",{property:"og:title",content:"Merch Shop — Lazy Jane"}),y.jsx("meta",{property:"og:description",content:"One-of-one Lazy Jane shirts. Each piece is unique — when it's gone, it's gone."})]}),y.jsx(I0,{}),y.jsx(_o,{text:"★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥"}),y.jsx(bu,{}),y.jsxs("section",{className:"px-4 pt-24 pb-16 max-w-7xl mx-auto w-full flex-1",children:[y.jsxs("header",{className:"text-center mb-10",children:[y.jsx("h1",{className:"font-typewriter text-3xl md:text-5xl text-primary mb-3",children:"SHOP"}),y.jsx("p",{className:"font-typewriter text-sm md:text-base text-muted-foreground max-w-2xl mx-auto",children:"One-of-one screenprinted t-shirts, tanks & a dress. Each piece handmade by the band in a garden. When it's gone, it's gone."}),y.jsx("p",{className:"font-typewriter text-xs text-muted-foreground/80 mt-2 uppercase tracking-wider",children:"£5 UK shipping · Free collection at a gig · No refunds"})]}),r?y.jsx("p",{className:"text-center font-typewriter text-muted-foreground",children:"Loading…"}):e.length===0?y.jsx("p",{className:"text-center font-typewriter text-muted-foreground",children:"Nothing in the shop yet."}):y.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(E=>{const _=zN(E),k=BN(E),A=!_&&!k,O=!!(c===E.id&&E.image_back_url),N=O?E.image_back_url:E.image_front_url;return y.jsxs("article",{className:"border border-muted-foreground/20 bg-card/40 backdrop-blur-sm flex flex-col",children:[y.jsxs("div",{className:"relative aspect-square overflow-hidden bg-muted",children:[y.jsx("img",{src:N,alt:`${E.name} — ${O?"back":"front"}`,className:"w-full h-full object-cover cursor-zoom-in",loading:"lazy",onClick:()=>g(E,O)}),E.image_back_url&&y.jsxs(y.Fragment,{children:[y.jsx("button",{"aria-label":"Previous view",onClick:()=>d(O?null:E.id),className:"absolute left-2 top-1/2 -translate-y-1/2 font-typewriter text-base px-2 py-1 bg-background/80 border border-muted-foreground
181/40 hover:bg-primary hover:text-primary-foreground transition-colors",children:"←"}),y.jsx("button",{"aria-label":"Next view",onClick:()=>d(O?null:E.id),className:"absolute right-2 top-1/2 -translate-y-1/2 font-typewriter text-base px-2 py-1 bg-background/80 border border-muted-foreground/40 hover:bg-primary hover:text-primary-foreground transition-colors",children:"→"})]}),_&&y.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/70",children:y.jsx("span",{className:"font-typewriter text-2xl text-primary uppercase tracking-widest",children:"Sold"})}),k&&y.jsx("div",{className:"absolute top-2 left-2 font-typewriter text-[10px] uppercase tracking-wider px-2 py-1 bg-background/80 border border-muted-foreground/40 text-muted-foreground",children:"In checkout"})]}),y.jsxs("div",{className:"p-4 flex-1 flex flex-col",children:[y.jsx("h2",{className:"font-typewriter text-lg text-foreground",children:E.name}),y.jsxs("p",{className:"font-typewriter text-xs text-muted-foreground uppercase tracking-wider mt-1",children:["Size ",E.size_label," · One of one"]}),y.jsx("p",{className:"font-typewriter text-sm text-foreground/80 mt-2 flex-1",children:E.description}),y.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[y.jsx("span",{className:"font-typewriter text-xl text-primary",children:FN(E.price_pence)}),y.jsx("button",{disabled:!A,onClick:()=>p(E),className:"px-4 py-2 font-typewriter text-sm bg-primary text-primary-foreground uppercase tracking-wider hover:bg-primary/90 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:_?"Sold":k?"Reserved":"Buy"})]})]})]},E.id)})})]}),y.jsx(MN,{open:!!s,onOpenChange:E=>!E&&x(),children:y.jsxs(Kb,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[y.jsxs(qb,{children:[y.jsxs(Gb,{className:"font-typewriter",children:[s==null?void 0:s.name," — Size ",s==null?void 0:s.size_label]}),y.jsx(Jb,{className:"font-typewriter",children:i?"Complete payment below.":"How would you like to receive it?"})]}),!i&&y.jsxs("div",{className:"space-y-3 pt-2",children:[y.jsxs("button",{onClick:()=>a("ship_uk"),className:"w-full text-left p-4 border border-muted-foreground/30 hover:border-primary hover:bg-primary/5 transition-colors",children:[y.jsx("p",{className:"font-typewriter text-base text-foreground",children:"Ship to UK address"}),y.jsx("p",{className:"font-typewriter text-xs text-muted-foreground mt-1",children:"+£5.00 shipping"})]}),y.jsxs("button",{onClick:()=>a("collect_gig"),className:"w-full text-left p-4 border border-muted-foreground/30 hover:border-primary hover:bg-primary/5 transition-colors",children:[y.jsx("p",{className:"font-typewriter text-base text-foreground",children:"Collect at a gig"}),y.jsx("p",{className:"font-typewriter text-xs text-muted-foreground mt-1",children:"Free · Pick from upcoming dates"})]})]}),i==="collect_gig"&&!l&&y.jsxs("div",{className:"space-y-2 pt-2",children:[y.jsx("p",{className:"font-typewriter text-sm text-muted-foreground",children:"Pick a gig to collect at:"}),b.length===0&&y.jsx("p",{className:"font-typewriter text-sm text-muted-foreground",children:"No upcoming gigs scheduled. Choose shipping instead."}),b.map(E=>y.jsxs("button",{onClick:()=>u(`${E.date} — ${E.venue}`),className:"w-full text-left p-3 border border-muted-foreground/30 hover:border-primary hover:bg-primary/5 transition-colors",children:[y.jsx("p",{className:"font-typewriter text-sm text-foreground",children:E.venue}),y.jsx("p",{className:"font-typewriter text-xs text-muted-foreground mt-1",children:E.date})]},E.id)),y.jsx("button",{onClick:()=>a(null),className:"font-typewriter text-xs text-muted-foreground hover:text-primary underline mt-2",children:"← Back"})]}),s&&S&&y.jsxs("div",{className:"pt-2 space-y-3",children:[y.jsx("button",{onClick:x,className:"font-typewriter text-xs text-muted-foreground hover:text-primary underline",children:"← Cancel & choose another"}),y.jsx(Aj,{itemId:s.id,fulfilment:i,collectGigLabel:i==="collect_gig"?l:void 0,returnUrl:`${window.location.origin}/shop/return?session_id={CHECKOUT_SESSION_ID}`})]})]})}),f&&y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-sm cursor-pointer animate-in fade-in duration-200",onClick:m,children:[y.jsx("button",{onClick:m,className:"absolute top-4 right-4 sm:top-6 sm:right-6 font-pixel text-foreground text-2xl hover:text-primary transition-colors z-10","aria-label":"Close",children:"✕"}),f.item.image_back_url&&y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:E=>{E.stopPropagation(),v()},className:"absolute left-2 sm:left-6 top-1/2 -translate-y-1/2 font-pixel text-foreground text-3xl sm:text-4xl hover:text-primary transition-colors z-10 px-3 py-2","aria-label":"Flip view",children:"←"}),y.jsx("button",{onClick:E=>{E.stopPropagation(),v()},className:"absolute right-2 sm:right-6 top-1/2 -translate-y-1/2 font-pixel text-foreground text-3xl sm:text-4xl hover:text-primary transition-colors z-10 px-3 py-2","aria-label":"Flip view",children:"→"})]}),y.jsxs("div",{className:"flex flex-col items-center",onClick:E=>E.stopPropagation(),children:[y.jsx("img",{src:f.showBack?f.item.image_back_url:f.item.image_front_url,alt:`${f.item.name} — ${f.showBack?"back":"front"}`,className:"max-h-[85vh] max-w-[90vw] object-contain"}),y.jsxs("p",{className:"mt-3 font-typewriter text-sm text-muted-foreground",children:[f.item.name," — ",f.showBack?"Back":"Front"]})]})]}),y.jsx("div",{className:"construction-stripe"}),y.jsx(wu,{})]})},WN=()=>{const[e]=uR(),t=e.get("session_id"),[r,n]=w.useState("loading"),[s,o]=w.useState("");return w.useEffect(()=>{if(!t){n("error");return}let i=!1;const a=async()=>{const{data:u,error:c}=await In.functions.invoke("shop-orders",{body:{op:"order_status",sessionId:t}}
181);if(i)return;if(c){n("open");return}const d=u==null?void 0:u.order;(d==null?void 0:d.status)==="paid"?(n("paid"),o(d.buyer_email||"")):n("open")};a();const l=setInterval(a,2500);return()=>{i=!0,clearInterval(l)}},[t]),y.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[y.jsx(_o,{text:"★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥ Lazy Love ★ ♥"}),y.jsx("section",{className:"flex-1 flex items-center justify-center px-4 py-16",children:y.jsxs("div",{className:"text-center max-w-lg",children:[r==="loading"&&y.jsx("p",{className:"font-typewriter",children:"Checking your order…"}),r==="open"&&y.jsxs(y.Fragment,{children:[y.jsx("h1",{className:"font-typewriter text-2xl text-primary mb-3",children:"Hang tight…"}),y.jsx("p",{className:"font-typewriter text-muted-foreground",children:"We're confirming your payment with Stripe. This page will update automatically."})]}),r==="paid"&&y.jsxs(y.Fragment,{children:[y.jsx("h1",{className:"font-typewriter text-3xl text-primary mb-3",children:"Thank you! 🎸"}),y.jsx("p",{className:"font-typewriter text-foreground mb-2",children:"Your one-of-one shirt is yours."}),s&&y.jsxs("p",{className:"font-typewriter text-sm text-muted-foreground mb-6",children:["A receipt is on its way to ",s,"."]}),y.jsx(tr,{to:"/shop",className:"inline-block px-5 py-2 font-typewriter text-sm bg-primary text-primary-foreground uppercase tracking-wider hover:bg-primary/90 transition-colors",children:"← Back to shop"})]}),r==="error"&&y.jsxs(y.Fragment,{children:[y.jsx("h1",{className:"font-typewriter text-2xl text-primary mb-3",children:"Something went wrong"}),y.jsx("p",{className:"font-typewriter text-muted-foreground mb-6",children:"We couldn't find that checkout session."}),y.jsx(tr,{to:"/shop",className:"inline-block px-5 py-2 font-typewriter text-sm bg-primary text-primary-foreground uppercase tracking-wider hover:bg-primary/90 transition-colors",children:"← Back to shop"})]})]})}),y.jsx(wu,{})]})},VN=(e,t)=>`${t.toUpperCase()} ${(e/100).toFixed(2)}`,KN=()=>{const[e,t]=w.useState(""),[r,n]=w.useState(null),[s,o]=w.useState(""),[i,a]=w.useState(!1),l=async u=>{u.preventDefault(),o(""),a(!0);const{data:c,error:d}=await In.functions.invoke("shop-orders",{body:{op:"list_orders",password:e}});if(a(!1),d){o(d.message||"Failed to load.");return}const f=c;if(f.error){o(f.error);return}n(f.orders??[])};return y.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[y.jsx(_o,{text:"★ ♥ ADMIN ★ ♥ ADMIN ★ ♥ ADMIN ★ ♥"}),y.jsxs("section",{className:"flex-1 px-4 py-12 max-w-5xl mx-auto w-full",children:[y.jsxs("header",{className:"mb-8 flex items-center justify-between",children:[y.jsx("h1",{className:"font-typewriter text-3xl text-primary",children:"SHOP ORDERS"}),y.jsx(tr,{to:"/shop",className:"font-typewriter text-sm underline text-muted-foreground",children:"← Shop"})]}),!r&&y.jsxs("form",{onSubmit:l,className:"max-w-sm space-y-3",children:[y.jsx("label",{className:"font-typewriter text-sm text-foreground block",children:"Admin password"}),y.jsx("input",{type:"password",value:e,onChange:u=>t(u.target.value),className:"w-full px-3 py-2 bg-background border border-muted-foreground/40 font-typewriter text-foreground"}),y.jsx("button",{type:"submit",disabled:i||!e,className:"px-5 py-2 font-typewriter text-sm bg-primary text-primary-foreground uppercase tracking-wider hover:bg-primary/90 transition-colors disabled:opacity-40",children:i?"Loading…":"Unlock"}),s&&y.jsx("p",{className:"font-typewriter text-sm text-red-500",children:s})]}),r&&y.jsx("div",{className:"space-y-3",children:r.length===0?y.jsx("p",{className:"font-typewriter text-muted-foreground",children:"No orders yet."}):r.map(u=>{var c,d;return y.jsxs("article",{className:"border border-muted-foreground/30 p-4 font-typewriter text-sm",children:[y.jsxs("div",{className:"flex flex-wrap justify-between gap-2 mb-2",children:[y.jsxs("span",{className:"text-primary",children:[((c=u.shop_items)==null?void 0:c.name)??"(item)"," — Size ",((d=u.shop_items)==null?void 0:d.size_label)??"?"]}),y.jsxs("span",{className:u.status==="paid"?"text-green-500":u.status==="cancelled"?"text-red-500":"text-muted-foreground",children:[u.status.toUpperCase()," · ",VN(u.amount_pence,u.currency)]})]}
181),y.jsx("p",{className:"text-foreground/80",children:new Date(u.created_at).toLocaleString("en-GB",{timeZone:"Europe/London"})}),y.jsxs("p",{className:"text-foreground/80",children:["Buyer: ",u.buyer_email??"—"]}),y.jsxs("p",{className:"text-foreground/80",children:["Fulfilment:"," ",u.fulfilment==="ship_uk"?"Ship to UK":u.fulfilment==="collect_gig"?`Collect at gig — ${u.collect_gig_label??"?"}`:"—"]}),u.shipping_address&&y.jsx("pre",{className:"mt-2 text-xs text-muted-foreground whitespace-pre-wrap",children:JSON.stringify(u.shipping_address,null,2)}),y.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Stripe: ",u.stripe_session_id]})]},u.id)})})]}),y.jsx(wu,{})]})},qN=()=>{const e=wn();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:y.jsxs("div",{className:"text-center",children:[y.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),y.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),y.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},GN=new iT,JN=()=>y.jsx(j0,{children:y.jsx(lT,{client:GN,children:y.jsxs(DC,{children:[y.jsx(vk,{}),y.jsx(Jk,{}),y.jsx(oR,{children:y.jsxs(QT,{children:[y.jsx(Fr,{path:"/",element:y.jsx(WR,{})}),y.jsx(Fr,{path:"/gallery",element:y.jsx(VR,{})}),y.jsx(Fr,{path:"/posters",element:y.jsx(KR,{})}),y.jsx(Fr,{path:"/shop",element:y.jsx(HN,{})}),y.jsx(Fr,{path:"/shop/return",element:y.jsx(WN,{})}),y.jsx(Fr,{path:"/shop/admin",element:y.jsx(KN,{})}),y.jsx(Fr,{path:"*",element:y.jsx(qN,{})})]})})]})})});Wy(document.getElementById("root")).render(y.jsx(JN,{}));

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.